rpc

package
v2.6.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: GPL-3.0 Imports: 7 Imported by: 2

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)
}

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

func NewLedgerApi(cc *rpc.Client) 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 ...

func NewOnroadApi

func NewOnroadApi(cc *rpc.Client) OnroadApi

type RandomApi

type RandomApi interface {
	GetRewardByIndex(index uint64) (reward *api.RewardInfo, err error)
	GetVoteDetailsByIndex(index uint64) (details []*consensus.VoteDetails, err error)
}

OnroadApi ...

func NewRandomApi

func NewRandomApi(cc *rpc.Client) RandomApi

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 ...

func NewTxApi

func NewTxApi(cc *rpc.Client) TxApi

Jump to

Keyboard shortcuts

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