client

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0, ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ABClient

type ABClient interface {
	SendTransaction(ctx context.Context, tx *txsystem.Transaction) (*txsystem.TransactionResponse, error)
	GetBlock(ctx context.Context, blockNumber uint64) (*block.Block, error)
	GetBlocks(ctx context.Context, blockNumber, blockCount uint64) (*alphabill.GetBlocksResponse, error)
	GetMaxBlockNumber(ctx context.Context) (uint64, error)
	Shutdown() error
	IsShutdown() bool
}

ABClient manages connection to alphabill node and implements RPC methods

type AlphabillClient

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

func New

New creates instance of AlphabillClient

func (*AlphabillClient) GetBlock

func (c *AlphabillClient) GetBlock(ctx context.Context, blockNumber uint64) (*block.Block, error)

func (*AlphabillClient) GetBlocks added in v0.1.1

func (c *AlphabillClient) GetBlocks(ctx context.Context, blockNumber uint64, blockCount uint64) (res *alphabill.GetBlocksResponse, err error)

func (*AlphabillClient) GetMaxBlockNumber

func (c *AlphabillClient) GetMaxBlockNumber(ctx context.Context) (uint64, error)

func (*AlphabillClient) IsShutdown

func (c *AlphabillClient) IsShutdown() bool

func (*AlphabillClient) SendTransaction

func (*AlphabillClient) Shutdown

func (c *AlphabillClient) Shutdown() error

type AlphabillClientConfig

type AlphabillClientConfig struct {
	Uri          string
	WaitForReady bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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