client

package
v0.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 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 Client

type Client struct {
	jsonrpc2.Client
	// contains filtered or unexported fields
}

func New

func New(server string) (*Client, error)

New creates new API client with default config

func (*Client) Describe

func (c *Client) Describe(ctx context.Context) (*api.DescriptionResponse, error)

Describe queries the basic configuration of the node.

func (*Client) Execute

func (c *Client) Execute(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

Execute submits a transaction.

func (*Client) ExecuteAddCredits

func (c *Client) ExecuteAddCredits(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteAddCredits submits an AddCredits transaction.

func (*Client) ExecuteAddValidator added in v0.5.1

func (c *Client) ExecuteAddValidator(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteAddValidator submits an AddValidator transaction.

func (*Client) ExecuteBurnTokens

func (c *Client) ExecuteBurnTokens(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteBurnTokens submits a BurnTokens transaction.

func (*Client) ExecuteCreateAdi

func (c *Client) ExecuteCreateAdi(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteCreateAdi submits a CreateIdentity transaction.

func (*Client) ExecuteCreateDataAccount

func (c *Client) ExecuteCreateDataAccount(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteCreateDataAccount submits a CreateDataAccount transaction.

func (*Client) ExecuteCreateIdentity

func (c *Client) ExecuteCreateIdentity(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteCreateIdentity submits a CreateIdentity transaction.

func (*Client) ExecuteCreateKeyBook

func (c *Client) ExecuteCreateKeyBook(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteCreateKeyBook submits a CreateKeyBook transaction.

func (*Client) ExecuteCreateKeyPage

func (c *Client) ExecuteCreateKeyPage(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteCreateKeyPage submits a CreateKeyPage transaction.

func (*Client) ExecuteCreateToken

func (c *Client) ExecuteCreateToken(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteCreateToken submits a CreateToken transaction.

func (*Client) ExecuteCreateTokenAccount

func (c *Client) ExecuteCreateTokenAccount(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteCreateTokenAccount submits a CreateTokenAccount transaction.

func (*Client) ExecuteIssueTokens

func (c *Client) ExecuteIssueTokens(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteIssueTokens submits an IssueTokens transaction.

func (*Client) ExecuteRemoveValidator added in v0.5.1

func (c *Client) ExecuteRemoveValidator(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteRemoveValidator submits a RemoveValidator transaction.

func (*Client) ExecuteSendTokens

func (c *Client) ExecuteSendTokens(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteSendTokens submits a SendTokens transaction.

func (*Client) ExecuteUpdateAccountAuth added in v0.6.0

func (c *Client) ExecuteUpdateAccountAuth(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteUpdateAccountAuth submits an UpdateAccountAuth transaction.

func (*Client) ExecuteUpdateKey added in v0.6.0

func (c *Client) ExecuteUpdateKey(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteUpdateKey submits an UpdateKey transaction.

func (*Client) ExecuteUpdateKeyPage

func (c *Client) ExecuteUpdateKeyPage(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteUpdateKeyPage submits an UpdateKeyPage transaction.

func (*Client) ExecuteUpdateValidatorKey added in v0.5.1

func (c *Client) ExecuteUpdateValidatorKey(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteUpdateValidatorKey submits an UpdateValidatorKey transaction.

func (*Client) ExecuteWriteData

func (c *Client) ExecuteWriteData(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteWriteData submits a WriteData transaction.

func (*Client) ExecuteWriteDataTo

func (c *Client) ExecuteWriteDataTo(ctx context.Context, req *api.TxRequest) (*api.TxResponse, error)

ExecuteWriteDataTo submits a WriteDataTo transaction.

func (*Client) Faucet

func (c *Client) Faucet(ctx context.Context, req *protocol.AcmeFaucet) (*api.TxResponse, error)

Faucet requests tokens from the ACME faucet.

func (*Client) Metrics

func (c *Client) Metrics(ctx context.Context, req *api.MetricsQuery) (*api.ChainQueryResponse, error)

Metrics queries network metrics, such as transactions per second.

func (*Client) Query

func (c *Client) Query(ctx context.Context, req *api.GeneralQuery) (interface{}, error)

Query queries an account or account chain by URL.

func (*Client) QueryChain

func (c *Client) QueryChain(ctx context.Context, req *api.ChainIdQuery) (*api.ChainQueryResponse, error)

QueryChain queries an account by ID.

func (*Client) QueryData

func (c *Client) QueryData(ctx context.Context, req *api.DataEntryQuery) (*api.ChainQueryResponse, error)

QueryData queries an entry on an account's data chain.

func (*Client) QueryDataSet

func (c *Client) QueryDataSet(ctx context.Context, req *api.DataEntrySetQuery) (*api.MultiResponse, error)

QueryDataSet queries a range of entries on an account's data chain.

func (*Client) QueryDirectory

func (c *Client) QueryDirectory(ctx context.Context, req *api.DirectoryQuery) (*api.MultiResponse, error)

QueryDirectory queries the directory entries of an account.

func (*Client) QueryKeyPageIndex

func (c *Client) QueryKeyPageIndex(ctx context.Context, req *api.KeyPageIndexQuery) (*api.ChainQueryResponse, error)

QueryKeyPageIndex queries the location of a key within an account's key book(s).

func (*Client) QueryMinorBlocks added in v0.6.0

func (c *Client) QueryMinorBlocks(ctx context.Context, req *api.MinorBlocksQuery) (*api.MultiResponse, error)

QueryMinorBlocks queries an account's minor blocks.

WARNING: EXPERIMENTAL!

func (*Client) QueryTx

func (c *Client) QueryTx(ctx context.Context, req *api.TxnQuery) (*api.TransactionQueryResponse, error)

QueryTx queries a transaction by ID.

func (*Client) QueryTxHistory

func (c *Client) QueryTxHistory(ctx context.Context, req *api.TxHistoryQuery) (*api.MultiResponse, error)

QueryTxHistory queries an account's transaction history.

func (*Client) RequestAPIv2

func (c *Client) RequestAPIv2(ctx context.Context, method string, params, result interface{}) error

RequestAPIv2 makes a JSON RPC request to the Accumulate API v2.

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*api.StatusResponse, error)

Status queries the status of the node.

func (*Client) Version

func (c *Client) Version(ctx context.Context) (*api.ChainQueryResponse, error)

Version queries the software version of the node.

Jump to

Keyboard shortcuts

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