hedera

package module
v2.34.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 62 Imported by: 217

README

Actions Status

Hedera™ Hashgraph Go SDK

The Go SDK for interacting with Hedera Hashgraph: the official distributed consensus platform built using the hashgraph consensus algorithm for fast, fair and secure transactions. Hedera enables and empowers developers to build an entirely new class of decentralized applications.

Hedera Hashgraph communicates using gRPC; the Protobufs definitions for the protocol are available in the hashgraph/hedera-protobuf repository.

Install

$ go get github.com/hashgraph/hedera-sdk-go/v2
Note

google.golang.org/protobuf v1.27.1 Breaks the SDK as it contains multiple protobuf files with the same name. Make sure to use v1.26.1 instead. The follow snippet can be used in go.mod to force the project to use v1.26.1

replace (
	google.golang.org/protobuf v1.27.1 => google.golang.org/protobuf v1.26.1-0.20210525005349-febffdd88e85
)

Running Integration Tests

$ env CONFIG_FILE="<your_config_file>" go test -v Integration -timeout 9999s ```

or

```bash
$ env CONFIG_FILE="<your_config_file>" OPERATOR_KEY="<key>" OPERATOR_ID="<id>" go test -v Integration -timeout 9999s

or

$ env OPERATOR_KEY="<key>" OPERATOR_ID="<id>" go test -v Integration -timeout 9999s

The config file can contain both the network and the operator, but you can also use environment variables OPERATOR_KEY and OPERATOR_ID. If both are provided the network is used from the config file, but for the operator the environment variables take precedence. If the config file is not provided then the network will default to testnet and OPERATOR_KEY and OPERATOR_ID must be provided.

Example Config File

Support

If you have a question on how to use the product, please see our support guide.

Contributing

Contributions are welcome. Please see the contributing guide to see how you can get involved.

Code of Conduct

This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to oss@hedera.com.

License

Apache License 2.0

Documentation

Index

Constants

View Source
const Aes128Ctr = "aes-128-ctr"
View Source
const HmacSha256 = "hmac-sha256"

Variables

View Source
var HbarUnits = struct {
	Tinybar  HbarUnit
	Microbar HbarUnit
	Millibar HbarUnit
	Hbar     HbarUnit
	Kilobar  HbarUnit
	Megabar  HbarUnit
	Gigabar  HbarUnit
}{
	Tinybar:  HbarUnit("tinybar"),
	Microbar: HbarUnit("microbar"),
	Millibar: HbarUnit("millibar"),
	Hbar:     HbarUnit("hbar"),
	Kilobar:  HbarUnit("kilobar"),
	Megabar:  HbarUnit("megabar"),
	Gigabar:  HbarUnit("gigabar"),
}

HbarUnits is a set of HbarUnit

View Source
var MaxHbar = Hbar{math.MaxInt64}

MaxHbar is the maximum amount the Hbar type can wrap.

View Source
var MinHbar = Hbar{math.MinInt64}

MinHbar is the minimum amount the Hbar type can wrap.

View Source
var ZeroHbar = Hbar{0}

ZeroHbar wraps a 0 value of Hbar.

Functions

func AccountInfoFlowVerifySignature added in v2.12.0

func AccountInfoFlowVerifySignature(client *Client, accountID AccountID, message []byte, signature []byte) (bool, error)

AccountInfoFlowVerifySignature Verifies signature using AccountInfoQuery

func AccountInfoFlowVerifyTransaction added in v2.12.0

func AccountInfoFlowVerifyTransaction(client *Client, accountID AccountID, tx Transaction, _ []byte) (bool, error)

AccountInfoFlowVerifyTransaction Verifies transaction using AccountInfoQuery

func IsHardenedIndex added in v2.23.0

func IsHardenedIndex(index uint32) bool

Check if the index is hardened

func ToHardenedIndex added in v2.23.0

func ToHardenedIndex(index uint32) uint32

Harden the index

func TransactionAddSignature added in v2.2.0

func TransactionAddSignature(transaction interface{}, publicKey PublicKey, signature []byte) (interface{}, error)

func TransactionFromBytes

func TransactionFromBytes(data []byte) (interface{}, error)

TransactionFromBytes converts transaction bytes to a related *transaction.

func TransactionGetMaxBackoff added in v2.2.0

func TransactionGetMaxBackoff(transaction interface{}) (time.Duration, error)

func TransactionGetMinBackoff added in v2.2.0

func TransactionGetMinBackoff(transaction interface{}) (time.Duration, error)

func TransactionGetSignatures added in v2.2.0

func TransactionGetSignatures(transaction interface{}) (map[AccountID]map[*PublicKey][]byte, error)

func TransactionGetTransactionHash added in v2.2.0

func TransactionGetTransactionHash(transaction interface{}) ([]byte, error)

func TransactionGetTransactionHashPerNode added in v2.2.0

func TransactionGetTransactionHashPerNode(transaction interface{}) (map[AccountID][]byte, error)

func TransactionGetTransactionMemo added in v2.2.0

func TransactionGetTransactionMemo(transaction interface{}) (string, error)

func TransactionGetTransactionValidDuration added in v2.2.0

func TransactionGetTransactionValidDuration(transaction interface{}) (time.Duration, error)

func TransactionSetMaxBackoff added in v2.2.0

func TransactionSetMaxBackoff(transaction interface{}, maxBackoff time.Duration) (interface{}, error)

func TransactionSetMaxTransactionFee added in v2.2.0

func TransactionSetMaxTransactionFee(transaction interface{}, maxTransactionFee Hbar) (interface{}, error)

func TransactionSetMinBackoff added in v2.2.0

func TransactionSetMinBackoff(transaction interface{}, minBackoff time.Duration) (interface{}, error)

func TransactionSetNodeAccountIDs added in v2.2.0

func TransactionSetNodeAccountIDs(transaction interface{}, nodeAccountIDs []AccountID) (interface{}, error)

func TransactionSetTransactionID added in v2.2.0

func TransactionSetTransactionID(transaction interface{}, transactionID TransactionID) (interface{}, error)

func TransactionSetTransactionMemo added in v2.2.0

func TransactionSetTransactionMemo(transaction interface{}, transactionMemo string) (interface{}, error)

func TransactionSetTransactionValidDuration added in v2.2.0

func TransactionSetTransactionValidDuration(transaction interface{}, transactionValidDuration time.Duration) (interface{}, error)

func TransactionSign added in v2.2.0

func TransactionSign(transaction interface{}, privateKey PrivateKey) (interface{}, error)

func TransactionSignWithOperator added in v2.2.0

func TransactionSignWithOperator(transaction interface{}, client *Client) (interface{}, error)

func TransactionSignWth added in v2.2.0

func TransactionSignWth(transaction interface{}, publicKKey PublicKey, signer TransactionSigner) (interface{}, error)

func TransactionString added in v2.2.0

func TransactionString(transaction interface{}) (string, error)

func TransactionToBytes added in v2.2.0

func TransactionToBytes(transaction interface{}) ([]byte, error)

Types

type AccountAllowanceAdjustTransaction added in v2.9.0

type AccountAllowanceAdjustTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

Deprecated

func NewAccountAllowanceAdjustTransaction added in v2.9.0

func NewAccountAllowanceAdjustTransaction() *AccountAllowanceAdjustTransaction

func (*AccountAllowanceAdjustTransaction) AddAllTokenNftAllowance added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) AddAllTokenNftAllowance(tokenID TokenID, spenderAccount AccountID) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) AddHbarAllowance added in v2.9.0

Deprecated

func (*AccountAllowanceAdjustTransaction) AddSignature added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) AddSignature(publicKey PublicKey, signature []byte) *AccountAllowanceAdjustTransaction

func (*AccountAllowanceAdjustTransaction) AddTokenAllowance added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) AddTokenAllowance(tokenID TokenID, accountID AccountID, amount int64) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) AddTokenNftAllowance added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) AddTokenNftAllowance(nftID NftID, accountID AccountID) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) Freeze added in v2.9.0

func (*AccountAllowanceAdjustTransaction) FreezeWith added in v2.9.0

func (*AccountAllowanceAdjustTransaction) GetGrpcDeadline added in v2.34.0

func (e *AccountAllowanceAdjustTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountAllowanceAdjustTransaction) GetHbarAllowances added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) GetHbarAllowances() []*HbarAllowance

Deprecated

func (*AccountAllowanceAdjustTransaction) GetLogLevel added in v2.34.0

func (e *AccountAllowanceAdjustTransaction) GetLogLevel() *LogLevel

func (*AccountAllowanceAdjustTransaction) GetMaxBackoff added in v2.9.0

func (e *AccountAllowanceAdjustTransaction) GetMaxBackoff() time.Duration

func (*AccountAllowanceAdjustTransaction) GetMaxRetry added in v2.34.0

func (e *AccountAllowanceAdjustTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountAllowanceAdjustTransaction) GetMinBackoff added in v2.9.0

func (e *AccountAllowanceAdjustTransaction) GetMinBackoff() time.Duration

func (*AccountAllowanceAdjustTransaction) GetNodeAccountIDs added in v2.34.0

func (e *AccountAllowanceAdjustTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountAllowanceAdjustTransaction) GetTokenAllowances added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) GetTokenAllowances() []*TokenAllowance

Deprecated

func (*AccountAllowanceAdjustTransaction) GetTokenNftAllowances added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) GetTokenNftAllowances() []*TokenNftAllowance

Deprecated

func (*AccountAllowanceAdjustTransaction) GrantHbarAllowance added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) GrantHbarAllowance(ownerAccountID AccountID, id AccountID, amount Hbar) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) GrantTokenAllowance added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) GrantTokenAllowance(tokenID TokenID, ownerAccountID AccountID, accountID AccountID, amount int64) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) GrantTokenNftAllowance added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) GrantTokenNftAllowance(nftID NftID, ownerAccountID AccountID, accountID AccountID) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) GrantTokenNftAllowanceAllSerials added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) GrantTokenNftAllowanceAllSerials(ownerAccountID AccountID, tokenID TokenID, spenderAccount AccountID) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) RevokeHbarAllowance added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) RevokeHbarAllowance(ownerAccountID AccountID, id AccountID, amount Hbar) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) RevokeTokenAllowance added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) RevokeTokenAllowance(tokenID TokenID, ownerAccountID AccountID, accountID AccountID, amount uint64) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) RevokeTokenNftAllowance added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) RevokeTokenNftAllowance(nftID NftID, ownerAccountID AccountID, accountID AccountID) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) RevokeTokenNftAllowanceAllSerials added in v2.11.0

func (tx *AccountAllowanceAdjustTransaction) RevokeTokenNftAllowanceAllSerials(ownerAccountID AccountID, tokenID TokenID, spenderAccount AccountID) *AccountAllowanceAdjustTransaction

Deprecated

func (*AccountAllowanceAdjustTransaction) SetGrpcDeadline added in v2.34.0

func (e *AccountAllowanceAdjustTransaction) SetGrpcDeadline(deadline *time.Duration) *executable

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountAllowanceAdjustTransaction) SetLogLevel added in v2.34.0

func (e *AccountAllowanceAdjustTransaction) SetLogLevel(level LogLevel) *executable

func (*AccountAllowanceAdjustTransaction) SetMaxBackoff added in v2.9.0

func (*AccountAllowanceAdjustTransaction) SetMaxRetry added in v2.9.0

func (*AccountAllowanceAdjustTransaction) SetMaxTransactionFee added in v2.9.0

SetMaxTransactionFee sets the max transaction fee for this AccountAllowanceAdjustTransaction.

func (*AccountAllowanceAdjustTransaction) SetMinBackoff added in v2.9.0

func (*AccountAllowanceAdjustTransaction) SetNodeAccountIDs added in v2.9.0

SetNodeAccountIDs sets the _Node AccountID for this AccountAllowanceAdjustTransaction.

func (*AccountAllowanceAdjustTransaction) SetRegenerateTransactionID added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *AccountAllowanceAdjustTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*AccountAllowanceAdjustTransaction) SetTransactionID added in v2.9.0

SetTransactionID sets the TransactionID for this AccountAllowanceAdjustTransaction.

func (*AccountAllowanceAdjustTransaction) SetTransactionMemo added in v2.9.0

SetTransactionMemo sets the memo for this AccountAllowanceAdjustTransaction.

func (*AccountAllowanceAdjustTransaction) SetTransactionValidDuration added in v2.9.0

func (tx *AccountAllowanceAdjustTransaction) SetTransactionValidDuration(duration time.Duration) *AccountAllowanceAdjustTransaction

SetTransactionValidDuration sets the valid duration for this AccountAllowanceAdjustTransaction.

func (*AccountAllowanceAdjustTransaction) Sign added in v2.9.0

func (*AccountAllowanceAdjustTransaction) SignWith added in v2.9.0

func (*AccountAllowanceAdjustTransaction) SignWithOperator added in v2.9.0

type AccountAllowanceApproveTransaction added in v2.9.0

type AccountAllowanceApproveTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

AccountAllowanceApproveTransaction Creates one or more hbar/token approved allowances <b>relative to the owner account specified in the allowances of tx transaction</b>. Each allowance grants a spender the right to transfer a pre-determined amount of the owner's hbar/token to any other account of the spender's choice. If the owner is not specified in any allowance, the payer of transaction is considered to be the owner for that particular allowance. Setting the amount to zero in CryptoAllowance or TokenAllowance will remove the respective allowance for the spender.

(So if account <tt>0.0.X</tt> pays for this transaction and owner is not specified in the allowance, then at consensus each spender account will have new allowances to spend hbar or tokens from <tt>0.0.X</tt>).

func NewAccountAllowanceApproveTransaction added in v2.9.0

func NewAccountAllowanceApproveTransaction() *AccountAllowanceApproveTransaction

NewAccountAllowanceApproveTransaction Creates an AccountAloowanceApproveTransaction which creates one or more hbar/token approved allowances relative to the owner account specified in the allowances of tx transaction. Each allowance grants a spender the right to transfer a pre-determined amount of the owner's hbar/token to any other account of the spender's choice. If the owner is not specified in any allowance, the payer of transaction is considered to be the owner for that particular allowance. Setting the amount to zero in CryptoAllowance or TokenAllowance will remove the respective allowance for the spender.

(So if account 0.0.X pays for this transaction and owner is not specified in the allowance, then at consensus each spender account will have new allowances to spend hbar or tokens from 0.0.X).

func (*AccountAllowanceApproveTransaction) AddAllTokenNftApproval added in v2.9.0

func (tx *AccountAllowanceApproveTransaction) AddAllTokenNftApproval(tokenID TokenID, spenderAccount AccountID) *AccountAllowanceApproveTransaction

AddAllTokenNftApproval Approve allowance of non-fungible token transfers for a spender. Spender has access to all of the owner's NFT units of type tokenId (currently owned and any in the future).

func (*AccountAllowanceApproveTransaction) AddHbarApproval added in v2.9.0

AddHbarApproval Deprecated - Use ApproveHbarAllowance instead

func (*AccountAllowanceApproveTransaction) AddSignature added in v2.9.0

func (tx *AccountAllowanceApproveTransaction) AddSignature(publicKey PublicKey, signature []byte) *AccountAllowanceApproveTransaction

AddSignature adds a signature to the transaction.

func (*AccountAllowanceApproveTransaction) AddTokenApproval added in v2.9.0

func (tx *AccountAllowanceApproveTransaction) AddTokenApproval(tokenID TokenID, accountID AccountID, amount int64) *AccountAllowanceApproveTransaction

Deprecated - Use ApproveTokenAllowance instead

func (*AccountAllowanceApproveTransaction) AddTokenNftApproval added in v2.9.0

func (tx *AccountAllowanceApproveTransaction) AddTokenNftApproval(nftID NftID, accountID AccountID) *AccountAllowanceApproveTransaction

AddTokenNftApproval Deprecated - Use ApproveTokenNftAllowance instead

func (*AccountAllowanceApproveTransaction) ApproveHbarAllowance added in v2.13.0

func (tx *AccountAllowanceApproveTransaction) ApproveHbarAllowance(ownerAccountID AccountID, id AccountID, amount Hbar) *AccountAllowanceApproveTransaction

ApproveHbarAllowance Approves allowance of hbar transfers for a spender.

func (*AccountAllowanceApproveTransaction) ApproveHbarApproval added in v2.11.0

func (tx *AccountAllowanceApproveTransaction) ApproveHbarApproval(ownerAccountID AccountID, id AccountID, amount Hbar) *AccountAllowanceApproveTransaction

ApproveHbarApproval Deprecated - Use ApproveHbarAllowance instead

func (*AccountAllowanceApproveTransaction) ApproveTokenAllowance added in v2.13.0

func (tx *AccountAllowanceApproveTransaction) ApproveTokenAllowance(tokenID TokenID, ownerAccountID AccountID, accountID AccountID, amount int64) *AccountAllowanceApproveTransaction

ApproveTokenAllowance Approve allowance of fungible token transfers for a spender.

func (*AccountAllowanceApproveTransaction) ApproveTokenApproval added in v2.11.0

func (tx *AccountAllowanceApproveTransaction) ApproveTokenApproval(tokenID TokenID, ownerAccountID AccountID, accountID AccountID, amount int64) *AccountAllowanceApproveTransaction

ApproveTokenApproval Deprecated - Use ApproveTokenAllowance instead

func (*AccountAllowanceApproveTransaction) ApproveTokenNftAllowance added in v2.13.0

func (tx *AccountAllowanceApproveTransaction) ApproveTokenNftAllowance(nftID NftID, ownerAccountID AccountID, accountID AccountID) *AccountAllowanceApproveTransaction

ApproveTokenNftAllowance Approve allowance of non-fungible token transfers for a spender.

func (*AccountAllowanceApproveTransaction) ApproveTokenNftAllowanceAllSerials added in v2.11.0

func (tx *AccountAllowanceApproveTransaction) ApproveTokenNftAllowanceAllSerials(tokenID TokenID, ownerAccountID AccountID, spenderAccount AccountID) *AccountAllowanceApproveTransaction

ApproveTokenNftAllowanceAllSerials Approve allowance of non-fungible token transfers for a spender. Spender has access to all of the owner's NFT units of type tokenId (currently owned and any in the future).

func (*AccountAllowanceApproveTransaction) ApproveTokenNftAllowanceWithDelegatingSpender added in v2.23.0

func (tx *AccountAllowanceApproveTransaction) ApproveTokenNftAllowanceWithDelegatingSpender(nftID NftID, ownerAccountID AccountID, spenderAccountId AccountID, delegatingSpenderAccountID AccountID) *AccountAllowanceApproveTransaction

func (*AccountAllowanceApproveTransaction) ApproveTokenNftApproval added in v2.11.0

func (tx *AccountAllowanceApproveTransaction) ApproveTokenNftApproval(nftID NftID, ownerAccountID AccountID, accountID AccountID) *AccountAllowanceApproveTransaction

ApproveTokenNftApproval Deprecated - Use ApproveTokenNftAllowance instead

func (*AccountAllowanceApproveTransaction) Execute added in v2.9.0

func (*AccountAllowanceApproveTransaction) Freeze added in v2.9.0

func (*AccountAllowanceApproveTransaction) FreezeWith added in v2.9.0

func (*AccountAllowanceApproveTransaction) GetGrpcDeadline added in v2.34.0

func (e *AccountAllowanceApproveTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountAllowanceApproveTransaction) GetHbarAllowances added in v2.11.0

func (tx *AccountAllowanceApproveTransaction) GetHbarAllowances() []*HbarAllowance

List of hbar allowance records

func (*AccountAllowanceApproveTransaction) GetLogLevel added in v2.34.0

func (e *AccountAllowanceApproveTransaction) GetLogLevel() *LogLevel

func (*AccountAllowanceApproveTransaction) GetMaxBackoff added in v2.9.0

func (e *AccountAllowanceApproveTransaction) GetMaxBackoff() time.Duration

func (*AccountAllowanceApproveTransaction) GetMaxRetry added in v2.34.0

func (e *AccountAllowanceApproveTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountAllowanceApproveTransaction) GetMaxTransactionFee added in v2.9.0

func (tx *AccountAllowanceApproveTransaction) GetMaxTransactionFee() Hbar

GetMaxTransactionFee returns the maximum transaction fee the operator (paying account) is willing to pay.

func (*AccountAllowanceApproveTransaction) GetMinBackoff added in v2.9.0

func (e *AccountAllowanceApproveTransaction) GetMinBackoff() time.Duration

func (*AccountAllowanceApproveTransaction) GetNodeAccountIDs added in v2.34.0

func (e *AccountAllowanceApproveTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountAllowanceApproveTransaction) GetTokenAllowances added in v2.11.0

func (tx *AccountAllowanceApproveTransaction) GetTokenAllowances() []*TokenAllowance

List of token allowance records

func (*AccountAllowanceApproveTransaction) GetTokenNftAllowances added in v2.11.0

func (tx *AccountAllowanceApproveTransaction) GetTokenNftAllowances() []*TokenNftAllowance

List of NFT allowance records

func (*AccountAllowanceApproveTransaction) Schedule added in v2.9.0

func (*AccountAllowanceApproveTransaction) SetGrpcDeadline added in v2.34.0

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountAllowanceApproveTransaction) SetLogLevel added in v2.34.0

func (e *AccountAllowanceApproveTransaction) SetLogLevel(level LogLevel) *executable

func (*AccountAllowanceApproveTransaction) SetMaxBackoff added in v2.9.0

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountAllowanceApproveTransaction) SetMaxRetry added in v2.9.0

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountAllowanceApproveTransaction) SetMaxTransactionFee added in v2.9.0

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*AccountAllowanceApproveTransaction) SetMinBackoff added in v2.9.0

SetMinBackoff sets the min back off for this AccountAllowanceApproveTransaction.

func (*AccountAllowanceApproveTransaction) SetNodeAccountIDs added in v2.9.0

SetNodeAccountIDs sets the _Node AccountID for this AccountAllowanceApproveTransaction.

func (*AccountAllowanceApproveTransaction) SetRegenerateTransactionID added in v2.9.0

func (tx *AccountAllowanceApproveTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *AccountAllowanceApproveTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*AccountAllowanceApproveTransaction) SetTransactionID added in v2.9.0

SetTransactionID sets the TransactionID for this AccountAllowanceApproveTransaction.

func (*AccountAllowanceApproveTransaction) SetTransactionMemo added in v2.9.0

SetTransactionMemo sets the memo for this AccountAllowanceApproveTransaction.

func (*AccountAllowanceApproveTransaction) SetTransactionValidDuration added in v2.9.0

func (tx *AccountAllowanceApproveTransaction) SetTransactionValidDuration(duration time.Duration) *AccountAllowanceApproveTransaction

SetTransactionValidDuration sets the valid duration for this AccountAllowanceApproveTransaction.

func (*AccountAllowanceApproveTransaction) Sign added in v2.9.0

Sign uses the provided privateKey to sign the transaction.

func (*AccountAllowanceApproveTransaction) SignWith added in v2.9.0

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*AccountAllowanceApproveTransaction) SignWithOperator added in v2.9.0

SignWithOperator signs the transaction with client's operator privateKey.

type AccountAllowanceDeleteTransaction added in v2.13.0

type AccountAllowanceDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

AccountAllowanceDeleteTransaction Deletes one or more non-fungible approved allowances from an owner's account. This operation will remove the allowances granted to one or more specific non-fungible token serial numbers. Each owner account listed as wiping an allowance must sign the transaction. Hbar and fungible token allowances can be removed by setting the amount to zero in CryptoApproveAllowance.

func NewAccountAllowanceDeleteTransaction added in v2.13.0

func NewAccountAllowanceDeleteTransaction() *AccountAllowanceDeleteTransaction

NewAccountAllowanceDeleteTransaction Creates AccountAllowanceDeleteTransaction whoch deletes one or more non-fungible approved allowances from an owner's account. This operation will remove the allowances granted to one or more specific non-fungible token serial numbers. Each owner account listed as wiping an allowance must sign the transaction. Hbar and fungible token allowances can be removed by setting the amount to zero in CryptoApproveAllowance.

func (*AccountAllowanceDeleteTransaction) AddSignature added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *AccountAllowanceDeleteTransaction

AddSignature adds a signature to the transaction.

func (*AccountAllowanceDeleteTransaction) DeleteAllHbarAllowances added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) DeleteAllHbarAllowances(ownerAccountID *AccountID) *AccountAllowanceDeleteTransaction

Deprecated

func (*AccountAllowanceDeleteTransaction) DeleteAllTokenAllowances added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) DeleteAllTokenAllowances(tokenID TokenID, ownerAccountID *AccountID) *AccountAllowanceDeleteTransaction

Deprecated

func (*AccountAllowanceDeleteTransaction) DeleteAllTokenNftAllowances added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) DeleteAllTokenNftAllowances(nftID NftID, ownerAccountID *AccountID) *AccountAllowanceDeleteTransaction

DeleteAllTokenNftAllowances The non-fungible token allowance/allowances to remove.

func (*AccountAllowanceDeleteTransaction) Execute added in v2.13.0

func (*AccountAllowanceDeleteTransaction) Freeze added in v2.13.0

func (*AccountAllowanceDeleteTransaction) FreezeWith added in v2.13.0

func (*AccountAllowanceDeleteTransaction) GetAllHbarDeleteAllowances added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) GetAllHbarDeleteAllowances() []*HbarAllowance

Deprecated

func (*AccountAllowanceDeleteTransaction) GetAllTokenDeleteAllowances added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) GetAllTokenDeleteAllowances() []*TokenAllowance

Deprecated

func (*AccountAllowanceDeleteTransaction) GetAllTokenNftDeleteAllowances added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) GetAllTokenNftDeleteAllowances() []*TokenNftAllowance

GetAllTokenNftDeleteAllowances Get the non-fungible token allowance/allowances that will be removed.

func (*AccountAllowanceDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *AccountAllowanceDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountAllowanceDeleteTransaction) GetLogLevel added in v2.34.0

func (e *AccountAllowanceDeleteTransaction) GetLogLevel() *LogLevel

func (*AccountAllowanceDeleteTransaction) GetMaxBackoff added in v2.13.0

func (e *AccountAllowanceDeleteTransaction) GetMaxBackoff() time.Duration

func (*AccountAllowanceDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *AccountAllowanceDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountAllowanceDeleteTransaction) GetMinBackoff added in v2.13.0

func (e *AccountAllowanceDeleteTransaction) GetMinBackoff() time.Duration

func (*AccountAllowanceDeleteTransaction) GetNodeAccountIDs added in v2.34.0

func (e *AccountAllowanceDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountAllowanceDeleteTransaction) Schedule added in v2.13.0

func (*AccountAllowanceDeleteTransaction) SetGrpcDeadline added in v2.34.0

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountAllowanceDeleteTransaction) SetLogLevel added in v2.34.0

func (e *AccountAllowanceDeleteTransaction) SetLogLevel(level LogLevel) *executable

func (*AccountAllowanceDeleteTransaction) SetMaxBackoff added in v2.13.0

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountAllowanceDeleteTransaction) SetMaxRetry added in v2.13.0

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountAllowanceDeleteTransaction) SetMaxTransactionFee added in v2.13.0

SetMaxTransactionFee sets the max transaction fee for this AccountAllowanceDeleteTransaction.

func (*AccountAllowanceDeleteTransaction) SetMinBackoff added in v2.13.0

SetMinBackoff sets the min back off for this AccountAllowanceDeleteTransaction.

func (*AccountAllowanceDeleteTransaction) SetNodeAccountIDs added in v2.13.0

SetNodeAccountIDs sets the _Node AccountID for this AccountAllowanceDeleteTransaction.

func (*AccountAllowanceDeleteTransaction) SetRegenerateTransactionID added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *AccountAllowanceDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*AccountAllowanceDeleteTransaction) SetTransactionID added in v2.13.0

SetTransactionID sets the TransactionID for this AccountAllowanceDeleteTransaction.

func (*AccountAllowanceDeleteTransaction) SetTransactionMemo added in v2.13.0

SetTransactionMemo sets the memo for this AccountAllowanceDeleteTransaction.

func (*AccountAllowanceDeleteTransaction) SetTransactionValidDuration added in v2.13.0

func (tx *AccountAllowanceDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *AccountAllowanceDeleteTransaction

SetTransactionValidDuration sets the valid duration for this AccountAllowanceDeleteTransaction.

func (*AccountAllowanceDeleteTransaction) Sign added in v2.13.0

Sign uses the provided privateKey to sign the transaction.

func (*AccountAllowanceDeleteTransaction) SignWith added in v2.13.0

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*AccountAllowanceDeleteTransaction) SignWithOperator added in v2.13.0

SignWithOperator signs the transaction with client's operator privateKey.

type AccountBalance

type AccountBalance struct {
	Hbars Hbar

	// Deprecated: Use `AccountBalance.Tokens` instead
	Token map[TokenID]uint64

	// Deprecated
	Tokens TokenBalanceMap
	// Deprecated
	TokenDecimals TokenDecimalMap
}

type AccountBalanceQuery

type AccountBalanceQuery struct {
	Query
	// contains filtered or unexported fields
}

AccountBalanceQuery gets the balance of a CryptoCurrency account. This returns only the balance, so it is a smaller and faster reply than AccountInfoQuery, which returns the balance plus additional information.

func NewAccountBalanceQuery

func NewAccountBalanceQuery() *AccountBalanceQuery

NewAccountBalanceQuery creates an AccountBalanceQuery query which can be used to construct and execute an AccountBalanceQuery. It is recommended that you use this for creating new instances of an AccountBalanceQuery instead of manually creating an instance of the struct.

func (*AccountBalanceQuery) Execute

func (q *AccountBalanceQuery) Execute(client *Client) (AccountBalance, error)

Execute executes the query with the provided client

func (*AccountBalanceQuery) GetAccountID

func (q *AccountBalanceQuery) GetAccountID() AccountID

GetAccountID returns the AccountID for which you wish to query the balance.

func (*AccountBalanceQuery) GetContractID

func (q *AccountBalanceQuery) GetContractID() ContractID

GetContractID returns the ContractID for which you wish to query the balance.

func (*AccountBalanceQuery) GetCost

func (q *AccountBalanceQuery) GetCost(client *Client) (Hbar, error)

func (*AccountBalanceQuery) GetGrpcDeadline added in v2.34.0

func (e *AccountBalanceQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountBalanceQuery) GetLogLevel added in v2.34.0

func (e *AccountBalanceQuery) GetLogLevel() *LogLevel

func (*AccountBalanceQuery) GetMaxBackoff added in v2.1.16

func (e *AccountBalanceQuery) GetMaxBackoff() time.Duration

func (*AccountBalanceQuery) GetMaxRetry added in v2.34.0

func (e *AccountBalanceQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountBalanceQuery) GetMinBackoff added in v2.1.16

func (e *AccountBalanceQuery) GetMinBackoff() time.Duration

func (*AccountBalanceQuery) GetNodeAccountIDs

func (e *AccountBalanceQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountBalanceQuery) SetAccountID

func (q *AccountBalanceQuery) SetAccountID(accountID AccountID) *AccountBalanceQuery

SetAccountID sets the AccountID for which you wish to query the balance.

Note: you can only query an Account or Contract but not both -- if a Contract ID or Account ID has already been set, it will be overwritten by this _Method.

func (*AccountBalanceQuery) SetContractID

func (q *AccountBalanceQuery) SetContractID(contractID ContractID) *AccountBalanceQuery

SetContractID sets the ContractID for which you wish to query the balance.

Note: you can only query an Account or Contract but not both -- if a Contract ID or Account ID has already been set, it will be overwritten by this _Method.

func (*AccountBalanceQuery) SetGrpcDeadline added in v2.11.0

func (q *AccountBalanceQuery) SetGrpcDeadline(deadline *time.Duration) *AccountBalanceQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountBalanceQuery) SetLogLevel added in v2.25.0

func (q *AccountBalanceQuery) SetLogLevel(level LogLevel) *AccountBalanceQuery

func (*AccountBalanceQuery) SetMaxBackoff added in v2.1.16

func (q *AccountBalanceQuery) SetMaxBackoff(max time.Duration) *AccountBalanceQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountBalanceQuery) SetMaxQueryPayment

func (q *AccountBalanceQuery) SetMaxQueryPayment(maxPayment Hbar) *AccountBalanceQuery

SetMaxQueryPayment sets the maximum payment allowed for this query.

func (*AccountBalanceQuery) SetMaxRetry added in v2.1.2

func (q *AccountBalanceQuery) SetMaxRetry(count int) *AccountBalanceQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountBalanceQuery) SetMinBackoff added in v2.1.16

func (q *AccountBalanceQuery) SetMinBackoff(min time.Duration) *AccountBalanceQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*AccountBalanceQuery) SetNodeAccountIDs

func (q *AccountBalanceQuery) SetNodeAccountIDs(accountID []AccountID) *AccountBalanceQuery

SetNodeAccountIDs sets the _Node AccountID for this AccountBalanceQuery.

func (*AccountBalanceQuery) SetPaymentTransactionID added in v2.11.0

func (q *AccountBalanceQuery) SetPaymentTransactionID(transactionID TransactionID) *AccountBalanceQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*AccountBalanceQuery) SetQueryPayment

func (q *AccountBalanceQuery) SetQueryPayment(paymentAmount Hbar) *AccountBalanceQuery

SetQueryPayment sets the payment amount for this query.

type AccountCreateTransaction

type AccountCreateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

AccountCreateTransaction creates a new account. After the account is created, the AccountID for it is in the receipt, or by asking for a Record of the transaction to be created, and retrieving that. The account can then automatically generate records for large transfers into it or out of it, which each last for 25 hours. Records are generated for any transfer that exceeds the thresholds given here. This account is charged hbar for each record generated, so the thresholds are useful for limiting Record generation to happen only for large transactions.

The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms and multiple shards.

func NewAccountCreateTransaction

func NewAccountCreateTransaction() *AccountCreateTransaction

NewAccountCreateTransaction creates an AccountCreateTransaction transaction which can be used to construct and execute a Crypto Create Transaction.

func (*AccountCreateTransaction) AddSignature added in v2.1.3

func (tx *AccountCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *AccountCreateTransaction

AddSignature adds a signature to the transaction.

func (*AccountCreateTransaction) Execute

func (tx *AccountCreateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*AccountCreateTransaction) Freeze

func (*AccountCreateTransaction) FreezeWith

func (tx *AccountCreateTransaction) FreezeWith(client *Client) (*AccountCreateTransaction, error)

func (*AccountCreateTransaction) GetAccountMemo added in v2.1.6

func (tx *AccountCreateTransaction) GetAccountMemo() string

GetAccountMemo Gets the memo associated with the account (UTF-8 encoding max 100 bytes)

func (*AccountCreateTransaction) GetAlias added in v2.24.0

func (tx *AccountCreateTransaction) GetAlias() []byte

func (*AccountCreateTransaction) GetAutoRenewPeriod

func (tx *AccountCreateTransaction) GetAutoRenewPeriod() time.Duration

GetAutoRenewPeriod returns the time duration for when account is charged to extend its expiration date.

func (*AccountCreateTransaction) GetDeclineStakingReward added in v2.16.0

func (tx *AccountCreateTransaction) GetDeclineStakingReward() bool

GetDeclineStakingReward returns true if the account declines receiving a staking reward.

func (*AccountCreateTransaction) GetGrpcDeadline added in v2.34.0

func (e *AccountCreateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountCreateTransaction) GetInitialBalance

func (tx *AccountCreateTransaction) GetInitialBalance() Hbar

GetInitialBalance returns the initial number of Hbar to put into the account

func (*AccountCreateTransaction) GetKey

func (tx *AccountCreateTransaction) GetKey() (Key, error)

GetKey returns the key that must sign each transfer out of the account.

func (*AccountCreateTransaction) GetLogLevel added in v2.34.0

func (e *AccountCreateTransaction) GetLogLevel() *LogLevel

func (*AccountCreateTransaction) GetMaxAutomaticTokenAssociations added in v2.2.0

func (tx *AccountCreateTransaction) GetMaxAutomaticTokenAssociations() uint32

GetMaxAutomaticTokenAssociations returns the maximum number of tokens that an Account can be implicitly associated with.

func (*AccountCreateTransaction) GetMaxBackoff added in v2.1.16

func (e *AccountCreateTransaction) GetMaxBackoff() time.Duration

func (*AccountCreateTransaction) GetMaxRetry added in v2.34.0

func (e *AccountCreateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountCreateTransaction) GetMaxTransactionFee

func (tx *AccountCreateTransaction) GetMaxTransactionFee() Hbar

GetMaxTransactionFee returns the maximum transaction fee the operator (paying account) is willing to pay.

func (*AccountCreateTransaction) GetMinBackoff added in v2.1.16

func (e *AccountCreateTransaction) GetMinBackoff() time.Duration

func (*AccountCreateTransaction) GetNodeAccountIDs

func (e *AccountCreateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountCreateTransaction) GetProxyAccountID

func (tx *AccountCreateTransaction) GetProxyAccountID() AccountID

Deprecated

func (*AccountCreateTransaction) GetReceiverSignatureRequired

func (tx *AccountCreateTransaction) GetReceiverSignatureRequired() bool

GetReceiverSignatureRequired returns the receiverSigRequired flag.

func (*AccountCreateTransaction) GetStakedAccountID added in v2.16.0

func (tx *AccountCreateTransaction) GetStakedAccountID() AccountID

GetStakedAccountID returns the account to which this account will stake.

func (*AccountCreateTransaction) GetStakedNodeID added in v2.16.0

func (tx *AccountCreateTransaction) GetStakedNodeID() int64

GetStakedNodeID returns the node to which this account will stake

func (*AccountCreateTransaction) Schedule added in v2.1.5

func (*AccountCreateTransaction) SetAccountMemo added in v2.1.6

func (tx *AccountCreateTransaction) SetAccountMemo(memo string) *AccountCreateTransaction

SetAccountMemo Sets the memo associated with the account (UTF-8 encoding max 100 bytes)

func (*AccountCreateTransaction) SetAlias added in v2.24.0

func (tx *AccountCreateTransaction) SetAlias(evmAddress string) *AccountCreateTransaction

func (*AccountCreateTransaction) SetAutoRenewPeriod

func (tx *AccountCreateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *AccountCreateTransaction

SetAutoRenewPeriod sets the time duration for when account is charged to extend its expiration date. When the account is created, the payer account is charged enough hbars so that the new account will not expire for the next auto renew period. When it reaches the expiration time, the new account will then be automatically charged to renew for another auto renew period. If it does not have enough hbars to renew for that long, then the remaining hbars are used to extend its expiration as long as possible. If it is has a zero balance when it expires, then it is deleted.

func (*AccountCreateTransaction) SetDeclineStakingReward added in v2.16.0

func (tx *AccountCreateTransaction) SetDeclineStakingReward(decline bool) *AccountCreateTransaction

SetDeclineStakingReward If set to true, the account declines receiving a staking reward. The default value is false.

func (*AccountCreateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *AccountCreateTransaction) SetGrpcDeadline(deadline *time.Duration) *AccountCreateTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountCreateTransaction) SetInitialBalance

func (tx *AccountCreateTransaction) SetInitialBalance(initialBalance Hbar) *AccountCreateTransaction

SetInitialBalance sets the initial number of Hbar to put into the account

func (*AccountCreateTransaction) SetKey

SetKey sets the key that must sign each transfer out of the account. If RecieverSignatureRequired is true, then it must also sign any transfer into the account.

func (*AccountCreateTransaction) SetLogLevel added in v2.25.0

func (*AccountCreateTransaction) SetMaxAutomaticTokenAssociations added in v2.2.0

func (tx *AccountCreateTransaction) SetMaxAutomaticTokenAssociations(max uint32) *AccountCreateTransaction

SetMaxAutomaticTokenAssociations Set the maximum number of tokens that an Account can be implicitly associated with. Defaults to 0 and up to a maximum value of 1000.

func (*AccountCreateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountCreateTransaction) SetMaxRetry added in v2.1.2

func (tx *AccountCreateTransaction) SetMaxRetry(count int) *AccountCreateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountCreateTransaction) SetMaxTransactionFee

func (tx *AccountCreateTransaction) SetMaxTransactionFee(fee Hbar) *AccountCreateTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*AccountCreateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*AccountCreateTransaction) SetNodeAccountIDs

func (tx *AccountCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *AccountCreateTransaction

SetNodeAccountIDs sets the _Node AccountID for this AccountCreateTransaction.

func (*AccountCreateTransaction) SetProxyAccountID

func (tx *AccountCreateTransaction) SetProxyAccountID(id AccountID) *AccountCreateTransaction

Deprecated SetProxyAccountID sets the ID of the account to which this account is proxy staked. If proxyAccountID is not set, is an invalid account, or is an account that isn't a _Node, then this account is automatically proxy staked to a _Node chosen by the _Network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a _Node, then it will behave as if proxyAccountID was not set.

func (*AccountCreateTransaction) SetReceiverSignatureRequired

func (tx *AccountCreateTransaction) SetReceiverSignatureRequired(required bool) *AccountCreateTransaction

SetReceiverSignatureRequired sets the receiverSigRequired flag. If the receiverSigRequired flag is set to true, then all cryptocurrency transfers must be signed by this account's key, both for transfers in and out. If it is false, then only transfers out have to be signed by it. This transaction must be signed by the payer account. If receiverSigRequired is false, then the transaction does not have to be signed by the keys in the keys field. If it is true, then it must be signed by them, in addition to the keys of the payer account.

func (*AccountCreateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *AccountCreateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *AccountCreateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*AccountCreateTransaction) SetStakedAccountID added in v2.16.0

func (tx *AccountCreateTransaction) SetStakedAccountID(id AccountID) *AccountCreateTransaction

SetStakedAccountID Set the account to which this account will stake.

func (*AccountCreateTransaction) SetStakedNodeID added in v2.16.0

func (tx *AccountCreateTransaction) SetStakedNodeID(id int64) *AccountCreateTransaction

SetStakedNodeID Set the node to which this account will stake

func (*AccountCreateTransaction) SetTransactionID

func (tx *AccountCreateTransaction) SetTransactionID(transactionID TransactionID) *AccountCreateTransaction

SetTransactionID sets the TransactionID for this AccountCreateTransaction.

func (*AccountCreateTransaction) SetTransactionMemo

func (tx *AccountCreateTransaction) SetTransactionMemo(memo string) *AccountCreateTransaction

SetTransactionMemo sets the memo for this AccountCreateTransaction.

func (*AccountCreateTransaction) SetTransactionValidDuration

func (tx *AccountCreateTransaction) SetTransactionValidDuration(duration time.Duration) *AccountCreateTransaction

SetTransactionValidDuration sets the valid duration for this AccountCreateTransaction.

func (*AccountCreateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*AccountCreateTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*AccountCreateTransaction) SignWithOperator

func (tx *AccountCreateTransaction) SignWithOperator(
	client *Client,
) (*AccountCreateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type AccountDeleteTransaction

type AccountDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

AccountDeleteTransaction Mark an account as deleted, moving all its current hbars to another account. It will remain in the ledger, marked as deleted, until it expires. Transfers into it a deleted account fail. But a deleted account can still have its expiration extended in the normal way.

func NewAccountDeleteTransaction

func NewAccountDeleteTransaction() *AccountDeleteTransaction

NewAccountDeleteTransaction creates AccountDeleteTransaction which marks an account as deleted, moving all its current hbars to another account. It will remain in the ledger, marked as deleted, until it expires. Transfers into it a deleted account fail. But a deleted account can still have its expiration extended in the normal way.

func (*AccountDeleteTransaction) AddSignature added in v2.1.3

func (tx *AccountDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *AccountDeleteTransaction

AddSignature adds a signature to the transaction.

func (*AccountDeleteTransaction) Execute

func (tx *AccountDeleteTransaction) Execute(client *Client) (TransactionResponse, error)

func (*AccountDeleteTransaction) Freeze

func (*AccountDeleteTransaction) FreezeWith

func (tx *AccountDeleteTransaction) FreezeWith(client *Client) (*AccountDeleteTransaction, error)

func (*AccountDeleteTransaction) GetAccountID

func (tx *AccountDeleteTransaction) GetAccountID() AccountID

GetAccountID returns the AccountID which will be deleted.

func (*AccountDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *AccountDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountDeleteTransaction) GetLogLevel added in v2.34.0

func (e *AccountDeleteTransaction) GetLogLevel() *LogLevel

func (*AccountDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *AccountDeleteTransaction) GetMaxBackoff() time.Duration

func (*AccountDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *AccountDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *AccountDeleteTransaction) GetMinBackoff() time.Duration

func (*AccountDeleteTransaction) GetNodeAccountIDs

func (e *AccountDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountDeleteTransaction) GetTransferAccountID

func (tx *AccountDeleteTransaction) GetTransferAccountID() AccountID

GetTransferAccountID returns the AccountID which will receive all remaining hbars.

func (*AccountDeleteTransaction) Schedule added in v2.1.5

func (*AccountDeleteTransaction) SetAccountID

func (tx *AccountDeleteTransaction) SetAccountID(accountID AccountID) *AccountDeleteTransaction

SetNodeAccountID sets the _Node AccountID for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *AccountDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *AccountDeleteTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountDeleteTransaction) SetLogLevel added in v2.25.0

func (*AccountDeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountDeleteTransaction) SetMaxRetry added in v2.1.2

func (tx *AccountDeleteTransaction) SetMaxRetry(count int) *AccountDeleteTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountDeleteTransaction) SetMaxTransactionFee

func (tx *AccountDeleteTransaction) SetMaxTransactionFee(fee Hbar) *AccountDeleteTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*AccountDeleteTransaction) SetMinBackoff added in v2.1.16

GetMaxBackoff returns the maximum amount of time to wait between retries.

func (*AccountDeleteTransaction) SetNodeAccountIDs

func (tx *AccountDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *AccountDeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *AccountDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *AccountDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*AccountDeleteTransaction) SetTransactionID

func (tx *AccountDeleteTransaction) SetTransactionID(transactionID TransactionID) *AccountDeleteTransaction

SetTransactionID sets the TransactionID for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetTransactionMemo

func (tx *AccountDeleteTransaction) SetTransactionMemo(memo string) *AccountDeleteTransaction

SetTransactionMemo sets the memo for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetTransactionValidDuration

func (tx *AccountDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *AccountDeleteTransaction

SetTransactionValidDuration sets the valid duration for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetTransferAccountID

func (tx *AccountDeleteTransaction) SetTransferAccountID(transferAccountID AccountID) *AccountDeleteTransaction

SetTransferAccountID sets the AccountID which will receive all remaining hbars.

func (*AccountDeleteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*AccountDeleteTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*AccountDeleteTransaction) SignWithOperator

func (tx *AccountDeleteTransaction) SignWithOperator(
	client *Client,
) (*AccountDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type AccountID

type AccountID struct {
	Shard           uint64
	Realm           uint64
	Account         uint64
	AliasKey        *PublicKey
	AliasEvmAddress *[]byte
	// contains filtered or unexported fields
}

AccountID is the ID for a Hedera account

func AccountIDFromBytes added in v2.1.3

func AccountIDFromBytes(data []byte) (AccountID, error)

AccountIDFromBytes converts wire-format encoding to Account ID

func AccountIDFromEvmAddress added in v2.14.0

func AccountIDFromEvmAddress(shard uint64, realm uint64, aliasEvmAddress string) (AccountID, error)

AccountIDFromEvmAddress constructs an AccountID from a string formatted as 0.0.<evm address>

func AccountIDFromEvmPublicAddress added in v2.23.0

func AccountIDFromEvmPublicAddress(s string) (AccountID, error)

Returns an AccountID with EvmPublic address for the use of HIP-583

func AccountIDFromSolidityAddress

func AccountIDFromSolidityAddress(s string) (AccountID, error)

AccountIDFromSolidityAddress constructs an AccountID from a string representation of a _Solidity address

func AccountIDFromString

func AccountIDFromString(data string) (AccountID, error)

AccountIDFromString constructs an AccountID from a string formatted as `Shard.Realm.Account` (for example "0.0.3")

func TransactionGetNodeAccountIDs added in v2.2.0

func TransactionGetNodeAccountIDs(transaction interface{}) ([]AccountID, error)

func (AccountID) Compare added in v2.6.0

func (id AccountID) Compare(given AccountID) int

Compare returns 0 if the two AccountID are identical, -1 if not.

func (AccountID) Equals added in v2.20.0

func (id AccountID) Equals(other AccountID) bool

Equals returns true if this AccountID and the given AccountID are identical

func (AccountID) GetChecksum added in v2.4.0

func (id AccountID) GetChecksum() *string

GetChecksum Retrieve just the checksum

func (AccountID) IsZero added in v2.20.0

func (id AccountID) IsZero() bool

IsZero returns true if this AccountID is the zero-value

func (*AccountID) PopulateAccount added in v2.28.0

func (id *AccountID) PopulateAccount(client *Client) error

PopulateAccount gets the actual `Account` field of the `AccountId` from the Mirror Node. Should be used after generating `AccountId.FromEvmAddress()` because it sets the `Account` field to `0` automatically since there is no connection between the `Account` and the `evmAddress`

func (*AccountID) PopulateEvmAddress added in v2.32.0

func (id *AccountID) PopulateEvmAddress(client *Client) error

PopulateEvmAddress gets the actual `AliasEvmAddress` field of the `AccountId` from the Mirror Node.

func (AccountID) String

func (id AccountID) String() string

String returns the string representation of an AccountID in `Shard.Realm.Account` (for example "0.0.3")

func (AccountID) ToBytes added in v2.1.3

func (id AccountID) ToBytes() []byte

ToBytes returns the wire-format encoding of AccountID

func (AccountID) ToSolidityAddress

func (id AccountID) ToSolidityAddress() string

ToSolidityAddress returns the string representation of the AccountID as a _Solidity address.

func (AccountID) ToStringWithChecksum added in v2.1.13

func (id AccountID) ToStringWithChecksum(client *Client) (string, error)

ToStringWithChecksum returns the string representation of an AccountID in `Shard.Realm.Account-checksum` (for example "0.0.3-sdaf")

func (*AccountID) UnmarshalJSON

func (id *AccountID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the encoding.JSON interface.

func (*AccountID) Validate added in v2.1.8

func (id *AccountID) Validate(client *Client) error

Deprecated - use ValidateChecksum instead

func (*AccountID) ValidateChecksum added in v2.4.0

func (id *AccountID) ValidateChecksum(client *Client) error

Verify that the client has a valid checksum.

type AccountInfo

type AccountInfo struct {
	AccountID         AccountID
	ContractAccountID string
	IsDeleted         bool
	// Deprecated
	ProxyAccountID                 AccountID
	ProxyReceived                  Hbar
	Key                            Key
	Balance                        Hbar
	GenerateSendRecordThreshold    Hbar
	GenerateReceiveRecordThreshold Hbar
	ReceiverSigRequired            bool
	ExpirationTime                 time.Time
	AutoRenewPeriod                time.Duration
	LiveHashes                     []*LiveHash
	// Deprecated
	TokenRelationships            []*TokenRelationship
	AccountMemo                   string
	OwnedNfts                     int64
	MaxAutomaticTokenAssociations uint32
	AliasKey                      *PublicKey
	LedgerID                      LedgerID
	// Deprecated
	HbarAllowances []HbarAllowance
	// Deprecated
	NftAllowances []TokenNftAllowance
	// Deprecated
	TokenAllowances []TokenAllowance
	EthereumNonce   int64
	StakingInfo     *StakingInfo
}

AccountInfo is info about the account returned from an AccountInfoQuery

func AccountInfoFromBytes added in v2.1.3

func AccountInfoFromBytes(data []byte) (AccountInfo, error)

AccountInfoFromBytes returns an AccountInfo from byte array

func (AccountInfo) ToBytes added in v2.1.3

func (info AccountInfo) ToBytes() []byte

ToBytes returns the serialized bytes of an AccountInfo

type AccountInfoQuery

type AccountInfoQuery struct {
	Query
	// contains filtered or unexported fields
}

AccountInfoQuery Get all the information about an account, including the balance. This does not get the list of account records.

func NewAccountInfoQuery

func NewAccountInfoQuery() *AccountInfoQuery

NewAccountInfoQuery Creates an AccountInfoQuery which retrieves all the information about an account, including the balance. This does not get the list of account records.

func (*AccountInfoQuery) Execute

func (q *AccountInfoQuery) Execute(client *Client) (AccountInfo, error)

Execute executes the Query with the provided client

func (*AccountInfoQuery) GetAccountID

func (q *AccountInfoQuery) GetAccountID() AccountID

GetAccountID returns the AccountID for this AccountInfoQuery.

func (*AccountInfoQuery) GetCost

func (q *AccountInfoQuery) GetCost(client *Client) (Hbar, error)

func (*AccountInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *AccountInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountInfoQuery) GetLogLevel added in v2.34.0

func (e *AccountInfoQuery) GetLogLevel() *LogLevel

func (*AccountInfoQuery) GetMaxBackoff added in v2.1.16

func (e *AccountInfoQuery) GetMaxBackoff() time.Duration

func (*AccountInfoQuery) GetMaxRetry added in v2.34.0

func (e *AccountInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountInfoQuery) GetMinBackoff added in v2.1.16

func (e *AccountInfoQuery) GetMinBackoff() time.Duration

func (*AccountInfoQuery) GetNodeAccountIDs

func (e *AccountInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountInfoQuery) SetAccountID

func (q *AccountInfoQuery) SetAccountID(accountID AccountID) *AccountInfoQuery

SetAccountID sets the AccountID for this AccountInfoQuery.

func (*AccountInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *AccountInfoQuery) SetGrpcDeadline(deadline *time.Duration) *AccountInfoQuery

SetGrpcDeadline When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountInfoQuery) SetLogLevel added in v2.25.0

func (q *AccountInfoQuery) SetLogLevel(level LogLevel) *AccountInfoQuery

func (*AccountInfoQuery) SetMaxBackoff added in v2.1.16

func (q *AccountInfoQuery) SetMaxBackoff(max time.Duration) *AccountInfoQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountInfoQuery) SetMaxQueryPayment

func (q *AccountInfoQuery) SetMaxQueryPayment(queryMaxPayment Hbar) *AccountInfoQuery

SetMaxQueryPayment sets the maximum payment allowable for this query.

func (*AccountInfoQuery) SetMaxRetry added in v2.1.2

func (q *AccountInfoQuery) SetMaxRetry(count int) *AccountInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountInfoQuery) SetMinBackoff added in v2.1.16

func (q *AccountInfoQuery) SetMinBackoff(min time.Duration) *AccountInfoQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*AccountInfoQuery) SetNodeAccountIDs

func (q *AccountInfoQuery) SetNodeAccountIDs(accountID []AccountID) *AccountInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this AccountInfoQuery.

func (*AccountInfoQuery) SetPaymentTransactionID added in v2.11.0

func (q *AccountInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *AccountInfoQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*AccountInfoQuery) SetQueryPayment

func (q *AccountInfoQuery) SetQueryPayment(queryPayment Hbar) *AccountInfoQuery

SetQueryPayment sets the Hbar payment to pay the _Node a fee for handling this query

type AccountRecordsQuery

type AccountRecordsQuery struct {
	Query
	// contains filtered or unexported fields
}

AccountRecordsQuery gets all of the records for an account for any transfers into it and out of it, that were above the threshold, during the last 25 hours.

func NewAccountRecordsQuery

func NewAccountRecordsQuery() *AccountRecordsQuery

NewAccountRecordsQuery creates an AccountRecordsQuery Query which can be used to construct and execute an AccountRecordsQuery.

It is recommended that you use this for creating new instances of an AccountRecordQuery instead of manually creating an instance of the struct.

func (*AccountRecordsQuery) Execute

func (q *AccountRecordsQuery) Execute(client *Client) ([]TransactionRecord, error)

Execute executes the Query with the provided client

func (*AccountRecordsQuery) GetAccountID

func (q *AccountRecordsQuery) GetAccountID() AccountID

GetAccountID returns the account ID for which the records will be retrieved.

func (*AccountRecordsQuery) GetCost

func (q *AccountRecordsQuery) GetCost(client *Client) (Hbar, error)

func (*AccountRecordsQuery) GetGrpcDeadline added in v2.34.0

func (e *AccountRecordsQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountRecordsQuery) GetLogLevel added in v2.34.0

func (e *AccountRecordsQuery) GetLogLevel() *LogLevel

func (*AccountRecordsQuery) GetMaxBackoff added in v2.1.16

func (e *AccountRecordsQuery) GetMaxBackoff() time.Duration

func (*AccountRecordsQuery) GetMaxRetry added in v2.34.0

func (e *AccountRecordsQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountRecordsQuery) GetMinBackoff added in v2.1.16

func (e *AccountRecordsQuery) GetMinBackoff() time.Duration

func (*AccountRecordsQuery) GetNodeAccountIDs

func (e *AccountRecordsQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountRecordsQuery) SetAccountID

func (q *AccountRecordsQuery) SetAccountID(accountID AccountID) *AccountRecordsQuery

SetAccountID sets the account ID for which the records should be retrieved.

func (*AccountRecordsQuery) SetGrpcDeadline added in v2.11.0

func (q *AccountRecordsQuery) SetGrpcDeadline(deadline *time.Duration) *AccountRecordsQuery

SetGrpcDeadline When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountRecordsQuery) SetLogLevel added in v2.25.0

func (q *AccountRecordsQuery) SetLogLevel(level LogLevel) *AccountRecordsQuery

func (*AccountRecordsQuery) SetMaxBackoff added in v2.1.16

func (q *AccountRecordsQuery) SetMaxBackoff(max time.Duration) *AccountRecordsQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountRecordsQuery) SetMaxQueryPayment

func (q *AccountRecordsQuery) SetMaxQueryPayment(maxPayment Hbar) *AccountRecordsQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*AccountRecordsQuery) SetMaxRetry added in v2.1.2

func (q *AccountRecordsQuery) SetMaxRetry(count int) *AccountRecordsQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountRecordsQuery) SetMinBackoff added in v2.1.16

func (q *AccountRecordsQuery) SetMinBackoff(min time.Duration) *AccountRecordsQuery

func (*AccountRecordsQuery) SetNodeAccountIDs

func (q *AccountRecordsQuery) SetNodeAccountIDs(accountID []AccountID) *AccountRecordsQuery

SetNodeAccountIDs sets the _Node AccountID for this AccountRecordsQuery.

func (*AccountRecordsQuery) SetPaymentTransactionID added in v2.11.0

func (q *AccountRecordsQuery) SetPaymentTransactionID(transactionID TransactionID) *AccountRecordsQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*AccountRecordsQuery) SetQueryPayment

func (q *AccountRecordsQuery) SetQueryPayment(paymentAmount Hbar) *AccountRecordsQuery

SetQueryPayment sets the payment amount for this Query.

type AccountStakersQuery

type AccountStakersQuery struct {
	Query
	// contains filtered or unexported fields
}

AccountStakersQuery gets all of the accounts that are proxy staking to this account. For each of them, the amount currently staked will be given. This is not yet implemented, but will be in a future version of the API.

func NewAccountStakersQuery

func NewAccountStakersQuery() *AccountStakersQuery

NewAccountStakersQuery creates an AccountStakersQuery query which can be used to construct and execute an AccountStakersQuery.

It is recommended that you use this for creating new instances of an AccountStakersQuery instead of manually creating an instance of the struct.

func (*AccountStakersQuery) Execute

func (q *AccountStakersQuery) Execute(client *Client) ([]Transfer, error)

Execute executes the Query with the provided client

func (*AccountStakersQuery) GetAccountID

func (q *AccountStakersQuery) GetAccountID() AccountID

GetAccountID returns the AccountID for this AccountStakersQuery.

func (*AccountStakersQuery) GetCost

func (q *AccountStakersQuery) GetCost(client *Client) (Hbar, error)

func (*AccountStakersQuery) GetGrpcDeadline added in v2.34.0

func (e *AccountStakersQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountStakersQuery) GetLogLevel added in v2.34.0

func (e *AccountStakersQuery) GetLogLevel() *LogLevel

func (*AccountStakersQuery) GetMaxBackoff added in v2.1.16

func (e *AccountStakersQuery) GetMaxBackoff() time.Duration

func (*AccountStakersQuery) GetMaxRetry added in v2.34.0

func (e *AccountStakersQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountStakersQuery) GetMinBackoff added in v2.1.16

func (e *AccountStakersQuery) GetMinBackoff() time.Duration

func (*AccountStakersQuery) GetNodeAccountIDs

func (e *AccountStakersQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountStakersQuery) SetAccountID

func (q *AccountStakersQuery) SetAccountID(accountID AccountID) *AccountStakersQuery

SetAccountID sets the Account ID for which the stakers should be retrieved

func (*AccountStakersQuery) SetGrpcDeadline added in v2.11.0

func (q *AccountStakersQuery) SetGrpcDeadline(deadline *time.Duration) *AccountStakersQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountStakersQuery) SetLogLevel added in v2.25.0

func (q *AccountStakersQuery) SetLogLevel(level LogLevel) *AccountStakersQuery

func (*AccountStakersQuery) SetMaxBackoff added in v2.1.16

func (q *AccountStakersQuery) SetMaxBackoff(max time.Duration) *AccountStakersQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountStakersQuery) SetMaxQueryPayment

func (q *AccountStakersQuery) SetMaxQueryPayment(maxPayment Hbar) *AccountStakersQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*AccountStakersQuery) SetMaxRetry added in v2.1.2

func (q *AccountStakersQuery) SetMaxRetry(count int) *AccountStakersQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountStakersQuery) SetMinBackoff added in v2.1.16

func (q *AccountStakersQuery) SetMinBackoff(min time.Duration) *AccountStakersQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*AccountStakersQuery) SetNodeAccountIDs

func (q *AccountStakersQuery) SetNodeAccountIDs(accountID []AccountID) *AccountStakersQuery

SetNodeAccountIDs sets the _Node AccountID for this AccountStakersQuery.

func (*AccountStakersQuery) SetPaymentTransactionID added in v2.11.0

func (q *AccountStakersQuery) SetPaymentTransactionID(transactionID TransactionID) *AccountStakersQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*AccountStakersQuery) SetQueryPayment

func (q *AccountStakersQuery) SetQueryPayment(paymentAmount Hbar) *AccountStakersQuery

SetQueryPayment sets the payment amount for this Query.

type AccountUpdateTransaction

type AccountUpdateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

AccountUpdateTransaction Change properties for the given account. Any null field is ignored (left unchanged). This transaction must be signed by the existing key for this account. If the transaction is changing the key field, then the transaction must be signed by both the old key (from before the change) and the new key. The old key must sign for security. The new key must sign as a safeguard to avoid accidentally changing to an invalid key, and then having no way to recover.

func NewAccountUpdateTransaction

func NewAccountUpdateTransaction() *AccountUpdateTransaction

NewAccountUpdateTransaction Creates AccoutnUppdateTransaction which changes properties for the given account. Any null field is ignored (left unchanged). This transaction must be signed by the existing key for this account. If the transaction is changing the key field, then the transaction must be signed by both the old key (from before the change) and the new key. The old key must sign for security. The new key must sign as a safeguard to avoid accidentally changing to an invalid key, and then having no way to recover.

func (*AccountUpdateTransaction) AddSignature added in v2.1.3

func (tx *AccountUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *AccountUpdateTransaction

AddSignature adds a signature to the transaction.

func (*AccountUpdateTransaction) ClearStakedAccountID added in v2.16.0

func (tx *AccountUpdateTransaction) ClearStakedAccountID() *AccountUpdateTransaction

func (*AccountUpdateTransaction) ClearStakedNodeID added in v2.16.0

func (tx *AccountUpdateTransaction) ClearStakedNodeID() *AccountUpdateTransaction

func (*AccountUpdateTransaction) Execute

func (tx *AccountUpdateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*AccountUpdateTransaction) Freeze

func (*AccountUpdateTransaction) FreezeWith

func (tx *AccountUpdateTransaction) FreezeWith(client *Client) (*AccountUpdateTransaction, error)

func (*AccountUpdateTransaction) GetAccountID

func (tx *AccountUpdateTransaction) GetAccountID() AccountID

func (*AccountUpdateTransaction) GetAccountMemo added in v2.14.0

func (tx *AccountUpdateTransaction) GetAccountMemo() string

func (*AccountUpdateTransaction) GetAliasKey added in v2.9.0

func (tx *AccountUpdateTransaction) GetAliasKey() PublicKey

Deprecated

func (*AccountUpdateTransaction) GetAutoRenewPeriod

func (tx *AccountUpdateTransaction) GetAutoRenewPeriod() time.Duration

func (*AccountUpdateTransaction) GetDeclineStakingReward added in v2.16.0

func (tx *AccountUpdateTransaction) GetDeclineStakingReward() bool

func (*AccountUpdateTransaction) GetExpirationTime

func (tx *AccountUpdateTransaction) GetExpirationTime() time.Time

func (*AccountUpdateTransaction) GetGrpcDeadline added in v2.34.0

func (e *AccountUpdateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*AccountUpdateTransaction) GetKey

func (tx *AccountUpdateTransaction) GetKey() (Key, error)

func (*AccountUpdateTransaction) GetLogLevel added in v2.34.0

func (e *AccountUpdateTransaction) GetLogLevel() *LogLevel

func (*AccountUpdateTransaction) GetMaxAutomaticTokenAssociations added in v2.2.0

func (tx *AccountUpdateTransaction) GetMaxAutomaticTokenAssociations() uint32

func (*AccountUpdateTransaction) GetMaxBackoff added in v2.1.16

func (e *AccountUpdateTransaction) GetMaxBackoff() time.Duration

func (*AccountUpdateTransaction) GetMaxRetry added in v2.34.0

func (e *AccountUpdateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*AccountUpdateTransaction) GetMinBackoff added in v2.1.16

func (e *AccountUpdateTransaction) GetMinBackoff() time.Duration

func (*AccountUpdateTransaction) GetNodeAccountIDs

func (e *AccountUpdateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*AccountUpdateTransaction) GetProxyAccountID

func (tx *AccountUpdateTransaction) GetProxyAccountID() AccountID

Deprecated

func (*AccountUpdateTransaction) GetReceiverSignatureRequired

func (tx *AccountUpdateTransaction) GetReceiverSignatureRequired() bool

func (*AccountUpdateTransaction) GetStakedAccountID added in v2.16.0

func (tx *AccountUpdateTransaction) GetStakedAccountID() AccountID

func (*AccountUpdateTransaction) GetStakedNodeID added in v2.16.0

func (tx *AccountUpdateTransaction) GetStakedNodeID() int64

func (*AccountUpdateTransaction) Schedule added in v2.1.5

func (*AccountUpdateTransaction) SetAccountID

func (tx *AccountUpdateTransaction) SetAccountID(accountID AccountID) *AccountUpdateTransaction

SetAccountID Sets the account ID which is being updated in tx transaction.

func (*AccountUpdateTransaction) SetAccountMemo added in v2.1.5

func (tx *AccountUpdateTransaction) SetAccountMemo(memo string) *AccountUpdateTransaction

SetAccountMemo sets the new memo to be associated with the account (UTF-8 encoding max 100 bytes)

func (*AccountUpdateTransaction) SetAliasKey added in v2.9.0

Deprecated

func (*AccountUpdateTransaction) SetAutoRenewPeriod

func (tx *AccountUpdateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *AccountUpdateTransaction

SetAutoRenewPeriod Sets the duration in which it will automatically extend the expiration period.

func (*AccountUpdateTransaction) SetDeclineStakingReward added in v2.16.0

func (tx *AccountUpdateTransaction) SetDeclineStakingReward(decline bool) *AccountUpdateTransaction

func (*AccountUpdateTransaction) SetExpirationTime

func (tx *AccountUpdateTransaction) SetExpirationTime(expirationTime time.Time) *AccountUpdateTransaction

SetExpirationTime sets the new expiration time to extend to (ignored if equal to or before the current one)

func (*AccountUpdateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *AccountUpdateTransaction) SetGrpcDeadline(deadline *time.Duration) *AccountUpdateTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*AccountUpdateTransaction) SetKey

SetKey Sets the new key for the Account

func (*AccountUpdateTransaction) SetLogLevel added in v2.25.0

func (*AccountUpdateTransaction) SetMaxAutomaticTokenAssociations added in v2.2.0

func (tx *AccountUpdateTransaction) SetMaxAutomaticTokenAssociations(max uint32) *AccountUpdateTransaction

SetMaxAutomaticTokenAssociations Sets the maximum number of tokens that an Account can be implicitly associated with. Up to a 1000 including implicit and explicit associations.

func (*AccountUpdateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*AccountUpdateTransaction) SetMaxRetry added in v2.1.2

func (tx *AccountUpdateTransaction) SetMaxRetry(count int) *AccountUpdateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*AccountUpdateTransaction) SetMaxTransactionFee

func (tx *AccountUpdateTransaction) SetMaxTransactionFee(fee Hbar) *AccountUpdateTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*AccountUpdateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*AccountUpdateTransaction) SetNodeAccountIDs

func (tx *AccountUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *AccountUpdateTransaction

SetNodeAccountIDs sets the _Node AccountID for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) SetProxyAccountID

func (tx *AccountUpdateTransaction) SetProxyAccountID(proxyAccountID AccountID) *AccountUpdateTransaction

Deprecated SetProxyAccountID Sets the ID of the account to which this account is proxy staked.

func (*AccountUpdateTransaction) SetReceiverSignatureRequired

func (tx *AccountUpdateTransaction) SetReceiverSignatureRequired(receiverSignatureRequired bool) *AccountUpdateTransaction

SetReceiverSignatureRequired If true, this account's key must sign any transaction depositing into this account (in addition to all withdrawals)

func (*AccountUpdateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *AccountUpdateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *AccountUpdateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*AccountUpdateTransaction) SetStakedAccountID added in v2.16.0

func (tx *AccountUpdateTransaction) SetStakedAccountID(id AccountID) *AccountUpdateTransaction

func (*AccountUpdateTransaction) SetStakedNodeID added in v2.16.0

func (tx *AccountUpdateTransaction) SetStakedNodeID(id int64) *AccountUpdateTransaction

func (*AccountUpdateTransaction) SetTransactionID

func (tx *AccountUpdateTransaction) SetTransactionID(transactionID TransactionID) *AccountUpdateTransaction

SetTransactionID sets the TransactionID for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) SetTransactionMemo

func (tx *AccountUpdateTransaction) SetTransactionMemo(memo string) *AccountUpdateTransaction

SetTransactionMemo sets the memo for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) SetTransactionValidDuration

func (tx *AccountUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *AccountUpdateTransaction

SetTransactionValidDuration sets the valid duration for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*AccountUpdateTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*AccountUpdateTransaction) SignWithOperator

func (tx *AccountUpdateTransaction) SignWithOperator(
	client *Client,
) (*AccountUpdateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type AddressBookQuery added in v2.10.0

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

AddressBookQuery query an address book for its list of nodes

func NewAddressBookQuery added in v2.10.0

func NewAddressBookQuery() *AddressBookQuery

Query the mirror node for the address book.

func (*AddressBookQuery) Execute added in v2.10.0

func (q *AddressBookQuery) Execute(client *Client) (NodeAddressBook, error)

Execute executes the Query with the provided client

func (*AddressBookQuery) GetFileID added in v2.10.0

func (q *AddressBookQuery) GetFileID() FileID

func (*AddressBookQuery) GetLimit added in v2.10.0

func (q *AddressBookQuery) GetLimit() int32

func (*AddressBookQuery) GetMaxAttempts added in v2.10.0

func (q *AddressBookQuery) GetMaxAttempts() uint64

func (*AddressBookQuery) SetFileID added in v2.10.0

func (q *AddressBookQuery) SetFileID(id FileID) *AddressBookQuery

SetFileID set the ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.

func (*AddressBookQuery) SetLimit added in v2.10.0

func (q *AddressBookQuery) SetLimit(limit int32) *AddressBookQuery

SetLimit Set the maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database.

func (*AddressBookQuery) SetMaxAttempts added in v2.10.0

func (q *AddressBookQuery) SetMaxAttempts(maxAttempts uint64) *AddressBookQuery

type Argument

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

type AssessedCustomFee added in v2.1.11

type AssessedCustomFee struct {
	Amount                int64
	TokenID               *TokenID
	FeeCollectorAccountId *AccountID // nolint
	PayerAccountIDs       []*AccountID
}

func AssessedCustomFeeFromBytes added in v2.1.11

func AssessedCustomFeeFromBytes(data []byte) (AssessedCustomFee, error)

AssessedCustomFeeFromBytes returns a AssessedCustomFee from bytes

func (AssessedCustomFee) String added in v2.4.0

func (fee AssessedCustomFee) String() string

String returns a string representation of a AssessedCustomFee

func (*AssessedCustomFee) ToBytes added in v2.1.11

func (fee *AssessedCustomFee) ToBytes() []byte

ToBytes returns the serialized bytes of a AssessedCustomFee

type Client

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

Client is the Hedera protocol wrapper for the SDK used by all transaction and query types.

func ClientForMainnet

func ClientForMainnet() *Client

ClientForMainnet returns a preconfigured client for use with the standard Hedera mainnet. Most users will want to set an _Operator account with .SetOperator so transactions can be automatically given TransactionIDs and signed.

func ClientForName added in v2.1.2

func ClientForName(name string) (*Client, error)

ClientForName set up the client for the selected network.

func ClientForNetwork

func ClientForNetwork(network map[string]AccountID) *Client

ClientForNetwork constructs a client given a set of nodes.

func ClientForPreviewnet

func ClientForPreviewnet() *Client

ClientForPreviewnet returns a preconfigured client for use with the standard Hedera previewnet. Most users will want to set an _Operator account with .SetOperator so transactions can be automatically given TransactionIDs and signed.

func ClientForTestnet

func ClientForTestnet() *Client

ClientForTestnet returns a preconfigured client for use with the standard Hedera testnet. Most users will want to set an _Operator account with .SetOperator so transactions can be automatically given TransactionIDs and signed.

func ClientFromConfig

func ClientFromConfig(jsonBytes []byte) (*Client, error)

ClientFromConfig takes in the byte slice representation of a JSON string or document and returns Client based on the configuration.

func ClientFromConfigFile

func ClientFromConfigFile(filename string) (*Client, error)

ClientFromConfigFile takes a filename string representing the path to a JSON encoded Client file and returns a Client based on the configuration.

func (*Client) CancelScheduledNetworkUpdate added in v2.17.3

func (client *Client) CancelScheduledNetworkUpdate()

CancelScheduledNetworkUpdate cancels the scheduled network update the network address book

func (*Client) Close

func (client *Client) Close() error

Close is used to disconnect the Client from the _Network

func (*Client) GetAutoValidateChecksums added in v2.1.13

func (client *Client) GetAutoValidateChecksums() bool

GetAutoValidateChecksums returns if an automatic entity ID checksum validation should be performed.

func (*Client) GetCertificateVerification added in v2.4.0

func (client *Client) GetCertificateVerification() bool

GetCertificateVerification returns if server certificates should be verified against an existing address book.

func (*Client) GetDefaultMaxQueryPayment added in v2.19.0

func (client *Client) GetDefaultMaxQueryPayment() Hbar

GetDefaultMaxQueryPayment returns the default maximum payment allowed for queries.

func (*Client) GetDefaultMaxTransactionFee added in v2.19.0

func (client *Client) GetDefaultMaxTransactionFee() Hbar

GetDefaultMaxTransactionFee returns the default maximum fee allowed for transactions.

func (*Client) GetDefaultRegenerateTransactionIDs added in v2.8.0

func (client *Client) GetDefaultRegenerateTransactionIDs() bool

GetDefaultRegenerateTransactionIDs returns if an automatic transaction ID regeneration should be performed.

func (*Client) GetLedgerID added in v2.7.0

func (client *Client) GetLedgerID() *LedgerID

GetLedgerID returns the ledger ID for the Client.

func (*Client) GetLogger added in v2.25.0

func (client *Client) GetLogger() Logger

func (*Client) GetMaxAttempts added in v2.1.13

func (client *Client) GetMaxAttempts() int

GetMaxAttempts returns the maximum number of times to attempt a transaction or query.

func (*Client) GetMaxBackoff added in v2.1.16

func (client *Client) GetMaxBackoff() time.Duration

GetMaxBackoff returns the maximum amount of time to wait between retries.

func (*Client) GetMaxNodeAttempts added in v2.1.13

func (client *Client) GetMaxNodeAttempts() int

GetMaxNodeAttempts returns the maximum number of times to attempt a transaction or query on a single node.

func (*Client) GetMaxNodeReadmitPeriod added in v2.12.0

func (client *Client) GetMaxNodeReadmitPeriod() time.Duration

GetMaxNodeReadmitTime returns the maximum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) GetMinBackoff added in v2.1.16

func (client *Client) GetMinBackoff() time.Duration

GetMinBackoff returns the minimum amount of time to wait between retries.

func (*Client) GetMinNodeReadmitPeriod added in v2.12.0

func (client *Client) GetMinNodeReadmitPeriod() time.Duration

GetMinNodeReadmitTime returns the minimum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) GetMirrorNetwork

func (client *Client) GetMirrorNetwork() []string

GetNetwork returns the mirror network node list.

func (*Client) GetNetwork

func (client *Client) GetNetwork() map[string]AccountID

GetNetwork returns the current set of nodes in this Client.

func (*Client) GetNetworkName deprecated added in v2.1.13

func (client *Client) GetNetworkName() *NetworkName

Deprecated: Use GetLedgerID instead

func (*Client) GetNetworkUpdatePeriod added in v2.17.3

func (client *Client) GetNetworkUpdatePeriod() time.Duration

GetNetworkUpdatePeriod returns the current network update period

func (*Client) GetNodeMaxBackoff added in v2.6.0

func (client *Client) GetNodeMaxBackoff() time.Duration

GetNodeMaxBackoff returns the maximum amount of time to wait between retries on a single node.

func (*Client) GetNodeMaxReadmitPeriod added in v2.12.0

func (client *Client) GetNodeMaxReadmitPeriod() time.Duration

GetNodeMaxReadmitPeriod returns the maximum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) GetNodeMinBackoff added in v2.6.0

func (client *Client) GetNodeMinBackoff() time.Duration

GetNodeMinBackoff returns the minimum amount of time to wait between retries on a single node.

func (*Client) GetNodeMinReadmitPeriod added in v2.12.0

func (client *Client) GetNodeMinReadmitPeriod() time.Duration

GetNodeMinReadmitPeriod returns the minimum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) GetNodeWaitTime deprecated added in v2.1.13

func (client *Client) GetNodeWaitTime() time.Duration

Deprecated: use GetNodeMinBackoff

func (*Client) GetOperatorAccountID

func (client *Client) GetOperatorAccountID() AccountID

GetOperatorAccountID returns the ID for the _Operator

func (*Client) GetOperatorPublicKey

func (client *Client) GetOperatorPublicKey() PublicKey

GetOperatorPublicKey returns the Key for the _Operator

func (*Client) GetRequestTimeout added in v2.11.0

func (client *Client) GetRequestTimeout() *time.Duration

GetRequestTimeout returns the timeout for all requests made by the client.

func (*Client) Ping

func (client *Client) Ping(nodeID AccountID) error

Ping sends an AccountBalanceQuery to the specified _Node returning nil if no problems occur. Otherwise, an error representing the status of the _Node will be returned.

func (*Client) PingAll added in v2.1.13

func (client *Client) PingAll()

func (*Client) SetAutoValidateChecksums added in v2.1.13

func (client *Client) SetAutoValidateChecksums(validate bool)

SetAutoValidateChecksums sets if an automatic entity ID checksum validation should be performed.

func (*Client) SetCertificateVerification added in v2.4.0

func (client *Client) SetCertificateVerification(verify bool) *Client

SetCertificateVerification sets if server certificates should be verified against an existing address book.

func (*Client) SetDefaultMaxQueryPayment added in v2.19.0

func (client *Client) SetDefaultMaxQueryPayment(defaultMaxQueryPayment Hbar) error

SetDefaultMaxQueryPayment sets the default maximum payment allowed for queries.

func (*Client) SetDefaultMaxTransactionFee added in v2.19.0

func (client *Client) SetDefaultMaxTransactionFee(defaultMaxTransactionFee Hbar) error

SetDefaultMaxTransactionFee sets the default maximum fee allowed for transactions.

func (*Client) SetDefaultRegenerateTransactionIDs added in v2.8.0

func (client *Client) SetDefaultRegenerateTransactionIDs(regen bool)

SetDefaultRegenerateTransactionIDs sets if an automatic transaction ID regeneration should be performed.

func (*Client) SetLedgerID added in v2.7.0

func (client *Client) SetLedgerID(id LedgerID)

SetLedgerID sets the ledger ID for the Client.

func (*Client) SetLogLevel added in v2.25.0

func (client *Client) SetLogLevel(level LogLevel) *Client

func (*Client) SetLogger added in v2.25.0

func (client *Client) SetLogger(logger Logger) *Client

func (*Client) SetMaxAttempts added in v2.1.13

func (client *Client) SetMaxAttempts(max int)

SetMaxAttempts sets the maximum number of times to attempt a transaction or query.

func (*Client) SetMaxBackoff added in v2.1.16

func (client *Client) SetMaxBackoff(max time.Duration)

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*Client) SetMaxNodeAttempts added in v2.1.13

func (client *Client) SetMaxNodeAttempts(max int)

SetMaxNodeAttempts sets the maximum number of times to attempt a transaction or query on a single node.

func (*Client) SetMaxNodeReadmitTime added in v2.12.0

func (client *Client) SetMaxNodeReadmitTime(readmitTime time.Duration)

SetMaxNodeReadmitTime The maximum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) SetMaxNodesPerTransaction added in v2.1.13

func (client *Client) SetMaxNodesPerTransaction(max int)

SetMaxNodesPerTransaction sets the maximum number of nodes to try for a single transaction.

func (*Client) SetMinBackoff added in v2.1.16

func (client *Client) SetMinBackoff(min time.Duration)

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*Client) SetMinNodeReadmitTime added in v2.12.0

func (client *Client) SetMinNodeReadmitTime(readmitTime time.Duration)

SetMinNodeReadmitTime The minimum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) SetMirrorNetwork

func (client *Client) SetMirrorNetwork(mirrorNetwork []string)

SetNetwork replaces all _Nodes in the Client with a new set of _Nodes. (e.g. for an Address Book update).

func (*Client) SetNetwork

func (client *Client) SetNetwork(network map[string]AccountID) error

SetNetwork replaces all nodes in this Client with a new set of nodes.

func (*Client) SetNetworkFromAddressBook added in v2.17.3

func (client *Client) SetNetworkFromAddressBook(addressBook NodeAddressBook) *Client

SetNetworkFromAddressBook replaces all nodes in this Client with the nodes in the Address Book.

func (*Client) SetNetworkName deprecated added in v2.1.13

func (client *Client) SetNetworkName(name NetworkName)

Deprecated: Use SetLedgerID instead

func (*Client) SetNetworkUpdatePeriod added in v2.17.3

func (client *Client) SetNetworkUpdatePeriod(period time.Duration) *Client

SetNetworkUpdatePeriod sets how often the client will update the network address book

func (*Client) SetNodeMaxBackoff added in v2.6.0

func (client *Client) SetNodeMaxBackoff(nodeWait time.Duration)

SetNodeMaxBackoff sets the maximum amount of time to wait between retries on a single node.

func (*Client) SetNodeMaxReadmitPeriod added in v2.12.0

func (client *Client) SetNodeMaxReadmitPeriod(period time.Duration)

SetNodeMaxReadmitPeriod sets the maximum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) SetNodeMinBackoff added in v2.6.0

func (client *Client) SetNodeMinBackoff(nodeWait time.Duration)

SetNodeMinBackoff sets the minimum amount of time to wait between retries on a single node.

func (*Client) SetNodeMinReadmitPeriod added in v2.12.0

func (client *Client) SetNodeMinReadmitPeriod(period time.Duration)

SetNodeMinReadmitPeriod sets the minimum amount of time to wait before attempting to reconnect to a node that has been removed from the network.

func (*Client) SetNodeWaitTime deprecated added in v2.1.13

func (client *Client) SetNodeWaitTime(nodeWait time.Duration)

Deprecated: use SetNodeMinBackoff

func (*Client) SetOperator

func (client *Client) SetOperator(accountID AccountID, privateKey PrivateKey) *Client

SetOperator sets that account that will, by default, be paying for transactions and queries built with the client and the associated key with which to automatically sign transactions.

func (*Client) SetOperatorWith

func (client *Client) SetOperatorWith(accountID AccountID, publicKey PublicKey, signer TransactionSigner) *Client

SetOperatorWith sets that account that will, by default, be paying for transactions and queries built with the client, the account's PublicKey and a callback that will be invoked when a transaction needs to be signed.

func (*Client) SetRequestTimeout added in v2.11.0

func (client *Client) SetRequestTimeout(timeout *time.Duration)

SetRequestTimeout sets the timeout for all requests made by the client.

func (*Client) SetTransportSecurity added in v2.4.0

func (client *Client) SetTransportSecurity(tls bool) *Client

SetTransportSecurity sets if transport security should be used to connect to consensus nodes. If transport security is enabled all connections to consensus nodes will use TLS, and the server's certificate hash will be compared to the hash stored in the NodeAddressBook for the given network. *Note*: If transport security is enabled, but {@link Client#isVerifyCertificates()} is disabled then server certificates will not be verified.

type ContractBytecodeQuery

type ContractBytecodeQuery struct {
	Query
	// contains filtered or unexported fields
}

ContractBytecodeQuery retrieves the bytecode for a smart contract instance

func NewContractBytecodeQuery

func NewContractBytecodeQuery() *ContractBytecodeQuery

NewContractBytecodeQuery creates a ContractBytecodeQuery query which can be used to construct and execute a Contract Get Bytecode Query.

func (*ContractBytecodeQuery) Execute

func (q *ContractBytecodeQuery) Execute(client *Client) ([]byte, error)

Execute executes the Query with the provided client

func (*ContractBytecodeQuery) GetContractID

func (q *ContractBytecodeQuery) GetContractID() ContractID

GetContractID returns the contract for which the bytecode is requested

func (*ContractBytecodeQuery) GetCost

func (q *ContractBytecodeQuery) GetCost(client *Client) (Hbar, error)

func (*ContractBytecodeQuery) GetGrpcDeadline added in v2.34.0

func (e *ContractBytecodeQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractBytecodeQuery) GetLogLevel added in v2.34.0

func (e *ContractBytecodeQuery) GetLogLevel() *LogLevel

func (*ContractBytecodeQuery) GetMaxBackoff added in v2.1.16

func (e *ContractBytecodeQuery) GetMaxBackoff() time.Duration

func (*ContractBytecodeQuery) GetMaxRetry added in v2.34.0

func (e *ContractBytecodeQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractBytecodeQuery) GetMinBackoff added in v2.1.16

func (e *ContractBytecodeQuery) GetMinBackoff() time.Duration

func (*ContractBytecodeQuery) GetNodeAccountIDs added in v2.34.0

func (e *ContractBytecodeQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ContractBytecodeQuery) SetContractID

func (q *ContractBytecodeQuery) SetContractID(contractID ContractID) *ContractBytecodeQuery

SetContractID sets the contract for which the bytecode is requested

func (*ContractBytecodeQuery) SetGrpcDeadline added in v2.11.0

func (q *ContractBytecodeQuery) SetGrpcDeadline(deadline *time.Duration) *ContractBytecodeQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractBytecodeQuery) SetLogLevel added in v2.25.0

func (q *ContractBytecodeQuery) SetLogLevel(level LogLevel) *ContractBytecodeQuery

func (*ContractBytecodeQuery) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ContractBytecodeQuery) SetMaxQueryPayment

func (q *ContractBytecodeQuery) SetMaxQueryPayment(maxPayment Hbar) *ContractBytecodeQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ContractBytecodeQuery) SetMaxRetry added in v2.1.2

func (q *ContractBytecodeQuery) SetMaxRetry(count int) *ContractBytecodeQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*ContractBytecodeQuery) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ContractBytecodeQuery) SetNodeAccountIDs

func (q *ContractBytecodeQuery) SetNodeAccountIDs(accountID []AccountID) *ContractBytecodeQuery

SetNodeAccountIDs sets the _Node AccountID for this ContractBytecodeQuery.

func (*ContractBytecodeQuery) SetPaymentTransactionID added in v2.11.0

func (q *ContractBytecodeQuery) SetPaymentTransactionID(transactionID TransactionID) *ContractBytecodeQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*ContractBytecodeQuery) SetQueryPayment

func (q *ContractBytecodeQuery) SetQueryPayment(paymentAmount Hbar) *ContractBytecodeQuery

SetQueryPayment sets the payment amount for this Query.

type ContractCallQuery

type ContractCallQuery struct {
	Query
	// contains filtered or unexported fields
}

ContractCallQuery calls a function of the given smart contract instance, giving it ContractFunctionParameters as its inputs. It will consume the entire given amount of gas.

This is performed locally on the particular _Node that the client is communicating with. It cannot change the state of the contract instance (and so, cannot spend anything from the instance's Hedera account). It will not have a consensus timestamp. It cannot generate a record or a receipt. This is useful for calling getter functions, which purely read the state and don't change it. It is faster and cheaper than a ContractExecuteTransaction, because it is purely local to a single _Node.

func NewContractCallQuery

func NewContractCallQuery() *ContractCallQuery

NewContractCallQuery creates a ContractCallQuery query which can be used to construct and execute a Contract Call Local Query.

func (*ContractCallQuery) Execute

func (q *ContractCallQuery) Execute(client *Client) (ContractFunctionResult, error)

Execute executes the Query with the provided client

func (*ContractCallQuery) GetContractID

func (q *ContractCallQuery) GetContractID() ContractID

GetContractID returns the contract instance to call

func (*ContractCallQuery) GetCost

func (q *ContractCallQuery) GetCost(client *Client) (Hbar, error)

func (*ContractCallQuery) GetFunctionParameters

func (q *ContractCallQuery) GetFunctionParameters() []byte

GetFunctionParameters returns the function parameters as their raw bytes.

func (*ContractCallQuery) GetGas

func (q *ContractCallQuery) GetGas() uint64

GetGas returns the amount of gas to use for the call.

func (*ContractCallQuery) GetGrpcDeadline added in v2.34.0

func (e *ContractCallQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractCallQuery) GetLogLevel added in v2.34.0

func (e *ContractCallQuery) GetLogLevel() *LogLevel

func (*ContractCallQuery) GetMaxBackoff added in v2.1.16

func (e *ContractCallQuery) GetMaxBackoff() time.Duration

func (*ContractCallQuery) GetMaxRetry added in v2.34.0

func (e *ContractCallQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractCallQuery) GetMinBackoff added in v2.1.16

func (e *ContractCallQuery) GetMinBackoff() time.Duration

func (*ContractCallQuery) GetNodeAccountIDs

func (e *ContractCallQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ContractCallQuery) GetSenderID added in v2.14.0

func (q *ContractCallQuery) GetSenderID() AccountID

GetSenderID returns the AccountID that is the "sender."

func (*ContractCallQuery) SetContractID

func (q *ContractCallQuery) SetContractID(contractID ContractID) *ContractCallQuery

SetContractID sets the contract instance to call

func (*ContractCallQuery) SetFunction

SetFunction sets which function to call, and the ContractFunctionParams to pass to the function

func (*ContractCallQuery) SetFunctionParameters

func (q *ContractCallQuery) SetFunctionParameters(byteArray []byte) *ContractCallQuery

SetFunctionParameters sets the function parameters as their raw bytes.

func (*ContractCallQuery) SetGas

func (q *ContractCallQuery) SetGas(gas uint64) *ContractCallQuery

SetGas sets the amount of gas to use for the call. All of the gas offered will be charged for.

func (*ContractCallQuery) SetGrpcDeadline added in v2.11.0

func (q *ContractCallQuery) SetGrpcDeadline(deadline *time.Duration) *ContractCallQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractCallQuery) SetLogLevel added in v2.25.0

func (q *ContractCallQuery) SetLogLevel(level LogLevel) *ContractCallQuery

func (*ContractCallQuery) SetMaxBackoff added in v2.1.16

func (q *ContractCallQuery) SetMaxBackoff(max time.Duration) *ContractCallQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ContractCallQuery) SetMaxQueryPayment

func (q *ContractCallQuery) SetMaxQueryPayment(maxPayment Hbar) *ContractCallQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ContractCallQuery) SetMaxResultSize

func (q *ContractCallQuery) SetMaxResultSize(size uint64) *ContractCallQuery

Deprecated

func (*ContractCallQuery) SetMaxRetry added in v2.1.2

func (q *ContractCallQuery) SetMaxRetry(count int) *ContractCallQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*ContractCallQuery) SetMinBackoff added in v2.1.16

func (q *ContractCallQuery) SetMinBackoff(min time.Duration) *ContractCallQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ContractCallQuery) SetNodeAccountIDs

func (q *ContractCallQuery) SetNodeAccountIDs(accountID []AccountID) *ContractCallQuery

SetNodeAccountIDs sets the _Node AccountID for this ContractCallQuery.

func (*ContractCallQuery) SetPaymentTransactionID added in v2.11.0

func (q *ContractCallQuery) SetPaymentTransactionID(transactionID TransactionID) *ContractCallQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*ContractCallQuery) SetQueryPayment

func (q *ContractCallQuery) SetQueryPayment(paymentAmount Hbar) *ContractCallQuery

SetQueryPayment sets the payment amount for this Query.

func (*ContractCallQuery) SetSenderID added in v2.14.0

func (q *ContractCallQuery) SetSenderID(id AccountID) *ContractCallQuery

SetSenderID The account that is the "sender." If not present it is the accountId from the transactionId. Typically a different value than specified in the transactionId requires a valid signature over either the hedera transaction or foreign transaction data.

type ContractCreateFlow added in v2.11.0

type ContractCreateFlow struct {
	Transaction
	// contains filtered or unexported fields
}

func NewContractCreateFlow added in v2.11.0

func NewContractCreateFlow() *ContractCreateFlow

NewContractCreateFlow creates a new ContractCreateFlow transaction builder object.

func (*ContractCreateFlow) Execute added in v2.11.0

func (tx *ContractCreateFlow) Execute(client *Client) (TransactionResponse, error)

func (*ContractCreateFlow) GetAdminKey added in v2.11.0

func (tx *ContractCreateFlow) GetAdminKey() Key

GetAdminKey returns the admin key of the contract.

func (*ContractCreateFlow) GetAutoRenewAccountID added in v2.14.0

func (tx *ContractCreateFlow) GetAutoRenewAccountID() AccountID

GetAutoRenewAccountID returns the account to charge for auto-renewal of this contract.

func (*ContractCreateFlow) GetAutoRenewPeriod added in v2.11.0

func (tx *ContractCreateFlow) GetAutoRenewPeriod() time.Duration

GetAutoRenewPeriod returns the period that the instance will charge its account every this many seconds to renew.

func (*ContractCreateFlow) GetBytecode added in v2.11.0

func (tx *ContractCreateFlow) GetBytecode() string

GetBytecode returns the hex-encoded bytecode of the contract.

func (*ContractCreateFlow) GetConstructorParameters added in v2.11.0

func (tx *ContractCreateFlow) GetConstructorParameters() []byte

func (*ContractCreateFlow) GetContractMemo added in v2.11.0

func (tx *ContractCreateFlow) GetContractMemo() string

Gets the memo to be associated with this contract.

func (*ContractCreateFlow) GetGas added in v2.11.0

func (tx *ContractCreateFlow) GetGas() int64

GetGas returns the gas to run the constructor.

func (*ContractCreateFlow) GetGrpcDeadline added in v2.34.0

func (e *ContractCreateFlow) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractCreateFlow) GetInitialBalance added in v2.11.0

func (tx *ContractCreateFlow) GetInitialBalance() Hbar

GetInitialBalance returns the initial number of hbars to put into the cryptocurrency account associated with and owned by the smart contract.

func (*ContractCreateFlow) GetLogLevel added in v2.34.0

func (e *ContractCreateFlow) GetLogLevel() *LogLevel

func (*ContractCreateFlow) GetMaxAutomaticTokenAssociations added in v2.14.0

func (tx *ContractCreateFlow) GetMaxAutomaticTokenAssociations() int32

GetMaxAutomaticTokenAssociations returns the maximum number of tokens that this contract can be automatically associated with.

func (*ContractCreateFlow) GetMaxBackoff added in v2.34.0

func (e *ContractCreateFlow) GetMaxBackoff() time.Duration

func (*ContractCreateFlow) GetMaxChunks added in v2.17.6

func (tx *ContractCreateFlow) GetMaxChunks() uint64

GetMaxChunks returns the maximum number of chunks that the contract bytecode can be split into.

func (*ContractCreateFlow) GetMaxRetry added in v2.34.0

func (e *ContractCreateFlow) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractCreateFlow) GetMinBackoff added in v2.34.0

func (e *ContractCreateFlow) GetMinBackoff() time.Duration

func (*ContractCreateFlow) GetNodeAccountIDs added in v2.11.0

func (tx *ContractCreateFlow) GetNodeAccountIDs() []AccountID

GetNodeAccountIDs returns the node AccountID for this ContractCreateFlow.

func (*ContractCreateFlow) GetProxyAccountID added in v2.11.0

func (tx *ContractCreateFlow) GetProxyAccountID() AccountID

Deprecated

func (*ContractCreateFlow) SetAdminKey added in v2.11.0

func (tx *ContractCreateFlow) SetAdminKey(adminKey Key) *ContractCreateFlow

Sets the state of the instance and its fields can be modified arbitrarily if this key signs a transaction to modify it. If this is null, then such modifications are not possible, and there is no administrator that can override the normal operation of this smart contract instance. Note that if it is created with no admin keys, then there is no administrator to authorize changing the admin keys, so there can never be any admin keys for that instance.

func (*ContractCreateFlow) SetAutoRenewAccountID added in v2.14.0

func (tx *ContractCreateFlow) SetAutoRenewAccountID(id AccountID) *ContractCreateFlow

SetAutoRenewAccountID An account to charge for auto-renewal of this contract. If not set, or set to an account with zero hbar balance, the contract's own hbar balance will be used to cover auto-renewal fees.

func (*ContractCreateFlow) SetAutoRenewPeriod added in v2.11.0

func (tx *ContractCreateFlow) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *ContractCreateFlow

SetAutoRenewPeriod sets the period that the instance will charge its account every this many seconds to renew.

func (*ContractCreateFlow) SetBytecode added in v2.11.0

func (tx *ContractCreateFlow) SetBytecode(bytecode []byte) *ContractCreateFlow

SetBytecode sets the bytecode of the contract in raw bytes.

func (*ContractCreateFlow) SetBytecodeWithString added in v2.11.0

func (tx *ContractCreateFlow) SetBytecodeWithString(bytecode string) *ContractCreateFlow

SetBytecodeWithString sets the bytecode of the contract in hex-encoded string format.

func (*ContractCreateFlow) SetConstructorParameters added in v2.11.0

func (tx *ContractCreateFlow) SetConstructorParameters(params *ContractFunctionParameters) *ContractCreateFlow

Sets the constructor parameters

func (*ContractCreateFlow) SetConstructorParametersRaw added in v2.11.0

func (tx *ContractCreateFlow) SetConstructorParametersRaw(params []byte) *ContractCreateFlow

Sets the constructor parameters as their raw bytes.

func (*ContractCreateFlow) SetContractMemo added in v2.11.0

func (tx *ContractCreateFlow) SetContractMemo(memo string) *ContractCreateFlow

Sets the memo to be associated with this contract.

func (*ContractCreateFlow) SetGas added in v2.11.0

func (tx *ContractCreateFlow) SetGas(gas int64) *ContractCreateFlow

SetGas sets the gas to run the constructor.

func (*ContractCreateFlow) SetGrpcDeadline added in v2.34.0

func (e *ContractCreateFlow) SetGrpcDeadline(deadline *time.Duration) *executable

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractCreateFlow) SetInitialBalance added in v2.11.0

func (tx *ContractCreateFlow) SetInitialBalance(initialBalance Hbar) *ContractCreateFlow

SetInitialBalance sets the initial number of hbars to put into the cryptocurrency account associated with and owned by the smart contract.

func (*ContractCreateFlow) SetLogLevel added in v2.34.0

func (e *ContractCreateFlow) SetLogLevel(level LogLevel) *executable

func (*ContractCreateFlow) SetMaxAutomaticTokenAssociations added in v2.14.0

func (tx *ContractCreateFlow) SetMaxAutomaticTokenAssociations(max int32) *ContractCreateFlow

SetMaxAutomaticTokenAssociations The maximum number of tokens that this contract can be automatically associated with (i.e., receive air-drops from).

func (*ContractCreateFlow) SetMaxBackoff added in v2.34.0

func (e *ContractCreateFlow) SetMaxBackoff(max time.Duration) *executable

func (*ContractCreateFlow) SetMaxChunks added in v2.17.6

func (tx *ContractCreateFlow) SetMaxChunks(max uint64) *ContractCreateFlow

SetMaxChunks sets the maximum number of chunks that the contract bytecode can be split into.

func (*ContractCreateFlow) SetMaxRetry added in v2.34.0

func (e *ContractCreateFlow) SetMaxRetry(max int) *executable

func (*ContractCreateFlow) SetMinBackoff added in v2.34.0

func (e *ContractCreateFlow) SetMinBackoff(min time.Duration) *executable

func (*ContractCreateFlow) SetNodeAccountIDs added in v2.11.0

func (tx *ContractCreateFlow) SetNodeAccountIDs(nodeID []AccountID) *ContractCreateFlow

SetNodeAccountIDs sets the node AccountID for this ContractCreateFlow.

func (*ContractCreateFlow) SetProxyAccountID added in v2.11.0

func (tx *ContractCreateFlow) SetProxyAccountID(proxyAccountID AccountID) *ContractCreateFlow

Deprecated

type ContractCreateTransaction

type ContractCreateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

ContractCreateTransaction which is used to start a new smart contract instance. After the instance is created, the ContractID for it is in the receipt, and can be retrieved by the Record or with a GetByKey query. The instance will run the bytecode, either stored in a previously created file or in the transaction body itself for small contracts.

func NewContractCreateTransaction

func NewContractCreateTransaction() *ContractCreateTransaction

NewContractCreateTransaction creates ContractCreateTransaction which is used to start a new smart contract instance. After the instance is created, the ContractID for it is in the receipt, and can be retrieved by the Record or with a GetByKey query. The instance will run the bytecode, either stored in a previously created file or in the transaction body itself for small contracts.

func (*ContractCreateTransaction) AddSignature added in v2.1.3

func (tx *ContractCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *ContractCreateTransaction

AddSignature adds a signature to the transaction.

func (*ContractCreateTransaction) Execute

func (*ContractCreateTransaction) Freeze

func (*ContractCreateTransaction) FreezeWith

func (*ContractCreateTransaction) GetAdminKey

func (tx *ContractCreateTransaction) GetAdminKey() (Key, error)

GetAdminKey returns the key that can sign to modify the state of the instance and its fields can be modified arbitrarily if this key signs a transaction

func (*ContractCreateTransaction) GetAutoRenewAccountID added in v2.14.0

func (tx *ContractCreateTransaction) GetAutoRenewAccountID() AccountID

GetAutoRenewAccountID returns the account to be used at the end of the auto renewal period

func (*ContractCreateTransaction) GetAutoRenewPeriod

func (tx *ContractCreateTransaction) GetAutoRenewPeriod() time.Duration

func (*ContractCreateTransaction) GetBytecode added in v2.14.0

func (tx *ContractCreateTransaction) GetBytecode() []byte

GetBytecode returns the bytecode for the contract.

func (*ContractCreateTransaction) GetBytecodeFileID

func (tx *ContractCreateTransaction) GetBytecodeFileID() FileID

GetBytecodeFileID returns the FileID of the file containing the contract's bytecode.

func (*ContractCreateTransaction) GetConstructorParameters

func (tx *ContractCreateTransaction) GetConstructorParameters() []byte

GetConstructorParameters returns the constructor parameters

func (*ContractCreateTransaction) GetContractMemo

func (tx *ContractCreateTransaction) GetContractMemo() string

GetContractMemo returns the memo associated with this contract.

func (*ContractCreateTransaction) GetDeclineStakingReward added in v2.16.0

func (tx *ContractCreateTransaction) GetDeclineStakingReward() bool

GetDeclineStakingReward returns if the contract should decline to pay the account's staking revenue.

func (*ContractCreateTransaction) GetGas

func (tx *ContractCreateTransaction) GetGas() uint64

GetGas returns the gas to run the constructor.

func (*ContractCreateTransaction) GetGrpcDeadline added in v2.34.0

func (e *ContractCreateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractCreateTransaction) GetInitialBalance

func (tx *ContractCreateTransaction) GetInitialBalance() Hbar

GetInitialBalance gets the initial number of Hbar in the account

func (*ContractCreateTransaction) GetLogLevel added in v2.34.0

func (e *ContractCreateTransaction) GetLogLevel() *LogLevel

func (*ContractCreateTransaction) GetMaxAutomaticTokenAssociations added in v2.14.0

func (tx *ContractCreateTransaction) GetMaxAutomaticTokenAssociations() int32

GetMaxAutomaticTokenAssociations returns the maximum number of tokens that this contract can be automatically associated

func (*ContractCreateTransaction) GetMaxBackoff added in v2.1.16

func (e *ContractCreateTransaction) GetMaxBackoff() time.Duration

func (*ContractCreateTransaction) GetMaxRetry added in v2.34.0

func (e *ContractCreateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractCreateTransaction) GetMinBackoff added in v2.1.16

func (e *ContractCreateTransaction) GetMinBackoff() time.Duration

func (*ContractCreateTransaction) GetNodeAccountIDs

func (e *ContractCreateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ContractCreateTransaction) GetProxyAccountID

func (tx *ContractCreateTransaction) GetProxyAccountID() AccountID

Deprecated

func (*ContractCreateTransaction) GetStakedAccountID added in v2.16.0

func (tx *ContractCreateTransaction) GetStakedAccountID() AccountID

GetStakedAccountID returns the account ID of the account to which this contract is staked.

func (*ContractCreateTransaction) GetStakedNodeID added in v2.16.0

func (tx *ContractCreateTransaction) GetStakedNodeID() int64

GetStakedNodeID returns the node ID of the node to which this contract is staked.

func (*ContractCreateTransaction) Schedule added in v2.1.5

func (*ContractCreateTransaction) SetAdminKey

func (tx *ContractCreateTransaction) SetAdminKey(adminKey Key) *ContractCreateTransaction

*

  • Sets the state of the instance and its fields can be modified arbitrarily if this key signs a transaction
  • to modify it. If this is null, then such modifications are not possible, and there is no administrator
  • that can override the normal operation of this smart contract instance. Note that if it is created with no
  • admin keys, then there is no administrator to authorize changing the admin keys, so
  • there can never be any admin keys for that instance.

func (*ContractCreateTransaction) SetAutoRenewAccountID added in v2.14.0

func (tx *ContractCreateTransaction) SetAutoRenewAccountID(id AccountID) *ContractCreateTransaction

SetAutoRenewAccountID An account to charge for auto-renewal of this contract. If not set, or set to an account with zero hbar balance, the contract's own hbar balance will be used to cover auto-renewal fees.

func (*ContractCreateTransaction) SetAutoRenewPeriod

func (tx *ContractCreateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *ContractCreateTransaction

SetAutoRenewPeriod sets the time duration for when account is charged to extend its expiration date. When the account is created, the payer account is charged enough hbars so that the new account will not expire for the next auto renew period. When it reaches the expiration time, the new account will then be automatically charged to renew for another auto renew period. If it does not have enough hbars to renew for that long, then the remaining hbars are used to extend its expiration as long as possible. If it is has a zero balance when it expires, then it is deleted.

func (*ContractCreateTransaction) SetBytecode added in v2.14.0

func (tx *ContractCreateTransaction) SetBytecode(code []byte) *ContractCreateTransaction

SetBytecode If it is small then it may either be stored as a hex encoded file or as a binary encoded field as part of the transaction.

func (*ContractCreateTransaction) SetBytecodeFileID

func (tx *ContractCreateTransaction) SetBytecodeFileID(byteCodeFileID FileID) *ContractCreateTransaction

SetBytecodeFileID If the initcode is large (> 5K) then it must be stored in a file as hex encoded ascii.

func (*ContractCreateTransaction) SetConstructorParameters

SetConstructorParameters Sets the constructor parameters

func (*ContractCreateTransaction) SetConstructorParametersRaw

func (tx *ContractCreateTransaction) SetConstructorParametersRaw(params []byte) *ContractCreateTransaction

SetConstructorParametersRaw Sets the constructor parameters as their raw bytes.

func (*ContractCreateTransaction) SetContractMemo

func (tx *ContractCreateTransaction) SetContractMemo(memo string) *ContractCreateTransaction

SetContractMemo Sets the memo to be associated with this contract.

func (*ContractCreateTransaction) SetDeclineStakingReward added in v2.16.0

func (tx *ContractCreateTransaction) SetDeclineStakingReward(decline bool) *ContractCreateTransaction

SetDeclineStakingReward sets if the contract should decline to pay the account's staking revenue.

func (*ContractCreateTransaction) SetGas

Sets the gas to run the constructor.

func (*ContractCreateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *ContractCreateTransaction) SetGrpcDeadline(deadline *time.Duration) *ContractCreateTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractCreateTransaction) SetInitialBalance

func (tx *ContractCreateTransaction) SetInitialBalance(initialBalance Hbar) *ContractCreateTransaction

SetInitialBalance sets the initial number of Hbar to put into the account

func (*ContractCreateTransaction) SetLogLevel added in v2.25.0

func (*ContractCreateTransaction) SetMaxAutomaticTokenAssociations added in v2.14.0

func (tx *ContractCreateTransaction) SetMaxAutomaticTokenAssociations(max int32) *ContractCreateTransaction

SetMaxAutomaticTokenAssociations The maximum number of tokens that this contract can be automatically associated with (i.e., receive air-drops from).

func (*ContractCreateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ContractCreateTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*ContractCreateTransaction) SetMaxTransactionFee

func (tx *ContractCreateTransaction) SetMaxTransactionFee(fee Hbar) *ContractCreateTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*ContractCreateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ContractCreateTransaction) SetNodeAccountIDs

func (tx *ContractCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *ContractCreateTransaction

SetNodeAccountIDs sets the _Node AccountID for this ContractCreateTransaction.

func (*ContractCreateTransaction) SetProxyAccountID

func (tx *ContractCreateTransaction) SetProxyAccountID(proxyAccountID AccountID) *ContractCreateTransaction

Deprecated SetProxyAccountID sets the ID of the account to which this account is proxy staked. If proxyAccountID is not set, is an invalID account, or is an account that isn't a _Node, then this account is automatically proxy staked to a _Node chosen by the _Network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a _Node, then it will behave as if proxyAccountID was not set.

func (*ContractCreateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *ContractCreateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *ContractCreateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*ContractCreateTransaction) SetStakedAccountID added in v2.16.0

SetStakedAccountID sets the account ID of the account to which this contract is staked.

func (*ContractCreateTransaction) SetStakedNodeID added in v2.16.0

SetStakedNodeID sets the node ID of the node to which this contract is staked.

func (*ContractCreateTransaction) SetTransactionID

func (tx *ContractCreateTransaction) SetTransactionID(transactionID TransactionID) *ContractCreateTransaction

SetTransactionID sets the TransactionID for this ContractCreateTransaction.

func (*ContractCreateTransaction) SetTransactionMemo

func (tx *ContractCreateTransaction) SetTransactionMemo(memo string) *ContractCreateTransaction

SetTransactionMemo sets the memo for this ContractCreateTransaction.

func (*ContractCreateTransaction) SetTransactionValidDuration

func (tx *ContractCreateTransaction) SetTransactionValidDuration(duration time.Duration) *ContractCreateTransaction

SetTransactionValidDuration sets the valid duration for this ContractCreateTransaction.

func (*ContractCreateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*ContractCreateTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*ContractCreateTransaction) SignWithOperator

func (tx *ContractCreateTransaction) SignWithOperator(
	client *Client,
) (*ContractCreateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type ContractDeleteTransaction

type ContractDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

ContractDeleteTransaction marks a contract as deleted and transfers its remaining hBars, if any, to a designated receiver. After a contract is deleted, it can no longer be called.

func NewContractDeleteTransaction

func NewContractDeleteTransaction() *ContractDeleteTransaction

NewContractDeleteTransaction creates ContractDeleteTransaction which marks a contract as deleted and transfers its remaining hBars, if any, to a designated receiver. After a contract is deleted, it can no longer be called.

func (*ContractDeleteTransaction) AddSignature added in v2.1.3

func (tx *ContractDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *ContractDeleteTransaction

func (*ContractDeleteTransaction) Execute

func (*ContractDeleteTransaction) Freeze

func (*ContractDeleteTransaction) FreezeWith

func (*ContractDeleteTransaction) GetContractID

func (tx *ContractDeleteTransaction) GetContractID() ContractID

Returns the contract ID which will be deleted.

func (*ContractDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *ContractDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractDeleteTransaction) GetLogLevel added in v2.34.0

func (e *ContractDeleteTransaction) GetLogLevel() *LogLevel

func (*ContractDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *ContractDeleteTransaction) GetMaxBackoff() time.Duration

func (*ContractDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *ContractDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *ContractDeleteTransaction) GetMinBackoff() time.Duration

func (*ContractDeleteTransaction) GetNodeAccountIDs

func (e *ContractDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ContractDeleteTransaction) GetPermanentRemoval added in v2.14.0

func (tx *ContractDeleteTransaction) GetPermanentRemoval() bool

GetPermanentRemoval returns true if this is a "synthetic" system transaction.

func (*ContractDeleteTransaction) GetTransferAccountID

func (tx *ContractDeleteTransaction) GetTransferAccountID() AccountID

Returns the account ID which will receive all remaining hbars.

func (*ContractDeleteTransaction) GetTransferContractID

func (tx *ContractDeleteTransaction) GetTransferContractID() ContractID

Returns the contract ID which will receive all remaining hbars.

func (*ContractDeleteTransaction) Schedule added in v2.1.5

func (*ContractDeleteTransaction) SetContractID

func (tx *ContractDeleteTransaction) SetContractID(contractID ContractID) *ContractDeleteTransaction

Sets the contract ID which will be deleted.

func (*ContractDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *ContractDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *ContractDeleteTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractDeleteTransaction) SetLogLevel added in v2.25.0

func (*ContractDeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ContractDeleteTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*ContractDeleteTransaction) SetMaxTransactionFee

func (tx *ContractDeleteTransaction) SetMaxTransactionFee(fee Hbar) *ContractDeleteTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*ContractDeleteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ContractDeleteTransaction) SetNodeAccountIDs

func (tx *ContractDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *ContractDeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetPermanentRemoval added in v2.14.0

func (tx *ContractDeleteTransaction) SetPermanentRemoval(remove bool) *ContractDeleteTransaction

SetPermanentRemoval If set to true, means this is a "synthetic" system transaction being used to alert mirror nodes that the contract is being permanently removed from the ledger. IMPORTANT: User transactions cannot set this field to true, as permanent removal is always managed by the ledger itself. Any ContractDeleteTransaction submitted to HAPI with permanent_removal=true will be rejected with precheck status PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION.

func (*ContractDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *ContractDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *ContractDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*ContractDeleteTransaction) SetTransactionID

func (tx *ContractDeleteTransaction) SetTransactionID(transactionID TransactionID) *ContractDeleteTransaction

SetTransactionID sets the TransactionID for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetTransactionMemo

func (tx *ContractDeleteTransaction) SetTransactionMemo(memo string) *ContractDeleteTransaction

SetTransactionMemo sets the memo for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetTransactionValidDuration

func (tx *ContractDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *ContractDeleteTransaction

SetTransactionValidDuration sets the valid duration for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetTransferAccountID

func (tx *ContractDeleteTransaction) SetTransferAccountID(accountID AccountID) *ContractDeleteTransaction

Sets the account ID which will receive all remaining hbars.

func (*ContractDeleteTransaction) SetTransferContractID

func (tx *ContractDeleteTransaction) SetTransferContractID(transferContactID ContractID) *ContractDeleteTransaction

Sets the contract ID which will receive all remaining hbars.

func (*ContractDeleteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*ContractDeleteTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*ContractDeleteTransaction) SignWithOperator

func (tx *ContractDeleteTransaction) SignWithOperator(
	client *Client,
) (*ContractDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type ContractExecuteTransaction

type ContractExecuteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

ContractExecuteTransaction calls a function of the given smart contract instance, giving it ContractFuncionParams as its inputs. it can use the given amount of gas, and any unspent gas will be refunded to the paying account.

If tx function stores information, it is charged gas to store it. There is a fee in hbars to maintain that storage until the expiration time, and that fee is added as part of the transaction fee.

For a cheaper but more limited _Method to call functions, see ContractCallQuery.

func NewContractExecuteTransaction

func NewContractExecuteTransaction() *ContractExecuteTransaction

NewContractExecuteTransaction creates a ContractExecuteTransaction transaction which can be used to construct and execute a Contract Call Transaction.

func (*ContractExecuteTransaction) AddSignature added in v2.1.3

func (tx *ContractExecuteTransaction) AddSignature(publicKey PublicKey, signature []byte) *ContractExecuteTransaction

AddSignature adds a signature to the transaction.

func (*ContractExecuteTransaction) Execute

func (*ContractExecuteTransaction) Freeze

func (*ContractExecuteTransaction) FreezeWith

func (*ContractExecuteTransaction) GetContractID

func (tx *ContractExecuteTransaction) GetContractID() ContractID

GetContractID returns the contract instance to call.

func (*ContractExecuteTransaction) GetFunctionParameters

func (tx *ContractExecuteTransaction) GetFunctionParameters() []byte

GetFunctionParameters returns the function parameters

func (*ContractExecuteTransaction) GetGas added in v2.1.3

func (tx *ContractExecuteTransaction) GetGas() uint64

GetGas returns the maximum amount of gas to use for the call.

func (*ContractExecuteTransaction) GetGrpcDeadline added in v2.34.0

func (e *ContractExecuteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractExecuteTransaction) GetLogLevel added in v2.34.0

func (e *ContractExecuteTransaction) GetLogLevel() *LogLevel

func (*ContractExecuteTransaction) GetMaxBackoff added in v2.1.16

func (e *ContractExecuteTransaction) GetMaxBackoff() time.Duration

func (*ContractExecuteTransaction) GetMaxRetry added in v2.34.0

func (e *ContractExecuteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractExecuteTransaction) GetMinBackoff added in v2.1.16

func (e *ContractExecuteTransaction) GetMinBackoff() time.Duration

func (*ContractExecuteTransaction) GetNodeAccountIDs

func (e *ContractExecuteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ContractExecuteTransaction) GetPayableAmount

func (tx *ContractExecuteTransaction) GetPayableAmount() Hbar

GetPayableAmount returns the amount of Hbar sent (the function must be payable if this is nonzero)

func (*ContractExecuteTransaction) Schedule added in v2.1.5

func (*ContractExecuteTransaction) SetContractID

func (tx *ContractExecuteTransaction) SetContractID(contractID ContractID) *ContractExecuteTransaction

SetContractID sets the contract instance to call.

func (*ContractExecuteTransaction) SetFunction

SetFunction sets which function to call, and the ContractFunctionParams to pass to the function

func (*ContractExecuteTransaction) SetFunctionParameters

func (tx *ContractExecuteTransaction) SetFunctionParameters(params []byte) *ContractExecuteTransaction

SetFunctionParameters sets the function parameters

func (*ContractExecuteTransaction) SetGas

SetGas sets the maximum amount of gas to use for the call.

func (*ContractExecuteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *ContractExecuteTransaction) SetGrpcDeadline(deadline *time.Duration) *ContractExecuteTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractExecuteTransaction) SetLogLevel added in v2.25.0

func (*ContractExecuteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ContractExecuteTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*ContractExecuteTransaction) SetMaxTransactionFee

func (tx *ContractExecuteTransaction) SetMaxTransactionFee(fee Hbar) *ContractExecuteTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*ContractExecuteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ContractExecuteTransaction) SetNodeAccountIDs

func (tx *ContractExecuteTransaction) SetNodeAccountIDs(nodeID []AccountID) *ContractExecuteTransaction

SetNodeAccountIDs sets the _Node AccountID for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) SetPayableAmount

func (tx *ContractExecuteTransaction) SetPayableAmount(amount Hbar) *ContractExecuteTransaction

SetPayableAmount sets the amount of Hbar sent (the function must be payable if this is nonzero)

func (*ContractExecuteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *ContractExecuteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *ContractExecuteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*ContractExecuteTransaction) SetTransactionID

func (tx *ContractExecuteTransaction) SetTransactionID(transactionID TransactionID) *ContractExecuteTransaction

SetTransactionID sets the TransactionID for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) SetTransactionMemo

func (tx *ContractExecuteTransaction) SetTransactionMemo(memo string) *ContractExecuteTransaction

SetTransactionMemo sets the memo for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) SetTransactionValidDuration

func (tx *ContractExecuteTransaction) SetTransactionValidDuration(duration time.Duration) *ContractExecuteTransaction

SetTransactionValidDuration sets the valid duration for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*ContractExecuteTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*ContractExecuteTransaction) SignWithOperator

func (tx *ContractExecuteTransaction) SignWithOperator(
	client *Client,
) (*ContractExecuteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type ContractFunctionParameters

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

ContractFunctionParameters is a struct which builds a solidity function call Use the builder methods `Add<Type>()` to add a parameter. Not all solidity types are supported out of the box, but the most common types are. The larger variants of number types require the parameter to be `[]byte`. This is a little unintuitive, so here is an example of how to use those larger number variants using "github.com/ethereum/go-ethereum/common/math" and "math/big" ``` AddUint88(math.PaddedBigBytes(n, 88 / 8)) ``` If you're using `Uint256` specifically you can opt into using ``` AddUin256(math.PaddedBigBytes(math.U256(n), 32)) ```

func NewContractFunctionParameters

func NewContractFunctionParameters() *ContractFunctionParameters

Builder for encoding parameters for a Solidity contract constructor/function call.

func (*ContractFunctionParameters) AddAddress

func (contract *ContractFunctionParameters) AddAddress(value string) (*ContractFunctionParameters, error)

AddAddress adds an address parameter to the function call

func (*ContractFunctionParameters) AddAddressArray

func (contract *ContractFunctionParameters) AddAddressArray(value []string) (*ContractFunctionParameters, error)

AddAddressArray adds an address array parameter to the function call

func (*ContractFunctionParameters) AddBool

AddBool adds a bool parameter to the function call

func (*ContractFunctionParameters) AddBytes

func (contract *ContractFunctionParameters) AddBytes(value []byte) *ContractFunctionParameters

AddBytes adds a bytes parameter to the function call

func (*ContractFunctionParameters) AddBytes32

func (contract *ContractFunctionParameters) AddBytes32(value [32]byte) *ContractFunctionParameters

AddBytes32 adds a bytes32 parameter to the function call

func (*ContractFunctionParameters) AddBytes32Array

func (contract *ContractFunctionParameters) AddBytes32Array(value [][]byte) *ContractFunctionParameters

AddBytes32Array adds a bytes32 array parameter to the function call

func (*ContractFunctionParameters) AddBytesArray

func (contract *ContractFunctionParameters) AddBytesArray(value [][]byte) *ContractFunctionParameters

AddBytesArray adds a bytes array parameter to the function call

func (*ContractFunctionParameters) AddFunction

func (contract *ContractFunctionParameters) AddFunction(address string, selector ContractFunctionSelector) (*ContractFunctionParameters, error)

AddFunction adds a Solidity function reference and a function selector.

func (*ContractFunctionParameters) AddIn88BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddIn88BigInt(value *big.Int) *ContractFunctionParameters

AddInt88BigInt adds an int88parameter to the function call

func (*ContractFunctionParameters) AddInt104 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt104(value []byte) *ContractFunctionParameters

AddInt104 adds an int104 parameter to the function call

func (*ContractFunctionParameters) AddInt104BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt104BigInt(value *big.Int) *ContractFunctionParameters

AddInt104BigInt adds an int104 parameter to the function call

func (*ContractFunctionParameters) AddInt112 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt112(value []byte) *ContractFunctionParameters

AddInt112 adds an int112 parameter to the function call

func (*ContractFunctionParameters) AddInt112BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt112BigInt(value *big.Int) *ContractFunctionParameters

AddInt112BigInt adds an int112 parameter to the function call

func (*ContractFunctionParameters) AddInt120 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt120(value []byte) *ContractFunctionParameters

AddInt120 adds an int120 parameter to the function call

func (*ContractFunctionParameters) AddInt120BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt120BigInt(value *big.Int) *ContractFunctionParameters

AddInt120BigInt adds an int120parameter to the function call

func (*ContractFunctionParameters) AddInt128 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt128(value []byte) *ContractFunctionParameters

AddInt128 adds an int128 parameter to the function call

func (*ContractFunctionParameters) AddInt128BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt128BigInt(value *big.Int) *ContractFunctionParameters

AddInt128BigInt adds an int128parameter to the function call

func (*ContractFunctionParameters) AddInt136 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt136(value []byte) *ContractFunctionParameters

AddInt136 adds an int136 parameter to the function call

func (*ContractFunctionParameters) AddInt136BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt136BigInt(value *big.Int) *ContractFunctionParameters

AddInt136BigInt adds an int136 parameter to the function call

func (*ContractFunctionParameters) AddInt144 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt144(value []byte) *ContractFunctionParameters

AddInt144 adds an int144 parameter to the function call

func (*ContractFunctionParameters) AddInt144BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt144BigInt(value *big.Int) *ContractFunctionParameters

AddInt144BigInt adds an int144 parameter to the function call

func (*ContractFunctionParameters) AddInt152 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt152(value []byte) *ContractFunctionParameters

AddInt152 adds an int152 parameter to the function call

func (*ContractFunctionParameters) AddInt152BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt152BigInt(value *big.Int) *ContractFunctionParameters

AddInt152BigInt adds an int152 parameter to the function call

func (*ContractFunctionParameters) AddInt16 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt16(value int16) *ContractFunctionParameters

AddInt16 adds an int16 parameter to the function call

func (*ContractFunctionParameters) AddInt160 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt160(value []byte) *ContractFunctionParameters

AddInt160 adds an int160 parameter to the function call

func (*ContractFunctionParameters) AddInt160BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt160BigInt(value *big.Int) *ContractFunctionParameters

AddInt160BigInt adds an int160 parameter to the function call

func (*ContractFunctionParameters) AddInt168 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt168(value []byte) *ContractFunctionParameters

AddInt168 adds an int168 parameter to the function call

func (*ContractFunctionParameters) AddInt168BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt168BigInt(value *big.Int) *ContractFunctionParameters

AddInt168BigInt adds an int168 parameter to the function call

func (*ContractFunctionParameters) AddInt16Array added in v2.12.0

func (contract *ContractFunctionParameters) AddInt16Array(value []int16) *ContractFunctionParameters

AddInt16Array adds an int16 array parameter to the function call

func (*ContractFunctionParameters) AddInt176 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt176(value []byte) *ContractFunctionParameters

AddInt176 adds an int176 parameter to the function call

func (*ContractFunctionParameters) AddInt176BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt176BigInt(value *big.Int) *ContractFunctionParameters

AddInt176BigInt adds an int176 parameter to the function call

func (*ContractFunctionParameters) AddInt184 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt184(value []byte) *ContractFunctionParameters

AddInt184 adds an int184 parameter to the function call

func (*ContractFunctionParameters) AddInt184BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt184BigInt(value *big.Int) *ContractFunctionParameters

AddInt184BigInt adds an int184 parameter to the function call

func (*ContractFunctionParameters) AddInt192 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt192(value []byte) *ContractFunctionParameters

AddInt192 adds an int192 parameter to the function call

func (*ContractFunctionParameters) AddInt192BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt192BigInt(value *big.Int) *ContractFunctionParameters

AddInt192BigInt adds an int192 parameter to the function call

func (*ContractFunctionParameters) AddInt200 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt200(value []byte) *ContractFunctionParameters

AddInt200 adds an int200 parameter to the function call

func (*ContractFunctionParameters) AddInt200BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt200BigInt(value *big.Int) *ContractFunctionParameters

AddInt200BigInt adds an int200 parameter to the function call

func (*ContractFunctionParameters) AddInt208 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt208(value []byte) *ContractFunctionParameters

AddInt208 adds an int208 parameter to the function call

func (*ContractFunctionParameters) AddInt208BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt208BigInt(value *big.Int) *ContractFunctionParameters

AddInt208BigInt adds an int208parameter to the function call

func (*ContractFunctionParameters) AddInt216 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt216(value []byte) *ContractFunctionParameters

AddInt216 adds an int216 parameter to the function call

func (*ContractFunctionParameters) AddInt216BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt216BigInt(value *big.Int) *ContractFunctionParameters

AddInt216BigInt adds an int216 parameter to the function call

func (*ContractFunctionParameters) AddInt224 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt224(value []byte) *ContractFunctionParameters

AddInt224 adds an int224 parameter to the function call

func (*ContractFunctionParameters) AddInt224BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt224BigInt(value *big.Int) *ContractFunctionParameters

AddInt224BigInt adds an int224 parameter to the function call

func (*ContractFunctionParameters) AddInt232 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt232(value []byte) *ContractFunctionParameters

AddInt232 adds an int232 parameter to the function call

func (*ContractFunctionParameters) AddInt232BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt232BigInt(value *big.Int) *ContractFunctionParameters

AddInt232BigInt adds an int232 parameter to the function call

func (*ContractFunctionParameters) AddInt24 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt24(value int32) *ContractFunctionParameters

AddInt24 adds an int24 parameter to the function call

func (*ContractFunctionParameters) AddInt240 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt240(value []byte) *ContractFunctionParameters

AddInt240 adds an int240 parameter to the function call

func (*ContractFunctionParameters) AddInt240BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt240BigInt(value *big.Int) *ContractFunctionParameters

AddInt240BigInt adds an int240 parameter to the function call

func (*ContractFunctionParameters) AddInt248 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt248(value []byte) *ContractFunctionParameters

AddInt248 adds an int248 parameter to the function call

func (*ContractFunctionParameters) AddInt248BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt248BigInt(value *big.Int) *ContractFunctionParameters

AddInt248BigInt adds an int248 parameter to the function call

func (*ContractFunctionParameters) AddInt24Array added in v2.12.0

func (contract *ContractFunctionParameters) AddInt24Array(value []int32) *ContractFunctionParameters

AddInt24Array adds an int24 array parameter to the function call

func (*ContractFunctionParameters) AddInt256

func (contract *ContractFunctionParameters) AddInt256(value []byte) *ContractFunctionParameters

AddInt256 adds an int256 parameter to the function call

func (*ContractFunctionParameters) AddInt256Array

func (contract *ContractFunctionParameters) AddInt256Array(value [][32]byte) *ContractFunctionParameters

AddInt256Array adds an int256 array parameter to the function call

func (*ContractFunctionParameters) AddInt256BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt256BigInt(value *big.Int) *ContractFunctionParameters

AddInt256BigInt adds an int256 parameter to the function call

func (*ContractFunctionParameters) AddInt32

func (contract *ContractFunctionParameters) AddInt32(value int32) *ContractFunctionParameters

AddInt32 adds an int32 parameter to the function call

func (*ContractFunctionParameters) AddInt32Array

func (contract *ContractFunctionParameters) AddInt32Array(value []int32) *ContractFunctionParameters

AddInt32Array adds an int32 array parameter to the function call

func (*ContractFunctionParameters) AddInt40 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt40(value int64) *ContractFunctionParameters

AddInt40 adds an int40 parameter to the function call

func (*ContractFunctionParameters) AddInt48 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt48(value int64) *ContractFunctionParameters

AddInt48 adds an int48 parameter to the function call

func (*ContractFunctionParameters) AddInt56 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt56(value int64) *ContractFunctionParameters

AddInt56 adds an int56 parameter to the function call

func (*ContractFunctionParameters) AddInt64

func (contract *ContractFunctionParameters) AddInt64(value int64) *ContractFunctionParameters

AddInt64 adds an int64 parameter to the function call

func (*ContractFunctionParameters) AddInt64Array

func (contract *ContractFunctionParameters) AddInt64Array(value []int64) *ContractFunctionParameters

AddInt64Array adds an int64 array parameter to the function call

func (*ContractFunctionParameters) AddInt72 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt72(value []byte) *ContractFunctionParameters

AddInt72 adds an int72 parameter to the function call

func (*ContractFunctionParameters) AddInt72BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt72BigInt(value *big.Int) *ContractFunctionParameters

AddInt72BigInt adds an int72parameter to the function call

func (*ContractFunctionParameters) AddInt8

AddInt8 adds an int8 parameter to the function call

func (*ContractFunctionParameters) AddInt80 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt80(value []byte) *ContractFunctionParameters

AddInt80 adds an int80 parameter to the function call

func (*ContractFunctionParameters) AddInt80BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt80BigInt(value *big.Int) *ContractFunctionParameters

AddInt80igInt adds an int80parameter to the function call

func (*ContractFunctionParameters) AddInt88 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt88(value []byte) *ContractFunctionParameters

AddInt88 adds an int88 parameter to the function call

func (*ContractFunctionParameters) AddInt8Array added in v2.12.0

func (contract *ContractFunctionParameters) AddInt8Array(value []int8) *ContractFunctionParameters

AddInt8Array adds an int8 array parameter to the function call

func (*ContractFunctionParameters) AddInt96 added in v2.12.0

func (contract *ContractFunctionParameters) AddInt96(value []byte) *ContractFunctionParameters

AddInt96 adds an int96 parameter to the function call

func (*ContractFunctionParameters) AddInt96BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddInt96BigInt(value *big.Int) *ContractFunctionParameters

AddInt96BigInt adds an int96parameter to the function call

func (*ContractFunctionParameters) AddString

func (contract *ContractFunctionParameters) AddString(value string) *ContractFunctionParameters

AddString ads a string parameter to the function call

func (*ContractFunctionParameters) AddStringArray

func (contract *ContractFunctionParameters) AddStringArray(value []string) *ContractFunctionParameters

AddStringArray adds a string array parameter to the function call

func (*ContractFunctionParameters) AddUint104 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint104(value []byte) *ContractFunctionParameters

AddUint104 adds a uint104 parameter to the function call

func (*ContractFunctionParameters) AddUint104igInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint104igInt(value *big.Int) *ContractFunctionParameters

AddUint104BigInt adds a uint104 parameter to the function call

func (*ContractFunctionParameters) AddUint112 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint112(value []byte) *ContractFunctionParameters

AddUint112 adds a uint112 parameter to the function call

func (*ContractFunctionParameters) AddUint112BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint112BigInt(value *big.Int) *ContractFunctionParameters

AddUint112BigInt adds a uint112 parameter to the function call

func (*ContractFunctionParameters) AddUint120 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint120(value []byte) *ContractFunctionParameters

AddUint120 adds a uint120 parameter to the function call

func (*ContractFunctionParameters) AddUint120BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint120BigInt(value *big.Int) *ContractFunctionParameters

AddUint120BigInt adds a uint120 parameter to the function call

func (*ContractFunctionParameters) AddUint128 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint128(value []byte) *ContractFunctionParameters

AddUint128 adds a uint128 parameter to the function call

func (*ContractFunctionParameters) AddUint128BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint128BigInt(value *big.Int) *ContractFunctionParameters

AddUint128BigInt adds a uint128 parameter to the function call

func (*ContractFunctionParameters) AddUint136 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint136(value []byte) *ContractFunctionParameters

AddUint136 adds a uint136 parameter to the function call

func (*ContractFunctionParameters) AddUint136BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint136BigInt(value *big.Int) *ContractFunctionParameters

AddUint136BigInt adds a uint136 parameter to the function call

func (*ContractFunctionParameters) AddUint144 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint144(value []byte) *ContractFunctionParameters

AddUint144 adds a uint144 parameter to the function call

func (*ContractFunctionParameters) AddUint144BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint144BigInt(value *big.Int) *ContractFunctionParameters

AddUint144BigInt adds a uint144 parameter to the function call

func (*ContractFunctionParameters) AddUint152 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint152(value []byte) *ContractFunctionParameters

AddUint152 adds a uint152 parameter to the function call

func (*ContractFunctionParameters) AddUint152BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint152BigInt(value *big.Int) *ContractFunctionParameters

AddUint152BigInt adds a uint152 parameter to the function call

func (*ContractFunctionParameters) AddUint16 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint16(value uint16) *ContractFunctionParameters

AddUint16 adds a uint16 parameter to the function call

func (*ContractFunctionParameters) AddUint160 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint160(value []byte) *ContractFunctionParameters

AddUint160 adds a uint160 parameter to the function call

func (*ContractFunctionParameters) AddUint160BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint160BigInt(value *big.Int) *ContractFunctionParameters

AddUint160BigInt adds a uint160 parameter to the function call

func (*ContractFunctionParameters) AddUint168 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint168(value []byte) *ContractFunctionParameters

AddUint168 adds a uint168 parameter to the function call

func (*ContractFunctionParameters) AddUint168BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint168BigInt(value *big.Int) *ContractFunctionParameters

AddUint168BigInt adds a uint168 parameter to the function call

func (*ContractFunctionParameters) AddUint176 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint176(value []byte) *ContractFunctionParameters

AddUint176 adds a uint176 parameter to the function call

func (*ContractFunctionParameters) AddUint176BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint176BigInt(value *big.Int) *ContractFunctionParameters

AddUint176BigInt adds a uint176 parameter to the function call

func (*ContractFunctionParameters) AddUint184 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint184(value []byte) *ContractFunctionParameters

AddUint184 adds a uint184 parameter to the function call

func (*ContractFunctionParameters) AddUint184BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint184BigInt(value *big.Int) *ContractFunctionParameters

AddUint184BigInt adds a uint184 parameter to the function call

func (*ContractFunctionParameters) AddUint192 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint192(value []byte) *ContractFunctionParameters

AddUint192 adds a uint192 parameter to the function call

func (*ContractFunctionParameters) AddUint192BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint192BigInt(value *big.Int) *ContractFunctionParameters

AddUint192BigInt adds a uint192 parameter to the function call

func (*ContractFunctionParameters) AddUint200 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint200(value []byte) *ContractFunctionParameters

AddUint200 adds a uint200 parameter to the function call

func (*ContractFunctionParameters) AddUint200BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint200BigInt(value *big.Int) *ContractFunctionParameters

AddUint200BigInt adds a uint200 parameter to the function call

func (*ContractFunctionParameters) AddUint208 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint208(value []byte) *ContractFunctionParameters

AddUint208 adds a uint208 parameter to the function call

func (*ContractFunctionParameters) AddUint208BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint208BigInt(value *big.Int) *ContractFunctionParameters

AddUint208BigInt adds a uint208 parameter to the function call

func (*ContractFunctionParameters) AddUint216 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint216(value []byte) *ContractFunctionParameters

AddUint216 adds a uint216 parameter to the function call

func (*ContractFunctionParameters) AddUint216BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint216BigInt(value *big.Int) *ContractFunctionParameters

AddUint216BigInt adds a uint216 parameter to the function call

func (*ContractFunctionParameters) AddUint224 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint224(value []byte) *ContractFunctionParameters

AddUint224 adds a uint224 parameter to the function call

func (*ContractFunctionParameters) AddUint224BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint224BigInt(value *big.Int) *ContractFunctionParameters

AddUint224BigInt adds a uint224 parameter to the function call

func (*ContractFunctionParameters) AddUint232 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint232(value []byte) *ContractFunctionParameters

AddUint232 adds a uint232 parameter to the function call

func (*ContractFunctionParameters) AddUint232BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint232BigInt(value *big.Int) *ContractFunctionParameters

AddUint232BigInt adds a uint232 parameter to the function call

func (*ContractFunctionParameters) AddUint24 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint24(value uint32) *ContractFunctionParameters

AddUint24 adds a uint24 parameter to the function call

func (*ContractFunctionParameters) AddUint240 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint240(value []byte) *ContractFunctionParameters

AddUint240 adds a uint240 parameter to the function call

func (*ContractFunctionParameters) AddUint240BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint240BigInt(value *big.Int) *ContractFunctionParameters

AddUint240BigInt adds a uint240 parameter to the function call

func (*ContractFunctionParameters) AddUint248 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint248(value []byte) *ContractFunctionParameters

AddUint248 adds a uint248 parameter to the function call

func (*ContractFunctionParameters) AddUint248BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint248BigInt(value *big.Int) *ContractFunctionParameters

AddUint248BigInt adds a uint248 parameter to the function call

func (*ContractFunctionParameters) AddUint256

func (contract *ContractFunctionParameters) AddUint256(value []byte) *ContractFunctionParameters

AddUint256 adds a uint256 parameter to the function call

func (*ContractFunctionParameters) AddUint256Array

func (contract *ContractFunctionParameters) AddUint256Array(value [][32]byte) *ContractFunctionParameters

AddUint256Array adds a uint256 array parameter to the function call

func (*ContractFunctionParameters) AddUint256BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint256BigInt(value *big.Int) *ContractFunctionParameters

AddUint256BigInt adds a uint256 parameter to the function call

func (*ContractFunctionParameters) AddUint32

func (contract *ContractFunctionParameters) AddUint32(value uint32) *ContractFunctionParameters

AddUint32 adds a uint32 parameter to the function call

func (*ContractFunctionParameters) AddUint32Array

func (contract *ContractFunctionParameters) AddUint32Array(value []uint32) *ContractFunctionParameters

AddUint32Array adds a uint32 array parameter to the function call

func (*ContractFunctionParameters) AddUint40 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint40(value uint64) *ContractFunctionParameters

AddUint40 adds a uint40 parameter to the function call

func (*ContractFunctionParameters) AddUint48 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint48(value uint64) *ContractFunctionParameters

AddUint48 adds a uint48 parameter to the function call

func (*ContractFunctionParameters) AddUint56 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint56(value uint64) *ContractFunctionParameters

AddUint56 adds a uint56 parameter to the function call

func (*ContractFunctionParameters) AddUint64

func (contract *ContractFunctionParameters) AddUint64(value uint64) *ContractFunctionParameters

AddUint64 adds a uint64 parameter to the function call

func (*ContractFunctionParameters) AddUint64Array

func (contract *ContractFunctionParameters) AddUint64Array(value []uint64) *ContractFunctionParameters

AddUint64Array adds a uint64 array parameter to the function call

func (*ContractFunctionParameters) AddUint72 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint72(value []byte) *ContractFunctionParameters

AddUint72 adds a uint72 parameter to the function call

func (*ContractFunctionParameters) AddUint72BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint72BigInt(value *big.Int) *ContractFunctionParameters

AddUint72BigInt adds a uint72 parameter to the function call

func (*ContractFunctionParameters) AddUint8

func (contract *ContractFunctionParameters) AddUint8(value uint8) *ContractFunctionParameters

AddUint8 adds a uint8 parameter to the function call

func (*ContractFunctionParameters) AddUint80 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint80(value []byte) *ContractFunctionParameters

AddUint80 adds a uint80 parameter to the function call

func (*ContractFunctionParameters) AddUint80BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint80BigInt(value *big.Int) *ContractFunctionParameters

AddUint80BigInt adds a uint80parameter to the function call

func (*ContractFunctionParameters) AddUint88 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint88(value []byte) *ContractFunctionParameters

AddUint88 adds a uint88 parameter to the function call

func (*ContractFunctionParameters) AddUint88BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint88BigInt(value *big.Int) *ContractFunctionParameters

AddUint88BigInt adds a uint88parameter to the function call

func (*ContractFunctionParameters) AddUint96 added in v2.12.0

func (contract *ContractFunctionParameters) AddUint96(value []byte) *ContractFunctionParameters

AddUint96 adds a uint96 parameter to the function call

func (*ContractFunctionParameters) AddUint96BigInt added in v2.26.0

func (contract *ContractFunctionParameters) AddUint96BigInt(value *big.Int) *ContractFunctionParameters

AddUint96BigInt adds a uint96parameter to the function call

type ContractFunctionResult

type ContractFunctionResult struct {
	// ContractID is the smart contract instance whose function was called
	ContractID *ContractID
	// ContractCallResult is the result returned by the function
	ContractCallResult []byte
	// ErrorMessage is the message returned in the case there was an error during smart contract execution
	ErrorMessage string
	// Bloom is the bloom filter for record
	Bloom []byte
	// GasUsed is the amount of gas used to execute the contract function
	GasUsed uint64
	// LogInfo is the log info for events returned by the function
	LogInfo []ContractLogInfo
	// Deprecated
	CreatedContractIDs []ContractID
	// Deprecated
	ContractStateChanges []ContractStateChange
	EvmAddress           ContractID
	GasAvailable         int64
	Amount               Hbar
	FunctionParameters   []byte
	ContractNonces       []*ContractNonceInfo
}

ContractFunctionResult is a struct which allows users to convert between solidity and Go types, and is typically returned by `ContractCallQuery` and is present in the transaction records of `ContractExecuteTransaction`. Use the methods `Get<Type>()` to get a parameter. Not all solidity types are supported out of the box, but the most common types are. The larger variants of number types return just the bytes for the integer instead of converting to a big int type. To convert those bytes into a usable integer using "github.com/ethereum/go-ethereum/common/math" and "math/big" do the following: ``` contractFunctionResult.GetUint256(<index>) bInt := new(big.Int) bInt.SetBytes(query.GetUint256(0)) ```

func ContractFunctionResultFromBytes added in v2.9.0

func ContractFunctionResultFromBytes(data []byte) (ContractFunctionResult, error)

ContractFunctionResultFromBytes returns a ContractFunctionResult from the protobuf encoded bytes of a ContractFunctionResult

func (ContractFunctionResult) AsBytes

func (result ContractFunctionResult) AsBytes() []byte

AsBytes returns the raw bytes of the ContractCallResult

func (ContractFunctionResult) GetAddress

func (result ContractFunctionResult) GetAddress(index uint64) []byte

GetAddress gets a _Solidity address from the result at the given index

func (ContractFunctionResult) GetBigInt added in v2.26.0

func (result ContractFunctionResult) GetBigInt(index uint64) *big.Int

GetBigInt gets an _Solidity integer from the result at the given index and returns it as a big.Int

func (ContractFunctionResult) GetBool

func (result ContractFunctionResult) GetBool(index uint64) bool

GetBool gets a _Solidity bool from the result at the given index

func (ContractFunctionResult) GetBytes

func (result ContractFunctionResult) GetBytes(index uint64) []byte

GetBytes gets a byte array from the result at the given index

func (ContractFunctionResult) GetBytes32

func (result ContractFunctionResult) GetBytes32(index uint64) []byte

GetBytes32 gets a _Solidity bytes32 from the result at the given index

func (ContractFunctionResult) GetInt104 added in v2.12.0

func (result ContractFunctionResult) GetInt104(index uint64) []byte

GetInt104 gets a _Solidity int104 from the result at the given index

func (ContractFunctionResult) GetInt112 added in v2.12.0

func (result ContractFunctionResult) GetInt112(index uint64) []byte

GetInt112 gets a _Solidity int112 from the result at the given index

func (ContractFunctionResult) GetInt120 added in v2.12.0

func (result ContractFunctionResult) GetInt120(index uint64) []byte

GetInt120 gets a _Solidity int120 from the result at the given index

func (ContractFunctionResult) GetInt128 added in v2.12.0

func (result ContractFunctionResult) GetInt128(index uint64) []byte

GetInt128 gets a _Solidity int128 from the result at the given index

func (ContractFunctionResult) GetInt136 added in v2.12.0

func (result ContractFunctionResult) GetInt136(index uint64) []byte

GetInt136 gets a _Solidity int136 from the result at the given index

func (ContractFunctionResult) GetInt144 added in v2.12.0

func (result ContractFunctionResult) GetInt144(index uint64) []byte

GetInt144 gets a _Solidity int144 from the result at the given index

func (ContractFunctionResult) GetInt152 added in v2.12.0

func (result ContractFunctionResult) GetInt152(index uint64) []byte

GetInt152 gets a _Solidity int152 from the result at the given index

func (ContractFunctionResult) GetInt16 added in v2.12.0

func (result ContractFunctionResult) GetInt16(index uint64) int16

GetInt16 gets a _Solidity int16 from the result at the given index

func (ContractFunctionResult) GetInt160 added in v2.12.0

func (result ContractFunctionResult) GetInt160(index uint64) []byte

GetInt160 gets a _Solidity int160 from the result at the given index

func (ContractFunctionResult) GetInt168 added in v2.12.0

func (result ContractFunctionResult) GetInt168(index uint64) []byte

GetInt168 gets a _Solidity int168 from the result at the given index

func (ContractFunctionResult) GetInt176 added in v2.12.0

func (result ContractFunctionResult) GetInt176(index uint64) []byte

GetInt176 gets a _Solidity int176 from the result at the given index

func (ContractFunctionResult) GetInt184 added in v2.12.0

func (result ContractFunctionResult) GetInt184(index uint64) []byte

GetInt184 gets a _Solidity int184 from the result at the given index

func (ContractFunctionResult) GetInt192 added in v2.12.0

func (result ContractFunctionResult) GetInt192(index uint64) []byte

GetInt192 gets a _Solidity int192 from the result at the given index

func (ContractFunctionResult) GetInt200 added in v2.12.0

func (result ContractFunctionResult) GetInt200(index uint64) []byte

GetInt200 gets a _Solidity int200 from the result at the given index

func (ContractFunctionResult) GetInt208 added in v2.12.0

func (result ContractFunctionResult) GetInt208(index uint64) []byte

GetInt208 gets a _Solidity int208 from the result at the given index

func (ContractFunctionResult) GetInt216 added in v2.12.0

func (result ContractFunctionResult) GetInt216(index uint64) []byte

GetInt216 gets a _Solidity int216 from the result at the given index

func (ContractFunctionResult) GetInt224 added in v2.12.0

func (result ContractFunctionResult) GetInt224(index uint64) []byte

GetInt224 gets a _Solidity int224 from the result at the given index

func (ContractFunctionResult) GetInt232 added in v2.12.0

func (result ContractFunctionResult) GetInt232(index uint64) []byte

GetInt232 gets a _Solidity int232 from the result at the given index

func (ContractFunctionResult) GetInt24 added in v2.12.0

func (result ContractFunctionResult) GetInt24(index uint64) int32

GetInt24 gets a _Solidity int24 from the result at the given index

func (ContractFunctionResult) GetInt240 added in v2.12.0

func (result ContractFunctionResult) GetInt240(index uint64) []byte

GetInt240 gets a _Solidity int240 from the result at the given index

func (ContractFunctionResult) GetInt248 added in v2.12.0

func (result ContractFunctionResult) GetInt248(index uint64) []byte

GetInt248 gets a _Solidity int248 from the result at the given index

func (ContractFunctionResult) GetInt256

func (result ContractFunctionResult) GetInt256(index uint64) []byte

GetInt256 gets a _Solidity int256 from the result at the given index

func (ContractFunctionResult) GetInt32

func (result ContractFunctionResult) GetInt32(index uint64) int32

GetInt32 gets a _Solidity int32 from the result at the given index

func (ContractFunctionResult) GetInt40 added in v2.12.0

func (result ContractFunctionResult) GetInt40(index uint64) int64

GetInt40 gets a _Solidity int40 from the result at the given index

func (ContractFunctionResult) GetInt48 added in v2.12.0

func (result ContractFunctionResult) GetInt48(index uint64) int64

GetInt48 gets a _Solidity int48 from the result at the given index

func (ContractFunctionResult) GetInt56 added in v2.12.0

func (result ContractFunctionResult) GetInt56(index uint64) int64

GetInt56 gets a _Solidity int56 from the result at the given index

func (ContractFunctionResult) GetInt64

func (result ContractFunctionResult) GetInt64(index uint64) int64

GetInt64 gets a _Solidity int64 from the result at the given index

func (ContractFunctionResult) GetInt72 added in v2.12.0

func (result ContractFunctionResult) GetInt72(index uint64) []byte

GetInt72 gets a _Solidity int72 from the result at the given index

func (ContractFunctionResult) GetInt8

func (result ContractFunctionResult) GetInt8(index uint64) int8

GetInt8 gets a _Solidity int8 from the result at the given index

func (ContractFunctionResult) GetInt80 added in v2.12.0

func (result ContractFunctionResult) GetInt80(index uint64) []byte

GetInt80 gets a _Solidity int80 from the result at the given index

func (ContractFunctionResult) GetInt88 added in v2.12.0

func (result ContractFunctionResult) GetInt88(index uint64) []byte

GetInt88 gets a _Solidity int88 from the result at the given index

func (ContractFunctionResult) GetInt96 added in v2.12.0

func (result ContractFunctionResult) GetInt96(index uint64) []byte

GetInt96 gets a _Solidity int96 from the result at the given index

func (ContractFunctionResult) GetResult added in v2.26.0

func (result ContractFunctionResult) GetResult(types string) (interface{}, error)

GetResult parses the result of a contract call based on the given types string and returns the result as an interface. The "types" string should specify the Ethereum Solidity type of the contract call output. This includes types like "uint256", "address", "bool", "string", "string[]", etc. The type provided must match the actual type of the data returned by the contract call, otherwise the function will fail to unpack and return an error. The method returns the parsed result encapsulated in an interface{}, allowing flexibility to handle various types of contract call results. For correct usage, the caller should perform a type assertion on the returned interface{} to convert it into the appropriate go type.

func (ContractFunctionResult) GetString

func (result ContractFunctionResult) GetString(index uint64) string

GetString gets a string from the result at the given index

func (ContractFunctionResult) GetUint104 added in v2.12.0

func (result ContractFunctionResult) GetUint104(index uint64) []byte

GetUint104 gets a _Solidity uint104 from the result at the given index

func (ContractFunctionResult) GetUint112 added in v2.12.0

func (result ContractFunctionResult) GetUint112(index uint64) []byte

GetUint112 gets a _Solidity uint112 from the result at the given index

func (ContractFunctionResult) GetUint120 added in v2.12.0

func (result ContractFunctionResult) GetUint120(index uint64) []byte

GetUint120 gets a _Solidity uint120 from the result at the given index

func (ContractFunctionResult) GetUint128 added in v2.12.0

func (result ContractFunctionResult) GetUint128(index uint64) []byte

GetUint128 gets a _Solidity uint128 from the result at the given index

func (ContractFunctionResult) GetUint136 added in v2.12.0

func (result ContractFunctionResult) GetUint136(index uint64) []byte

GetUint136 gets a _Solidity uint136 from the result at the given index

func (ContractFunctionResult) GetUint144 added in v2.12.0

func (result ContractFunctionResult) GetUint144(index uint64) []byte

GetUint144 gets a _Solidity uint144 from the result at the given index

func (ContractFunctionResult) GetUint152 added in v2.12.0

func (result ContractFunctionResult) GetUint152(index uint64) []byte

GetUint152 gets a _Solidity uint152 from the result at the given index

func (ContractFunctionResult) GetUint16 added in v2.12.0

func (result ContractFunctionResult) GetUint16(index uint64) uint16

GetUint16 gets a _Solidity uint16 from the result at the given index

func (ContractFunctionResult) GetUint160 added in v2.12.0

func (result ContractFunctionResult) GetUint160(index uint64) []byte

GetUint160 gets a _Solidity uint160 from the result at the given index

func (ContractFunctionResult) GetUint168 added in v2.12.0

func (result ContractFunctionResult) GetUint168(index uint64) []byte

GetUint168 gets a _Solidity uint168 from the result at the given index

func (ContractFunctionResult) GetUint176 added in v2.12.0

func (result ContractFunctionResult) GetUint176(index uint64) []byte

GetUint176 gets a _Solidity uint176 from the result at the given index

func (ContractFunctionResult) GetUint184 added in v2.12.0

func (result ContractFunctionResult) GetUint184(index uint64) []byte

GetUint184 gets a _Solidity uint184 from the result at the given index

func (ContractFunctionResult) GetUint192 added in v2.12.0

func (result ContractFunctionResult) GetUint192(index uint64) []byte

GetUint192 gets a _Solidity uint192 from the result at the given index

func (ContractFunctionResult) GetUint200 added in v2.12.0

func (result ContractFunctionResult) GetUint200(index uint64) []byte

GetUint200 gets a _Solidity uint200 from the result at the given index

func (ContractFunctionResult) GetUint208 added in v2.12.0

func (result ContractFunctionResult) GetUint208(index uint64) []byte

GetUint208 gets a _Solidity uint208 from the result at the given index

func (ContractFunctionResult) GetUint216 added in v2.12.0

func (result ContractFunctionResult) GetUint216(index uint64) []byte

GetUint216 gets a _Solidity uint216 from the result at the given index

func (ContractFunctionResult) GetUint224 added in v2.12.0

func (result ContractFunctionResult) GetUint224(index uint64) []byte

GetUint224 gets a _Solidity uint224 from the result at the given index

func (ContractFunctionResult) GetUint232 added in v2.12.0

func (result ContractFunctionResult) GetUint232(index uint64) []byte

GetUint232 gets a _Solidity uint232 from the result at the given index

func (ContractFunctionResult) GetUint24 added in v2.12.0

func (result ContractFunctionResult) GetUint24(index uint64) uint32

GetUint24 gets a _Solidity uint24 from the result at the given index

func (ContractFunctionResult) GetUint240 added in v2.12.0

func (result ContractFunctionResult) GetUint240(index uint64) []byte

GetUint240 gets a _Solidity uint240 from the result at the given index

func (ContractFunctionResult) GetUint248 added in v2.12.0

func (result ContractFunctionResult) GetUint248(index uint64) []byte

GetUint248 gets a _Solidity uint248 from the result at the given index

func (ContractFunctionResult) GetUint256

func (result ContractFunctionResult) GetUint256(index uint64) []byte

GetUint256 gets a _Solidity uint256 from the result at the given index

func (ContractFunctionResult) GetUint32

func (result ContractFunctionResult) GetUint32(index uint64) uint32

GetUint32 gets a _Solidity uint32 from the result at the given index

func (ContractFunctionResult) GetUint40 added in v2.12.0

func (result ContractFunctionResult) GetUint40(index uint64) uint64

GetUint40 gets a _Solidity uint40 from the result at the given index

func (ContractFunctionResult) GetUint48 added in v2.12.0

func (result ContractFunctionResult) GetUint48(index uint64) uint64

GetUint48 gets a _Solidity uint48 from the result at the given index

func (ContractFunctionResult) GetUint56 added in v2.12.0

func (result ContractFunctionResult) GetUint56(index uint64) uint64

GetUint56 gets a _Solidity uint56 from the result at the given index

func (ContractFunctionResult) GetUint64

func (result ContractFunctionResult) GetUint64(index uint64) uint64

GetUint64 gets a _Solidity uint64 from the result at the given index

func (ContractFunctionResult) GetUint72 added in v2.12.0

func (result ContractFunctionResult) GetUint72(index uint64) []byte

GetUint72 gets a _Solidity uint72 from the result at the given index

func (ContractFunctionResult) GetUint8

func (result ContractFunctionResult) GetUint8(index uint64) uint8

GetUint8 gets a _Solidity uint8 from the result at the given index

func (ContractFunctionResult) GetUint80 added in v2.12.0

func (result ContractFunctionResult) GetUint80(index uint64) []byte

GetUint80 gets a _Solidity uint80 from the result at the given index

func (ContractFunctionResult) GetUint88 added in v2.12.0

func (result ContractFunctionResult) GetUint88(index uint64) []byte

GetUint88 gets a _Solidity uint88 from the result at the given index

func (ContractFunctionResult) GetUint96 added in v2.12.0

func (result ContractFunctionResult) GetUint96(index uint64) []byte

GetUint96 gets a _Solidity uint96 from the result at the given index

func (*ContractFunctionResult) ToBytes added in v2.9.0

func (result *ContractFunctionResult) ToBytes() []byte

ToBytes returns the protobuf encoded bytes of the ContractFunctionResult

type ContractFunctionSelector

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

A selector for a function with a given name.

func NewContractFunctionSelector

func NewContractFunctionSelector(name string) ContractFunctionSelector

NewContractFunctionSelector starts building a selector for a function with a given name.

func (*ContractFunctionSelector) AddAddress

func (selector *ContractFunctionSelector) AddAddress() *ContractFunctionSelector

AddAddress adds an address parameter to the selector.

func (*ContractFunctionSelector) AddAddressArray

func (selector *ContractFunctionSelector) AddAddressArray() *ContractFunctionSelector

AddAddressArray adds an address[] parameter to the selector.

func (*ContractFunctionSelector) AddBool

AddBool adds a bool parameter to the selector.

func (*ContractFunctionSelector) AddBoolArray

func (selector *ContractFunctionSelector) AddBoolArray() *ContractFunctionSelector

AddBoolArray adds a bool[] parameter to the selector.

func (*ContractFunctionSelector) AddBytes

func (selector *ContractFunctionSelector) AddBytes() *ContractFunctionSelector

AddBytes adds a bytes parameter to the selector.

func (*ContractFunctionSelector) AddBytes32

func (selector *ContractFunctionSelector) AddBytes32() *ContractFunctionSelector

AddBytes32 adds a bytes32 parameter to the selector.

func (*ContractFunctionSelector) AddBytes32Array

func (selector *ContractFunctionSelector) AddBytes32Array() *ContractFunctionSelector

AddBytes32Array adds a bytes32[] parameter to the selector.

func (*ContractFunctionSelector) AddBytesArray

func (selector *ContractFunctionSelector) AddBytesArray() *ContractFunctionSelector

AddBytesArray adds a bytes[] parameter to the selector.

func (*ContractFunctionSelector) AddFunction

func (selector *ContractFunctionSelector) AddFunction() *ContractFunctionSelector

AddFunction adds a function parameter to the selector.

func (*ContractFunctionSelector) AddInt104 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt104() *ContractFunctionSelector

AddInt104 adds an int104 parameter to the selector.

func (*ContractFunctionSelector) AddInt112 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt112() *ContractFunctionSelector

AddInt112 adds an int112 parameter to the selector.

func (*ContractFunctionSelector) AddInt120 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt120() *ContractFunctionSelector

AddInt120 adds an int120 parameter to the selector.

func (*ContractFunctionSelector) AddInt128 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt128() *ContractFunctionSelector

AddInt128 adds an int128 parameter to the selector.

func (*ContractFunctionSelector) AddInt136 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt136() *ContractFunctionSelector

AddInt136 adds an int136 parameter to the selector.

func (*ContractFunctionSelector) AddInt144 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt144() *ContractFunctionSelector

AddInt144 adds an int144 parameter to the selector.

func (*ContractFunctionSelector) AddInt152 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt152() *ContractFunctionSelector

AddInt152 adds an int152 parameter to the selector.

func (*ContractFunctionSelector) AddInt16 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt16() *ContractFunctionSelector

AddInt16 adds an int16 parameter to the selector.

func (*ContractFunctionSelector) AddInt160 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt160() *ContractFunctionSelector

AddInt160 adds an int160 parameter to the selector.

func (*ContractFunctionSelector) AddInt168 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt168() *ContractFunctionSelector

AddInt168 adds an int168 parameter to the selector.

func (*ContractFunctionSelector) AddInt176 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt176() *ContractFunctionSelector

AddInt176 adds an int176 parameter to the selector.

func (*ContractFunctionSelector) AddInt184 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt184() *ContractFunctionSelector

AddInt184 adds an int184 parameter to the selector.

func (*ContractFunctionSelector) AddInt192 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt192() *ContractFunctionSelector

AddInt192 adds an int192 parameter to the selector.

func (*ContractFunctionSelector) AddInt200 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt200() *ContractFunctionSelector

AddInt200 adds an int200 parameter to the selector.

func (*ContractFunctionSelector) AddInt208 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt208() *ContractFunctionSelector

AddInt208 adds an int208 parameter to the selector.

func (*ContractFunctionSelector) AddInt216 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt216() *ContractFunctionSelector

AddInt216 adds an int216 parameter to the selector.

func (*ContractFunctionSelector) AddInt224 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt224() *ContractFunctionSelector

AddInt224 adds an int224 parameter to the selector.

func (*ContractFunctionSelector) AddInt232 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt232() *ContractFunctionSelector

AddInt232 adds an int232 parameter to the selector.

func (*ContractFunctionSelector) AddInt24 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt24() *ContractFunctionSelector

AddInt24 adds an int24 parameter to the selector.

func (*ContractFunctionSelector) AddInt240 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt240() *ContractFunctionSelector

AddInt240 adds an int240 parameter to the selector.

func (*ContractFunctionSelector) AddInt248 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt248() *ContractFunctionSelector

AddInt248 adds an int248 parameter to the selector.

func (*ContractFunctionSelector) AddInt256

func (selector *ContractFunctionSelector) AddInt256() *ContractFunctionSelector

AddInt256 adds an int256 parameter to the selector.

func (*ContractFunctionSelector) AddInt256Array

func (selector *ContractFunctionSelector) AddInt256Array() *ContractFunctionSelector

AddInt256Array adds an int256[] parameter to the selector.

func (*ContractFunctionSelector) AddInt32

func (selector *ContractFunctionSelector) AddInt32() *ContractFunctionSelector

AddInt32 adds an int32 parameter to the selector.

func (*ContractFunctionSelector) AddInt32Array

func (selector *ContractFunctionSelector) AddInt32Array() *ContractFunctionSelector

AddInt32Array adds an int32[] parameter to the selector.

func (*ContractFunctionSelector) AddInt40 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt40() *ContractFunctionSelector

AddInt40 adds an int40 parameter to the selector.

func (*ContractFunctionSelector) AddInt48 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt48() *ContractFunctionSelector

AddInt48 adds an int48 parameter to the selector.

func (*ContractFunctionSelector) AddInt56 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt56() *ContractFunctionSelector

AddInt56 adds an int56 parameter to the selector.

func (*ContractFunctionSelector) AddInt64

func (selector *ContractFunctionSelector) AddInt64() *ContractFunctionSelector

AddInt64 adds an int64 parameter to the selector.

func (*ContractFunctionSelector) AddInt64Array

func (selector *ContractFunctionSelector) AddInt64Array() *ContractFunctionSelector

AddInt64Array adds an int64[] parameter to the selector.

func (*ContractFunctionSelector) AddInt72 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt72() *ContractFunctionSelector

AddInt72 adds an int72 parameter to the selector.

func (*ContractFunctionSelector) AddInt8

AddInt8 adds an int8 parameter to the selector.

func (*ContractFunctionSelector) AddInt80 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt80() *ContractFunctionSelector

AddInt80 adds an int80 parameter to the selector.

func (*ContractFunctionSelector) AddInt88 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt88() *ContractFunctionSelector

AddInt88 adds an int88 parameter to the selector.

func (*ContractFunctionSelector) AddInt8Array

func (selector *ContractFunctionSelector) AddInt8Array() *ContractFunctionSelector

AddInt8Array adds an int8[] parameter to the selector.

func (*ContractFunctionSelector) AddInt96 added in v2.12.0

func (selector *ContractFunctionSelector) AddInt96() *ContractFunctionSelector

AddInt96 adds an int96 parameter to the selector.

func (*ContractFunctionSelector) AddString

func (selector *ContractFunctionSelector) AddString() *ContractFunctionSelector

AddString adds a string parameter to the selector.

func (*ContractFunctionSelector) AddStringArray

func (selector *ContractFunctionSelector) AddStringArray() *ContractFunctionSelector

AddStringArray adds a string[] parameter to the selector.

func (*ContractFunctionSelector) AddUint104 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint104() *ContractFunctionSelector

AddUint104 adds a uint104 parameter to the selector.

func (*ContractFunctionSelector) AddUint112 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint112() *ContractFunctionSelector

AddUint112 adds a uint112 parameter to the selector.

func (*ContractFunctionSelector) AddUint120 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint120() *ContractFunctionSelector

AddUint120 adds a uint120 parameter to the selector.

func (*ContractFunctionSelector) AddUint128 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint128() *ContractFunctionSelector

AddUint128 adds a uint128 parameter to the selector.

func (*ContractFunctionSelector) AddUint136 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint136() *ContractFunctionSelector

AddUint136 adds a uint136 parameter to the selector.

func (*ContractFunctionSelector) AddUint144 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint144() *ContractFunctionSelector

AddUint144 adds a uint144 parameter to the selector.

func (*ContractFunctionSelector) AddUint152 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint152() *ContractFunctionSelector

AddUint152 adds a uint152 parameter to the selector.

func (*ContractFunctionSelector) AddUint16 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint16() *ContractFunctionSelector

AddUint16 adds a uint16 parameter to the selector.

func (*ContractFunctionSelector) AddUint160 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint160() *ContractFunctionSelector

AddUint160 adds a uint160 parameter to the selector.

func (*ContractFunctionSelector) AddUint168 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint168() *ContractFunctionSelector

AddUint168 adds a uint168 parameter to the selector.

func (*ContractFunctionSelector) AddUint176 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint176() *ContractFunctionSelector

AddUint176 adds a uint176 parameter to the selector.

func (*ContractFunctionSelector) AddUint184 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint184() *ContractFunctionSelector

AddUint184 adds a uint184 parameter to the selector.

func (*ContractFunctionSelector) AddUint192 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint192() *ContractFunctionSelector

AddUint192 adds a uint192 parameter to the selector.

func (*ContractFunctionSelector) AddUint200 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint200() *ContractFunctionSelector

AddUint200 adds a uint200 parameter to the selector.

func (*ContractFunctionSelector) AddUint208 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint208() *ContractFunctionSelector

AddUint208 adds a uint208 parameter to the selector.

func (*ContractFunctionSelector) AddUint216 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint216() *ContractFunctionSelector

AddUint216 adds a uint216 parameter to the selector.

func (*ContractFunctionSelector) AddUint224 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint224() *ContractFunctionSelector

AddUint224 adds a uint224 parameter to the selector.

func (*ContractFunctionSelector) AddUint232 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint232() *ContractFunctionSelector

AddUint232 adds a uint232 parameter to the selector.

func (*ContractFunctionSelector) AddUint24 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint24() *ContractFunctionSelector

AddUint24 adds a uint24 parameter to the selector.

func (*ContractFunctionSelector) AddUint240 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint240() *ContractFunctionSelector

AddUint240 adds a uint240 parameter to the selector.

func (*ContractFunctionSelector) AddUint248 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint248() *ContractFunctionSelector

AddUint248 adds a uint248 parameter to the selector.

func (*ContractFunctionSelector) AddUint256

func (selector *ContractFunctionSelector) AddUint256() *ContractFunctionSelector

AddUint256 adds a uint256 parameter to the selector.

func (*ContractFunctionSelector) AddUint256Array

func (selector *ContractFunctionSelector) AddUint256Array() *ContractFunctionSelector

AddUint256Array adds a uint256[] parameter to the selector.

func (*ContractFunctionSelector) AddUint32

func (selector *ContractFunctionSelector) AddUint32() *ContractFunctionSelector

AddUint32 adds a uint32 parameter to the selector.

func (*ContractFunctionSelector) AddUint32Array

func (selector *ContractFunctionSelector) AddUint32Array() *ContractFunctionSelector

AddUint32Array adds a uint32[] parameter to the selector.

func (*ContractFunctionSelector) AddUint40 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint40() *ContractFunctionSelector

AddUint40 adds a uint40 parameter to the selector.

func (*ContractFunctionSelector) AddUint48 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint48() *ContractFunctionSelector

AddUint48 adds a uint48 parameter to the selector.

func (*ContractFunctionSelector) AddUint56 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint56() *ContractFunctionSelector

AddUint56 adds a uint56 parameter to the selector.

func (*ContractFunctionSelector) AddUint64

func (selector *ContractFunctionSelector) AddUint64() *ContractFunctionSelector

AddUint64 adds a uint64 parameter to the selector.

func (*ContractFunctionSelector) AddUint64Array

func (selector *ContractFunctionSelector) AddUint64Array() *ContractFunctionSelector

AddUint64Array adds a uint64[] parameter to the selector.

func (*ContractFunctionSelector) AddUint72 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint72() *ContractFunctionSelector

AddUint72 adds a uint72 parameter to the selector.

func (*ContractFunctionSelector) AddUint8

func (selector *ContractFunctionSelector) AddUint8() *ContractFunctionSelector

AddUint8 adds a uint8 parameter to the selector.

func (*ContractFunctionSelector) AddUint80 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint80() *ContractFunctionSelector

AddUint80 adds a uint80 parameter to the selector.

func (*ContractFunctionSelector) AddUint88 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint88() *ContractFunctionSelector

AddUint88 adds a uint88 parameter to the selector.

func (*ContractFunctionSelector) AddUint8Array

func (selector *ContractFunctionSelector) AddUint8Array() *ContractFunctionSelector

AddUint8Array adds a uint8[] parameter to the selector.

func (*ContractFunctionSelector) AddUint96 added in v2.12.0

func (selector *ContractFunctionSelector) AddUint96() *ContractFunctionSelector

AddUint96 adds a uint96 parameter to the selector.

func (*ContractFunctionSelector) String

func (selector *ContractFunctionSelector) String() string

String returns the string representation of the selector.

type ContractID

type ContractID struct {
	Shard      uint64
	Realm      uint64
	Contract   uint64
	EvmAddress []byte
	// contains filtered or unexported fields
}

ContractID is the ID for a Hedera smart contract

func ContractIDFromBytes added in v2.1.3

func ContractIDFromBytes(data []byte) (ContractID, error)

ContractIDFromBytes returns a ContractID generated from a byte array

func ContractIDFromEvmAddress added in v2.9.0

func ContractIDFromEvmAddress(shard uint64, realm uint64, evmAddress string) (ContractID, error)

ContractIDFromEvmAddress constructs a ContractID from a string representation of an EVM address

func ContractIDFromSolidityAddress

func ContractIDFromSolidityAddress(s string) (ContractID, error)

ContractIDFromSolidityAddress constructs a ContractID from a string representation of a _Solidity address Does not populate ContractID.EvmAddress Deprecated

func ContractIDFromString

func ContractIDFromString(data string) (ContractID, error)

ContractIDFromString constructs a ContractID from a string formatted as `Shard.Realm.Contract` (for example "0.0.3")

func (*ContractID) PopulateContract added in v2.28.0

func (id *ContractID) PopulateContract(client *Client) error

PopulateContract gets the actual `Contract` field of the `ContractId` from the Mirror Node. Should be used after generating `ContractId.FromEvmAddress()` because it sets the `Contract` field to `0` automatically since there is no connection between the `Contract` and the `evmAddress`

func (ContractID) String

func (id ContractID) String() string

String returns the string representation of a ContractID formatted as `Shard.Realm.Contract` (for example "0.0.3")

func (ContractID) ToBytes added in v2.1.3

func (id ContractID) ToBytes() []byte

ToBytes returns a byte array representation of the ContractID

func (ContractID) ToSolidityAddress

func (id ContractID) ToSolidityAddress() string

ToSolidityAddress returns the string representation of the ContractID as a _Solidity address.

func (ContractID) ToStringWithChecksum added in v2.1.13

func (id ContractID) ToStringWithChecksum(client Client) (string, error)

ToStringWithChecksum returns the string representation of a ContractID formatted as `Shard.Realm.Contract-Checksum`

func (*ContractID) Validate added in v2.1.8

func (id *ContractID) Validate(client *Client) error

Deprecated - use ValidateChecksum instead

func (*ContractID) ValidateChecksum added in v2.4.0

func (id *ContractID) ValidateChecksum(client *Client) error

Verify that the client has a valid checksum.

type ContractInfo

type ContractInfo struct {
	AccountID                     AccountID
	ContractID                    ContractID
	ContractAccountID             string
	AdminKey                      Key
	ExpirationTime                time.Time
	AutoRenewPeriod               time.Duration
	Storage                       uint64
	ContractMemo                  string
	Balance                       uint64
	LedgerID                      LedgerID
	AutoRenewAccountID            *AccountID
	MaxAutomaticTokenAssociations int32
	StakingInfo                   *StakingInfo
}

Current information on the smart contract instance, including its balance.

func ContractInfoFromBytes added in v2.1.3

func ContractInfoFromBytes(data []byte) (ContractInfo, error)

ContractInfoFromBytes returns a ContractInfo object deserialized from bytes

func (ContractInfo) ToBytes added in v2.1.3

func (contractInfo ContractInfo) ToBytes() []byte

ToBytes returns a serialized version of the ContractInfo object

type ContractInfoQuery

type ContractInfoQuery struct {
	Query
	// contains filtered or unexported fields
}

ContractInfoQuery retrieves information about a smart contract instance. This includes the account that it uses, the file containing its bytecode, and the time when it will expire.

func NewContractInfoQuery

func NewContractInfoQuery() *ContractInfoQuery

NewContractInfoQuery creates a ContractInfoQuery query which can be used to construct and execute a Contract Get Info Query.

func (*ContractInfoQuery) Execute

func (q *ContractInfoQuery) Execute(client *Client) (ContractInfo, error)

Execute executes the Query with the provided client

func (*ContractInfoQuery) GetContractID

func (q *ContractInfoQuery) GetContractID() ContractID

func (*ContractInfoQuery) GetCost

func (q *ContractInfoQuery) GetCost(client *Client) (Hbar, error)

func (*ContractInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *ContractInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractInfoQuery) GetLogLevel added in v2.34.0

func (e *ContractInfoQuery) GetLogLevel() *LogLevel

func (*ContractInfoQuery) GetMaxBackoff added in v2.1.16

func (e *ContractInfoQuery) GetMaxBackoff() time.Duration

func (*ContractInfoQuery) GetMaxRetry added in v2.34.0

func (e *ContractInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractInfoQuery) GetMinBackoff added in v2.1.16

func (e *ContractInfoQuery) GetMinBackoff() time.Duration

func (*ContractInfoQuery) GetNodeAccountIDs

func (e *ContractInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ContractInfoQuery) SetContractID

func (q *ContractInfoQuery) SetContractID(contractID ContractID) *ContractInfoQuery

SetContractID sets the contract for which information is requested

func (*ContractInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *ContractInfoQuery) SetGrpcDeadline(deadline *time.Duration) *ContractInfoQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractInfoQuery) SetLogLevel added in v2.25.0

func (q *ContractInfoQuery) SetLogLevel(level LogLevel) *ContractInfoQuery

func (*ContractInfoQuery) SetMaxBackoff added in v2.1.16

func (q *ContractInfoQuery) SetMaxBackoff(max time.Duration) *ContractInfoQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ContractInfoQuery) SetMaxQueryPayment

func (q *ContractInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *ContractInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ContractInfoQuery) SetMaxRetry added in v2.1.2

func (q *ContractInfoQuery) SetMaxRetry(count int) *ContractInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*ContractInfoQuery) SetMinBackoff added in v2.1.16

func (q *ContractInfoQuery) SetMinBackoff(min time.Duration) *ContractInfoQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ContractInfoQuery) SetNodeAccountIDs

func (q *ContractInfoQuery) SetNodeAccountIDs(accountID []AccountID) *ContractInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this ContractInfoQuery.

func (*ContractInfoQuery) SetPaymentTransactionID added in v2.11.0

func (q *ContractInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *ContractInfoQuery

func (*ContractInfoQuery) SetQueryPayment

func (q *ContractInfoQuery) SetQueryPayment(paymentAmount Hbar) *ContractInfoQuery

SetQueryPayment sets the payment amount for this Query.

type ContractLogInfo

type ContractLogInfo struct {
	ContractID ContractID
	Bloom      []byte
	Topics     [][]byte
	Data       []byte
}

ContractLogInfo is the log info for events returned by a function

type ContractNonceInfo added in v2.26.1

type ContractNonceInfo struct {
	ContractID *ContractID
	Nonce      int64
}

ContractID is the ID for a Hedera smart contract

type ContractStateChange added in v2.9.0

type ContractStateChange struct {
	ContractID     *ContractID
	StorageChanges []*StorageChange
}

type ContractUpdateTransaction

type ContractUpdateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

ContractUpdateTransaction is used to modify a smart contract instance to have the given parameter values. Any nil field is ignored (left unchanged). If only the contractInstanceExpirationTime is being modified, then no signature is needed on this transaction other than for the account paying for the transaction itself. But if any of the other fields are being modified, then it must be signed by the adminKey. The use of adminKey is not currently supported in this API, but in the future will be implemented to allow these fields to be modified, and also to make modifications to the state of the instance. If the contract is created with no admin key, then none of the fields can be changed that need an admin signature, and therefore no admin key can ever be added. So if there is no admin key, then things like the bytecode are immutable. But if there is an admin key, then they can be changed.

For example, the admin key might be a threshold key, which requires 3 of 5 binding arbitration judges to agree before the bytecode can be changed. This can be used to add flexibility to the management of smart contract behavior. But this is optional. If the smart contract is created without an admin key, then such a key can never be added, and its bytecode will be immutable.

func NewContractUpdateTransaction

func NewContractUpdateTransaction() *ContractUpdateTransaction

NewContractUpdateTransaction creates a ContractUpdateTransaction transaction which can be used to construct and execute a Contract Update Transaction. ContractUpdateTransaction is used to modify a smart contract instance to have the given parameter values. Any nil field is ignored (left unchanged). If only the contractInstanceExpirationTime is being modified, then no signature is needed on this transaction other than for the account paying for the transaction itself. But if any of the other fields are being modified, then it must be signed by the adminKey. The use of adminKey is not currently supported in this API, but in the future will be implemented to allow these fields to be modified, and also to make modifications to the state of the instance. If the contract is created with no admin key, then none of the fields can be changed that need an admin signature, and therefore no admin key can ever be added. So if there is no admin key, then things like the bytecode are immutable. But if there is an admin key, then they can be changed.

For example, the admin key might be a threshold key, which requires 3 of 5 binding arbitration judges to agree before the bytecode can be changed. This can be used to add flexibility to the management of smart contract behavior. But this is optional. If the smart contract is created without an admin key, then such a key can never be added, and its bytecode will be immutable.

func (*ContractUpdateTransaction) AddSignature added in v2.1.3

func (tx *ContractUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *ContractUpdateTransaction

AddSignature adds a signature to the transaction.

func (*ContractUpdateTransaction) ClearStakedAccountID added in v2.16.0

func (tx *ContractUpdateTransaction) ClearStakedAccountID() *ContractUpdateTransaction

func (*ContractUpdateTransaction) ClearStakedNodeID added in v2.16.0

func (tx *ContractUpdateTransaction) ClearStakedNodeID() *ContractUpdateTransaction

func (*ContractUpdateTransaction) Execute

func (*ContractUpdateTransaction) Freeze

func (*ContractUpdateTransaction) FreezeWith

func (*ContractUpdateTransaction) GetAdminKey

func (tx *ContractUpdateTransaction) GetAdminKey() (Key, error)

func (*ContractUpdateTransaction) GetAutoRenewAccountID added in v2.14.0

func (tx *ContractUpdateTransaction) GetAutoRenewAccountID() AccountID

func (*ContractUpdateTransaction) GetAutoRenewPeriod

func (tx *ContractUpdateTransaction) GetAutoRenewPeriod() time.Duration

func (*ContractUpdateTransaction) GetBytecodeFileID

func (tx *ContractUpdateTransaction) GetBytecodeFileID() FileID

Deprecated

func (*ContractUpdateTransaction) GetContractID

func (tx *ContractUpdateTransaction) GetContractID() ContractID

func (*ContractUpdateTransaction) GetContractMemo

func (tx *ContractUpdateTransaction) GetContractMemo() string

func (*ContractUpdateTransaction) GetDeclineStakingReward added in v2.16.0

func (tx *ContractUpdateTransaction) GetDeclineStakingReward() bool

func (*ContractUpdateTransaction) GetExpirationTime

func (tx *ContractUpdateTransaction) GetExpirationTime() time.Time

func (*ContractUpdateTransaction) GetGrpcDeadline added in v2.34.0

func (e *ContractUpdateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ContractUpdateTransaction) GetLogLevel added in v2.34.0

func (e *ContractUpdateTransaction) GetLogLevel() *LogLevel

func (*ContractUpdateTransaction) GetMaxAutomaticTokenAssociations added in v2.14.0

func (tx *ContractUpdateTransaction) GetMaxAutomaticTokenAssociations() int32

func (*ContractUpdateTransaction) GetMaxBackoff added in v2.1.16

func (e *ContractUpdateTransaction) GetMaxBackoff() time.Duration

func (*ContractUpdateTransaction) GetMaxRetry added in v2.34.0

func (e *ContractUpdateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ContractUpdateTransaction) GetMinBackoff added in v2.1.16

func (e *ContractUpdateTransaction) GetMinBackoff() time.Duration

func (*ContractUpdateTransaction) GetNodeAccountIDs

func (e *ContractUpdateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ContractUpdateTransaction) GetProxyAccountID

func (tx *ContractUpdateTransaction) GetProxyAccountID() AccountID

Deprecated

func (*ContractUpdateTransaction) GetStakedAccountID added in v2.16.0

func (tx *ContractUpdateTransaction) GetStakedAccountID() AccountID

func (*ContractUpdateTransaction) GetStakedNodeID added in v2.16.0

func (tx *ContractUpdateTransaction) GetStakedNodeID() int64

func (*ContractUpdateTransaction) Schedule added in v2.1.5

func (*ContractUpdateTransaction) SetAdminKey

SetAdminKey sets the key which can be used to arbitrarily modify the state of the instance by signing a ContractUpdateTransaction to modify it. If the admin key was never set then such modifications are not possible, and there is no administrator that can overrIDe the normal operation of the smart contract instance.

func (*ContractUpdateTransaction) SetAutoRenewAccountID added in v2.14.0

func (tx *ContractUpdateTransaction) SetAutoRenewAccountID(id AccountID) *ContractUpdateTransaction

SetAutoRenewAccountID An account to charge for auto-renewal of this contract. If not set, or set to an account with zero hbar balance, the contract's own hbar balance will be used to cover auto-renewal fees.

func (*ContractUpdateTransaction) SetAutoRenewPeriod

func (tx *ContractUpdateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *ContractUpdateTransaction

SetAutoRenewPeriod sets the duration for which the contract instance will automatically charge its account to renew for.

func (*ContractUpdateTransaction) SetBytecodeFileID

func (tx *ContractUpdateTransaction) SetBytecodeFileID(bytecodeFileID FileID) *ContractUpdateTransaction

Deprecated

func (*ContractUpdateTransaction) SetContractID

func (tx *ContractUpdateTransaction) SetContractID(contractID ContractID) *ContractUpdateTransaction

SetContractID sets The Contract ID instance to update (this can't be changed on the contract)

func (*ContractUpdateTransaction) SetContractMemo

func (tx *ContractUpdateTransaction) SetContractMemo(memo string) *ContractUpdateTransaction

SetContractMemo sets the memo associated with the contract (max 100 bytes)

func (*ContractUpdateTransaction) SetDeclineStakingReward added in v2.16.0

func (tx *ContractUpdateTransaction) SetDeclineStakingReward(decline bool) *ContractUpdateTransaction

func (*ContractUpdateTransaction) SetExpirationTime

func (tx *ContractUpdateTransaction) SetExpirationTime(expiration time.Time) *ContractUpdateTransaction

SetExpirationTime extends the expiration of the instance and its account to the provIDed time. If the time provIDed is the current or past time, then there will be no effect.

func (*ContractUpdateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *ContractUpdateTransaction) SetGrpcDeadline(deadline *time.Duration) *ContractUpdateTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*ContractUpdateTransaction) SetLogLevel added in v2.25.0

func (*ContractUpdateTransaction) SetMaxAutomaticTokenAssociations added in v2.14.0

func (tx *ContractUpdateTransaction) SetMaxAutomaticTokenAssociations(max int32) *ContractUpdateTransaction

SetMaxAutomaticTokenAssociations The maximum number of tokens that this contract can be automatically associated with (i.e., receive air-drops from).

func (*ContractUpdateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ContractUpdateTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*ContractUpdateTransaction) SetMaxTransactionFee

func (tx *ContractUpdateTransaction) SetMaxTransactionFee(fee Hbar) *ContractUpdateTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*ContractUpdateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ContractUpdateTransaction) SetNodeAccountIDs

func (tx *ContractUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *ContractUpdateTransaction

SetNodeAccountID sets the _Node AccountID for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) SetProxyAccountID

func (tx *ContractUpdateTransaction) SetProxyAccountID(proxyAccountID AccountID) *ContractUpdateTransaction

Deprecated SetProxyAccountID sets the ID of the account to which this contract is proxy staked. If proxyAccountID is left unset, is an invalID account, or is an account that isn't a _Node, then this contract is automatically proxy staked to a _Node chosen by the _Network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking, or if it is not currently running a _Node, then it will behave as if proxyAccountID was never set.

func (*ContractUpdateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *ContractUpdateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *ContractUpdateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*ContractUpdateTransaction) SetStakedAccountID added in v2.16.0

func (*ContractUpdateTransaction) SetStakedNodeID added in v2.16.0

func (*ContractUpdateTransaction) SetTransactionID

func (tx *ContractUpdateTransaction) SetTransactionID(transactionID TransactionID) *ContractUpdateTransaction

SetTransactionID sets the TransactionID for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) SetTransactionMemo

func (tx *ContractUpdateTransaction) SetTransactionMemo(memo string) *ContractUpdateTransaction

SetTransactionMemo sets the memo for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) SetTransactionValidDuration

func (tx *ContractUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *ContractUpdateTransaction

SetTransactionValidDuration sets the valid duration for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*ContractUpdateTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*ContractUpdateTransaction) SignWithOperator

func (tx *ContractUpdateTransaction) SignWithOperator(
	client *Client,
) (*ContractUpdateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type CustomFee added in v2.1.11

type CustomFee struct {
	FeeCollectorAccountID  *AccountID
	AllCollectorsAreExempt bool
}

Base struct for all custom fees

func (*CustomFee) GetAllCollectorsAreExempt added in v2.18.0

func (fee *CustomFee) GetAllCollectorsAreExempt() bool

GetAllCollectorsAreExempt returns whether or not all collectors are exempt from the custom fee

func (*CustomFee) GetFeeCollectorAccountID added in v2.1.13

func (fee *CustomFee) GetFeeCollectorAccountID() AccountID

GetFeeCollectorAccountID returns the account ID that will receive the custom fee

func (*CustomFee) SetAllCollectorsAreExempt added in v2.18.0

func (fee *CustomFee) SetAllCollectorsAreExempt(exempt bool) *CustomFee

SetAllCollectorsAreExempt sets whether or not all collectors are exempt from the custom fee

func (*CustomFee) SetFeeCollectorAccountID added in v2.1.13

func (fee *CustomFee) SetFeeCollectorAccountID(id AccountID) *CustomFee

SetFeeCollectorAccountID sets the account ID that will receive the custom fee

type CustomFixedFee added in v2.1.11

type CustomFixedFee struct {
	CustomFee
	Amount              int64
	DenominationTokenID *TokenID
}

A fixed fee transfers a specified amount of the token, to the specified collection account(s), each time a token transfer is initiated. The custom token fee does not depend on the amount of the token that is being transferred.

func NewCustomFixedFee added in v2.1.16

func NewCustomFixedFee() *CustomFixedFee

A fixed fee transfers a specified amount of the token, to the specified collection account(s), each time a token transfer is initiated. The custom token fee does not depend on the amount of the token that is being transferred.

func (*CustomFixedFee) GetAmount added in v2.1.16

func (fee *CustomFixedFee) GetAmount() Hbar

GetAmount returns the amount of the fixed fee

func (*CustomFixedFee) GetDenominatingTokenID added in v2.1.16

func (fee *CustomFixedFee) GetDenominatingTokenID() TokenID

GetDenominatingTokenID returns the denomination token ID

func (*CustomFixedFee) GetFeeCollectorAccountID added in v2.1.16

func (fee *CustomFixedFee) GetFeeCollectorAccountID() AccountID

GetFeeCollectorAccountID returns the account ID that will receive the custom fee

func (*CustomFixedFee) GetHbarAmount added in v2.1.13

func (fee *CustomFixedFee) GetHbarAmount() Hbar

GetHbarAmount returns the amount of the fixed fee in hbar

func (*CustomFixedFee) SetAllCollectorsAreExempt added in v2.18.0

func (fee *CustomFixedFee) SetAllCollectorsAreExempt(exempt bool) *CustomFixedFee

SetAllCollectorsAreExempt sets whether all collectors are exempt from the custom fee

func (*CustomFixedFee) SetAmount added in v2.1.16

func (fee *CustomFixedFee) SetAmount(tinybar int64) *CustomFixedFee

SetAmount sets the amount of the fixed fee in tinybar

func (*CustomFixedFee) SetDenominatingTokenID added in v2.1.16

func (fee *CustomFixedFee) SetDenominatingTokenID(id TokenID) *CustomFixedFee

SetDenominatingTokenID sets the denomination token ID

func (*CustomFixedFee) SetDenominatingTokenToSameToken added in v2.1.13

func (fee *CustomFixedFee) SetDenominatingTokenToSameToken() *CustomFixedFee

SetDenominatingTokenToSameToken sets the denomination token ID to the same token as the fee

func (*CustomFixedFee) SetFeeCollectorAccountID added in v2.1.16

func (fee *CustomFixedFee) SetFeeCollectorAccountID(id AccountID) *CustomFixedFee

SetFeeCollectorAccountID sets the account ID that will receive the custom fee

func (*CustomFixedFee) SetHbarAmount added in v2.1.13

func (fee *CustomFixedFee) SetHbarAmount(hbar Hbar) *CustomFixedFee

SetHbarAmount sets the amount of the fixed fee in hbar

func (*CustomFixedFee) String added in v2.4.0

func (fee *CustomFixedFee) String() string

String returns a string representation of the CustomFixedFee

func (*CustomFixedFee) ToBytes added in v2.1.11

func (fee *CustomFixedFee) ToBytes() []byte

ToBytes returns the byte representation of the CustomFixedFee

type CustomFractionalFee added in v2.1.11

type CustomFractionalFee struct {
	CustomFee
	Numerator        int64
	Denominator      int64
	MinimumAmount    int64
	MaximumAmount    int64
	AssessmentMethod FeeAssessmentMethod
}

A fractional fee transfers the specified fraction of the total value of the tokens that are being transferred to the specified fee-collecting account. Along with setting a custom fractional fee, you can

func NewCustomFractionalFee added in v2.1.16

func NewCustomFractionalFee() *CustomFractionalFee

A fractional fee transfers the specified fraction of the total value of the tokens that are being transferred to the specified fee-collecting account. Along with setting a custom fractional fee, you can

func (*CustomFractionalFee) GetAssessmentMethod added in v2.1.16

func (fee *CustomFractionalFee) GetAssessmentMethod() FeeAssessmentMethod

GetAssessmentMethod returns the assessment method of the fractional fee

func (*CustomFractionalFee) GetDenominator added in v2.1.16

func (fee *CustomFractionalFee) GetDenominator() int64

GetDenominator returns the denominator of the fractional fee

func (*CustomFractionalFee) GetFeeCollectorAccountID added in v2.1.16

func (fee *CustomFractionalFee) GetFeeCollectorAccountID() AccountID

GetFeeCollectorAccountID returns the account ID that will receive the custom fee

func (*CustomFractionalFee) GetMax added in v2.1.16

func (fee *CustomFractionalFee) GetMax() int64

GetMax returns the maximum amount of the fractional fee

func (*CustomFractionalFee) GetMin added in v2.1.16

func (fee *CustomFractionalFee) GetMin() int64

GetMin returns the minimum amount of the fractional fee

func (*CustomFractionalFee) GetNumerator added in v2.1.16

func (fee *CustomFractionalFee) GetNumerator() int64

GetNumerator returns the numerator of the fractional fee

func (*CustomFractionalFee) SetAllCollectorsAreExempt added in v2.18.0

func (fee *CustomFractionalFee) SetAllCollectorsAreExempt(exempt bool) *CustomFractionalFee

SetAllCollectorsAreExempt sets the flag that indicates if all collectors are exempt from the custom fee

func (*CustomFractionalFee) SetAssessmentMethod added in v2.23.0

func (fee *CustomFractionalFee) SetAssessmentMethod(feeAssessmentMethod FeeAssessmentMethod) *CustomFractionalFee

SetAssessmentMethod sets the assessment method of the fractional fee

func (*CustomFractionalFee) SetDenominator added in v2.1.16

func (fee *CustomFractionalFee) SetDenominator(denominator int64) *CustomFractionalFee

SetDenominator sets the denominator of the fractional fee

func (*CustomFractionalFee) SetFeeCollectorAccountID added in v2.1.16

func (fee *CustomFractionalFee) SetFeeCollectorAccountID(id AccountID) *CustomFractionalFee

SetFeeCollectorAccountID sets the account ID that will receive the custom fee

func (*CustomFractionalFee) SetMax added in v2.1.16

func (fee *CustomFractionalFee) SetMax(max int64) *CustomFractionalFee

SetMax sets the maximum amount of the fractional fee

func (*CustomFractionalFee) SetMin added in v2.1.16

func (fee *CustomFractionalFee) SetMin(min int64) *CustomFractionalFee

SetMin sets the minimum amount of the fractional fee

func (*CustomFractionalFee) SetNumerator added in v2.1.16

func (fee *CustomFractionalFee) SetNumerator(numerator int64) *CustomFractionalFee

SetNumerator sets the numerator of the fractional fee

func (CustomFractionalFee) String added in v2.4.0

func (fee CustomFractionalFee) String() string

String returns a string representation of the CustomFractionalFee

func (CustomFractionalFee) ToBytes added in v2.1.11

func (fee CustomFractionalFee) ToBytes() []byte

ToBytes returns a byte array representation of the CustomFractionalFee

type CustomRoyaltyFee added in v2.1.14

type CustomRoyaltyFee struct {
	CustomFee
	Numerator   int64
	Denominator int64
	FallbackFee *CustomFixedFee
}

A royalty fee is a fractional fee that is assessed each time the ownership of an NFT is transferred from person A to person B. The fee collector account ID defined in the royalty fee schedule will receive the royalty fee each time. The royalty fee charged is a fraction of the value exchanged for the NFT.

func NewCustomRoyaltyFee added in v2.1.16

func NewCustomRoyaltyFee() *CustomRoyaltyFee

A royalty fee is a fractional fee that is assessed each time the ownership of an NFT is transferred from person A to person B. The fee collector account ID defined in the royalty fee schedule will receive the royalty fee each time. The royalty fee charged is a fraction of the value exchanged for the NFT.

func (*CustomRoyaltyFee) GetDenominator added in v2.1.16

func (fee *CustomRoyaltyFee) GetDenominator() int64

GetDenominator returns the denominator of the fee

func (*CustomRoyaltyFee) GetFallbackFee added in v2.1.16

func (fee *CustomRoyaltyFee) GetFallbackFee() CustomFixedFee

GetFallbackFee returns the fallback fee

func (*CustomRoyaltyFee) GetFeeCollectorAccountID added in v2.1.16

func (fee *CustomRoyaltyFee) GetFeeCollectorAccountID() AccountID

GetFeeCollectorAccountID returns the account ID that will receive the custom fee

func (*CustomRoyaltyFee) GetNumerator added in v2.1.16

func (fee *CustomRoyaltyFee) GetNumerator() int64

GetNumerator returns the numerator of the fee

func (*CustomRoyaltyFee) SetAllCollectorsAreExempt added in v2.18.0

func (fee *CustomRoyaltyFee) SetAllCollectorsAreExempt(exempt bool) *CustomRoyaltyFee

SetAllCollectorsAreExempt sets whether all collectors are exempt from the fee

func (*CustomRoyaltyFee) SetDenominator added in v2.1.14

func (fee *CustomRoyaltyFee) SetDenominator(denominator int64) *CustomRoyaltyFee

SetDenominator sets the denominator of the fractional fee

func (*CustomRoyaltyFee) SetFallbackFee added in v2.1.14

func (fee *CustomRoyaltyFee) SetFallbackFee(fallbackFee *CustomFixedFee) *CustomRoyaltyFee

SetFallbackFee If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged with the sender

func (*CustomRoyaltyFee) SetFeeCollectorAccountID added in v2.1.14

func (fee *CustomRoyaltyFee) SetFeeCollectorAccountID(accountID AccountID) *CustomRoyaltyFee

SetFeeCollectorAccountID sets the account ID that will receive the custom fee

func (*CustomRoyaltyFee) SetNumerator added in v2.1.14

func (fee *CustomRoyaltyFee) SetNumerator(numerator int64) *CustomRoyaltyFee

SetNumerator sets the numerator of the fractional fee

type DefaultLogger added in v2.25.0

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

func NewLogger added in v2.25.0

func NewLogger(component string, level LogLevel) *DefaultLogger

func (*DefaultLogger) Debug added in v2.25.0

func (l *DefaultLogger) Debug(msg string, keysAndValues ...interface{})

func (*DefaultLogger) Error added in v2.25.0

func (l *DefaultLogger) Error(msg string, keysAndValues ...interface{})

func (*DefaultLogger) Info added in v2.25.0

func (l *DefaultLogger) Info(msg string, keysAndValues ...interface{})

func (*DefaultLogger) SetLevel added in v2.25.0

func (l *DefaultLogger) SetLevel(level LogLevel)

func (*DefaultLogger) SetSilent added in v2.25.0

func (l *DefaultLogger) SetSilent(isSilent bool)

func (*DefaultLogger) SubLoggerWithLevel added in v2.25.0

func (l *DefaultLogger) SubLoggerWithLevel(level LogLevel) Logger

func (*DefaultLogger) Trace added in v2.25.0

func (l *DefaultLogger) Trace(msg string, keysAndValues ...interface{})

func (*DefaultLogger) Warn added in v2.25.0

func (l *DefaultLogger) Warn(msg string, keysAndValues ...interface{})

type DelegatableContractID added in v2.7.0

type DelegatableContractID struct {
	Shard      uint64
	Realm      uint64
	Contract   uint64
	EvmAddress []byte
	// contains filtered or unexported fields
}

ContractID is the ID for a Hedera smart contract

func DelegatableContractIDFromBytes added in v2.7.0

func DelegatableContractIDFromBytes(data []byte) (DelegatableContractID, error)

DelegatableContractIDFromBytes returns a DelegatableContractID generated from a byte array

func DelegatableContractIDFromEvmAddress added in v2.9.0

func DelegatableContractIDFromEvmAddress(shard uint64, realm uint64, evmAddress string) (DelegatableContractID, error)

DelegatableContractIDFromEvmAddress constructs a DelegatableContractID from a string representation of a _Solidity address

func DelegatableContractIDFromSolidityAddress added in v2.7.0

func DelegatableContractIDFromSolidityAddress(s string) (DelegatableContractID, error)

DelegatableContractIDFromSolidityAddress constructs a DelegatableContractID from a string representation of a _Solidity address Does not populate DelegatableContractID.EvmAddress

func DelegatableContractIDFromString added in v2.7.0

func DelegatableContractIDFromString(data string) (DelegatableContractID, error)

DelegatableContractIDFromString constructs a DelegatableContractID from a string formatted as `Shard.Realm.Contract` (for example "0.0.3")

func (DelegatableContractID) String added in v2.7.0

func (id DelegatableContractID) String() string

String returns the string representation of a DelegatableContractID formatted as `Shard.Realm.Contract` (for example "0.0.3")

func (DelegatableContractID) ToBytes added in v2.7.0

func (id DelegatableContractID) ToBytes() []byte

ToBytes returns a byte array representation of the DelegatableContractID

func (DelegatableContractID) ToSolidityAddress added in v2.7.0

func (id DelegatableContractID) ToSolidityAddress() string

ToSolidityAddress returns the string representation of the DelegatableContractID as a _Solidity address.

func (DelegatableContractID) ToStringWithChecksum added in v2.7.0

func (id DelegatableContractID) ToStringWithChecksum(client Client) (string, error)

ToStringWithChecksum returns the string representation of a DelegatableContractID formatted as `Shard.Realm.Contract-Checksum` (for example "0.0.3-abcde")

func (*DelegatableContractID) ValidateChecksum added in v2.7.0

func (id *DelegatableContractID) ValidateChecksum(client *Client) error

Verify that the client has a valid checksum.

type EntityID

type EntityID interface {
	// contains filtered or unexported methods
}

EntityID is an interface for various IDs of entities (Account, Contract, File, etc)

type ErrBadKey

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

ErrBadKey is returned if a key is provided in an invalid format or structure

func (ErrBadKey) Error

func (e ErrBadKey) Error() string

Error() implements the Error interface

type ErrHederaNetwork

type ErrHederaNetwork struct {

	// GRPC Status Code
	StatusCode *codes.Code
	// contains filtered or unexported fields
}

ErrHederaNetwork is returned in cases where the Hedera _Network cannot be reached or a _Network-side error occurs.

func (ErrHederaNetwork) Error

func (e ErrHederaNetwork) Error() string

Error() implements the Error interface

type ErrHederaPreCheckStatus

type ErrHederaPreCheckStatus struct {
	TxID   TransactionID
	Status Status
}

ErrHederaPreCheckStatus is returned by Transaction.Execute and QueryBuilder.Execute if an exceptional status is returned during _Network side validation of the sent transaction.

func (ErrHederaPreCheckStatus) Error

func (e ErrHederaPreCheckStatus) Error() string

Error() implements the Error interface

type ErrHederaReceiptStatus

type ErrHederaReceiptStatus struct {
	TxID    TransactionID
	Status  Status
	Receipt TransactionReceipt
}

ErrHederaReceiptStatus is returned by TransactionID.GetReceipt if the status of the receipt is exceptional.

func (ErrHederaReceiptStatus) Error

func (e ErrHederaReceiptStatus) Error() string

Error() implements the Error interface

type ErrHederaRecordStatus

type ErrHederaRecordStatus struct {
	TxID   TransactionID
	Status Status
}

ErrHederaRecordStatus is returned by TransactionID.GetRecord if the status of the record is exceptional.

func (ErrHederaRecordStatus) Error

func (e ErrHederaRecordStatus) Error() string

Error() implements the Error interface

type ErrInvalidNodeAccountIDSet

type ErrInvalidNodeAccountIDSet struct {
	NodeAccountID AccountID
}

func (ErrInvalidNodeAccountIDSet) Error

func (err ErrInvalidNodeAccountIDSet) Error() string

type ErrLocalValidation

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

ErrLocalValidation is returned by TransactionBuilder.Build(*Client) and QueryBuilder.Execute(*Client) if the constructed transaction or query fails local sanity checks.

func (ErrLocalValidation) Error

func (e ErrLocalValidation) Error() string

Error() implements the Error interface

type ErrMaxChunksExceeded

type ErrMaxChunksExceeded struct {
	Chunks    uint64
	MaxChunks uint64
}

func (ErrMaxChunksExceeded) Error

func (err ErrMaxChunksExceeded) Error() string

type ErrMaxQueryPaymentExceeded

type ErrMaxQueryPaymentExceeded struct {
	// The cost of the query that was attempted as returned by QueryBuilder.GetCost
	QueryCost Hbar
	// The limit for a single automatic query payment, set by
	// Client.SetMaxQueryPayment(int64) or QueryBuilder.SetMaxQueryPayment(uint64).
	MaxQueryPayment Hbar
	// contains filtered or unexported fields
}

ErrMaxQueryPaymentExceeded is returned during query execution if the total cost of the query + estimated fees exceeds the max query payment threshold set on the client or QueryBuilder.

func (ErrMaxQueryPaymentExceeded) Error

Error() implements the Error interface

type EthereumFlow added in v2.15.0

type EthereumFlow struct {
	Transaction
	// contains filtered or unexported fields
}

Execute an Ethereum transaction on Hedera

func NewEthereumFlow added in v2.15.0

func NewEthereumFlow() *EthereumFlow

Execute an Ethereum transaction on Hedera

func (*EthereumFlow) Execute added in v2.15.0

func (transaction *EthereumFlow) Execute(client *Client) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*EthereumFlow) GetCallDataFileID added in v2.15.0

func (transaction *EthereumFlow) GetCallDataFileID() FileID

GetCallDataFileID returns the file ID containing the call data.

func (*EthereumFlow) GetEthereumData added in v2.15.0

func (transaction *EthereumFlow) GetEthereumData() *EthereumTransactionData

GetEthreumData returns the data of the Ethereum transaction

func (*EthereumFlow) GetGrpcDeadline added in v2.34.0

func (e *EthereumFlow) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*EthereumFlow) GetLogLevel added in v2.34.0

func (e *EthereumFlow) GetLogLevel() *LogLevel

func (*EthereumFlow) GetMaxBackoff added in v2.34.0

func (e *EthereumFlow) GetMaxBackoff() time.Duration

func (*EthereumFlow) GetMaxGasAllowance added in v2.15.0

func (transaction *EthereumFlow) GetMaxGasAllowance() Hbar

GetMaxGasAllowance returns the maximum gas allowance for the transaction.

func (*EthereumFlow) GetMaxRetry added in v2.34.0

func (e *EthereumFlow) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*EthereumFlow) GetMinBackoff added in v2.34.0

func (e *EthereumFlow) GetMinBackoff() time.Duration

func (*EthereumFlow) GetNodeAccountIDs added in v2.15.0

func (transaction *EthereumFlow) GetNodeAccountIDs() []AccountID

GetNodeAccountIDs returns the node account IDs for this Ethereum transaction.

func (*EthereumFlow) SetCallDataFileID added in v2.15.0

func (transaction *EthereumFlow) SetCallDataFileID(callData FileID) *EthereumFlow

SetCallDataFileID sets the file ID containing the call data.

func (*EthereumFlow) SetEthereumData added in v2.15.0

func (transaction *EthereumFlow) SetEthereumData(data *EthereumTransactionData) *EthereumFlow

SetEthereumData sets the raw Ethereum transaction.

func (*EthereumFlow) SetEthereumDataBytes added in v2.15.0

func (transaction *EthereumFlow) SetEthereumDataBytes(data []byte) *EthereumFlow

SetEthereumDataBytes sets the raw Ethereum transaction.

func (*EthereumFlow) SetGrpcDeadline added in v2.34.0

func (e *EthereumFlow) SetGrpcDeadline(deadline *time.Duration) *executable

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*EthereumFlow) SetLogLevel added in v2.34.0

func (e *EthereumFlow) SetLogLevel(level LogLevel) *executable

func (*EthereumFlow) SetMaxBackoff added in v2.34.0

func (e *EthereumFlow) SetMaxBackoff(max time.Duration) *executable

func (*EthereumFlow) SetMaxGasAllowance added in v2.15.0

func (transaction *EthereumFlow) SetMaxGasAllowance(max Hbar) *EthereumFlow

SetMaxGasAllowance sets the maximum gas allowance for the transaction.

func (*EthereumFlow) SetMaxRetry added in v2.34.0

func (e *EthereumFlow) SetMaxRetry(max int) *executable

func (*EthereumFlow) SetMinBackoff added in v2.34.0

func (e *EthereumFlow) SetMinBackoff(min time.Duration) *executable

func (*EthereumFlow) SetNodeAccountIDs added in v2.15.0

func (transaction *EthereumFlow) SetNodeAccountIDs(nodes []AccountID) *EthereumFlow

SetNodeAccountIDs sets the node account IDs for this Ethereum transaction.

type EthereumTransaction added in v2.14.0

type EthereumTransaction struct {
	Transaction

	MaxGasAllowed int64
	// contains filtered or unexported fields
}

EthereumTransaction is used to create a EthereumTransaction transaction which can be used to construct and execute a Ethereum Transaction.

func NewEthereumTransaction added in v2.14.0

func NewEthereumTransaction() *EthereumTransaction

NewEthereumTransaction creates a EthereumTransaction transaction which can be used to construct and execute a Ethereum Transaction.

func (*EthereumTransaction) AddSignature added in v2.14.0

func (tx *EthereumTransaction) AddSignature(publicKey PublicKey, signature []byte) *EthereumTransaction

AddSignature adds a signature to the transaction.

func (*EthereumTransaction) Execute added in v2.14.0

func (tx *EthereumTransaction) Execute(client *Client) (TransactionResponse, error)

func (*EthereumTransaction) Freeze added in v2.14.0

func (*EthereumTransaction) FreezeWith added in v2.14.0

func (tx *EthereumTransaction) FreezeWith(client *Client) (*EthereumTransaction, error)

func (*EthereumTransaction) GetCallData added in v2.14.0

func (tx *EthereumTransaction) GetCallData() FileID

GetCallData For large transactions (for example contract create) this is the callData of the ethereumData. The data in the ethereumData will be re-written with the callData element as a zero length string with the original contents in the referenced file at time of execution. The ethereumData will need to be "rehydrated" with the callData for signature validation to pass.

func (*EthereumTransaction) GetEthereumData added in v2.14.0

func (tx *EthereumTransaction) GetEthereumData() []byte

GetEthereumData returns the raw Ethereum transaction (RLP encoded type 0, 1, and 2).

func (*EthereumTransaction) GetGrpcDeadline added in v2.34.0

func (e *EthereumTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*EthereumTransaction) GetLogLevel added in v2.34.0

func (e *EthereumTransaction) GetLogLevel() *LogLevel

func (*EthereumTransaction) GetMaxBackoff added in v2.14.0

func (e *EthereumTransaction) GetMaxBackoff() time.Duration

func (*EthereumTransaction) GetMaxGasAllowed added in v2.14.0

func (tx *EthereumTransaction) GetMaxGasAllowed() int64

GetMaxGasAllowed returns the maximum amount, that the payer of the hedera transaction is willing to pay to complete the transaction.

func (*EthereumTransaction) GetMaxRetry added in v2.34.0

func (e *EthereumTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*EthereumTransaction) GetMinBackoff added in v2.14.0

func (e *EthereumTransaction) GetMinBackoff() time.Duration

func (*EthereumTransaction) GetNodeAccountIDs added in v2.34.0

func (e *EthereumTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*EthereumTransaction) GetRegenerateTransactionID added in v2.14.0

func (tx *EthereumTransaction) GetRegenerateTransactionID() bool

GetRegenerateTransactionID returns true if transaction ID regeneration is enabled.

func (*EthereumTransaction) GetTransactionMemo added in v2.14.0

func (tx *EthereumTransaction) GetTransactionMemo() string

GetTransactionMemo returns the memo for this EthereumTransaction.

func (*EthereumTransaction) Schedule added in v2.34.0

func (*EthereumTransaction) SetCallData added in v2.14.0

func (tx *EthereumTransaction) SetCallData(file FileID) *EthereumTransaction

Deprecated

func (*EthereumTransaction) SetCallDataFileID added in v2.15.0

func (tx *EthereumTransaction) SetCallDataFileID(file FileID) *EthereumTransaction

SetCallDataFileID sets the file ID containing the call data.

func (*EthereumTransaction) SetEthereumData added in v2.14.0

func (tx *EthereumTransaction) SetEthereumData(data []byte) *EthereumTransaction

SetEthereumData The raw Ethereum transaction (RLP encoded type 0, 1, and 2). Complete unless the callData field is set.

func (*EthereumTransaction) SetGrpcDeadline added in v2.17.2

func (tx *EthereumTransaction) SetGrpcDeadline(deadline *time.Duration) *EthereumTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*EthereumTransaction) SetLogLevel added in v2.34.0

func (tx *EthereumTransaction) SetLogLevel(level LogLevel) *EthereumTransaction

func (*EthereumTransaction) SetMaxBackoff added in v2.14.0

func (tx *EthereumTransaction) SetMaxBackoff(max time.Duration) *EthereumTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*EthereumTransaction) SetMaxGasAllowanceHbar added in v2.15.0

func (tx *EthereumTransaction) SetMaxGasAllowanceHbar(gas Hbar) *EthereumTransaction

SetMaxGasAllowanceHbar sets the maximum amount, that the payer of the hedera transaction is willing to pay to complete the transaction.

func (*EthereumTransaction) SetMaxGasAllowed added in v2.14.0

func (tx *EthereumTransaction) SetMaxGasAllowed(gas int64) *EthereumTransaction

SetMaxGasAllowed The maximum amount, in tinybars, that the payer of the hedera transaction is willing to pay to complete the transaction.

func (*EthereumTransaction) SetMaxRetry added in v2.14.0

func (tx *EthereumTransaction) SetMaxRetry(count int) *EthereumTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*EthereumTransaction) SetMaxTransactionFee added in v2.14.0

func (tx *EthereumTransaction) SetMaxTransactionFee(fee Hbar) *EthereumTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*EthereumTransaction) SetMinBackoff added in v2.14.0

func (tx *EthereumTransaction) SetMinBackoff(min time.Duration) *EthereumTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*EthereumTransaction) SetNodeAccountIDs added in v2.14.0

func (tx *EthereumTransaction) SetNodeAccountIDs(nodeID []AccountID) *EthereumTransaction

SetNodeAccountIDs sets the _Node AccountID for this EthereumTransaction.

func (*EthereumTransaction) SetRegenerateTransactionID added in v2.14.0

func (tx *EthereumTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *EthereumTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*EthereumTransaction) SetTransactionID added in v2.14.0

func (tx *EthereumTransaction) SetTransactionID(transactionID TransactionID) *EthereumTransaction

SetTransactionID sets the TransactionID for this EthereumTransaction.

func (*EthereumTransaction) SetTransactionMemo added in v2.14.0

func (tx *EthereumTransaction) SetTransactionMemo(memo string) *EthereumTransaction

SetTransactionMemo sets the memo for this EthereumTransaction.

func (*EthereumTransaction) SetTransactionValidDuration added in v2.14.0

func (tx *EthereumTransaction) SetTransactionValidDuration(duration time.Duration) *EthereumTransaction

SetTransactionValidDuration sets the valid duration for this EthereumTransaction.

func (*EthereumTransaction) Sign added in v2.14.0

func (tx *EthereumTransaction) Sign(
	privateKey PrivateKey,
) *EthereumTransaction

Sign uses the provided privateKey to sign the transaction.

func (*EthereumTransaction) SignWith added in v2.14.0

func (tx *EthereumTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *EthereumTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*EthereumTransaction) SignWithOperator added in v2.14.0

func (tx *EthereumTransaction) SignWithOperator(
	client *Client,
) (*EthereumTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type EthereumTransactionData added in v2.15.0

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

Represents the data of an Ethereum transaction.

func EthereumTransactionDataFromBytes added in v2.15.0

func EthereumTransactionDataFromBytes(b []byte) (*EthereumTransactionData, error)

EthereumTransactionDataFromBytes constructs an EthereumTransactionData from a raw byte array.

func EthereumTransactionDataFromJson added in v2.15.0

func EthereumTransactionDataFromJson(b []byte) (*EthereumTransactionData, error)

EthereumTransactionDataFromJson constructs an EthereumTransactionData from a JSON string.

func (*EthereumTransactionData) ToBytes added in v2.15.0

func (ethereumTxData *EthereumTransactionData) ToBytes() ([]byte, error)

ToBytes returns the raw bytes of the Ethereum transaction.

func (*EthereumTransactionData) ToJson added in v2.15.0

func (ethereumTxData *EthereumTransactionData) ToJson() ([]byte, error)

ToJson returns a JSON representation of the Ethereum transaction.

type ExchangeRate

type ExchangeRate struct {
	Hbars int32
	// contains filtered or unexported fields
}

ExchangeRate is the exchange rate between HBAR and USD

func ExchangeRateFromBytes added in v2.5.0

func ExchangeRateFromBytes(data []byte) (ExchangeRate, error)

ExchangeRateFromString returns an ExchangeRate from a string representation of the exchange rate

func (*ExchangeRate) String added in v2.5.0

func (exchange *ExchangeRate) String() string

String returns a string representation of the ExchangeRate

func (*ExchangeRate) ToBytes added in v2.5.0

func (exchange *ExchangeRate) ToBytes() []byte

ToBytes returns the byte representation of the ExchangeRate

type Executable added in v2.34.0

type Executable interface {
	GetMaxBackoff() time.Duration
	GetMinBackoff() time.Duration
	GetGrpcDeadline() *time.Duration
	GetMaxRetry() int
	GetNodeAccountIDs() []AccountID
	GetLogLevel() *LogLevel
	// contains filtered or unexported methods
}

type Fee added in v2.1.11

type Fee interface {
	// contains filtered or unexported methods
}

func CustomFeeFromBytes added in v2.1.11

func CustomFeeFromBytes(data []byte) (Fee, error)

CustomFeeFromBytes returns a CustomFee from a raw protobuf byte array

type FeeAssessmentMethod added in v2.1.14

type FeeAssessmentMethod bool
const (
	FeeAssessmentMethodInclusive FeeAssessmentMethod = false
	FeeAssessmentMethodExclusive FeeAssessmentMethod = true
)

func (FeeAssessmentMethod) String added in v2.1.14

func (assessment FeeAssessmentMethod) String() string

String returns a string representation of the FeeAssessmentMethod

type FeeComponents added in v2.1.11

type FeeComponents struct {
	Min                        int64
	Max                        int64
	Constant                   int64
	TransactionBandwidthByte   int64
	TransactionVerification    int64
	TransactionRamByteHour     int64
	TransactionStorageByteHour int64
	ContractTransactionGas     int64
	TransferVolumeHbar         int64
	ResponseMemoryByte         int64
	ResponseDiscByte           int64
}

nolint

func FeeComponentsFromBytes added in v2.1.11

func FeeComponentsFromBytes(data []byte) (FeeComponents, error)

FeeComponentsFromBytes returns the FeeComponents from a byte array representation

func (FeeComponents) String added in v2.1.11

func (feeComponents FeeComponents) String() string

String returns a string representation of the FeeComponents

func (FeeComponents) ToBytes added in v2.1.11

func (feeComponents FeeComponents) ToBytes() []byte

ToBytes returns the byte representation of the FeeComponents

type FeeData added in v2.1.11

type FeeData struct {
	NodeData    *FeeComponents
	NetworkData *FeeComponents
	ServiceData *FeeComponents
}

func FeeDataFromBytes added in v2.1.11

func FeeDataFromBytes(data []byte) (FeeData, error)

FeeDataFromBytes returns a FeeData struct from a raw byte array

func (FeeData) String added in v2.1.11

func (feeData FeeData) String() string

String returns a string representation of the FeeData

func (FeeData) ToBytes added in v2.1.11

func (feeData FeeData) ToBytes() []byte

ToBytes returns the byte representation of the FeeData

type FeeSchedule added in v2.1.11

type FeeSchedule struct {
	TransactionFeeSchedules []TransactionFeeSchedule
	ExpirationTime          *time.Time
}

func FeeScheduleFromBytes added in v2.1.11

func FeeScheduleFromBytes(data []byte) (FeeSchedule, error)

FeeScheduleFromBytes returns a FeeSchedule from a raw protobuf byte array

func (FeeSchedule) String added in v2.1.11

func (feeSchedule FeeSchedule) String() string

String returns a string representation of the FeeSchedule

func (FeeSchedule) ToBytes added in v2.1.11

func (feeSchedule FeeSchedule) ToBytes() []byte

ToBytes returns the byte representation of the FeeSchedule

type FeeSchedules added in v2.1.11

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

func FeeSchedulesFromBytes added in v2.1.11

func FeeSchedulesFromBytes(data []byte) (FeeSchedules, error)

FeeSchedulesFromBytes returns a FeeSchedules object from a raw byte array

func (FeeSchedules) String added in v2.1.11

func (feeSchedules FeeSchedules) String() string

String returns a string representation of the FeeSchedules

func (FeeSchedules) ToBytes added in v2.1.11

func (feeSchedules FeeSchedules) ToBytes() []byte

ToBytes returns the byte representation of the FeeSchedules

type FileAppendTransaction

type FileAppendTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

FileAppendTransaction appends the given contents to the end of the file. If a file is too big to create with a single FileCreateTransaction, then it can be created with the first part of its contents, and then appended multiple times to create the entire file.

func NewFileAppendTransaction

func NewFileAppendTransaction() *FileAppendTransaction

NewFileAppendTransaction creates a FileAppendTransaction transaction which can be used to construct and execute a File Append Transaction.

func (*FileAppendTransaction) AddSignature added in v2.1.3

func (tx *FileAppendTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileAppendTransaction

AddSignature adds a signature to the transaction.

func (*FileAppendTransaction) Execute

func (tx *FileAppendTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*FileAppendTransaction) ExecuteAll added in v2.1.2

func (tx *FileAppendTransaction) ExecuteAll(
	client *Client,
) ([]TransactionResponse, error)

ExecuteAll executes the all the Transactions with the provided client

func (*FileAppendTransaction) Freeze

func (*FileAppendTransaction) FreezeWith

func (tx *FileAppendTransaction) FreezeWith(client *Client) (*FileAppendTransaction, error)

func (*FileAppendTransaction) GetContents

func (tx *FileAppendTransaction) GetContents() []byte

GetContents returns the bytes to append to the contents of the file.

func (*FileAppendTransaction) GetFileID

func (tx *FileAppendTransaction) GetFileID() FileID

GetFileID returns the FileID of the file to which the bytes are appended to.

func (*FileAppendTransaction) GetGrpcDeadline added in v2.34.0

func (e *FileAppendTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*FileAppendTransaction) GetLogLevel added in v2.34.0

func (e *FileAppendTransaction) GetLogLevel() *LogLevel

func (*FileAppendTransaction) GetMaxBackoff added in v2.1.16

func (e *FileAppendTransaction) GetMaxBackoff() time.Duration

func (*FileAppendTransaction) GetMaxChunkSize added in v2.8.0

func (tx *FileAppendTransaction) GetMaxChunkSize() int

GetMaxChunkSize returns maximum amount of chunks append function can create

func (*FileAppendTransaction) GetMaxChunks added in v2.17.6

func (tx *FileAppendTransaction) GetMaxChunks() uint64

GetMaxChunks returns the maximum number of chunks that can be created

func (*FileAppendTransaction) GetMaxRetry added in v2.34.0

func (e *FileAppendTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*FileAppendTransaction) GetMinBackoff added in v2.1.16

func (e *FileAppendTransaction) GetMinBackoff() time.Duration

func (*FileAppendTransaction) GetNodeAccountIDs

func (e *FileAppendTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*FileAppendTransaction) Schedule added in v2.1.5

func (*FileAppendTransaction) SetContents

func (tx *FileAppendTransaction) SetContents(contents []byte) *FileAppendTransaction

SetContents sets the bytes to append to the contents of the file.

func (*FileAppendTransaction) SetFileID

func (tx *FileAppendTransaction) SetFileID(fileID FileID) *FileAppendTransaction

SetFileID sets the FileID of the file to which the bytes are appended to.

func (*FileAppendTransaction) SetGrpcDeadline added in v2.11.0

func (tx *FileAppendTransaction) SetGrpcDeadline(deadline *time.Duration) *FileAppendTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*FileAppendTransaction) SetLogLevel added in v2.25.0

func (tx *FileAppendTransaction) SetLogLevel(level LogLevel) *FileAppendTransaction

func (*FileAppendTransaction) SetMaxBackoff added in v2.1.16

func (tx *FileAppendTransaction) SetMaxBackoff(max time.Duration) *FileAppendTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*FileAppendTransaction) SetMaxChunkSize added in v2.8.0

func (tx *FileAppendTransaction) SetMaxChunkSize(size int) *FileAppendTransaction

SetMaxChunkSize Sets maximum amount of chunks append function can create

func (*FileAppendTransaction) SetMaxChunks added in v2.17.6

func (tx *FileAppendTransaction) SetMaxChunks(size uint64) *FileAppendTransaction

SetMaxChunks sets the maximum number of chunks that can be created

func (*FileAppendTransaction) SetMaxRetry added in v2.1.2

func (tx *FileAppendTransaction) SetMaxRetry(count int) *FileAppendTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*FileAppendTransaction) SetMaxTransactionFee

func (tx *FileAppendTransaction) SetMaxTransactionFee(fee Hbar) *FileAppendTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*FileAppendTransaction) SetMinBackoff added in v2.1.16

func (tx *FileAppendTransaction) SetMinBackoff(min time.Duration) *FileAppendTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*FileAppendTransaction) SetNodeAccountIDs

func (tx *FileAppendTransaction) SetNodeAccountIDs(nodeAccountIDs []AccountID) *FileAppendTransaction

SetNodeAccountID sets the _Node AccountID for this FileAppendTransaction.

func (*FileAppendTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *FileAppendTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *FileAppendTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*FileAppendTransaction) SetTransactionID

func (tx *FileAppendTransaction) SetTransactionID(transactionID TransactionID) *FileAppendTransaction

SetTransactionID sets the TransactionID for this FileAppendTransaction.

func (*FileAppendTransaction) SetTransactionMemo

func (tx *FileAppendTransaction) SetTransactionMemo(memo string) *FileAppendTransaction

SetTransactionMemo sets the memo for this FileAppendTransaction.

func (*FileAppendTransaction) SetTransactionValidDuration

func (tx *FileAppendTransaction) SetTransactionValidDuration(duration time.Duration) *FileAppendTransaction

SetTransactionValidDuration sets the valid duration for this FileAppendTransaction.

func (*FileAppendTransaction) Sign

func (tx *FileAppendTransaction) Sign(
	privateKey PrivateKey,
) *FileAppendTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileAppendTransaction) SignWith

func (tx *FileAppendTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *FileAppendTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*FileAppendTransaction) SignWithOperator

func (tx *FileAppendTransaction) SignWithOperator(
	client *Client,
) (*FileAppendTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type FileContentsQuery

type FileContentsQuery struct {
	Query
	// contains filtered or unexported fields
}

FileContentsQuery retrieves the contents of a file.

func NewFileContentsQuery

func NewFileContentsQuery() *FileContentsQuery

NewFileContentsQuery creates a FileContentsQuery which retrieves the contents of a file.

func (*FileContentsQuery) Execute

func (q *FileContentsQuery) Execute(client *Client) ([]byte, error)

Execute executes the Query with the provided client

func (*FileContentsQuery) GetCost

func (q *FileContentsQuery) GetCost(client *Client) (Hbar, error)

func (*FileContentsQuery) GetFileID

func (q *FileContentsQuery) GetFileID() FileID

GetFileID returns the FileID of the file whose contents are requested.

func (*FileContentsQuery) GetGrpcDeadline added in v2.34.0

func (e *FileContentsQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*FileContentsQuery) GetLogLevel added in v2.34.0

func (e *FileContentsQuery) GetLogLevel() *LogLevel

func (*FileContentsQuery) GetMaxBackoff added in v2.1.16

func (e *FileContentsQuery) GetMaxBackoff() time.Duration

func (*FileContentsQuery) GetMaxRetry added in v2.34.0

func (e *FileContentsQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*FileContentsQuery) GetMinBackoff added in v2.1.16

func (e *FileContentsQuery) GetMinBackoff() time.Duration

func (*FileContentsQuery) GetNodeAccountIDs

func (e *FileContentsQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*FileContentsQuery) SetFileID

func (q *FileContentsQuery) SetFileID(fileID FileID) *FileContentsQuery

SetFileID sets the FileID of the file whose contents are requested.

func (*FileContentsQuery) SetGrpcDeadline added in v2.11.0

func (q *FileContentsQuery) SetGrpcDeadline(deadline *time.Duration) *FileContentsQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*FileContentsQuery) SetLogLevel added in v2.25.0

func (q *FileContentsQuery) SetLogLevel(level LogLevel) *FileContentsQuery

func (*FileContentsQuery) SetMaxBackoff added in v2.1.16

func (q *FileContentsQuery) SetMaxBackoff(max time.Duration) *FileContentsQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*FileContentsQuery) SetMaxQueryPayment

func (q *FileContentsQuery) SetMaxQueryPayment(maxPayment Hbar) *FileContentsQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*FileContentsQuery) SetMaxRetry added in v2.1.2

func (q *FileContentsQuery) SetMaxRetry(count int) *FileContentsQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*FileContentsQuery) SetMinBackoff added in v2.1.16

func (q *FileContentsQuery) SetMinBackoff(min time.Duration) *FileContentsQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*FileContentsQuery) SetNodeAccountIDs

func (q *FileContentsQuery) SetNodeAccountIDs(accountID []AccountID) *FileContentsQuery

SetNodeAccountIDs sets the _Node AccountID for this FileContentsQuery.

func (*FileContentsQuery) SetPaymentTransactionID added in v2.11.0

func (q *FileContentsQuery) SetPaymentTransactionID(transactionID TransactionID) *FileContentsQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*FileContentsQuery) SetQueryPayment

func (q *FileContentsQuery) SetQueryPayment(paymentAmount Hbar) *FileContentsQuery

SetQueryPayment sets the payment amount for this Query.

type FileCreateTransaction

type FileCreateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

FileCreateTransaction creates a new file, containing the given contents. It is referenced by its FileID, and does not have a filename, so it is important to get and hold onto the FileID. After the file is created, the FileID for it can be found in the receipt, or retrieved with a GetByKey query, or by asking for a Record of the transaction to be created, and retrieving that.

See FileInfoQuery for more information about files.

The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms and multiple shards.

func NewFileCreateTransaction

func NewFileCreateTransaction() *FileCreateTransaction

NewFileCreateTransaction creates a FileCreateTransaction which creates a new file, containing the given contents. It is referenced by its FileID, and does not have a filename, so it is important to get and hold onto the FileID. After the file is created, the FileID for it can be found in the receipt, or retrieved with a GetByKey query, or by asking for a Record of the transaction to be created, and retrieving that.

See FileInfoQuery for more information about files.

The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms and multiple shards.

func (*FileCreateTransaction) AddSignature added in v2.1.3

func (tx *FileCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileCreateTransaction

AddSignature adds a signature to the transaction.

func (*FileCreateTransaction) Execute

func (tx *FileCreateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*FileCreateTransaction) Freeze

func (*FileCreateTransaction) FreezeWith

func (tx *FileCreateTransaction) FreezeWith(client *Client) (*FileCreateTransaction, error)

func (*FileCreateTransaction) GetContents

func (tx *FileCreateTransaction) GetContents() []byte

GetContents returns the bytes that are the contents of the file (which can be empty).

func (*FileCreateTransaction) GetExpirationTime

func (tx *FileCreateTransaction) GetExpirationTime() time.Time

func (*FileCreateTransaction) GetGrpcDeadline added in v2.34.0

func (e *FileCreateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*FileCreateTransaction) GetKeys

func (tx *FileCreateTransaction) GetKeys() KeyList

func (*FileCreateTransaction) GetLogLevel added in v2.34.0

func (e *FileCreateTransaction) GetLogLevel() *LogLevel

func (*FileCreateTransaction) GetMaxBackoff added in v2.1.16

func (e *FileCreateTransaction) GetMaxBackoff() time.Duration

func (*FileCreateTransaction) GetMaxRetry added in v2.34.0

func (e *FileCreateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*FileCreateTransaction) GetMemo added in v2.1.16

func (tx *FileCreateTransaction) GetMemo() string

GetMemo returns the memo associated with the file (UTF-8 encoding max 100 bytes)

func (*FileCreateTransaction) GetMinBackoff added in v2.1.16

func (e *FileCreateTransaction) GetMinBackoff() time.Duration

func (*FileCreateTransaction) GetNodeAccountIDs

func (e *FileCreateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*FileCreateTransaction) Schedule added in v2.1.5

func (*FileCreateTransaction) SetContents

func (tx *FileCreateTransaction) SetContents(contents []byte) *FileCreateTransaction

SetContents sets the bytes that are the contents of the file (which can be empty). If the size of the file and other fields in the transaction exceed the max transaction size then FileCreateTransaction can be used to continue uploading the file.

func (*FileCreateTransaction) SetExpirationTime

func (tx *FileCreateTransaction) SetExpirationTime(expiration time.Time) *FileCreateTransaction

SetExpirationTime sets the time at which this file should expire (unless FileUpdateTransaction is used before then to extend its life). The file will automatically disappear at the fileExpirationTime, unless its expiration is extended by another transaction before that time. If the file is deleted, then its contents will become empty and it will be marked as deleted until it expires, and then it will cease to exist.

func (*FileCreateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *FileCreateTransaction) SetGrpcDeadline(deadline *time.Duration) *FileCreateTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*FileCreateTransaction) SetKeys

func (tx *FileCreateTransaction) SetKeys(keys ...Key) *FileCreateTransaction

AddKey adds a key to the internal list of keys associated with the file. All of the keys on the list must sign to create or modify a file, but only one of them needs to sign in order to delete the file. Each of those "keys" may itself be threshold key containing other keys (including other threshold keys). In other words, the behavior is an AND for create/modify, OR for delete. This is useful for acting as a revocation server. If it is desired to have the behavior be AND for all 3 operations (or OR for all 3), then the list should have only a single Key, which is a threshold key, with N=1 for OR, N=M for AND.

If a file is created without adding ANY keys, the file is immutable and ONLY the expirationTime of the file can be changed using FileUpdateTransaction. The file contents or its keys will not be mutable.

func (*FileCreateTransaction) SetLogLevel added in v2.25.0

func (tx *FileCreateTransaction) SetLogLevel(level LogLevel) *FileCreateTransaction

func (*FileCreateTransaction) SetMaxBackoff added in v2.1.16

func (tx *FileCreateTransaction) SetMaxBackoff(max time.Duration) *FileCreateTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*FileCreateTransaction) SetMaxRetry added in v2.1.2

func (tx *FileCreateTransaction) SetMaxRetry(count int) *FileCreateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*FileCreateTransaction) SetMaxTransactionFee

func (tx *FileCreateTransaction) SetMaxTransactionFee(fee Hbar) *FileCreateTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*FileCreateTransaction) SetMemo added in v2.1.16

SetMemo Sets the memo associated with the file (UTF-8 encoding max 100 bytes)

func (*FileCreateTransaction) SetMinBackoff added in v2.1.16

func (tx *FileCreateTransaction) SetMinBackoff(min time.Duration) *FileCreateTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*FileCreateTransaction) SetNodeAccountIDs

func (tx *FileCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *FileCreateTransaction

SetNodeAccountID sets the _Node AccountID for this FileCreateTransaction.

func (*FileCreateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *FileCreateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *FileCreateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*FileCreateTransaction) SetTransactionID

func (tx *FileCreateTransaction) SetTransactionID(transactionID TransactionID) *FileCreateTransaction

SetTransactionID sets the TransactionID for this FileCreateTransaction.

func (*FileCreateTransaction) SetTransactionMemo

func (tx *FileCreateTransaction) SetTransactionMemo(memo string) *FileCreateTransaction

SetTransactionMemo sets the memo for this FileCreateTransaction.

func (*FileCreateTransaction) SetTransactionValidDuration

func (tx *FileCreateTransaction) SetTransactionValidDuration(duration time.Duration) *FileCreateTransaction

SetTransactionValidDuration sets the valid duration for this FileCreateTransaction.

func (*FileCreateTransaction) Sign

func (tx *FileCreateTransaction) Sign(
	privateKey PrivateKey,
) *FileCreateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileCreateTransaction) SignWith

func (tx *FileCreateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *FileCreateTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*FileCreateTransaction) SignWithOperator

func (tx *FileCreateTransaction) SignWithOperator(
	client *Client,
) (*FileCreateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type FileDeleteTransaction

type FileDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

FileDeleteTransaction Deletes the given file. After deletion, it will be marked as deleted and will have no contents. But information about it will continue to exist until it expires. A list of keys was given when the file was created. All the top level keys on that list must sign transactions to create or modify the file, but any single one of the top level keys can be used to delete the file. This transaction must be signed by 1-of-M KeyList keys. If keys contains additional KeyList or ThresholdKey then 1-of-M secondary KeyList or ThresholdKey signing requirements must be meet.

func NewFileDeleteTransaction

func NewFileDeleteTransaction() *FileDeleteTransaction

NewFileDeleteTransaction creates a FileDeleteTransaction which deletes the given file. After deletion, it will be marked as deleted and will have no contents. But information about it will continue to exist until it expires. A list of keys was given when the file was created. All the top level keys on that list must sign transactions to create or modify the file, but any single one of the top level keys can be used to delete the file. This transaction must be signed by 1-of-M KeyList keys. If keys contains additional KeyList or ThresholdKey then 1-of-M secondary KeyList or ThresholdKey signing requirements must be meet.

func (*FileDeleteTransaction) AddSignature added in v2.1.3

func (tx *FileDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileDeleteTransaction

AddSignature adds a signature to the transaction.

func (*FileDeleteTransaction) Execute

func (tx *FileDeleteTransaction) Execute(client *Client) (TransactionResponse, error)

func (*FileDeleteTransaction) Freeze

func (*FileDeleteTransaction) FreezeWith

func (tx *FileDeleteTransaction) FreezeWith(client *Client) (*FileDeleteTransaction, error)

func (*FileDeleteTransaction) GetFileID

func (tx *FileDeleteTransaction) GetFileID() FileID

GetFileID returns the FileID of the file to be deleted

func (*FileDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *FileDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*FileDeleteTransaction) GetLogLevel added in v2.34.0

func (e *FileDeleteTransaction) GetLogLevel() *LogLevel

func (*FileDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *FileDeleteTransaction) GetMaxBackoff() time.Duration

func (*FileDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *FileDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*FileDeleteTransaction) GetMaxTransactionFee

func (tx *FileDeleteTransaction) GetMaxTransactionFee() Hbar

GetMaxTransactionFee returns the maximum transaction fee the operator (paying account) is willing to pay.

func (*FileDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *FileDeleteTransaction) GetMinBackoff() time.Duration

func (*FileDeleteTransaction) GetNodeAccountIDs

func (e *FileDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*FileDeleteTransaction) Schedule added in v2.1.5

func (*FileDeleteTransaction) SetFileID

func (tx *FileDeleteTransaction) SetFileID(fileID FileID) *FileDeleteTransaction

SetFileID Sets the FileID of the file to be deleted

func (*FileDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *FileDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *FileDeleteTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*FileDeleteTransaction) SetLogLevel added in v2.25.0

func (tx *FileDeleteTransaction) SetLogLevel(level LogLevel) *FileDeleteTransaction

func (*FileDeleteTransaction) SetMaxBackoff added in v2.1.16

func (tx *FileDeleteTransaction) SetMaxBackoff(max time.Duration) *FileDeleteTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*FileDeleteTransaction) SetMaxRetry added in v2.1.2

func (tx *FileDeleteTransaction) SetMaxRetry(count int) *FileDeleteTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*FileDeleteTransaction) SetMaxTransactionFee

func (tx *FileDeleteTransaction) SetMaxTransactionFee(fee Hbar) *FileDeleteTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*FileDeleteTransaction) SetMinBackoff added in v2.1.16

func (tx *FileDeleteTransaction) SetMinBackoff(min time.Duration) *FileDeleteTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*FileDeleteTransaction) SetNodeAccountIDs

func (tx *FileDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *FileDeleteTransaction

SetNodeAccountID sets the _Node AccountID for this FileDeleteTransaction.

func (*FileDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *FileDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *FileDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*FileDeleteTransaction) SetTransactionID

func (tx *FileDeleteTransaction) SetTransactionID(transactionID TransactionID) *FileDeleteTransaction

SetTransactionID sets the TransactionID for this FileDeleteTransaction.

func (*FileDeleteTransaction) SetTransactionMemo

func (tx *FileDeleteTransaction) SetTransactionMemo(memo string) *FileDeleteTransaction

SetTransactionMemo sets the memo for this FileDeleteTransaction.

func (*FileDeleteTransaction) SetTransactionValidDuration

func (tx *FileDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *FileDeleteTransaction

SetTransactionValidDuration sets the valid duration for this FileDeleteTransaction.

func (*FileDeleteTransaction) Sign

func (tx *FileDeleteTransaction) Sign(
	privateKey PrivateKey,
) *FileDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileDeleteTransaction) SignWith

func (tx *FileDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *FileDeleteTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*FileDeleteTransaction) SignWithOperator

func (tx *FileDeleteTransaction) SignWithOperator(
	client *Client,
) (*FileDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type FileID

type FileID struct {
	Shard uint64
	Realm uint64
	File  uint64
	// contains filtered or unexported fields
}

A FileID is the ID for a file on the _Network.

func FileIDForAddressBook

func FileIDForAddressBook() FileID

FileIDForAddressBook returns the public node address book for the current network.

func FileIDForExchangeRate

func FileIDForExchangeRate() FileID

FileIDForExchangeRate returns the current exchange rates of HBAR to USD.

func FileIDForFeeSchedule

func FileIDForFeeSchedule() FileID

FileIDForFeeSchedule returns the current fee schedule for the network.

func FileIDFromBytes added in v2.1.3

func FileIDFromBytes(data []byte) (FileID, error)

FileIDFromBytes returns a FileID from a byte array

func FileIDFromSolidityAddress

func FileIDFromSolidityAddress(s string) (FileID, error)

FileIDFromSolidityAddress returns a FileID parsed from the given solidity address.

func FileIDFromString

func FileIDFromString(data string) (FileID, error)

FileIDFromString returns a FileID parsed from the given string. A malformatted string will cause this to return an error instead.

func (FileID) String

func (id FileID) String() string

String returns the string representation of a FileID in the format used within protobuf.

func (FileID) ToBytes added in v2.1.3

func (id FileID) ToBytes() []byte

ToBytes returns a byte array representation of the FileID

func (FileID) ToSolidityAddress

func (id FileID) ToSolidityAddress() string

ToSolidityAddress returns the string representation of a FileID in the format used by Solidity.

func (FileID) ToStringWithChecksum added in v2.1.13

func (id FileID) ToStringWithChecksum(client Client) (string, error)

ToStringWithChecksum returns the string representation of a FileId with checksum.

func (*FileID) Validate added in v2.1.8

func (id *FileID) Validate(client *Client) error

Deprecated - use ValidateChecksum instead

func (*FileID) ValidateChecksum added in v2.4.0

func (id *FileID) ValidateChecksum(client *Client) error

Verify that the client has a valid checksum.

type FileInfo

type FileInfo struct {
	FileID         FileID
	Size           int64
	ExpirationTime time.Time
	IsDeleted      bool
	Keys           KeyList
	FileMemo       string
	LedgerID       LedgerID
}

FileInfo contains the details about a file stored on Hedera

func FileInfoFromBytes added in v2.1.3

func FileInfoFromBytes(data []byte) (FileInfo, error)

FileInfoFromBytes returns a FileInfo object from a raw byte array

func (FileInfo) ToBytes added in v2.1.3

func (fileInfo FileInfo) ToBytes() []byte

ToBytes returns the byte representation of the FileInfo

type FileInfoQuery

type FileInfoQuery struct {
	Query
	// contains filtered or unexported fields
}

FileInfoQuery is a query which can be used to get all of the information about a file, except for its contents. When a file expires, it no longer exists, and there will be no info about it, and the fileInfo field will be blank. If a transaction or smart contract deletes the file, but it has not yet expired, then the fileInfo field will be non-empty, the deleted field will be true, its size will be 0, and its contents will be empty. Note that each file has a FileID, but does not have a filename.

func NewFileInfoQuery

func NewFileInfoQuery() *FileInfoQuery

NewFileInfoQuery creates a FileInfoQuery which can be used to get all of the information about a file, except for its contents.

func (*FileInfoQuery) Execute

func (q *FileInfoQuery) Execute(client *Client) (FileInfo, error)

Execute executes the Query with the provided client

func (*FileInfoQuery) GetCost

func (q *FileInfoQuery) GetCost(client *Client) (Hbar, error)

func (*FileInfoQuery) GetFileID

func (q *FileInfoQuery) GetFileID() FileID

GetFileID returns the FileID of the file whose info is requested.

func (*FileInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *FileInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*FileInfoQuery) GetLogLevel added in v2.34.0

func (e *FileInfoQuery) GetLogLevel() *LogLevel

func (*FileInfoQuery) GetMaxBackoff added in v2.1.16

func (e *FileInfoQuery) GetMaxBackoff() time.Duration

func (*FileInfoQuery) GetMaxRetry added in v2.34.0

func (e *FileInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*FileInfoQuery) GetMinBackoff added in v2.1.16

func (e *FileInfoQuery) GetMinBackoff() time.Duration

func (*FileInfoQuery) GetNodeAccountIDs added in v2.2.0

func (e *FileInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*FileInfoQuery) SetFileID

func (q *FileInfoQuery) SetFileID(fileID FileID) *FileInfoQuery

SetFileID sets the FileID of the file whose info is requested.

func (*FileInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *FileInfoQuery) SetGrpcDeadline(deadline *time.Duration) *FileInfoQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*FileInfoQuery) SetLogLevel added in v2.25.0

func (q *FileInfoQuery) SetLogLevel(level LogLevel) *FileInfoQuery

func (*FileInfoQuery) SetMaxBackoff added in v2.1.16

func (q *FileInfoQuery) SetMaxBackoff(max time.Duration) *FileInfoQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*FileInfoQuery) SetMaxQueryPayment

func (q *FileInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *FileInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*FileInfoQuery) SetMaxRetry added in v2.1.2

func (q *FileInfoQuery) SetMaxRetry(count int) *FileInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*FileInfoQuery) SetMinBackoff added in v2.1.16

func (q *FileInfoQuery) SetMinBackoff(min time.Duration) *FileInfoQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*FileInfoQuery) SetNodeAccountIDs added in v2.1.2

func (q *FileInfoQuery) SetNodeAccountIDs(accountID []AccountID) *FileInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this FileInfoQuery.

func (*FileInfoQuery) SetPaymentTransactionID added in v2.11.0

func (q *FileInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *FileInfoQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*FileInfoQuery) SetQueryPayment

func (q *FileInfoQuery) SetQueryPayment(paymentAmount Hbar) *FileInfoQuery

SetQueryPayment sets the payment amount for this Query.

type FileUpdateTransaction

type FileUpdateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

FileUpdateTransaction Modify the metadata and/or contents of a file. If a field is not set in the transaction body, the corresponding file attribute will be unchanged. This transaction must be signed by all the keys in the top level of a key list (M-of-M) of the file being updated. If the keys themselves are being updated, then the transaction must also be signed by all the new keys. If the keys contain additional KeyList or ThresholdKey then M-of-M secondary KeyList or ThresholdKey signing requirements must be meet

func NewFileUpdateTransaction

func NewFileUpdateTransaction() *FileUpdateTransaction

NewFileUpdateTransaction creates a FileUpdateTransaction which modifies the metadata and/or contents of a file. If a field is not set in the transaction body, the corresponding file attribute will be unchanged. tx transaction must be signed by all the keys in the top level of a key list (M-of-M) of the file being updated. If the keys themselves are being updated, then the transaction must also be signed by all the new keys. If the keys contain additional KeyList or ThresholdKey then M-of-M secondary KeyList or ThresholdKey signing requirements must be meet

func (*FileUpdateTransaction) AddSignature added in v2.1.3

func (tx *FileUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileUpdateTransaction

AddSignature adds a signature to the transaction.

func (*FileUpdateTransaction) Execute

func (tx *FileUpdateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*FileUpdateTransaction) Freeze

func (*FileUpdateTransaction) FreezeWith

func (tx *FileUpdateTransaction) FreezeWith(client *Client) (*FileUpdateTransaction, error)

func (*FileUpdateTransaction) GeFileMemo added in v2.1.5

func (tx *FileUpdateTransaction) GeFileMemo() string

GeFileMemo Deprecated: use GetFileMemo()

func (*FileUpdateTransaction) GetContents

func (tx *FileUpdateTransaction) GetContents() []byte

GetContents returns the new contents that should overwrite the file's current contents

func (*FileUpdateTransaction) GetExpirationTime

func (tx *FileUpdateTransaction) GetExpirationTime() time.Time

GetExpirationTime returns the new expiry time

func (*FileUpdateTransaction) GetFileID

func (tx *FileUpdateTransaction) GetFileID() FileID

GetFileID returns the FileID to be updated

func (*FileUpdateTransaction) GetFileMemo added in v2.13.2

func (tx *FileUpdateTransaction) GetFileMemo() string

func (*FileUpdateTransaction) GetGrpcDeadline added in v2.34.0

func (e *FileUpdateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*FileUpdateTransaction) GetKeys

func (tx *FileUpdateTransaction) GetKeys() KeyList

func (*FileUpdateTransaction) GetLogLevel added in v2.34.0

func (e *FileUpdateTransaction) GetLogLevel() *LogLevel

func (*FileUpdateTransaction) GetMaxBackoff added in v2.1.16

func (e *FileUpdateTransaction) GetMaxBackoff() time.Duration

func (*FileUpdateTransaction) GetMaxRetry added in v2.34.0

func (e *FileUpdateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*FileUpdateTransaction) GetMinBackoff added in v2.1.16

func (e *FileUpdateTransaction) GetMinBackoff() time.Duration

func (*FileUpdateTransaction) GetNodeAccountIDs

func (e *FileUpdateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*FileUpdateTransaction) Schedule added in v2.1.5

func (*FileUpdateTransaction) SetContents

func (tx *FileUpdateTransaction) SetContents(contents []byte) *FileUpdateTransaction

SetContents Sets the new contents that should overwrite the file's current contents

func (*FileUpdateTransaction) SetExpirationTime

func (tx *FileUpdateTransaction) SetExpirationTime(expiration time.Time) *FileUpdateTransaction

SetExpirationTime Sets the new expiry time

func (*FileUpdateTransaction) SetFileID

func (tx *FileUpdateTransaction) SetFileID(fileID FileID) *FileUpdateTransaction

SetFileID Sets the FileID to be updated

func (*FileUpdateTransaction) SetFileMemo added in v2.1.5

func (tx *FileUpdateTransaction) SetFileMemo(memo string) *FileUpdateTransaction

SetFileMemo Sets the new memo to be associated with the file (UTF-8 encoding max 100 bytes)

func (*FileUpdateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *FileUpdateTransaction) SetGrpcDeadline(deadline *time.Duration) *FileUpdateTransaction

When execution is attempted, a single attempt will timeout when tx deadline is reached. (The SDK may subsequently retry the execution.)

func (*FileUpdateTransaction) SetKeys

func (tx *FileUpdateTransaction) SetKeys(keys ...Key) *FileUpdateTransaction

SetKeys Sets the new list of keys that can modify or delete the file

func (*FileUpdateTransaction) SetLogLevel added in v2.25.0

func (tx *FileUpdateTransaction) SetLogLevel(level LogLevel) *FileUpdateTransaction

func (*FileUpdateTransaction) SetMaxBackoff added in v2.1.16

func (tx *FileUpdateTransaction) SetMaxBackoff(max time.Duration) *FileUpdateTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*FileUpdateTransaction) SetMaxRetry added in v2.1.2

func (tx *FileUpdateTransaction) SetMaxRetry(count int) *FileUpdateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*FileUpdateTransaction) SetMaxTransactionFee

func (tx *FileUpdateTransaction) SetMaxTransactionFee(fee Hbar) *FileUpdateTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*FileUpdateTransaction) SetMinBackoff added in v2.1.16

func (tx *FileUpdateTransaction) SetMinBackoff(min time.Duration) *FileUpdateTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*FileUpdateTransaction) SetNodeAccountIDs

func (tx *FileUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *FileUpdateTransaction

SetNodeAccountID sets the _Node AccountID for this FileUpdateTransaction.

func (*FileUpdateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *FileUpdateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *FileUpdateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*FileUpdateTransaction) SetTransactionID

func (tx *FileUpdateTransaction) SetTransactionID(transactionID TransactionID) *FileUpdateTransaction

SetTransactionID sets the TransactionID for this FileUpdateTransaction.

func (*FileUpdateTransaction) SetTransactionMemo

func (tx *FileUpdateTransaction) SetTransactionMemo(memo string) *FileUpdateTransaction

SetTransactionMemo sets the memo for this FileUpdateTransaction.

func (*FileUpdateTransaction) SetTransactionValidDuration

func (tx *FileUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *FileUpdateTransaction

SetTransactionValidDuration sets the valid duration for this FileUpdateTransaction.

func (*FileUpdateTransaction) Sign

func (tx *FileUpdateTransaction) Sign(
	privateKey PrivateKey,
) *FileUpdateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileUpdateTransaction) SignWith

func (tx *FileUpdateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *FileUpdateTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*FileUpdateTransaction) SignWithOperator

func (tx *FileUpdateTransaction) SignWithOperator(
	client *Client,
) (*FileUpdateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type FreezeTransaction

type FreezeTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

func NewFreezeTransaction

func NewFreezeTransaction() *FreezeTransaction

func (*FreezeTransaction) AddSignature added in v2.1.3

func (tx *FreezeTransaction) AddSignature(publicKey PublicKey, signature []byte) *FreezeTransaction

AddSignature adds a signature to the transaction.

func (*FreezeTransaction) Execute

func (tx *FreezeTransaction) Execute(client *Client) (TransactionResponse, error)

func (*FreezeTransaction) Freeze

func (tx *FreezeTransaction) Freeze() (*FreezeTransaction, error)

func (*FreezeTransaction) FreezeWith

func (tx *FreezeTransaction) FreezeWith(client *Client) (*FreezeTransaction, error)

func (*FreezeTransaction) GetEndTime

func (tx *FreezeTransaction) GetEndTime() time.Time

Deprecated

func (*FreezeTransaction) GetFileHash added in v2.1.16

func (tx *FreezeTransaction) GetFileHash() []byte

func (*FreezeTransaction) GetFileID added in v2.1.16

func (tx *FreezeTransaction) GetFileID() *FileID

func (*FreezeTransaction) GetFreezeType added in v2.3.0

func (tx *FreezeTransaction) GetFreezeType() FreezeType

func (*FreezeTransaction) GetGrpcDeadline added in v2.34.0

func (e *FreezeTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*FreezeTransaction) GetLogLevel added in v2.34.0

func (e *FreezeTransaction) GetLogLevel() *LogLevel

func (*FreezeTransaction) GetMaxBackoff added in v2.1.16

func (e *FreezeTransaction) GetMaxBackoff() time.Duration

func (*FreezeTransaction) GetMaxRetry added in v2.34.0

func (e *FreezeTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*FreezeTransaction) GetMaxTransactionFee

func (tx *FreezeTransaction) GetMaxTransactionFee() Hbar

GetMaxTransactionFee returns the maximum transaction fee the operator (paying account) is willing to pay.

func (*FreezeTransaction) GetMinBackoff added in v2.1.16

func (e *FreezeTransaction) GetMinBackoff() time.Duration

func (*FreezeTransaction) GetNodeAccountIDs

func (e *FreezeTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*FreezeTransaction) GetStartTime

func (tx *FreezeTransaction) GetStartTime() time.Time

func (*FreezeTransaction) Schedule added in v2.1.5

func (*FreezeTransaction) SetEndTime

func (tx *FreezeTransaction) SetEndTime(endTime time.Time) *FreezeTransaction

Deprecated

func (*FreezeTransaction) SetFileHash added in v2.1.16

func (tx *FreezeTransaction) SetFileHash(hash []byte) *FreezeTransaction

func (*FreezeTransaction) SetFileID added in v2.1.16

func (tx *FreezeTransaction) SetFileID(id FileID) *FreezeTransaction

func (*FreezeTransaction) SetFreezeType added in v2.3.0

func (tx *FreezeTransaction) SetFreezeType(freezeType FreezeType) *FreezeTransaction

func (*FreezeTransaction) SetGrpcDeadline added in v2.34.0

func (e *FreezeTransaction) SetGrpcDeadline(deadline *time.Duration) *executable

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*FreezeTransaction) SetLogLevel added in v2.25.0

func (tx *FreezeTransaction) SetLogLevel(level LogLevel) *FreezeTransaction

func (*FreezeTransaction) SetMaxBackoff added in v2.1.16

func (tx *FreezeTransaction) SetMaxBackoff(max time.Duration) *FreezeTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*FreezeTransaction) SetMaxRetry added in v2.1.2

func (tx *FreezeTransaction) SetMaxRetry(count int) *FreezeTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*FreezeTransaction) SetMaxTransactionFee

func (tx *FreezeTransaction) SetMaxTransactionFee(fee Hbar) *FreezeTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*FreezeTransaction) SetMinBackoff added in v2.1.16

func (tx *FreezeTransaction) SetMinBackoff(min time.Duration) *FreezeTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*FreezeTransaction) SetNodeAccountIDs

func (tx *FreezeTransaction) SetNodeAccountIDs(nodeID []AccountID) *FreezeTransaction

SetNodeAccountID sets the _Node AccountID for this FreezeTransaction.

func (*FreezeTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *FreezeTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *FreezeTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*FreezeTransaction) SetStartTime

func (tx *FreezeTransaction) SetStartTime(startTime time.Time) *FreezeTransaction

func (*FreezeTransaction) SetTransactionID

func (tx *FreezeTransaction) SetTransactionID(transactionID TransactionID) *FreezeTransaction

SetTransactionID sets the TransactionID for this FreezeTransaction.

func (*FreezeTransaction) SetTransactionMemo

func (tx *FreezeTransaction) SetTransactionMemo(memo string) *FreezeTransaction

SetTransactionMemo sets the memo for this FreezeTransaction.

func (*FreezeTransaction) SetTransactionValidDuration

func (tx *FreezeTransaction) SetTransactionValidDuration(duration time.Duration) *FreezeTransaction

SetTransactionValidDuration sets the valid duration for this FreezeTransaction.

func (*FreezeTransaction) Sign

func (tx *FreezeTransaction) Sign(
	privateKey PrivateKey,
) *FreezeTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FreezeTransaction) SignWith

func (tx *FreezeTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *FreezeTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*FreezeTransaction) SignWithOperator

func (tx *FreezeTransaction) SignWithOperator(
	client *Client,
) (*FreezeTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type FreezeType added in v2.3.0

type FreezeType int32
const (
	FreezeTypeUnknown          FreezeType = 0
	FreezeTypeFreezeOnly       FreezeType = 1
	FreezeTypePrepareUpgrade   FreezeType = 2
	FreezeTypeFreezeUpgrade    FreezeType = 3
	FreezeTypeFreezeAbort      FreezeType = 4
	FreezeTypeTelemetryUpgrade FreezeType = 5
)

func (FreezeType) String added in v2.3.0

func (freezeType FreezeType) String() string

type Hbar

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

Hbar is a typesafe wrapper around values of HBAR providing foolproof conversions to other denominations.

func HbarFrom

func HbarFrom(bars float64, unit HbarUnit) Hbar

HbarFrom creates a representation of Hbar in tinybar on the unit provided

func HbarFromString added in v2.1.13

func HbarFromString(hbar string) (Hbar, error)

HbarFromString returns a Hbar representation of the string provided.

func HbarFromTinybar

func HbarFromTinybar(tinybar int64) Hbar

HbarFromTinybar creates a representation of Hbar in tinybars

func NewHbar

func NewHbar(hbar float64) Hbar

NewHbar constructs a new Hbar from a possibly fractional amount of hbar.

func TransactionGetMaxTransactionFee added in v2.2.0

func TransactionGetMaxTransactionFee(transaction interface{}) (Hbar, error)

func (Hbar) As

func (hbar Hbar) As(unit HbarUnit) float64

As returns the equivalent amount in the given unit.

func (Hbar) AsTinybar

func (hbar Hbar) AsTinybar() int64

AsTinybar returns the equivalent tinybar amount.

func (Hbar) Negated added in v2.1.6

func (hbar Hbar) Negated() Hbar

Negated returns the negated value of the Hbar.

func (Hbar) String

func (hbar Hbar) String() string

String returns a string representation of the Hbar value.

func (Hbar) ToString

func (hbar Hbar) ToString(unit HbarUnit) string

ToString returns a string representation of the Hbar value in the given unit.

type HbarAllowance added in v2.9.0

type HbarAllowance struct {
	OwnerAccountID   *AccountID
	SpenderAccountID *AccountID
	Amount           int64
}

An approved allowance of hbar transfers for a spender.

func NewHbarAllowance added in v2.9.0

func NewHbarAllowance(ownerAccountID AccountID, spenderAccountID AccountID, amount int64) HbarAllowance

NewHbarAllowance creates a new HbarAllowance with the given owner, spender, and amount.

func (*HbarAllowance) String added in v2.13.0

func (approval *HbarAllowance) String() string

String returns a string representation of the HbarAllowance

type HbarUnit

type HbarUnit string

func (HbarUnit) String

func (unit HbarUnit) String() string

String returns a string representation of the HbarUnit

func (HbarUnit) Symbol

func (unit HbarUnit) Symbol() string

Symbol returns the symbol representation of the HbarUnit

type ITransaction added in v2.1.5

type ITransaction interface {
	// contains filtered or unexported methods
}

type Key

type Key interface {
	String() string
	// contains filtered or unexported methods
}

type KeyList

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

KeyList is a list of keys

func KeyListWithThreshold

func KeyListWithThreshold(threshold uint) *KeyList

NewKeyListWithThreshold creates a new KeyList with the given threshold

func NewKeyList

func NewKeyList() *KeyList

NewKeyList creates a new KeyList with no threshold

func (*KeyList) Add

func (kl *KeyList) Add(key Key) *KeyList

Add adds a key to the KeyList

func (*KeyList) AddAll

func (kl *KeyList) AddAll(keys []Key) *KeyList

AddAll adds all the keys to the KeyList

func (*KeyList) AddAllPublicKeys

func (kl *KeyList) AddAllPublicKeys(keys []PublicKey) *KeyList

AddAllPublicKeys adds all the public keys to the KeyList

func (*KeyList) String

func (kl *KeyList) String() string

String returns a string representation of the KeyList

type LedgerID added in v2.7.0

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

func LedgerIDFromBytes added in v2.7.0

func LedgerIDFromBytes(byt []byte) *LedgerID

LedgerIDFromBytes returns a LedgerID from a byte representation of a ledger ID.

func LedgerIDFromNetworkName added in v2.7.0

func LedgerIDFromNetworkName(network NetworkName) (*LedgerID, error)

LedgerIDFromNetworkName returns a LedgerID from a NetworkName.

func LedgerIDFromString added in v2.7.0

func LedgerIDFromString(id string) (*LedgerID, error)

LedgerIDFromString returns a LedgerID from a string representation of a ledger ID.

func NewLedgerIDMainnet added in v2.7.0

func NewLedgerIDMainnet() *LedgerID

LedgerIDMainnet returns a LedgerID for mainnet.

func NewLedgerIDPreviewnet added in v2.7.0

func NewLedgerIDPreviewnet() *LedgerID

LedgerIDPreviewnet returns a LedgerID for previewnet.

func NewLedgerIDTestnet added in v2.7.0

func NewLedgerIDTestnet() *LedgerID

LedgerIDTestnet returns a LedgerID for testnet.

func (*LedgerID) IsMainnet added in v2.7.0

func (id *LedgerID) IsMainnet() bool

IsMainnet returns true if the LedgerID is for mainnet.

func (*LedgerID) IsPreviewnet added in v2.7.0

func (id *LedgerID) IsPreviewnet() bool

IsPreviewnet returns true if the LedgerID is for previewnet.

func (*LedgerID) IsTestnet added in v2.7.0

func (id *LedgerID) IsTestnet() bool

IsTestnet returns true if the LedgerID is for testnet.

func (*LedgerID) String added in v2.7.0

func (id *LedgerID) String() string

String returns a string representation of the LedgerID.

func (*LedgerID) ToBytes added in v2.7.0

func (id *LedgerID) ToBytes() []byte

ToBytes returns a byte representation of the LedgerID.

func (*LedgerID) ToNetworkName added in v2.7.0

func (id *LedgerID) ToNetworkName() (NetworkName, error)

ToNetworkName returns a NetworkName from the LedgerID.

type LiveHash

type LiveHash struct {
	AccountID AccountID
	Hash      []byte
	Keys      KeyList
	// Deprecated
	Duration         time.Time
	LiveHashDuration time.Duration
}

LiveHash is a hash that is live on the Hedera network

func LiveHashFromBytes added in v2.1.3

func LiveHashFromBytes(data []byte) (LiveHash, error)

LiveHashFromBytes returns a LiveHash object from a raw byte array

func (LiveHash) ToBytes added in v2.1.3

func (liveHash LiveHash) ToBytes() []byte

ToBytes returns the byte representation of the LiveHash

type LiveHashAddTransaction

type LiveHashAddTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

LiveHashAddTransaction At consensus, attaches the given livehash to the given account. The hash can be deleted by the key controlling the account, or by any of the keys associated to the livehash. Hence livehashes provide a revocation service for their implied credentials; for example, when an authority grants a credential to the account, the account owner will cosign with the authority (or authorities) to attach a hash of the credential to the account---hence proving the grant. If the credential is revoked, then any of the authorities may delete it (or the account owner). In this way, the livehash mechanism acts as a revocation service. An account cannot have two identical livehashes associated. To modify the list of keys in a livehash, the livehash should first be deleted, then recreated with a new list of keys.

func NewLiveHashAddTransaction

func NewLiveHashAddTransaction() *LiveHashAddTransaction

NewLiveHashAddTransaction creates LiveHashAddTransaction which at consensus, attaches the given livehash to the given account. The hash can be deleted by the key controlling the account, or by any of the keys associated to the livehash. Hence livehashes provide a revocation service for their implied credentials; for example, when an authority grants a credential to the account, the account owner will cosign with the authority (or authorities) to attach a hash of the credential to the account---hence proving the grant. If the credential is revoked, then any of the authorities may delete it (or the account owner). In this way, the livehash mechanism acts as a revocation service. An account cannot have two identical livehashes associated. To modify the list of keys in a livehash, the livehash should first be deleted, then recreated with a new list of keys.

func (*LiveHashAddTransaction) AddSignature added in v2.1.3

func (tx *LiveHashAddTransaction) AddSignature(publicKey PublicKey, signature []byte) *LiveHashAddTransaction

AddSignature adds a signature to the transaction.

func (*LiveHashAddTransaction) Execute

func (tx *LiveHashAddTransaction) Execute(client *Client) (TransactionResponse, error)

func (*LiveHashAddTransaction) Freeze

func (*LiveHashAddTransaction) FreezeWith

func (tx *LiveHashAddTransaction) FreezeWith(client *Client) (*LiveHashAddTransaction, error)

func (*LiveHashAddTransaction) GetAccountID

func (tx *LiveHashAddTransaction) GetAccountID() AccountID

GetAccountID returns the account to which the livehash is attached

func (*LiveHashAddTransaction) GetDuration

func (tx *LiveHashAddTransaction) GetDuration() time.Duration

GetDuration returns the duration for which the livehash will remain valid

func (*LiveHashAddTransaction) GetGrpcDeadline added in v2.34.0

func (e *LiveHashAddTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*LiveHashAddTransaction) GetHash

func (tx *LiveHashAddTransaction) GetHash() []byte

func (*LiveHashAddTransaction) GetKeys

func (tx *LiveHashAddTransaction) GetKeys() KeyList

func (*LiveHashAddTransaction) GetLogLevel added in v2.34.0

func (e *LiveHashAddTransaction) GetLogLevel() *LogLevel

func (*LiveHashAddTransaction) GetMaxBackoff added in v2.1.16

func (e *LiveHashAddTransaction) GetMaxBackoff() time.Duration

func (*LiveHashAddTransaction) GetMaxRetry added in v2.34.0

func (e *LiveHashAddTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*LiveHashAddTransaction) GetMaxTransactionFee

func (tx *LiveHashAddTransaction) GetMaxTransactionFee() Hbar

GetMaxTransactionFee returns the maximum transaction fee the operator (paying account) is willing to pay.

func (*LiveHashAddTransaction) GetMinBackoff added in v2.1.16

func (e *LiveHashAddTransaction) GetMinBackoff() time.Duration

func (*LiveHashAddTransaction) GetNodeAccountIDs

func (e *LiveHashAddTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*LiveHashAddTransaction) GetTransactionID

func (tx *LiveHashAddTransaction) GetTransactionID() TransactionID

GetTransactionID gets the TransactionID for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) Schedule added in v2.34.0

func (*LiveHashAddTransaction) SetAccountID

func (tx *LiveHashAddTransaction) SetAccountID(accountID AccountID) *LiveHashAddTransaction

SetAccountID Sets the account to which the livehash is attached

func (*LiveHashAddTransaction) SetDuration

func (tx *LiveHashAddTransaction) SetDuration(duration time.Duration) *LiveHashAddTransaction

SetDuration Set the duration for which the livehash will remain valid

func (*LiveHashAddTransaction) SetGrpcDeadline added in v2.11.0

func (tx *LiveHashAddTransaction) SetGrpcDeadline(deadline *time.Duration) *LiveHashAddTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*LiveHashAddTransaction) SetHash

func (tx *LiveHashAddTransaction) SetHash(hash []byte) *LiveHashAddTransaction

SetHash Sets the SHA-384 hash of a credential or certificate

func (*LiveHashAddTransaction) SetKeys

func (tx *LiveHashAddTransaction) SetKeys(keys ...Key) *LiveHashAddTransaction

SetKeys Sets a list of keys (primitive or threshold), all of which must sign to attach the livehash to an account. Any one of which can later delete it.

func (*LiveHashAddTransaction) SetLogLevel added in v2.25.0

func (tx *LiveHashAddTransaction) SetLogLevel(level LogLevel) *LiveHashAddTransaction

func (*LiveHashAddTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*LiveHashAddTransaction) SetMaxRetry added in v2.1.2

func (tx *LiveHashAddTransaction) SetMaxRetry(count int) *LiveHashAddTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*LiveHashAddTransaction) SetMaxTransactionFee

func (tx *LiveHashAddTransaction) SetMaxTransactionFee(fee Hbar) *LiveHashAddTransaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*LiveHashAddTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*LiveHashAddTransaction) SetNodeAccountIDs

func (tx *LiveHashAddTransaction) SetNodeAccountIDs(nodeID []AccountID) *LiveHashAddTransaction

SetNodeAccountID sets the _Node AccountID for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *LiveHashAddTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *LiveHashAddTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*LiveHashAddTransaction) SetTransactionID

func (tx *LiveHashAddTransaction) SetTransactionID(transactionID TransactionID) *LiveHashAddTransaction

SetTransactionID sets the TransactionID for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) SetTransactionMemo

func (tx *LiveHashAddTransaction) SetTransactionMemo(memo string) *LiveHashAddTransaction

SetTransactionMemo sets the memo for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) SetTransactionValidDuration

func (tx *LiveHashAddTransaction) SetTransactionValidDuration(duration time.Duration) *LiveHashAddTransaction

SetTransactionValidDuration sets the valid duration for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) Sign

func (tx *LiveHashAddTransaction) Sign(
	privateKey PrivateKey,
) *LiveHashAddTransaction

Sign uses the provided privateKey to sign the transaction.

func (*LiveHashAddTransaction) SignWith

func (tx *LiveHashAddTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *LiveHashAddTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*LiveHashAddTransaction) SignWithOperator

func (tx *LiveHashAddTransaction) SignWithOperator(
	client *Client,
) (*LiveHashAddTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type LiveHashDeleteTransaction

type LiveHashDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

LiveHashDeleteTransaction At consensus, deletes a livehash associated to the given account. The transaction must be signed by either the key of the owning account, or at least one of the keys associated to the livehash.

func NewLiveHashDeleteTransaction

func NewLiveHashDeleteTransaction() *LiveHashDeleteTransaction

NewLiveHashDeleteTransaction creates LiveHashDeleteTransaction which at consensus, deletes a livehash associated to the given account. The transaction must be signed by either the key of the owning account, or at least one of the keys associated to the livehash.

func (*LiveHashDeleteTransaction) AddSignature added in v2.1.3

func (tx *LiveHashDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *LiveHashDeleteTransaction

AddSignature adds a signature to the transaction.

func (*LiveHashDeleteTransaction) Execute

func (*LiveHashDeleteTransaction) Freeze

func (*LiveHashDeleteTransaction) FreezeWith

func (*LiveHashDeleteTransaction) GetAccountID

func (tx *LiveHashDeleteTransaction) GetAccountID() AccountID

GetAccountID returns the account owning the livehash

func (*LiveHashDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *LiveHashDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*LiveHashDeleteTransaction) GetHash

func (tx *LiveHashDeleteTransaction) GetHash() []byte

GetHash returns the SHA-384 livehash to delete from the account

func (*LiveHashDeleteTransaction) GetLogLevel added in v2.34.0

func (e *LiveHashDeleteTransaction) GetLogLevel() *LogLevel

func (*LiveHashDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *LiveHashDeleteTransaction) GetMaxBackoff() time.Duration

func (*LiveHashDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *LiveHashDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*LiveHashDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *LiveHashDeleteTransaction) GetMinBackoff() time.Duration

func (*LiveHashDeleteTransaction) GetNodeAccountIDs

func (e *LiveHashDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*LiveHashDeleteTransaction) Schedule added in v2.34.0

func (*LiveHashDeleteTransaction) SetAccountID

func (tx *LiveHashDeleteTransaction) SetAccountID(accountID AccountID) *LiveHashDeleteTransaction

SetAccountID Sets the account owning the livehash

func (*LiveHashDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *LiveHashDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *LiveHashDeleteTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*LiveHashDeleteTransaction) SetHash

SetHash Set the SHA-384 livehash to delete from the account

func (*LiveHashDeleteTransaction) SetLogLevel added in v2.25.0

func (*LiveHashDeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*LiveHashDeleteTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*LiveHashDeleteTransaction) SetMaxTransactionFee

func (tx *LiveHashDeleteTransaction) SetMaxTransactionFee(fee Hbar) *LiveHashDeleteTransaction

SetMaxTransactionFee sets the maximum transaction fee for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*LiveHashDeleteTransaction) SetNodeAccountIDs

func (tx *LiveHashDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *LiveHashDeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *LiveHashDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *LiveHashDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*LiveHashDeleteTransaction) SetTransactionID

func (tx *LiveHashDeleteTransaction) SetTransactionID(transactionID TransactionID) *LiveHashDeleteTransaction

SetTransactionID sets the TransactionID for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetTransactionMemo

func (tx *LiveHashDeleteTransaction) SetTransactionMemo(memo string) *LiveHashDeleteTransaction

SetTransactionMemo sets the memo for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetTransactionValidDuration

func (tx *LiveHashDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *LiveHashDeleteTransaction

SetTransactionValidDuration sets the valid duration for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*LiveHashDeleteTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*LiveHashDeleteTransaction) SignWithOperator

func (tx *LiveHashDeleteTransaction) SignWithOperator(client *Client) (*LiveHashDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type LiveHashQuery

type LiveHashQuery struct {
	Query
	// contains filtered or unexported fields
}

LiveHashQuery Requests a livehash associated to an account.

func NewLiveHashQuery

func NewLiveHashQuery() *LiveHashQuery

NewLiveHashQuery creates a LiveHashQuery that requests a livehash associated to an account.

func (*LiveHashQuery) Execute

func (q *LiveHashQuery) Execute(client *Client) (LiveHash, error)

Execute executes the Query with the provided client

func (*LiveHashQuery) GetAccountID

func (q *LiveHashQuery) GetAccountID() AccountID

GetAccountID returns the AccountID to which the livehash is associated

func (*LiveHashQuery) GetCost

func (q *LiveHashQuery) GetCost(client *Client) (Hbar, error)

func (*LiveHashQuery) GetGetHash

func (q *LiveHashQuery) GetGetHash() []byte

GetHash returns the SHA-384 data in the livehash

func (*LiveHashQuery) GetGrpcDeadline added in v2.34.0

func (e *LiveHashQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*LiveHashQuery) GetLogLevel added in v2.34.0

func (e *LiveHashQuery) GetLogLevel() *LogLevel

func (*LiveHashQuery) GetMaxBackoff added in v2.1.16

func (e *LiveHashQuery) GetMaxBackoff() time.Duration

func (*LiveHashQuery) GetMaxRetry added in v2.17.2

func (e *LiveHashQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*LiveHashQuery) GetMinBackoff added in v2.1.16

func (e *LiveHashQuery) GetMinBackoff() time.Duration

func (*LiveHashQuery) GetNodeAccountIDs

func (e *LiveHashQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*LiveHashQuery) SetAccountID

func (q *LiveHashQuery) SetAccountID(accountID AccountID) *LiveHashQuery

SetAccountID Sets the AccountID to which the livehash is associated

func (*LiveHashQuery) SetGrpcDeadline added in v2.11.0

func (q *LiveHashQuery) SetGrpcDeadline(deadline *time.Duration) *LiveHashQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*LiveHashQuery) SetHash

func (q *LiveHashQuery) SetHash(hash []byte) *LiveHashQuery

SetHash Sets the SHA-384 data in the livehash

func (*LiveHashQuery) SetLogLevel added in v2.25.0

func (q *LiveHashQuery) SetLogLevel(level LogLevel) *LiveHashQuery

func (*LiveHashQuery) SetMaxBackoff added in v2.1.16

func (q *LiveHashQuery) SetMaxBackoff(max time.Duration) *LiveHashQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*LiveHashQuery) SetMaxQueryPayment

func (q *LiveHashQuery) SetMaxQueryPayment(maxPayment Hbar) *LiveHashQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*LiveHashQuery) SetMaxRetry added in v2.17.2

func (q *LiveHashQuery) SetMaxRetry(count int) *LiveHashQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*LiveHashQuery) SetMinBackoff added in v2.1.16

func (q *LiveHashQuery) SetMinBackoff(min time.Duration) *LiveHashQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*LiveHashQuery) SetNodeAccountIDs

func (q *LiveHashQuery) SetNodeAccountIDs(accountID []AccountID) *LiveHashQuery

SetNodeAccountIDs sets the _Node AccountID for this LiveHashQuery.

func (*LiveHashQuery) SetPaymentTransactionID added in v2.11.0

func (q *LiveHashQuery) SetPaymentTransactionID(transactionID TransactionID) *LiveHashQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*LiveHashQuery) SetQueryPayment

func (q *LiveHashQuery) SetQueryPayment(paymentAmount Hbar) *LiveHashQuery

SetQueryPayment sets the payment amount for this Query.

type LogLevel added in v2.25.0

type LogLevel string
const (
	LoggerLevelTrace    LogLevel = "TRACE"
	LoggerLevelDebug    LogLevel = "DEBUG"
	LoggerLevelInfo     LogLevel = "INFO"
	LoggerLevelWarn     LogLevel = "WARN"
	LoggerLevelError    LogLevel = "ERROR"
	LoggerLevelDisabled LogLevel = "DISABLED"
)

type Logger added in v2.25.0

type Logger interface {
	SetSilent(isSilent bool)
	SetLevel(level LogLevel)
	SubLoggerWithLevel(level LogLevel) Logger
	Error(msg string, keysAndValues ...interface{})
	Warn(msg string, keysAndValues ...interface{})
	Info(msg string, keysAndValues ...interface{})
	Debug(msg string, keysAndValues ...interface{})
	Trace(msg string, keysAndValues ...interface{})
}

type Mnemonic

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

func GenerateMnemonic12

func GenerateMnemonic12() (Mnemonic, error)

GenerateMnemonic12 generates a random 12-word mnemonic

func GenerateMnemonic24

func GenerateMnemonic24() (Mnemonic, error)

GenerateMnemonic generates a random 24-word mnemonic

func MnemonicFromString

func MnemonicFromString(s string) (Mnemonic, error)

MnemonicFromString creates a mnemonic from a string of 24 words separated by spaces

Keys are lazily generated

func NewMnemonic

func NewMnemonic(words []string) (Mnemonic, error)

NewMnemonic Creates a mnemonic from a slice of 24 strings

Keys are lazily generated

func (Mnemonic) String

func (m Mnemonic) String() string

String returns the mnemonic as a string.

func (Mnemonic) ToLegacyPrivateKey

func (m Mnemonic) ToLegacyPrivateKey() (PrivateKey, error)

ToLegacyPrivateKey converts a mnemonic to a legacy private key

func (Mnemonic) ToPrivateKey

func (m Mnemonic) ToPrivateKey(passPhrase string) (PrivateKey, error)

Deprecated

func (Mnemonic) ToStandardECDSAsecp256k1PrivateKey added in v2.23.0

func (m Mnemonic) ToStandardECDSAsecp256k1PrivateKey(passPhrase string, index uint32) (PrivateKey, error)

ToStandardECDSAsecp256k1PrivateKey converts a mnemonic to a standard ecdsa secp256k1 private key

func (Mnemonic) ToStandardEd25519PrivateKey added in v2.23.0

func (m Mnemonic) ToStandardEd25519PrivateKey(passPhrase string, index uint32) (PrivateKey, error)

ToStandardEd25519PrivateKey converts a mnemonic to a standard ed25519 private key

func (Mnemonic) Words

func (m Mnemonic) Words() []string

Words returns the mnemonic as a slice of strings

type NetworkName added in v2.1.8

type NetworkName string
const (
	NetworkNameMainnet    NetworkName = "mainnet"
	NetworkNameTestnet    NetworkName = "testnet"
	NetworkNamePreviewnet NetworkName = "previewnet"
	NetworkNameOther      NetworkName = "other"
)

func NetworkNameFromString added in v2.7.0

func NetworkNameFromString(s string) NetworkName

Deprecated

func (NetworkName) String added in v2.4.0

func (networkName NetworkName) String() string

Deprecated

type NetworkVersionInfo

type NetworkVersionInfo struct {
	ProtobufVersion SemanticVersion
	ServicesVersion SemanticVersion
}

NetworkVersionInfo is the version info for the Hedera network protobuf and services

func NetworkVersionInfoFromBytes added in v2.1.13

func NetworkVersionInfoFromBytes(data []byte) (NetworkVersionInfo, error)

NetworkVersionInfoFromBytes returns the NetworkVersionInfo from a raw byte array

func (*NetworkVersionInfo) ToBytes added in v2.1.13

func (version *NetworkVersionInfo) ToBytes() []byte

ToBytes returns the byte representation of the NetworkVersionInfo

type NetworkVersionInfoQuery

type NetworkVersionInfoQuery struct {
	Query
}

NetworkVersionInfoQuery is the query to be executed that would return the current version of the network's protobuf and services.

func NewNetworkVersionQuery

func NewNetworkVersionQuery() *NetworkVersionInfoQuery

NewNetworkVersionQuery creates a NetworkVersionInfoQuery builder which can be used to construct and execute a Network Get Version Info Query containing the current version of the network's protobuf and services.

func (*NetworkVersionInfoQuery) Execute

func (q *NetworkVersionInfoQuery) Execute(client *Client) (NetworkVersionInfo, error)

Execute executes the Query with the provided client

func (*NetworkVersionInfoQuery) GetCost

func (q *NetworkVersionInfoQuery) GetCost(client *Client) (Hbar, error)

func (*NetworkVersionInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *NetworkVersionInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*NetworkVersionInfoQuery) GetLogLevel added in v2.34.0

func (e *NetworkVersionInfoQuery) GetLogLevel() *LogLevel

func (*NetworkVersionInfoQuery) GetMaxBackoff added in v2.1.16

func (e *NetworkVersionInfoQuery) GetMaxBackoff() time.Duration

func (*NetworkVersionInfoQuery) GetMaxRetry added in v2.34.0

func (e *NetworkVersionInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*NetworkVersionInfoQuery) GetMinBackoff added in v2.1.16

func (e *NetworkVersionInfoQuery) GetMinBackoff() time.Duration

func (*NetworkVersionInfoQuery) GetNodeAccountIDs

func (e *NetworkVersionInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*NetworkVersionInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *NetworkVersionInfoQuery) SetGrpcDeadline(deadline *time.Duration) *NetworkVersionInfoQuery

SetGrpcDeadline When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*NetworkVersionInfoQuery) SetLogLevel added in v2.25.0

func (*NetworkVersionInfoQuery) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*NetworkVersionInfoQuery) SetMaxQueryPayment

func (q *NetworkVersionInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *NetworkVersionInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*NetworkVersionInfoQuery) SetMaxRetry added in v2.1.2

func (q *NetworkVersionInfoQuery) SetMaxRetry(count int) *NetworkVersionInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*NetworkVersionInfoQuery) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*NetworkVersionInfoQuery) SetNodeAccountIDs

func (q *NetworkVersionInfoQuery) SetNodeAccountIDs(accountID []AccountID) *NetworkVersionInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this NetworkVersionInfoQuery.

func (*NetworkVersionInfoQuery) SetPaymentTransactionID added in v2.11.0

func (q *NetworkVersionInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *NetworkVersionInfoQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*NetworkVersionInfoQuery) SetQueryPayment

func (q *NetworkVersionInfoQuery) SetQueryPayment(paymentAmount Hbar) *NetworkVersionInfoQuery

SetQueryPayment sets the payment amount for this Query.

type NftID added in v2.1.11

type NftID struct {
	TokenID      TokenID
	SerialNumber int64
}

NftID is the ID for a non-fungible token

func NftIDFromBytes added in v2.1.11

func NftIDFromBytes(data []byte) (NftID, error)

NftIDFromBytes returns the NftID from a raw byte array

func NftIDFromString added in v2.1.11

func NftIDFromString(s string) (NftID, error)

NewNftID constructs a new NftID from a TokenID and a serial number

func (NftID) String added in v2.1.11

func (id NftID) String() string

String returns a string representation of the NftID

func (NftID) ToBytes added in v2.1.11

func (id NftID) ToBytes() []byte

ToBytes returns the byte representation of the NftID

func (NftID) ToStringWithChecksum added in v2.1.13

func (id NftID) ToStringWithChecksum(client Client) (string, error)

ToStringWithChecksum returns a string representation of the NftID with a checksum

func (*NftID) Validate added in v2.1.11

func (id *NftID) Validate(client *Client) error

Validate checks that the NftID is valid

type NodeAddress added in v2.10.0

type NodeAddress struct {
	PublicKey   string
	AccountID   *AccountID
	NodeID      int64
	CertHash    []byte
	Addresses   []_Endpoint
	Description string
}

NodeAddress is the address of a node on the Hedera network

func (NodeAddress) String added in v2.10.0

func (nodeAdd NodeAddress) String() string

String returns a string representation of the NodeAddress

type NodeAddressBook added in v2.10.0

type NodeAddressBook struct {
	NodeAddresses []NodeAddress
}

NodeAddressBook is the address book for the nodes on the Hedera network

func NodeAddressBookFromBytes added in v2.10.0

func NodeAddressBookFromBytes(data []byte) (NodeAddressBook, error)

NodeAddressBookFromBytes returns the NodeAddressBook from a raw byte array

func (NodeAddressBook) ToBytes added in v2.10.0

func (book NodeAddressBook) ToBytes() []byte

ToBytes returns the byte representation of the NodeAddressBook

type PopulateType added in v2.32.0

type PopulateType int
const (
	Account PopulateType = iota
	EvmAddress
)

type PrivateKey

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

func GeneratePrivateKey

func GeneratePrivateKey() (PrivateKey, error)

Deprecated

func PrivateKeyFromBytes

func PrivateKeyFromBytes(bytes []byte) (PrivateKey, error)

Deprecated the use of raw bytes for a Ed25519 private key is deprecated; use PrivateKeyFromBytesEd25519() instead.

func PrivateKeyFromBytesDer added in v2.7.0

func PrivateKeyFromBytesDer(bytes []byte) (PrivateKey, error)

func PrivateKeyFromBytesECDSA added in v2.7.0

func PrivateKeyFromBytesECDSA(bytes []byte) (PrivateKey, error)

func PrivateKeyFromBytesEd25519 added in v2.7.0

func PrivateKeyFromBytesEd25519(bytes []byte) (PrivateKey, error)

func PrivateKeyFromKeystore

func PrivateKeyFromKeystore(ks []byte, passphrase string) (PrivateKey, error)

func PrivateKeyFromMnemonic

func PrivateKeyFromMnemonic(mnemonic Mnemonic, passPhrase string) (PrivateKey, error)

Deprecated PrivateKeyFromMnemonic recovers an _Ed25519PrivateKey from a valid 24 word length mnemonic phrase and a passphrase.

An empty string can be passed for passPhrase If the mnemonic phrase wasn't generated with a passphrase. This is required to recover a private key from a mnemonic generated by the Android and iOS wallets.

func PrivateKeyFromPem

func PrivateKeyFromPem(bytes []byte, passphrase string) (PrivateKey, error)

func PrivateKeyFromSeedECDSAsecp256k1 added in v2.23.0

func PrivateKeyFromSeedECDSAsecp256k1(seed []byte) (PrivateKey, error)

func PrivateKeyFromSeedEd25519 added in v2.23.0

func PrivateKeyFromSeedEd25519(seed []byte) (PrivateKey, error)

func PrivateKeyFromString

func PrivateKeyFromString(s string) (PrivateKey, error)

The use of raw bytes for a Ed25519 private key is deprecated; use PrivateKeyFromStringEd25519() instead.

func PrivateKeyFromStringDer added in v2.7.0

func PrivateKeyFromStringDer(s string) (PrivateKey, error)

PrivateKeyFromStringDer Creates PrivateKey from hex string with a der prefix

func PrivateKeyFromStringECDSA added in v2.23.0

func PrivateKeyFromStringECDSA(s string) (PrivateKey, error)

func PrivateKeyFromStringECSDA deprecated added in v2.7.0

func PrivateKeyFromStringECSDA(s string) (PrivateKey, error)

Deprecated: use PrivateKeyFromStringECDSA() instead

func PrivateKeyFromStringEd25519 added in v2.7.0

func PrivateKeyFromStringEd25519(s string) (PrivateKey, error)

func PrivateKeyGenerate deprecated added in v2.7.0

func PrivateKeyGenerate() (PrivateKey, error)

Deprecated: use `PrivateKeyGenerateEd25519()` instead

func PrivateKeyGenerateEcdsa added in v2.7.0

func PrivateKeyGenerateEcdsa() (PrivateKey, error)

PrivateKeyGenerateEcdsa Generates a new ECDSASecp256K1 key

func PrivateKeyGenerateEd25519 added in v2.7.0

func PrivateKeyGenerateEd25519() (PrivateKey, error)

PrivateKeyGenerateEd25519 Generates a new Ed25519 key

func PrivateKeyReadKeystore

func PrivateKeyReadKeystore(source io.Reader, passphrase string) (PrivateKey, error)

PrivateKeyReadKeystore recovers an _Ed25519PrivateKey from an encrypted _Keystore file.

func PrivateKeyReadPem

func PrivateKeyReadPem(source io.Reader, passphrase string) (PrivateKey, error)

func (PrivateKey) Bytes

func (sk PrivateKey) Bytes() []byte

* For `Ed25519` the result of this method call is identical to `toBytesRaw()` while for `ECDSA` * this method is identical to `toBytesDer()`. * * We strongly recommend using `toBytesRaw()` or `toBytesDer()` instead.

func (PrivateKey) BytesDer added in v2.7.0

func (sk PrivateKey) BytesDer() []byte

func (PrivateKey) BytesRaw added in v2.7.0

func (sk PrivateKey) BytesRaw() []byte

func (PrivateKey) Derive

func (sk PrivateKey) Derive(index uint32) (PrivateKey, error)

func (PrivateKey) Keystore

func (sk PrivateKey) Keystore(passphrase string) ([]byte, error)

func (PrivateKey) LegacyDerive added in v2.1.4

func (sk PrivateKey) LegacyDerive(index int64) (PrivateKey, error)

func (PrivateKey) PublicKey

func (sk PrivateKey) PublicKey() PublicKey

func (PrivateKey) Sign

func (sk PrivateKey) Sign(message []byte) []byte

Sign signs the provided message with the Ed25519PrivateKey.

func (PrivateKey) SignTransaction

func (sk PrivateKey) SignTransaction(tx *Transaction) ([]byte, error)

func (PrivateKey) String

func (sk PrivateKey) String() string

String returns the text-encoded representation of the PrivateKey.

func (PrivateKey) StringDer added in v2.7.0

func (sk PrivateKey) StringDer() string

func (PrivateKey) StringRaw added in v2.7.0

func (sk PrivateKey) StringRaw() string

func (PrivateKey) SupportsDerivation

func (sk PrivateKey) SupportsDerivation() bool

func (PrivateKey) ToAccountID added in v2.7.0

func (sk PrivateKey) ToAccountID(shard uint64, realm uint64) *AccountID

func (PrivateKey) WriteKeystore

func (sk PrivateKey) WriteKeystore(destination io.Writer, passphrase string) error

type PrngTransaction added in v2.17.0

type PrngTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

PrngTransaction is used to generate a random number in a given range

func NewPrngTransaction added in v2.17.0

func NewPrngTransaction() *PrngTransaction

NewPrngTransaction creates a PrngTransaction transaction which can be used to construct and execute a Prng Transaction.

func (*PrngTransaction) AddSignature added in v2.34.0

func (tx *PrngTransaction) AddSignature(publicKey PublicKey, signature []byte) *PrngTransaction

AddSignature adds a signature to the transaction.

func (*PrngTransaction) Execute added in v2.17.0

func (tx *PrngTransaction) Execute(client *Client) (TransactionResponse, error)

func (*PrngTransaction) Freeze added in v2.17.0

func (tx *PrngTransaction) Freeze() (*PrngTransaction, error)

func (*PrngTransaction) FreezeWith added in v2.17.0

func (tx *PrngTransaction) FreezeWith(client *Client) (*PrngTransaction, error)

func (*PrngTransaction) GetGrpcDeadline added in v2.34.0

func (e *PrngTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*PrngTransaction) GetLogLevel added in v2.34.0

func (e *PrngTransaction) GetLogLevel() *LogLevel

func (*PrngTransaction) GetMaxBackoff added in v2.17.0

func (e *PrngTransaction) GetMaxBackoff() time.Duration

func (*PrngTransaction) GetMaxRetry added in v2.34.0

func (e *PrngTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*PrngTransaction) GetMinBackoff added in v2.17.0

func (e *PrngTransaction) GetMinBackoff() time.Duration

func (*PrngTransaction) GetNodeAccountIDs added in v2.34.0

func (e *PrngTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*PrngTransaction) GetRange added in v2.17.0

func (tx *PrngTransaction) GetRange() uint32

GetRange returns the range of the prng

func (*PrngTransaction) Schedule added in v2.34.0

func (tx *PrngTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*PrngTransaction) SetGrpcDeadline added in v2.17.0

func (tx *PrngTransaction) SetGrpcDeadline(deadline *time.Duration) *PrngTransaction

SetGrpcDeadline When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*PrngTransaction) SetLogLevel added in v2.34.0

func (tx *PrngTransaction) SetLogLevel(level LogLevel) *PrngTransaction

func (*PrngTransaction) SetMaxBackoff added in v2.17.0

func (tx *PrngTransaction) SetMaxBackoff(max time.Duration) *PrngTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*PrngTransaction) SetMaxRetry added in v2.17.0

func (tx *PrngTransaction) SetMaxRetry(count int) *PrngTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*PrngTransaction) SetMaxTransactionFee added in v2.17.0

func (tx *PrngTransaction) SetMaxTransactionFee(fee Hbar) *PrngTransaction

SetMaxTransactionFee sets the maximum transaction fee for this PrngTransaction.

func (*PrngTransaction) SetMinBackoff added in v2.17.0

func (tx *PrngTransaction) SetMinBackoff(min time.Duration) *PrngTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*PrngTransaction) SetNodeAccountIDs added in v2.17.0

func (tx *PrngTransaction) SetNodeAccountIDs(nodeID []AccountID) *PrngTransaction

SetNodeAccountIDs sets the _Node AccountID for this PrngTransaction.

func (*PrngTransaction) SetRange added in v2.17.0

func (tx *PrngTransaction) SetRange(r uint32) *PrngTransaction

SetPayerAccountID Sets an optional id of the account to be charged the service fee for the scheduled transaction at the consensus time that it executes (if ever); defaults to the ScheduleCreate payer if not given

func (*PrngTransaction) SetRegenerateTransactionID added in v2.17.0

func (tx *PrngTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *PrngTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*PrngTransaction) SetTransactionID added in v2.17.0

func (tx *PrngTransaction) SetTransactionID(transactionID TransactionID) *PrngTransaction

SetTransactionID sets the TransactionID for this PrngTransaction.

func (*PrngTransaction) SetTransactionMemo added in v2.17.0

func (tx *PrngTransaction) SetTransactionMemo(memo string) *PrngTransaction

SetTransactionMemo sets the memo for this PrngTransaction.

func (*PrngTransaction) SetTransactionValidDuration added in v2.17.0

func (tx *PrngTransaction) SetTransactionValidDuration(duration time.Duration) *PrngTransaction

SetTransactionValidDuration sets the valid duration for this PrngTransaction.

func (*PrngTransaction) Sign added in v2.17.0

func (tx *PrngTransaction) Sign(privateKey PrivateKey) *PrngTransaction

Sign uses the provided privateKey to sign the transaction.

func (*PrngTransaction) SignWith added in v2.17.0

func (tx *PrngTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *PrngTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*PrngTransaction) SignWithOperator added in v2.17.0

func (tx *PrngTransaction) SignWithOperator(client *Client) (*PrngTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type ProxyStaker added in v2.1.3

type ProxyStaker struct {
	AccountID AccountID
	Amount    Hbar
}

ProxyStaker is an information about a single account that is proxy staking

type PublicKey

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

func PublicKeyFromBytes

func PublicKeyFromBytes(bytes []byte) (PublicKey, error)

Deprecated the use of raw bytes for a Ed25519 private key is deprecated; use PublicKeyFromBytesEd25519() instead.

func PublicKeyFromBytesDer added in v2.7.0

func PublicKeyFromBytesDer(bytes []byte) (PublicKey, error)

func PublicKeyFromBytesECDSA added in v2.7.0

func PublicKeyFromBytesECDSA(bytes []byte) (PublicKey, error)

func PublicKeyFromBytesEd25519 added in v2.7.0

func PublicKeyFromBytesEd25519(bytes []byte) (PublicKey, error)

func PublicKeyFromString

func PublicKeyFromString(s string) (PublicKey, error)

The use of raw bytes for a Ed25519 public key is deprecated; use PublicKeyFromStringEd25519/ECDSA() instead.

func PublicKeyFromStringECDSA added in v2.7.0

func PublicKeyFromStringECDSA(s string) (PublicKey, error)

func PublicKeyFromStringEd25519 added in v2.7.0

func PublicKeyFromStringEd25519(s string) (PublicKey, error)

func (PublicKey) Bytes

func (pk PublicKey) Bytes() []byte

* For `Ed25519` the result of this method call is identical to `toBytesRaw()` while for `ECDSA` * this method is identical to `toBytesDer()`. * * We strongly recommend using `toBytesRaw()` or `toBytesDer()` instead.

func (PublicKey) BytesDer added in v2.7.0

func (pk PublicKey) BytesDer() []byte

func (PublicKey) BytesRaw added in v2.7.0

func (pk PublicKey) BytesRaw() []byte

func (PublicKey) String

func (pk PublicKey) String() string

func (PublicKey) StringDer added in v2.7.0

func (pk PublicKey) StringDer() string

func (PublicKey) StringRaw added in v2.7.0

func (pk PublicKey) StringRaw() string

func (PublicKey) ToAccountID added in v2.7.0

func (pk PublicKey) ToAccountID(shard uint64, realm uint64) *AccountID

func (PublicKey) ToEthereumAddress added in v2.15.0

func (pk PublicKey) ToEthereumAddress() string

`Deprecated: Use ToEvmAddress instead`

func (PublicKey) ToEvmAddress added in v2.23.0

func (pk PublicKey) ToEvmAddress() string

func (PublicKey) Verify added in v2.1.2

func (pk PublicKey) Verify(message []byte, signature []byte) bool

func (PublicKey) VerifyTransaction added in v2.1.2

func (pk PublicKey) VerifyTransaction(transaction Transaction) bool

type Query

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

Query is the struct used to build queries.

func (*Query) GetGrpcDeadline added in v2.11.0

func (e *Query) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*Query) GetLogLevel added in v2.25.0

func (e *Query) GetLogLevel() *LogLevel

func (*Query) GetMaxBackoff added in v2.34.0

func (e *Query) GetMaxBackoff() time.Duration

func (*Query) GetMaxQueryPayment added in v2.13.2

func (q *Query) GetMaxQueryPayment() Hbar

GetMaxQueryPayment returns the maximum payment allowed for this query.

func (*Query) GetMaxRetry added in v2.34.0

func (e *Query) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*Query) GetMaxRetryCount added in v2.1.2

func (q *Query) GetMaxRetryCount() int

GetMaxRetryCount returns the max number of errors before execution will fail.

func (*Query) GetMinBackoff added in v2.34.0

func (e *Query) GetMinBackoff() time.Duration

func (*Query) GetNodeAccountIDs

func (e *Query) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*Query) GetPaymentTransactionID added in v2.11.0

func (q *Query) GetPaymentTransactionID() TransactionID

GetPaymentTransactionID returns the payment transaction id.

func (*Query) GetQueryPayment added in v2.13.2

func (q *Query) GetQueryPayment() Hbar

GetQueryPayment returns the payment amount for this query.

func (*Query) SetGrpcDeadline added in v2.11.0

func (e *Query) SetGrpcDeadline(deadline *time.Duration) *executable

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*Query) SetLogLevel added in v2.25.0

func (e *Query) SetLogLevel(level LogLevel) *executable

func (*Query) SetMaxBackoff added in v2.34.0

func (e *Query) SetMaxBackoff(max time.Duration) *executable

func (*Query) SetMaxQueryPayment

func (q *Query) SetMaxQueryPayment(maxPayment Hbar) *Query

SetMaxQueryPayment sets the maximum payment allowed for this query.

func (*Query) SetMaxRetry added in v2.1.2

func (e *Query) SetMaxRetry(max int) *executable

func (*Query) SetMinBackoff added in v2.34.0

func (e *Query) SetMinBackoff(min time.Duration) *executable

func (*Query) SetNodeAccountIDs

func (e *Query) SetNodeAccountIDs(nodeAccountIDs []AccountID) *executable

func (*Query) SetPaymentTransactionID added in v2.11.0

func (q *Query) SetPaymentTransactionID(transactionID TransactionID) *Query

SetPaymentTransactionID assigns the payment transaction id.

func (*Query) SetQueryPayment

func (q *Query) SetQueryPayment(paymentAmount Hbar) *Query

SetQueryPayment sets the payment amount for this query.

type QueryInterface added in v2.34.0

type QueryInterface interface {
	Executable
	// contains filtered or unexported methods
}

type RequestType added in v2.1.11

type RequestType uint32
const (
	// UNSPECIFIED - Need to keep first value as unspecified because first element is ignored and not parsed (0 is ignored by parser)
	RequestTypeNone RequestType = 0
	// crypto transfe
	RequestTypeCryptoTransfer RequestType = 1
	// crypto update account
	RequestTypeCryptoUpdate RequestType = 2
	// crypto delete account
	RequestTypeCryptoDelete RequestType = 3
	// Add a livehash to a crypto account
	RequestTypeCryptoAddLiveHash RequestType = 4
	// Delete a livehash from a crypto account
	RequestTypeCryptoDeleteLiveHash RequestType = 5
	// Smart Contract Call
	RequestTypeContractCall RequestType = 6
	// Smart Contract Create Contract
	RequestTypeContractCreate RequestType = 7
	// Smart Contract update contract
	RequestTypeContractUpdate RequestType = 8
	// File Operation create file
	RequestTypeFileCreate RequestType = 9
	// File Operation append file
	RequestTypeFileAppend RequestType = 10
	// File Operation update file
	RequestTypeFileUpdate RequestType = 11
	// File Operation delete file
	RequestTypeFileDelete RequestType = 12
	// crypto get account balance
	RequestTypeCryptoGetAccountBalance RequestType = 13
	// crypto get account record
	RequestTypeCryptoGetAccountRecords RequestType = 14
	// Crypto get info
	RequestTypeCryptoGetInfo RequestType = 15
	// Smart Contract Call
	RequestTypeContractCallLocal RequestType = 16
	// Smart Contract get info
	RequestTypeContractGetInfo RequestType = 17
	// Smart Contract, get the byte code
	RequestTypeContractGetBytecode RequestType = 18
	// Smart Contract, get by _Solidity ID
	RequestTypeGetBySolidityID RequestType = 19
	// Smart Contract, get by key
	RequestTypeGetByKey RequestType = 20
	// Get a live hash from a crypto account
	RequestTypeCryptoGetLiveHash RequestType = 21
	// Crypto, get the stakers for the _Node
	RequestTypeCryptoGetStakers RequestType = 22
	// File Operations get file contents
	RequestTypeFileGetContents RequestType = 23
	// File Operations get the info of the file
	RequestTypeFileGetInfo RequestType = 24
	// Crypto get the transaction records
	RequestTypeTransactionGetRecord RequestType = 25
	// Contract get the transaction records
	RequestTypeContractGetRecords RequestType = 26
	// crypto create account
	RequestTypeCryptoCreate RequestType = 27
	// system delete file
	RequestTypeSystemDelete RequestType = 28
	// system undelete file
	RequestTypeSystemUndelete RequestType = 29
	// delete contract
	RequestTypeContractDelete RequestType = 30
	// freeze
	RequestTypeFreeze RequestType = 31
	// Create Tx Record
	RequestTypeCreateTransactionRecord RequestType = 32
	// Crypto Auto Renew
	RequestTypeCryptoAccountAutoRenew RequestType = 33
	// Contract Auto Renew
	RequestTypeContractAutoRenew RequestType = 34
	// Get Version
	RequestTypeGetVersionInfo RequestType = 35
	// Transaction Get Receipt
	RequestTypeTransactionGetReceipt RequestType = 36
	// Create Topic
	RequestTypeConsensusCreateTopic RequestType = 50
	// Update Topic
	RequestTypeConsensusUpdateTopic RequestType = 51
	// Delete Topic
	RequestTypeConsensusDeleteTopic RequestType = 52
	// Get Topic information
	RequestTypeConsensusGetTopicInfo RequestType = 53
	// Submit message to topic
	RequestTypeConsensusSubmitMessage RequestType = 54
	RequestTypeUncheckedSubmit        RequestType = 55
	// Create Token
	RequestTypeTokenCreate RequestType = 56
	// Get Token information
	RequestTypeTokenGetInfo RequestType = 58
	// Freeze Account
	RequestTypeTokenFreezeAccount RequestType = 59
	// Unfreeze Account
	RequestTypeTokenUnfreezeAccount RequestType = 60
	// Grant KYC to Account
	RequestTypeTokenGrantKycToAccount RequestType = 61
	// Revoke KYC from Account
	RequestTypeTokenRevokeKycFromAccount RequestType = 62
	// Delete Token
	RequestTypeTokenDelete RequestType = 63
	// Update Token
	RequestTypeTokenUpdate RequestType = 64
	// Mint tokens to treasury
	RequestTypeTokenMint RequestType = 65
	// Burn tokens from treasury
	RequestTypeTokenBurn RequestType = 66
	// Wipe token amount from Account holder
	RequestTypeTokenAccountWipe RequestType = 67
	// Associate tokens to an account
	RequestTypeTokenAssociateToAccount RequestType = 68
	// Dissociate tokens from an account
	RequestTypeTokenDissociateFromAccount RequestType = 69
	// Create Scheduled Transaction
	RequestTypeScheduleCreate RequestType = 70
	// Delete Scheduled Transaction
	RequestTypeScheduleDelete RequestType = 71
	// Sign Scheduled Transaction
	RequestTypeScheduleSign RequestType = 72
	// Get Scheduled Transaction Information
	RequestTypeScheduleGetInfo RequestType = 73
)

func (RequestType) String added in v2.1.11

func (requestType RequestType) String() string

String() returns a string representation of the status

type ScheduleCreateTransaction added in v2.1.4

type ScheduleCreateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

ScheduleCreateTransaction Creates a new schedule entity (or simply, schedule) in the network's action queue. Upon SUCCESS, the receipt contains the `ScheduleID` of the created schedule. A schedule entity includes a scheduledTransactionBody to be executed. When the schedule has collected enough signing Ed25519 keys to satisfy the schedule's signing requirements, the schedule can be executed.

func NewScheduleCreateTransaction added in v2.1.4

func NewScheduleCreateTransaction() *ScheduleCreateTransaction

NewScheduleCreateTransaction creates ScheduleCreateTransaction which creates a new schedule entity (or simply, schedule) in the network's action queue. Upon SUCCESS, the receipt contains the `ScheduleID` of the created schedule. A schedule entity includes a scheduledTransactionBody to be executed. When the schedule has collected enough signing Ed25519 keys to satisfy the schedule's signing requirements, the schedule can be executed.

func (*ScheduleCreateTransaction) AddSignature added in v2.34.0

func (tx *ScheduleCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *ScheduleCreateTransaction

AddSignature adds a signature to the transaction.

func (*ScheduleCreateTransaction) Execute added in v2.1.4

func (*ScheduleCreateTransaction) Freeze added in v2.1.4

func (*ScheduleCreateTransaction) FreezeWith added in v2.1.4

func (*ScheduleCreateTransaction) GetAdminKey added in v2.1.4

func (tx *ScheduleCreateTransaction) GetAdminKey() *Key

GetAdminKey returns the optional Hedera key which can be used to sign a ScheduleDelete and remove the schedule

func (*ScheduleCreateTransaction) GetExpirationTime added in v2.14.0

func (tx *ScheduleCreateTransaction) GetExpirationTime() time.Time

GetExpirationTime returns the optional timestamp for specifying when the transaction should be evaluated for execution and then expire.

func (*ScheduleCreateTransaction) GetGrpcDeadline added in v2.34.0

func (e *ScheduleCreateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ScheduleCreateTransaction) GetLogLevel added in v2.34.0

func (e *ScheduleCreateTransaction) GetLogLevel() *LogLevel

func (*ScheduleCreateTransaction) GetMaxBackoff added in v2.1.16

func (e *ScheduleCreateTransaction) GetMaxBackoff() time.Duration

func (*ScheduleCreateTransaction) GetMaxRetry added in v2.34.0

func (e *ScheduleCreateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ScheduleCreateTransaction) GetMinBackoff added in v2.1.16

func (e *ScheduleCreateTransaction) GetMinBackoff() time.Duration

func (*ScheduleCreateTransaction) GetNodeAccountIDs added in v2.34.0

func (e *ScheduleCreateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ScheduleCreateTransaction) GetPayerAccountID added in v2.1.4

func (tx *ScheduleCreateTransaction) GetPayerAccountID() AccountID

GetPayerAccountID returns the optional id of the account to be charged the service fee for the scheduled transaction

func (*ScheduleCreateTransaction) GetScheduleMemo added in v2.1.5

func (tx *ScheduleCreateTransaction) GetScheduleMemo() string

GetScheduleMemo returns the optional memo with a UTF-8 encoding of no more than 100 bytes which does not contain the zero byte.

func (*ScheduleCreateTransaction) GetWaitForExpiry added in v2.14.0

func (tx *ScheduleCreateTransaction) GetWaitForExpiry() bool

GetWaitForExpiry returns true if the transaction will be evaluated for execution at expiration_time instead of when all required signatures are received.

func (*ScheduleCreateTransaction) Schedule added in v2.34.0

func (*ScheduleCreateTransaction) SetAdminKey added in v2.1.4

SetAdminKey Sets an optional Hedera key which can be used to sign a ScheduleDelete and remove the schedule

func (*ScheduleCreateTransaction) SetExpirationTime added in v2.14.0

func (tx *ScheduleCreateTransaction) SetExpirationTime(time time.Time) *ScheduleCreateTransaction

SetExpirationTime Sets an optional timestamp for specifying when the transaction should be evaluated for execution and then expire. Defaults to 30 minutes after the transaction's consensus timestamp.

func (*ScheduleCreateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *ScheduleCreateTransaction) SetGrpcDeadline(deadline *time.Duration) *ScheduleCreateTransaction

SetGrpcDeadline When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ScheduleCreateTransaction) SetLogLevel added in v2.25.0

func (*ScheduleCreateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ScheduleCreateTransaction) SetMaxRetry added in v2.1.4

SetMaxRetry sets the max number of errors before execution will fail.

func (*ScheduleCreateTransaction) SetMaxTransactionFee added in v2.1.4

func (tx *ScheduleCreateTransaction) SetMaxTransactionFee(fee Hbar) *ScheduleCreateTransaction

SetMaxTransactionFee sets the maximum transaction fee for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ScheduleCreateTransaction) SetNodeAccountIDs added in v2.1.4

func (tx *ScheduleCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *ScheduleCreateTransaction

SetNodeAccountIDs sets the _Node AccountID for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetPayerAccountID added in v2.1.4

func (tx *ScheduleCreateTransaction) SetPayerAccountID(payerAccountID AccountID) *ScheduleCreateTransaction

SetPayerAccountID Sets an optional id of the account to be charged the service fee for the scheduled transaction at the consensus time that it executes (if ever); defaults to the ScheduleCreate payer if not given

func (*ScheduleCreateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *ScheduleCreateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *ScheduleCreateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*ScheduleCreateTransaction) SetScheduleMemo added in v2.1.5

func (tx *ScheduleCreateTransaction) SetScheduleMemo(memo string) *ScheduleCreateTransaction

SetScheduleMemo Sets an optional memo with a UTF-8 encoding of no more than 100 bytes which does not contain the zero byte.

func (*ScheduleCreateTransaction) SetScheduledTransaction added in v2.1.5

func (tx *ScheduleCreateTransaction) SetScheduledTransaction(scheduledTx ITransaction) (*ScheduleCreateTransaction, error)

SetScheduledTransaction Sets the scheduled transaction

func (*ScheduleCreateTransaction) SetTransactionID added in v2.1.4

func (tx *ScheduleCreateTransaction) SetTransactionID(transactionID TransactionID) *ScheduleCreateTransaction

SetTransactionID sets the TransactionID for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetTransactionMemo added in v2.1.4

func (tx *ScheduleCreateTransaction) SetTransactionMemo(memo string) *ScheduleCreateTransaction

SetTransactionMemo sets the memo for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetTransactionValidDuration added in v2.1.4

func (tx *ScheduleCreateTransaction) SetTransactionValidDuration(duration time.Duration) *ScheduleCreateTransaction

SetTransactionValidDuration sets the valid duration for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetWaitForExpiry added in v2.14.0

func (tx *ScheduleCreateTransaction) SetWaitForExpiry(wait bool) *ScheduleCreateTransaction

SetWaitForExpiry When set to true, the transaction will be evaluated for execution at expiration_time instead of when all required signatures are received. When set to false, the transaction will execute immediately after sufficient signatures are received to sign the contained transaction. During the initial ScheduleCreate transaction or via ScheduleSign transactions. Defaults to false.

func (*ScheduleCreateTransaction) Sign added in v2.1.4

Sign uses the provided privateKey to sign the transaction.

func (*ScheduleCreateTransaction) SignWith added in v2.1.4

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*ScheduleCreateTransaction) SignWithOperator added in v2.1.4

func (tx *ScheduleCreateTransaction) SignWithOperator(client *Client) (*ScheduleCreateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type ScheduleDeleteTransaction added in v2.1.4

type ScheduleDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

ScheduleDeleteTransaction Marks a schedule in the network's action queue as deleted. Must be signed by the admin key of the target schedule. A deleted schedule cannot receive any additional signing keys, nor will it be executed.

func NewScheduleDeleteTransaction added in v2.1.4

func NewScheduleDeleteTransaction() *ScheduleDeleteTransaction

NewScheduleDeleteTransaction creates ScheduleDeleteTransaction which marks a schedule in the network's action queue as deleted. Must be signed by the admin key of the target schedule. A deleted schedule cannot receive any additional signing keys, nor will it be executed.

func (*ScheduleDeleteTransaction) AddSignature added in v2.34.0

func (tx *ScheduleDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *ScheduleDeleteTransaction

AddSignature adds a signature to the transaction.

func (*ScheduleDeleteTransaction) Execute added in v2.1.4

func (*ScheduleDeleteTransaction) Freeze added in v2.1.4

func (*ScheduleDeleteTransaction) FreezeWith added in v2.1.4

func (*ScheduleDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *ScheduleDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ScheduleDeleteTransaction) GetLogLevel added in v2.34.0

func (e *ScheduleDeleteTransaction) GetLogLevel() *LogLevel

func (*ScheduleDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *ScheduleDeleteTransaction) GetMaxBackoff() time.Duration

func (*ScheduleDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *ScheduleDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ScheduleDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *ScheduleDeleteTransaction) GetMinBackoff() time.Duration

func (*ScheduleDeleteTransaction) GetNodeAccountIDs added in v2.34.0

func (e *ScheduleDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ScheduleDeleteTransaction) GetScheduleID added in v2.1.4

func (tx *ScheduleDeleteTransaction) GetScheduleID() ScheduleID

func (*ScheduleDeleteTransaction) Schedule added in v2.1.5

func (*ScheduleDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *ScheduleDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *ScheduleDeleteTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ScheduleDeleteTransaction) SetLogLevel added in v2.25.0

func (*ScheduleDeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ScheduleDeleteTransaction) SetMaxRetry added in v2.1.4

SetMaxRetry sets the max number of errors before execution will fail.

func (*ScheduleDeleteTransaction) SetMaxTransactionFee added in v2.1.4

func (tx *ScheduleDeleteTransaction) SetMaxTransactionFee(fee Hbar) *ScheduleDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ScheduleDeleteTransaction) SetNodeAccountIDs added in v2.1.4

func (tx *ScheduleDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *ScheduleDeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *ScheduleDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *ScheduleDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*ScheduleDeleteTransaction) SetScheduleID added in v2.1.4

func (tx *ScheduleDeleteTransaction) SetScheduleID(scheduleID ScheduleID) *ScheduleDeleteTransaction

SetScheduleID Sets the ScheduleID of the scheduled transaction to be deleted

func (*ScheduleDeleteTransaction) SetTransactionID added in v2.1.4

func (tx *ScheduleDeleteTransaction) SetTransactionID(transactionID TransactionID) *ScheduleDeleteTransaction

SetTransactionID sets the TransactionID for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetTransactionMemo added in v2.1.4

func (tx *ScheduleDeleteTransaction) SetTransactionMemo(memo string) *ScheduleDeleteTransaction

SetTransactionMemo sets the memo for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetTransactionValidDuration added in v2.1.4

func (tx *ScheduleDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *ScheduleDeleteTransaction

SetTransactionValidDuration sets the valid duration for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) Sign added in v2.1.4

Sign uses the provided privateKey to sign the transaction.

func (*ScheduleDeleteTransaction) SignWith added in v2.1.4

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*ScheduleDeleteTransaction) SignWithOperator added in v2.1.4

func (tx *ScheduleDeleteTransaction) SignWithOperator(client *Client) (*ScheduleDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type ScheduleID added in v2.1.4

type ScheduleID struct {
	Shard    uint64
	Realm    uint64
	Schedule uint64
	// contains filtered or unexported fields
}

ScheduleID is the ID for a Hedera account

func ScheduleIDFromString added in v2.1.4

func ScheduleIDFromString(data string) (ScheduleID, error)

ScheduleIDFromString constructs an ScheduleID from a string formatted as `Shard.Realm.Account` (for example "0.0.3")

func (ScheduleID) String added in v2.1.4

func (id ScheduleID) String() string

String returns the string representation of an ScheduleID in `Shard.Realm.Account` (for example "0.0.3")

func (ScheduleID) ToStringWithChecksum added in v2.1.13

func (id ScheduleID) ToStringWithChecksum(client Client) (string, error)

ToStringWithChecksum returns the string representation of an ScheduleID in `Shard.Realm.Account-checksum` (for example "0.0.3-laujm")

func (*ScheduleID) UnmarshalJSON added in v2.1.4

func (id *ScheduleID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the encoding.JSON interface.

func (*ScheduleID) Validate added in v2.1.8

func (id *ScheduleID) Validate(client *Client) error

Deprecated - use ValidateChecksum instead

func (*ScheduleID) ValidateChecksum added in v2.4.0

func (id *ScheduleID) ValidateChecksum(client *Client) error

ValidateChecksum validates the checksum of the account ID

type ScheduleInfo added in v2.1.4

type ScheduleInfo struct {
	ScheduleID       ScheduleID
	CreatorAccountID AccountID
	PayerAccountID   AccountID
	ExecutedAt       *time.Time
	DeletedAt        *time.Time
	ExpirationTime   time.Time
	Signatories      *KeyList
	// Deprecated: Use ScheduleInfo.Signatories instead
	Signers                *KeyList
	AdminKey               Key
	Memo                   string
	ScheduledTransactionID *TransactionID

	LedgerID      LedgerID
	WaitForExpiry bool
	// contains filtered or unexported fields
}

func (*ScheduleInfo) GetScheduledTransaction added in v2.1.5

func (scheduleInfo *ScheduleInfo) GetScheduledTransaction() (ITransaction, error)

GetScheduledTransaction returns the scheduled transaction associated with this schedule

type ScheduleInfoQuery added in v2.1.4

type ScheduleInfoQuery struct {
	Query
	// contains filtered or unexported fields
}

ScheduleInfoQuery Gets information about a schedule in the network's action queue.

func NewScheduleInfoQuery added in v2.1.4

func NewScheduleInfoQuery() *ScheduleInfoQuery

NewScheduleInfoQuery creates ScheduleInfoQuery which gets information about a schedule in the network's action queue.

func (*ScheduleInfoQuery) Execute added in v2.1.4

func (q *ScheduleInfoQuery) Execute(client *Client) (ScheduleInfo, error)

Execute executes the Query with the provided client

func (*ScheduleInfoQuery) GetCost added in v2.1.4

func (q *ScheduleInfoQuery) GetCost(client *Client) (Hbar, error)

func (*ScheduleInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *ScheduleInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ScheduleInfoQuery) GetLogLevel added in v2.34.0

func (e *ScheduleInfoQuery) GetLogLevel() *LogLevel

func (*ScheduleInfoQuery) GetMaxBackoff added in v2.1.16

func (e *ScheduleInfoQuery) GetMaxBackoff() time.Duration

func (*ScheduleInfoQuery) GetMaxRetry added in v2.34.0

func (e *ScheduleInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ScheduleInfoQuery) GetMinBackoff added in v2.1.16

func (e *ScheduleInfoQuery) GetMinBackoff() time.Duration

func (*ScheduleInfoQuery) GetNodeAccountIDs added in v2.2.0

func (e *ScheduleInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ScheduleInfoQuery) GetScheduleID added in v2.1.4

func (q *ScheduleInfoQuery) GetScheduleID() ScheduleID

GetScheduleID returns the id of the schedule to interrogate

func (*ScheduleInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *ScheduleInfoQuery) SetGrpcDeadline(deadline *time.Duration) *ScheduleInfoQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ScheduleInfoQuery) SetLogLevel added in v2.25.0

func (q *ScheduleInfoQuery) SetLogLevel(level LogLevel) *ScheduleInfoQuery

func (*ScheduleInfoQuery) SetMaxBackoff added in v2.1.16

func (q *ScheduleInfoQuery) SetMaxBackoff(max time.Duration) *ScheduleInfoQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ScheduleInfoQuery) SetMaxQueryPayment added in v2.1.4

func (q *ScheduleInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *ScheduleInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ScheduleInfoQuery) SetMaxRetry added in v2.1.4

func (q *ScheduleInfoQuery) SetMaxRetry(count int) *ScheduleInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*ScheduleInfoQuery) SetMinBackoff added in v2.1.16

func (q *ScheduleInfoQuery) SetMinBackoff(min time.Duration) *ScheduleInfoQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ScheduleInfoQuery) SetNodeAccountIDs added in v2.1.4

func (q *ScheduleInfoQuery) SetNodeAccountIDs(accountID []AccountID) *ScheduleInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this ScheduleInfoQuery.

func (*ScheduleInfoQuery) SetPaymentTransactionID added in v2.11.0

func (q *ScheduleInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *ScheduleInfoQuery

func (*ScheduleInfoQuery) SetQueryPayment added in v2.1.4

func (q *ScheduleInfoQuery) SetQueryPayment(paymentAmount Hbar) *ScheduleInfoQuery

SetQueryPayment sets the payment amount for this Query.

func (*ScheduleInfoQuery) SetScheduleID added in v2.1.4

func (q *ScheduleInfoQuery) SetScheduleID(scheduleID ScheduleID) *ScheduleInfoQuery

SetScheduleID Sets the id of the schedule to interrogate

type ScheduleSignTransaction added in v2.1.4

type ScheduleSignTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

ScheduleSignTransaction Adds zero or more signing keys to a schedule. If Long Term Scheduled Transactions are enabled and wait for expiry was set to true on the ScheduleCreate then the transaction will always wait till it's `expiration_time` to execute. Otherwise, if the resulting set of signing keys satisfy the scheduled transaction's signing requirements, it will be executed immediately after the triggering ScheduleSign. Upon SUCCESS, the receipt includes the scheduledTransactionID to use to query for the record of the scheduled transaction's execution (if it occurs).

func NewScheduleSignTransaction added in v2.1.4

func NewScheduleSignTransaction() *ScheduleSignTransaction

NewScheduleSignTransaction creates ScheduleSignTransaction which adds zero or more signing keys to a schedule. If Long Term Scheduled Transactions are enabled and wait for expiry was set to true on the ScheduleCreate then the transaction will always wait till it's `expiration_time` to execute. Otherwise, if the resulting set of signing keys satisfy the scheduled transaction's signing requirements, it will be executed immediately after the triggering ScheduleSign. Upon SUCCESS, the receipt includes the scheduledTransactionID to use to query for the record of the scheduled transaction's execution (if it occurs).

func (*ScheduleSignTransaction) AddSignature added in v2.34.0

func (tx *ScheduleSignTransaction) AddSignature(publicKey PublicKey, signature []byte) *ScheduleSignTransaction

AddSignature adds a signature to the transaction.

func (*ScheduleSignTransaction) Execute added in v2.1.4

func (tx *ScheduleSignTransaction) Execute(client *Client) (TransactionResponse, error)

func (*ScheduleSignTransaction) Freeze added in v2.1.4

func (*ScheduleSignTransaction) FreezeWith added in v2.1.4

func (tx *ScheduleSignTransaction) FreezeWith(client *Client) (*ScheduleSignTransaction, error)

func (*ScheduleSignTransaction) GetGrpcDeadline added in v2.34.0

func (e *ScheduleSignTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*ScheduleSignTransaction) GetLogLevel added in v2.34.0

func (e *ScheduleSignTransaction) GetLogLevel() *LogLevel

func (*ScheduleSignTransaction) GetMaxBackoff added in v2.1.16

func (e *ScheduleSignTransaction) GetMaxBackoff() time.Duration

func (*ScheduleSignTransaction) GetMaxRetry added in v2.34.0

func (e *ScheduleSignTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*ScheduleSignTransaction) GetMinBackoff added in v2.1.16

func (e *ScheduleSignTransaction) GetMinBackoff() time.Duration

func (*ScheduleSignTransaction) GetNodeAccountIDs added in v2.34.0

func (e *ScheduleSignTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*ScheduleSignTransaction) GetScheduleID added in v2.1.4

func (tx *ScheduleSignTransaction) GetScheduleID() ScheduleID

GetScheduleID returns the id of the schedule to add signing keys to

func (*ScheduleSignTransaction) Schedule added in v2.34.0

func (*ScheduleSignTransaction) SetGrpcDeadline added in v2.11.0

func (tx *ScheduleSignTransaction) SetGrpcDeadline(deadline *time.Duration) *ScheduleSignTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*ScheduleSignTransaction) SetLogLevel added in v2.25.0

func (*ScheduleSignTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*ScheduleSignTransaction) SetMaxRetry added in v2.1.4

func (tx *ScheduleSignTransaction) SetMaxRetry(count int) *ScheduleSignTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*ScheduleSignTransaction) SetMaxTransactionFee added in v2.1.4

func (tx *ScheduleSignTransaction) SetMaxTransactionFee(fee Hbar) *ScheduleSignTransaction

SetMaxTransactionFee sets the max transaction fee for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*ScheduleSignTransaction) SetNodeAccountIDs added in v2.1.4

func (tx *ScheduleSignTransaction) SetNodeAccountIDs(nodeID []AccountID) *ScheduleSignTransaction

SetNodeAccountIDs sets the _Node AccountID for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *ScheduleSignTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *ScheduleSignTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*ScheduleSignTransaction) SetScheduleID added in v2.1.4

func (tx *ScheduleSignTransaction) SetScheduleID(scheduleID ScheduleID) *ScheduleSignTransaction

SetScheduleID Sets the id of the schedule to add signing keys to

func (*ScheduleSignTransaction) SetTransactionID added in v2.1.4

func (tx *ScheduleSignTransaction) SetTransactionID(transactionID TransactionID) *ScheduleSignTransaction

SetTransactionID sets the TransactionID for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetTransactionMemo added in v2.1.4

func (tx *ScheduleSignTransaction) SetTransactionMemo(memo string) *ScheduleSignTransaction

SetTransactionMemo sets the memo for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetTransactionValidDuration added in v2.1.4

func (tx *ScheduleSignTransaction) SetTransactionValidDuration(duration time.Duration) *ScheduleSignTransaction

SetTransactionValidDuration sets the valid duration for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) Sign added in v2.1.4

Sign uses the provided privateKey to sign the transaction.

func (*ScheduleSignTransaction) SignWith added in v2.1.4

func (tx *ScheduleSignTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *ScheduleSignTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*ScheduleSignTransaction) SignWithOperator added in v2.1.4

func (tx *ScheduleSignTransaction) SignWithOperator(client *Client) (*ScheduleSignTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type SemanticVersion

type SemanticVersion struct {
	Major uint32
	Minor uint32
	Patch uint32
	Pre   string
	Build string
}

type StakingInfo added in v2.16.0

type StakingInfo struct {
	DeclineStakingReward bool
	StakePeriodStart     *time.Time
	PendingReward        int64
	PendingHbarReward    Hbar
	StakedToMe           Hbar
	StakedAccountID      *AccountID
	StakedNodeID         *int64
}

func StakingInfoFromBytes added in v2.16.0

func StakingInfoFromBytes(data []byte) (StakingInfo, error)

StakingInfoFromBytes returns a StakingInfo object from a raw byte array

func (*StakingInfo) ToBytes added in v2.16.0

func (stakingInfo *StakingInfo) ToBytes() []byte

ToBytes returns the byte representation of the StakingInfo

type Status

type Status uint32
const (
	StatusOk                                                       Status = 0
	StatusInvalidTransaction                                       Status = 1
	StatusPayerAccountNotFound                                     Status = 2
	StatusInvalidNodeAccount                                       Status = 3
	StatusTransactionExpired                                       Status = 4
	StatusInvalidTransactionStart                                  Status = 5
	StatusInvalidTransactionDuration                               Status = 6
	StatusInvalidSignature                                         Status = 7
	StatusMemoTooLong                                              Status = 8
	StatusInsufficientTxFee                                        Status = 9
	StatusInsufficientPayerBalance                                 Status = 10
	StatusDuplicateTransaction                                     Status = 11
	StatusBusy                                                     Status = 12
	StatusNotSupported                                             Status = 13
	StatusInvalidFileID                                            Status = 14
	StatusInvalidAccountID                                         Status = 15
	StatusInvalidContractID                                        Status = 16
	StatusInvalidTransactionID                                     Status = 17
	StatusReceiptNotFound                                          Status = 18
	StatusRecordNotFound                                           Status = 19
	StatusInvalidSolidityID                                        Status = 20
	StatusUnknown                                                  Status = 21
	StatusSuccess                                                  Status = 22
	StatusFailInvalid                                              Status = 23
	StatusFailFee                                                  Status = 24
	StatusFailBalance                                              Status = 25
	StatusKeyRequired                                              Status = 26
	StatusBadEncoding                                              Status = 27
	StatusInsufficientAccountBalance                               Status = 28
	StatusInvalidSolidityAddress                                   Status = 29
	StatusInsufficientGas                                          Status = 30
	StatusContractSizeLimitExceeded                                Status = 31
	StatusLocalCallModificationException                           Status = 32
	StatusContractRevertExecuted                                   Status = 33
	StatusContractExecutionException                               Status = 34
	StatusInvalidReceivingNodeAccount                              Status = 35
	StatusMissingQueryHeader                                       Status = 36
	StatusAccountUpdateFailed                                      Status = 37
	StatusInvalidKeyEncoding                                       Status = 38
	StatusNullSolidityAddress                                      Status = 39
	StatusContractUpdateFailed                                     Status = 40
	StatusInvalidQueryHeader                                       Status = 41
	StatusInvalidFeeSubmitted                                      Status = 42
	StatusInvalidPayerSignature                                    Status = 43
	StatusKeyNotProvided                                           Status = 44
	StatusInvalidExpirationTime                                    Status = 45
	StatusNoWaclKey                                                Status = 46
	StatusFileContentEmpty                                         Status = 47
	StatusInvalidAccountAmounts                                    Status = 48
	StatusEmptyTransactionBody                                     Status = 49
	StatusInvalidTransactionBody                                   Status = 50
	StatusInvalidSignatureTypeMismatchingKey                       Status = 51
	StatusInvalidSignatureCountMismatchingKey                      Status = 52
	StatusEmptyLiveHashBody                                        Status = 53
	StatusEmptyLiveHash                                            Status = 54
	StatusEmptyLiveHashKeys                                        Status = 55
	StatusInvalidLiveHashSize                                      Status = 56
	StatusEmptyQueryBody                                           Status = 57
	StatusEmptyLiveHashQuery                                       Status = 58
	StatusLiveHashNotFound                                         Status = 59
	StatusAccountIDDoesNotExist                                    Status = 60
	StatusLiveHashAlreadyExists                                    Status = 61
	StatusInvalidFileWacl                                          Status = 62
	StatusSerializationFailed                                      Status = 63
	StatusTransactionOversize                                      Status = 64
	StatusTransactionTooManyLayers                                 Status = 65
	StatusContractDeleted                                          Status = 66
	StatusPlatformNotActive                                        Status = 67
	StatusKeyPrefixMismatch                                        Status = 68
	StatusPlatformTransactionNotCreated                            Status = 69
	StatusInvalidRenewalPeriod                                     Status = 70
	StatusInvalidPayerAccountID                                    Status = 71
	StatusAccountDeleted                                           Status = 72
	StatusFileDeleted                                              Status = 73
	StatusAccountRepeatedInAccountAmounts                          Status = 74
	StatusSettingNegativeAccountBalance                            Status = 75
	StatusObtainerRequired                                         Status = 76
	StatusObtainerSameContractID                                   Status = 77
	StatusObtainerDoesNotExist                                     Status = 78
	StatusModifyingImmutableContract                               Status = 79
	StatusFileSystemException                                      Status = 80
	StatusAutorenewDurationNotInRange                              Status = 81
	StatusErrorDecodingBytestring                                  Status = 82
	StatusContractFileEmpty                                        Status = 83
	StatusContractBytecodeEmpty                                    Status = 84
	StatusInvalidInitialBalance                                    Status = 85
	StatusInvalidReceiveRecordThreshold                            Status = 86
	StatusInvalidSendRecordThreshold                               Status = 87
	StatusAccountIsNotGenesisAccount                               Status = 88
	StatusPayerAccountUnauthorized                                 Status = 89
	StatusInvalidFreezeTransactionBody                             Status = 90
	StatusFreezeTransactionBodyNotFound                            Status = 91
	StatusTransferListSizeLimitExceeded                            Status = 92
	StatusResultSizeLimitExceeded                                  Status = 93
	StatusNotSpecialAccount                                        Status = 94
	StatusContractNegativeGas                                      Status = 95
	StatusContractNegativeValue                                    Status = 96
	StatusInvalidFeeFile                                           Status = 97
	StatusInvalidExchangeRateFile                                  Status = 98
	StatusInsufficientLocalCallGas                                 Status = 99
	StatusEntityNotAllowedToDelete                                 Status = 100
	StatusAuthorizationFailed                                      Status = 101
	StatusFileUploadedProtoInvalid                                 Status = 102
	StatusFileUploadedProtoNotSavedToDisk                          Status = 103
	StatusFeeScheduleFilePartUploaded                              Status = 104
	StatusExchangeRateChangeLimitExceeded                          Status = 105
	StatusMaxContractStorageExceeded                               Status = 106
	StatusTransferAccountSameAsDeleteAccount                       Status = 107
	StatusTotalLedgerBalanceInvalid                                Status = 108
	StatusExpirationReductionNotAllowed                            Status = 110
	StatusMaxGasLimitExceeded                                      Status = 111
	StatusMaxFileSizeExceeded                                      Status = 112
	StatusReceiverSigRequired                                      Status = 113
	StatusInvalidTopicID                                           Status = 150
	StatusInvalidAdminKey                                          Status = 155
	StatusInvalidSubmitKey                                         Status = 156
	StatusUnauthorized                                             Status = 157
	StatusInvalidTopicMessage                                      Status = 158
	StatusInvalidAutorenewAccount                                  Status = 159
	StatusAutorenewAccountNotAllowed                               Status = 160
	StatusTopicExpired                                             Status = 162
	StatusInvalidChunkNumber                                       Status = 163
	StatusInvalidChunkTransactionID                                Status = 164
	StatusAccountFrozenForToken                                    Status = 165
	StatusTokensPerAccountLimitExceeded                            Status = 166
	StatusInvalidTokenID                                           Status = 167
	StatusInvalidTokenDecimals                                     Status = 168
	StatusInvalidTokenInitialSupply                                Status = 169
	StatusInvalidTreasuryAccountForToken                           Status = 170
	StatusInvalidTokenSymbol                                       Status = 171
	StatusTokenHasNoFreezeKey                                      Status = 172
	StatusTransfersNotZeroSumForToken                              Status = 173
	StatusMissingTokenSymbol                                       Status = 174
	StatusTokenSymbolTooLong                                       Status = 175
	StatusAccountKycNotGrantedForToken                             Status = 176
	StatusTokenHasNoKycKey                                         Status = 177
	StatusInsufficientTokenBalance                                 Status = 178
	StatusTokenWasDeleted                                          Status = 179
	StatusTokenHasNoSupplyKey                                      Status = 180
	StatusTokenHasNoWipeKey                                        Status = 181
	StatusInvalidTokenMintAmount                                   Status = 182
	StatusInvalidTokenBurnAmount                                   Status = 183
	StatusTokenNotAssociatedToAccount                              Status = 184
	StatusCannotWipeTokenTreasuryAccount                           Status = 185
	StatusInvalidKycKey                                            Status = 186
	StatusInvalidWipeKey                                           Status = 187
	StatusInvalidFreezeKey                                         Status = 188
	StatusInvalidSupplyKey                                         Status = 189
	StatusMissingTokenName                                         Status = 190
	StatusTokenNameTooLong                                         Status = 191
	StatusInvalidWipingAmount                                      Status = 192
	StatusTokenIsImmutable                                         Status = 193
	StatusTokenAlreadyAssociatedToAccount                          Status = 194
	StatusTransactionRequiresZeroTokenBalances                     Status = 195
	StatusAccountIsTreasury                                        Status = 196
	StatusTokenIDRepeatedInTokenList                               Status = 197
	StatusTokenTransferListSizeLimitExceeded                       Status = 198
	StatusEmptyTokenTransferBody                                   Status = 199
	StatusEmptyTokenTransferAccountAmounts                         Status = 200
	StatusInvalidScheduleID                                        Status = 201
	StatusScheduleIsImmutable                                      Status = 202
	StatusInvalidSchedulePayerID                                   Status = 203
	StatusInvalidScheduleAccountID                                 Status = 204
	StatusNoNewValidSignatures                                     Status = 205
	StatusUnresolvableRequiredSigners                              Status = 206
	StatusScheduledTransactionNotInWhitelist                       Status = 207
	StatusSomeSignaturesWereInvalid                                Status = 208
	StatusTransactionIDFieldNotAllowed                             Status = 209
	StatusIdenticalScheduleAlreadyCreated                          Status = 210
	StatusInvalidZeroByteInString                                  Status = 211
	StatusScheduleAlreadyDeleted                                   Status = 212
	StatusScheduleAlreadyExecuted                                  Status = 213
	StatusMessageSizeTooLarge                                      Status = 214
	StatusOperationRepeatedInBucketGroups                          Status = 215
	StatusBucketCapacityOverflow                                   Status = 216
	StatusNodeCapacityNotSufficientForOperation                    Status = 217
	StatusBucketHasNoThrottleGroups                                Status = 218
	StatusThrottleGroupHasZeroOpsPerSec                            Status = 219
	StatusSuccessButMissingExpectedOperation                       Status = 220
	StatusUnparseableThrottleDefinitions                           Status = 221
	StatusInvalidThrottleDefinitions                               Status = 222
	StatusAccountExpiredAndPendingRemoval                          Status = 223
	StatusInvalidTokenMaxSupply                                    Status = 224
	StatusInvalidTokenNftSerialNumber                              Status = 225
	StatusInvalidNftID                                             Status = 226
	StatusMetadataTooLong                                          Status = 227
	StatusBatchSizeLimitExceeded                                   Status = 228
	StatusInvalidQueryRange                                        Status = 229
	StatusFractionDividesByZero                                    Status = 230
	StatusInsufficientPayerBalanceForCustomFee                     Status = 231
	StatusCustomFeesListTooLong                                    Status = 232
	StatusInvalidCustomFeeCollector                                Status = 233
	StatusInvalidTokenIDInCustomFees                               Status = 234
	StatusTokenNotAssociatedToFeeCollector                         Status = 235
	StatusTokenMaxSupplyReached                                    Status = 236
	StatusSenderDoesNotOwnNftSerialNo                              Status = 237
	StatusCustomFeeNotFullySpecified                               Status = 238
	StatusCustomFeeMustBePositive                                  Status = 239
	StatusTokenHasNoFeeScheduleKey                                 Status = 240
	StatusCustomFeeOutsideNumericRange                             Status = 241
	StatusRoyaltyFractionCannotExceedOne                           Status = 242
	StatusFractionalFeeMaxAmountLessThanMinAmount                  Status = 243
	StatusCustomScheduleAlreadyHasNoFees                           Status = 244
	StatusCustomFeeDenominationMustBeFungibleCommon                Status = 245
	StatusCustomFractionalFeeOnlyAllowedForFungibleCommon          Status = 246
	StatusInvalidCustomFeeScheduleKey                              Status = 247
	StatusInvalidTokenMintMetadata                                 Status = 248
	StatusInvalidTokenBurnMetadata                                 Status = 249
	StatusCurrentTreasuryStillOwnsNfts                             Status = 250
	StatusAccountStillOwnsNfts                                     Status = 251
	StatusTreasuryMustOwnBurnedNft                                 Status = 252
	StatusAccountDoesNotOwnWipedNft                                Status = 253
	StatusAccountAmountTransfersOnlyAllowedForFungibleCommon       Status = 254
	StatusMaxNftsInPriceRegimeHaveBeenMinted                       Status = 255
	StatusPayerAccountDeleted                                      Status = 256
	StatusCustomFeeChargingExceededMaxRecursionDepth               Status = 257
	StatusCustomFeeChargingExceededMaxAccountAmounts               Status = 258
	StatusInsufficientSenderAccountBalanceForCustomFee             Status = 259
	StatusSerialNumberLimitReached                                 Status = 260
	StatusCustomRoyaltyFeeOnlyAllowedForNonFungibleUnique          Status = 261
	StatusNoRemainingAutomaticAssociations                         Status = 262
	StatusExistingAutomaticAssociationsExceedGivenLimit            Status = 263
	StatusRequestedNumAutomaticAssociationsExceedsAssociationLimit Status = 264
	StatusTokenIsPaused                                            Status = 265
	StatusTokenHasNoPauseKey                                       Status = 266
	StatusInvalidPauseKey                                          Status = 267
	StatusFreezeUpdateFileDoesNotExist                             Status = 268
	StatusFreezeUpdateFileHashDoesNotMatch                         Status = 269
	StatusNoUpgradeHasBeenPrepared                                 Status = 270
	StatusNoFreezeIsScheduled                                      Status = 271
	StatusUpdateFileHashChangedSincePrepareUpgrade                 Status = 272
	StatusFreezeStartTimeMustBeFuture                              Status = 273
	StatusPreparedUpdateFileIsImmutable                            Status = 274
	StatusFreezeAlreadyScheduled                                   Status = 275
	StatusFreezeUpgradeInProgress                                  Status = 276
	StatusUpdateFileIDDoesNotMatchPrepared                         Status = 277
	StatusUpdateFileHashDoesNotMatchPrepared                       Status = 278
	StatusConsensusGasExhausted                                    Status = 279
	StatusRevertedSuccess                                          Status = 280
	StatusMaxStorageInPriceRegimeHasBeenUsed                       Status = 281
	StatusInvalidAliasKey                                          Status = 282
	StatusUnexpectedTokenDecimals                                  Status = 283
	StatusInvalidProxyAccountID                                    Status = 284
	StatusInvalidTransferAccountID                                 Status = 285
	StatusInvalidFeeCollectorAccountID                             Status = 286
	StatusAliasIsImmutable                                         Status = 287
	StatusSpenderAccountSameAsOwner                                Status = 288
	StatusAmountExceedsTokenMaxSupply                              Status = 289
	StatusNegativeAllowanceAmount                                  Status = 290
	StatusCannotApproveForAllFungibleCommon                        Status = 291
	StatusSpenderDoesNotHaveAllowance                              Status = 292
	StatusAmountExceedsAllowance                                   Status = 293
	StatusMaxAllowancesExceeded                                    Status = 294
	StatusEmptyAllowances                                          Status = 295
	StatusSpenderAccountRepeatedInAllowance                        Status = 296
	StatusRepeatedSerialNumsInNftAllowances                        Status = 297
	StatusFungibleTokenInNftAllowances                             Status = 298
	StatusNftInFungibleTokenAllowances                             Status = 299
	StatusInvalidAllowanceOwnerID                                  Status = 300
	StatusInvalidAllowanceSpenderID                                Status = 301
	StatusRepeatedAllowancesToDelete                               Status = 302
	StatusInvalidDelegatingSpender                                 Status = 303
	StatusDelegatingSpenderCannotGrantApproveForAll                Status = 304
	StatusDelegatingSpenderDoesNotHaveApproveForAll                Status = 305
	StatusScheduleExpirationTimeTooFarInFuture                     Status = 306
	StatusScheduleExpirationTimeMustBeHigherThanConsensusTime      Status = 307
	StatusScheduleFutureThrottleExceeded                           Status = 308
	StatusScheduleFutureGasLimitExceeded                           Status = 309
	StatusInvalidEthereumTransaction                               Status = 310
	StatusWrongChanID                                              Status = 311
	StatusWrongNonce                                               Status = 312
	StatusAccessListUnsupported                                    Status = 313
	StatusSchedulePendingExpiration                                Status = 314
	StatusContractIsTokenTreasury                                  Status = 315
	StatusContractHasNonZeroTokenBalances                          Status = 316
	StatusContractExpiredAndPendingRemoval                         Status = 317
	StatusContractHasNoAutoRenewAccount                            Status = 318
	StatusPermanentRemovalRequiresSystemInitiation                 Status = 319
	StatusProxyAccountIDFieldIsDeprecated                          Status = 320
	StatusSelfStakingIsNotAllowed                                  Status = 321
	StatusInvalidStakingID                                         Status = 322
	StatusStakingNotEnabled                                        Status = 323
	StatusInvalidRandomGenerateRange                               Status = 324
	StatusMaxEntitiesInPriceRegimeHaveBeenCreated                  Status = 325
	StatusInvalidFullPrefixSignatureForPrecompile                  Status = 326
	StatusInsufficientBalancesForStorageRent                       Status = 327
	StatusMaxChildRecordsExceeded                                  Status = 328
	StatusInsufficientBalancesForRenewalFees                       Status = 329
	StatusTransactionHasUnknownFields                              Status = 330
	StatusAccountIsImmutable                                       Status = 331
	StatusAliasAlreadyAssigned                                     Status = 332
)

func (Status) String

func (status Status) String() string

String() returns a string representation of the status

type StorageChange added in v2.9.0

type StorageChange struct {
	Slot         *big.Int
	ValueRead    *big.Int
	ValueWritten *big.Int
}

func StorageChangeFromBytes added in v2.9.0

func StorageChangeFromBytes(data []byte) (StorageChange, error)

StorageChangeFromBytes returns a StorageChange from a byte array

func (*StorageChange) ToBytes added in v2.9.0

func (storageChange *StorageChange) ToBytes() []byte

ToBytes returns the byte representation of the StorageChange

type SubscriptionHandle

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

func (SubscriptionHandle) Unsubscribe

func (handle SubscriptionHandle) Unsubscribe()

Unsubscribe removes the subscription from the client

type SystemDeleteTransaction

type SystemDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

Delete a file or smart contract - can only be done with a Hedera admin. When it is deleted, it immediately disappears from the system as seen by the user, but is still stored internally until the expiration time, at which time it is truly and permanently deleted. Until that time, it can be undeleted by the Hedera admin. When a smart contract is deleted, the cryptocurrency account within it continues to exist, and is not affected by the expiration time here.

func NewSystemDeleteTransaction

func NewSystemDeleteTransaction() *SystemDeleteTransaction

NewSystemDeleteTransaction creates a SystemDeleteTransaction transaction which can be used to construct and execute a System Delete Transaction.

func (*SystemDeleteTransaction) AddSignature added in v2.1.3

func (tx *SystemDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *SystemDeleteTransaction

AddSignature adds a signature to the transaction.

func (*SystemDeleteTransaction) Execute

func (tx *SystemDeleteTransaction) Execute(client *Client) (TransactionResponse, error)

func (*SystemDeleteTransaction) Freeze

func (*SystemDeleteTransaction) FreezeWith

func (tx *SystemDeleteTransaction) FreezeWith(client *Client) (*SystemDeleteTransaction, error)

func (*SystemDeleteTransaction) GetContractID added in v2.2.0

func (tx *SystemDeleteTransaction) GetContractID() ContractID

GetContractID returns the ContractID of the contract which will be deleted.

func (*SystemDeleteTransaction) GetExpirationTime

func (tx *SystemDeleteTransaction) GetExpirationTime() int64

GetExpirationTime returns the time at which this transaction will expire.

func (*SystemDeleteTransaction) GetFileID

func (tx *SystemDeleteTransaction) GetFileID() FileID

GetFileID returns the FileID of the file which will be deleted.

func (*SystemDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *SystemDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*SystemDeleteTransaction) GetLogLevel added in v2.34.0

func (e *SystemDeleteTransaction) GetLogLevel() *LogLevel

func (*SystemDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *SystemDeleteTransaction) GetMaxBackoff() time.Duration

func (*SystemDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *SystemDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*SystemDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *SystemDeleteTransaction) GetMinBackoff() time.Duration

func (*SystemDeleteTransaction) GetNodeAccountIDs

func (e *SystemDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*SystemDeleteTransaction) Schedule added in v2.1.5

func (*SystemDeleteTransaction) SetContractID

func (tx *SystemDeleteTransaction) SetContractID(contractID ContractID) *SystemDeleteTransaction

SetContractID sets the ContractID of the contract which will be deleted.

func (*SystemDeleteTransaction) SetExpirationTime

func (tx *SystemDeleteTransaction) SetExpirationTime(expiration time.Time) *SystemDeleteTransaction

SetExpirationTime sets the time at which this transaction will expire.

func (*SystemDeleteTransaction) SetFileID

SetFileID sets the FileID of the file which will be deleted.

func (*SystemDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *SystemDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *SystemDeleteTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*SystemDeleteTransaction) SetLogLevel added in v2.25.0

func (*SystemDeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*SystemDeleteTransaction) SetMaxRetry added in v2.1.2

func (tx *SystemDeleteTransaction) SetMaxRetry(count int) *SystemDeleteTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*SystemDeleteTransaction) SetMaxTransactionFee

func (tx *SystemDeleteTransaction) SetMaxTransactionFee(fee Hbar) *SystemDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*SystemDeleteTransaction) SetNodeAccountIDs

func (tx *SystemDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *SystemDeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *SystemDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *SystemDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*SystemDeleteTransaction) SetTransactionID

func (tx *SystemDeleteTransaction) SetTransactionID(transactionID TransactionID) *SystemDeleteTransaction

SetTransactionID sets the TransactionID for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetTransactionMemo

func (tx *SystemDeleteTransaction) SetTransactionMemo(memo string) *SystemDeleteTransaction

SetTransactionMemo sets the memo for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetTransactionValidDuration

func (tx *SystemDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *SystemDeleteTransaction

SetTransactionValidDuration sets the valid duration for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*SystemDeleteTransaction) SignWith

func (tx *SystemDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *SystemDeleteTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*SystemDeleteTransaction) SignWithOperator

func (tx *SystemDeleteTransaction) SignWithOperator(client *Client) (*SystemDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type SystemUndeleteTransaction

type SystemUndeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

Undelete a file or smart contract that was deleted by AdminDelete. Can only be done with a Hedera admin.

func NewSystemUndeleteTransaction

func NewSystemUndeleteTransaction() *SystemUndeleteTransaction

NewSystemUndeleteTransaction creates a SystemUndeleteTransaction transaction which can be used to construct and execute a System Undelete Transaction.

func (*SystemUndeleteTransaction) AddSignature added in v2.1.3

func (tx *SystemUndeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *SystemUndeleteTransaction

AddSignature adds a signature to the transaction.

func (*SystemUndeleteTransaction) Execute

func (*SystemUndeleteTransaction) Freeze

func (*SystemUndeleteTransaction) FreezeWith

func (*SystemUndeleteTransaction) GetContractID added in v2.2.0

func (tx *SystemUndeleteTransaction) GetContractID() ContractID

GetContractID returns the ContractID of the contract whose deletion is being undone.

func (*SystemUndeleteTransaction) GetFileID

func (tx *SystemUndeleteTransaction) GetFileID() FileID

GetFileID returns the FileID of the file whose deletion is being undone.

func (*SystemUndeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *SystemUndeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*SystemUndeleteTransaction) GetLogLevel added in v2.34.0

func (e *SystemUndeleteTransaction) GetLogLevel() *LogLevel

func (*SystemUndeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *SystemUndeleteTransaction) GetMaxBackoff() time.Duration

func (*SystemUndeleteTransaction) GetMaxRetry added in v2.34.0

func (e *SystemUndeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*SystemUndeleteTransaction) GetMinBackoff added in v2.1.16

func (e *SystemUndeleteTransaction) GetMinBackoff() time.Duration

func (*SystemUndeleteTransaction) GetNodeAccountIDs

func (e *SystemUndeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*SystemUndeleteTransaction) Schedule added in v2.1.5

func (*SystemUndeleteTransaction) SetContractID

func (tx *SystemUndeleteTransaction) SetContractID(contractID ContractID) *SystemUndeleteTransaction

SetContractID sets the ContractID of the contract whose deletion is being undone.

func (*SystemUndeleteTransaction) SetFileID

SetFileID sets the FileID of the file whose deletion is being undone.

func (*SystemUndeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *SystemUndeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *SystemUndeleteTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*SystemUndeleteTransaction) SetLogLevel added in v2.25.0

func (*SystemUndeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*SystemUndeleteTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*SystemUndeleteTransaction) SetMaxTransactionFee

func (tx *SystemUndeleteTransaction) SetMaxTransactionFee(fee Hbar) *SystemUndeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*SystemUndeleteTransaction) SetNodeAccountIDs

func (tx *SystemUndeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *SystemUndeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *SystemUndeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *SystemUndeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*SystemUndeleteTransaction) SetTransactionID

func (tx *SystemUndeleteTransaction) SetTransactionID(transactionID TransactionID) *SystemUndeleteTransaction

SetTransactionID sets the TransactionID for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetTransactionMemo

func (tx *SystemUndeleteTransaction) SetTransactionMemo(memo string) *SystemUndeleteTransaction

SetTransactionMemo sets the memo for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetTransactionValidDuration

func (tx *SystemUndeleteTransaction) SetTransactionValidDuration(duration time.Duration) *SystemUndeleteTransaction

SetTransactionValidDuration sets the valid duration for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*SystemUndeleteTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*SystemUndeleteTransaction) SignWithOperator

func (tx *SystemUndeleteTransaction) SignWithOperator(client *Client) (*SystemUndeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenAllowance added in v2.9.0

type TokenAllowance struct {
	TokenID          *TokenID
	SpenderAccountID *AccountID
	OwnerAccountID   *AccountID
	Amount           int64
}

An approved allowance of token transfers for a spender.

func NewTokenAllowance added in v2.9.0

func NewTokenAllowance(tokenID TokenID, owner AccountID, spender AccountID, amount int64) TokenAllowance

NewTokenAllowance creates a TokenAllowance with the given tokenID, owner, spender, and amount

func (*TokenAllowance) String added in v2.13.0

func (approval *TokenAllowance) String() string

String returns a string representation of the TokenAllowance

type TokenAssociateTransaction

type TokenAssociateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenAssociateTransaction Associates the provided account with the provided tokens. Must be signed by the provided Account's key. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF. If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an association between the provided account and any of the tokens already exists, the transaction will resolve to TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT. If the provided account's associations count exceed the constraint of maximum token associations per account, the transaction will resolve to TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED. On success, associations between the provided account and tokens are made and the account is ready to interact with the tokens.

func NewTokenAssociateTransaction

func NewTokenAssociateTransaction() *TokenAssociateTransaction

NewTokenAssociateTransaction creates TokenAssociateTransaction which associates the provided account with the provided tokens. Must be signed by the provided Account's key. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF. If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an association between the provided account and any of the tokens already exists, the transaction will resolve to TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT. If the provided account's associations count exceed the constraint of maximum token associations per account, the transaction will resolve to TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED. On success, associations between the provided account and tokens are made and the account is ready to interact with the tokens.

func (*TokenAssociateTransaction) AddSignature added in v2.1.3

func (tx *TokenAssociateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenAssociateTransaction

AddSignature adds a signature to the transaction.

func (*TokenAssociateTransaction) AddTokenID

AddTokenID Adds the token to a token list to be associated with the provided account

func (*TokenAssociateTransaction) Execute

func (*TokenAssociateTransaction) Freeze

func (*TokenAssociateTransaction) FreezeWith

func (*TokenAssociateTransaction) GetAccountID

func (tx *TokenAssociateTransaction) GetAccountID() AccountID

GetAccountID returns the account to be associated with the provided tokens

func (*TokenAssociateTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenAssociateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenAssociateTransaction) GetLogLevel added in v2.34.0

func (e *TokenAssociateTransaction) GetLogLevel() *LogLevel

func (*TokenAssociateTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenAssociateTransaction) GetMaxBackoff() time.Duration

func (*TokenAssociateTransaction) GetMaxRetry added in v2.34.0

func (e *TokenAssociateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenAssociateTransaction) GetMinBackoff added in v2.1.16

func (e *TokenAssociateTransaction) GetMinBackoff() time.Duration

func (*TokenAssociateTransaction) GetNodeAccountIDs

func (e *TokenAssociateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenAssociateTransaction) GetTokenIDs

func (tx *TokenAssociateTransaction) GetTokenIDs() []TokenID

GetTokenIDs returns the tokens to be associated with the provided account

func (*TokenAssociateTransaction) Schedule added in v2.1.5

func (*TokenAssociateTransaction) SetAccountID

func (tx *TokenAssociateTransaction) SetAccountID(accountID AccountID) *TokenAssociateTransaction

SetAccountID Sets the account to be associated with the provided tokens

func (*TokenAssociateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenAssociateTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenAssociateTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenAssociateTransaction) SetLogLevel added in v2.25.0

func (*TokenAssociateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenAssociateTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenAssociateTransaction) SetMaxTransactionFee

func (tx *TokenAssociateTransaction) SetMaxTransactionFee(fee Hbar) *TokenAssociateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenAssociateTransaction) SetNodeAccountIDs

func (tx *TokenAssociateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenAssociateTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenAssociateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenAssociateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenAssociateTransaction) SetTokenIDs

SetTokenIDs Sets the tokens to be associated with the provided account

func (*TokenAssociateTransaction) SetTransactionID

func (tx *TokenAssociateTransaction) SetTransactionID(transactionID TransactionID) *TokenAssociateTransaction

SetTransactionID sets the TransactionID for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetTransactionMemo

func (tx *TokenAssociateTransaction) SetTransactionMemo(memo string) *TokenAssociateTransaction

SetTransactionMemo sets the memo for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetTransactionValidDuration

func (tx *TokenAssociateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenAssociateTransaction

SetTransactionValidDuration sets the valid duration for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenAssociateTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenAssociateTransaction) SignWithOperator

func (tx *TokenAssociateTransaction) SignWithOperator(client *Client) (*TokenAssociateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenAssociation added in v2.2.0

type TokenAssociation struct {
	TokenID   *TokenID
	AccountID *AccountID
}

A token - account association

func TokenAssociationFromBytes added in v2.2.0

func TokenAssociationFromBytes(data []byte) (TokenAssociation, error)

TokenAssociationFromBytes returns a TokenAssociation from a raw protobuf byte array

func (*TokenAssociation) ToBytes added in v2.2.0

func (association *TokenAssociation) ToBytes() []byte

ToBytes returns the byte representation of the TokenAssociation

type TokenBalanceMap added in v2.1.10

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

func (*TokenBalanceMap) Get added in v2.1.10

func (tokenBalances *TokenBalanceMap) Get(tokenID TokenID) uint64

Get returns the balance of the given tokenID

type TokenBurnTransaction

type TokenBurnTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenBurnTransaction Burns tokens from the Token's treasury Account. If no Supply Key is defined, the transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. The operation decreases the Total Supply of the Token. Total supply cannot go below zero. The amount provided must be in the lowest denomination possible. Example: Token A has 2 decimals. In order to burn 100 tokens, one must provide amount of 10000. In order to burn 100.55 tokens, one must provide amount of 10055.

func NewTokenBurnTransaction

func NewTokenBurnTransaction() *TokenBurnTransaction

NewTokenBurnTransaction creates TokenBurnTransaction which burns tokens from the Token's treasury Account. If no Supply Key is defined, the transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. The operation decreases the Total Supply of the Token. Total supply cannot go below zero. The amount provided must be in the lowest denomination possible. Example: Token A has 2 decimals. In order to burn 100 tokens, one must provide amount of 10000. In order to burn 100.55 tokens, one must provide amount of 10055.

func (*TokenBurnTransaction) AddSignature added in v2.1.3

func (tx *TokenBurnTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenBurnTransaction

AddSignature adds a signature to the transaction.

func (*TokenBurnTransaction) Execute

func (tx *TokenBurnTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenBurnTransaction) Freeze

func (*TokenBurnTransaction) FreezeWith

func (tx *TokenBurnTransaction) FreezeWith(client *Client) (*TokenBurnTransaction, error)

func (*TokenBurnTransaction) GetAmmount deprecated

func (tx *TokenBurnTransaction) GetAmmount() uint64

Deprecated: Use TokenBurnTransaction.GetAmount() instead.

func (*TokenBurnTransaction) GetAmount added in v2.1.6

func (tx *TokenBurnTransaction) GetAmount() uint64

func (*TokenBurnTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenBurnTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenBurnTransaction) GetLogLevel added in v2.34.0

func (e *TokenBurnTransaction) GetLogLevel() *LogLevel

func (*TokenBurnTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenBurnTransaction) GetMaxBackoff() time.Duration

func (*TokenBurnTransaction) GetMaxRetry added in v2.34.0

func (e *TokenBurnTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenBurnTransaction) GetMinBackoff added in v2.1.16

func (e *TokenBurnTransaction) GetMinBackoff() time.Duration

func (*TokenBurnTransaction) GetNodeAccountIDs

func (e *TokenBurnTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenBurnTransaction) GetSerialNumbers added in v2.1.11

func (tx *TokenBurnTransaction) GetSerialNumbers() []int64

GetSerialNumbers returns the list of serial numbers to be burned.

func (*TokenBurnTransaction) GetTokenID

func (tx *TokenBurnTransaction) GetTokenID() TokenID

GetTokenID returns the TokenID for the token which will be burned.

func (*TokenBurnTransaction) Schedule added in v2.1.5

func (*TokenBurnTransaction) SetAmount

func (tx *TokenBurnTransaction) SetAmount(amount uint64) *TokenBurnTransaction

SetAmount Sets the amount to burn from the Treasury Account. Amount must be a positive non-zero number, not bigger than the token balance of the treasury account (0; balance], represented in the lowest denomination.

func (*TokenBurnTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenBurnTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenBurnTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenBurnTransaction) SetLogLevel added in v2.25.0

func (tx *TokenBurnTransaction) SetLogLevel(level LogLevel) *TokenBurnTransaction

func (*TokenBurnTransaction) SetMaxBackoff added in v2.1.16

func (tx *TokenBurnTransaction) SetMaxBackoff(max time.Duration) *TokenBurnTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenBurnTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenBurnTransaction) SetMaxRetry(count int) *TokenBurnTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenBurnTransaction) SetMaxTransactionFee

func (tx *TokenBurnTransaction) SetMaxTransactionFee(fee Hbar) *TokenBurnTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetMinBackoff added in v2.1.16

func (tx *TokenBurnTransaction) SetMinBackoff(min time.Duration) *TokenBurnTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenBurnTransaction) SetNodeAccountIDs

func (tx *TokenBurnTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenBurnTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenBurnTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenBurnTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenBurnTransaction) SetSerialNumber added in v2.1.11

func (tx *TokenBurnTransaction) SetSerialNumber(serial int64) *TokenBurnTransaction

SetSerialNumber Applicable to tokens of type NON_FUNGIBLE_UNIQUE. The list of serial numbers to be burned.

func (*TokenBurnTransaction) SetSerialNumbers added in v2.1.11

func (tx *TokenBurnTransaction) SetSerialNumbers(serial []int64) *TokenBurnTransaction

SetSerialNumbers sets the list of serial numbers to be burned.

func (*TokenBurnTransaction) SetTokenID

func (tx *TokenBurnTransaction) SetTokenID(tokenID TokenID) *TokenBurnTransaction

SetTokenID Sets the token for which to burn tokens. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenBurnTransaction) SetTransactionID

func (tx *TokenBurnTransaction) SetTransactionID(transactionID TransactionID) *TokenBurnTransaction

SetTransactionID sets the TransactionID for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetTransactionMemo

func (tx *TokenBurnTransaction) SetTransactionMemo(memo string) *TokenBurnTransaction

SetTransactionMemo sets the memo for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetTransactionValidDuration

func (tx *TokenBurnTransaction) SetTransactionValidDuration(duration time.Duration) *TokenBurnTransaction

SetTransactionValidDuration sets the valid duration for this TokenBurnTransaction.

func (*TokenBurnTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenBurnTransaction) SignWith

func (tx *TokenBurnTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenBurnTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenBurnTransaction) SignWithOperator

func (tx *TokenBurnTransaction) SignWithOperator(client *Client) (*TokenBurnTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenCreateTransaction

type TokenCreateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenCreateTransaction Create a new token. After the token is created, the Token ID for it is in the receipt. The specified Treasury Account is receiving the initial supply of tokens as-well as the tokens from the Token Mint operation once executed. The balance of the treasury account is decreased when the Token Burn operation is executed.

The initialSupply is the initial supply of the smallest parts of a token (like a tinybar, not an hbar). These are the smallest units of the token which may be transferred.

The supply can change over time. If the total supply at some moment is S parts of tokens, and the token is using D decimals, then S must be less than or equal to 2<sup>63</sup>-1, which is 9,223,372,036,854,775,807. The number of whole tokens (not parts) will be S / 10<sup>D</sup>.

If decimals is 8 or 11, then the number of whole tokens can be at most a few billions or millions, respectively. For example, it could match Bitcoin (21 million whole tokens with 8 decimals) or hbars (50 billion whole tokens with 8 decimals). It could even match Bitcoin with milli-satoshis (21 million whole tokens with 11 decimals).

Note that a created token is immutable if the adminKey is omitted. No property of an immutable token can ever change, with the sole exception of its expiry. Anyone can pay to extend the expiry time of an immutable token.

A token can be either FUNGIBLE_COMMON or NON_FUNGIBLE_UNIQUE, based on its TokenType. If it has been omitted, FUNGIBLE_COMMON type is used.

A token can have either INFINITE or FINITE supply type, based on its TokenType. If it has been omitted, INFINITE type is used.

If a FUNGIBLE TokenType is used, initialSupply should explicitly be set to a non-negative. If not, the transaction will resolve to INVALID_TOKEN_INITIAL_SUPPLY.

If a NON_FUNGIBLE_UNIQUE TokenType is used, initialSupply should explicitly be set to 0. If not, the transaction will resolve to INVALID_TOKEN_INITIAL_SUPPLY.

If an INFINITE TokenSupplyType is used, maxSupply should explicitly be set to 0. If it is not 0, the transaction will resolve to INVALID_TOKEN_MAX_SUPPLY.

If a FINITE TokenSupplyType is used, maxSupply should be explicitly set to a non-negative value. If it is not, the transaction will resolve to INVALID_TOKEN_MAX_SUPPLY.

func NewTokenCreateTransaction

func NewTokenCreateTransaction() *TokenCreateTransaction

NewTokenCreateTransaction creates TokenCreateTransaction which creates a new token. After the token is created, the Token ID for it is in the receipt. The specified Treasury Account is receiving the initial supply of tokens as-well as the tokens from the Token Mint operation once executed. The balance of the treasury account is decreased when the Token Burn operation is executed.

The initialSupply is the initial supply of the smallest parts of a token (like a tinybar, not an hbar). These are the smallest units of the token which may be transferred.

The supply can change over time. If the total supply at some moment is S parts of tokens, and the token is using D decimals, then S must be less than or equal to 2<sup>63</sup>-1, which is 9,223,372,036,854,775,807. The number of whole tokens (not parts) will be S / 10<sup>D</sup>.

If decimals is 8 or 11, then the number of whole tokens can be at most a few billions or millions, respectively. For example, it could match Bitcoin (21 million whole tokens with 8 decimals) or hbars (50 billion whole tokens with 8 decimals). It could even match Bitcoin with milli-satoshis (21 million whole tokens with 11 decimals).

Note that a created token is immutable if the adminKey is omitted. No property of an immutable token can ever change, with the sole exception of its expiry. Anyone can pay to extend the expiry time of an immutable token.

A token can be either FUNGIBLE_COMMON or NON_FUNGIBLE_UNIQUE, based on its TokenType. If it has been omitted, FUNGIBLE_COMMON type is used.

A token can have either INFINITE or FINITE supply type, based on its TokenType. If it has been omitted, INFINITE type is used.

If a FUNGIBLE TokenType is used, initialSupply should explicitly be set to a non-negative. If not, the transaction will resolve to INVALID_TOKEN_INITIAL_SUPPLY.

If a NON_FUNGIBLE_UNIQUE TokenType is used, initialSupply should explicitly be set to 0. If not, the transaction will resolve to INVALID_TOKEN_INITIAL_SUPPLY.

If an INFINITE TokenSupplyType is used, maxSupply should explicitly be set to 0. If it is not 0, the transaction will resolve to INVALID_TOKEN_MAX_SUPPLY.

If a FINITE TokenSupplyType is used, maxSupply should be explicitly set to a non-negative value. If it is not, the transaction will resolve to INVALID_TOKEN_MAX_SUPPLY.

func (*TokenCreateTransaction) AddSignature added in v2.1.3

func (tx *TokenCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenCreateTransaction

AddSignature adds a signature to the transaction.

func (*TokenCreateTransaction) Execute

func (tx *TokenCreateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenCreateTransaction) Freeze

func (*TokenCreateTransaction) FreezeWith

func (tx *TokenCreateTransaction) FreezeWith(client *Client) (*TokenCreateTransaction, error)

func (*TokenCreateTransaction) GetAdminKey

func (tx *TokenCreateTransaction) GetAdminKey() Key

GetAdminKey returns the admin key

func (*TokenCreateTransaction) GetAutoRenewAccount

func (tx *TokenCreateTransaction) GetAutoRenewAccount() AccountID

func (*TokenCreateTransaction) GetAutoRenewPeriod

func (tx *TokenCreateTransaction) GetAutoRenewPeriod() time.Duration

func (*TokenCreateTransaction) GetCustomFees added in v2.1.11

func (tx *TokenCreateTransaction) GetCustomFees() []Fee

GetCustomFees returns the custom fees

func (*TokenCreateTransaction) GetDecimals

func (tx *TokenCreateTransaction) GetDecimals() uint

GetDecimals returns the number of decimal places a token is divisible by

func (*TokenCreateTransaction) GetExpirationTime

func (tx *TokenCreateTransaction) GetExpirationTime() time.Time

func (*TokenCreateTransaction) GetFeeScheduleKey added in v2.1.11

func (tx *TokenCreateTransaction) GetFeeScheduleKey() Key

GetFeeScheduleKey returns the fee schedule key

func (*TokenCreateTransaction) GetFreezeDefault

func (tx *TokenCreateTransaction) GetFreezeDefault() bool

GetFreezeDefault returns the freeze default

func (*TokenCreateTransaction) GetFreezeKey

func (tx *TokenCreateTransaction) GetFreezeKey() Key

GetFreezeKey returns the freeze key

func (*TokenCreateTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenCreateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenCreateTransaction) GetInitialSupply

func (tx *TokenCreateTransaction) GetInitialSupply() uint64

func (*TokenCreateTransaction) GetKycKey

func (tx *TokenCreateTransaction) GetKycKey() Key

func (*TokenCreateTransaction) GetLogLevel added in v2.34.0

func (e *TokenCreateTransaction) GetLogLevel() *LogLevel

func (*TokenCreateTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenCreateTransaction) GetMaxBackoff() time.Duration

func (*TokenCreateTransaction) GetMaxRetry added in v2.34.0

func (e *TokenCreateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenCreateTransaction) GetMaxSupply added in v2.1.11

func (tx *TokenCreateTransaction) GetMaxSupply() int64

GetMaxSupply returns the max supply

func (*TokenCreateTransaction) GetMinBackoff added in v2.1.16

func (e *TokenCreateTransaction) GetMinBackoff() time.Duration

func (*TokenCreateTransaction) GetNodeAccountIDs

func (e *TokenCreateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenCreateTransaction) GetPauseKey added in v2.3.0

func (tx *TokenCreateTransaction) GetPauseKey() Key

GetPauseKey returns the pause key

func (*TokenCreateTransaction) GetSupplyKey

func (tx *TokenCreateTransaction) GetSupplyKey() Key

func (*TokenCreateTransaction) GetSupplyType added in v2.1.11

func (tx *TokenCreateTransaction) GetSupplyType() TokenSupplyType

GetSupplyType returns the token supply type

func (*TokenCreateTransaction) GetTokenMemo added in v2.1.6

func (tx *TokenCreateTransaction) GetTokenMemo() string

GetTokenMemo returns the token memo

func (*TokenCreateTransaction) GetTokenName

func (tx *TokenCreateTransaction) GetTokenName() string

GetTokenName returns the token name

func (*TokenCreateTransaction) GetTokenSymbol

func (tx *TokenCreateTransaction) GetTokenSymbol() string

GetTokenSymbol returns the token symbol

func (*TokenCreateTransaction) GetTokenType added in v2.1.11

func (tx *TokenCreateTransaction) GetTokenType() TokenType

GetTokenType returns the token type

func (*TokenCreateTransaction) GetTreasuryAccountID

func (tx *TokenCreateTransaction) GetTreasuryAccountID() AccountID

GetTreasuryAccountID returns the treasury account ID

func (*TokenCreateTransaction) GetWipeKey

func (tx *TokenCreateTransaction) GetWipeKey() Key

GetWipeKey returns the wipe key

func (*TokenCreateTransaction) Schedule added in v2.1.5

func (*TokenCreateTransaction) SetAdminKey

func (tx *TokenCreateTransaction) SetAdminKey(publicKey Key) *TokenCreateTransaction

SetAdminKey Sets the key which can perform update/delete operations on the token. If empty, the token can be perceived as immutable (not being able to be updated/deleted)

func (*TokenCreateTransaction) SetAutoRenewAccount

func (tx *TokenCreateTransaction) SetAutoRenewAccount(autoRenewAccountID AccountID) *TokenCreateTransaction

An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval

func (*TokenCreateTransaction) SetAutoRenewPeriod

func (tx *TokenCreateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *TokenCreateTransaction

The interval at which the auto-renew account will be charged to extend the token's expiry

func (*TokenCreateTransaction) SetCustomFees added in v2.1.11

func (tx *TokenCreateTransaction) SetCustomFees(customFee []Fee) *TokenCreateTransaction

SetCustomFees Set the custom fees to be assessed during a CryptoTransfer that transfers units of this token

func (*TokenCreateTransaction) SetDecimals

func (tx *TokenCreateTransaction) SetDecimals(decimals uint) *TokenCreateTransaction

SetDecimals Sets the number of decimal places a token is divisible by. This field can never be changed!

func (*TokenCreateTransaction) SetExpirationTime

func (tx *TokenCreateTransaction) SetExpirationTime(expirationTime time.Time) *TokenCreateTransaction

The epoch second at which the token should expire; if an auto-renew account and period are specified, this is coerced to the current epoch second plus the autoRenewPeriod

func (*TokenCreateTransaction) SetFeeScheduleKey added in v2.1.11

func (tx *TokenCreateTransaction) SetFeeScheduleKey(key Key) *TokenCreateTransaction

SetFeeScheduleKey Set the key which can change the token's custom fee schedule; must sign a TokenFeeScheduleUpdate transaction

func (*TokenCreateTransaction) SetFreezeDefault

func (tx *TokenCreateTransaction) SetFreezeDefault(freezeDefault bool) *TokenCreateTransaction

The default Freeze status (frozen or unfrozen) of Hedera accounts relative to this token. If true, an account must be unfrozen before it can receive the token

func (*TokenCreateTransaction) SetFreezeKey

func (tx *TokenCreateTransaction) SetFreezeKey(publicKey Key) *TokenCreateTransaction

SetFreezeKey Sets the key which can sign to freeze or unfreeze an account for token transactions. If empty, freezing is not possible

func (*TokenCreateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenCreateTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenCreateTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenCreateTransaction) SetInitialSupply

func (tx *TokenCreateTransaction) SetInitialSupply(initialSupply uint64) *TokenCreateTransaction

Specifies the initial supply of tokens to be put in circulation. The initial supply is sent to the Treasury Account. The supply is in the lowest denomination possible.

func (*TokenCreateTransaction) SetKycKey

func (tx *TokenCreateTransaction) SetKycKey(publicKey Key) *TokenCreateTransaction

SetKycKey Sets the key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required, and KYC grant or revoke operations are not possible.

func (*TokenCreateTransaction) SetLogLevel added in v2.25.0

func (tx *TokenCreateTransaction) SetLogLevel(level LogLevel) *TokenCreateTransaction

func (*TokenCreateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenCreateTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenCreateTransaction) SetMaxRetry(count int) *TokenCreateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenCreateTransaction) SetMaxSupply added in v2.1.11

func (tx *TokenCreateTransaction) SetMaxSupply(maxSupply int64) *TokenCreateTransaction

SetMaxSupply Depends on TokenSupplyType. For tokens of type FUNGIBLE_COMMON - sets the maximum number of tokens that can be in circulation. For tokens of type NON_FUNGIBLE_UNIQUE - sets the maximum number of NFTs (serial numbers) that can be minted. This field can never be changed!

func (*TokenCreateTransaction) SetMaxTransactionFee

func (tx *TokenCreateTransaction) SetMaxTransactionFee(fee Hbar) *TokenCreateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenCreateTransaction) SetNodeAccountIDs

func (tx *TokenCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenCreateTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetPauseKey added in v2.3.0

func (tx *TokenCreateTransaction) SetPauseKey(key Key) *TokenCreateTransaction

SetPauseKey Set the Key which can pause and unpause the Token. If Empty the token pause status defaults to PauseNotApplicable, otherwise Unpaused.

func (*TokenCreateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenCreateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenCreateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenCreateTransaction) SetSupplyKey

func (tx *TokenCreateTransaction) SetSupplyKey(publicKey Key) *TokenCreateTransaction

The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations SetInitialBalance sets the initial number of Hbar to put into the token

func (*TokenCreateTransaction) SetSupplyType added in v2.1.11

func (tx *TokenCreateTransaction) SetSupplyType(tokenSupply TokenSupplyType) *TokenCreateTransaction

SetSupplyType Specifies the token supply type. Defaults to INFINITE

func (*TokenCreateTransaction) SetTokenMemo added in v2.1.5

func (tx *TokenCreateTransaction) SetTokenMemo(memo string) *TokenCreateTransaction

SetTokenMemo Sets the publicly visible token memo. It is max 100 bytes.

func (*TokenCreateTransaction) SetTokenName

func (tx *TokenCreateTransaction) SetTokenName(name string) *TokenCreateTransaction

SetTokenName Sets the publicly visible name of the token, specified as a string of only ASCII characters

func (*TokenCreateTransaction) SetTokenSymbol

func (tx *TokenCreateTransaction) SetTokenSymbol(symbol string) *TokenCreateTransaction

SetTokenSymbol Sets the publicly visible token symbol. It is UTF-8 capitalized alphabetical string identifying the token

func (*TokenCreateTransaction) SetTokenType added in v2.1.11

SetTokenType Specifies the token type. Defaults to FUNGIBLE_COMMON

func (*TokenCreateTransaction) SetTransactionID

func (tx *TokenCreateTransaction) SetTransactionID(transactionID TransactionID) *TokenCreateTransaction

SetTransactionID sets the TransactionID for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetTransactionMemo

func (tx *TokenCreateTransaction) SetTransactionMemo(memo string) *TokenCreateTransaction

SetTransactionMemo sets the memo for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetTransactionValidDuration

func (tx *TokenCreateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenCreateTransaction

SetTransactionValidDuration sets the valid duration for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetTreasuryAccountID

func (tx *TokenCreateTransaction) SetTreasuryAccountID(treasuryAccountID AccountID) *TokenCreateTransaction

SetTreasuryAccountID Sets the account which will act as a treasury for the token. This account will receive the specified initial supply

func (*TokenCreateTransaction) SetWipeKey

func (tx *TokenCreateTransaction) SetWipeKey(publicKey Key) *TokenCreateTransaction

SetWipeKey Sets the key which can wipe the token balance of an account. If empty, wipe is not possible

func (*TokenCreateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenCreateTransaction) SignWith

func (tx *TokenCreateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenCreateTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenCreateTransaction) SignWithOperator

func (tx *TokenCreateTransaction) SignWithOperator(client *Client) (*TokenCreateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenDecimalMap added in v2.1.10

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

func (*TokenDecimalMap) Get added in v2.1.10

func (tokenDecimals *TokenDecimalMap) Get(tokenID TokenID) uint64

Get returns the balance of the given tokenID

type TokenDeleteTransaction

type TokenDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenDeleteTransaction Marks a token as deleted, though it will remain in the ledger. The operation must be signed by the specified Admin Key of the Token. If admin key is not set, transaction will result in TOKEN_IS_IMMUTABlE. Once deleted update, mint, burn, wipe, freeze, unfreeze, grant kyc, revoke kyc and token transfer transactions will resolve to TOKEN_WAS_DELETED.

func NewTokenDeleteTransaction

func NewTokenDeleteTransaction() *TokenDeleteTransaction

NewTokenDeleteTransaction creates TokenDeleteTransaction which marks a token as deleted, though it will remain in the ledger. The operation must be signed by the specified Admin Key of the Token. If admin key is not set, Transaction will result in TOKEN_IS_IMMUTABlE. Once deleted update, mint, burn, wipe, freeze, unfreeze, grant kyc, revoke kyc and token transfer transactions will resolve to TOKEN_WAS_DELETED.

func (*TokenDeleteTransaction) AddSignature added in v2.1.3

func (tx *TokenDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenDeleteTransaction

AddSignature adds a signature to the transaction.

func (*TokenDeleteTransaction) Execute

func (tx *TokenDeleteTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenDeleteTransaction) Freeze

func (*TokenDeleteTransaction) FreezeWith

func (tx *TokenDeleteTransaction) FreezeWith(client *Client) (*TokenDeleteTransaction, error)

func (*TokenDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenDeleteTransaction) GetLogLevel added in v2.34.0

func (e *TokenDeleteTransaction) GetLogLevel() *LogLevel

func (*TokenDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenDeleteTransaction) GetMaxBackoff() time.Duration

func (*TokenDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *TokenDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *TokenDeleteTransaction) GetMinBackoff() time.Duration

func (*TokenDeleteTransaction) GetNodeAccountIDs

func (e *TokenDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenDeleteTransaction) GetTokenID

func (tx *TokenDeleteTransaction) GetTokenID() TokenID

GetTokenID returns the TokenID of the token to be deleted

func (*TokenDeleteTransaction) Schedule added in v2.1.5

func (*TokenDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenDeleteTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenDeleteTransaction) SetLogLevel added in v2.25.0

func (tx *TokenDeleteTransaction) SetLogLevel(level LogLevel) *TokenDeleteTransaction

func (*TokenDeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenDeleteTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenDeleteTransaction) SetMaxRetry(count int) *TokenDeleteTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenDeleteTransaction) SetMaxTransactionFee

func (tx *TokenDeleteTransaction) SetMaxTransactionFee(fee Hbar) *TokenDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenDeleteTransaction) SetNodeAccountIDs

func (tx *TokenDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenDeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenDeleteTransaction) SetTokenID

func (tx *TokenDeleteTransaction) SetTokenID(tokenID TokenID) *TokenDeleteTransaction

SetTokenID Sets the Token to be deleted

func (*TokenDeleteTransaction) SetTransactionID

func (tx *TokenDeleteTransaction) SetTransactionID(transactionID TransactionID) *TokenDeleteTransaction

SetTransactionID sets the TransactionID for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetTransactionMemo

func (tx *TokenDeleteTransaction) SetTransactionMemo(memo string) *TokenDeleteTransaction

SetTransactionMemo sets the memo for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetTransactionValidDuration

func (tx *TokenDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *TokenDeleteTransaction

SetTransactionValidDuration sets the valid duration for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenDeleteTransaction) SignWith

func (tx *TokenDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenDeleteTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenDeleteTransaction) SignWithOperator

func (tx *TokenDeleteTransaction) SignWithOperator(client *Client) (*TokenDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenDissociateTransaction

type TokenDissociateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenDissociateTransaction Dissociates the provided account with the provided tokens. Must be signed by the provided Account's key. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF. If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an association between the provided account and any of the tokens does not exist, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If a token has not been deleted and has not expired, and the user has a nonzero balance, the transaction will resolve to TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES. If a <b>fungible token</b> has expired, the user can disassociate even if their token balance is not zero. If a <b>non fungible token</b> has expired, the user can <b>not</b> disassociate if their token balance is not zero. The transaction will resolve to TRANSACTION_REQUIRED_ZERO_TOKEN_BALANCES. On success, associations between the provided account and tokens are removed.

func NewTokenDissociateTransaction

func NewTokenDissociateTransaction() *TokenDissociateTransaction

NewTokenDissociateTransaction creates TokenDissociateTransaction which dissociates the provided account with the provided tokens. Must be signed by the provided Account's key. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF. If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an association between the provided account and any of the tokens does not exist, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If a token has not been deleted and has not expired, and the user has a nonzero balance, the transaction will resolve to TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES. If a <b>fungible token</b> has expired, the user can disassociate even if their token balance is not zero. If a <b>non fungible token</b> has expired, the user can <b>not</b> disassociate if their token balance is not zero. The transaction will resolve to TRANSACTION_REQUIRED_ZERO_TOKEN_BALANCES. On success, associations between the provided account and tokens are removed.

func (*TokenDissociateTransaction) AddSignature added in v2.1.3

func (tx *TokenDissociateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenDissociateTransaction

AddSignature adds a signature to the transaction.

func (*TokenDissociateTransaction) AddTokenID

AddTokenID Adds the token to the list of tokens to be dissociated.

func (*TokenDissociateTransaction) Execute

func (*TokenDissociateTransaction) Freeze

func (*TokenDissociateTransaction) FreezeWith

func (*TokenDissociateTransaction) GetAccountID

func (tx *TokenDissociateTransaction) GetAccountID() AccountID

func (*TokenDissociateTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenDissociateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenDissociateTransaction) GetLogLevel added in v2.34.0

func (e *TokenDissociateTransaction) GetLogLevel() *LogLevel

func (*TokenDissociateTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenDissociateTransaction) GetMaxBackoff() time.Duration

func (*TokenDissociateTransaction) GetMaxRetry added in v2.34.0

func (e *TokenDissociateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenDissociateTransaction) GetMinBackoff added in v2.1.16

func (e *TokenDissociateTransaction) GetMinBackoff() time.Duration

func (*TokenDissociateTransaction) GetNodeAccountIDs

func (e *TokenDissociateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenDissociateTransaction) GetTokenIDs

func (tx *TokenDissociateTransaction) GetTokenIDs() []TokenID

GetTokenIDs returns the tokens to be associated with the provided account

func (*TokenDissociateTransaction) Schedule added in v2.1.5

func (*TokenDissociateTransaction) SetAccountID

SetAccountID Sets the account to be dissociated with the provided tokens

func (*TokenDissociateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenDissociateTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenDissociateTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenDissociateTransaction) SetLogLevel added in v2.25.0

func (*TokenDissociateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenDissociateTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenDissociateTransaction) SetMaxTransactionFee

func (tx *TokenDissociateTransaction) SetMaxTransactionFee(fee Hbar) *TokenDissociateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenDissociateTransaction) SetNodeAccountIDs

func (tx *TokenDissociateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenDissociateTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenDissociateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenDissociateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenDissociateTransaction) SetTokenIDs

SetTokenIDs Sets the tokens to be dissociated with the provided account

func (*TokenDissociateTransaction) SetTransactionID

func (tx *TokenDissociateTransaction) SetTransactionID(transactionID TransactionID) *TokenDissociateTransaction

SetTransactionID sets the TransactionID for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetTransactionMemo

func (tx *TokenDissociateTransaction) SetTransactionMemo(memo string) *TokenDissociateTransaction

SetTransactionMemo sets the memo for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetTransactionValidDuration

func (tx *TokenDissociateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenDissociateTransaction

SetTransactionValidDuration sets the valid duration for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenDissociateTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenDissociateTransaction) SignWithOperator

func (tx *TokenDissociateTransaction) SignWithOperator(client *Client) (*TokenDissociateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenFeeScheduleUpdateTransaction added in v2.1.11

type TokenFeeScheduleUpdateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenFeeScheduleUpdateTransaction At consensus, updates a token type's fee schedule to the given list of custom fees.

If the target token type has no fee_schedule_key, resolves to TOKEN_HAS_NO_FEE_SCHEDULE_KEY. Otherwise this transaction must be signed to the fee_schedule_key, or the transaction will resolve to INVALID_SIGNATURE.

If the custom_fees list is empty, clears the fee schedule or resolves to CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES if the fee schedule was already empty.

func NewTokenFeeScheduleUpdateTransaction added in v2.1.11

func NewTokenFeeScheduleUpdateTransaction() *TokenFeeScheduleUpdateTransaction

NewTokenFeeScheduleUpdateTransaction creates TokenFeeScheduleUpdateTransaction which at consensus, updates a token type's fee schedule to the given list of custom fees.

If the target token type has no fee_schedule_key, resolves to TOKEN_HAS_NO_FEE_SCHEDULE_KEY. Otherwise this transaction must be signed to the fee_schedule_key, or the transaction will resolve to INVALID_SIGNATURE.

If the custom_fees list is empty, clears the fee schedule or resolves to CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES if the fee schedule was already empty.

func (*TokenFeeScheduleUpdateTransaction) AddSignature added in v2.1.11

func (tx *TokenFeeScheduleUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenFeeScheduleUpdateTransaction

AddSignature adds a signature to the transaction.

func (*TokenFeeScheduleUpdateTransaction) Execute added in v2.1.11

func (*TokenFeeScheduleUpdateTransaction) Freeze added in v2.1.11

func (*TokenFeeScheduleUpdateTransaction) FreezeWith added in v2.1.11

func (*TokenFeeScheduleUpdateTransaction) GetCustomFees added in v2.1.11

func (tx *TokenFeeScheduleUpdateTransaction) GetCustomFees() []Fee

GetCustomFees returns the new custom fees to be assessed during a CryptoTransfer that transfers units of this token

func (*TokenFeeScheduleUpdateTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenFeeScheduleUpdateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenFeeScheduleUpdateTransaction) GetLogLevel added in v2.34.0

func (e *TokenFeeScheduleUpdateTransaction) GetLogLevel() *LogLevel

func (*TokenFeeScheduleUpdateTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenFeeScheduleUpdateTransaction) GetMaxBackoff() time.Duration

func (*TokenFeeScheduleUpdateTransaction) GetMaxRetry added in v2.34.0

func (e *TokenFeeScheduleUpdateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenFeeScheduleUpdateTransaction) GetMinBackoff added in v2.1.16

func (e *TokenFeeScheduleUpdateTransaction) GetMinBackoff() time.Duration

func (*TokenFeeScheduleUpdateTransaction) GetNodeAccountIDs added in v2.34.0

func (e *TokenFeeScheduleUpdateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenFeeScheduleUpdateTransaction) GetTokenID added in v2.1.11

func (tx *TokenFeeScheduleUpdateTransaction) GetTokenID() TokenID

GetTokenID returns the token whose fee schedule is to be updated

func (*TokenFeeScheduleUpdateTransaction) Schedule added in v2.34.0

func (*TokenFeeScheduleUpdateTransaction) SetCustomFees added in v2.1.11

SetCustomFees Sets the new custom fees to be assessed during a CryptoTransfer that transfers units of this token

func (*TokenFeeScheduleUpdateTransaction) SetGrpcDeadline added in v2.11.0

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenFeeScheduleUpdateTransaction) SetLogLevel added in v2.25.0

func (*TokenFeeScheduleUpdateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenFeeScheduleUpdateTransaction) SetMaxRetry added in v2.1.11

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenFeeScheduleUpdateTransaction) SetMaxTransactionFee added in v2.1.11

SetMaxTransactionFee sets the max transaction fee for this TokenFeeScheduleUpdateTransaction.

func (*TokenFeeScheduleUpdateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenFeeScheduleUpdateTransaction) SetNodeAccountIDs added in v2.1.11

SetNodeAccountIDs sets the _Node AccountID for this TokenFeeScheduleUpdateTransaction.

func (*TokenFeeScheduleUpdateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenFeeScheduleUpdateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenFeeScheduleUpdateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenFeeScheduleUpdateTransaction) SetTokenID added in v2.1.11

SetTokenID Sets the token whose fee schedule is to be updated

func (*TokenFeeScheduleUpdateTransaction) SetTransactionID added in v2.1.11

SetTransactionID sets the TransactionID for this TokenFeeScheduleUpdateTransaction.

func (*TokenFeeScheduleUpdateTransaction) SetTransactionMemo added in v2.1.11

SetTransactionMemo sets the memo for this TokenFeeScheduleUpdateTransaction.

func (*TokenFeeScheduleUpdateTransaction) SetTransactionValidDuration added in v2.1.11

func (tx *TokenFeeScheduleUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenFeeScheduleUpdateTransaction

SetTransactionValidDuration sets the valid duration for this TokenFeeScheduleUpdateTransaction.

func (*TokenFeeScheduleUpdateTransaction) Sign added in v2.1.11

Sign uses the provided privateKey to sign the transaction.

func (*TokenFeeScheduleUpdateTransaction) SignWith added in v2.1.11

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenFeeScheduleUpdateTransaction) SignWithOperator added in v2.1.11

SignWithOperator signs the transaction with client's operator privateKey.

type TokenFreezeTransaction

type TokenFreezeTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenFreezeTransaction Freezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no Freeze Key is defined, the transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. Once executed the Account is marked as Frozen and will not be able to receive or send tokens unless unfrozen. The operation is idempotent.

func NewTokenFreezeTransaction

func NewTokenFreezeTransaction() *TokenFreezeTransaction

NewTokenFreezeTransaction creates TokenFreezeTransaction which freezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no Freeze Key is defined, the transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. Once executed the Account is marked as Frozen and will not be able to receive or send tokens unless unfrozen. The operation is idempotent.

func (*TokenFreezeTransaction) AddSignature added in v2.1.3

func (tx *TokenFreezeTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenFreezeTransaction

AddSignature adds a signature to the transaction.

func (*TokenFreezeTransaction) Execute

func (tx *TokenFreezeTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenFreezeTransaction) Freeze

func (*TokenFreezeTransaction) FreezeWith

func (tx *TokenFreezeTransaction) FreezeWith(client *Client) (*TokenFreezeTransaction, error)

func (*TokenFreezeTransaction) GetAccountID

func (tx *TokenFreezeTransaction) GetAccountID() AccountID

GetAccountID returns the account to be frozen

func (*TokenFreezeTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenFreezeTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenFreezeTransaction) GetLogLevel added in v2.34.0

func (e *TokenFreezeTransaction) GetLogLevel() *LogLevel

func (*TokenFreezeTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenFreezeTransaction) GetMaxBackoff() time.Duration

func (*TokenFreezeTransaction) GetMaxRetry added in v2.34.0

func (e *TokenFreezeTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenFreezeTransaction) GetMinBackoff added in v2.1.16

func (e *TokenFreezeTransaction) GetMinBackoff() time.Duration

func (*TokenFreezeTransaction) GetNodeAccountIDs

func (e *TokenFreezeTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenFreezeTransaction) GetTokenID

func (tx *TokenFreezeTransaction) GetTokenID() TokenID

GetTokenID returns the token for which this account will be frozen.

func (*TokenFreezeTransaction) Schedule added in v2.1.5

func (*TokenFreezeTransaction) SetAccountID

func (tx *TokenFreezeTransaction) SetAccountID(accountID AccountID) *TokenFreezeTransaction

SetAccountID Sets the account to be frozen

func (*TokenFreezeTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenFreezeTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenFreezeTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenFreezeTransaction) SetLogLevel added in v2.25.0

func (tx *TokenFreezeTransaction) SetLogLevel(level LogLevel) *TokenFreezeTransaction

func (*TokenFreezeTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenFreezeTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenFreezeTransaction) SetMaxRetry(count int) *TokenFreezeTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenFreezeTransaction) SetMaxTransactionFee

func (tx *TokenFreezeTransaction) SetMaxTransactionFee(fee Hbar) *TokenFreezeTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenFreezeTransaction) SetNodeAccountIDs

func (tx *TokenFreezeTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenFreezeTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenFreezeTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenFreezeTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenFreezeTransaction) SetTokenID

func (tx *TokenFreezeTransaction) SetTokenID(tokenID TokenID) *TokenFreezeTransaction

SetTokenID Sets the token for which this account will be frozen. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenFreezeTransaction) SetTransactionID

func (tx *TokenFreezeTransaction) SetTransactionID(transactionID TransactionID) *TokenFreezeTransaction

SetTransactionID sets the TransactionID for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetTransactionMemo

func (tx *TokenFreezeTransaction) SetTransactionMemo(memo string) *TokenFreezeTransaction

SetTransactionMemo sets the memo for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetTransactionValidDuration

func (tx *TokenFreezeTransaction) SetTransactionValidDuration(duration time.Duration) *TokenFreezeTransaction

SetTransactionValidDuration sets the valid duration for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenFreezeTransaction) SignWith

func (tx *TokenFreezeTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenFreezeTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenFreezeTransaction) SignWithOperator

func (tx *TokenFreezeTransaction) SignWithOperator(client *Client) (*TokenFreezeTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenGrantKycTransaction

type TokenGrantKycTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenGrantKycTransaction Grants KYC to the account for the given token. Must be signed by the Token's kycKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no KYC Key is defined, the transaction will resolve to TOKEN_HAS_NO_KYC_KEY. Once executed the Account is marked as KYC Granted.

func NewTokenGrantKycTransaction

func NewTokenGrantKycTransaction() *TokenGrantKycTransaction

NewTokenGrantKycTransaction creates TokenGrantKycTransaction which grants KYC to the account for the given token. Must be signed by the Token's kycKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no KYC Key is defined, the transaction will resolve to TOKEN_HAS_NO_KYC_KEY. Once executed the Account is marked as KYC Granted.

func (*TokenGrantKycTransaction) AddSignature added in v2.1.3

func (tx *TokenGrantKycTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenGrantKycTransaction

AddSignature adds a signature to the transaction.

func (*TokenGrantKycTransaction) Execute

func (tx *TokenGrantKycTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenGrantKycTransaction) Freeze

func (*TokenGrantKycTransaction) FreezeWith

func (tx *TokenGrantKycTransaction) FreezeWith(client *Client) (*TokenGrantKycTransaction, error)

func (*TokenGrantKycTransaction) GetAccountID

func (tx *TokenGrantKycTransaction) GetAccountID() AccountID

GetAccountID returns the AccountID that is being KYCed

func (*TokenGrantKycTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenGrantKycTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenGrantKycTransaction) GetLogLevel added in v2.34.0

func (e *TokenGrantKycTransaction) GetLogLevel() *LogLevel

func (*TokenGrantKycTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenGrantKycTransaction) GetMaxBackoff() time.Duration

func (*TokenGrantKycTransaction) GetMaxRetry added in v2.34.0

func (e *TokenGrantKycTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenGrantKycTransaction) GetMinBackoff added in v2.1.16

func (e *TokenGrantKycTransaction) GetMinBackoff() time.Duration

func (*TokenGrantKycTransaction) GetNodeAccountIDs

func (e *TokenGrantKycTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenGrantKycTransaction) GetTokenID

func (tx *TokenGrantKycTransaction) GetTokenID() TokenID

GetTokenID returns the token for which this account will be granted KYC.

func (*TokenGrantKycTransaction) Schedule added in v2.1.5

func (*TokenGrantKycTransaction) SetAccountID

func (tx *TokenGrantKycTransaction) SetAccountID(accountID AccountID) *TokenGrantKycTransaction

SetAccountID Sets the account to be KYCed

func (*TokenGrantKycTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenGrantKycTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenGrantKycTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenGrantKycTransaction) SetLogLevel added in v2.25.0

func (*TokenGrantKycTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenGrantKycTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenGrantKycTransaction) SetMaxRetry(count int) *TokenGrantKycTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenGrantKycTransaction) SetMaxTransactionFee

func (tx *TokenGrantKycTransaction) SetMaxTransactionFee(fee Hbar) *TokenGrantKycTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenGrantKycTransaction) SetNodeAccountIDs

func (tx *TokenGrantKycTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenGrantKycTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenGrantKycTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenGrantKycTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenGrantKycTransaction) SetTokenID

SetTokenID Sets the token for which this account will be granted KYC. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenGrantKycTransaction) SetTransactionID

func (tx *TokenGrantKycTransaction) SetTransactionID(transactionID TransactionID) *TokenGrantKycTransaction

SetTransactionID sets the TransactionID for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetTransactionMemo

func (tx *TokenGrantKycTransaction) SetTransactionMemo(memo string) *TokenGrantKycTransaction

SetTransactionMemo sets the memo for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetTransactionValidDuration

func (tx *TokenGrantKycTransaction) SetTransactionValidDuration(duration time.Duration) *TokenGrantKycTransaction

SetTransactionValidDuration sets the valid duration for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenGrantKycTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenGrantKycTransaction) SignWithOperator

func (tx *TokenGrantKycTransaction) SignWithOperator(client *Client) (*TokenGrantKycTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenID

type TokenID struct {
	Shard uint64
	Realm uint64
	Token uint64
	// contains filtered or unexported fields
}

TokenID is the ID for a Hedera token

func TokenIDFromBytes added in v2.1.3

func TokenIDFromBytes(data []byte) (TokenID, error)

TokenIDFromBytes returns a TokenID from a byte array

func TokenIDFromSolidityAddress added in v2.7.0

func TokenIDFromSolidityAddress(s string) (TokenID, error)

TokenIDFromSolidityAddress constructs a TokenID from a string representation of a _Solidity address

func TokenIDFromString added in v2.1.4

func TokenIDFromString(data string) (TokenID, error)

TokenIDFromString constructs an TokenID from a string formatted as `Shard.Realm.TokenID` (for example "0.0.3")

func (TokenID) Compare added in v2.6.0

func (id TokenID) Compare(given TokenID) int

Compare compares two TokenIDs

func (*TokenID) Nft added in v2.1.11

func (id *TokenID) Nft(serial int64) NftID

NftID constructs an NftID from a TokenID and a serial number

func (TokenID) String

func (id TokenID) String() string

String returns a string representation of the TokenID formatted as `Shard.Realm.TokenID` (for example "0.0.3")

func (TokenID) ToBytes added in v2.1.3

func (id TokenID) ToBytes() []byte

ToBytes returns a byte array representation of the TokenID

func (TokenID) ToSolidityAddress added in v2.7.0

func (id TokenID) ToSolidityAddress() string

ToSolidityAddress returns the string representation of the TokenID as a _Solidity address.

func (TokenID) ToStringWithChecksum added in v2.1.13

func (id TokenID) ToStringWithChecksum(client Client) (string, error)

ToStringWithChecksum returns a string representation of the TokenID formatted as `Shard.Realm.TokenID-Checksum` (for example "0.0.3-abcd")

func (*TokenID) Validate added in v2.1.8

func (id *TokenID) Validate(client *Client) error

Deprecated - use ValidateChecksum instead

func (*TokenID) ValidateChecksum added in v2.4.0

func (id *TokenID) ValidateChecksum(client *Client) error

Verify that the client has a valid checksum.

type TokenInfo

type TokenInfo struct {
	TokenID             TokenID
	Name                string
	Symbol              string
	Decimals            uint32
	TotalSupply         uint64
	Treasury            AccountID
	AdminKey            Key
	KycKey              Key
	FreezeKey           Key
	WipeKey             Key
	SupplyKey           Key
	DefaultFreezeStatus *bool
	DefaultKycStatus    *bool
	Deleted             bool
	AutoRenewPeriod     *time.Duration
	AutoRenewAccountID  AccountID
	ExpirationTime      *time.Time
	TokenMemo           string
	TokenType           TokenType
	SupplyType          TokenSupplyType
	MaxSupply           int64
	FeeScheduleKey      Key
	CustomFees          []Fee
	PauseKey            Key
	PauseStatus         *bool
	LedgerID            LedgerID
}

TokenInfo is the information about a token

func TokenInfoFromBytes added in v2.1.3

func TokenInfoFromBytes(data []byte) (TokenInfo, error)

TokenInfoFromBytes returns a TokenInfo struct from a raw protobuf byte array

func (*TokenInfo) FreezeStatusToProtobuf

func (tokenInfo *TokenInfo) FreezeStatusToProtobuf() *services.TokenFreezeStatus

FreezeStatusToProtobuf converts the TokenInfo's DefaultFreezeStatus to a protobuf TokenFreezeStatus

func (*TokenInfo) KycStatusToProtobuf

func (tokenInfo *TokenInfo) KycStatusToProtobuf() *services.TokenKycStatus

KycStatusToProtobuf converts the TokenInfo's DefaultKycStatus to a protobuf TokenKycStatus

func (*TokenInfo) PauseStatusToProtobuf added in v2.3.0

func (tokenInfo *TokenInfo) PauseStatusToProtobuf() *services.TokenPauseStatus

PauseStatusToProtobuf converts the TokenInfo's PauseStatus to a protobuf TokenPauseStatus

func (TokenInfo) ToBytes added in v2.1.3

func (tokenInfo TokenInfo) ToBytes() []byte

ToBytes returns the byte representation of the TokenInfo

type TokenInfoQuery

type TokenInfoQuery struct {
	Query
	// contains filtered or unexported fields
}

TokenInfoQuery Used get information about Token instance

func NewTokenInfoQuery

func NewTokenInfoQuery() *TokenInfoQuery

NewTokenInfoQuery creates a TokenInfoQuery which is used get information about Token instance

func (*TokenInfoQuery) Execute

func (q *TokenInfoQuery) Execute(client *Client) (TokenInfo, error)

Execute executes the TopicInfoQuery using the provided client

func (*TokenInfoQuery) GetCost

func (q *TokenInfoQuery) GetCost(client *Client) (Hbar, error)

func (*TokenInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *TokenInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenInfoQuery) GetLogLevel added in v2.34.0

func (e *TokenInfoQuery) GetLogLevel() *LogLevel

func (*TokenInfoQuery) GetMaxBackoff added in v2.1.16

func (e *TokenInfoQuery) GetMaxBackoff() time.Duration

func (*TokenInfoQuery) GetMaxRetry added in v2.34.0

func (e *TokenInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenInfoQuery) GetMinBackoff added in v2.1.16

func (e *TokenInfoQuery) GetMinBackoff() time.Duration

func (*TokenInfoQuery) GetNodeAccountIDs

func (e *TokenInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenInfoQuery) GetTokenID

func (q *TokenInfoQuery) GetTokenID() TokenID

GetTokenID returns the TokenID for this TokenInfoQuery

func (*TokenInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *TokenInfoQuery) SetGrpcDeadline(deadline *time.Duration) *TokenInfoQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenInfoQuery) SetLogLevel added in v2.25.0

func (q *TokenInfoQuery) SetLogLevel(level LogLevel) *TokenInfoQuery

func (*TokenInfoQuery) SetMaxBackoff added in v2.1.16

func (q *TokenInfoQuery) SetMaxBackoff(max time.Duration) *TokenInfoQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenInfoQuery) SetMaxQueryPayment

func (q *TokenInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *TokenInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*TokenInfoQuery) SetMaxRetry added in v2.1.2

func (q *TokenInfoQuery) SetMaxRetry(count int) *TokenInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenInfoQuery) SetMinBackoff added in v2.1.16

func (q *TokenInfoQuery) SetMinBackoff(min time.Duration) *TokenInfoQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenInfoQuery) SetNodeAccountIDs

func (q *TokenInfoQuery) SetNodeAccountIDs(accountID []AccountID) *TokenInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this TokenInfoQuery.

func (*TokenInfoQuery) SetPaymentTransactionID added in v2.11.0

func (q *TokenInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *TokenInfoQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*TokenInfoQuery) SetQueryPayment

func (q *TokenInfoQuery) SetQueryPayment(paymentAmount Hbar) *TokenInfoQuery

SetQueryPayment sets the payment amount for this Query.

func (*TokenInfoQuery) SetTokenID

func (q *TokenInfoQuery) SetTokenID(tokenID TokenID) *TokenInfoQuery

SetTokenID Sets the topic to retrieve info about (the parameters and running state of).

type TokenMintTransaction

type TokenMintTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenMintTransaction Mints tokens from the Token's treasury Account. If no Supply Key is defined, the transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. The operation decreases the Total Supply of the Token. Total supply cannot go below zero. The amount provided must be in the lowest denomination possible. Example: Token A has 2 decimals. In order to mint 100 tokens, one must provide amount of 10000. In order to mint 100.55 tokens, one must provide amount of 10055.

func NewTokenMintTransaction

func NewTokenMintTransaction() *TokenMintTransaction

NewTokenMintTransaction creates TokenMintTransaction which mints tokens from the Token's treasury Account. If no Supply Key is defined, the transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. The operation decreases the Total Supply of the Token. Total supply cannot go below zero. The amount provided must be in the lowest denomination possible. Example: Token A has 2 decimals. In order to mint 100 tokens, one must provide amount of 10000. In order to mint 100.55 tokens, one must provide amount of 10055.

func (*TokenMintTransaction) AddSignature added in v2.1.3

func (tx *TokenMintTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenMintTransaction

AddSignature adds a signature to the transaction.

func (*TokenMintTransaction) Execute

func (tx *TokenMintTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenMintTransaction) Freeze

func (*TokenMintTransaction) FreezeWith

func (tx *TokenMintTransaction) FreezeWith(client *Client) (*TokenMintTransaction, error)

func (*TokenMintTransaction) GetAmount

func (tx *TokenMintTransaction) GetAmount() uint64

GetAmount returns the amount to mint from the Treasury Account

func (*TokenMintTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenMintTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenMintTransaction) GetLogLevel added in v2.34.0

func (e *TokenMintTransaction) GetLogLevel() *LogLevel

func (*TokenMintTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenMintTransaction) GetMaxBackoff() time.Duration

func (*TokenMintTransaction) GetMaxRetry added in v2.34.0

func (e *TokenMintTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenMintTransaction) GetMetadatas added in v2.1.11

func (tx *TokenMintTransaction) GetMetadatas() [][]byte

GetMetadatas returns the metadata that are being created.

func (*TokenMintTransaction) GetMinBackoff added in v2.1.16

func (e *TokenMintTransaction) GetMinBackoff() time.Duration

func (*TokenMintTransaction) GetNodeAccountIDs

func (e *TokenMintTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenMintTransaction) GetTokenID

func (tx *TokenMintTransaction) GetTokenID() TokenID

GetTokenID returns the TokenID for this TokenMintTransaction

func (*TokenMintTransaction) Schedule added in v2.1.5

func (*TokenMintTransaction) SetAmount

func (tx *TokenMintTransaction) SetAmount(amount uint64) *TokenMintTransaction

SetAmount Sets the amount to mint from the Treasury Account. Amount must be a positive non-zero number, not bigger than the token balance of the treasury account (0; balance], represented in the lowest denomination.

func (*TokenMintTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenMintTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenMintTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenMintTransaction) SetLogLevel added in v2.25.0

func (tx *TokenMintTransaction) SetLogLevel(level LogLevel) *TokenMintTransaction

func (*TokenMintTransaction) SetMaxBackoff added in v2.1.16

func (tx *TokenMintTransaction) SetMaxBackoff(max time.Duration) *TokenMintTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenMintTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenMintTransaction) SetMaxRetry(count int) *TokenMintTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenMintTransaction) SetMaxTransactionFee

func (tx *TokenMintTransaction) SetMaxTransactionFee(fee Hbar) *TokenMintTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenMintTransaction.

func (*TokenMintTransaction) SetMetadata added in v2.1.11

func (tx *TokenMintTransaction) SetMetadata(meta []byte) *TokenMintTransaction

SetMetadata Applicable to tokens of type NON_FUNGIBLE_UNIQUE. A list of metadata that are being created. Maximum allowed size of each metadata is 100 bytes

func (*TokenMintTransaction) SetMetadatas added in v2.1.11

func (tx *TokenMintTransaction) SetMetadatas(meta [][]byte) *TokenMintTransaction

SetMetadatas Applicable to tokens of type NON_FUNGIBLE_UNIQUE. A list of metadata that are being created. Maximum allowed size of each metadata is 100 bytes

func (*TokenMintTransaction) SetMinBackoff added in v2.1.16

func (tx *TokenMintTransaction) SetMinBackoff(min time.Duration) *TokenMintTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenMintTransaction) SetNodeAccountIDs

func (tx *TokenMintTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenMintTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenMintTransaction.

func (*TokenMintTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenMintTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenMintTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenMintTransaction) SetTokenID

func (tx *TokenMintTransaction) SetTokenID(tokenID TokenID) *TokenMintTransaction

SetTokenID Sets the token for which to mint tokens. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenMintTransaction) SetTransactionID

func (tx *TokenMintTransaction) SetTransactionID(transactionID TransactionID) *TokenMintTransaction

SetTransactionID sets the TransactionID for this TokenMintTransaction.

func (*TokenMintTransaction) SetTransactionMemo

func (tx *TokenMintTransaction) SetTransactionMemo(memo string) *TokenMintTransaction

SetTransactionMemo sets the memo for this TokenMintTransaction.

func (*TokenMintTransaction) SetTransactionValidDuration

func (tx *TokenMintTransaction) SetTransactionValidDuration(duration time.Duration) *TokenMintTransaction

SetTransactionValidDuration sets the valid duration for this TokenMintTransaction.

func (*TokenMintTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenMintTransaction) SignWith

func (tx *TokenMintTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenMintTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenMintTransaction) SignWithOperator

func (tx *TokenMintTransaction) SignWithOperator(client *Client) (*TokenMintTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenNftAllowance added in v2.9.0

type TokenNftAllowance struct {
	TokenID           *TokenID
	SpenderAccountID  *AccountID
	OwnerAccountID    *AccountID
	SerialNumbers     []int64
	AllSerials        bool
	DelegatingSpender *AccountID
}

TokenNftAllowance is a struct to encapsulate the nft methods for token allowance's.

func NewTokenNftAllowance added in v2.9.0

func NewTokenNftAllowance(tokenID TokenID, owner AccountID, spender AccountID, serialNumbers []int64, approvedForAll bool, delegatingSpender AccountID) TokenNftAllowance

NewTokenNftAllowance creates a TokenNftAllowance delegate for the given tokenID, owner, spender, serialNumbers, approvedForAll, and delegatingSpender

func (*TokenNftAllowance) String added in v2.13.0

func (approval *TokenNftAllowance) String() string

String returns a string representation of the TokenNftAllowance

type TokenNftInfo added in v2.1.11

type TokenNftInfo struct {
	NftID        NftID
	AccountID    AccountID
	CreationTime time.Time
	Metadata     []byte
	LedgerID     LedgerID
	SpenderID    AccountID
}

TokenNftInfo is the information about a NFT

func TokenNftInfoFromBytes added in v2.1.11

func TokenNftInfoFromBytes(data []byte) (TokenNftInfo, error)

TokenNftInfoFromBytes returns the TokenNftInfo from a byte array representation

func (*TokenNftInfo) ToBytes added in v2.1.11

func (tokenNftInfo *TokenNftInfo) ToBytes() []byte

ToBytes returns the byte representation of the TokenNftInfo

type TokenNftInfoQuery added in v2.1.11

type TokenNftInfoQuery struct {
	Query
	// contains filtered or unexported fields
}

TokenNftInfoQuery Applicable only to tokens of type NON_FUNGIBLE_UNIQUE. Gets info on a NFT for a given TokenID (of type NON_FUNGIBLE_UNIQUE) and serial number

func NewTokenNftInfoQuery added in v2.1.11

func NewTokenNftInfoQuery() *TokenNftInfoQuery

NewTokenNftInfoQuery creates TokenNftInfoQuery which gets info on a NFT for a given TokenID (of type NON_FUNGIBLE_UNIQUE) and serial number Applicable only to tokens of type NON_FUNGIBLE_UNIQUE.

func (*TokenNftInfoQuery) ByAccountID added in v2.1.11

func (q *TokenNftInfoQuery) ByAccountID(id AccountID) *TokenNftInfoQuery

Deprecated

func (*TokenNftInfoQuery) ByNftID added in v2.1.11

func (q *TokenNftInfoQuery) ByNftID(id NftID) *TokenNftInfoQuery

Deprecated

func (*TokenNftInfoQuery) ByTokenID added in v2.1.11

func (q *TokenNftInfoQuery) ByTokenID(id TokenID) *TokenNftInfoQuery

Deprecated

func (*TokenNftInfoQuery) Execute added in v2.1.11

func (q *TokenNftInfoQuery) Execute(client *Client) ([]TokenNftInfo, error)

Execute executes the Query with the provided client

func (*TokenNftInfoQuery) GetAccountID added in v2.1.11

func (q *TokenNftInfoQuery) GetAccountID() AccountID

Deprecated

func (*TokenNftInfoQuery) GetCost added in v2.1.11

func (q *TokenNftInfoQuery) GetCost(client *Client) (Hbar, error)

func (*TokenNftInfoQuery) GetEnd added in v2.1.11

func (q *TokenNftInfoQuery) GetEnd() int64

Deprecated

func (*TokenNftInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *TokenNftInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenNftInfoQuery) GetLogLevel added in v2.34.0

func (e *TokenNftInfoQuery) GetLogLevel() *LogLevel

func (*TokenNftInfoQuery) GetMaxBackoff added in v2.1.16

func (e *TokenNftInfoQuery) GetMaxBackoff() time.Duration

func (*TokenNftInfoQuery) GetMaxRetry added in v2.34.0

func (e *TokenNftInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenNftInfoQuery) GetMinBackoff added in v2.1.16

func (e *TokenNftInfoQuery) GetMinBackoff() time.Duration

func (*TokenNftInfoQuery) GetNftID added in v2.1.11

func (q *TokenNftInfoQuery) GetNftID() NftID

GetNftID returns the ID of the NFT

func (*TokenNftInfoQuery) GetNodeAccountIDs added in v2.34.0

func (e *TokenNftInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenNftInfoQuery) GetStart added in v2.1.11

func (q *TokenNftInfoQuery) GetStart() int64

Deprecated

func (*TokenNftInfoQuery) GetTokenID added in v2.1.11

func (q *TokenNftInfoQuery) GetTokenID() TokenID

Deprecated

func (*TokenNftInfoQuery) SetAccountID added in v2.1.11

func (q *TokenNftInfoQuery) SetAccountID(id AccountID) *TokenNftInfoQuery

Deprecated

func (*TokenNftInfoQuery) SetEnd added in v2.1.11

func (q *TokenNftInfoQuery) SetEnd(end int64) *TokenNftInfoQuery

Deprecated

func (*TokenNftInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *TokenNftInfoQuery) SetGrpcDeadline(deadline *time.Duration) *TokenNftInfoQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenNftInfoQuery) SetLogLevel added in v2.25.0

func (q *TokenNftInfoQuery) SetLogLevel(level LogLevel) *TokenNftInfoQuery

func (*TokenNftInfoQuery) SetMaxBackoff added in v2.1.16

func (q *TokenNftInfoQuery) SetMaxBackoff(max time.Duration) *TokenNftInfoQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenNftInfoQuery) SetMaxQueryPayment added in v2.1.11

func (q *TokenNftInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *TokenNftInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*TokenNftInfoQuery) SetMaxRetry added in v2.1.11

func (q *TokenNftInfoQuery) SetMaxRetry(count int) *TokenNftInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenNftInfoQuery) SetMinBackoff added in v2.1.16

func (q *TokenNftInfoQuery) SetMinBackoff(min time.Duration) *TokenNftInfoQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenNftInfoQuery) SetNftID added in v2.1.11

func (q *TokenNftInfoQuery) SetNftID(nftID NftID) *TokenNftInfoQuery

SetNftID Sets the ID of the NFT

func (*TokenNftInfoQuery) SetNodeAccountIDs added in v2.1.11

func (q *TokenNftInfoQuery) SetNodeAccountIDs(accountID []AccountID) *TokenNftInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this TokenNftInfoQuery.

func (*TokenNftInfoQuery) SetPaymentTransactionID added in v2.11.0

func (q *TokenNftInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *TokenNftInfoQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*TokenNftInfoQuery) SetQueryPayment added in v2.1.11

func (q *TokenNftInfoQuery) SetQueryPayment(paymentAmount Hbar) *TokenNftInfoQuery

SetQueryPayment sets the payment amount for this Query.

func (*TokenNftInfoQuery) SetStart added in v2.1.11

func (q *TokenNftInfoQuery) SetStart(start int64) *TokenNftInfoQuery

Deprecated

func (*TokenNftInfoQuery) SetTokenID added in v2.1.11

func (q *TokenNftInfoQuery) SetTokenID(id TokenID) *TokenNftInfoQuery

Deprecated

type TokenNftTransfer added in v2.1.11

type TokenNftTransfer struct {
	SenderAccountID   AccountID
	ReceiverAccountID AccountID
	SerialNumber      int64
	IsApproved        bool
}

TokenNftTransfer is the information about a NFT transfer

func NftTransferFromBytes added in v2.1.11

func NftTransferFromBytes(data []byte) (TokenNftTransfer, error)

TokenNftTransfersFromBytes returns the TokenNftTransfer from a raw protobuf bytes representation

func (TokenNftTransfer) ToBytes added in v2.1.11

func (transfer TokenNftTransfer) ToBytes() []byte

ToBytes returns the byte representation of the TokenNftTransfer

type TokenPauseTransaction added in v2.3.0

type TokenPauseTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenPauseTransaction Pauses the Token from being involved in any kind of Transaction until it is unpaused. Must be signed with the Token's pause key. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If no Pause Key is defined, the transaction will resolve to TOKEN_HAS_NO_PAUSE_KEY. Once executed the Token is marked as paused and will be not able to be a part of any transaction. The operation is idempotent - becomes a no-op if the Token is already Paused.

func NewTokenPauseTransaction added in v2.3.0

func NewTokenPauseTransaction() *TokenPauseTransaction

NewTokenPauseTransaction creates TokenPauseTransaction which pauses the Token from being involved in any kind of Transaction until it is unpaused. Must be signed with the Token's pause key. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If no Pause Key is defined, the transaction will resolve to TOKEN_HAS_NO_PAUSE_KEY. Once executed the Token is marked as paused and will be not able to be a part of any transaction. The operation is idempotent - becomes a no-op if the Token is already Paused.

func (*TokenPauseTransaction) AddSignature added in v2.3.0

func (tx *TokenPauseTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenPauseTransaction

AddSignature adds a signature to the transaction.

func (*TokenPauseTransaction) Execute added in v2.3.0

func (tx *TokenPauseTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenPauseTransaction) Freeze added in v2.3.0

func (*TokenPauseTransaction) FreezeWith added in v2.3.0

func (tx *TokenPauseTransaction) FreezeWith(client *Client) (*TokenPauseTransaction, error)

func (*TokenPauseTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenPauseTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenPauseTransaction) GetLogLevel added in v2.34.0

func (e *TokenPauseTransaction) GetLogLevel() *LogLevel

func (*TokenPauseTransaction) GetMaxBackoff added in v2.3.0

func (e *TokenPauseTransaction) GetMaxBackoff() time.Duration

func (*TokenPauseTransaction) GetMaxRetry added in v2.34.0

func (e *TokenPauseTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenPauseTransaction) GetMinBackoff added in v2.3.0

func (e *TokenPauseTransaction) GetMinBackoff() time.Duration

func (*TokenPauseTransaction) GetNodeAccountIDs added in v2.34.0

func (e *TokenPauseTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenPauseTransaction) GetTokenID added in v2.3.0

func (tx *TokenPauseTransaction) GetTokenID() TokenID

GetTokenID returns the token to be paused

func (*TokenPauseTransaction) Schedule added in v2.3.0

func (*TokenPauseTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenPauseTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenPauseTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenPauseTransaction) SetLogLevel added in v2.25.0

func (tx *TokenPauseTransaction) SetLogLevel(level LogLevel) *TokenPauseTransaction

func (*TokenPauseTransaction) SetMaxBackoff added in v2.3.0

func (tx *TokenPauseTransaction) SetMaxBackoff(max time.Duration) *TokenPauseTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenPauseTransaction) SetMaxRetry added in v2.3.0

func (tx *TokenPauseTransaction) SetMaxRetry(count int) *TokenPauseTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenPauseTransaction) SetMaxTransactionFee added in v2.3.0

func (tx *TokenPauseTransaction) SetMaxTransactionFee(fee Hbar) *TokenPauseTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenPauseTransaction.

func (*TokenPauseTransaction) SetMinBackoff added in v2.3.0

func (tx *TokenPauseTransaction) SetMinBackoff(min time.Duration) *TokenPauseTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenPauseTransaction) SetNodeAccountIDs added in v2.3.0

func (tx *TokenPauseTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenPauseTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenPauseTransaction.

func (*TokenPauseTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenPauseTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenPauseTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenPauseTransaction) SetTokenID added in v2.3.0

func (tx *TokenPauseTransaction) SetTokenID(tokenID TokenID) *TokenPauseTransaction

SetTokenID Sets the token to be paused

func (*TokenPauseTransaction) SetTransactionID added in v2.3.0

func (tx *TokenPauseTransaction) SetTransactionID(transactionID TransactionID) *TokenPauseTransaction

SetTransactionID sets the TransactionID for this TokenPauseTransaction.

func (*TokenPauseTransaction) SetTransactionMemo added in v2.3.0

func (tx *TokenPauseTransaction) SetTransactionMemo(memo string) *TokenPauseTransaction

SetTransactionMemo sets the memo for this TokenPauseTransaction.

func (*TokenPauseTransaction) SetTransactionValidDuration added in v2.3.0

func (tx *TokenPauseTransaction) SetTransactionValidDuration(duration time.Duration) *TokenPauseTransaction

SetTransactionValidDuration sets the valid duration for this TokenPauseTransaction.

func (*TokenPauseTransaction) Sign added in v2.3.0

Sign uses the provided privateKey to sign the transaction.

func (*TokenPauseTransaction) SignWith added in v2.3.0

func (tx *TokenPauseTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenPauseTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenPauseTransaction) SignWithOperator added in v2.3.0

func (tx *TokenPauseTransaction) SignWithOperator(client *Client) (*TokenPauseTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenRelationship

type TokenRelationship struct {
	TokenID              TokenID
	Symbol               string
	Balance              uint64
	KycStatus            *bool
	FreezeStatus         *bool
	Decimals             uint32
	AutomaticAssociation bool
}

TokenRelationship is the information about a token relationship

type TokenRevokeKycTransaction

type TokenRevokeKycTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenRevokeKycTransaction Revokes KYC to the account for the given token. Must be signed by the Token's kycKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no KYC Key is defined, the transaction will resolve to TOKEN_HAS_NO_KYC_KEY. Once executed the Account is marked as KYC Revoked

func NewTokenRevokeKycTransaction

func NewTokenRevokeKycTransaction() *TokenRevokeKycTransaction

NewTokenRevokeKycTransaction creates TokenRevokeKycTransaction which revokes KYC to the account for the given token. Must be signed by the Token's kycKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no KYC Key is defined, the transaction will resolve to TOKEN_HAS_NO_KYC_KEY. Once executed the Account is marked as KYC Revoked

func (*TokenRevokeKycTransaction) AddSignature added in v2.1.3

func (tx *TokenRevokeKycTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenRevokeKycTransaction

AddSignature adds a signature to the transaction.

func (*TokenRevokeKycTransaction) Execute

func (*TokenRevokeKycTransaction) Freeze

func (*TokenRevokeKycTransaction) FreezeWith

func (*TokenRevokeKycTransaction) GetAccountID added in v2.1.3

func (tx *TokenRevokeKycTransaction) GetAccountID() AccountID

GetAccountID returns the AccountID that is being KYC Revoked

func (*TokenRevokeKycTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenRevokeKycTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenRevokeKycTransaction) GetLogLevel added in v2.34.0

func (e *TokenRevokeKycTransaction) GetLogLevel() *LogLevel

func (*TokenRevokeKycTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenRevokeKycTransaction) GetMaxBackoff() time.Duration

func (*TokenRevokeKycTransaction) GetMaxRetry added in v2.34.0

func (e *TokenRevokeKycTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenRevokeKycTransaction) GetMinBackoff added in v2.1.16

func (e *TokenRevokeKycTransaction) GetMinBackoff() time.Duration

func (*TokenRevokeKycTransaction) GetNodeAccountIDs

func (e *TokenRevokeKycTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenRevokeKycTransaction) GetTokenID

func (tx *TokenRevokeKycTransaction) GetTokenID() TokenID

GetTokenID returns the token for which this account will get his KYC revoked.

func (*TokenRevokeKycTransaction) Schedule added in v2.1.5

func (*TokenRevokeKycTransaction) SetAccountID

func (tx *TokenRevokeKycTransaction) SetAccountID(accountID AccountID) *TokenRevokeKycTransaction

SetAccountID Sets the account to be KYC Revoked

func (*TokenRevokeKycTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenRevokeKycTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenRevokeKycTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenRevokeKycTransaction) SetLogLevel added in v2.25.0

func (*TokenRevokeKycTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenRevokeKycTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenRevokeKycTransaction) SetMaxTransactionFee

func (tx *TokenRevokeKycTransaction) SetMaxTransactionFee(fee Hbar) *TokenRevokeKycTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenRevokeKycTransaction) SetNodeAccountIDs

func (tx *TokenRevokeKycTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenRevokeKycTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenRevokeKycTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenRevokeKycTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenRevokeKycTransaction) SetTokenID

SetTokenID Sets the token for which this account will get his KYC revoked. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenRevokeKycTransaction) SetTransactionID

func (tx *TokenRevokeKycTransaction) SetTransactionID(transactionID TransactionID) *TokenRevokeKycTransaction

SetTransactionID sets the TransactionID for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetTransactionMemo

func (tx *TokenRevokeKycTransaction) SetTransactionMemo(memo string) *TokenRevokeKycTransaction

SetTransactionMemo sets the memo for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetTransactionValidDuration

func (tx *TokenRevokeKycTransaction) SetTransactionValidDuration(duration time.Duration) *TokenRevokeKycTransaction

SetTransactionValidDuration sets the valid duration for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenRevokeKycTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenRevokeKycTransaction) SignWithOperator

func (tx *TokenRevokeKycTransaction) SignWithOperator(client *Client) (*TokenRevokeKycTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenSupplyType added in v2.1.11

type TokenSupplyType int32
const (
	TokenSupplyTypeInfinite TokenSupplyType = 0
	TokenSupplyTypeFinite   TokenSupplyType = 1
)

func (TokenSupplyType) String added in v2.1.11

func (tokenSupplyType TokenSupplyType) String() string

String returns a string representation of the TokenSupplyType

type TokenTransfer

type TokenTransfer struct {
	AccountID  AccountID
	Amount     int64
	IsApproved bool
}

TokenTransfer is a token transfer record.

func NewTokenTransfer

func NewTokenTransfer(accountID AccountID, amount int64) TokenTransfer

NewTokenTransfer creates a TokenTransfer with the given accountID and amount

func TokenTransferFromBytes added in v2.1.3

func TokenTransferFromBytes(data []byte) (TokenTransfer, error)

TokenTransferFromBytes returns a TokenTransfer struct from a protobuf encoded byte array

func (TokenTransfer) String added in v2.4.0

func (transfer TokenTransfer) String() string

func (TokenTransfer) ToBytes added in v2.1.3

func (transfer TokenTransfer) ToBytes() []byte

ToBytes returns a protobuf encoded version of the TokenTransfer

type TokenType added in v2.1.11

type TokenType uint32
const (
	TokenTypeFungibleCommon    TokenType = 0
	TokenTypeNonFungibleUnique TokenType = 1
)

func (TokenType) String added in v2.1.11

func (tokenType TokenType) String() string

String returns a string representation of the TokenType

type TokenUnfreezeTransaction

type TokenUnfreezeTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenUnfreezeTransaction Unfreezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no Freeze Key is defined, the transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. Once executed the Account is marked as Unfrozen and will be able to receive or send tokens. The operation is idempotent.

func NewTokenUnfreezeTransaction

func NewTokenUnfreezeTransaction() *TokenUnfreezeTransaction

NewTokenUnfreezeTransaction creates TokenUnfreezeTransaction which unfreezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If no Freeze Key is defined, the transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. Once executed the Account is marked as Unfrozen and will be able to receive or send tokens. The operation is idempotent.

func (*TokenUnfreezeTransaction) AddSignature added in v2.1.3

func (tx *TokenUnfreezeTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenUnfreezeTransaction

AddSignature adds a signature to the transaction.

func (*TokenUnfreezeTransaction) Execute

func (tx *TokenUnfreezeTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenUnfreezeTransaction) Freeze added in v2.2.0

func (*TokenUnfreezeTransaction) FreezeWith added in v2.2.0

func (tx *TokenUnfreezeTransaction) FreezeWith(client *Client) (*TokenUnfreezeTransaction, error)

func (*TokenUnfreezeTransaction) GetAccountID

func (tx *TokenUnfreezeTransaction) GetAccountID() AccountID

GetAccountID returns the account to be unfrozen

func (*TokenUnfreezeTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenUnfreezeTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenUnfreezeTransaction) GetLogLevel added in v2.34.0

func (e *TokenUnfreezeTransaction) GetLogLevel() *LogLevel

func (*TokenUnfreezeTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenUnfreezeTransaction) GetMaxBackoff() time.Duration

func (*TokenUnfreezeTransaction) GetMaxRetry added in v2.34.0

func (e *TokenUnfreezeTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenUnfreezeTransaction) GetMinBackoff added in v2.1.16

func (e *TokenUnfreezeTransaction) GetMinBackoff() time.Duration

func (*TokenUnfreezeTransaction) GetNodeAccountIDs

func (e *TokenUnfreezeTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenUnfreezeTransaction) GetTokenID

func (tx *TokenUnfreezeTransaction) GetTokenID() TokenID

GetTokenID returns the token for which this account will be unfrozen.

func (*TokenUnfreezeTransaction) Schedule added in v2.1.5

func (*TokenUnfreezeTransaction) SetAccountID

func (tx *TokenUnfreezeTransaction) SetAccountID(accountID AccountID) *TokenUnfreezeTransaction

SetAccountID Sets the account to be unfrozen

func (*TokenUnfreezeTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenUnfreezeTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenUnfreezeTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenUnfreezeTransaction) SetLogLevel added in v2.25.0

func (*TokenUnfreezeTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenUnfreezeTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenUnfreezeTransaction) SetMaxRetry(count int) *TokenUnfreezeTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenUnfreezeTransaction) SetMaxTransactionFee

func (tx *TokenUnfreezeTransaction) SetMaxTransactionFee(fee Hbar) *TokenUnfreezeTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenUnfreezeTransaction) SetNodeAccountIDs

func (tx *TokenUnfreezeTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenUnfreezeTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenUnfreezeTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenUnfreezeTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenUnfreezeTransaction) SetTokenID

SetTokenID Sets the token for which this account will be unfrozen. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenUnfreezeTransaction) SetTransactionID

func (tx *TokenUnfreezeTransaction) SetTransactionID(transactionID TransactionID) *TokenUnfreezeTransaction

SetTransactionID sets the TransactionID for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetTransactionMemo

func (tx *TokenUnfreezeTransaction) SetTransactionMemo(memo string) *TokenUnfreezeTransaction

SetTransactionMemo sets the memo for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetTransactionValidDuration

func (tx *TokenUnfreezeTransaction) SetTransactionValidDuration(duration time.Duration) *TokenUnfreezeTransaction

SetTransactionValidDuration sets the valid duration for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenUnfreezeTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenUnfreezeTransaction) SignWithOperator

func (tx *TokenUnfreezeTransaction) SignWithOperator(client *Client) (*TokenUnfreezeTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenUnpauseTransaction added in v2.3.0

type TokenUnpauseTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenUnpauseTransaction Unpauses the Token. Must be signed with the Token's pause key. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If no Pause Key is defined, the transaction will resolve to TOKEN_HAS_NO_PAUSE_KEY. Once executed the Token is marked as Unpaused and can be used in Transactions. The operation is idempotent - becomes a no-op if the Token is already unpaused.

func NewTokenUnpauseTransaction added in v2.3.0

func NewTokenUnpauseTransaction() *TokenUnpauseTransaction

NewTokenUnpauseTransaction creates TokenUnpauseTransaction which unpauses the Token. Must be signed with the Token's pause key. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If no Pause Key is defined, the transaction will resolve to TOKEN_HAS_NO_PAUSE_KEY. Once executed the Token is marked as Unpaused and can be used in Transactions. The operation is idempotent - becomes a no-op if the Token is already unpaused.

func (*TokenUnpauseTransaction) AddSignature added in v2.3.0

func (tx *TokenUnpauseTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenUnpauseTransaction

AddSignature adds a signature to the transaction.

func (*TokenUnpauseTransaction) Execute added in v2.3.0

func (tx *TokenUnpauseTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenUnpauseTransaction) Freeze added in v2.3.0

func (*TokenUnpauseTransaction) FreezeWith added in v2.3.0

func (tx *TokenUnpauseTransaction) FreezeWith(client *Client) (*TokenUnpauseTransaction, error)

func (*TokenUnpauseTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenUnpauseTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenUnpauseTransaction) GetLogLevel added in v2.34.0

func (e *TokenUnpauseTransaction) GetLogLevel() *LogLevel

func (*TokenUnpauseTransaction) GetMaxBackoff added in v2.3.0

func (e *TokenUnpauseTransaction) GetMaxBackoff() time.Duration

func (*TokenUnpauseTransaction) GetMaxRetry added in v2.34.0

func (e *TokenUnpauseTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenUnpauseTransaction) GetMinBackoff added in v2.3.0

func (e *TokenUnpauseTransaction) GetMinBackoff() time.Duration

func (*TokenUnpauseTransaction) GetNodeAccountIDs added in v2.34.0

func (e *TokenUnpauseTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenUnpauseTransaction) GetTokenID added in v2.3.0

func (tx *TokenUnpauseTransaction) GetTokenID() TokenID

GetTokenID returns the TokenID of the token to be unpaused.

func (*TokenUnpauseTransaction) Schedule added in v2.3.0

func (*TokenUnpauseTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenUnpauseTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenUnpauseTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenUnpauseTransaction) SetLogLevel added in v2.25.0

func (*TokenUnpauseTransaction) SetMaxBackoff added in v2.3.0

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenUnpauseTransaction) SetMaxRetry added in v2.3.0

func (tx *TokenUnpauseTransaction) SetMaxRetry(count int) *TokenUnpauseTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenUnpauseTransaction) SetMaxTransactionFee added in v2.3.0

func (tx *TokenUnpauseTransaction) SetMaxTransactionFee(fee Hbar) *TokenUnpauseTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenUnpauseTransaction.

func (*TokenUnpauseTransaction) SetMinBackoff added in v2.3.0

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenUnpauseTransaction) SetNodeAccountIDs added in v2.3.0

func (tx *TokenUnpauseTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenUnpauseTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenUnpauseTransaction.

func (*TokenUnpauseTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenUnpauseTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenUnpauseTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenUnpauseTransaction) SetTokenID added in v2.3.0

func (tx *TokenUnpauseTransaction) SetTokenID(tokenID TokenID) *TokenUnpauseTransaction

SetTokenID Sets the token to be unpaused.

func (*TokenUnpauseTransaction) SetTransactionID added in v2.3.0

func (tx *TokenUnpauseTransaction) SetTransactionID(transactionID TransactionID) *TokenUnpauseTransaction

SetTransactionID sets the TransactionID for this TokenUnpauseTransaction.

func (*TokenUnpauseTransaction) SetTransactionMemo added in v2.3.0

func (tx *TokenUnpauseTransaction) SetTransactionMemo(memo string) *TokenUnpauseTransaction

SetTransactionMemo sets the memo for this TokenUnpauseTransaction.

func (*TokenUnpauseTransaction) SetTransactionValidDuration added in v2.3.0

func (tx *TokenUnpauseTransaction) SetTransactionValidDuration(duration time.Duration) *TokenUnpauseTransaction

SetTransactionValidDuration sets the valid duration for this TokenUnpauseTransaction.

func (*TokenUnpauseTransaction) Sign added in v2.3.0

Sign uses the provided privateKey to sign the transaction.

func (*TokenUnpauseTransaction) SignWith added in v2.3.0

func (tx *TokenUnpauseTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenUnpauseTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenUnpauseTransaction) SignWithOperator added in v2.3.0

func (tx *TokenUnpauseTransaction) SignWithOperator(client *Client) (*TokenUnpauseTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenUpdateTransaction

type TokenUpdateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenUpdateTransaction At consensus, updates an already created token to the given values.

If no value is given for a field, that field is left unchanged. For an immutable tokens (that is, a token without an admin key), only the expiry may be updated. Setting any other field in that case will cause the transaction status to resolve to TOKEN_IS_IMMUTABLE.

--- Signing Requirements ---

  1. Whether or not a token has an admin key, its expiry can be extended with only the transaction payer's signature.
  2. Updating any other field of a mutable token requires the admin key's signature.
  3. If a new admin key is set, this new key must sign <b>unless</b> it is exactly an empty <tt>KeyList</tt>. This special sentinel key removes the existing admin key and causes the token to become immutable. (Other <tt>Key</tt> structures without a constituent <tt>Ed25519</tt> key will be rejected with <tt>INVALID_ADMIN_KEY</tt>.)
  4. If a new treasury is set, the new treasury account's key must sign the transaction.

--- Nft Requirements ---

  1. If a non fungible token has a positive treasury balance, the operation will abort with CURRENT_TREASURY_STILL_OWNS_NFTS.

func NewTokenUpdateTransaction

func NewTokenUpdateTransaction() *TokenUpdateTransaction

NewTokenUpdateTransaction creates TokenUpdateTransaction which at consensus, updates an already created token to the given values.

If no value is given for a field, that field is left unchanged. For an immutable tokens (that is, a token without an admin key), only the expiry may be updated. Setting any other field in that case will cause the transaction status to resolve to TOKEN_IS_IMMUTABLE.

--- Signing Requirements ---

  1. Whether or not a token has an admin key, its expiry can be extended with only the transaction payer's signature.
  2. Updating any other field of a mutable token requires the admin key's signature.
  3. If a new admin key is set, this new key must sign <b>unless</b> it is exactly an empty <tt>KeyList</tt>. This special sentinel key removes the existing admin key and causes the token to become immutable. (Other <tt>Key</tt> structures without a constituent <tt>Ed25519</tt> key will be rejected with <tt>INVALID_ADMIN_KEY</tt>.)
  4. If a new treasury is set, the new treasury account's key must sign the transaction.

--- Nft Requirements ---

  1. If a non fungible token has a positive treasury balance, the operation will abort with CURRENT_TREASURY_STILL_OWNS_NFTS.

func (*TokenUpdateTransaction) AddSignature added in v2.1.3

func (tx *TokenUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenUpdateTransaction

AddSignature adds a signature to the transaction.

func (*TokenUpdateTransaction) Execute

func (tx *TokenUpdateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenUpdateTransaction) Freeze

func (*TokenUpdateTransaction) FreezeWith

func (tx *TokenUpdateTransaction) FreezeWith(client *Client) (*TokenUpdateTransaction, error)

func (*TokenUpdateTransaction) GeTokenMemo added in v2.1.5

func (tx *TokenUpdateTransaction) GeTokenMemo() string

func (*TokenUpdateTransaction) GetAdminKey

func (tx *TokenUpdateTransaction) GetAdminKey() Key

func (*TokenUpdateTransaction) GetAutoRenewAccount

func (tx *TokenUpdateTransaction) GetAutoRenewAccount() AccountID

func (*TokenUpdateTransaction) GetAutoRenewPeriod

func (tx *TokenUpdateTransaction) GetAutoRenewPeriod() time.Duration

GetAutoRenewPeriod returns the new interval at which the auto-renew account will be charged to extend the token's expiry.

func (*TokenUpdateTransaction) GetExpirationTime

func (tx *TokenUpdateTransaction) GetExpirationTime() time.Time

func (*TokenUpdateTransaction) GetFeeScheduleKey added in v2.1.11

func (tx *TokenUpdateTransaction) GetFeeScheduleKey() Key

GetFeeScheduleKey returns the new key to use to update the token's custom fee schedule

func (*TokenUpdateTransaction) GetFreezeKey

func (tx *TokenUpdateTransaction) GetFreezeKey() Key

GetFreezeKey returns the new Freeze key of the Token

func (*TokenUpdateTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenUpdateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenUpdateTransaction) GetKycKey

func (tx *TokenUpdateTransaction) GetKycKey() Key

GetKycKey returns the new KYC key of the Token

func (*TokenUpdateTransaction) GetLogLevel added in v2.34.0

func (e *TokenUpdateTransaction) GetLogLevel() *LogLevel

func (*TokenUpdateTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenUpdateTransaction) GetMaxBackoff() time.Duration

func (*TokenUpdateTransaction) GetMaxRetry added in v2.34.0

func (e *TokenUpdateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenUpdateTransaction) GetMinBackoff added in v2.1.16

func (e *TokenUpdateTransaction) GetMinBackoff() time.Duration

func (*TokenUpdateTransaction) GetNodeAccountIDs

func (e *TokenUpdateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenUpdateTransaction) GetPauseKey added in v2.7.0

func (tx *TokenUpdateTransaction) GetPauseKey() Key

GetPauseKey returns the Key which can pause and unpause the Token

func (*TokenUpdateTransaction) GetSupplyKey

func (tx *TokenUpdateTransaction) GetSupplyKey() Key

GetSupplyKey returns the new Supply key of the Token

func (*TokenUpdateTransaction) GetTokenID

func (tx *TokenUpdateTransaction) GetTokenID() TokenID

GetTokenID returns the TokenID for this TokenUpdateTransaction

func (*TokenUpdateTransaction) GetTokenName

func (tx *TokenUpdateTransaction) GetTokenName() string

GetTokenName returns the TokenName for this TokenUpdateTransaction

func (*TokenUpdateTransaction) GetTokenSymbol

func (tx *TokenUpdateTransaction) GetTokenSymbol() string

func (*TokenUpdateTransaction) GetTreasuryAccountID

func (tx *TokenUpdateTransaction) GetTreasuryAccountID() AccountID

func (*TokenUpdateTransaction) GetWipeKey

func (tx *TokenUpdateTransaction) GetWipeKey() Key

GetWipeKey returns the new Wipe key of the Token

func (*TokenUpdateTransaction) Schedule added in v2.1.5

func (*TokenUpdateTransaction) SetAdminKey

func (tx *TokenUpdateTransaction) SetAdminKey(publicKey Key) *TokenUpdateTransaction

SetAdminKey Sets the new Admin key of the Token. If Token is immutable, transaction will resolve to TOKEN_IS_IMMUTABlE.

func (*TokenUpdateTransaction) SetAutoRenewAccount

func (tx *TokenUpdateTransaction) SetAutoRenewAccount(autoRenewAccountID AccountID) *TokenUpdateTransaction

SetAutoRenewAccount Sets the new account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval.

func (*TokenUpdateTransaction) SetAutoRenewPeriod

func (tx *TokenUpdateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *TokenUpdateTransaction

SetAutoRenewPeriod Sets the new interval at which the auto-renew account will be charged to extend the token's expiry.

func (*TokenUpdateTransaction) SetExpirationTime

func (tx *TokenUpdateTransaction) SetExpirationTime(expirationTime time.Time) *TokenUpdateTransaction

SetExpirationTime Sets the new expiry time of the token. Expiry can be updated even if admin key is not set. If the provided expiry is earlier than the current token expiry, transaction wil resolve to INVALID_EXPIRATION_TIME

func (*TokenUpdateTransaction) SetFeeScheduleKey added in v2.1.11

func (tx *TokenUpdateTransaction) SetFeeScheduleKey(key Key) *TokenUpdateTransaction

SetFeeScheduleKey If set, the new key to use to update the token's custom fee schedule; if the token does not currently have this key, transaction will resolve to TOKEN_HAS_NO_FEE_SCHEDULE_KEY

func (*TokenUpdateTransaction) SetFreezeKey

func (tx *TokenUpdateTransaction) SetFreezeKey(publicKey Key) *TokenUpdateTransaction

SetFreezeKey Sets the new Freeze key of the Token. If the Token does not have currently a Freeze key, transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY.

func (*TokenUpdateTransaction) SetGrpcDeadline added in v2.17.2

func (tx *TokenUpdateTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenUpdateTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenUpdateTransaction) SetKycKey

func (tx *TokenUpdateTransaction) SetKycKey(publicKey Key) *TokenUpdateTransaction

SetKycKey Sets the new KYC key of the Token. If Token does not have currently a KYC key, transaction will resolve to TOKEN_HAS_NO_KYC_KEY.

func (*TokenUpdateTransaction) SetLogLevel added in v2.25.0

func (tx *TokenUpdateTransaction) SetLogLevel(level LogLevel) *TokenUpdateTransaction

func (*TokenUpdateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenUpdateTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenUpdateTransaction) SetMaxRetry(count int) *TokenUpdateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenUpdateTransaction) SetMaxTransactionFee

func (tx *TokenUpdateTransaction) SetMaxTransactionFee(fee Hbar) *TokenUpdateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenUpdateTransaction) SetNodeAccountIDs

func (tx *TokenUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenUpdateTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetPauseKey added in v2.7.0

func (tx *TokenUpdateTransaction) SetPauseKey(publicKey Key) *TokenUpdateTransaction

SetPauseKey Sets the Key which can pause and unpause the Token. If the Token does not currently have a pause key, transaction will resolve to TOKEN_HAS_NO_PAUSE_KEY

func (*TokenUpdateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenUpdateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenUpdateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenUpdateTransaction) SetSupplyKey

func (tx *TokenUpdateTransaction) SetSupplyKey(publicKey Key) *TokenUpdateTransaction

SetSupplyKey Sets the new Supply key of the Token. If the Token does not have currently a Supply key, transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY.

func (*TokenUpdateTransaction) SetTokenID

func (tx *TokenUpdateTransaction) SetTokenID(tokenID TokenID) *TokenUpdateTransaction

SetTokenID Sets the Token to be updated

func (*TokenUpdateTransaction) SetTokenMemo added in v2.1.5

func (tx *TokenUpdateTransaction) SetTokenMemo(memo string) *TokenUpdateTransaction

SetTokenMemo If set, the new memo to be associated with the token (UTF-8 encoding max 100 bytes)

func (*TokenUpdateTransaction) SetTokenName

func (tx *TokenUpdateTransaction) SetTokenName(name string) *TokenUpdateTransaction

SetTokenName Sets the new Name of the Token. Must be a string of ASCII characters.

func (*TokenUpdateTransaction) SetTokenSymbol

func (tx *TokenUpdateTransaction) SetTokenSymbol(symbol string) *TokenUpdateTransaction

SetTokenSymbol Sets the new Symbol of the Token. Must be UTF-8 capitalized alphabetical string identifying the token.

func (*TokenUpdateTransaction) SetTransactionID

func (tx *TokenUpdateTransaction) SetTransactionID(transactionID TransactionID) *TokenUpdateTransaction

SetTransactionID sets the TransactionID for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetTransactionMemo

func (tx *TokenUpdateTransaction) SetTransactionMemo(memo string) *TokenUpdateTransaction

SetTransactionMemo sets the memo for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetTransactionValidDuration

func (tx *TokenUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenUpdateTransaction

SetTransactionValidDuration sets the valid duration for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetTreasuryAccountID

func (tx *TokenUpdateTransaction) SetTreasuryAccountID(treasuryAccountID AccountID) *TokenUpdateTransaction

SetTreasuryAccountID sets thehe new Treasury account of the Token. If the provided treasury account is not existing or deleted, the _Response will be INVALID_TREASURY_ACCOUNT_FOR_TOKEN. If successful, the Token balance held in the previous Treasury Account is transferred to the new one.

func (*TokenUpdateTransaction) SetWipeKey

func (tx *TokenUpdateTransaction) SetWipeKey(publicKey Key) *TokenUpdateTransaction

SetWipeKey Sets the new Wipe key of the Token. If the Token does not have currently a Wipe key, transaction will resolve to TOKEN_HAS_NO_WIPE_KEY.

func (*TokenUpdateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenUpdateTransaction) SignWith

func (tx *TokenUpdateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenUpdateTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenUpdateTransaction) SignWithOperator

func (tx *TokenUpdateTransaction) SignWithOperator(client *Client) (*TokenUpdateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TokenWipeTransaction

type TokenWipeTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TokenWipeTransaction Wipes the provided amount of tokens from the specified Account. Must be signed by the Token's Wipe key. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If Wipe Key is not present in the Token, transaction results in TOKEN_HAS_NO_WIPE_KEY. If the provided account is the Token's Treasury Account, transaction results in CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT On success, tokens are removed from the account and the total supply of the token is decreased by the wiped amount.

The amount provided is in the lowest denomination possible. Example: Token A has 2 decimals. In order to wipe 100 tokens from account, one must provide amount of 10000. In order to wipe 100.55 tokens, one must provide amount of 10055.

func NewTokenWipeTransaction

func NewTokenWipeTransaction() *TokenWipeTransaction

NewTokenWipeTransaction creates TokenWipeTransaction which wipes the provided amount of tokens from the specified Account. Must be signed by the Token's Wipe key. If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. If Wipe Key is not present in the Token, transaction results in TOKEN_HAS_NO_WIPE_KEY. If the provided account is the Token's Treasury Account, transaction results in CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT On success, tokens are removed from the account and the total supply of the token is decreased by the wiped amount.

The amount provided is in the lowest denomination possible. Example: Token A has 2 decimals. In order to wipe 100 tokens from account, one must provide amount of 10000. In order to wipe 100.55 tokens, one must provide amount of 10055.

func (*TokenWipeTransaction) AddSignature added in v2.1.3

func (tx *TokenWipeTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenWipeTransaction

AddSignature adds a signature to the transaction.

func (*TokenWipeTransaction) Execute

func (tx *TokenWipeTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TokenWipeTransaction) Freeze

func (*TokenWipeTransaction) FreezeWith

func (tx *TokenWipeTransaction) FreezeWith(client *Client) (*TokenWipeTransaction, error)

func (*TokenWipeTransaction) GetAccountID

func (tx *TokenWipeTransaction) GetAccountID() AccountID

GetAccountID returns the AccountID that is being wiped

func (*TokenWipeTransaction) GetAmount

func (tx *TokenWipeTransaction) GetAmount() uint64

GetAmount returns the amount of tokens to be wiped from the specified account

func (*TokenWipeTransaction) GetGrpcDeadline added in v2.34.0

func (e *TokenWipeTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TokenWipeTransaction) GetLogLevel added in v2.34.0

func (e *TokenWipeTransaction) GetLogLevel() *LogLevel

func (*TokenWipeTransaction) GetMaxBackoff added in v2.1.16

func (e *TokenWipeTransaction) GetMaxBackoff() time.Duration

func (*TokenWipeTransaction) GetMaxRetry added in v2.34.0

func (e *TokenWipeTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TokenWipeTransaction) GetMinBackoff added in v2.1.16

func (e *TokenWipeTransaction) GetMinBackoff() time.Duration

func (*TokenWipeTransaction) GetNodeAccountIDs

func (e *TokenWipeTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TokenWipeTransaction) GetSerialNumbers added in v2.1.11

func (tx *TokenWipeTransaction) GetSerialNumbers() []int64

GetSerialNumbers returns the list of serial numbers to be wiped.

func (*TokenWipeTransaction) GetTokenID

func (tx *TokenWipeTransaction) GetTokenID() TokenID

GetTokenID returns the TokenID that is being wiped

func (*TokenWipeTransaction) Schedule added in v2.1.5

func (*TokenWipeTransaction) SetAccountID

func (tx *TokenWipeTransaction) SetAccountID(accountID AccountID) *TokenWipeTransaction

SetAccountID Sets the account to be wiped

func (*TokenWipeTransaction) SetAmount

func (tx *TokenWipeTransaction) SetAmount(amount uint64) *TokenWipeTransaction

SetAmount Sets the amount of tokens to wipe from the specified account. Amount must be a positive non-zero number in the lowest denomination possible, not bigger than the token balance of the account (0; balance]

func (*TokenWipeTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TokenWipeTransaction) SetGrpcDeadline(deadline *time.Duration) *TokenWipeTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TokenWipeTransaction) SetLogLevel added in v2.25.0

func (tx *TokenWipeTransaction) SetLogLevel(level LogLevel) *TokenWipeTransaction

func (*TokenWipeTransaction) SetMaxBackoff added in v2.1.16

func (tx *TokenWipeTransaction) SetMaxBackoff(max time.Duration) *TokenWipeTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TokenWipeTransaction) SetMaxRetry added in v2.1.2

func (tx *TokenWipeTransaction) SetMaxRetry(count int) *TokenWipeTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TokenWipeTransaction) SetMaxTransactionFee

func (tx *TokenWipeTransaction) SetMaxTransactionFee(fee Hbar) *TokenWipeTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetMinBackoff added in v2.1.16

func (tx *TokenWipeTransaction) SetMinBackoff(min time.Duration) *TokenWipeTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TokenWipeTransaction) SetNodeAccountIDs

func (tx *TokenWipeTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenWipeTransaction

SetNodeAccountIDs sets the _Node AccountID for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TokenWipeTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TokenWipeTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TokenWipeTransaction) SetSerialNumbers added in v2.1.11

func (tx *TokenWipeTransaction) SetSerialNumbers(serial []int64) *TokenWipeTransaction

SetSerialNumbers Sets applicable to tokens of type NON_FUNGIBLE_UNIQUE. The list of serial numbers to be wiped.

func (*TokenWipeTransaction) SetTokenID

func (tx *TokenWipeTransaction) SetTokenID(tokenID TokenID) *TokenWipeTransaction

SetTokenID Sets the token for which the account will be wiped. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenWipeTransaction) SetTransactionID

func (tx *TokenWipeTransaction) SetTransactionID(transactionID TransactionID) *TokenWipeTransaction

SetTransactionID sets the TransactionID for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetTransactionMemo

func (tx *TokenWipeTransaction) SetTransactionMemo(memo string) *TokenWipeTransaction

SetTransactionMemo sets the memo for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetTransactionValidDuration

func (tx *TokenWipeTransaction) SetTransactionValidDuration(duration time.Duration) *TokenWipeTransaction

SetTransactionValidDuration sets the valid duration for this TokenWipeTransaction.

func (*TokenWipeTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TokenWipeTransaction) SignWith

func (tx *TokenWipeTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenWipeTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TokenWipeTransaction) SignWithOperator

func (tx *TokenWipeTransaction) SignWithOperator(client *Client) (*TokenWipeTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TopicCreateTransaction

type TopicCreateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

A TopicCreateTransaction is for creating a new Topic on HCS.

func NewTopicCreateTransaction

func NewTopicCreateTransaction() *TopicCreateTransaction

NewTopicCreateTransaction creates a TopicCreateTransaction transaction which can be used to construct and execute a Create Topic Transaction.

func (*TopicCreateTransaction) AddSignature added in v2.1.3

func (tx *TopicCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicCreateTransaction

AddSignature adds a signature to the transaction.

func (*TopicCreateTransaction) Execute

func (tx *TopicCreateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TopicCreateTransaction) Freeze

func (*TopicCreateTransaction) FreezeWith

func (tx *TopicCreateTransaction) FreezeWith(client *Client) (*TopicCreateTransaction, error)

func (*TopicCreateTransaction) GetAdminKey

func (tx *TopicCreateTransaction) GetAdminKey() (Key, error)

GetAdminKey returns the key required to update or delete the topic

func (*TopicCreateTransaction) GetAutoRenewAccountID

func (tx *TopicCreateTransaction) GetAutoRenewAccountID() AccountID

GetAutoRenewAccountID returns the auto renew account ID for this topic

func (*TopicCreateTransaction) GetAutoRenewPeriod

func (tx *TopicCreateTransaction) GetAutoRenewPeriod() time.Duration

GetAutoRenewPeriod returns the auto renew period for this topic

func (*TopicCreateTransaction) GetGrpcDeadline added in v2.34.0

func (e *TopicCreateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TopicCreateTransaction) GetLogLevel added in v2.34.0

func (e *TopicCreateTransaction) GetLogLevel() *LogLevel

func (*TopicCreateTransaction) GetMaxBackoff added in v2.1.16

func (e *TopicCreateTransaction) GetMaxBackoff() time.Duration

func (*TopicCreateTransaction) GetMaxRetry added in v2.34.0

func (e *TopicCreateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TopicCreateTransaction) GetMinBackoff added in v2.1.16

func (e *TopicCreateTransaction) GetMinBackoff() time.Duration

func (*TopicCreateTransaction) GetNodeAccountIDs

func (e *TopicCreateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TopicCreateTransaction) GetSubmitKey

func (tx *TopicCreateTransaction) GetSubmitKey() (Key, error)

GetSubmitKey returns the key required for submitting messages to the topic

func (*TopicCreateTransaction) GetTopicMemo

func (tx *TopicCreateTransaction) GetTopicMemo() string

GetTopicMemo returns the memo for this topic

func (*TopicCreateTransaction) Schedule added in v2.1.5

func (*TopicCreateTransaction) SetAdminKey

func (tx *TopicCreateTransaction) SetAdminKey(publicKey Key) *TopicCreateTransaction

SetAdminKey sets the key required to update or delete the topic. If unspecified, anyone can increase the topic's expirationTime.

func (*TopicCreateTransaction) SetAutoRenewAccountID

func (tx *TopicCreateTransaction) SetAutoRenewAccountID(autoRenewAccountID AccountID) *TopicCreateTransaction

SetAutoRenewAccountID sets an optional account to be used at the topic's expirationTime to extend the life of the topic. The topic lifetime will be extended up to a maximum of the autoRenewPeriod or however long the topic can be extended using all funds on the account (whichever is the smaller duration/amount).

If specified, there must be an adminKey and the autoRenewAccount must sign this transaction.

func (*TopicCreateTransaction) SetAutoRenewPeriod

func (tx *TopicCreateTransaction) SetAutoRenewPeriod(period time.Duration) *TopicCreateTransaction

SetAutoRenewPeriod sets the initial lifetime of the topic and the amount of time to extend the topic's lifetime automatically at expirationTime if the autoRenewAccount is configured and has sufficient funds.

Required. Limited to a maximum of 90 days (server-sIDe configuration which may change).

func (*TopicCreateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TopicCreateTransaction) SetGrpcDeadline(deadline *time.Duration) *TopicCreateTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TopicCreateTransaction) SetLogLevel added in v2.25.0

func (tx *TopicCreateTransaction) SetLogLevel(level LogLevel) *TopicCreateTransaction

func (*TopicCreateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TopicCreateTransaction) SetMaxRetry added in v2.1.2

func (tx *TopicCreateTransaction) SetMaxRetry(count int) *TopicCreateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TopicCreateTransaction) SetMaxTransactionFee

func (tx *TopicCreateTransaction) SetMaxTransactionFee(fee Hbar) *TopicCreateTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TopicCreateTransaction) SetNodeAccountIDs

func (tx *TopicCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TopicCreateTransaction

SetNodeAccountIDs sets the _Node AccountID for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TopicCreateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TopicCreateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TopicCreateTransaction) SetSubmitKey

func (tx *TopicCreateTransaction) SetSubmitKey(publicKey Key) *TopicCreateTransaction

SetSubmitKey sets the key required for submitting messages to the topic. If unspecified, all submissions are allowed.

func (*TopicCreateTransaction) SetTopicMemo

func (tx *TopicCreateTransaction) SetTopicMemo(memo string) *TopicCreateTransaction

SetTopicMemo sets a short publicly visible memo about the topic. No guarantee of uniqueness.

func (*TopicCreateTransaction) SetTransactionID

func (tx *TopicCreateTransaction) SetTransactionID(transactionID TransactionID) *TopicCreateTransaction

SetTransactionID sets the TransactionID for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetTransactionMemo

func (tx *TopicCreateTransaction) SetTransactionMemo(memo string) *TopicCreateTransaction

SetTransactionMemo sets the memo for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetTransactionValidDuration

func (tx *TopicCreateTransaction) SetTransactionValidDuration(duration time.Duration) *TopicCreateTransaction

SetTransactionValidDuration sets the valid duration for this TopicCreateTransaction.

func (*TopicCreateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TopicCreateTransaction) SignWith

func (tx *TopicCreateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TopicCreateTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TopicCreateTransaction) SignWithOperator

func (tx *TopicCreateTransaction) SignWithOperator(client *Client) (*TopicCreateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TopicDeleteTransaction

type TopicDeleteTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TopicDeleteTransaction is for deleting a topic on HCS.

func NewTopicDeleteTransaction

func NewTopicDeleteTransaction() *TopicDeleteTransaction

NewTopicDeleteTransaction creates a TopicDeleteTransaction which can be used to construct and execute a Consensus Delete Topic Transaction.

func (*TopicDeleteTransaction) AddSignature added in v2.1.3

func (tx *TopicDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicDeleteTransaction

AddSignature adds a signature to the transaction.

func (*TopicDeleteTransaction) Execute

func (tx *TopicDeleteTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TopicDeleteTransaction) Freeze

func (*TopicDeleteTransaction) FreezeWith

func (tx *TopicDeleteTransaction) FreezeWith(client *Client) (*TopicDeleteTransaction, error)

func (*TopicDeleteTransaction) GetGrpcDeadline added in v2.34.0

func (e *TopicDeleteTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TopicDeleteTransaction) GetLogLevel added in v2.34.0

func (e *TopicDeleteTransaction) GetLogLevel() *LogLevel

func (*TopicDeleteTransaction) GetMaxBackoff added in v2.1.16

func (e *TopicDeleteTransaction) GetMaxBackoff() time.Duration

func (*TopicDeleteTransaction) GetMaxRetry added in v2.34.0

func (e *TopicDeleteTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TopicDeleteTransaction) GetMinBackoff added in v2.1.16

func (e *TopicDeleteTransaction) GetMinBackoff() time.Duration

func (*TopicDeleteTransaction) GetNodeAccountIDs

func (e *TopicDeleteTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TopicDeleteTransaction) GetTopicID

func (tx *TopicDeleteTransaction) GetTopicID() TopicID

GetTopicID returns the topic IDentifier.

func (*TopicDeleteTransaction) Schedule added in v2.1.5

func (*TopicDeleteTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TopicDeleteTransaction) SetGrpcDeadline(deadline *time.Duration) *TopicDeleteTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TopicDeleteTransaction) SetLogLevel added in v2.25.0

func (tx *TopicDeleteTransaction) SetLogLevel(level LogLevel) *TopicDeleteTransaction

func (*TopicDeleteTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TopicDeleteTransaction) SetMaxRetry added in v2.1.2

func (tx *TopicDeleteTransaction) SetMaxRetry(count int) *TopicDeleteTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TopicDeleteTransaction) SetMaxTransactionFee

func (tx *TopicDeleteTransaction) SetMaxTransactionFee(fee Hbar) *TopicDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TopicDeleteTransaction) SetNodeAccountIDs

func (tx *TopicDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *TopicDeleteTransaction

SetNodeAccountIDs sets the _Node AccountID for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TopicDeleteTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TopicDeleteTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TopicDeleteTransaction) SetTopicID

func (tx *TopicDeleteTransaction) SetTopicID(topicID TopicID) *TopicDeleteTransaction

SetTopicID sets the topic IDentifier.

func (*TopicDeleteTransaction) SetTransactionID

func (tx *TopicDeleteTransaction) SetTransactionID(transactionID TransactionID) *TopicDeleteTransaction

SetTransactionID sets the TransactionID for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetTransactionMemo

func (tx *TopicDeleteTransaction) SetTransactionMemo(memo string) *TopicDeleteTransaction

SetTransactionMemo sets the memo for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetTransactionValidDuration

func (tx *TopicDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *TopicDeleteTransaction

SetTransactionValidDuration sets the valid duration for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TopicDeleteTransaction) SignWith

func (tx *TopicDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TopicDeleteTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TopicDeleteTransaction) SignWithOperator

func (tx *TopicDeleteTransaction) SignWithOperator(client *Client) (*TopicDeleteTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TopicID

type TopicID struct {
	Shard uint64
	Realm uint64
	Topic uint64
	// contains filtered or unexported fields
}

TopicID is a unique identifier for a topic (used by the service)

func TopicIDFromBytes added in v2.1.3

func TopicIDFromBytes(data []byte) (TopicID, error)

TopicIDFromBytes constructs a TopicID from a byte array

func TopicIDFromSolidityAddress added in v2.7.0

func TopicIDFromSolidityAddress(s string) (TopicID, error)

TopicIDFromSolidityAddress constructs an TopicID from a string representation of a _Solidity address

func TopicIDFromString

func TopicIDFromString(data string) (TopicID, error)

TopicIDFromString constructs a TopicID from a string formatted as `Shard.Realm.Topic` (for example "0.0.3")

func (TopicID) String

func (id TopicID) String() string

String returns the string representation of a TopicID in `Shard.Realm.Topic` (for example "0.0.3")

func (TopicID) ToBytes added in v2.1.3

func (id TopicID) ToBytes() []byte

ToBytes returns a byte array representation of the TopicID

func (TopicID) ToSolidityAddress added in v2.7.0

func (id TopicID) ToSolidityAddress() string

ToSolidityAddress returns the string representation of the TopicID as a _Solidity address.

func (TopicID) ToStringWithChecksum added in v2.1.13

func (id TopicID) ToStringWithChecksum(client Client) (string, error)

ToStringWithChecksum returns the string representation of a TopicID in `Shard.Realm.Topic-Checksum` (for example "0.0.3-abcde")

func (*TopicID) Validate added in v2.1.8

func (id *TopicID) Validate(client *Client) error

Deprecated - use ValidateChecksum instead

func (*TopicID) ValidateChecksum added in v2.4.0

func (id *TopicID) ValidateChecksum(client *Client) error

Verify that the client has a valid checksum.

type TopicInfo

type TopicInfo struct {
	TopicMemo          string
	RunningHash        []byte
	SequenceNumber     uint64
	ExpirationTime     time.Time
	AdminKey           Key
	SubmitKey          Key
	AutoRenewPeriod    time.Duration
	AutoRenewAccountID *AccountID
	LedgerID           LedgerID
}

TopicInfo is the information about a topic

func TopicInfoFromBytes added in v2.1.3

func TopicInfoFromBytes(data []byte) (TopicInfo, error)

TopicInfoFromBytes returns a TopicInfo object from a byte array

func (TopicInfo) ToBytes added in v2.1.3

func (topicInfo TopicInfo) ToBytes() []byte

ToBytes returns a byte array representation of the TopicInfo object

type TopicInfoQuery

type TopicInfoQuery struct {
	Query
	// contains filtered or unexported fields
}

TopicInfo is the Query for retrieving information about a topic stored on the Hedera network.

func NewTopicInfoQuery

func NewTopicInfoQuery() *TopicInfoQuery

NewTopicInfoQuery creates a TopicInfoQuery query which can be used to construct and execute a

Get Topic Info Query.

func (*TopicInfoQuery) Execute

func (q *TopicInfoQuery) Execute(client *Client) (TopicInfo, error)

Execute executes the TopicInfoQuery using the provided client

func (*TopicInfoQuery) GetCost

func (q *TopicInfoQuery) GetCost(client *Client) (Hbar, error)

func (*TopicInfoQuery) GetGrpcDeadline added in v2.34.0

func (e *TopicInfoQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TopicInfoQuery) GetLogLevel added in v2.34.0

func (e *TopicInfoQuery) GetLogLevel() *LogLevel

func (*TopicInfoQuery) GetMaxBackoff added in v2.1.16

func (e *TopicInfoQuery) GetMaxBackoff() time.Duration

func (*TopicInfoQuery) GetMaxRetry added in v2.34.0

func (e *TopicInfoQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TopicInfoQuery) GetMinBackoff added in v2.1.16

func (e *TopicInfoQuery) GetMinBackoff() time.Duration

func (*TopicInfoQuery) GetNodeAccountIDs

func (e *TopicInfoQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TopicInfoQuery) GetTopicID

func (q *TopicInfoQuery) GetTopicID() TopicID

GetTopicID returns the TopicID for this TopicInfoQuery

func (*TopicInfoQuery) SetGrpcDeadline added in v2.11.0

func (q *TopicInfoQuery) SetGrpcDeadline(deadline *time.Duration) *TopicInfoQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TopicInfoQuery) SetLogLevel added in v2.25.0

func (q *TopicInfoQuery) SetLogLevel(level LogLevel) *TopicInfoQuery

func (*TopicInfoQuery) SetMaxBackoff added in v2.1.16

func (q *TopicInfoQuery) SetMaxBackoff(max time.Duration) *TopicInfoQuery

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TopicInfoQuery) SetMaxQueryPayment

func (q *TopicInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *TopicInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*TopicInfoQuery) SetMaxRetry added in v2.1.2

func (q *TopicInfoQuery) SetMaxRetry(count int) *TopicInfoQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*TopicInfoQuery) SetMinBackoff added in v2.1.16

func (q *TopicInfoQuery) SetMinBackoff(min time.Duration) *TopicInfoQuery

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TopicInfoQuery) SetNodeAccountIDs

func (q *TopicInfoQuery) SetNodeAccountIDs(accountID []AccountID) *TopicInfoQuery

SetNodeAccountIDs sets the _Node AccountID for this TopicInfoQuery.

func (*TopicInfoQuery) SetPaymentTransactionID added in v2.17.2

func (q *TopicInfoQuery) SetPaymentTransactionID(transactionID TransactionID) *TopicInfoQuery

func (*TopicInfoQuery) SetQueryPayment

func (q *TopicInfoQuery) SetQueryPayment(paymentAmount Hbar) *TopicInfoQuery

SetQueryPayment sets the payment amount for this Query.

func (*TopicInfoQuery) SetTopicID

func (q *TopicInfoQuery) SetTopicID(topicID TopicID) *TopicInfoQuery

SetTopicID sets the topic to retrieve info about (the parameters and running state of).

type TopicMessage

type TopicMessage struct {
	ConsensusTimestamp time.Time
	Contents           []byte
	RunningHash        []byte
	SequenceNumber     uint64
	Chunks             []TopicMessageChunk
	TransactionID      *TransactionID
}

TopicMessage is a message from a topic}

type TopicMessageChunk

type TopicMessageChunk struct {
	ConsensusTimestamp time.Time
	ContentSize        uint64
	RunningHash        []byte
	SequenceNumber     uint64
}

TopicMessageChunk is a chunk of a topic message

type TopicMessageQuery

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

TopicMessageQuery Query that listens to messages sent to the specific TopicID

func NewTopicMessageQuery

func NewTopicMessageQuery() *TopicMessageQuery

NewTopicMessageQuery creates TopicMessageQuery which listens to messages sent to the specific TopicID

func (*TopicMessageQuery) GetEndTime

func (query *TopicMessageQuery) GetEndTime() time.Time

func (*TopicMessageQuery) GetLimit

func (query *TopicMessageQuery) GetLimit() uint64

func (*TopicMessageQuery) GetMaxAttempts added in v2.1.9

func (query *TopicMessageQuery) GetMaxAttempts() uint64

GetMaxAttempts returns the amount of attempts to try to retrieve message

func (*TopicMessageQuery) GetStartTime

func (query *TopicMessageQuery) GetStartTime() time.Time

GetStartTime returns the start time for this TopicMessageQuery

func (*TopicMessageQuery) GetTopicID

func (query *TopicMessageQuery) GetTopicID() TopicID

GetTopicID returns the TopicID for this TopicMessageQuery

func (*TopicMessageQuery) SetCompletionHandler added in v2.1.6

func (query *TopicMessageQuery) SetCompletionHandler(completionHandler func()) *TopicMessageQuery

SetCompletionHandler Sets the completion handler for this query

func (*TopicMessageQuery) SetEndTime

func (query *TopicMessageQuery) SetEndTime(endTime time.Time) *TopicMessageQuery

SetEndTime Sets time when to stop listening for messages. If not set it will receive indefinitely.

func (*TopicMessageQuery) SetErrorHandler added in v2.1.2

func (query *TopicMessageQuery) SetErrorHandler(errorHandler func(stat status.Status)) *TopicMessageQuery

SetErrorHandler Sets the error handler for this query

func (*TopicMessageQuery) SetLimit

func (query *TopicMessageQuery) SetLimit(limit uint64) *TopicMessageQuery

SetLimit Sets the maximum number of messages to receive before stopping. If not set or set to zero it will return messages indefinitely.

func (*TopicMessageQuery) SetMaxAttempts added in v2.1.9

func (query *TopicMessageQuery) SetMaxAttempts(maxAttempts uint64) *TopicMessageQuery

SetMaxAttempts Sets the amount of attempts to try to retrieve message

func (*TopicMessageQuery) SetRetryHandler added in v2.1.6

func (query *TopicMessageQuery) SetRetryHandler(retryHandler func(err error) bool) *TopicMessageQuery

SetRetryHandler Sets the retry handler for this query

func (*TopicMessageQuery) SetStartTime

func (query *TopicMessageQuery) SetStartTime(startTime time.Time) *TopicMessageQuery

SetStartTime Sets time for when to start listening for messages. Defaults to current time if not set.

func (*TopicMessageQuery) SetTopicID

func (query *TopicMessageQuery) SetTopicID(topicID TopicID) *TopicMessageQuery

SetTopicID Sets topic ID to retrieve messages for. Required

func (*TopicMessageQuery) Subscribe

func (query *TopicMessageQuery) Subscribe(client *Client, onNext func(TopicMessage)) (SubscriptionHandle, error)

Subscribe subscribes to messages sent to the specific TopicID

type TopicMessageSubmitTransaction

type TopicMessageSubmitTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TopicMessageSubmitTransaction Sends a message/messages to the Topic ID

func NewTopicMessageSubmitTransaction

func NewTopicMessageSubmitTransaction() *TopicMessageSubmitTransaction

NewTopicMessageSubmitTransaction createsTopicMessageSubmitTransaction which sends a message/messages to the Topic ID

func (*TopicMessageSubmitTransaction) AddSignature added in v2.1.3

func (tx *TopicMessageSubmitTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicMessageSubmitTransaction

AddSignature adds a signature to the transaction.

func (*TopicMessageSubmitTransaction) Execute

Execute executes the Query with the provided client

func (*TopicMessageSubmitTransaction) ExecuteAll

func (tx *TopicMessageSubmitTransaction) ExecuteAll(
	client *Client,
) ([]TransactionResponse, error)

ExecuteAll executes the all the Transactions with the provided client

func (*TopicMessageSubmitTransaction) Freeze

func (*TopicMessageSubmitTransaction) FreezeWith

func (*TopicMessageSubmitTransaction) GetGrpcDeadline added in v2.34.0

func (e *TopicMessageSubmitTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TopicMessageSubmitTransaction) GetLogLevel added in v2.34.0

func (e *TopicMessageSubmitTransaction) GetLogLevel() *LogLevel

func (*TopicMessageSubmitTransaction) GetMaxBackoff added in v2.1.16

func (e *TopicMessageSubmitTransaction) GetMaxBackoff() time.Duration

func (*TopicMessageSubmitTransaction) GetMaxChunks

func (tx *TopicMessageSubmitTransaction) GetMaxChunks() uint64

GetMaxChunks returns the maximum amount of chunks to use to send the message

func (*TopicMessageSubmitTransaction) GetMaxRetry added in v2.34.0

func (e *TopicMessageSubmitTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TopicMessageSubmitTransaction) GetMessage

func (tx *TopicMessageSubmitTransaction) GetMessage() []byte

func (*TopicMessageSubmitTransaction) GetMinBackoff added in v2.1.16

func (e *TopicMessageSubmitTransaction) GetMinBackoff() time.Duration

func (*TopicMessageSubmitTransaction) GetNodeAccountIDs

func (e *TopicMessageSubmitTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TopicMessageSubmitTransaction) GetTopicID

func (tx *TopicMessageSubmitTransaction) GetTopicID() TopicID

GetTopicID returns the TopicID for this TopicMessageSubmitTransaction

func (*TopicMessageSubmitTransaction) Schedule added in v2.1.5

func (*TopicMessageSubmitTransaction) SetGrpcDeadline added in v2.11.0

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TopicMessageSubmitTransaction) SetLogLevel added in v2.25.0

func (*TopicMessageSubmitTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TopicMessageSubmitTransaction) SetMaxChunks

SetMaxChunks sets the maximum amount of chunks to use to send the message

func (*TopicMessageSubmitTransaction) SetMaxRetry added in v2.1.2

SetMaxRetry sets the max number of errors before execution will fail.

func (*TopicMessageSubmitTransaction) SetMaxTransactionFee

func (tx *TopicMessageSubmitTransaction) SetMaxTransactionFee(fee Hbar) *TopicMessageSubmitTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetMessage

SetMessage Sets the message to be submitted.

func (*TopicMessageSubmitTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TopicMessageSubmitTransaction) SetNodeAccountIDs

SetNodeAccountIDs sets the _Node AccountID for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TopicMessageSubmitTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TopicMessageSubmitTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TopicMessageSubmitTransaction) SetTopicID

SetTopicID Sets the topic to submit message to.

func (*TopicMessageSubmitTransaction) SetTransactionID

func (tx *TopicMessageSubmitTransaction) SetTransactionID(transactionID TransactionID) *TopicMessageSubmitTransaction

SetTransactionID sets the TransactionID for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetTransactionMemo

SetTransactionMemo sets the memo for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetTransactionValidDuration

func (tx *TopicMessageSubmitTransaction) SetTransactionValidDuration(duration time.Duration) *TopicMessageSubmitTransaction

SetTransactionValidDuration sets the valid duration for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TopicMessageSubmitTransaction) SignWith

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TopicMessageSubmitTransaction) SignWithOperator

func (tx *TopicMessageSubmitTransaction) SignWithOperator(client *Client) (*TopicMessageSubmitTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type TopicUpdateTransaction

type TopicUpdateTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TopicUpdateTransaction Updates all fields on a Topic that are set in the transaction.

func NewTopicUpdateTransaction

func NewTopicUpdateTransaction() *TopicUpdateTransaction

NewTopicUpdateTransaction creates a TopicUpdateTransaction transaction which updates all fields on a Topic that are set in the transaction.

func (*TopicUpdateTransaction) AddSignature added in v2.1.3

func (tx *TopicUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicUpdateTransaction

AddSignature adds a signature to the transaction.

func (*TopicUpdateTransaction) ClearAdminKey

func (tx *TopicUpdateTransaction) ClearAdminKey() *TopicUpdateTransaction

ClearAdminKey explicitly clears any admin key on the topic by sending an empty key list as the key

func (*TopicUpdateTransaction) ClearAutoRenewAccountID

func (tx *TopicUpdateTransaction) ClearAutoRenewAccountID() *TopicUpdateTransaction

ClearAutoRenewAccountID explicitly clears any auto renew account ID on the topic by sending an empty accountID

func (*TopicUpdateTransaction) ClearSubmitKey

func (tx *TopicUpdateTransaction) ClearSubmitKey() *TopicUpdateTransaction

ClearSubmitKey explicitly clears any submit key on the topic by sending an empty key list as the key

func (*TopicUpdateTransaction) ClearTopicMemo

func (tx *TopicUpdateTransaction) ClearTopicMemo() *TopicUpdateTransaction

ClearTopicMemo explicitly clears any memo on the topic by sending an empty string as the memo

func (*TopicUpdateTransaction) Execute

func (tx *TopicUpdateTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TopicUpdateTransaction) Freeze

func (*TopicUpdateTransaction) FreezeWith

func (tx *TopicUpdateTransaction) FreezeWith(client *Client) (*TopicUpdateTransaction, error)

func (*TopicUpdateTransaction) GetAdminKey

func (tx *TopicUpdateTransaction) GetAdminKey() (Key, error)

GetAdminKey returns the key required to update/delete the topic.

func (*TopicUpdateTransaction) GetAutoRenewAccountID

func (tx *TopicUpdateTransaction) GetAutoRenewAccountID() AccountID

GetAutoRenewAccountID returns the optional account to be used at the topic's expirationTime to extend the life of the topic.

func (*TopicUpdateTransaction) GetAutoRenewPeriod

func (tx *TopicUpdateTransaction) GetAutoRenewPeriod() time.Duration

GetAutoRenewPeriod returns the amount of time to extend the topic's lifetime automatically at expirationTime if the autoRenewAccount is configured and has funds.

func (*TopicUpdateTransaction) GetExpirationTime

func (tx *TopicUpdateTransaction) GetExpirationTime() time.Time

GetExpirationTime returns the effective timestamp at (and after) which all transactions and queries will fail.

func (*TopicUpdateTransaction) GetGrpcDeadline added in v2.34.0

func (e *TopicUpdateTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TopicUpdateTransaction) GetLogLevel added in v2.34.0

func (e *TopicUpdateTransaction) GetLogLevel() *LogLevel

func (*TopicUpdateTransaction) GetMaxBackoff added in v2.1.16

func (e *TopicUpdateTransaction) GetMaxBackoff() time.Duration

func (*TopicUpdateTransaction) GetMaxRetry added in v2.34.0

func (e *TopicUpdateTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TopicUpdateTransaction) GetMinBackoff added in v2.1.16

func (e *TopicUpdateTransaction) GetMinBackoff() time.Duration

func (*TopicUpdateTransaction) GetNodeAccountIDs

func (e *TopicUpdateTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TopicUpdateTransaction) GetSubmitKey

func (tx *TopicUpdateTransaction) GetSubmitKey() (Key, error)

GetSubmitKey returns the key allowed to submit messages to the topic.

func (*TopicUpdateTransaction) GetTopicID

func (tx *TopicUpdateTransaction) GetTopicID() TopicID

GetTopicID returns the topic to be updated.

func (*TopicUpdateTransaction) GetTopicMemo

func (tx *TopicUpdateTransaction) GetTopicMemo() string

GetTopicMemo returns the short publicly visible memo about the topic.

func (*TopicUpdateTransaction) Schedule added in v2.1.5

func (*TopicUpdateTransaction) SetAdminKey

func (tx *TopicUpdateTransaction) SetAdminKey(publicKey Key) *TopicUpdateTransaction

SetAdminKey sets the key required to update/delete the topic. If unset, the key will not be changed.

Setting the AdminKey to an empty KeyList will clear the adminKey.

func (*TopicUpdateTransaction) SetAutoRenewAccountID

func (tx *TopicUpdateTransaction) SetAutoRenewAccountID(autoRenewAccountID AccountID) *TopicUpdateTransaction

SetAutoRenewAccountID sets the optional account to be used at the topic's expirationTime to extend the life of the topic. The topic lifetime will be extended up to a maximum of the autoRenewPeriod or however long the topic can be extended using all funds on the account (whichever is the smaller duration/amount). If specified as the default value (0.0.0), the autoRenewAccount will be removed.

func (*TopicUpdateTransaction) SetAutoRenewPeriod

func (tx *TopicUpdateTransaction) SetAutoRenewPeriod(period time.Duration) *TopicUpdateTransaction

SetAutoRenewPeriod sets the amount of time to extend the topic's lifetime automatically at expirationTime if the autoRenewAccount is configured and has funds. This is limited to a maximum of 90 days (server-sIDe configuration which may change).

func (*TopicUpdateTransaction) SetExpirationTime

func (tx *TopicUpdateTransaction) SetExpirationTime(expiration time.Time) *TopicUpdateTransaction

SetExpirationTime sets the effective timestamp at (and after) which all transactions and queries will fail. The expirationTime may be no longer than 90 days from the timestamp of this transaction.

func (*TopicUpdateTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TopicUpdateTransaction) SetGrpcDeadline(deadline *time.Duration) *TopicUpdateTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TopicUpdateTransaction) SetLogLevel added in v2.25.0

func (tx *TopicUpdateTransaction) SetLogLevel(level LogLevel) *TopicUpdateTransaction

func (*TopicUpdateTransaction) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TopicUpdateTransaction) SetMaxRetry added in v2.1.2

func (tx *TopicUpdateTransaction) SetMaxRetry(count int) *TopicUpdateTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TopicUpdateTransaction) SetMaxTransactionFee

func (tx *TopicUpdateTransaction) SetMaxTransactionFee(fee Hbar) *TopicUpdateTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TopicUpdateTransaction) SetNodeAccountIDs

func (tx *TopicUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TopicUpdateTransaction

SetNodeAccountIDs sets the _Node AccountID for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TopicUpdateTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TopicUpdateTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TopicUpdateTransaction) SetSubmitKey

func (tx *TopicUpdateTransaction) SetSubmitKey(publicKey Key) *TopicUpdateTransaction

SetSubmitKey will set the key allowed to submit messages to the topic. If unset, the key will not be changed.

Setting the submitKey to an empty KeyList will clear the submitKey.

func (*TopicUpdateTransaction) SetTopicID

func (tx *TopicUpdateTransaction) SetTopicID(topicID TopicID) *TopicUpdateTransaction

SetTopicID sets the topic to be updated.

func (*TopicUpdateTransaction) SetTopicMemo

func (tx *TopicUpdateTransaction) SetTopicMemo(memo string) *TopicUpdateTransaction

SetTopicMemo sets a short publicly visible memo about the topic. No guarantee of uniqueness.

func (*TopicUpdateTransaction) SetTransactionID

func (tx *TopicUpdateTransaction) SetTransactionID(transactionID TransactionID) *TopicUpdateTransaction

SetTransactionID sets the TransactionID for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetTransactionMemo

func (tx *TopicUpdateTransaction) SetTransactionMemo(memo string) *TopicUpdateTransaction

SetTransactionMemo sets the memo for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetTransactionValidDuration

func (tx *TopicUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *TopicUpdateTransaction

SetTransactionValidDuration sets the valid duration for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) Sign

Sign uses the provided privateKey to sign the transaction.

func (*TopicUpdateTransaction) SignWith

func (tx *TopicUpdateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TopicUpdateTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TopicUpdateTransaction) SignWithOperator

func (tx *TopicUpdateTransaction) SignWithOperator(client *Client) (*TopicUpdateTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

type Transaction

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

Transaction is base struct for all transactions that may be built and submitted to Hedera.

func (*Transaction) AddSignature

func (tx *Transaction) AddSignature(publicKey PublicKey, signature []byte) TransactionInterface

func (*Transaction) GetDefaultMaxTransactionFee added in v2.19.0

func (tx *Transaction) GetDefaultMaxTransactionFee() Hbar

func (*Transaction) GetGrpcDeadline added in v2.11.0

func (e *Transaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*Transaction) GetLogLevel added in v2.25.0

func (e *Transaction) GetLogLevel() *LogLevel

func (*Transaction) GetMaxBackoff added in v2.34.0

func (e *Transaction) GetMaxBackoff() time.Duration

func (*Transaction) GetMaxRetry added in v2.1.2

func (e *Transaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*Transaction) GetMaxTransactionFee

func (tx *Transaction) GetMaxTransactionFee() Hbar

GetMaxTransactionFee returns the maximum transaction fee the operator (paying account) is willing to pay.

func (*Transaction) GetMinBackoff added in v2.34.0

func (e *Transaction) GetMinBackoff() time.Duration

func (*Transaction) GetNodeAccountIDs

func (e *Transaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*Transaction) GetRegenerateTransactionID added in v2.8.0

func (tx *Transaction) GetRegenerateTransactionID() bool

GetRegenerateTransactionID returns true if transaction ID regeneration is enabled

func (*Transaction) GetSignatures

func (tx *Transaction) GetSignatures() (map[AccountID]map[*PublicKey][]byte, error)

GetSignatures Gets all of the signatures stored in the transaction

func (*Transaction) GetSignedTransactionBodyBytes added in v2.20.0

func (tx *Transaction) GetSignedTransactionBodyBytes(transactionIndex int) []byte

func (*Transaction) GetTransactionHash

func (tx *Transaction) GetTransactionHash() ([]byte, error)

func (*Transaction) GetTransactionHashPerNode

func (tx *Transaction) GetTransactionHashPerNode() (map[AccountID][]byte, error)

func (*Transaction) GetTransactionID

func (tx *Transaction) GetTransactionID() TransactionID

GetTransactionID gets the TransactionID for this transaction.

func (*Transaction) GetTransactionMemo

func (tx *Transaction) GetTransactionMemo() string

GetTransactionMemo returns the memo for this transaction.

func (*Transaction) GetTransactionValidDuration

func (tx *Transaction) GetTransactionValidDuration() time.Duration

GetTransactionValidDuration returns the duration that this transaction is valid for.

func (*Transaction) IsFrozen added in v2.34.0

func (tx *Transaction) IsFrozen() bool

func (*Transaction) SetGrpcDeadline added in v2.11.0

func (e *Transaction) SetGrpcDeadline(deadline *time.Duration) *executable

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*Transaction) SetLogLevel added in v2.25.0

func (e *Transaction) SetLogLevel(level LogLevel) *executable

func (*Transaction) SetMaxBackoff added in v2.34.0

func (e *Transaction) SetMaxBackoff(max time.Duration) *executable

func (*Transaction) SetMaxRetry added in v2.1.2

func (e *Transaction) SetMaxRetry(max int) *executable

func (*Transaction) SetMaxTransactionFee

func (tx *Transaction) SetMaxTransactionFee(fee Hbar) *Transaction

SetMaxTransactionFee sets the maximum transaction fee the operator (paying account) is willing to pay.

func (*Transaction) SetMinBackoff added in v2.34.0

func (e *Transaction) SetMinBackoff(min time.Duration) *executable

func (*Transaction) SetNodeAccountIDs

func (tx *Transaction) SetNodeAccountIDs(nodeAccountIDs []AccountID) *Transaction

SetNodeAccountIDs sets the node AccountID for this transaction.

func (*Transaction) SetRegenerateTransactionID added in v2.8.0

func (tx *Transaction) SetRegenerateTransactionID(regenerateTransactionID bool) *Transaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when \`TRANSACTION_EXPIRED\` is received

func (*Transaction) SetTransactionID

func (tx *Transaction) SetTransactionID(transactionID TransactionID) *Transaction

SetTransactionID sets the TransactionID for this transaction.

func (*Transaction) SetTransactionMemo

func (tx *Transaction) SetTransactionMemo(memo string) *Transaction

SetTransactionMemo sets the memo for this transaction.

func (*Transaction) SetTransactionValidDuration

func (tx *Transaction) SetTransactionValidDuration(duration time.Duration) *Transaction

SetTransactionValidDuration sets the valid duration for this transaction.

func (*Transaction) Sign added in v2.34.0

func (tx *Transaction) Sign(privateKey PrivateKey) TransactionInterface

------------ Transaction methdos ---------------

func (*Transaction) SignWith added in v2.34.0

func (tx *Transaction) SignWith(publicKey PublicKey, signer TransactionSigner) TransactionInterface

func (*Transaction) String

func (tx *Transaction) String() string

String returns a string representation of the transaction

func (*Transaction) ToBytes

func (tx *Transaction) ToBytes() ([]byte, error)

ToBytes Builds then converts the current transaction to []byte Requires transaction to be frozen

type TransactionFeeSchedule added in v2.1.11

type TransactionFeeSchedule struct {
	RequestType RequestType
	// Deprecated: use Fees
	FeeData *FeeData
	Fees    []*FeeData
}

func (TransactionFeeSchedule) String added in v2.1.11

func (txFeeSchedule TransactionFeeSchedule) String() string

func (TransactionFeeSchedule) ToBytes added in v2.1.11

func (txFeeSchedule TransactionFeeSchedule) ToBytes() []byte

type TransactionID

type TransactionID struct {
	AccountID  *AccountID
	ValidStart *time.Time

	Nonce *int32
	// contains filtered or unexported fields
}

TransactionID is the id used to identify a Transaction on the Hedera _Network. It consists of an AccountID and a a valid start time.

func NewTransactionIDWithValidStart

func NewTransactionIDWithValidStart(accountID AccountID, validStart time.Time) TransactionID

NewTransactionIDWithValidStart constructs a new Transaction id struct with the provided AccountID and the valid start time set to a provided time.

func TransactionGetTransactionID added in v2.2.0

func TransactionGetTransactionID(transaction interface{}) (TransactionID, error)

func TransactionIDFromBytes added in v2.1.3

func TransactionIDFromBytes(data []byte) (TransactionID, error)

TransactionIDFromBytes constructs a TransactionID from a byte array

func TransactionIDGenerate

func TransactionIDGenerate(accountID AccountID) TransactionID

NewTransactionID constructs a new Transaction id struct with the provided AccountID and the valid start time set to the current time - 10 seconds.

func TransactionIdFromString added in v2.1.5

func TransactionIdFromString(data string) (TransactionID, error)

TransactionIDFromString constructs a TransactionID from a string representation

func (TransactionID) GetNonce added in v2.7.0

func (id TransactionID) GetNonce() int32

GetNonce returns the nonce on the TransactionID

func (TransactionID) GetReceipt

func (id TransactionID) GetReceipt(client *Client) (TransactionReceipt, error)

GetReceipt queries the _Network for a receipt corresponding to the TransactionID's transaction. If the status of the receipt is exceptional an ErrHederaReceiptStatus will be returned alongside the receipt, otherwise only the receipt will be returned.

func (TransactionID) GetRecord

func (id TransactionID) GetRecord(client *Client) (TransactionRecord, error)

GetRecord queries the _Network for a record corresponding to the TransactionID's transaction. If the status of the record's receipt is exceptional an ErrHederaRecordStatus will be returned alongside the record, otherwise, only the record will be returned. If consensus has not been reached, this function will return a HederaReceiptError with a status of StatusBusy.

func (TransactionID) GetScheduled added in v2.1.5

func (id TransactionID) GetScheduled() bool

GetScheduled returns the scheduled flag on the TransactionID

func (TransactionID) SetNonce added in v2.7.0

func (id TransactionID) SetNonce(nonce int32) TransactionID

SetNonce sets the nonce on the TransactionID

func (TransactionID) SetScheduled added in v2.1.5

func (id TransactionID) SetScheduled(scheduled bool) TransactionID

SetScheduled sets the scheduled flag on the TransactionID

func (TransactionID) String

func (id TransactionID) String() string

String returns a string representation of the TransactionID in `AccountID@ValidStartSeconds.ValidStartNanos?scheduled_bool/nonce` format

func (TransactionID) ToBytes added in v2.1.3

func (id TransactionID) ToBytes() []byte

ToBytes returns a byte array representation of the TransactionID

type TransactionInterface added in v2.34.0

type TransactionInterface interface {
	Executable
	// contains filtered or unexported methods
}

type TransactionReceipt

type TransactionReceipt struct {
	Status                  Status
	ExchangeRate            *ExchangeRate
	TopicID                 *TopicID
	FileID                  *FileID
	ContractID              *ContractID
	AccountID               *AccountID
	TokenID                 *TokenID
	TopicSequenceNumber     uint64
	TopicRunningHash        []byte
	TopicRunningHashVersion uint64
	TotalSupply             uint64
	ScheduleID              *ScheduleID
	ScheduledTransactionID  *TransactionID
	SerialNumbers           []int64
	Duplicates              []TransactionReceipt
	Children                []TransactionReceipt
	TransactionID           *TransactionID
}

The consensus result for a transaction, which might not be currently known, or may succeed or fail.

func TransactionReceiptFromBytes added in v2.1.3

func TransactionReceiptFromBytes(data []byte) (TransactionReceipt, error)

TransactionReceiptFromBytes returns the receipt from the byte representation

func (TransactionReceipt) MarshalJSON added in v2.31.0

func (receipt TransactionReceipt) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON representation of the TransactionReceipt. This should yield the same result in all SDK's.

func (TransactionReceipt) ToBytes added in v2.1.3

func (receipt TransactionReceipt) ToBytes() []byte

ToBytes returns the byte representation of the receipt

func (TransactionReceipt) ValidateStatus added in v2.17.5

func (receipt TransactionReceipt) ValidateStatus(shouldValidate bool) error

ValidateStatus validates the status of the receipt

type TransactionReceiptQuery

type TransactionReceiptQuery struct {
	Query
	// contains filtered or unexported fields
}

TransactionReceiptQuery Get the receipt of a transaction, given its transaction ID. Once a transaction reaches consensus, then information about whether it succeeded or failed will be available until the end of the receipt period. Before and after the receipt period, and for a transaction that was never submitted, the receipt is unknown. This query is free (the payment field is left empty). No State proof is available for this response

func NewTransactionReceiptQuery

func NewTransactionReceiptQuery() *TransactionReceiptQuery

NewTransactionReceiptQuery creates TransactionReceiptQuery which gets the receipt of a transaction, given its transaction ID. Once a transaction reaches consensus, then information about whether it succeeded or failed will be available until the end of the receipt period. Before and after the receipt period, and for a transaction that was never submitted, the receipt is unknown. This query is free (the payment field is left empty). No State proof is available for this response

func (*TransactionReceiptQuery) Execute

func (q *TransactionReceiptQuery) Execute(client *Client) (TransactionReceipt, error)

Execute executes the Query with the provided client

func (*TransactionReceiptQuery) GetCost

func (q *TransactionReceiptQuery) GetCost(client *Client) (Hbar, error)

func (*TransactionReceiptQuery) GetGrpcDeadline added in v2.34.0

func (e *TransactionReceiptQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TransactionReceiptQuery) GetIncludeChildren added in v2.7.0

func (q *TransactionReceiptQuery) GetIncludeChildren() bool

GetIncludeChildren returns whether the response should include the receipts of any child transactions spawned by the top-level transaction with the given transactionID.

func (*TransactionReceiptQuery) GetIncludeDuplicates added in v2.7.0

func (q *TransactionReceiptQuery) GetIncludeDuplicates() bool

GetIncludeDuplicates returns whether receipts of processing duplicate transactions should be returned along with the receipt of processing the first consensus transaction with the given id

func (*TransactionReceiptQuery) GetLogLevel added in v2.34.0

func (e *TransactionReceiptQuery) GetLogLevel() *LogLevel

func (*TransactionReceiptQuery) GetMaxBackoff added in v2.1.16

func (e *TransactionReceiptQuery) GetMaxBackoff() time.Duration

func (*TransactionReceiptQuery) GetMaxRetry added in v2.34.0

func (e *TransactionReceiptQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TransactionReceiptQuery) GetMinBackoff added in v2.1.16

func (e *TransactionReceiptQuery) GetMinBackoff() time.Duration

func (*TransactionReceiptQuery) GetNodeAccountIDs

func (e *TransactionReceiptQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TransactionReceiptQuery) GetTransactionID

func (q *TransactionReceiptQuery) GetTransactionID() TransactionID

GetTransactionID returns the TransactionID for which the receipt is being requested.

func (*TransactionReceiptQuery) SetGrpcDeadline added in v2.11.0

func (q *TransactionReceiptQuery) SetGrpcDeadline(deadline *time.Duration) *TransactionReceiptQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TransactionReceiptQuery) SetIncludeChildren added in v2.7.0

func (q *TransactionReceiptQuery) SetIncludeChildren(includeChildReceipts bool) *TransactionReceiptQuery

SetIncludeChildren Sets whether the response should include the receipts of any child transactions spawned by the top-level transaction with the given transactionID.

func (*TransactionReceiptQuery) SetIncludeDuplicates added in v2.7.0

func (q *TransactionReceiptQuery) SetIncludeDuplicates(includeDuplicates bool) *TransactionReceiptQuery

SetIncludeDuplicates Sets whether receipts of processing duplicate transactions should be returned along with the receipt of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such receipt exists, the receipt of processing the first transaction to reach consensus with the given transaction id.

func (*TransactionReceiptQuery) SetLogLevel added in v2.25.0

func (*TransactionReceiptQuery) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TransactionReceiptQuery) SetMaxQueryPayment

func (q *TransactionReceiptQuery) SetMaxQueryPayment(queryMaxPayment Hbar) *TransactionReceiptQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*TransactionReceiptQuery) SetMaxRetry added in v2.1.2

func (q *TransactionReceiptQuery) SetMaxRetry(count int) *TransactionReceiptQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*TransactionReceiptQuery) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TransactionReceiptQuery) SetNodeAccountIDs

func (q *TransactionReceiptQuery) SetNodeAccountIDs(accountID []AccountID) *TransactionReceiptQuery

SetNodeAccountIDs sets the _Node AccountID for this TransactionReceiptQuery.

func (*TransactionReceiptQuery) SetPaymentTransactionID added in v2.11.0

func (q *TransactionReceiptQuery) SetPaymentTransactionID(transactionID TransactionID) *TransactionReceiptQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*TransactionReceiptQuery) SetQueryPayment

func (q *TransactionReceiptQuery) SetQueryPayment(queryPayment Hbar) *TransactionReceiptQuery

SetQueryPayment sets the Hbar payment to pay the _Node a fee for handling this query

func (*TransactionReceiptQuery) SetTransactionID

func (q *TransactionReceiptQuery) SetTransactionID(transactionID TransactionID) *TransactionReceiptQuery

SetTransactionID sets the TransactionID for which the receipt is being requested.

type TransactionRecord

type TransactionRecord struct {
	Receipt                    TransactionReceipt
	TransactionHash            []byte
	ConsensusTimestamp         time.Time
	TransactionID              TransactionID
	TransactionMemo            string
	TransactionFee             Hbar
	Transfers                  []Transfer
	TokenTransfers             map[TokenID][]TokenTransfer
	NftTransfers               map[TokenID][]TokenNftTransfer
	ExpectedDecimals           map[TokenID]uint32
	CallResult                 *ContractFunctionResult
	CallResultIsCreate         bool
	AssessedCustomFees         []AssessedCustomFee
	AutomaticTokenAssociations []TokenAssociation
	ParentConsensusTimestamp   time.Time
	AliasKey                   *PublicKey
	Duplicates                 []TransactionRecord
	Children                   []TransactionRecord
	// Deprecated
	HbarAllowances []HbarAllowance
	// Deprecated
	TokenAllowances []TokenAllowance
	// Deprecated
	TokenNftAllowances []TokenNftAllowance
	EthereumHash       []byte
	PaidStakingRewards map[AccountID]Hbar
	PrngBytes          []byte
	PrngNumber         *int32
	EvmAddress         []byte
}

The complete record for a transaction on Hedera that has reached consensus. This is not-free to request and is available for 1 hour after a transaction reaches consensus.

func TransactionRecordFromBytes added in v2.1.3

func TransactionRecordFromBytes(data []byte) (TransactionRecord, error)

TransactionRecordFromBytes returns a TransactionRecord from a raw protobuf byte array

func (TransactionRecord) GetContractCreateResult

func (record TransactionRecord) GetContractCreateResult() (ContractFunctionResult, error)

GetContractCreateResult returns the ContractFunctionResult if the transaction was a contract create

func (TransactionRecord) GetContractExecuteResult

func (record TransactionRecord) GetContractExecuteResult() (ContractFunctionResult, error)

GetContractExecuteResult returns the ContractFunctionResult if the transaction was a contract call

func (TransactionRecord) MarshalJSON added in v2.31.0

func (record TransactionRecord) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON representation of the TransactionRecord

func (TransactionRecord) ToBytes added in v2.1.3

func (record TransactionRecord) ToBytes() []byte

ToBytes returns the serialized bytes of a TransactionRecord

func (TransactionRecord) ValidateReceiptStatus added in v2.17.5

func (record TransactionRecord) ValidateReceiptStatus(shouldValidate bool) error

Validate checks that the receipt status is Success

type TransactionRecordQuery

type TransactionRecordQuery struct {
	Query
	// contains filtered or unexported fields
}

TransactionRecordQuery Get the record for a transaction. If the transaction requested a record, then the record lasts for one hour, and a state proof is available for it. If the transaction created an account, file, or smart contract instance, then the record will contain the ID for what it created. If the transaction called a smart contract function, then the record contains the result of that call. If the transaction was a cryptocurrency transfer, then the record includes the TransferList which gives the details of that transfer. If the transaction didn't return anything that should be in the record, then the results field will be set to nothing.

func NewTransactionRecordQuery

func NewTransactionRecordQuery() *TransactionRecordQuery

NewTransactionRecordQuery creates TransactionRecordQuery which gets the record for a transaction. If the transaction requested a record, then the record lasts for one hour, and a state proof is available for it. If the transaction created an account, file, or smart contract instance, then the record will contain the ID for what it created. If the transaction called a smart contract function, then the record contains the result of that call. If the transaction was a cryptocurrency transfer, then the record includes the TransferList which gives the details of that transfer. If the transaction didn't return anything that should be in the record, then the results field will be set to nothing.

func (*TransactionRecordQuery) Execute

func (q *TransactionRecordQuery) Execute(client *Client) (TransactionRecord, error)

Execute executes the Query with the provided client

func (*TransactionRecordQuery) GetCost

func (q *TransactionRecordQuery) GetCost(client *Client) (Hbar, error)

func (*TransactionRecordQuery) GetGrpcDeadline added in v2.34.0

func (e *TransactionRecordQuery) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TransactionRecordQuery) GetIncludeChildren added in v2.7.0

func (q *TransactionRecordQuery) GetIncludeChildren() bool

GetIncludeChildren returns whether the response should include the records of any child transactions spawned by the top-level transaction with the given transactionID.

func (*TransactionRecordQuery) GetIncludeDuplicates added in v2.7.0

func (q *TransactionRecordQuery) GetIncludeDuplicates() bool

GetIncludeDuplicates returns whether records of processing duplicate transactions should be returned along with the record of processing the first consensus transaction with the given id.

func (*TransactionRecordQuery) GetLogLevel added in v2.34.0

func (e *TransactionRecordQuery) GetLogLevel() *LogLevel

func (*TransactionRecordQuery) GetMaxBackoff added in v2.1.16

func (e *TransactionRecordQuery) GetMaxBackoff() time.Duration

func (*TransactionRecordQuery) GetMaxRetry added in v2.34.0

func (e *TransactionRecordQuery) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TransactionRecordQuery) GetMinBackoff added in v2.1.16

func (e *TransactionRecordQuery) GetMinBackoff() time.Duration

func (*TransactionRecordQuery) GetNodeAccountIDs

func (e *TransactionRecordQuery) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TransactionRecordQuery) GetTransactionID

func (q *TransactionRecordQuery) GetTransactionID() TransactionID

GetTransactionID returns the TransactionID for which the receipt is being requested.

func (*TransactionRecordQuery) SetGrpcDeadline added in v2.11.0

func (q *TransactionRecordQuery) SetGrpcDeadline(deadline *time.Duration) *TransactionRecordQuery

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TransactionRecordQuery) SetIncludeChildren added in v2.7.0

func (q *TransactionRecordQuery) SetIncludeChildren(includeChildRecords bool) *TransactionRecordQuery

SetIncludeChildren Sets whether the response should include the records of any child transactions spawned by the top-level transaction with the given transactionID.

func (*TransactionRecordQuery) SetIncludeDuplicates added in v2.7.0

func (q *TransactionRecordQuery) SetIncludeDuplicates(includeDuplicates bool) *TransactionRecordQuery

SetIncludeDuplicates Sets whether records of processing duplicate transactions should be returned along with the record of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor <tt>INVALID_PAYER_SIGNATURE; or, if no such record exists, the record of processing the first transaction to reach consensus with the given transaction id..

func (*TransactionRecordQuery) SetLogLevel added in v2.25.0

func (*TransactionRecordQuery) SetMaxBackoff added in v2.1.16

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TransactionRecordQuery) SetMaxQueryPayment

func (q *TransactionRecordQuery) SetMaxQueryPayment(queryMaxPayment Hbar) *TransactionRecordQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*TransactionRecordQuery) SetMaxRetry added in v2.1.2

func (q *TransactionRecordQuery) SetMaxRetry(count int) *TransactionRecordQuery

SetMaxRetry sets the max number of errors before execution will fail.

func (*TransactionRecordQuery) SetMinBackoff added in v2.1.16

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TransactionRecordQuery) SetNodeAccountIDs

func (q *TransactionRecordQuery) SetNodeAccountIDs(accountID []AccountID) *TransactionRecordQuery

SetNodeAccountIDs sets the _Node AccountID for this TransactionRecordQuery.

func (*TransactionRecordQuery) SetPaymentTransactionID added in v2.11.0

func (q *TransactionRecordQuery) SetPaymentTransactionID(transactionID TransactionID) *TransactionRecordQuery

SetPaymentTransactionID assigns the payment transaction id.

func (*TransactionRecordQuery) SetQueryPayment

func (q *TransactionRecordQuery) SetQueryPayment(queryPayment Hbar) *TransactionRecordQuery

SetQueryPayment sets the Hbar payment to pay the _Node a fee for handling this query

func (*TransactionRecordQuery) SetTransactionID

func (q *TransactionRecordQuery) SetTransactionID(transactionID TransactionID) *TransactionRecordQuery

SetTransactionID sets the TransactionID for this TransactionRecordQuery.

type TransactionResponse

type TransactionResponse struct {
	TransactionID          TransactionID
	ScheduledTransactionId TransactionID // nolint
	NodeID                 AccountID
	Hash                   []byte
	ValidateStatus         bool
}

When the client sends the node a transaction of any kind, the node replies with this, which simply says that the transaction passed the precheck (so the node will submit it to the network) or it failed (so it won't). If the fee offered was insufficient, this will also contain the amount of the required fee. To learn the consensus result, the client should later obtain a receipt (free), or can buy a more detailed record (not free).

func TransactionExecute added in v2.2.0

func TransactionExecute(transaction interface{}, client *Client) (TransactionResponse, error)

func (TransactionResponse) GetReceipt

func (response TransactionResponse) GetReceipt(client *Client) (TransactionReceipt, error)

GetReceipt retrieves the receipt for the transaction

func (TransactionResponse) GetReceiptQuery added in v2.14.0

func (response TransactionResponse) GetReceiptQuery() *TransactionReceiptQuery

GetReceiptQuery retrieves the receipt query for the transaction

func (TransactionResponse) GetRecord

func (response TransactionResponse) GetRecord(client *Client) (TransactionRecord, error)

GetRecord retrieves the record for the transaction

func (TransactionResponse) GetRecordQuery added in v2.14.0

func (response TransactionResponse) GetRecordQuery() *TransactionRecordQuery

GetRecordQuery retrieves the record query for the transaction

func (TransactionResponse) GetValidateStatus added in v2.17.5

func (response TransactionResponse) GetValidateStatus() bool

GetValidateStatus returns the validate status for the transaction

func (TransactionResponse) MarshalJSON added in v2.31.0

func (response TransactionResponse) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON representation of the TransactionResponse. This should yield the same result in all SDK's.

func (TransactionResponse) SetValidateStatus added in v2.17.5

func (response TransactionResponse) SetValidateStatus(validate bool) *TransactionResponse

SetValidateStatus sets the validate status for the transaction

type TransactionSigner

type TransactionSigner func(message []byte) []byte

TransactionSigner is a closure or function that defines how transactions will be signed

type Transfer

type Transfer struct {
	AccountID  AccountID
	Amount     Hbar
	IsApproved bool
}

Transfer is a transfer of hbars or tokens from one account to another

type TransferTransaction

type TransferTransaction struct {
	Transaction
	// contains filtered or unexported fields
}

TransferTransaction Transfers cryptocurrency among two or more accounts by making the desired adjustments to their balances. Each transfer list can specify up to 10 adjustments. Each negative amount is withdrawn from the corresponding account (a sender), and each positive one is added to the corresponding account (a receiver). The amounts list must sum to zero. Each amount is a number of tinybars (there are 100,000,000 tinybars in one hbar). If any sender account fails to have sufficient hbars, then the entire transaction fails, and none of those transfers occur, though the transaction fee is still charged. This transaction must be signed by the keys for all the sending accounts, and for any receiving accounts that have receiverSigRequired == true. The signatures are in the same order as the accounts, skipping those accounts that don't need a signature.

func NewTransferTransaction

func NewTransferTransaction() *TransferTransaction

NewTransferTransaction creates TransferTransaction which transfers cryptocurrency among two or more accounts by making the desired adjustments to their balances. Each transfer list can specify up to 10 adjustments. Each negative amount is withdrawn from the corresponding account (a sender), and each positive one is added to the corresponding account (a receiver). The amounts list must sum to zero. Each amount is a number of tinybars (there are 100,000,000 tinybars in one hbar). If any sender account fails to have sufficient hbars, then the entire transaction fails, and none of those transfers occur, though the transaction fee is still charged. This transaction must be signed by the keys for all the sending accounts, and for any receiving accounts that have receiverSigRequired == true. The signatures are in the same order as the accounts, skipping those accounts that don't need a signature.

func (*TransferTransaction) AddApprovedHbarTransfer added in v2.12.0

func (tx *TransferTransaction) AddApprovedHbarTransfer(accountID AccountID, amount Hbar, approve bool) *TransferTransaction

AddHbarTransferWithDecimals adds an approved hbar transfer

func (*TransferTransaction) AddApprovedNftTransfer added in v2.12.0

func (tx *TransferTransaction) AddApprovedNftTransfer(nftID NftID, sender AccountID, receiver AccountID, approve bool) *TransferTransaction

AddNftTransfer adds an approved nft transfer

func (*TransferTransaction) AddApprovedTokenTransfer added in v2.12.0

func (tx *TransferTransaction) AddApprovedTokenTransfer(tokenID TokenID, accountID AccountID, value int64, approve bool) *TransferTransaction

AddHbarTransfer adds an approved hbar transfer

func (*TransferTransaction) AddApprovedTokenTransferWithDecimals added in v2.12.0

func (tx *TransferTransaction) AddApprovedTokenTransferWithDecimals(tokenID TokenID, accountID AccountID, value int64, decimal uint32, approve bool) *TransferTransaction

AddHbarTransfer adds an approved hbar transfer with decimals

func (*TransferTransaction) AddHbarTransfer

func (tx *TransferTransaction) AddHbarTransfer(accountID AccountID, amount Hbar) *TransferTransaction

AddHbarTransfer Sets The desired hbar balance adjustments

func (*TransferTransaction) AddNftTransfer added in v2.1.11

func (tx *TransferTransaction) AddNftTransfer(nftID NftID, sender AccountID, receiver AccountID) *TransferTransaction

AddNftTransfer Sets the desired nft token unit balance adjustments Applicable to tokens of type NON_FUNGIBLE_UNIQUE.

func (*TransferTransaction) AddSignature added in v2.1.3

func (tx *TransferTransaction) AddSignature(publicKey PublicKey, signature []byte) *TransferTransaction

AddSignature adds a signature to the transaction.

func (*TransferTransaction) AddTokenTransfer

func (tx *TransferTransaction) AddTokenTransfer(tokenID TokenID, accountID AccountID, value int64) *TransferTransaction

AddTokenTransfer Sets the desired token unit balance adjustments Applicable to tokens of type FUNGIBLE_COMMON.

func (*TransferTransaction) AddTokenTransferWithDecimals added in v2.7.0

func (tx *TransferTransaction) AddTokenTransferWithDecimals(tokenID TokenID, accountID AccountID, value int64, decimal uint32) *TransferTransaction

AddTokenTransferWithDecimals Sets the desired token unit balance adjustments with decimals

func (*TransferTransaction) Execute

func (tx *TransferTransaction) Execute(client *Client) (TransactionResponse, error)

func (*TransferTransaction) Freeze

func (*TransferTransaction) FreezeWith

func (tx *TransferTransaction) FreezeWith(client *Client) (*TransferTransaction, error)

func (*TransferTransaction) GetGrpcDeadline added in v2.34.0

func (e *TransferTransaction) GetGrpcDeadline() *time.Duration

GetGrpcDeadline returns the grpc deadline

func (*TransferTransaction) GetHbarTransfers

func (tx *TransferTransaction) GetHbarTransfers() map[AccountID]Hbar

GetHbarTransfers returns the hbar transfers

func (*TransferTransaction) GetLogLevel added in v2.34.0

func (e *TransferTransaction) GetLogLevel() *LogLevel

func (*TransferTransaction) GetMaxBackoff added in v2.1.16

func (e *TransferTransaction) GetMaxBackoff() time.Duration

func (*TransferTransaction) GetMaxRetry added in v2.34.0

func (e *TransferTransaction) GetMaxRetry() int

GetMaxRetry returns the max number of errors before execution will fail.

func (*TransferTransaction) GetMinBackoff added in v2.1.16

func (e *TransferTransaction) GetMinBackoff() time.Duration

func (*TransferTransaction) GetNftTransfers added in v2.1.11

func (tx *TransferTransaction) GetNftTransfers() map[TokenID][]TokenNftTransfer

GetNftTransfers returns the nft transfers

func (*TransferTransaction) GetNodeAccountIDs

func (e *TransferTransaction) GetNodeAccountIDs() []AccountID

GetNodeAccountID returns the node AccountID for this transaction.

func (*TransferTransaction) GetTokenIDDecimals added in v2.7.0

func (tx *TransferTransaction) GetTokenIDDecimals() map[TokenID]uint32

GetTokenIDDecimals returns the token decimals

func (*TransferTransaction) GetTokenTransfers

func (tx *TransferTransaction) GetTokenTransfers() map[TokenID][]TokenTransfer

GetTokenTransfers returns the token transfers

func (*TransferTransaction) Schedule added in v2.1.5

func (*TransferTransaction) SetGrpcDeadline added in v2.11.0

func (tx *TransferTransaction) SetGrpcDeadline(deadline *time.Duration) *TransferTransaction

When execution is attempted, a single attempt will timeout when this deadline is reached. (The SDK may subsequently retry the execution.)

func (*TransferTransaction) SetHbarTransferApproval added in v2.9.0

func (tx *TransferTransaction) SetHbarTransferApproval(spenderAccountID AccountID, approval bool) *TransferTransaction

SetHbarTransferApproval Sets the desired hbar balance adjustments

func (*TransferTransaction) SetLogLevel added in v2.25.0

func (tx *TransferTransaction) SetLogLevel(level LogLevel) *TransferTransaction

func (*TransferTransaction) SetMaxBackoff added in v2.1.16

func (tx *TransferTransaction) SetMaxBackoff(max time.Duration) *TransferTransaction

SetMaxBackoff The maximum amount of time to wait between retries. Every retry attempt will increase the wait time exponentially until it reaches this time.

func (*TransferTransaction) SetMaxRetry added in v2.1.2

func (tx *TransferTransaction) SetMaxRetry(count int) *TransferTransaction

SetMaxRetry sets the max number of errors before execution will fail.

func (*TransferTransaction) SetMaxTransactionFee

func (tx *TransferTransaction) SetMaxTransactionFee(fee Hbar) *TransferTransaction

SetMaxTransactionFee sets the max transaction fee for this TransferTransaction.

func (*TransferTransaction) SetMinBackoff added in v2.1.16

func (tx *TransferTransaction) SetMinBackoff(min time.Duration) *TransferTransaction

SetMinBackoff sets the minimum amount of time to wait between retries.

func (*TransferTransaction) SetNftTransferApproval added in v2.9.0

func (tx *TransferTransaction) SetNftTransferApproval(nftID NftID, approval bool) *TransferTransaction

SetNftTransferApproval Sets the desired nft token unit balance adjustments

func (*TransferTransaction) SetNodeAccountIDs

func (tx *TransferTransaction) SetNodeAccountIDs(nodeID []AccountID) *TransferTransaction

SetNodeAccountIDs sets the _Node AccountID for this TransferTransaction.

func (*TransferTransaction) SetRegenerateTransactionID added in v2.8.0

func (tx *TransferTransaction) SetRegenerateTransactionID(regenerateTransactionID bool) *TransferTransaction

SetRegenerateTransactionID sets if transaction IDs should be regenerated when `TRANSACTION_EXPIRED` is received

func (*TransferTransaction) SetTokenTransferApproval added in v2.9.0

func (tx *TransferTransaction) SetTokenTransferApproval(tokenID TokenID, accountID AccountID, approval bool) *TransferTransaction

SetTokenTransferApproval Sets the desired token unit balance adjustments

func (*TransferTransaction) SetTransactionID

func (tx *TransferTransaction) SetTransactionID(transactionID TransactionID) *TransferTransaction

SetTransactionID sets the TransactionID for this TransferTransaction.

func (*TransferTransaction) SetTransactionMemo

func (tx *TransferTransaction) SetTransactionMemo(memo string) *TransferTransaction

SetTransactionMemo sets the memo for this TransferTransaction.

func (*TransferTransaction) SetTransactionValidDuration

func (tx *TransferTransaction) SetTransactionValidDuration(duration time.Duration) *TransferTransaction

SetTransactionValidDuration sets the valid duration for this TransferTransaction.

func (*TransferTransaction) Sign

func (tx *TransferTransaction) Sign(privateKey PrivateKey) *TransferTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TransferTransaction) SignWith

func (tx *TransferTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TransferTransaction

SignWith executes the TransactionSigner and adds the resulting signature data to the Transaction's signature map with the publicKey as the map key.

func (*TransferTransaction) SignWithOperator

func (tx *TransferTransaction) SignWithOperator(client *Client) (*TransferTransaction, error)

SignWithOperator signs the transaction with client's operator privateKey.

Source Files

Jump to

Keyboard shortcuts

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