client

package
v0.0.0-...-e9b46eb Latest Latest
Warning

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

Go to latest
Published: Jan 15, 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 hiero.Hbar) (*hiero.AccountID, *hiero.PrivateKey, error)

func (Client) DeleteAccount

func (c Client) DeleteAccount(accountId hiero.AccountID, privateKey *hiero.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]hiero.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         hiero.AccountID
	PrivateKey hiero.PrivateKey
}

func (Operator) String

func (o Operator) String() string

type Server

type Server struct {
	DataRetry   retry
	HttpTimeout time.Duration
	Network     map[string]hiero.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