client

package
v0.0.0-...-f87bed8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 11 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 {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(serverCfg Server, operators []Operator) Client

func (Client) CreateAccount

func (c Client) CreateAccount(initialBalance hedera.Hbar) (*hedera.AccountID, *hedera.PrivateKey, error)

func (Client) DeleteAccount

func (c Client) DeleteAccount(accountId hedera.AccountID, privateKey *hedera.PrivateKey) error

func (Client) FindTransaction

func (c Client) FindTransaction(ctx context.Context, hash string) (*types.Transaction, error)

func (Client) GetAccountBalance

func (c Client) GetAccountBalance(ctx context.Context, account *types.AccountIdentifier) (
	*types.AccountBalanceResponse,
	error,
)

func (Client) GetOperator

func (c Client) GetOperator(index int) Operator

func (Client) Submit

func (c Client) Submit(
	ctx context.Context,
	memo string,
	operations []*types.Operation,
	signers map[string]hedera.PrivateKey,
) (string, error)

Submit submits the operations to the network, goes through the construction preprocess, metadata, payloads, combine, and submit workflow. Note payloads signing happens between payloads and combine.

type Operator

type Operator struct {
	Id         hedera.AccountID
	PrivateKey hedera.PrivateKey
}

func (Operator) String

func (o Operator) String() string

type Server

type Server struct {
	DataRetry   retry
	HttpTimeout time.Duration
	Network     map[string]hedera.AccountID
	OfflineUrl  string
	OnlineUrl   string
	SubmitRetry retry
}

Jump to

Keyboard shortcuts

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