Documentation
¶
Overview ¶
Package jsonrpc implements the core/rpc/client/user.TxSvcClient interface that is required by core/client.Client.
Index ¶
- type Client
- func (cl *Client) Broadcast(ctx context.Context, tx *transactions.Transaction, ...) ([]byte, error)
- func (cl *Client) Call(ctx context.Context, msg *transactions.CallMessage, ...) ([]map[string]any, []string, error)
- func (cl *Client) ChainInfo(ctx context.Context) (*types.ChainInfo, error)
- func (cl *Client) Challenge(ctx context.Context) ([]byte, error)
- func (cl *Client) ChangesetMetadata(ctx context.Context, height int64) (numChangesets int64, changesetsSizes []int64, err error)
- func (cl *Client) EstimateCost(ctx context.Context, tx *transactions.Transaction) (*big.Int, error)
- func (cl *Client) GenesisSnapshotChunk(ctx context.Context, height uint64, chunkIdx uint32) ([]byte, error)
- func (cl *Client) GenesisState(ctx context.Context) (*types.MigrationMetadata, error)
- func (cl *Client) GetAccount(ctx context.Context, pubKey []byte, status types.AccountStatus) (*types.Account, error)
- func (cl *Client) GetSchema(ctx context.Context, dbid string) (*types.Schema, error)
- func (cl *Client) Health(ctx context.Context) (*types.Health, error)
- func (cl *Client) ListDatabases(ctx context.Context, ownerPubKey []byte) ([]*types.DatasetIdentifier, error)
- func (cl *Client) ListMigrations(ctx context.Context) ([]*types.Migration, error)
- func (cl *Client) LoadChangeset(ctx context.Context, height int64, index int64) ([]byte, error)
- func (cl *Client) MigrationStatus(ctx context.Context) (*types.MigrationState, error)
- func (cl *Client) Ping(ctx context.Context) (string, error)
- func (cl *Client) Query(ctx context.Context, dbid, query string) ([]map[string]any, error)
- func (cl *Client) TxQuery(ctx context.Context, txHash []byte) (*transactions.TcTxQueryResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*rpcclient.JSONRPCClient
}
Client is a JSON-RPC client for the Kwil user service. It use the JSONRPCClient from the rpcclient package for the actual JSON-RPC communication, and implements the user.TxSvcClient interface.
func (*Client) Broadcast ¶
func (cl *Client) Broadcast(ctx context.Context, tx *transactions.Transaction, sync rpcclient.BroadcastWait) ([]byte, error)
func (*Client) Call ¶
func (cl *Client) Call(ctx context.Context, msg *transactions.CallMessage, opts ...rpcclient.ActionCallOption) ([]map[string]any, []string, error)
func (*Client) ChangesetMetadata ¶ added in v0.3.0
func (cl *Client) ChangesetMetadata(ctx context.Context, height int64) (numChangesets int64, changesetsSizes []int64, err error)
ChangesetMetadata gets metadata about the changesets at the given height.
func (*Client) EstimateCost ¶
func (cl *Client) EstimateCost(ctx context.Context, tx *transactions.Transaction) (*big.Int, error)
func (*Client) GenesisSnapshotChunk ¶ added in v0.3.0
func (cl *Client) GenesisSnapshotChunk(ctx context.Context, height uint64, chunkIdx uint32) ([]byte, error)
GenesisSnapshotChunk returns a chunk of the genesis snapshot at the given height and chunkIdx.
func (*Client) GenesisState ¶ added in v0.3.0
GenesisState returns the genesis state of the chain.
func (*Client) GetAccount ¶
func (*Client) ListDatabases ¶
func (*Client) ListMigrations ¶ added in v0.3.0
ListMigrations lists all migrations that have been proposed that are still in the pending state.
func (*Client) LoadChangeset ¶ added in v0.3.0
LoadChangesets loads changesets from the node's database at the given height.
func (*Client) MigrationStatus ¶ added in v0.3.0
func (*Client) TxQuery ¶
func (cl *Client) TxQuery(ctx context.Context, txHash []byte) (*transactions.TcTxQueryResponse, error)