Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractApi ¶
type ContractApi interface { CallOffChainMethod(param api.CallOffChainMethodParam) ([]byte, error) // Deprecated: Use Query() instead Query(param api.QueryParam) ([]byte, error) // Executes a synchronous call immediately without sending a transaction to the blockchain GetCreateContractData(param api.CreateContractDataParam) ([]byte, error) GetContractStorage(addr types.Address, prefix string) (map[string]string, error) GetContractInfo(addr types.Address) (*api.ContractInfo, error) GetSBPVoteList() ([]*api.SBPVoteInfo, error) }
ContractApi ...
func NewContractApi ¶
func NewContractApi(cc *rpc.Client) ContractApi
type DexTradeApi ¶
type DexTradeApi interface {
GetOrdersFromMarket(tradeToken, quoteToken types.TokenTypeId, side bool, begin, end int) (ordersRes *dex.OrdersRes, err error)
}
ContractApi ...
func NewDexTradeApi ¶
func NewDexTradeApi(cc *rpc.Client) DexTradeApi
type LedgerApi ¶
type LedgerApi interface { GetRawBlockByHash(blockHash types.Hash) (*ledger.AccountBlock, error) GetBlockByHash(blockHash types.Hash) (*api.AccountBlock, error) GetCompleteBlockByHash(blockHash types.Hash) (*api.AccountBlock, error) GetBlocksByHash(addr types.Address, originBlockHash *types.Hash, count uint64) ([]*api.AccountBlock, error) GetVmLogListByHash(logHash types.Hash) (ledger.VmLogList, error) GetBlocksByHeight(addr types.Address, height interface{}, count uint64) ([]*api.AccountBlock, error) GetBlockByHeight(addr types.Address, height interface{}) (*api.AccountBlock, error) GetBlocksByAccAddr(addr types.Address, index int, count int) ([]*api.AccountBlock, error) GetAccountByAccAddr(addr types.Address) (*api.RpcAccountInfo, error) GetSnapshotBlockByHash(hash types.Hash) (*api.SnapshotBlock, error) GetSnapshotBlockByHeight(height interface{}) (*api.SnapshotBlock, error) GetSnapshotBlocks(height interface{}, count int) ([]*api.SnapshotBlock, error) GetChunks(startHeight interface{}, endHeight interface{}) ([]*api.SnapshotChunk, error) GetSnapshotChainHeight() string GetLatestSnapshotChainHash() *types.Hash GetLatestBlock(addr types.Address) (*api.AccountBlock, error) GetVmLogList(blockHash types.Hash) (ledger.VmLogList, error) GetUnconfirmedBlocks(addr types.Address) []*ledger.AccountBlock GetConfirmedBalances(snapshotHash types.Hash, addrList []types.Address, tokenIds []types.TokenTypeId) (api.GetBalancesRes, error) GetHourSBPStats(startIdx uint64, endIdx uint64) ([]map[string]interface{}, error) }
LedgerApi ...
func NewLedgerApi ¶
type OnroadApi ¶
type OnroadApi interface { GetOnroadBlocksByAddress(address types.Address, index, count uint64) ([]*api.AccountBlock, error) GetOnroadInfoByAddress(address types.Address) (*api.RpcAccountInfo, error) GetOnroadBlocksInBatch(queryList []api.OnroadPagingQuery) (map[types.Address][]*api.AccountBlock, error) GetOnroadInfoInBatch(addrList []types.Address) ([]*api.RpcAccountInfo, error) GetContractOnRoadFrontBlocks(addr types.Address, gid *types.Gid) ([]*api.AccountBlock, error) }
OnroadApi ...
func NewOnroadApi ¶
type RandomApi ¶
type RandomApi interface { GetRewardByIndex(index uint64) (reward *api.RewardInfo, err error) GetVoteDetailsByIndex(index uint64) (details []*consensus.VoteDetails, err error) RawCall(method string, params ...interface{}) (interface{}, error) }
OnroadApi ...
func NewRandomApi ¶
type TxApi ¶
type TxApi interface { SendRawTx(block *api.AccountBlock) error SendTxWithPrivateKey(param api.SendTxWithPrivateKeyParam) (*api.AccountBlock, error) CalcPoWDifficulty(param api.CalcPoWDifficultyParam) (result *api.CalcPoWDifficultyResult, err error) }
TxApi ...
Click to show internal directories.
Click to hide internal directories.