sdk

package
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2022 License: Apache-2.0, MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateParticipantResponse

type ActivateParticipantResponse struct {
	Success bool `json:"success"`
}

type BlockchainEventService

type BlockchainEventService interface {

	/**
	 * 监听系统事件;
	 *
	 * @param ledgerHash
	 * @param eventPoint
	 * @param listener
	 * @return
	 */
	MonitorSystemEvent(ledgerHash *framework.HashDigest, eventPoint SystemEventPoint, listener SystemEventListener) SystemEventListenerHandle

	/**
	 * 监听用户事件;
	 *
	 * @param ledgerHash
	 * @param eventAccount  事件账户地址;
	 * @param eventName
	 * @param startSequence
	 * @param listener
	 * @return
	 */
	MonitorUserEvent(ledgerHash *framework.HashDigest, eventAccount, eventName string, startSequence int64, listener UserEventListener) UserEventListenerHandle

	/**
	* 监听用户事件列表
	*
	* @param ledgerHash
	* @param startingEventPoints
	* @param listener
	* @return
	 */
	MonitorUserEvents(ledgerHash *framework.HashDigest, startingEventPoints []UserEventPoint, listener UserEventListener) UserEventListenerHandle
}

type BlockchainKeyGenerator

type BlockchainKeyGenerator struct {
}

func NewBlockchainKeyGenerator

func NewBlockchainKeyGenerator() *BlockchainKeyGenerator

func (BlockchainKeyGenerator) Generate

func (BlockchainKeyGenerator) GenerateWithSeed

func (b BlockchainKeyGenerator) GenerateWithSeed(algorithm framework.CryptoAlgorithm, seed []byte) (*ledger_model.BlockchainKeypair, error)

func (BlockchainKeyGenerator) MustGenerate added in v1.3.3

type BlockchainServiceFactory

type BlockchainServiceFactory interface {
	GetBlockchainService() BlockchainService
}

type BlockchainTransactionService

type BlockchainTransactionService interface {

	// 发起新交易
	NewTransaction(ledgerHash *framework.HashDigest) ledger_model.TransactionTemplate

	// 根据交易内容准备交易实例
	PrepareTransaction(content *ledger_model.TransactionContent) (ledger_model.PreparedTransaction, error)
}

type EndpointAutoSigner

type EndpointAutoSigner struct {
	// contains filtered or unexported fields
}

func (*EndpointAutoSigner) Process

type GMSSLSecurity added in v1.3.3

type GMSSLSecurity struct {
	RootCerts *gmx509.CertPool
	SigCert   *gmtls.Certificate
	EncCert   *gmtls.Certificate
}

国密TLS 暂时仅支持忽略和单向认证

func NewGMSSLSecurity added in v1.3.3

func NewGMSSLSecurity(rootCertFile string) (*GMSSLSecurity, error)

func NewTwoWayGMSSLSecurity added in v1.3.3

func NewTwoWayGMSSLSecurity(rootCertFile, signCertPath, signKeyFile, encCertFile, encKeyFile string) (*GMSSLSecurity, error)

type GatewayBlockchainService

type GatewayBlockchainService struct {
	QueryService ledger_model.BlockchainQueryService
	TxService    ledger_model.TransactionService

	LedgerHashs []*framework.HashDigest
	// contains filtered or unexported fields
}

func NewGatewayBlockchainService

func NewGatewayBlockchainService(ledgerHashs []*framework.HashDigest, cryptoSettings []ledger_model.CryptoSetting, txService ledger_model.TransactionService, queryService ledger_model.BlockchainQueryService) *GatewayBlockchainService

func (*GatewayBlockchainService) GetAdditionalContractCount

func (b *GatewayBlockchainService) GetAdditionalContractCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalContractCountByHash

func (b *GatewayBlockchainService) GetAdditionalContractCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalContractCountByHeight

func (b *GatewayBlockchainService) GetAdditionalContractCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (int64, error)

func (*GatewayBlockchainService) GetAdditionalDataAccountCount

func (b *GatewayBlockchainService) GetAdditionalDataAccountCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalDataAccountCountByHash

func (b *GatewayBlockchainService) GetAdditionalDataAccountCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalDataAccountCountByHeight

func (b *GatewayBlockchainService) GetAdditionalDataAccountCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (int64, error)

func (*GatewayBlockchainService) GetAdditionalTransactionCount

func (b *GatewayBlockchainService) GetAdditionalTransactionCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalTransactionCountByHash

func (b *GatewayBlockchainService) GetAdditionalTransactionCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalTransactionCountByHeight

func (b *GatewayBlockchainService) GetAdditionalTransactionCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (int64, error)

func (*GatewayBlockchainService) GetAdditionalTransactionsByHash

func (b *GatewayBlockchainService) GetAdditionalTransactionsByHash(ledgerHash, blockHash *framework.HashDigest, fromIndex, count int64) ([]*ledger_model.LedgerTransaction, error)

func (*GatewayBlockchainService) GetAdditionalTransactionsByHeight

func (b *GatewayBlockchainService) GetAdditionalTransactionsByHeight(ledgerHash *framework.HashDigest, height int64, fromIndex, count int64) ([]*ledger_model.LedgerTransaction, error)

func (*GatewayBlockchainService) GetAdditionalUserCount

func (b *GatewayBlockchainService) GetAdditionalUserCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalUserCountByHash

func (b *GatewayBlockchainService) GetAdditionalUserCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetAdditionalUserCountByHeight

func (b *GatewayBlockchainService) GetAdditionalUserCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (int64, error)

func (*GatewayBlockchainService) GetBlockByHash

func (b *GatewayBlockchainService) GetBlockByHash(ledgerHash, blockHash *framework.HashDigest) (*ledger_model.LedgerBlock, error)

func (*GatewayBlockchainService) GetBlockByHeight

func (b *GatewayBlockchainService) GetBlockByHeight(ledgerHash *framework.HashDigest, height int64) (*ledger_model.LedgerBlock, error)

func (*GatewayBlockchainService) GetConsensusParticipants

func (b *GatewayBlockchainService) GetConsensusParticipants(ledgerHash *framework.HashDigest) ([]*ledger_model.ParticipantNode, error)

func (*GatewayBlockchainService) GetContract

func (b *GatewayBlockchainService) GetContract(ledgerHash *framework.HashDigest, address string) (*ledger_model.ContractInfo, error)

func (*GatewayBlockchainService) GetContractAccounts

func (b *GatewayBlockchainService) GetContractAccounts(ledgerHash *framework.HashDigest, fromIndex, count int64) ([]*ledger_model.BlockchainIdentity, error)

func (*GatewayBlockchainService) GetContractCountByHash

func (b *GatewayBlockchainService) GetContractCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetContractCountByHeight

func (b *GatewayBlockchainService) GetContractCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (*GatewayBlockchainService) GetContractTotalCount

func (b *GatewayBlockchainService) GetContractTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetCryptoSetting

func (*GatewayBlockchainService) GetDataAccount

func (b *GatewayBlockchainService) GetDataAccount(ledgerHash *framework.HashDigest, address string) (*ledger_model.DataAccountInfo, error)

func (*GatewayBlockchainService) GetDataAccountCountByHash

func (b *GatewayBlockchainService) GetDataAccountCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetDataAccountCountByHeight

func (b *GatewayBlockchainService) GetDataAccountCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (*GatewayBlockchainService) GetDataAccountTotalCount

func (b *GatewayBlockchainService) GetDataAccountTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetDataAccounts

func (b *GatewayBlockchainService) GetDataAccounts(ledgerHash *framework.HashDigest, fromIndex, count int64) ([]*ledger_model.BlockchainIdentity, error)

func (*GatewayBlockchainService) GetDataEntries

func (b *GatewayBlockchainService) GetDataEntries(ledgerHash *framework.HashDigest, address string, kvInfoVO ledger_model.KVInfoVO) ([]ledger_model.TypedKVEntry, error)

func (*GatewayBlockchainService) GetDataEntriesTotalCount

func (b *GatewayBlockchainService) GetDataEntriesTotalCount(ledgerHash *framework.HashDigest, address string) (int64, error)

func (*GatewayBlockchainService) GetLatestBlock

func (b *GatewayBlockchainService) GetLatestBlock(ledgerHash *framework.HashDigest) (*ledger_model.LedgerBlock, error)

func (*GatewayBlockchainService) GetLatestDataEntries

func (b *GatewayBlockchainService) GetLatestDataEntries(ledgerHash *framework.HashDigest, address string, keys []string) ([]ledger_model.TypedKVEntry, error)

func (*GatewayBlockchainService) GetLatestDataEntriesByRange

func (b *GatewayBlockchainService) GetLatestDataEntriesByRange(ledgerHash *framework.HashDigest, address string, fromIndex, count int64) ([]ledger_model.TypedKVEntry, error)

func (*GatewayBlockchainService) GetLatestSystemEvent

func (b *GatewayBlockchainService) GetLatestSystemEvent(ledgerHash *framework.HashDigest, eventName string) (*ledger_model.Event, error)

func (*GatewayBlockchainService) GetLatestUserEvent

func (b *GatewayBlockchainService) GetLatestUserEvent(ledgerHash *framework.HashDigest, address string, eventName string) (*ledger_model.Event, error)

func (*GatewayBlockchainService) GetLedger

func (*GatewayBlockchainService) GetLedgerAdminInfo

func (b *GatewayBlockchainService) GetLedgerAdminInfo(ledgerHash *framework.HashDigest) (*ledger_model.LedgerAdminInfo, error)

func (*GatewayBlockchainService) GetLedgerCryptoSetting added in v1.3.3

func (b *GatewayBlockchainService) GetLedgerCryptoSetting(ledgerHash *framework.HashDigest) (ledger_model.CryptoSetting, error)

func (*GatewayBlockchainService) GetLedgerHashs

func (b *GatewayBlockchainService) GetLedgerHashs() ([]*framework.HashDigest, error)

func (*GatewayBlockchainService) GetLedgerMetadata

func (b *GatewayBlockchainService) GetLedgerMetadata(ledgerHash *framework.HashDigest) (*ledger_model.LedgerMetadata, error)

func (*GatewayBlockchainService) GetLedgersCount

func (b *GatewayBlockchainService) GetLedgersCount() (int64, error)

func (*GatewayBlockchainService) GetRolePrivileges

func (b *GatewayBlockchainService) GetRolePrivileges(ledgerHash *framework.HashDigest, roleName string) (*ledger_model.RolePrivileges, error)

func (*GatewayBlockchainService) GetSystemEventNameTotalCount

func (b *GatewayBlockchainService) GetSystemEventNameTotalCount(digest *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetSystemEventNames

func (b *GatewayBlockchainService) GetSystemEventNames(digest *framework.HashDigest, fromIndex, count int64) ([]string, error)

func (*GatewayBlockchainService) GetSystemEvents

func (b *GatewayBlockchainService) GetSystemEvents(ledgerHash *framework.HashDigest, eventName string, fromSequence int64, maxCount int64) ([]*ledger_model.Event, error)

func (*GatewayBlockchainService) GetSystemEventsTotalCount

func (b *GatewayBlockchainService) GetSystemEventsTotalCount(digest *framework.HashDigest, eventName string) (int64, error)

func (*GatewayBlockchainService) GetTransactionByContentHash

func (b *GatewayBlockchainService) GetTransactionByContentHash(ledgerHash, contentHash *framework.HashDigest) (*ledger_model.LedgerTransaction, error)

func (*GatewayBlockchainService) GetTransactionCountByHash

func (b *GatewayBlockchainService) GetTransactionCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetTransactionCountByHeight

func (b *GatewayBlockchainService) GetTransactionCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (*GatewayBlockchainService) GetTransactionStateByContentHash

func (b *GatewayBlockchainService) GetTransactionStateByContentHash(ledgerHash, contentHash *framework.HashDigest) (ledger_model.TransactionState, error)

func (*GatewayBlockchainService) GetTransactionTotalCount

func (b *GatewayBlockchainService) GetTransactionTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetTransactionsByHash

func (b *GatewayBlockchainService) GetTransactionsByHash(ledgerHash, blockHash *framework.HashDigest, fromIndex, count int64) ([]*ledger_model.LedgerTransaction, error)

func (*GatewayBlockchainService) GetTransactionsByHeight

func (b *GatewayBlockchainService) GetTransactionsByHeight(ledgerHash *framework.HashDigest, height int64, fromIndex, count int64) ([]*ledger_model.LedgerTransaction, error)

func (*GatewayBlockchainService) GetUser

func (b *GatewayBlockchainService) GetUser(ledgerHash *framework.HashDigest, address string) (*ledger_model.UserInfo, error)

func (*GatewayBlockchainService) GetUserCountByHash

func (b *GatewayBlockchainService) GetUserCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetUserCountByHeight

func (b *GatewayBlockchainService) GetUserCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (*GatewayBlockchainService) GetUserEventAccount

func (b *GatewayBlockchainService) GetUserEventAccount(digist *framework.HashDigest, address string) (*ledger_model.EventAccountInfo, error)

func (*GatewayBlockchainService) GetUserEventAccountTotalCount

func (b *GatewayBlockchainService) GetUserEventAccountTotalCount(digest *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetUserEventAccounts

func (b *GatewayBlockchainService) GetUserEventAccounts(ledgerHash *framework.HashDigest, fromIndex int64, maxCount int64) ([]*ledger_model.BlockchainIdentity, error)

func (*GatewayBlockchainService) GetUserEventNameTotalCount

func (b *GatewayBlockchainService) GetUserEventNameTotalCount(digest *framework.HashDigest, address string) (int64, error)

func (*GatewayBlockchainService) GetUserEventNames

func (b *GatewayBlockchainService) GetUserEventNames(ledgerHash *framework.HashDigest, address string, fromIndex, count int64) ([]string, error)

func (*GatewayBlockchainService) GetUserEvents

func (b *GatewayBlockchainService) GetUserEvents(ledgerHash *framework.HashDigest, address string, eventName string, fromSequence int64, maxCount int64) ([]*ledger_model.Event, error)

func (*GatewayBlockchainService) GetUserEventsTotalCount

func (b *GatewayBlockchainService) GetUserEventsTotalCount(digest *framework.HashDigest, address, eventName string) (int64, error)

func (*GatewayBlockchainService) GetUserPrivileges

func (b *GatewayBlockchainService) GetUserPrivileges(ledgerHash *framework.HashDigest, userAddress string) (*ledger_model.UserRolesPrivileges, error)

func (*GatewayBlockchainService) GetUserTotalCount

func (b *GatewayBlockchainService) GetUserTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (*GatewayBlockchainService) GetUsers

func (b *GatewayBlockchainService) GetUsers(ledgerHash *framework.HashDigest, fromIndex, count int64) ([]*ledger_model.BlockchainIdentity, error)

func (*GatewayBlockchainService) MonitorSystemEvent

func (b *GatewayBlockchainService) MonitorSystemEvent(ledgerHash *framework.HashDigest, eventPoint SystemEventPoint, listener SystemEventListener) SystemEventListenerHandle

func (*GatewayBlockchainService) MonitorUserEvent

func (b *GatewayBlockchainService) MonitorUserEvent(ledgerHash *framework.HashDigest, eventAccount, eventName string, startSequence int64, listener UserEventListener) UserEventListenerHandle

func (*GatewayBlockchainService) MonitorUserEvents

func (b *GatewayBlockchainService) MonitorUserEvents(ledgerHash *framework.HashDigest, startingEventPoints []UserEventPoint, listener UserEventListener) UserEventListenerHandle

func (*GatewayBlockchainService) NewTransaction

func (*GatewayBlockchainService) PrepareTransaction

type GatewayServiceFactory

type GatewayServiceFactory struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(gatewayHost string, gatewayPort int, userKey *ledger_model.BlockchainKeypair) (*GatewayServiceFactory, error)

func ConnectWithoutUserKey added in v1.3.1

func ConnectWithoutUserKey(gatewayHost string, gatewayPort int, security *SSLSecurity) (*GatewayServiceFactory, error)

func MustConnect added in v1.3.2

func MustConnect(gatewayHost string, gatewayPort int, userKey *ledger_model.BlockchainKeypair) *GatewayServiceFactory

func MustConnectWithoutUserKey added in v1.3.2

func MustConnectWithoutUserKey(gatewayHost string, gatewayPort int) *GatewayServiceFactory

func MustGMSecureConnect added in v1.3.3

func MustGMSecureConnect(gatewayHost string, gatewayPort int, userKey *ledger_model.BlockchainKeypair, security *GMSSLSecurity) *GatewayServiceFactory

func MustGMSecureConnectWithoutUserKey added in v1.3.3

func MustGMSecureConnectWithoutUserKey(gatewayHost string, gatewayPort int, security *GMSSLSecurity) *GatewayServiceFactory

func MustSecureConnect added in v1.3.3

func MustSecureConnect(gatewayHost string, gatewayPort int, userKey *ledger_model.BlockchainKeypair, security *SSLSecurity) *GatewayServiceFactory

func MustSecureConnectWithoutUserKey added in v1.3.3

func MustSecureConnectWithoutUserKey(gatewayHost string, gatewayPort int, security *SSLSecurity) *GatewayServiceFactory

func NewGatewayServiceFactory

func NewGatewayServiceFactory(blockchainService BlockchainService) *GatewayServiceFactory

func SecureConnect added in v1.3.3

func SecureConnect(gatewayHost string, gatewayPort int, userKey *ledger_model.BlockchainKeypair, security *SSLSecurity) (*GatewayServiceFactory, error)

func SecureConnectWithoutUserKey added in v1.3.3

func SecureConnectWithoutUserKey(gatewayHost string, gatewayPort int, security *SSLSecurity) (*GatewayServiceFactory, error)

func (GatewayServiceFactory) GetBlockchainService

func (g GatewayServiceFactory) GetBlockchainService() BlockchainService

type InactivateParticipantResponse

type InactivateParticipantResponse struct {
	Success bool `json:"success"`
}

type RestyConsensusService

type RestyConsensusService struct {
	// contains filtered or unexported fields
}

func NewGMSecureConsensusService added in v1.3.3

func NewGMSecureConsensusService(host string, port int, security *GMSSLSecurity) *RestyConsensusService

func NewRestyConsensusService

func NewRestyConsensusService(host string, port int) *RestyConsensusService

func NewSecureRestyConsensusService added in v1.3.3

func NewSecureRestyConsensusService(host string, port int, security *SSLSecurity) *RestyConsensusService

func (RestyConsensusService) ActivateParticipant

func (r RestyConsensusService) ActivateParticipant(params ledger_model.ActivateParticipantParams) (info bool, err error)

func (RestyConsensusService) InactivateParticipant

func (r RestyConsensusService) InactivateParticipant(params ledger_model.InactivateParticipantParams) (info bool, err error)

type RestyQueryService

type RestyQueryService struct {
	// contains filtered or unexported fields
}

func NewGMSecureRestyQueryService added in v1.3.3

func NewGMSecureRestyQueryService(host string, port int, security *GMSSLSecurity) *RestyQueryService

func NewRestyQueryService

func NewRestyQueryService(host string, port int) *RestyQueryService

func NewSecureRestyQueryService added in v1.3.3

func NewSecureRestyQueryService(host string, port int, security *SSLSecurity) *RestyQueryService

func (RestyQueryService) GetAdditionalContractCount

func (r RestyQueryService) GetAdditionalContractCount(ledgerHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalContractCountByHash

func (r RestyQueryService) GetAdditionalContractCountByHash(ledgerHash, blockHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalContractCountByHeight

func (r RestyQueryService) GetAdditionalContractCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (info int64, err error)

func (RestyQueryService) GetAdditionalDataAccountCount

func (r RestyQueryService) GetAdditionalDataAccountCount(ledgerHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalDataAccountCountByHash

func (r RestyQueryService) GetAdditionalDataAccountCountByHash(ledgerHash, blockHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalDataAccountCountByHeight

func (r RestyQueryService) GetAdditionalDataAccountCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (info int64, err error)

func (RestyQueryService) GetAdditionalTransactionCount

func (r RestyQueryService) GetAdditionalTransactionCount(ledgerHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalTransactionCountByHash

func (r RestyQueryService) GetAdditionalTransactionCountByHash(ledgerHash, blockHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalTransactionCountByHeight

func (r RestyQueryService) GetAdditionalTransactionCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (info int64, err error)

func (RestyQueryService) GetAdditionalTransactionsByHash

func (r RestyQueryService) GetAdditionalTransactionsByHash(ledgerHash, blockHash *framework.HashDigest, fromIndex, count int64) (info []*ledger_model.LedgerTransaction, err error)

func (RestyQueryService) GetAdditionalTransactionsByHeight

func (r RestyQueryService) GetAdditionalTransactionsByHeight(ledgerHash *framework.HashDigest, height int64, fromIndex, count int64) (info []*ledger_model.LedgerTransaction, err error)

func (RestyQueryService) GetAdditionalUserCount

func (r RestyQueryService) GetAdditionalUserCount(ledgerHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalUserCountByHash

func (r RestyQueryService) GetAdditionalUserCountByHash(ledgerHash, blockHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetAdditionalUserCountByHeight

func (r RestyQueryService) GetAdditionalUserCountByHeight(ledgerHash *framework.HashDigest, blockHeight int64) (info int64, err error)

func (RestyQueryService) GetBlockByHash

func (r RestyQueryService) GetBlockByHash(ledgerHash, blockHash *framework.HashDigest) (info *ledger_model.LedgerBlock, err error)

func (RestyQueryService) GetBlockByHeight

func (r RestyQueryService) GetBlockByHeight(ledgerHash *framework.HashDigest, height int64) (info *ledger_model.LedgerBlock, err error)

func (RestyQueryService) GetConsensusParticipants

func (r RestyQueryService) GetConsensusParticipants(ledgerHash *framework.HashDigest) (info []*ledger_model.ParticipantNode, err error)

func (RestyQueryService) GetContract

func (r RestyQueryService) GetContract(ledgerHash *framework.HashDigest, address string) (info *ledger_model.ContractInfo, err error)

func (RestyQueryService) GetContractAccounts

func (r RestyQueryService) GetContractAccounts(ledgerHash *framework.HashDigest, fromIndex, count int64) (info []*ledger_model.BlockchainIdentity, err error)

func (RestyQueryService) GetContractCountByHash

func (r RestyQueryService) GetContractCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetContractCountByHeight

func (r RestyQueryService) GetContractCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (RestyQueryService) GetContractTotalCount

func (r RestyQueryService) GetContractTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetDataAccount

func (r RestyQueryService) GetDataAccount(ledgerHash *framework.HashDigest, address string) (info *ledger_model.DataAccountInfo, err error)

func (RestyQueryService) GetDataAccountCountByHash

func (r RestyQueryService) GetDataAccountCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetDataAccountCountByHeight

func (r RestyQueryService) GetDataAccountCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (RestyQueryService) GetDataAccountTotalCount

func (r RestyQueryService) GetDataAccountTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetDataAccounts

func (r RestyQueryService) GetDataAccounts(ledgerHash *framework.HashDigest, fromIndex, count int64) (info []*ledger_model.BlockchainIdentity, err error)

func (RestyQueryService) GetDataEntries

func (r RestyQueryService) GetDataEntries(ledgerHash *framework.HashDigest, address string, kvInfoVO ledger_model.KVInfoVO) (info []ledger_model.TypedKVEntry, err error)

func (RestyQueryService) GetDataEntriesTotalCount

func (r RestyQueryService) GetDataEntriesTotalCount(ledgerHash *framework.HashDigest, address string) (int64, error)

func (RestyQueryService) GetLatestBlock

func (r RestyQueryService) GetLatestBlock(ledgerHash *framework.HashDigest) (info *ledger_model.LedgerBlock, err error)

func (RestyQueryService) GetLatestDataEntries

func (r RestyQueryService) GetLatestDataEntries(ledgerHash *framework.HashDigest, address string, keys []string) (info []ledger_model.TypedKVEntry, err error)

func (RestyQueryService) GetLatestDataEntriesByRange

func (r RestyQueryService) GetLatestDataEntriesByRange(ledgerHash *framework.HashDigest, address string, fromIndex, count int64) (info []ledger_model.TypedKVEntry, err error)

func (RestyQueryService) GetLatestSystemEvent

func (r RestyQueryService) GetLatestSystemEvent(ledgerHash *framework.HashDigest, eventName string) (info *ledger_model.Event, err error)

func (RestyQueryService) GetLatestUserEvent

func (r RestyQueryService) GetLatestUserEvent(ledgerHash *framework.HashDigest, address string, eventName string) (info *ledger_model.Event, err error)

func (RestyQueryService) GetLedger

func (r RestyQueryService) GetLedger(ledgerHash *framework.HashDigest) (info *ledger_model.LedgerInfo, err error)

func (RestyQueryService) GetLedgerAdminInfo

func (r RestyQueryService) GetLedgerAdminInfo(ledgerHash *framework.HashDigest) (info *ledger_model.LedgerAdminInfo, err error)

func (RestyQueryService) GetLedgerCryptoSetting added in v1.3.3

func (r RestyQueryService) GetLedgerCryptoSetting(ledgerHash *framework.HashDigest) (info ledger_model.CryptoSetting, err error)

func (RestyQueryService) GetLedgerHashs

func (r RestyQueryService) GetLedgerHashs() ([]*framework.HashDigest, error)

func (RestyQueryService) GetLedgerMetadata

func (r RestyQueryService) GetLedgerMetadata(ledgerHash *framework.HashDigest) (info *ledger_model.LedgerMetadata, err error)

func (RestyQueryService) GetLedgersCount

func (r RestyQueryService) GetLedgersCount() (info int64, err error)

func (RestyQueryService) GetRolePrivileges

func (r RestyQueryService) GetRolePrivileges(ledgerHash *framework.HashDigest, roleName string) (info *ledger_model.RolePrivileges, err error)

func (RestyQueryService) GetSystemEventNameTotalCount

func (r RestyQueryService) GetSystemEventNameTotalCount(ledgerHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetSystemEventNames

func (r RestyQueryService) GetSystemEventNames(ledgerHash *framework.HashDigest, fromIndex, count int64) (info []string, err error)

func (RestyQueryService) GetSystemEvents

func (r RestyQueryService) GetSystemEvents(ledgerHash *framework.HashDigest, eventName string, fromSequence int64, maxCount int64) (info []*ledger_model.Event, err error)

func (RestyQueryService) GetSystemEventsTotalCount

func (r RestyQueryService) GetSystemEventsTotalCount(ledgerHash *framework.HashDigest, eventName string) (info int64, err error)

func (RestyQueryService) GetTransactionByContentHash

func (r RestyQueryService) GetTransactionByContentHash(ledgerHash, contentHash *framework.HashDigest) (info *ledger_model.LedgerTransaction, err error)

func (RestyQueryService) GetTransactionCountByHash

func (r RestyQueryService) GetTransactionCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetTransactionCountByHeight

func (r RestyQueryService) GetTransactionCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (RestyQueryService) GetTransactionStateByContentHash

func (r RestyQueryService) GetTransactionStateByContentHash(ledgerHash, contentHash *framework.HashDigest) (info ledger_model.TransactionState, err error)

func (RestyQueryService) GetTransactionTotalCount

func (r RestyQueryService) GetTransactionTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetTransactionsByHash

func (r RestyQueryService) GetTransactionsByHash(ledgerHash, blockHash *framework.HashDigest, fromIndex, count int64) (info []*ledger_model.LedgerTransaction, err error)

func (RestyQueryService) GetTransactionsByHeight

func (r RestyQueryService) GetTransactionsByHeight(ledgerHash *framework.HashDigest, height int64, fromIndex, count int64) (info []*ledger_model.LedgerTransaction, err error)

func (RestyQueryService) GetUser

func (r RestyQueryService) GetUser(ledgerHash *framework.HashDigest, address string) (info *ledger_model.UserInfo, err error)

func (RestyQueryService) GetUserCountByHash

func (r RestyQueryService) GetUserCountByHash(ledgerHash, blockHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetUserCountByHeight

func (r RestyQueryService) GetUserCountByHeight(ledgerHash *framework.HashDigest, height int64) (int64, error)

func (RestyQueryService) GetUserEventAccount

func (r RestyQueryService) GetUserEventAccount(ledgerHash *framework.HashDigest, address string) (info *ledger_model.EventAccountInfo, err error)

func (RestyQueryService) GetUserEventAccountTotalCount

func (r RestyQueryService) GetUserEventAccountTotalCount(ledgerHash *framework.HashDigest) (info int64, err error)

func (RestyQueryService) GetUserEventAccounts

func (r RestyQueryService) GetUserEventAccounts(ledgerHash *framework.HashDigest, fromIndex int64, maxCount int64) (info []*ledger_model.BlockchainIdentity, err error)

func (RestyQueryService) GetUserEventNameTotalCount

func (r RestyQueryService) GetUserEventNameTotalCount(ledgerHash *framework.HashDigest, address string) (info int64, err error)

func (RestyQueryService) GetUserEventNames

func (r RestyQueryService) GetUserEventNames(ledgerHash *framework.HashDigest, address string, fromIndex, count int64) (info []string, err error)

func (RestyQueryService) GetUserEvents

func (r RestyQueryService) GetUserEvents(ledgerHash *framework.HashDigest, address string, eventName string, fromSequence int64, maxCount int64) (info []*ledger_model.Event, err error)

func (RestyQueryService) GetUserEventsTotalCount

func (r RestyQueryService) GetUserEventsTotalCount(ledgerHash *framework.HashDigest, address, eventName string) (info int64, err error)

func (RestyQueryService) GetUserPrivileges

func (r RestyQueryService) GetUserPrivileges(ledgerHash *framework.HashDigest, userAddress string) (info *ledger_model.UserRolesPrivileges, err error)

func (RestyQueryService) GetUserRoles

func (r RestyQueryService) GetUserRoles(ledgerHash *framework.HashDigest, userAddress string) (info *ledger_model.RoleSet, err error)

func (RestyQueryService) GetUserTotalCount

func (r RestyQueryService) GetUserTotalCount(ledgerHash *framework.HashDigest) (int64, error)

func (RestyQueryService) GetUsers

func (r RestyQueryService) GetUsers(ledgerHash *framework.HashDigest, fromIndex, count int64) (info []*ledger_model.BlockchainIdentity, err error)

type RestyTxService

type RestyTxService struct {
	// contains filtered or unexported fields
}

func NewGMSecureRestyTxService added in v1.3.3

func NewGMSecureRestyTxService(host string, port int, security *GMSSLSecurity) *RestyTxService

func NewRestyTxService

func NewRestyTxService(host string, port int) *RestyTxService

func NewSecureRestyTxService added in v1.3.3

func NewSecureRestyTxService(host string, port int, security *SSLSecurity) *RestyTxService

func (*RestyTxService) Process

func (r *RestyTxService) Process(txRequest *ledger_model.TransactionRequest) (response *ledger_model.TransactionResponse, err error)

type SSLSecurity added in v1.3.3

type SSLSecurity struct {
	RootCerts   *x509.CertPool
	ClientCerts []tls.Certificate
}

func NewSSLSecurity added in v1.3.3

func NewSSLSecurity(rootCertFile string, clientCertFile, clientKeyFile string) (*SSLSecurity, error)

type SystemEventContext

type SystemEventContext struct {
	LedgerHash   *framework.HashDigest
	EventHandler *SystemEventListenerHandle
}

func NewSystemEventContext

func NewSystemEventContext(ledgerHash *framework.HashDigest, eventHandler *SystemEventListenerHandle) SystemEventContext

type SystemEventListener

type SystemEventListener interface {
	OnEvents(events []ledger_model.Event, context SystemEventContext)
}

事件监听器

type SystemEventListenerHandle

type SystemEventListenerHandle struct {
	// contains filtered or unexported fields
}

事件监听处理器

func NewSystemEventListenerHandle

func NewSystemEventListenerHandle(queryService ledger_model.BlockchainQueryService, ledgerHash *framework.HashDigest, eventPoint SystemEventPoint, listener SystemEventListener) SystemEventListenerHandle

func (*SystemEventListenerHandle) Cancel

func (h *SystemEventListenerHandle) Cancel()

func (*SystemEventListenerHandle) EventPoint

type SystemEventPoint

type SystemEventPoint struct {
	EventName    string // 事件名
	Sequence     int64  // 序列
	MaxBatchSize int64  // 一次监听处理接受最大事件数量
}

func NewSystemEventPoint

func NewSystemEventPoint(eventName string, sequence int64) SystemEventPoint

func NewSystemEventPointWithCustomBatchSize

func NewSystemEventPointWithCustomBatchSize(eventName string, sequence int64, batchSize int64) SystemEventPoint

type UserEventContext

type UserEventContext struct {
	LedgerHash   *framework.HashDigest
	EventHandler *UserEventListenerHandle
}

func NewUserEventContext

func NewUserEventContext(ledgerHash *framework.HashDigest, eventHandler *UserEventListenerHandle) *UserEventContext

type UserEventListener

type UserEventListener interface {
	OnEvent(event *ledger_model.Event, context *UserEventContext)
}

事件监听器

type UserEventListenerHandle

type UserEventListenerHandle struct {
	// contains filtered or unexported fields
}

事件监听处理器

func NewUserEventListenerHandle

func NewUserEventListenerHandle(queryService ledger_model.BlockchainQueryService, ledgerHash *framework.HashDigest, eventPoints []UserEventPoint, listener UserEventListener) UserEventListenerHandle

func (*UserEventListenerHandle) Cancel

func (h *UserEventListenerHandle) Cancel()

func (*UserEventListenerHandle) EventPoints

func (h *UserEventListenerHandle) EventPoints() []UserEventPoint

type UserEventPoint

type UserEventPoint struct {
	EventAccount string // 事件账户地址
	EventName    string // 事件名
	Sequence     int64  // 序列
}

func NewUserEventPoint

func NewUserEventPoint(eventAccount, eventName string, sequence int64) UserEventPoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL