Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusSuccess = "success" StatusFail = "fail" // NonceKey is the name of the key in the Metadata map inside a // ConstructionMetadataResponse that specifies the next valid nonce. NonceKey = "nonce" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IoTexClient ¶
type IoTexClient interface { // GetChainID returns the network chain context, derived from the // genesis document. GetChainID(ctx context.Context) (string, error) // GetBlock returns the IoTex block at given height. GetBlock(ctx context.Context, height int64) (*types.Block, error) // GetLatestBlock returns latest IoTex block. GetLatestBlock(ctx context.Context) (*types.Block, error) // GetGenesisBlock returns the IoTex genesis block. GetGenesisBlock(ctx context.Context) (*types.Block, error) // GetAccount returns the IoTex staking account for given owner address // at given height. GetAccount(ctx context.Context, height int64, owner string) (*types.AccountBalanceResponse, error) // SubmitTx submits the given encoded transaction to the node. SubmitTx(ctx context.Context, tx *iotextypes.Action) (txid string, err error) // GetStatus returns the status overview of the node. GetStatus(ctx context.Context) (*iotexapi.GetChainMetaResponse, error) // GetVersion returns the server's version. GetVersion(ctx context.Context) (*iotexapi.GetServerMetaResponse, error) // GetTransactions returns transactions of the block. GetTransactions(ctx context.Context, height int64) ([]*types.Transaction, error) // GetConfig returns the config. GetConfig() *config.Config }
IoTexClient is the IoTex blockchain client interface.
func NewIoTexClient ¶
func NewIoTexClient(cfg *config.Config) (cli IoTexClient, err error)
NewIoTexClient returns an implementation of IoTexClient
Click to show internal directories.
Click to hide internal directories.