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)
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 ...
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 ...
type RandomApi ¶
type RandomApi interface {
GetRewardByIndex(index uint64) (reward *api.RewardInfo, err error)
GetVoteDetailsByIndex(index uint64) (details []*consensus.VoteDetails, err error)
}
OnroadApi ...
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 ...
Source Files
¶
- contract.go
- dex_trade.go
- ledger.go
- onroad.go
- random.go
- tx.go
Click to show internal directories.
Click to hide internal directories.