api

package
v0.43.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CkbApi

type CkbApi interface {
	C.Client
	mercury.Client
}

func NewCkbApi

func NewCkbApi(address string) (CkbApi, error)

type DefaultCkbApi

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

func (*DefaultCkbApi) AddNode

func (cli *DefaultCkbApi) AddNode(ctx context.Context, peerId, address string) error

func (*DefaultCkbApi) BatchLiveCells

func (cli *DefaultCkbApi) BatchLiveCells(ctx context.Context, batch []types.BatchLiveCellItem) error

func (*DefaultCkbApi) BatchTransactions

func (cli *DefaultCkbApi) BatchTransactions(ctx context.Context, batch []types.BatchTransactionItem) error

func (*DefaultCkbApi) BuildAssetAccountCreationTransaction

func (cli *DefaultCkbApi) BuildAssetAccountCreationTransaction(payload *model.CreateAssetAccountPayload) (*resp.TransferCompletionResponse, error)

func (*DefaultCkbApi) BuildAssetCollectionTransaction

func (cli *DefaultCkbApi) BuildAssetCollectionTransaction(payload *model.CollectAssetPayload) (*resp.TransferCompletionResponse, error)

func (*DefaultCkbApi) BuildTransferTransaction

func (cli *DefaultCkbApi) BuildTransferTransaction(payload *model.TransferPayload) (*resp.TransferCompletionResponse, error)

func (*DefaultCkbApi) CalculateDaoMaximumWithdraw

func (cli *DefaultCkbApi) CalculateDaoMaximumWithdraw(ctx context.Context, point *types.OutPoint, hash types.Hash) (uint64, error)

func (*DefaultCkbApi) CallContext

func (cli *DefaultCkbApi) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error

func (*DefaultCkbApi) ClearBannedAddresses

func (cli *DefaultCkbApi) ClearBannedAddresses(ctx context.Context) error

func (*DefaultCkbApi) ClearTxPool

func (cli *DefaultCkbApi) ClearTxPool(ctx context.Context) error

func (*DefaultCkbApi) Close

func (cli *DefaultCkbApi) Close()

func (*DefaultCkbApi) DryRunTransaction

func (cli *DefaultCkbApi) DryRunTransaction(ctx context.Context, transaction *types.Transaction) (*types.DryRunTransactionResult, error)

func (*DefaultCkbApi) EstimateFeeRate

func (cli *DefaultCkbApi) EstimateFeeRate(ctx context.Context, blocks uint64) (*types.EstimateFeeRateResult, error)

func (*DefaultCkbApi) GetBalance

func (cli *DefaultCkbApi) GetBalance(payload *model.GetBalancePayload) (*resp.GetBalanceResponse, error)

func (*DefaultCkbApi) GetBannedAddresses

func (cli *DefaultCkbApi) GetBannedAddresses(ctx context.Context) ([]*types.BannedAddress, error)

func (*DefaultCkbApi) GetBlock

func (cli *DefaultCkbApi) GetBlock(ctx context.Context, hash types.Hash) (*types.Block, error)

func (*DefaultCkbApi) GetBlockByNumber

func (cli *DefaultCkbApi) GetBlockByNumber(ctx context.Context, number uint64) (*types.Block, error)

func (*DefaultCkbApi) GetBlockEconomicState

func (cli *DefaultCkbApi) GetBlockEconomicState(ctx context.Context, hash types.Hash) (*types.BlockEconomicState, error)

func (*DefaultCkbApi) GetBlockHash

func (cli *DefaultCkbApi) GetBlockHash(ctx context.Context, number uint64) (*types.Hash, error)

func (*DefaultCkbApi) GetBlockMedianTime

func (cli *DefaultCkbApi) GetBlockMedianTime(ctx context.Context, blockHash types.Hash) (uint64, error)

func (*DefaultCkbApi) GetBlockchainInfo

func (cli *DefaultCkbApi) GetBlockchainInfo(ctx context.Context) (*types.BlockchainInfo, error)

func (*DefaultCkbApi) GetCells

func (cli *DefaultCkbApi) GetCells(ctx context.Context, searchKey *indexer.SearchKey, order indexer.SearchOrder, limit uint64, afterCursor string) (*indexer.LiveCells, error)

func (*DefaultCkbApi) GetCellsCapacity

func (cli *DefaultCkbApi) GetCellsCapacity(ctx context.Context, searchKey *indexer.SearchKey) (*indexer.Capacity, error)

func (*DefaultCkbApi) GetConsensus

func (cli *DefaultCkbApi) GetConsensus(ctx context.Context) (*types.Consensus, error)

func (*DefaultCkbApi) GetCurrentEpoch

func (cli *DefaultCkbApi) GetCurrentEpoch(ctx context.Context) (*types.Epoch, error)

func (*DefaultCkbApi) GetEpochByNumber

func (cli *DefaultCkbApi) GetEpochByNumber(ctx context.Context, number uint64) (*types.Epoch, error)

func (*DefaultCkbApi) GetForkBlock

func (cli *DefaultCkbApi) GetForkBlock(ctx context.Context, blockHash types.Hash) (*types.Block, error)

func (*DefaultCkbApi) GetGenericBlock

func (cli *DefaultCkbApi) GetGenericBlock(payload *model.GetGenericBlockPayload) (*resp.GenericBlockResponse, error)

func (*DefaultCkbApi) GetGenericTransaction

func (cli *DefaultCkbApi) GetGenericTransaction(txHash string) (*resp.GetGenericTransactionResponse, error)

func (*DefaultCkbApi) GetHeader

func (cli *DefaultCkbApi) GetHeader(ctx context.Context, hash types.Hash) (*types.Header, error)

func (*DefaultCkbApi) GetHeaderByNumber

func (cli *DefaultCkbApi) GetHeaderByNumber(ctx context.Context, number uint64) (*types.Header, error)

func (*DefaultCkbApi) GetLiveCell

func (cli *DefaultCkbApi) GetLiveCell(ctx context.Context, outPoint *types.OutPoint, withData bool) (*types.CellWithStatus, error)

func (*DefaultCkbApi) GetPeers

func (cli *DefaultCkbApi) GetPeers(ctx context.Context) ([]*types.Node, error)

func (*DefaultCkbApi) GetRawTxPool

func (cli *DefaultCkbApi) GetRawTxPool(ctx context.Context) (*types.RawTxPool, error)

func (*DefaultCkbApi) GetTip

func (cli *DefaultCkbApi) GetTip(ctx context.Context) (*indexer.TipHeader, error)

func (*DefaultCkbApi) GetTipBlockNumber

func (cli *DefaultCkbApi) GetTipBlockNumber(ctx context.Context) (uint64, error)

func (*DefaultCkbApi) GetTipHeader

func (cli *DefaultCkbApi) GetTipHeader(ctx context.Context) (*types.Header, error)

func (*DefaultCkbApi) GetTransaction

func (cli *DefaultCkbApi) GetTransaction(ctx context.Context, hash types.Hash) (*types.TransactionWithStatus, error)

func (*DefaultCkbApi) GetTransactionProof

func (cli *DefaultCkbApi) GetTransactionProof(ctx context.Context, txHashes []string, blockHash *types.Hash) (*types.TransactionProof, error)

func (*DefaultCkbApi) GetTransactions

func (cli *DefaultCkbApi) GetTransactions(ctx context.Context, searchKey *indexer.SearchKey, order indexer.SearchOrder, limit uint64, afterCursor string) (*indexer.Transactions, error)

func (*DefaultCkbApi) LocalNodeInfo

func (cli *DefaultCkbApi) LocalNodeInfo(ctx context.Context) (*types.Node, error)

func (*DefaultCkbApi) PingPeers

func (cli *DefaultCkbApi) PingPeers(ctx context.Context) error

func (*DefaultCkbApi) QueryGenericTransactions

func (*DefaultCkbApi) RegisterAddresses

func (cli *DefaultCkbApi) RegisterAddresses(normalAddresses []string) ([]string, error)

func (*DefaultCkbApi) RemoveNode

func (cli *DefaultCkbApi) RemoveNode(ctx context.Context, peerId string) error

func (*DefaultCkbApi) SendTransaction

func (cli *DefaultCkbApi) SendTransaction(ctx context.Context, tx *types.Transaction) (*types.Hash, error)

func (*DefaultCkbApi) SendTransactionNoneValidation

func (cli *DefaultCkbApi) SendTransactionNoneValidation(ctx context.Context, tx *types.Transaction) (*types.Hash, error)

func (*DefaultCkbApi) SetBan

func (cli *DefaultCkbApi) SetBan(ctx context.Context, address string, command string, banTime uint64, absolute bool, reason string) error

func (*DefaultCkbApi) SetNetworkActive

func (cli *DefaultCkbApi) SetNetworkActive(ctx context.Context, state bool) error

func (*DefaultCkbApi) SyncState

func (cli *DefaultCkbApi) SyncState(ctx context.Context) (*types.SyncState, error)

func (*DefaultCkbApi) TxPoolInfo

func (cli *DefaultCkbApi) TxPoolInfo(ctx context.Context) (*types.TxPoolInfo, error)

func (*DefaultCkbApi) VerifyTransactionProof

func (cli *DefaultCkbApi) VerifyTransactionProof(ctx context.Context, proof *types.TransactionProof) ([]*types.Hash, error)

Jump to

Keyboard shortcuts

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