user

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

package user defines the interface for a user client transport. the user client is the main service for end users to interact with a Kwil network.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxSvcClient

type TxSvcClient interface {
	Broadcast(ctx context.Context, tx *transactions.Transaction, sync client.BroadcastWait) ([]byte, error)
	Call(ctx context.Context, msg *transactions.CallMessage, opts ...client.ActionCallOption) ([]map[string]any, []string, error)
	ChainInfo(ctx context.Context) (*types.ChainInfo, error)
	EstimateCost(ctx context.Context, tx *transactions.Transaction) (*big.Int, error)
	GetAccount(ctx context.Context, pubKey []byte, status types.AccountStatus) (*types.Account, error)
	GetSchema(ctx context.Context, dbid string) (*types.Schema, error)
	ListDatabases(ctx context.Context, ownerPubKey []byte) ([]*types.DatasetIdentifier, error)
	Ping(ctx context.Context) (string, error)
	Query(ctx context.Context, dbid string, query string) ([]map[string]any, error)
	TxQuery(ctx context.Context, txHash []byte) (*transactions.TcTxQueryResponse, error)

	// Migration methods
	ListMigrations(ctx context.Context) ([]*types.Migration, error)

	// Active Migration State
	GenesisState(ctx context.Context) (*types.MigrationMetadata, error)
	GenesisSnapshotChunk(ctx context.Context, height uint64, chunkIdx uint32) ([]byte, error)

	// Changesets
	LoadChangeset(ctx context.Context, height int64, index int64) ([]byte, error)
	ChangesetMetadata(ctx context.Context, height int64) (int64, []int64, error)

	// Challenge
	Challenge(ctx context.Context) ([]byte, error)
}

TxSvcClient is the interface for a txsvc client. The txsvc is the main service for end users to interact with a Kwil network.

Directories

Path Synopsis
Package jsonrpc implements the core/rpc/client/user.TxSvcClient interface that is required by core/client.Client.
Package jsonrpc implements the core/rpc/client/user.TxSvcClient interface that is required by core/client.Client.

Jump to

Keyboard shortcuts

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