hedera

package module
v2.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 40 Imported by: 0

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

Running Integration Tests

$ env CONFIG_FILE="<your_config_file>" go test -v _Execute

or

$ env CONFIG_FILE="<your_config_file>" OPERATOR_KEY="<key>" OPERATOR_ID="<id>" go test -v _Execute

or

$ env OPERATOR_KEY="<key>" OPERATOR_ID="<id>" go test -v _Execute

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

Contributing to this Project

We welcome participation from all developers! For instructions on how to contribute to this repo, please review the Contributing Guide.

License Information

Licensed under Apache License, Version 2.0 – see LICENSE in this repo or apache.org/licenses/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"),
}
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 TransactionFromBytes

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

Types

type AccountBalance

type AccountBalance struct {
	Hbars Hbar
	Token map[TokenID]uint64
}

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 (query *AccountBalanceQuery) Execute(client *Client) (AccountBalance, error)

func (*AccountBalanceQuery) GetAccountID

func (query *AccountBalanceQuery) GetAccountID() AccountID

func (*AccountBalanceQuery) GetContractID

func (query *AccountBalanceQuery) GetContractID() ContractID

func (*AccountBalanceQuery) GetCost

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

func (*AccountBalanceQuery) SetAccountID

func (query *AccountBalanceQuery) SetAccountID(id 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 (query *AccountBalanceQuery) SetContractID(id 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) SetMaxQueryPayment

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

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*AccountBalanceQuery) SetMaxRetry added in v2.1.2

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

func (*AccountBalanceQuery) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this AccountBalanceQuery.

func (*AccountBalanceQuery) SetQueryPayment

func (query *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 (transaction *AccountCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *AccountCreateTransaction

func (*AccountCreateTransaction) Execute

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

Execute executes the Transaction with the provided client

func (*AccountCreateTransaction) Freeze

func (transaction *AccountCreateTransaction) Freeze() (*AccountCreateTransaction, error)

func (*AccountCreateTransaction) FreezeWith

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

func (*AccountCreateTransaction) GetAutoRenewPeriod

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

func (*AccountCreateTransaction) GetInitialBalance

func (transaction *AccountCreateTransaction) GetInitialBalance() Hbar

func (*AccountCreateTransaction) GetKey

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

func (*AccountCreateTransaction) GetMaxTransactionFee

func (transaction *AccountCreateTransaction) GetMaxTransactionFee() Hbar

func (*AccountCreateTransaction) GetProxyAccountID

func (transaction *AccountCreateTransaction) GetProxyAccountID() AccountID

func (*AccountCreateTransaction) GetReceiverSignatureRequired

func (transaction *AccountCreateTransaction) GetReceiverSignatureRequired() bool

func (*AccountCreateTransaction) GetTransactionID

func (transaction *AccountCreateTransaction) GetTransactionID() TransactionID

func (*AccountCreateTransaction) GetTransactionMemo

func (transaction *AccountCreateTransaction) GetTransactionMemo() string

func (*AccountCreateTransaction) GetTransactionValidDuration

func (transaction *AccountCreateTransaction) GetTransactionValidDuration() time.Duration

func (*AccountCreateTransaction) IsFrozen

func (transaction *AccountCreateTransaction) IsFrozen() bool

func (*AccountCreateTransaction) Schedule added in v2.1.5

func (transaction *AccountCreateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*AccountCreateTransaction) SetAutoRenewPeriod

func (transaction *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) SetInitialBalance

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

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

func (*AccountCreateTransaction) SetKey

func (transaction *AccountCreateTransaction) SetKey(key Key) *AccountCreateTransaction

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) SetMaxRetry added in v2.1.2

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

func (*AccountCreateTransaction) SetMaxTransactionFee

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

SetMaxTransactionFee sets the max transaction fee for this AccountCreateTransaction.

func (*AccountCreateTransaction) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this AccountCreateTransaction.

func (*AccountCreateTransaction) SetProxyAccountID

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

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 (transaction *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) SetTransactionID

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

SetTransactionID sets the TransactionID for this AccountCreateTransaction.

func (*AccountCreateTransaction) SetTransactionMemo

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

SetTransactionMemo sets the memo for this AccountCreateTransaction.

func (*AccountCreateTransaction) SetTransactionValidDuration

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

SetTransactionValidDuration sets the valid duration for this AccountCreateTransaction.

func (*AccountCreateTransaction) Sign

func (transaction *AccountCreateTransaction) Sign(
	privateKey PrivateKey,
) *AccountCreateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*AccountCreateTransaction) SignWith

func (transaction *AccountCreateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *AccountCreateTransaction

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 (transaction *AccountCreateTransaction) SignWithOperator(
	client *Client,
) (*AccountCreateTransaction, error)

type AccountDeleteTransaction

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

AccountDeleteTransaction 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 NewAccountDeleteTransaction

func NewAccountDeleteTransaction() *AccountDeleteTransaction

func (*AccountDeleteTransaction) AddSignature added in v2.1.3

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

func (*AccountDeleteTransaction) Execute

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

Execute executes the Transaction with the provided client

func (*AccountDeleteTransaction) Freeze

func (transaction *AccountDeleteTransaction) Freeze() (*AccountDeleteTransaction, error)

func (*AccountDeleteTransaction) FreezeWith

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

func (*AccountDeleteTransaction) GetAccountID

func (transaction *AccountDeleteTransaction) GetAccountID() AccountID

func (*AccountDeleteTransaction) GetMaxTransactionFee

func (transaction *AccountDeleteTransaction) GetMaxTransactionFee() Hbar

func (*AccountDeleteTransaction) GetTransactionID

func (transaction *AccountDeleteTransaction) GetTransactionID() TransactionID

func (*AccountDeleteTransaction) GetTransactionMemo

func (transaction *AccountDeleteTransaction) GetTransactionMemo() string

func (*AccountDeleteTransaction) GetTransactionValidDuration

func (transaction *AccountDeleteTransaction) GetTransactionValidDuration() time.Duration

func (*AccountDeleteTransaction) GetTransferAccountID

func (transaction *AccountDeleteTransaction) GetTransferAccountID(transferAccountID AccountID) AccountID

func (*AccountDeleteTransaction) IsFrozen

func (transaction *AccountDeleteTransaction) IsFrozen() bool

func (*AccountDeleteTransaction) Schedule added in v2.1.5

func (transaction *AccountDeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*AccountDeleteTransaction) SetAccountID

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

SetNodeAccountID sets the node AccountID for this AccountCreateTransaction.

func (*AccountDeleteTransaction) SetMaxRetry added in v2.1.2

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

func (*AccountDeleteTransaction) SetMaxTransactionFee

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

SetMaxTransactionFee sets the max transaction fee for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetTransactionID

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

SetTransactionID sets the TransactionID for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetTransactionMemo

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

SetTransactionMemo sets the memo for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetTransactionValidDuration

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

SetTransactionValidDuration sets the valid duration for this AccountDeleteTransaction.

func (*AccountDeleteTransaction) SetTransferAccountID

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

SetTransferAccountID sets the AccountID which will receive all remaining hbars.

func (*AccountDeleteTransaction) Sign

func (transaction *AccountDeleteTransaction) Sign(
	privateKey PrivateKey,
) *AccountDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*AccountDeleteTransaction) SignWith

func (transaction *AccountDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *AccountDeleteTransaction

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 (transaction *AccountDeleteTransaction) SignWithOperator(
	client *Client,
) (*AccountDeleteTransaction, error)

type AccountID

type AccountID struct {
	Shard   uint64
	Realm   uint64
	Account uint64
}

AccountID is the ID for a Hedera account

func AccountIDFromBytes added in v2.1.3

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

func AccountIDFromSolidityAddress

func AccountIDFromSolidityAddress(s string) (AccountID, error)

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

func AccountIDFromString

func AccountIDFromString(s string) (AccountID, error)

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

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

func (AccountID) ToSolidityAddress

func (id AccountID) ToSolidityAddress() string

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

func (*AccountID) UnmarshalJSON

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

UnmarshalJSON implements the encoding.JSON interface.

type AccountInfo

type AccountInfo struct {
	AccountID                      AccountID
	ContractAccountID              string
	IsDeleted                      bool
	ProxyAccountID                 AccountID
	ProxyReceived                  Hbar
	Key                            Key
	Balance                        Hbar
	GenerateSendRecordThreshold    Hbar
	GenerateReceiveRecordThreshold Hbar
	ReceiverSigRequired            bool
	ExpirationTime                 time.Time
	AutoRenewPeriod                time.Duration
	TokenRelationships             []*TokenRelationship
	AccountMemo                    string
}

AccountInfo is info about the account returned from an AccountInfoQuery

func AccountInfoFromBytes added in v2.1.3

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

func (AccountInfo) ToBytes added in v2.1.3

func (info AccountInfo) ToBytes() []byte

type AccountInfoQuery

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

func NewAccountInfoQuery

func NewAccountInfoQuery() *AccountInfoQuery

func (*AccountInfoQuery) Execute

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

func (*AccountInfoQuery) GetAccountID

func (query *AccountInfoQuery) GetAccountID() AccountID

func (*AccountInfoQuery) GetCost

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

func (*AccountInfoQuery) SetAccountID

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

SetAccountID sets the AccountID for this AccountInfoQuery.

func (*AccountInfoQuery) SetMaxQueryPayment

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

SetMaxQueryPayment sets the maximum payment allowable for this query.

func (*AccountInfoQuery) SetMaxRetry added in v2.1.2

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

func (*AccountInfoQuery) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this AccountInfoQuery.

func (*AccountInfoQuery) SetQueryPayment

func (query *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 (query *AccountRecordsQuery) Execute(client *Client) ([]TransactionRecord, error)

func (*AccountRecordsQuery) GetAccountID

func (query *AccountRecordsQuery) GetAccountID() AccountID

func (*AccountRecordsQuery) GetCost

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

func (*AccountRecordsQuery) SetAccountID

func (query *AccountRecordsQuery) SetAccountID(id AccountID) *AccountRecordsQuery

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

func (*AccountRecordsQuery) SetMaxQueryPayment

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

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*AccountRecordsQuery) SetMaxRetry added in v2.1.2

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

func (*AccountRecordsQuery) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this AccountRecordsQuery.

func (*AccountRecordsQuery) SetQueryPayment

func (query *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 (query *AccountStakersQuery) Execute(client *Client) ([]Transfer, error)

func (*AccountStakersQuery) GetAccountID

func (query *AccountStakersQuery) GetAccountID() AccountID

func (*AccountStakersQuery) GetCost

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

func (*AccountStakersQuery) SetAccountID

func (query *AccountStakersQuery) SetAccountID(id AccountID) *AccountStakersQuery

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

func (*AccountStakersQuery) SetMaxQueryPayment

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

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*AccountStakersQuery) SetMaxRetry added in v2.1.2

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

func (*AccountStakersQuery) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this AccountStakersQuery.

func (*AccountStakersQuery) SetQueryPayment

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

SetQueryPayment sets the payment amount for this Query.

type AccountUpdateTransaction

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

func NewAccountUpdateTransaction

func NewAccountUpdateTransaction() *AccountUpdateTransaction

func (*AccountUpdateTransaction) AddSignature added in v2.1.3

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

func (*AccountUpdateTransaction) Execute

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

Execute executes the Transaction with the provided client

func (*AccountUpdateTransaction) Freeze

func (transaction *AccountUpdateTransaction) Freeze() (*AccountUpdateTransaction, error)

func (*AccountUpdateTransaction) FreezeWith

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

func (*AccountUpdateTransaction) GeAccountMemo added in v2.1.5

func (transaction *AccountUpdateTransaction) GeAccountMemo() string

func (*AccountUpdateTransaction) GetAccountID

func (transaction *AccountUpdateTransaction) GetAccountID() AccountID

func (*AccountUpdateTransaction) GetAutoRenewPeriod

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

func (*AccountUpdateTransaction) GetExpirationTime

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

Sets the new expiration time to extend to (ignored if equal to or before the current one).

func (*AccountUpdateTransaction) GetKey

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

func (*AccountUpdateTransaction) GetMaxTransactionFee

func (transaction *AccountUpdateTransaction) GetMaxTransactionFee() Hbar

func (*AccountUpdateTransaction) GetProxyAccountID

func (transaction *AccountUpdateTransaction) GetProxyAccountID() AccountID

func (*AccountUpdateTransaction) GetReceiverSignatureRequired

func (transaction *AccountUpdateTransaction) GetReceiverSignatureRequired() bool

func (*AccountUpdateTransaction) GetTransactionID

func (transaction *AccountUpdateTransaction) GetTransactionID() TransactionID

func (*AccountUpdateTransaction) GetTransactionMemo

func (transaction *AccountUpdateTransaction) GetTransactionMemo() string

func (*AccountUpdateTransaction) GetTransactionValidDuration

func (transaction *AccountUpdateTransaction) GetTransactionValidDuration() time.Duration

func (*AccountUpdateTransaction) IsFrozen

func (transaction *AccountUpdateTransaction) IsFrozen() bool

func (*AccountUpdateTransaction) Schedule added in v2.1.5

func (transaction *AccountUpdateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*AccountUpdateTransaction) SetAccountID

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

Sets the account ID which is being updated in this transaction.

func (*AccountUpdateTransaction) SetAccountMemo added in v2.1.5

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

func (*AccountUpdateTransaction) SetAutoRenewPeriod

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

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

func (*AccountUpdateTransaction) SetExpirationTime

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

func (*AccountUpdateTransaction) SetKey

func (transaction *AccountUpdateTransaction) SetKey(key Key) *AccountUpdateTransaction

Sets the new key.

func (*AccountUpdateTransaction) SetMaxRetry added in v2.1.2

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

func (*AccountUpdateTransaction) SetMaxTransactionFee

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

SetMaxTransactionFee sets the max transaction fee for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) SetProxyAccountID

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

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

func (*AccountUpdateTransaction) SetReceiverSignatureRequired

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

func (*AccountUpdateTransaction) SetTransactionID

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

SetTransactionID sets the TransactionID for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) SetTransactionMemo

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

SetTransactionMemo sets the memo for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) SetTransactionValidDuration

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

SetTransactionValidDuration sets the valid duration for this AccountUpdateTransaction.

func (*AccountUpdateTransaction) Sign

func (transaction *AccountUpdateTransaction) Sign(
	privateKey PrivateKey,
) *AccountUpdateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*AccountUpdateTransaction) SignWith

func (transaction *AccountUpdateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *AccountUpdateTransaction

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 (transaction *AccountUpdateTransaction) SignWithOperator(
	client *Client,
) (*AccountUpdateTransaction, error)

type Argument

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

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)

func ClientForNetwork

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

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) Close

func (client *Client) Close() error

Close is used to disconnect the Client from the network

func (*Client) GetMirrorNetwork

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

func (*Client) GetNetwork

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

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) 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) 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 the Client with a new set of nodes. (e.g. for an Address Book update).

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.

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 (query *ContractBytecodeQuery) Execute(client *Client) ([]byte, error)

func (*ContractBytecodeQuery) GetContractID

func (query *ContractBytecodeQuery) GetContractID() ContractID

func (*ContractBytecodeQuery) GetCost

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

func (*ContractBytecodeQuery) SetContractID

func (query *ContractBytecodeQuery) SetContractID(id ContractID) *ContractBytecodeQuery

SetContractID sets the contract for which the bytecode is requested

func (*ContractBytecodeQuery) SetMaxQueryPayment

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

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ContractBytecodeQuery) SetMaxRetry added in v2.1.2

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

func (*ContractBytecodeQuery) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this ContractBytecodeQuery.

func (*ContractBytecodeQuery) SetQueryPayment

func (query *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 (query *ContractCallQuery) Execute(client *Client) (ContractFunctionResult, error)

func (*ContractCallQuery) GetContractID

func (query *ContractCallQuery) GetContractID() ContractID

func (*ContractCallQuery) GetCost

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

func (*ContractCallQuery) GetFunctionParameters

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

func (*ContractCallQuery) GetGas

func (query *ContractCallQuery) GetGas() uint64

func (*ContractCallQuery) SetContractID

func (query *ContractCallQuery) SetContractID(id ContractID) *ContractCallQuery

SetContractID sets the contract instance to call

func (*ContractCallQuery) SetFunction

func (query *ContractCallQuery) SetFunction(name string, params *ContractFunctionParameters) *ContractCallQuery

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

func (*ContractCallQuery) SetFunctionParameters

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

func (*ContractCallQuery) SetGas

func (query *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) SetMaxQueryPayment

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

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ContractCallQuery) SetMaxResultSize

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

SetMaxResultSize sets the max number of bytes that the result might include. The run will fail if it would have returned more than this number of bytes.

func (*ContractCallQuery) SetMaxRetry added in v2.1.2

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

func (*ContractCallQuery) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this ContractCallQuery.

func (*ContractCallQuery) SetQueryPayment

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

SetQueryPayment sets the payment amount for this Query.

type ContractCreateTransaction

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

func NewContractCreateTransaction

func NewContractCreateTransaction() *ContractCreateTransaction

func (*ContractCreateTransaction) AddSignature added in v2.1.3

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

func (*ContractCreateTransaction) Execute

func (transaction *ContractCreateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*ContractCreateTransaction) Freeze

func (transaction *ContractCreateTransaction) Freeze() (*ContractCreateTransaction, error)

func (*ContractCreateTransaction) FreezeWith

func (transaction *ContractCreateTransaction) FreezeWith(client *Client) (*ContractCreateTransaction, error)

func (*ContractCreateTransaction) GetAdminKey

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

func (*ContractCreateTransaction) GetAutoRenewPeriod

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

func (*ContractCreateTransaction) GetBytecodeFileID

func (transaction *ContractCreateTransaction) GetBytecodeFileID() FileID

func (*ContractCreateTransaction) GetConstructorParameters

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

func (*ContractCreateTransaction) GetContractMemo

func (transaction *ContractCreateTransaction) GetContractMemo() string

func (*ContractCreateTransaction) GetGas

func (transaction *ContractCreateTransaction) GetGas() uint64

func (*ContractCreateTransaction) GetInitialBalance

func (transaction *ContractCreateTransaction) GetInitialBalance() Hbar

GetInitialBalance gets the initial number of Hbar in the account

func (*ContractCreateTransaction) GetMaxTransactionFee

func (transaction *ContractCreateTransaction) GetMaxTransactionFee() Hbar

func (*ContractCreateTransaction) GetProxyAccountID

func (transaction *ContractCreateTransaction) GetProxyAccountID() AccountID

func (*ContractCreateTransaction) GetTransactionID

func (transaction *ContractCreateTransaction) GetTransactionID() TransactionID

func (*ContractCreateTransaction) GetTransactionMemo

func (transaction *ContractCreateTransaction) GetTransactionMemo() string

func (*ContractCreateTransaction) GetTransactionValidDuration

func (transaction *ContractCreateTransaction) GetTransactionValidDuration() time.Duration

func (*ContractCreateTransaction) IsFrozen

func (transaction *ContractCreateTransaction) IsFrozen() bool

func (*ContractCreateTransaction) Schedule added in v2.1.5

func (transaction *ContractCreateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*ContractCreateTransaction) SetAdminKey

func (transaction *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) SetAutoRenewPeriod

func (transaction *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) SetBytecodeFileID

func (transaction *ContractCreateTransaction) SetBytecodeFileID(bytecodeFileID FileID) *ContractCreateTransaction

func (*ContractCreateTransaction) SetConstructorParameters

func (transaction *ContractCreateTransaction) SetConstructorParameters(params *ContractFunctionParameters) *ContractCreateTransaction

Sets the constructor parameters

func (*ContractCreateTransaction) SetConstructorParametersRaw

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

Sets the constructor parameters as their raw bytes.

func (*ContractCreateTransaction) SetContractMemo

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

Sets the memo to be associated with this contract.

func (*ContractCreateTransaction) SetGas

Sets the gas to run the constructor.

func (*ContractCreateTransaction) SetInitialBalance

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

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

func (*ContractCreateTransaction) SetMaxRetry added in v2.1.2

func (transaction *ContractCreateTransaction) SetMaxRetry(count int) *ContractCreateTransaction

func (*ContractCreateTransaction) SetMaxTransactionFee

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

SetMaxTransactionFee sets the max transaction fee for this ContractCreateTransaction.

func (*ContractCreateTransaction) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this ContractCreateTransaction.

func (*ContractCreateTransaction) SetProxyAccountID

func (transaction *ContractCreateTransaction) SetProxyAccountID(ID AccountID) *ContractCreateTransaction

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) SetTransactionID

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

SetTransactionID sets the TransactionID for this ContractCreateTransaction.

func (*ContractCreateTransaction) SetTransactionMemo

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

SetTransactionMemo sets the memo for this ContractCreateTransaction.

func (*ContractCreateTransaction) SetTransactionValidDuration

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

SetTransactionValidDuration sets the valid duration for this ContractCreateTransaction.

func (*ContractCreateTransaction) Sign

func (transaction *ContractCreateTransaction) Sign(
	privateKey PrivateKey,
) *ContractCreateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*ContractCreateTransaction) SignWith

func (transaction *ContractCreateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *ContractCreateTransaction

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 (transaction *ContractCreateTransaction) SignWithOperator(
	client *Client,
) (*ContractCreateTransaction, error)

type ContractDeleteTransaction

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

func NewContractDeleteTransaction

func NewContractDeleteTransaction() *ContractDeleteTransaction

func (*ContractDeleteTransaction) AddSignature added in v2.1.3

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

func (*ContractDeleteTransaction) Execute

func (transaction *ContractDeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*ContractDeleteTransaction) Freeze

func (transaction *ContractDeleteTransaction) Freeze() (*ContractDeleteTransaction, error)

func (*ContractDeleteTransaction) FreezeWith

func (transaction *ContractDeleteTransaction) FreezeWith(client *Client) (*ContractDeleteTransaction, error)

func (*ContractDeleteTransaction) GetContractID

func (transaction *ContractDeleteTransaction) GetContractID() ContractID

func (*ContractDeleteTransaction) GetMaxTransactionFee

func (transaction *ContractDeleteTransaction) GetMaxTransactionFee() Hbar

func (*ContractDeleteTransaction) GetTransactionID

func (transaction *ContractDeleteTransaction) GetTransactionID() TransactionID

func (*ContractDeleteTransaction) GetTransactionMemo

func (transaction *ContractDeleteTransaction) GetTransactionMemo() string

func (*ContractDeleteTransaction) GetTransactionValidDuration

func (transaction *ContractDeleteTransaction) GetTransactionValidDuration() time.Duration

func (*ContractDeleteTransaction) GetTransferAccountID

func (transaction *ContractDeleteTransaction) GetTransferAccountID() AccountID

func (*ContractDeleteTransaction) GetTransferContractID

func (transaction *ContractDeleteTransaction) GetTransferContractID() ContractID

func (*ContractDeleteTransaction) IsFrozen

func (transaction *ContractDeleteTransaction) IsFrozen() bool

func (*ContractDeleteTransaction) Schedule added in v2.1.5

func (transaction *ContractDeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*ContractDeleteTransaction) SetContractID

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

Sets the contract ID which should be deleted.

func (*ContractDeleteTransaction) SetMaxRetry added in v2.1.2

func (transaction *ContractDeleteTransaction) SetMaxRetry(count int) *ContractDeleteTransaction

func (*ContractDeleteTransaction) SetMaxTransactionFee

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

SetMaxTransactionFee sets the max transaction fee for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetTransactionID

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

SetTransactionID sets the TransactionID for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetTransactionMemo

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

SetTransactionMemo sets the memo for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetTransactionValidDuration

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

SetTransactionValidDuration sets the valid duration for this ContractDeleteTransaction.

func (*ContractDeleteTransaction) SetTransferAccountID

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

Sets the account ID which will receive all remaining hbars.

func (*ContractDeleteTransaction) SetTransferContractID

func (transaction *ContractDeleteTransaction) SetTransferContractID(contractID ContractID) *ContractDeleteTransaction

Sets the contract ID which will receive all remaining hbars.

func (*ContractDeleteTransaction) Sign

func (transaction *ContractDeleteTransaction) Sign(
	privateKey PrivateKey,
) *ContractDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*ContractDeleteTransaction) SignWith

func (transaction *ContractDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *ContractDeleteTransaction

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 (transaction *ContractDeleteTransaction) SignWithOperator(
	client *Client,
) (*ContractDeleteTransaction, error)

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 this 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 (transaction *ContractExecuteTransaction) AddSignature(publicKey PublicKey, signature []byte) *ContractExecuteTransaction

func (*ContractExecuteTransaction) Execute

func (transaction *ContractExecuteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*ContractExecuteTransaction) Freeze

func (*ContractExecuteTransaction) FreezeWith

func (transaction *ContractExecuteTransaction) FreezeWith(client *Client) (*ContractExecuteTransaction, error)

func (ContractExecuteTransaction) GetContractID

func (transaction ContractExecuteTransaction) GetContractID() ContractID

func (*ContractExecuteTransaction) GetFunctionParameters

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

func (*ContractExecuteTransaction) GetGas added in v2.1.3

func (transaction *ContractExecuteTransaction) GetGas() uint64

func (*ContractExecuteTransaction) GetMaxTransactionFee

func (transaction *ContractExecuteTransaction) GetMaxTransactionFee() Hbar

func (ContractExecuteTransaction) GetPayableAmount

func (transaction ContractExecuteTransaction) GetPayableAmount() Hbar

func (*ContractExecuteTransaction) GetTransactionID

func (transaction *ContractExecuteTransaction) GetTransactionID() TransactionID

func (*ContractExecuteTransaction) GetTransactionMemo

func (transaction *ContractExecuteTransaction) GetTransactionMemo() string

func (*ContractExecuteTransaction) GetTransactionValidDuration

func (transaction *ContractExecuteTransaction) GetTransactionValidDuration() time.Duration

func (*ContractExecuteTransaction) IsFrozen

func (transaction *ContractExecuteTransaction) IsFrozen() bool

func (*ContractExecuteTransaction) Schedule added in v2.1.5

func (transaction *ContractExecuteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*ContractExecuteTransaction) SetContractID

func (transaction *ContractExecuteTransaction) SetContractID(ID 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 (transaction *ContractExecuteTransaction) SetFunctionParameters(params []byte) *ContractExecuteTransaction

Sets the function parameters

func (*ContractExecuteTransaction) SetGas

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

func (*ContractExecuteTransaction) SetMaxRetry added in v2.1.2

func (transaction *ContractExecuteTransaction) SetMaxRetry(count int) *ContractExecuteTransaction

func (*ContractExecuteTransaction) SetMaxTransactionFee

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

SetMaxTransactionFee sets the max transaction fee for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) SetNodeAccountIDs

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

SetNodeAccountIDs sets the node AccountID for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) SetPayableAmount

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

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

func (*ContractExecuteTransaction) SetTransactionID

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

SetTransactionID sets the TransactionID for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) SetTransactionMemo

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

SetTransactionMemo sets the memo for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) SetTransactionValidDuration

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

SetTransactionValidDuration sets the valid duration for this ContractExecuteTransaction.

func (*ContractExecuteTransaction) Sign

func (transaction *ContractExecuteTransaction) Sign(
	privateKey PrivateKey,
) *ContractExecuteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*ContractExecuteTransaction) SignWith

func (transaction *ContractExecuteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *ContractExecuteTransaction

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 (transaction *ContractExecuteTransaction) SignWithOperator(
	client *Client,
) (*ContractExecuteTransaction, error)

type ContractFunctionParameters

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

func NewContractFunctionParameters

func NewContractFunctionParameters() *ContractFunctionParameters

func (*ContractFunctionParameters) AddAddress

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

func (*ContractFunctionParameters) AddAddressArray

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

func (*ContractFunctionParameters) AddBool

func (*ContractFunctionParameters) AddBytes

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

func (*ContractFunctionParameters) AddBytes32

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

func (*ContractFunctionParameters) AddBytes32Array

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

func (*ContractFunctionParameters) AddBytesArray

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

func (*ContractFunctionParameters) AddFunction

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

func (*ContractFunctionParameters) AddInt256

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

func (*ContractFunctionParameters) AddInt256Array

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

func (*ContractFunctionParameters) AddInt32

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

func (*ContractFunctionParameters) AddInt32Array

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

func (*ContractFunctionParameters) AddInt64

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

func (*ContractFunctionParameters) AddInt64Array

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

func (*ContractFunctionParameters) AddInt8

func (*ContractFunctionParameters) AddString

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

func (*ContractFunctionParameters) AddStringArray

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

func (*ContractFunctionParameters) AddUint256

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

func (*ContractFunctionParameters) AddUint256Array

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

func (*ContractFunctionParameters) AddUint32

func (contract *ContractFunctionParameters) AddUint32(value uint32) *ContractFunctionParameters

func (*ContractFunctionParameters) AddUint32Array

func (contract *ContractFunctionParameters) AddUint32Array(value []uint32) *ContractFunctionParameters

func (*ContractFunctionParameters) AddUint64

func (contract *ContractFunctionParameters) AddUint64(value uint64) *ContractFunctionParameters

func (*ContractFunctionParameters) AddUint64Array

func (contract *ContractFunctionParameters) AddUint64Array(value []uint64) *ContractFunctionParameters

func (*ContractFunctionParameters) AddUint8

func (contract *ContractFunctionParameters) AddUint8(value uint8) *ContractFunctionParameters

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

	CreatedContractIDs []ContractID
}

ContractFunctionResult is the result returned by a call to a smart contract function. This is The response to a ContractCallQuery, and is in the record for a ContractCallQuery.

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) 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) 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) GetInt64

func (result ContractFunctionResult) GetInt64(index uint64) int64

GetInt64 gets a solidity int64 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) GetString

func (result ContractFunctionResult) GetString(index uint64) string

GetString gets a string 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) GetUint64

func (result ContractFunctionResult) GetUint64(index uint64) uint64

GetUint64 gets a solidity uint64 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

type ContractFunctionSelector

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

func NewContractFunctionSelector

func NewContractFunctionSelector(name string) ContractFunctionSelector

func (*ContractFunctionSelector) AddAddress

func (selector *ContractFunctionSelector) AddAddress() *ContractFunctionSelector

func (*ContractFunctionSelector) AddAddressArray

func (selector *ContractFunctionSelector) AddAddressArray() *ContractFunctionSelector

func (*ContractFunctionSelector) AddBool

func (*ContractFunctionSelector) AddBoolArray

func (selector *ContractFunctionSelector) AddBoolArray() *ContractFunctionSelector

func (*ContractFunctionSelector) AddBytes

func (selector *ContractFunctionSelector) AddBytes() *ContractFunctionSelector

func (*ContractFunctionSelector) AddBytes32

func (selector *ContractFunctionSelector) AddBytes32() *ContractFunctionSelector

func (*ContractFunctionSelector) AddBytes32Array

func (selector *ContractFunctionSelector) AddBytes32Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddBytesArray

func (selector *ContractFunctionSelector) AddBytesArray() *ContractFunctionSelector

func (*ContractFunctionSelector) AddFunction

func (selector *ContractFunctionSelector) AddFunction() *ContractFunctionSelector

func (*ContractFunctionSelector) AddInt256

func (selector *ContractFunctionSelector) AddInt256() *ContractFunctionSelector

func (*ContractFunctionSelector) AddInt256Array

func (selector *ContractFunctionSelector) AddInt256Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddInt32

func (selector *ContractFunctionSelector) AddInt32() *ContractFunctionSelector

func (*ContractFunctionSelector) AddInt32Array

func (selector *ContractFunctionSelector) AddInt32Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddInt64

func (selector *ContractFunctionSelector) AddInt64() *ContractFunctionSelector

func (*ContractFunctionSelector) AddInt64Array

func (selector *ContractFunctionSelector) AddInt64Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddInt8

func (*ContractFunctionSelector) AddInt8Array

func (selector *ContractFunctionSelector) AddInt8Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddString

func (selector *ContractFunctionSelector) AddString() *ContractFunctionSelector

func (*ContractFunctionSelector) AddStringArray

func (selector *ContractFunctionSelector) AddStringArray() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint256

func (selector *ContractFunctionSelector) AddUint256() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint256Array

func (selector *ContractFunctionSelector) AddUint256Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint32

func (selector *ContractFunctionSelector) AddUint32() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint32Array

func (selector *ContractFunctionSelector) AddUint32Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint64

func (selector *ContractFunctionSelector) AddUint64() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint64Array

func (selector *ContractFunctionSelector) AddUint64Array() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint8

func (selector *ContractFunctionSelector) AddUint8() *ContractFunctionSelector

func (*ContractFunctionSelector) AddUint8Array

func (selector *ContractFunctionSelector) AddUint8Array() *ContractFunctionSelector

func (*ContractFunctionSelector) String

func (selector *ContractFunctionSelector) String() string

type ContractID

type ContractID struct {
	Shard    uint64
	Realm    uint64
	Contract uint64
}

ContractID is the ID for a Hedera smart contract

func ContractIDFromBytes added in v2.1.3

func ContractIDFromBytes(data []byte) (ContractID, error)

func ContractIDFromSolidityAddress

func ContractIDFromSolidityAddress(s string) (ContractID, error)

ContractIDFromSolidityAddress constructs a ContractID from a string representation of a solidity address

func ContractIDFromString

func ContractIDFromString(s string) (ContractID, error)

ContractIDFromString constructs a ContractID from a string formatted as `Shard.Realm.Contract` (for example "0.0.3")

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

func (ContractID) ToSolidityAddress

func (id ContractID) ToSolidityAddress() string

ToSolidityAddress returns the string representation of the ContractID as a solidity address.

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
}

func ContractInfoFromBytes added in v2.1.3

func ContractInfoFromBytes(data []byte) (ContractInfo, error)

func (ContractInfo) ToBytes added in v2.1.3

func (contractInfo ContractInfo) ToBytes() []byte

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 (query *ContractInfoQuery) Execute(client *Client) (ContractInfo, error)

func (*ContractInfoQuery) GetContractID

func (query *ContractInfoQuery) GetContractID() ContractID

func (*ContractInfoQuery) GetCost

func (query *ContractInfoQuery) GetCost(client *Client) (Hbar, error)

func (*ContractInfoQuery) SetContractID

func (query *ContractInfoQuery) SetContractID(id ContractID) *ContractInfoQuery

SetContractID sets the contract for which information is requested

func (*ContractInfoQuery) SetMaxQueryPayment

func (query *ContractInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *ContractInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ContractInfoQuery) SetMaxRetry added in v2.1.2

func (query *ContractInfoQuery) SetMaxRetry(count int) *ContractInfoQuery

func (*ContractInfoQuery) SetNodeAccountIDs

func (query *ContractInfoQuery) SetNodeAccountIDs(accountID []AccountID) *ContractInfoQuery

SetNodeAccountIDs sets the node AccountID for this ContractInfoQuery.

func (*ContractInfoQuery) SetQueryPayment

func (query *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 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.

func (*ContractUpdateTransaction) AddSignature added in v2.1.3

func (transaction *ContractUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *ContractUpdateTransaction

func (*ContractUpdateTransaction) Execute

func (transaction *ContractUpdateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*ContractUpdateTransaction) Freeze

func (transaction *ContractUpdateTransaction) Freeze() (*ContractUpdateTransaction, error)

func (*ContractUpdateTransaction) FreezeWith

func (transaction *ContractUpdateTransaction) FreezeWith(client *Client) (*ContractUpdateTransaction, error)

func (*ContractUpdateTransaction) GetAdminKey

func (transaction *ContractUpdateTransaction) GetAdminKey() (Key, error)

func (*ContractUpdateTransaction) GetAutoRenewPeriod

func (transaction *ContractUpdateTransaction) GetAutoRenewPeriod() time.Duration

func (*ContractUpdateTransaction) GetBytecodeFileID

func (transaction *ContractUpdateTransaction) GetBytecodeFileID() FileID

func (*ContractUpdateTransaction) GetContractID

func (transaction *ContractUpdateTransaction) GetContractID() ContractID

func (*ContractUpdateTransaction) GetContractMemo

func (transaction *ContractUpdateTransaction) GetContractMemo() string

func (*ContractUpdateTransaction) GetExpirationTime

func (transaction *ContractUpdateTransaction) GetExpirationTime() time.Time

func (*ContractUpdateTransaction) GetMaxTransactionFee

func (transaction *ContractUpdateTransaction) GetMaxTransactionFee() Hbar

func (*ContractUpdateTransaction) GetProxyAccountID

func (transaction *ContractUpdateTransaction) GetProxyAccountID() AccountID

func (*ContractUpdateTransaction) GetTransactionID

func (transaction *ContractUpdateTransaction) GetTransactionID() TransactionID

func (*ContractUpdateTransaction) GetTransactionMemo

func (transaction *ContractUpdateTransaction) GetTransactionMemo() string

func (*ContractUpdateTransaction) GetTransactionValidDuration

func (transaction *ContractUpdateTransaction) GetTransactionValidDuration() time.Duration

func (*ContractUpdateTransaction) IsFrozen

func (transaction *ContractUpdateTransaction) IsFrozen() bool

func (*ContractUpdateTransaction) Schedule added in v2.1.5

func (transaction *ContractUpdateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*ContractUpdateTransaction) SetAdminKey

func (transaction *ContractUpdateTransaction) SetAdminKey(publicKey PublicKey) *ContractUpdateTransaction

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) SetAutoRenewPeriod

func (transaction *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 (transaction *ContractUpdateTransaction) SetBytecodeFileID(fileID FileID) *ContractUpdateTransaction

SetBytecodeFileID sets the file ID of file containing the smart contract byte code. A copy will be made and held by the contract instance, and have the same expiration time as the instance.

func (*ContractUpdateTransaction) SetContractID

func (transaction *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 (transaction *ContractUpdateTransaction) SetContractMemo(memo string) *ContractUpdateTransaction

SetContractMemo sets the memo associated with the contract (max 100 bytes)

func (*ContractUpdateTransaction) SetExpirationTime

func (transaction *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) SetMaxRetry added in v2.1.2

func (transaction *ContractUpdateTransaction) SetMaxRetry(count int) *ContractUpdateTransaction

func (*ContractUpdateTransaction) SetMaxTransactionFee

func (transaction *ContractUpdateTransaction) SetMaxTransactionFee(fee Hbar) *ContractUpdateTransaction

SetMaxTransactionFee sets the max transaction fee for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) SetNodeAccountIDs

func (transaction *ContractUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *ContractUpdateTransaction

SetNodeAccountID sets the node AccountID for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) SetProxyAccountID

func (transaction *ContractUpdateTransaction) SetProxyAccountID(accountID AccountID) *ContractUpdateTransaction

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) SetTransactionID

func (transaction *ContractUpdateTransaction) SetTransactionID(transactionID TransactionID) *ContractUpdateTransaction

SetTransactionID sets the TransactionID for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) SetTransactionMemo

func (transaction *ContractUpdateTransaction) SetTransactionMemo(memo string) *ContractUpdateTransaction

SetTransactionMemo sets the memo for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) SetTransactionValidDuration

func (transaction *ContractUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *ContractUpdateTransaction

SetTransactionValidDuration sets the valid duration for this ContractUpdateTransaction.

func (*ContractUpdateTransaction) Sign

func (transaction *ContractUpdateTransaction) Sign(
	privateKey PrivateKey,
) *ContractUpdateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*ContractUpdateTransaction) SignWith

func (transaction *ContractUpdateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *ContractUpdateTransaction

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 (transaction *ContractUpdateTransaction) SignWithOperator(
	client *Client,
) (*ContractUpdateTransaction, error)

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
}

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 ErrPingStatus

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

ErrPingStatus is returned by client.Ping(AccountID) if an error occurs

func (ErrPingStatus) Error

func (e ErrPingStatus) Error() string

Error() implements the Error interface

type ExchangeRate

type ExchangeRate struct {
	Hbars int32
	// contains filtered or unexported fields
}

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 (transaction *FileAppendTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileAppendTransaction

func (*FileAppendTransaction) Execute

func (transaction *FileAppendTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*FileAppendTransaction) ExecuteAll added in v2.1.2

func (transaction *FileAppendTransaction) ExecuteAll(
	client *Client,
) ([]TransactionResponse, error)

ExecuteAll executes the all the Transactions with the provided client

func (*FileAppendTransaction) Freeze

func (transaction *FileAppendTransaction) Freeze() (*FileAppendTransaction, error)

func (*FileAppendTransaction) FreezeWith

func (transaction *FileAppendTransaction) FreezeWith(client *Client) (*FileAppendTransaction, error)

func (*FileAppendTransaction) GetContents

func (transaction *FileAppendTransaction) GetContents() []byte

func (*FileAppendTransaction) GetFileID

func (transaction *FileAppendTransaction) GetFileID() FileID

func (*FileAppendTransaction) GetMaxTransactionFee

func (transaction *FileAppendTransaction) GetMaxTransactionFee() Hbar

func (*FileAppendTransaction) GetTransactionID

func (transaction *FileAppendTransaction) GetTransactionID() TransactionID

func (*FileAppendTransaction) GetTransactionMemo

func (transaction *FileAppendTransaction) GetTransactionMemo() string

func (*FileAppendTransaction) GetTransactionValidDuration

func (transaction *FileAppendTransaction) GetTransactionValidDuration() time.Duration

func (*FileAppendTransaction) IsFrozen

func (transaction *FileAppendTransaction) IsFrozen() bool

func (*FileAppendTransaction) Schedule added in v2.1.5

func (transaction *FileAppendTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*FileAppendTransaction) SetContents

func (transaction *FileAppendTransaction) SetContents(contents []byte) *FileAppendTransaction

SetContents sets the bytes to append to the contents of the file.

func (*FileAppendTransaction) SetFileID

func (transaction *FileAppendTransaction) SetFileID(ID FileID) *FileAppendTransaction

SetFileID sets the FileID of the file to which the bytes are appended to.

func (*FileAppendTransaction) SetMaxRetry added in v2.1.2

func (transaction *FileAppendTransaction) SetMaxRetry(count int) *FileAppendTransaction

func (*FileAppendTransaction) SetMaxTransactionFee

func (transaction *FileAppendTransaction) SetMaxTransactionFee(fee Hbar) *FileAppendTransaction

SetMaxTransactionFee sets the max transaction fee for this FileAppendTransaction.

func (*FileAppendTransaction) SetNodeAccountIDs

func (transaction *FileAppendTransaction) SetNodeAccountIDs(nodeID []AccountID) *FileAppendTransaction

SetNodeAccountID sets the node AccountID for this FileAppendTransaction.

func (*FileAppendTransaction) SetTransactionID

func (transaction *FileAppendTransaction) SetTransactionID(transactionID TransactionID) *FileAppendTransaction

SetTransactionID sets the TransactionID for this FileAppendTransaction.

func (*FileAppendTransaction) SetTransactionMemo

func (transaction *FileAppendTransaction) SetTransactionMemo(memo string) *FileAppendTransaction

SetTransactionMemo sets the memo for this FileAppendTransaction.

func (*FileAppendTransaction) SetTransactionValidDuration

func (transaction *FileAppendTransaction) SetTransactionValidDuration(duration time.Duration) *FileAppendTransaction

SetTransactionValidDuration sets the valid duration for this FileAppendTransaction.

func (*FileAppendTransaction) Sign

func (transaction *FileAppendTransaction) Sign(
	privateKey PrivateKey,
) *FileAppendTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileAppendTransaction) SignWith

func (transaction *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 (transaction *FileAppendTransaction) SignWithOperator(
	client *Client,
) (*FileAppendTransaction, error)

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 query which can be used to construct and execute a File Get Contents Query.

func (*FileContentsQuery) Execute

func (query *FileContentsQuery) Execute(client *Client) ([]byte, error)

func (*FileContentsQuery) GetCost

func (query *FileContentsQuery) GetCost(client *Client) (Hbar, error)

func (*FileContentsQuery) GetFileID

func (query *FileContentsQuery) GetFileID(id FileID) FileID

func (*FileContentsQuery) SetFileID

func (query *FileContentsQuery) SetFileID(id FileID) *FileContentsQuery

SetFileID sets the FileID of the file whose contents are requested.

func (*FileContentsQuery) SetMaxQueryPayment

func (query *FileContentsQuery) SetMaxQueryPayment(maxPayment Hbar) *FileContentsQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*FileContentsQuery) SetMaxRetry added in v2.1.2

func (query *FileContentsQuery) SetMaxRetry(count int) *FileContentsQuery

func (*FileContentsQuery) SetNodeAccountIDs

func (query *FileContentsQuery) SetNodeAccountIDs(accountID []AccountID) *FileContentsQuery

func (*FileContentsQuery) SetQueryPayment

func (query *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 transaction which can be used to construct and execute a File Create Transaction.

func (*FileCreateTransaction) AddSignature added in v2.1.3

func (transaction *FileCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileCreateTransaction

func (*FileCreateTransaction) Execute

func (transaction *FileCreateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*FileCreateTransaction) Freeze

func (transaction *FileCreateTransaction) Freeze() (*FileCreateTransaction, error)

func (*FileCreateTransaction) FreezeWith

func (transaction *FileCreateTransaction) FreezeWith(client *Client) (*FileCreateTransaction, error)

func (*FileCreateTransaction) GetContents

func (transaction *FileCreateTransaction) GetContents() []byte

func (*FileCreateTransaction) GetExpirationTime

func (transaction *FileCreateTransaction) GetExpirationTime() time.Time

func (*FileCreateTransaction) GetKeys

func (transaction *FileCreateTransaction) GetKeys() KeyList

func (*FileCreateTransaction) GetMaxTransactionFee

func (transaction *FileCreateTransaction) GetMaxTransactionFee() Hbar

func (*FileCreateTransaction) GetTransactionID

func (transaction *FileCreateTransaction) GetTransactionID() TransactionID

func (*FileCreateTransaction) GetTransactionMemo

func (transaction *FileCreateTransaction) GetTransactionMemo() string

func (*FileCreateTransaction) GetTransactionValidDuration

func (transaction *FileCreateTransaction) GetTransactionValidDuration() time.Duration

func (*FileCreateTransaction) IsFrozen

func (transaction *FileCreateTransaction) IsFrozen() bool

func (*FileCreateTransaction) Schedule added in v2.1.5

func (transaction *FileCreateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*FileCreateTransaction) SetContents

func (transaction *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 FileAppendTransaction can be used to continue uploading the file.

func (*FileCreateTransaction) SetExpirationTime

func (transaction *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) SetKeys

func (transaction *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) SetMaxRetry added in v2.1.2

func (transaction *FileCreateTransaction) SetMaxRetry(count int) *FileCreateTransaction

func (*FileCreateTransaction) SetMaxTransactionFee

func (transaction *FileCreateTransaction) SetMaxTransactionFee(fee Hbar) *FileCreateTransaction

SetMaxTransactionFee sets the max transaction fee for this FileCreateTransaction.

func (*FileCreateTransaction) SetNodeAccountIDs

func (transaction *FileCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *FileCreateTransaction

SetNodeAccountID sets the node AccountID for this FileCreateTransaction.

func (*FileCreateTransaction) SetTransactionID

func (transaction *FileCreateTransaction) SetTransactionID(transactionID TransactionID) *FileCreateTransaction

SetTransactionID sets the TransactionID for this FileCreateTransaction.

func (*FileCreateTransaction) SetTransactionMemo

func (transaction *FileCreateTransaction) SetTransactionMemo(memo string) *FileCreateTransaction

SetTransactionMemo sets the memo for this FileCreateTransaction.

func (*FileCreateTransaction) SetTransactionValidDuration

func (transaction *FileCreateTransaction) SetTransactionValidDuration(duration time.Duration) *FileCreateTransaction

SetTransactionValidDuration sets the valid duration for this FileCreateTransaction.

func (*FileCreateTransaction) Sign

func (transaction *FileCreateTransaction) Sign(
	privateKey PrivateKey,
) *FileCreateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileCreateTransaction) SignWith

func (transaction *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 (transaction *FileCreateTransaction) SignWithOperator(
	client *Client,
) (*FileCreateTransaction, error)

type FileDeleteTransaction

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

func NewFileDeleteTransaction

func NewFileDeleteTransaction() *FileDeleteTransaction

func (*FileDeleteTransaction) AddSignature added in v2.1.3

func (transaction *FileDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileDeleteTransaction

func (*FileDeleteTransaction) Execute

func (transaction *FileDeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*FileDeleteTransaction) Freeze

func (transaction *FileDeleteTransaction) Freeze() (*FileDeleteTransaction, error)

func (*FileDeleteTransaction) FreezeWith

func (transaction *FileDeleteTransaction) FreezeWith(client *Client) (*FileDeleteTransaction, error)

func (*FileDeleteTransaction) GetFileID

func (transaction *FileDeleteTransaction) GetFileID() FileID

func (*FileDeleteTransaction) GetMaxTransactionFee

func (transaction *FileDeleteTransaction) GetMaxTransactionFee() Hbar

func (*FileDeleteTransaction) GetTransactionID

func (transaction *FileDeleteTransaction) GetTransactionID() TransactionID

func (*FileDeleteTransaction) GetTransactionMemo

func (transaction *FileDeleteTransaction) GetTransactionMemo() string

func (*FileDeleteTransaction) GetTransactionValidDuration

func (transaction *FileDeleteTransaction) GetTransactionValidDuration() time.Duration

func (*FileDeleteTransaction) IsFrozen

func (transaction *FileDeleteTransaction) IsFrozen() bool

func (*FileDeleteTransaction) Schedule added in v2.1.5

func (transaction *FileDeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*FileDeleteTransaction) SetFileID

func (transaction *FileDeleteTransaction) SetFileID(fileID FileID) *FileDeleteTransaction

func (*FileDeleteTransaction) SetMaxRetry added in v2.1.2

func (transaction *FileDeleteTransaction) SetMaxRetry(count int) *FileDeleteTransaction

func (*FileDeleteTransaction) SetMaxTransactionFee

func (transaction *FileDeleteTransaction) SetMaxTransactionFee(fee Hbar) *FileDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this FileDeleteTransaction.

func (*FileDeleteTransaction) SetNodeAccountIDs

func (transaction *FileDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *FileDeleteTransaction

SetNodeAccountID sets the node AccountID for this FileDeleteTransaction.

func (*FileDeleteTransaction) SetTransactionID

func (transaction *FileDeleteTransaction) SetTransactionID(transactionID TransactionID) *FileDeleteTransaction

SetTransactionID sets the TransactionID for this FileDeleteTransaction.

func (*FileDeleteTransaction) SetTransactionMemo

func (transaction *FileDeleteTransaction) SetTransactionMemo(memo string) *FileDeleteTransaction

SetTransactionMemo sets the memo for this FileDeleteTransaction.

func (*FileDeleteTransaction) SetTransactionValidDuration

func (transaction *FileDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *FileDeleteTransaction

SetTransactionValidDuration sets the valid duration for this FileDeleteTransaction.

func (*FileDeleteTransaction) Sign

func (transaction *FileDeleteTransaction) Sign(
	privateKey PrivateKey,
) *FileDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileDeleteTransaction) SignWith

func (transaction *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 (transaction *FileDeleteTransaction) SignWithOperator(
	client *Client,
) (*FileDeleteTransaction, error)

type FileID

type FileID struct {
	Shard uint64
	Realm uint64
	File  uint64
}

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)

func FileIDFromSolidityAddress

func FileIDFromSolidityAddress(s string) (FileID, error)

func FileIDFromString

func FileIDFromString(s 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

func (FileID) ToBytes added in v2.1.3

func (id FileID) ToBytes() []byte

func (FileID) ToSolidityAddress

func (id FileID) ToSolidityAddress() string

type FileInfo

type FileInfo struct {
	FileID         FileID
	Size           int64
	ExpirationTime time.Time
	IsDeleted      bool
	Keys           KeyList
	FileMemo       string
}

func FileInfoFromBytes added in v2.1.3

func FileInfoFromBytes(data []byte) (FileInfo, error)

func (FileInfo) ToBytes added in v2.1.3

func (fileInfo FileInfo) ToBytes() []byte

type FileInfoQuery

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

func NewFileInfoQuery

func NewFileInfoQuery() *FileInfoQuery

func (*FileInfoQuery) Execute

func (query *FileInfoQuery) Execute(client *Client) (FileInfo, error)

func (*FileInfoQuery) GetCost

func (query *FileInfoQuery) GetCost(client *Client) (Hbar, error)

func (*FileInfoQuery) GetFileID

func (query *FileInfoQuery) GetFileID(id FileID) FileID

func (*FileInfoQuery) GetNodeAccountId

func (query *FileInfoQuery) GetNodeAccountId() []AccountID

func (*FileInfoQuery) SetFileID

func (query *FileInfoQuery) SetFileID(id FileID) *FileInfoQuery

func (*FileInfoQuery) SetMaxQueryPayment

func (query *FileInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *FileInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*FileInfoQuery) SetMaxRetry added in v2.1.2

func (query *FileInfoQuery) SetMaxRetry(count int) *FileInfoQuery

func (*FileInfoQuery) SetNodeAccountIDs added in v2.1.2

func (query *FileInfoQuery) SetNodeAccountIDs(accountID []AccountID) *FileInfoQuery

func (*FileInfoQuery) SetQueryPayment

func (query *FileInfoQuery) SetQueryPayment(paymentAmount Hbar) *FileInfoQuery

SetQueryPayment sets the payment amount for this Query.

type FileUpdateTransaction

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

func NewFileUpdateTransaction

func NewFileUpdateTransaction() *FileUpdateTransaction

func (*FileUpdateTransaction) AddSignature added in v2.1.3

func (transaction *FileUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *FileUpdateTransaction

func (*FileUpdateTransaction) Execute

func (transaction *FileUpdateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*FileUpdateTransaction) Freeze

func (transaction *FileUpdateTransaction) Freeze() (*FileUpdateTransaction, error)

func (*FileUpdateTransaction) FreezeWith

func (transaction *FileUpdateTransaction) FreezeWith(client *Client) (*FileUpdateTransaction, error)

func (*FileUpdateTransaction) GeFileMemo added in v2.1.5

func (transaction *FileUpdateTransaction) GeFileMemo() string

func (*FileUpdateTransaction) GetContents

func (transaction *FileUpdateTransaction) GetContents() []byte

func (*FileUpdateTransaction) GetExpirationTime

func (transaction *FileUpdateTransaction) GetExpirationTime() time.Time

func (*FileUpdateTransaction) GetFileID

func (transaction *FileUpdateTransaction) GetFileID() FileID

func (*FileUpdateTransaction) GetKeys

func (transaction *FileUpdateTransaction) GetKeys() KeyList

func (*FileUpdateTransaction) GetMaxTransactionFee

func (transaction *FileUpdateTransaction) GetMaxTransactionFee() Hbar

func (*FileUpdateTransaction) GetTransactionID

func (transaction *FileUpdateTransaction) GetTransactionID() TransactionID

func (*FileUpdateTransaction) GetTransactionMemo

func (transaction *FileUpdateTransaction) GetTransactionMemo() string

func (*FileUpdateTransaction) GetTransactionValidDuration

func (transaction *FileUpdateTransaction) GetTransactionValidDuration() time.Duration

func (*FileUpdateTransaction) IsFrozen

func (transaction *FileUpdateTransaction) IsFrozen() bool

func (*FileUpdateTransaction) Schedule added in v2.1.5

func (transaction *FileUpdateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*FileUpdateTransaction) SetContents

func (transaction *FileUpdateTransaction) SetContents(contents []byte) *FileUpdateTransaction

func (*FileUpdateTransaction) SetExpirationTime

func (transaction *FileUpdateTransaction) SetExpirationTime(expiration time.Time) *FileUpdateTransaction

func (*FileUpdateTransaction) SetFileID

func (transaction *FileUpdateTransaction) SetFileID(ID FileID) *FileUpdateTransaction

func (*FileUpdateTransaction) SetFileMemo added in v2.1.5

func (transaction *FileUpdateTransaction) SetFileMemo(memo string) *FileUpdateTransaction

func (*FileUpdateTransaction) SetKeys

func (transaction *FileUpdateTransaction) SetKeys(keys ...Key) *FileUpdateTransaction

func (*FileUpdateTransaction) SetMaxRetry added in v2.1.2

func (transaction *FileUpdateTransaction) SetMaxRetry(count int) *FileUpdateTransaction

func (*FileUpdateTransaction) SetMaxTransactionFee

func (transaction *FileUpdateTransaction) SetMaxTransactionFee(fee Hbar) *FileUpdateTransaction

SetMaxTransactionFee sets the max transaction fee for this FileUpdateTransaction.

func (*FileUpdateTransaction) SetNodeAccountIDs

func (transaction *FileUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *FileUpdateTransaction

SetNodeAccountID sets the node AccountID for this FileUpdateTransaction.

func (*FileUpdateTransaction) SetTransactionID

func (transaction *FileUpdateTransaction) SetTransactionID(transactionID TransactionID) *FileUpdateTransaction

SetTransactionID sets the TransactionID for this FileUpdateTransaction.

func (*FileUpdateTransaction) SetTransactionMemo

func (transaction *FileUpdateTransaction) SetTransactionMemo(memo string) *FileUpdateTransaction

SetTransactionMemo sets the memo for this FileUpdateTransaction.

func (*FileUpdateTransaction) SetTransactionValidDuration

func (transaction *FileUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *FileUpdateTransaction

SetTransactionValidDuration sets the valid duration for this FileUpdateTransaction.

func (*FileUpdateTransaction) Sign

func (transaction *FileUpdateTransaction) Sign(
	privateKey PrivateKey,
) *FileUpdateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FileUpdateTransaction) SignWith

func (transaction *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 (transaction *FileUpdateTransaction) SignWithOperator(
	client *Client,
) (*FileUpdateTransaction, error)

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 (transaction *FreezeTransaction) AddSignature(publicKey PublicKey, signature []byte) *FreezeTransaction

func (*FreezeTransaction) Execute

func (transaction *FreezeTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*FreezeTransaction) Freeze

func (transaction *FreezeTransaction) Freeze() (*FreezeTransaction, error)

func (*FreezeTransaction) FreezeWith

func (transaction *FreezeTransaction) FreezeWith(client *Client) (*FreezeTransaction, error)

func (*FreezeTransaction) GetEndTime

func (transaction *FreezeTransaction) GetEndTime() time.Time

func (*FreezeTransaction) GetMaxTransactionFee

func (transaction *FreezeTransaction) GetMaxTransactionFee() Hbar

func (*FreezeTransaction) GetStartTime

func (transaction *FreezeTransaction) GetStartTime() time.Time

func (*FreezeTransaction) GetTransactionID

func (transaction *FreezeTransaction) GetTransactionID() TransactionID

func (*FreezeTransaction) GetTransactionMemo

func (transaction *FreezeTransaction) GetTransactionMemo() string

func (*FreezeTransaction) GetTransactionValidDuration

func (transaction *FreezeTransaction) GetTransactionValidDuration() time.Duration

func (*FreezeTransaction) IsFrozen

func (transaction *FreezeTransaction) IsFrozen() bool

func (*FreezeTransaction) Schedule added in v2.1.5

func (transaction *FreezeTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*FreezeTransaction) SetEndTime

func (transaction *FreezeTransaction) SetEndTime(endTime time.Time) *FreezeTransaction

func (*FreezeTransaction) SetMaxRetry added in v2.1.2

func (transaction *FreezeTransaction) SetMaxRetry(count int) *FreezeTransaction

func (*FreezeTransaction) SetMaxTransactionFee

func (transaction *FreezeTransaction) SetMaxTransactionFee(fee Hbar) *FreezeTransaction

SetMaxTransactionFee sets the max transaction fee for this FreezeTransaction.

func (*FreezeTransaction) SetNodeAccountIDs

func (transaction *FreezeTransaction) SetNodeAccountIDs(nodeID []AccountID) *FreezeTransaction

SetNodeAccountID sets the node AccountID for this FreezeTransaction.

func (*FreezeTransaction) SetStartTime

func (transaction *FreezeTransaction) SetStartTime(startTime time.Time) *FreezeTransaction

func (*FreezeTransaction) SetTransactionID

func (transaction *FreezeTransaction) SetTransactionID(transactionID TransactionID) *FreezeTransaction

SetTransactionID sets the TransactionID for this FreezeTransaction.

func (*FreezeTransaction) SetTransactionMemo

func (transaction *FreezeTransaction) SetTransactionMemo(memo string) *FreezeTransaction

SetTransactionMemo sets the memo for this FreezeTransaction.

func (*FreezeTransaction) SetTransactionValidDuration

func (transaction *FreezeTransaction) SetTransactionValidDuration(duration time.Duration) *FreezeTransaction

SetTransactionValidDuration sets the valid duration for this FreezeTransaction.

func (*FreezeTransaction) Sign

func (transaction *FreezeTransaction) Sign(
	privateKey PrivateKey,
) *FreezeTransaction

Sign uses the provided privateKey to sign the transaction.

func (*FreezeTransaction) SignWith

func (transaction *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 (transaction *FreezeTransaction) SignWithOperator(
	client *Client,
) (*FreezeTransaction, error)

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 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 (Hbar) As

func (hbar Hbar) As(unit HbarUnit) int64

func (Hbar) AsTinybar

func (hbar Hbar) AsTinybar() int64

AsTinybar returns the equivalent tinybar amount.

func (Hbar) String

func (hbar Hbar) String() string

func (Hbar) ToString

func (hbar Hbar) ToString(unit HbarUnit) string

type HbarUnit

type HbarUnit string

func (HbarUnit) String

func (unit HbarUnit) String() string

func (HbarUnit) Symbol

func (unit HbarUnit) Symbol() string

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
}

func KeyListWithThreshold

func KeyListWithThreshold(threshold uint) *KeyList

func NewKeyList

func NewKeyList() *KeyList

func (*KeyList) Add

func (kl *KeyList) Add(key Key) *KeyList

func (*KeyList) AddAll

func (kl *KeyList) AddAll(keys []Key) *KeyList

func (*KeyList) AddAllPublicKeys

func (kl *KeyList) AddAllPublicKeys(keys []PublicKey) *KeyList

func (*KeyList) String

func (kl *KeyList) String() string

type LiveHash

type LiveHash struct {
	AccountID AccountID
	Hash      []byte
	Keys      KeyList
	Duration  time.Time
}

func LiveHashFromBytes added in v2.1.3

func LiveHashFromBytes(data []byte) (LiveHash, error)

func (LiveHash) ToBytes added in v2.1.3

func (liveHash LiveHash) ToBytes() []byte

type LiveHashAddTransaction

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

func NewLiveHashAddTransaction

func NewLiveHashAddTransaction() *LiveHashAddTransaction

func (*LiveHashAddTransaction) AddSignature added in v2.1.3

func (transaction *LiveHashAddTransaction) AddSignature(publicKey PublicKey, signature []byte) *LiveHashAddTransaction

func (*LiveHashAddTransaction) Execute

func (transaction *LiveHashAddTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*LiveHashAddTransaction) Freeze

func (transaction *LiveHashAddTransaction) Freeze() (*LiveHashAddTransaction, error)

func (*LiveHashAddTransaction) FreezeWith

func (transaction *LiveHashAddTransaction) FreezeWith(client *Client) (*LiveHashAddTransaction, error)

func (*LiveHashAddTransaction) GetAccountID

func (transaction *LiveHashAddTransaction) GetAccountID() AccountID

func (*LiveHashAddTransaction) GetDuration

func (transaction *LiveHashAddTransaction) GetDuration() time.Duration

func (*LiveHashAddTransaction) GetHash

func (transaction *LiveHashAddTransaction) GetHash() []byte

func (*LiveHashAddTransaction) GetKeys

func (transaction *LiveHashAddTransaction) GetKeys() KeyList

func (*LiveHashAddTransaction) GetMaxTransactionFee

func (transaction *LiveHashAddTransaction) GetMaxTransactionFee() Hbar

func (*LiveHashAddTransaction) GetTransactionID

func (transaction *LiveHashAddTransaction) GetTransactionID() TransactionID

func (*LiveHashAddTransaction) GetTransactionMemo

func (transaction *LiveHashAddTransaction) GetTransactionMemo() string

func (*LiveHashAddTransaction) GetTransactionValidDuration

func (transaction *LiveHashAddTransaction) GetTransactionValidDuration() time.Duration

func (*LiveHashAddTransaction) IsFrozen

func (transaction *LiveHashAddTransaction) IsFrozen() bool

func (*LiveHashAddTransaction) SetAccountID

func (transaction *LiveHashAddTransaction) SetAccountID(accountID AccountID) *LiveHashAddTransaction

func (*LiveHashAddTransaction) SetDuration

func (transaction *LiveHashAddTransaction) SetDuration(duration time.Duration) *LiveHashAddTransaction

func (*LiveHashAddTransaction) SetHash

func (transaction *LiveHashAddTransaction) SetHash(hash []byte) *LiveHashAddTransaction

func (*LiveHashAddTransaction) SetKeys

func (transaction *LiveHashAddTransaction) SetKeys(keys ...Key) *LiveHashAddTransaction

func (*LiveHashAddTransaction) SetMaxRetry added in v2.1.2

func (transaction *LiveHashAddTransaction) SetMaxRetry(count int) *LiveHashAddTransaction

func (*LiveHashAddTransaction) SetMaxTransactionFee

func (transaction *LiveHashAddTransaction) SetMaxTransactionFee(fee Hbar) *LiveHashAddTransaction

SetMaxTransactionFee sets the max transaction fee for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) SetNodeAccountIDs

func (transaction *LiveHashAddTransaction) SetNodeAccountIDs(nodeID []AccountID) *LiveHashAddTransaction

SetNodeAccountID sets the node AccountID for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) SetTransactionID

func (transaction *LiveHashAddTransaction) SetTransactionID(transactionID TransactionID) *LiveHashAddTransaction

SetTransactionID sets the TransactionID for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) SetTransactionMemo

func (transaction *LiveHashAddTransaction) SetTransactionMemo(memo string) *LiveHashAddTransaction

SetTransactionMemo sets the memo for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) SetTransactionValidDuration

func (transaction *LiveHashAddTransaction) SetTransactionValidDuration(duration time.Duration) *LiveHashAddTransaction

SetTransactionValidDuration sets the valid duration for this LiveHashAddTransaction.

func (*LiveHashAddTransaction) Sign

func (transaction *LiveHashAddTransaction) Sign(
	privateKey PrivateKey,
) *LiveHashAddTransaction

Sign uses the provided privateKey to sign the transaction.

func (*LiveHashAddTransaction) SignWith

func (transaction *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 (transaction *LiveHashAddTransaction) SignWithOperator(
	client *Client,
) (*LiveHashAddTransaction, error)

type LiveHashDeleteTransaction

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

func NewLiveHashDeleteTransaction

func NewLiveHashDeleteTransaction() *LiveHashDeleteTransaction

func (*LiveHashDeleteTransaction) AddSignature added in v2.1.3

func (transaction *LiveHashDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *LiveHashDeleteTransaction

func (*LiveHashDeleteTransaction) Execute

func (transaction *LiveHashDeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*LiveHashDeleteTransaction) Freeze

func (transaction *LiveHashDeleteTransaction) Freeze() (*LiveHashDeleteTransaction, error)

func (*LiveHashDeleteTransaction) FreezeWith

func (transaction *LiveHashDeleteTransaction) FreezeWith(client *Client) (*LiveHashDeleteTransaction, error)

func (*LiveHashDeleteTransaction) GetAccountID

func (transaction *LiveHashDeleteTransaction) GetAccountID() AccountID

func (*LiveHashDeleteTransaction) GetHash

func (transaction *LiveHashDeleteTransaction) GetHash() []byte

func (*LiveHashDeleteTransaction) GetMaxTransactionFee

func (transaction *LiveHashDeleteTransaction) GetMaxTransactionFee() Hbar

func (*LiveHashDeleteTransaction) GetTransactionID

func (transaction *LiveHashDeleteTransaction) GetTransactionID() TransactionID

func (*LiveHashDeleteTransaction) GetTransactionMemo

func (transaction *LiveHashDeleteTransaction) GetTransactionMemo() string

func (*LiveHashDeleteTransaction) GetTransactionValidDuration

func (transaction *LiveHashDeleteTransaction) GetTransactionValidDuration() time.Duration

func (*LiveHashDeleteTransaction) IsFrozen

func (transaction *LiveHashDeleteTransaction) IsFrozen() bool

func (*LiveHashDeleteTransaction) SetAccountID

func (transaction *LiveHashDeleteTransaction) SetAccountID(accountID AccountID) *LiveHashDeleteTransaction

func (*LiveHashDeleteTransaction) SetHash

func (transaction *LiveHashDeleteTransaction) SetHash(hash []byte) *LiveHashDeleteTransaction

func (*LiveHashDeleteTransaction) SetMaxRetry added in v2.1.2

func (transaction *LiveHashDeleteTransaction) SetMaxRetry(count int) *LiveHashDeleteTransaction

func (*LiveHashDeleteTransaction) SetMaxTransactionFee

func (transaction *LiveHashDeleteTransaction) SetMaxTransactionFee(fee Hbar) *LiveHashDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetNodeAccountIDs

func (transaction *LiveHashDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *LiveHashDeleteTransaction

SetNodeAccountID sets the node AccountID for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetTransactionID

func (transaction *LiveHashDeleteTransaction) SetTransactionID(transactionID TransactionID) *LiveHashDeleteTransaction

SetTransactionID sets the TransactionID for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetTransactionMemo

func (transaction *LiveHashDeleteTransaction) SetTransactionMemo(memo string) *LiveHashDeleteTransaction

SetTransactionMemo sets the memo for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) SetTransactionValidDuration

func (transaction *LiveHashDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *LiveHashDeleteTransaction

SetTransactionValidDuration sets the valid duration for this LiveHashDeleteTransaction.

func (*LiveHashDeleteTransaction) Sign

func (transaction *LiveHashDeleteTransaction) Sign(
	privateKey PrivateKey,
) *LiveHashDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*LiveHashDeleteTransaction) SignWith

func (transaction *LiveHashDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *LiveHashDeleteTransaction

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 (transaction *LiveHashDeleteTransaction) SignWithOperator(
	client *Client,
) (*LiveHashDeleteTransaction, error)

type LiveHashQuery

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

func NewLiveHashQuery

func NewLiveHashQuery() *LiveHashQuery

func (*LiveHashQuery) Execute

func (query *LiveHashQuery) Execute(client *Client) (LiveHash, error)

func (*LiveHashQuery) GetAccountID

func (query *LiveHashQuery) GetAccountID() AccountID

func (*LiveHashQuery) GetCost

func (query *LiveHashQuery) GetCost(client *Client) (Hbar, error)

func (*LiveHashQuery) GetGetHash

func (query *LiveHashQuery) GetGetHash() []byte

func (*LiveHashQuery) SetAccountID

func (query *LiveHashQuery) SetAccountID(id AccountID) *LiveHashQuery

func (*LiveHashQuery) SetHash

func (query *LiveHashQuery) SetHash(hash []byte) *LiveHashQuery

func (*LiveHashQuery) SetMaxQueryPayment

func (query *LiveHashQuery) SetMaxQueryPayment(maxPayment Hbar) *LiveHashQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*LiveHashQuery) SetNodeAccountIDs

func (query *LiveHashQuery) SetNodeAccountIDs(accountID []AccountID) *LiveHashQuery

func (*LiveHashQuery) SetQueryPayment

func (query *LiveHashQuery) SetQueryPayment(paymentAmount Hbar) *LiveHashQuery

SetQueryPayment sets the payment amount for this Query.

type Mnemonic

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

func GenerateMnemonic12

func GenerateMnemonic12() (Mnemonic, error)

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

func (Mnemonic) ToLegacyPrivateKey

func (m Mnemonic) ToLegacyPrivateKey() (PrivateKey, error)

func (Mnemonic) ToPrivateKey

func (m Mnemonic) ToPrivateKey(passPhrase string) (PrivateKey, error)

func (Mnemonic) Words

func (m Mnemonic) Words() []string

type NetworkVersionInfo

type NetworkVersionInfo struct {
	ProtobufVersion SemanticVersion
	ServicesVersion SemanticVersion
}

type NetworkVersionInfoQuery

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

func NewNetworkVersionQuery

func NewNetworkVersionQuery() *NetworkVersionInfoQuery

func (*NetworkVersionInfoQuery) Execute

func (query *NetworkVersionInfoQuery) Execute(client *Client) (NetworkVersionInfo, error)

func (*NetworkVersionInfoQuery) GetCost

func (query *NetworkVersionInfoQuery) GetCost(client *Client) (Hbar, error)

func (*NetworkVersionInfoQuery) SetMaxQueryPayment

func (query *NetworkVersionInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *NetworkVersionInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*NetworkVersionInfoQuery) SetMaxRetry added in v2.1.2

func (query *NetworkVersionInfoQuery) SetMaxRetry(count int) *NetworkVersionInfoQuery

func (*NetworkVersionInfoQuery) SetNodeAccountIDs

func (query *NetworkVersionInfoQuery) SetNodeAccountIDs(accountID []AccountID) *NetworkVersionInfoQuery

func (*NetworkVersionInfoQuery) SetQueryPayment

func (query *NetworkVersionInfoQuery) SetQueryPayment(paymentAmount Hbar) *NetworkVersionInfoQuery

SetQueryPayment sets the payment amount for this Query.

type PrivateKey

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

PrivateKey is an ed25519 private key.

func GeneratePrivateKey

func GeneratePrivateKey() (PrivateKey, error)

GeneratePrivateKey generates a random new PrivateKey.

func PrivateKeyFromBytes

func PrivateKeyFromBytes(bytes []byte) (PrivateKey, error)

PrivateKeyFromBytes constructs an PrivateKey from a raw slice of either 32 or 64 bytes.

func PrivateKeyFromKeystore

func PrivateKeyFromKeystore(ks []byte, passphrase string) (PrivateKey, error)

PrivateKeyFromKeystore recovers an PrivateKey from an encrypted keystore encoded as a byte slice.

func PrivateKeyFromMnemonic

func PrivateKeyFromMnemonic(mnemonic Mnemonic, passPhrase string) (PrivateKey, error)

PrivateKeyFromMnemonic recovers an PrivateKey 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 PrivateKeyFromString

func PrivateKeyFromString(s string) (PrivateKey, error)

PrivateKeyFromString recovers an PrivateKey from its text-encoded representation.

func PrivateKeyReadKeystore

func PrivateKeyReadKeystore(source io.Reader, passphrase string) (PrivateKey, error)

PrivateKeyReadKeystore recovers an PrivateKey from an encrypted keystore file.

func PrivateKeyReadPem

func PrivateKeyReadPem(source io.Reader, passphrase string) (PrivateKey, error)

func (PrivateKey) Bytes

func (sk PrivateKey) Bytes() []byte

Bytes returns the byte slice representation of the PrivateKey.

func (PrivateKey) Derive

func (sk PrivateKey) Derive(index uint32) (PrivateKey, error)

Derive a child key compatible with the iOS and Android wallets using a provided wallet/account index. Use index 0 for the default account.

This will fail if the key does not support derivation which can be checked by calling SupportsDerivation()

func (PrivateKey) Keystore

func (sk PrivateKey) Keystore(passphrase string) ([]byte, error)

Keystore returns an encrypted keystore containing the PrivateKey.

func (PrivateKey) LegacyDerive added in v2.1.4

func (sk PrivateKey) LegacyDerive(index int32) (PrivateKey, error)

func (PrivateKey) PublicKey

func (sk PrivateKey) PublicKey() PublicKey

PublicKey returns the PublicKey associated with this PrivateKey.

func (PrivateKey) Sign

func (sk PrivateKey) Sign(message []byte) []byte

Sign signs the provided message with the PrivateKey.

func (PrivateKey) SignTransaction

func (sk PrivateKey) SignTransaction(transaction *Transaction) ([]byte, error)

func (PrivateKey) String

func (sk PrivateKey) String() string

String returns the text-encoded representation of the PrivateKey.

func (PrivateKey) SupportsDerivation

func (sk PrivateKey) SupportsDerivation() bool

SupportsDerivation returns true if the PrivateKey supports derivation.

func (PrivateKey) WriteKeystore

func (sk PrivateKey) WriteKeystore(destination io.Writer, passphrase string) error

WriteKeystore writes an encrypted keystore containing the PrivateKey to the provided destination.

type ProxyStaker added in v2.1.3

type ProxyStaker struct {
	AccountID AccountID
	// contains filtered or unexported fields
}

type PublicKey

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

PublicKey is an ed25519 public key.

func PublicKeyFromBytes

func PublicKeyFromBytes(bytes []byte) (PublicKey, error)

PublicKeyFromBytes constructs a known PublicKey from its text-encoded representation.

func PublicKeyFromString

func PublicKeyFromString(s string) (PublicKey, error)

PublicKeyFromString recovers an PublicKey from its text-encoded representation.

func (PublicKey) Bytes

func (pk PublicKey) Bytes() []byte

Bytes returns the byte slice representation of the PublicKey.

func (PublicKey) String

func (pk PublicKey) String() string

String returns the text-encoded representation of the PublicKey.

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
}

func (*Query) GetMaxRetryCount added in v2.1.2

func (query *Query) GetMaxRetryCount() int

func (*Query) GetNodeAccountIDs

func (query *Query) GetNodeAccountIDs() []AccountID

func (*Query) SetMaxQueryPayment

func (query *Query) SetMaxQueryPayment(maxPayment Hbar) *Query

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*Query) SetMaxRetry added in v2.1.2

func (query *Query) SetMaxRetry(count int) *Query

func (*Query) SetNodeAccountIDs

func (query *Query) SetNodeAccountIDs(accountID []AccountID) *Query

func (*Query) SetQueryPayment

func (query *Query) SetQueryPayment(paymentAmount Hbar) *Query

SetQueryPayment sets the payment amount for this Query.

type QueryHeader

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

type ScheduleCreateTransaction added in v2.1.4

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

func NewScheduleCreateTransaction added in v2.1.4

func NewScheduleCreateTransaction() *ScheduleCreateTransaction

func (*ScheduleCreateTransaction) Execute added in v2.1.4

func (transaction *ScheduleCreateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*ScheduleCreateTransaction) Freeze added in v2.1.4

func (transaction *ScheduleCreateTransaction) Freeze() (*ScheduleCreateTransaction, error)

func (*ScheduleCreateTransaction) FreezeWith added in v2.1.4

func (transaction *ScheduleCreateTransaction) FreezeWith(client *Client) (*ScheduleCreateTransaction, error)

func (*ScheduleCreateTransaction) GetAdminKey added in v2.1.4

func (transaction *ScheduleCreateTransaction) GetAdminKey() *Key

func (*ScheduleCreateTransaction) GetMaxTransactionFee added in v2.1.4

func (transaction *ScheduleCreateTransaction) GetMaxTransactionFee() Hbar

func (*ScheduleCreateTransaction) GetPayerAccountID added in v2.1.4

func (transaction *ScheduleCreateTransaction) GetPayerAccountID() AccountID

func (*ScheduleCreateTransaction) GetScheduleMemo added in v2.1.5

func (transaction *ScheduleCreateTransaction) GetScheduleMemo() string

func (*ScheduleCreateTransaction) GetTransactionID added in v2.1.4

func (transaction *ScheduleCreateTransaction) GetTransactionID() TransactionID

func (*ScheduleCreateTransaction) GetTransactionMemo added in v2.1.4

func (transaction *ScheduleCreateTransaction) GetTransactionMemo() string

func (*ScheduleCreateTransaction) GetTransactionValidDuration added in v2.1.4

func (transaction *ScheduleCreateTransaction) GetTransactionValidDuration() time.Duration

func (*ScheduleCreateTransaction) IsFrozen added in v2.1.4

func (transaction *ScheduleCreateTransaction) IsFrozen() bool

func (*ScheduleCreateTransaction) SetAdminKey added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetAdminKey(key Key) *ScheduleCreateTransaction

func (*ScheduleCreateTransaction) SetMaxRetry added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetMaxRetry(count int) *ScheduleCreateTransaction

func (*ScheduleCreateTransaction) SetMaxTransactionFee added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetMaxTransactionFee(fee Hbar) *ScheduleCreateTransaction

SetMaxTransactionFee sets the max transaction fee for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetNodeAccountIDs added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *ScheduleCreateTransaction

SetNodeAccountID sets the node AccountID for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetPayerAccountID added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetPayerAccountID(id AccountID) *ScheduleCreateTransaction

func (*ScheduleCreateTransaction) SetScheduleMemo added in v2.1.5

func (transaction *ScheduleCreateTransaction) SetScheduleMemo(memo string) *ScheduleCreateTransaction

func (*ScheduleCreateTransaction) SetScheduledTransaction added in v2.1.5

func (transaction *ScheduleCreateTransaction) SetScheduledTransaction(tx ITransaction) (*ScheduleCreateTransaction, error)

func (*ScheduleCreateTransaction) SetTransactionID added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetTransactionID(transactionID TransactionID) *ScheduleCreateTransaction

SetTransactionID sets the TransactionID for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetTransactionMemo added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetTransactionMemo(memo string) *ScheduleCreateTransaction

SetTransactionMemo sets the memo for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) SetTransactionValidDuration added in v2.1.4

func (transaction *ScheduleCreateTransaction) SetTransactionValidDuration(duration time.Duration) *ScheduleCreateTransaction

SetTransactionValidDuration sets the valid duration for this ScheduleCreateTransaction.

func (*ScheduleCreateTransaction) Sign added in v2.1.4

func (transaction *ScheduleCreateTransaction) Sign(
	privateKey PrivateKey,
) *ScheduleCreateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*ScheduleCreateTransaction) SignWith added in v2.1.4

func (transaction *ScheduleCreateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *ScheduleCreateTransaction

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 (transaction *ScheduleCreateTransaction) SignWithOperator(
	client *Client,
) (*ScheduleCreateTransaction, error)

type ScheduleDeleteTransaction added in v2.1.4

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

func NewScheduleDeleteTransaction added in v2.1.4

func NewScheduleDeleteTransaction() *ScheduleDeleteTransaction

func (*ScheduleDeleteTransaction) Execute added in v2.1.4

func (transaction *ScheduleDeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*ScheduleDeleteTransaction) Freeze added in v2.1.4

func (transaction *ScheduleDeleteTransaction) Freeze() (*ScheduleDeleteTransaction, error)

func (*ScheduleDeleteTransaction) FreezeWith added in v2.1.4

func (transaction *ScheduleDeleteTransaction) FreezeWith(client *Client) (*ScheduleDeleteTransaction, error)

func (*ScheduleDeleteTransaction) GetMaxTransactionFee added in v2.1.4

func (transaction *ScheduleDeleteTransaction) GetMaxTransactionFee() Hbar

func (*ScheduleDeleteTransaction) GetScheduleID added in v2.1.4

func (transaction *ScheduleDeleteTransaction) GetScheduleID() ScheduleID

func (*ScheduleDeleteTransaction) GetTransactionID added in v2.1.4

func (transaction *ScheduleDeleteTransaction) GetTransactionID() TransactionID

func (*ScheduleDeleteTransaction) GetTransactionMemo added in v2.1.4

func (transaction *ScheduleDeleteTransaction) GetTransactionMemo() string

func (*ScheduleDeleteTransaction) GetTransactionValidDuration added in v2.1.4

func (transaction *ScheduleDeleteTransaction) GetTransactionValidDuration() time.Duration

func (*ScheduleDeleteTransaction) IsFrozen added in v2.1.4

func (transaction *ScheduleDeleteTransaction) IsFrozen() bool

func (*ScheduleDeleteTransaction) Schedule added in v2.1.5

func (transaction *ScheduleDeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*ScheduleDeleteTransaction) SetMaxRetry added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SetMaxRetry(count int) *ScheduleDeleteTransaction

func (*ScheduleDeleteTransaction) SetMaxTransactionFee added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SetMaxTransactionFee(fee Hbar) *ScheduleDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetNodeAccountIDs added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *ScheduleDeleteTransaction

SetNodeAccountID sets the node AccountID for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetScheduleID added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SetScheduleID(scheduleID ScheduleID) *ScheduleDeleteTransaction

func (*ScheduleDeleteTransaction) SetTransactionID added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SetTransactionID(transactionID TransactionID) *ScheduleDeleteTransaction

SetTransactionID sets the TransactionID for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetTransactionMemo added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SetTransactionMemo(memo string) *ScheduleDeleteTransaction

SetTransactionMemo sets the memo for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) SetTransactionValidDuration added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *ScheduleDeleteTransaction

SetTransactionValidDuration sets the valid duration for this ScheduleDeleteTransaction.

func (*ScheduleDeleteTransaction) Sign added in v2.1.4

func (transaction *ScheduleDeleteTransaction) Sign(
	privateKey PrivateKey,
) *ScheduleDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*ScheduleDeleteTransaction) SignWith added in v2.1.4

func (transaction *ScheduleDeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *ScheduleDeleteTransaction

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 (transaction *ScheduleDeleteTransaction) SignWithOperator(
	client *Client,
) (*ScheduleDeleteTransaction, error)

type ScheduleID added in v2.1.4

type ScheduleID struct {
	Shard    uint64
	Realm    uint64
	Schedule uint64
}

ScheduleID is the ID for a Hedera account

func ScheduleIDFromString added in v2.1.4

func ScheduleIDFromString(s 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) UnmarshalJSON added in v2.1.4

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

UnmarshalJSON implements the encoding.JSON interface.

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
	Signers                *KeyList
	AdminKey               Key
	Memo                   string
	ScheduledTransactionID *TransactionID
	// contains filtered or unexported fields
}

func (*ScheduleInfo) GetScheduledTransaction added in v2.1.5

func (scheduleInfo *ScheduleInfo) GetScheduledTransaction() (ITransaction, error)

type ScheduleInfoQuery added in v2.1.4

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

func NewScheduleInfoQuery added in v2.1.4

func NewScheduleInfoQuery() *ScheduleInfoQuery

func (*ScheduleInfoQuery) Execute added in v2.1.4

func (query *ScheduleInfoQuery) Execute(client *Client) (ScheduleInfo, error)

func (*ScheduleInfoQuery) GetCost added in v2.1.4

func (query *ScheduleInfoQuery) GetCost(client *Client) (Hbar, error)

func (*ScheduleInfoQuery) GetNodeAccountId added in v2.1.4

func (query *ScheduleInfoQuery) GetNodeAccountId() []AccountID

func (*ScheduleInfoQuery) GetScheduleID added in v2.1.4

func (query *ScheduleInfoQuery) GetScheduleID(id ScheduleID) ScheduleID

func (*ScheduleInfoQuery) SetMaxQueryPayment added in v2.1.4

func (query *ScheduleInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *ScheduleInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*ScheduleInfoQuery) SetMaxRetry added in v2.1.4

func (query *ScheduleInfoQuery) SetMaxRetry(count int) *ScheduleInfoQuery

func (*ScheduleInfoQuery) SetNodeAccountIDs added in v2.1.4

func (query *ScheduleInfoQuery) SetNodeAccountIDs(accountID []AccountID) *ScheduleInfoQuery

func (*ScheduleInfoQuery) SetQueryPayment added in v2.1.4

func (query *ScheduleInfoQuery) SetQueryPayment(paymentAmount Hbar) *ScheduleInfoQuery

SetQueryPayment sets the payment amount for this Query.

func (*ScheduleInfoQuery) SetScheduleID added in v2.1.4

func (query *ScheduleInfoQuery) SetScheduleID(id ScheduleID) *ScheduleInfoQuery

type ScheduleSignTransaction added in v2.1.4

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

func NewScheduleSignTransaction added in v2.1.4

func NewScheduleSignTransaction() *ScheduleSignTransaction

func (*ScheduleSignTransaction) Execute added in v2.1.4

func (transaction *ScheduleSignTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*ScheduleSignTransaction) Freeze added in v2.1.4

func (transaction *ScheduleSignTransaction) Freeze() (*ScheduleSignTransaction, error)

func (*ScheduleSignTransaction) FreezeWith added in v2.1.4

func (transaction *ScheduleSignTransaction) FreezeWith(client *Client) (*ScheduleSignTransaction, error)

func (*ScheduleSignTransaction) GetMaxTransactionFee added in v2.1.4

func (transaction *ScheduleSignTransaction) GetMaxTransactionFee() Hbar

func (*ScheduleSignTransaction) GetScheduleID added in v2.1.4

func (transaction *ScheduleSignTransaction) GetScheduleID() ScheduleID

func (*ScheduleSignTransaction) GetTransactionID added in v2.1.4

func (transaction *ScheduleSignTransaction) GetTransactionID() TransactionID

func (*ScheduleSignTransaction) GetTransactionMemo added in v2.1.4

func (transaction *ScheduleSignTransaction) GetTransactionMemo() string

func (*ScheduleSignTransaction) GetTransactionValidDuration added in v2.1.4

func (transaction *ScheduleSignTransaction) GetTransactionValidDuration() time.Duration

func (*ScheduleSignTransaction) IsFrozen added in v2.1.4

func (transaction *ScheduleSignTransaction) IsFrozen() bool

func (*ScheduleSignTransaction) SetMaxRetry added in v2.1.4

func (transaction *ScheduleSignTransaction) SetMaxRetry(count int) *ScheduleSignTransaction

func (*ScheduleSignTransaction) SetMaxTransactionFee added in v2.1.4

func (transaction *ScheduleSignTransaction) SetMaxTransactionFee(fee Hbar) *ScheduleSignTransaction

SetMaxTransactionFee sets the max transaction fee for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetNodeAccountIDs added in v2.1.4

func (transaction *ScheduleSignTransaction) SetNodeAccountIDs(nodeID []AccountID) *ScheduleSignTransaction

SetNodeAccountID sets the node AccountID for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetScheduleID added in v2.1.4

func (transaction *ScheduleSignTransaction) SetScheduleID(id ScheduleID) *ScheduleSignTransaction

func (*ScheduleSignTransaction) SetTransactionID added in v2.1.4

func (transaction *ScheduleSignTransaction) SetTransactionID(transactionID TransactionID) *ScheduleSignTransaction

SetTransactionID sets the TransactionID for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetTransactionMemo added in v2.1.4

func (transaction *ScheduleSignTransaction) SetTransactionMemo(memo string) *ScheduleSignTransaction

SetTransactionMemo sets the memo for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) SetTransactionValidDuration added in v2.1.4

func (transaction *ScheduleSignTransaction) SetTransactionValidDuration(duration time.Duration) *ScheduleSignTransaction

SetTransactionValidDuration sets the valid duration for this ScheduleSignTransaction.

func (*ScheduleSignTransaction) Sign added in v2.1.4

func (transaction *ScheduleSignTransaction) Sign(
	privateKey PrivateKey,
) *ScheduleSignTransaction

Sign uses the provided privateKey to sign the transaction.

func (*ScheduleSignTransaction) SignWith added in v2.1.4

func (transaction *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 (transaction *ScheduleSignTransaction) SignWithOperator(
	client *Client,
) (*ScheduleSignTransaction, error)

type SemanticVersion

type SemanticVersion struct {
	Major uint32
	Minor uint32
	Patch uint32
}

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
	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
)

func (Status) String

func (status Status) String() string

String() returns a string representation of the status

type SubscriptionHandle

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

func (SubscriptionHandle) Unsubscribe

func (handle SubscriptionHandle) Unsubscribe()

type SystemDeleteTransaction

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

func NewSystemDeleteTransaction

func NewSystemDeleteTransaction() *SystemDeleteTransaction

func (*SystemDeleteTransaction) AddSignature added in v2.1.3

func (transaction *SystemDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *SystemDeleteTransaction

func (*SystemDeleteTransaction) Execute

func (transaction *SystemDeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*SystemDeleteTransaction) Freeze

func (transaction *SystemDeleteTransaction) Freeze() (*SystemDeleteTransaction, error)

func (*SystemDeleteTransaction) FreezeWith

func (transaction *SystemDeleteTransaction) FreezeWith(client *Client) (*SystemDeleteTransaction, error)

func (*SystemDeleteTransaction) GetContract

func (transaction *SystemDeleteTransaction) GetContract() ContractID

func (*SystemDeleteTransaction) GetExpirationTime

func (transaction *SystemDeleteTransaction) GetExpirationTime() int64

func (*SystemDeleteTransaction) GetFileID

func (transaction *SystemDeleteTransaction) GetFileID() FileID

func (*SystemDeleteTransaction) GetMaxTransactionFee

func (transaction *SystemDeleteTransaction) GetMaxTransactionFee() Hbar

func (*SystemDeleteTransaction) GetTransactionID

func (transaction *SystemDeleteTransaction) GetTransactionID() TransactionID

func (*SystemDeleteTransaction) GetTransactionMemo

func (transaction *SystemDeleteTransaction) GetTransactionMemo() string

func (*SystemDeleteTransaction) GetTransactionValidDuration

func (transaction *SystemDeleteTransaction) GetTransactionValidDuration() time.Duration

func (*SystemDeleteTransaction) IsFrozen

func (transaction *SystemDeleteTransaction) IsFrozen() bool

func (*SystemDeleteTransaction) Schedule added in v2.1.5

func (transaction *SystemDeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*SystemDeleteTransaction) SetContractID

func (transaction *SystemDeleteTransaction) SetContractID(contractID ContractID) *SystemDeleteTransaction

func (*SystemDeleteTransaction) SetExpirationTime

func (transaction *SystemDeleteTransaction) SetExpirationTime(expiration time.Time) *SystemDeleteTransaction

func (*SystemDeleteTransaction) SetFileID

func (transaction *SystemDeleteTransaction) SetFileID(fileID FileID) *SystemDeleteTransaction

func (*SystemDeleteTransaction) SetMaxRetry added in v2.1.2

func (transaction *SystemDeleteTransaction) SetMaxRetry(count int) *SystemDeleteTransaction

func (*SystemDeleteTransaction) SetMaxTransactionFee

func (transaction *SystemDeleteTransaction) SetMaxTransactionFee(fee Hbar) *SystemDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetNodeAccountIDs

func (transaction *SystemDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *SystemDeleteTransaction

SetNodeAccountID sets the node AccountID for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetTransactionID

func (transaction *SystemDeleteTransaction) SetTransactionID(transactionID TransactionID) *SystemDeleteTransaction

SetTransactionID sets the TransactionID for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetTransactionMemo

func (transaction *SystemDeleteTransaction) SetTransactionMemo(memo string) *SystemDeleteTransaction

SetTransactionMemo sets the memo for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) SetTransactionValidDuration

func (transaction *SystemDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *SystemDeleteTransaction

SetTransactionValidDuration sets the valid duration for this SystemDeleteTransaction.

func (*SystemDeleteTransaction) Sign

func (transaction *SystemDeleteTransaction) Sign(
	privateKey PrivateKey,
) *SystemDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*SystemDeleteTransaction) SignWith

func (transaction *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 (transaction *SystemDeleteTransaction) SignWithOperator(
	client *Client,
) (*SystemDeleteTransaction, error)

type SystemUndeleteTransaction

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

func NewSystemUndeleteTransaction

func NewSystemUndeleteTransaction() *SystemUndeleteTransaction

func (*SystemUndeleteTransaction) AddSignature added in v2.1.3

func (transaction *SystemUndeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *SystemUndeleteTransaction

func (*SystemUndeleteTransaction) Execute

func (transaction *SystemUndeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*SystemUndeleteTransaction) Freeze

func (transaction *SystemUndeleteTransaction) Freeze() (*SystemUndeleteTransaction, error)

func (*SystemUndeleteTransaction) FreezeWith

func (transaction *SystemUndeleteTransaction) FreezeWith(client *Client) (*SystemUndeleteTransaction, error)

func (*SystemUndeleteTransaction) GetContract

func (transaction *SystemUndeleteTransaction) GetContract() ContractID

func (*SystemUndeleteTransaction) GetFileID

func (transaction *SystemUndeleteTransaction) GetFileID() FileID

func (*SystemUndeleteTransaction) GetMaxTransactionFee

func (transaction *SystemUndeleteTransaction) GetMaxTransactionFee() Hbar

func (*SystemUndeleteTransaction) GetTransactionID

func (transaction *SystemUndeleteTransaction) GetTransactionID() TransactionID

func (*SystemUndeleteTransaction) GetTransactionMemo

func (transaction *SystemUndeleteTransaction) GetTransactionMemo() string

func (*SystemUndeleteTransaction) GetTransactionValidDuration

func (transaction *SystemUndeleteTransaction) GetTransactionValidDuration() time.Duration

func (*SystemUndeleteTransaction) IsFrozen

func (transaction *SystemUndeleteTransaction) IsFrozen() bool

func (*SystemUndeleteTransaction) Schedule added in v2.1.5

func (transaction *SystemUndeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*SystemUndeleteTransaction) SetContractID

func (transaction *SystemUndeleteTransaction) SetContractID(contractID ContractID) *SystemUndeleteTransaction

func (*SystemUndeleteTransaction) SetFileID

func (transaction *SystemUndeleteTransaction) SetFileID(fileID FileID) *SystemUndeleteTransaction

func (*SystemUndeleteTransaction) SetMaxRetry added in v2.1.2

func (transaction *SystemUndeleteTransaction) SetMaxRetry(count int) *SystemUndeleteTransaction

func (*SystemUndeleteTransaction) SetMaxTransactionFee

func (transaction *SystemUndeleteTransaction) SetMaxTransactionFee(fee Hbar) *SystemUndeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetNodeAccountIDs

func (transaction *SystemUndeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *SystemUndeleteTransaction

SetNodeAccountID sets the node AccountID for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetTransactionID

func (transaction *SystemUndeleteTransaction) SetTransactionID(transactionID TransactionID) *SystemUndeleteTransaction

SetTransactionID sets the TransactionID for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetTransactionMemo

func (transaction *SystemUndeleteTransaction) SetTransactionMemo(memo string) *SystemUndeleteTransaction

SetTransactionMemo sets the memo for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) SetTransactionValidDuration

func (transaction *SystemUndeleteTransaction) SetTransactionValidDuration(duration time.Duration) *SystemUndeleteTransaction

SetTransactionValidDuration sets the valid duration for this SystemUndeleteTransaction.

func (*SystemUndeleteTransaction) Sign

func (transaction *SystemUndeleteTransaction) Sign(
	privateKey PrivateKey,
) *SystemUndeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*SystemUndeleteTransaction) SignWith

func (transaction *SystemUndeleteTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *SystemUndeleteTransaction

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 (transaction *SystemUndeleteTransaction) SignWithOperator(
	client *Client,
) (*SystemUndeleteTransaction, error)

type TokenAssociateTransaction

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

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

func (*TokenAssociateTransaction) AddSignature added in v2.1.3

func (transaction *TokenAssociateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenAssociateTransaction

func (*TokenAssociateTransaction) AddTokenID

func (transaction *TokenAssociateTransaction) AddTokenID(tokenID TokenID) *TokenAssociateTransaction

func (*TokenAssociateTransaction) Execute

func (transaction *TokenAssociateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenAssociateTransaction) Freeze

func (transaction *TokenAssociateTransaction) Freeze() (*TokenAssociateTransaction, error)

func (*TokenAssociateTransaction) FreezeWith

func (transaction *TokenAssociateTransaction) FreezeWith(client *Client) (*TokenAssociateTransaction, error)

func (*TokenAssociateTransaction) GetAccountID

func (transaction *TokenAssociateTransaction) GetAccountID() AccountID

func (*TokenAssociateTransaction) GetMaxTransactionFee

func (transaction *TokenAssociateTransaction) GetMaxTransactionFee() Hbar

func (*TokenAssociateTransaction) GetTokenIDs

func (transaction *TokenAssociateTransaction) GetTokenIDs() []TokenID

func (*TokenAssociateTransaction) GetTransactionID

func (transaction *TokenAssociateTransaction) GetTransactionID() TransactionID

func (*TokenAssociateTransaction) GetTransactionMemo

func (transaction *TokenAssociateTransaction) GetTransactionMemo() string

func (*TokenAssociateTransaction) GetTransactionValidDuration

func (transaction *TokenAssociateTransaction) GetTransactionValidDuration() time.Duration

func (*TokenAssociateTransaction) IsFrozen

func (transaction *TokenAssociateTransaction) IsFrozen() bool

func (*TokenAssociateTransaction) Schedule added in v2.1.5

func (transaction *TokenAssociateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenAssociateTransaction) SetAccountID

func (transaction *TokenAssociateTransaction) SetAccountID(accountID AccountID) *TokenAssociateTransaction

The account to be associated with the provided tokens

func (*TokenAssociateTransaction) SetMaxRetry added in v2.1.2

func (transaction *TokenAssociateTransaction) SetMaxRetry(count int) *TokenAssociateTransaction

func (*TokenAssociateTransaction) SetMaxTransactionFee

func (transaction *TokenAssociateTransaction) SetMaxTransactionFee(fee Hbar) *TokenAssociateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetNodeAccountIDs

func (transaction *TokenAssociateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenAssociateTransaction

SetNodeTokenID sets the node TokenID for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetTokenIDs

func (transaction *TokenAssociateTransaction) SetTokenIDs(tokenIDs ...TokenID) *TokenAssociateTransaction

The tokens to be associated with the provided account

func (*TokenAssociateTransaction) SetTransactionID

func (transaction *TokenAssociateTransaction) SetTransactionID(transactionID TransactionID) *TokenAssociateTransaction

SetTransactionID sets the TransactionID for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetTransactionMemo

func (transaction *TokenAssociateTransaction) SetTransactionMemo(memo string) *TokenAssociateTransaction

SetTransactionMemo sets the memo for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) SetTransactionValidDuration

func (transaction *TokenAssociateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenAssociateTransaction

SetTransactionValidDuration sets the valid duration for this TokenAssociateTransaction.

func (*TokenAssociateTransaction) Sign

func (transaction *TokenAssociateTransaction) Sign(
	privateKey PrivateKey,
) *TokenAssociateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenAssociateTransaction) SignWith

func (transaction *TokenAssociateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenAssociateTransaction

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 (transaction *TokenAssociateTransaction) SignWithOperator(
	client *Client,
) (*TokenAssociateTransaction, error)

type TokenBurnTransaction

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

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

func (*TokenBurnTransaction) AddSignature added in v2.1.3

func (transaction *TokenBurnTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenBurnTransaction

func (*TokenBurnTransaction) Execute

func (transaction *TokenBurnTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenBurnTransaction) Freeze

func (transaction *TokenBurnTransaction) Freeze() (*TokenBurnTransaction, error)

func (*TokenBurnTransaction) FreezeWith

func (transaction *TokenBurnTransaction) FreezeWith(client *Client) (*TokenBurnTransaction, error)

func (*TokenBurnTransaction) GetAmmount

func (transaction *TokenBurnTransaction) GetAmmount() uint64

func (*TokenBurnTransaction) GetMaxTransactionFee

func (transaction *TokenBurnTransaction) GetMaxTransactionFee() Hbar

func (*TokenBurnTransaction) GetTokenID

func (transaction *TokenBurnTransaction) GetTokenID() TokenID

func (*TokenBurnTransaction) GetTransactionID

func (transaction *TokenBurnTransaction) GetTransactionID() TransactionID

func (*TokenBurnTransaction) GetTransactionMemo

func (transaction *TokenBurnTransaction) GetTransactionMemo() string

func (*TokenBurnTransaction) GetTransactionValidDuration

func (transaction *TokenBurnTransaction) GetTransactionValidDuration() time.Duration

func (*TokenBurnTransaction) IsFrozen

func (transaction *TokenBurnTransaction) IsFrozen() bool

func (*TokenBurnTransaction) Schedule added in v2.1.5

func (transaction *TokenBurnTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenBurnTransaction) SetAmount

func (transaction *TokenBurnTransaction) SetAmount(amount uint64) *TokenBurnTransaction

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) SetMaxRetry added in v2.1.2

func (transaction *TokenBurnTransaction) SetMaxRetry(count int) *TokenBurnTransaction

func (*TokenBurnTransaction) SetMaxTransactionFee

func (transaction *TokenBurnTransaction) SetMaxTransactionFee(fee Hbar) *TokenBurnTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetNodeAccountIDs

func (transaction *TokenBurnTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenBurnTransaction

SetNodeTokenID sets the node TokenID for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetTokenID

func (transaction *TokenBurnTransaction) SetTokenID(tokenID TokenID) *TokenBurnTransaction

The token for which to burn tokens. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenBurnTransaction) SetTransactionID

func (transaction *TokenBurnTransaction) SetTransactionID(transactionID TransactionID) *TokenBurnTransaction

SetTransactionID sets the TransactionID for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetTransactionMemo

func (transaction *TokenBurnTransaction) SetTransactionMemo(memo string) *TokenBurnTransaction

SetTransactionMemo sets the memo for this TokenBurnTransaction.

func (*TokenBurnTransaction) SetTransactionValidDuration

func (transaction *TokenBurnTransaction) SetTransactionValidDuration(duration time.Duration) *TokenBurnTransaction

SetTransactionValidDuration sets the valid duration for this TokenBurnTransaction.

func (*TokenBurnTransaction) Sign

func (transaction *TokenBurnTransaction) Sign(
	privateKey PrivateKey,
) *TokenBurnTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenBurnTransaction) SignWith

func (transaction *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 (transaction *TokenBurnTransaction) SignWithOperator(
	client *Client,
) (*TokenBurnTransaction, error)

type TokenCreateTransaction

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

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 supply that is going to be put in circulation is going to be the initial supply provided. The maximum supply a token can have is 2^63-1.

Example: Token A has initial supply set to 10_000 and decimals set to 2. The tokens that will be put into circulation are going be 100. Token B has initial supply set to 10_012_345_678 and decimals set to 8. The number of tokens that will be put into circulation are going to be 100.12345678

Creating immutable token: Token can be created as immutable if the adminKey is omitted. In this case, the name, symbol, treasury, management keys, expiry and renew properties cannot be updated. If a token is created as immutable, anyone is able to extend the expiry time by paying the fee.

func NewTokenCreateTransaction

func NewTokenCreateTransaction() *TokenCreateTransaction

func (*TokenCreateTransaction) AddSignature added in v2.1.3

func (transaction *TokenCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenCreateTransaction

func (*TokenCreateTransaction) Execute

func (transaction *TokenCreateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenCreateTransaction) Freeze

func (transaction *TokenCreateTransaction) Freeze() (*TokenCreateTransaction, error)

func (*TokenCreateTransaction) FreezeWith

func (transaction *TokenCreateTransaction) FreezeWith(client *Client) (*TokenCreateTransaction, error)

func (*TokenCreateTransaction) GetAdminKey

func (transaction *TokenCreateTransaction) GetAdminKey() Key

func (*TokenCreateTransaction) GetAutoRenewAccount

func (transaction *TokenCreateTransaction) GetAutoRenewAccount() AccountID

func (*TokenCreateTransaction) GetAutoRenewPeriod

func (transaction *TokenCreateTransaction) GetAutoRenewPeriod() time.Duration

func (*TokenCreateTransaction) GetDecimals

func (transaction *TokenCreateTransaction) GetDecimals() uint

func (*TokenCreateTransaction) GetExpirationTime

func (transaction *TokenCreateTransaction) GetExpirationTime() time.Time

func (*TokenCreateTransaction) GetFreezeDefault

func (transaction *TokenCreateTransaction) GetFreezeDefault() bool

func (*TokenCreateTransaction) GetFreezeKey

func (transaction *TokenCreateTransaction) GetFreezeKey() Key

func (*TokenCreateTransaction) GetInitialSupply

func (transaction *TokenCreateTransaction) GetInitialSupply() uint64

func (*TokenCreateTransaction) GetKycKey

func (transaction *TokenCreateTransaction) GetKycKey() Key

func (*TokenCreateTransaction) GetMaxTransactionFee

func (transaction *TokenCreateTransaction) GetMaxTransactionFee() Hbar

func (*TokenCreateTransaction) GetSupplyKey

func (transaction *TokenCreateTransaction) GetSupplyKey() Key

func (*TokenCreateTransaction) GetTokenName

func (transaction *TokenCreateTransaction) GetTokenName() string

func (*TokenCreateTransaction) GetTokenSymbol

func (transaction *TokenCreateTransaction) GetTokenSymbol() string

func (*TokenCreateTransaction) GetTransactionID

func (transaction *TokenCreateTransaction) GetTransactionID() TransactionID

func (*TokenCreateTransaction) GetTransactionMemo

func (transaction *TokenCreateTransaction) GetTransactionMemo() string

func (*TokenCreateTransaction) GetTransactionValidDuration

func (transaction *TokenCreateTransaction) GetTransactionValidDuration() time.Duration

func (*TokenCreateTransaction) GetTreasuryAccountID

func (transaction *TokenCreateTransaction) GetTreasuryAccountID() AccountID

func (*TokenCreateTransaction) GetWipeKey

func (transaction *TokenCreateTransaction) GetWipeKey() Key

func (*TokenCreateTransaction) IsFrozen

func (transaction *TokenCreateTransaction) IsFrozen() bool

func (*TokenCreateTransaction) Schedule added in v2.1.5

func (transaction *TokenCreateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenCreateTransaction) SetAdminKey

func (transaction *TokenCreateTransaction) SetAdminKey(publicKey Key) *TokenCreateTransaction

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 (transaction *TokenCreateTransaction) SetAutoRenewAccount(autoRenewAccount AccountID) *TokenCreateTransaction

An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval

func (*TokenCreateTransaction) SetAutoRenewPeriod

func (transaction *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) SetDecimals

func (transaction *TokenCreateTransaction) SetDecimals(decimals uint) *TokenCreateTransaction

The number of decimal places a token is divisible by. This field can never be changed!

func (*TokenCreateTransaction) SetExpirationTime

func (transaction *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) SetFreezeDefault

func (transaction *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 (transaction *TokenCreateTransaction) SetFreezeKey(publicKey Key) *TokenCreateTransaction

The key which can sign to freeze or unfreeze an account for token transactions. If empty, freezing is not possible

func (*TokenCreateTransaction) SetInitialSupply

func (transaction *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 (transaction *TokenCreateTransaction) SetKycKey(publicKey Key) *TokenCreateTransaction

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) SetMaxRetry added in v2.1.2

func (transaction *TokenCreateTransaction) SetMaxRetry(count int) *TokenCreateTransaction

func (*TokenCreateTransaction) SetMaxTransactionFee

func (transaction *TokenCreateTransaction) SetMaxTransactionFee(fee Hbar) *TokenCreateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetNodeAccountIDs

func (transaction *TokenCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenCreateTransaction

SetNodeTokenID sets the node TokenID for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetSupplyKey

func (transaction *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) SetTokenMemo added in v2.1.5

func (transaction *TokenCreateTransaction) SetTokenMemo(memo string) *TokenCreateTransaction

The publicly visible token memo. It is max 100 bytes.

func (*TokenCreateTransaction) SetTokenName

func (transaction *TokenCreateTransaction) SetTokenName(name string) *TokenCreateTransaction

The publicly visible name of the token, specified as a string of only ASCII characters

func (*TokenCreateTransaction) SetTokenSymbol

func (transaction *TokenCreateTransaction) SetTokenSymbol(symbol string) *TokenCreateTransaction

The publicly visible token symbol. It is UTF-8 capitalized alphabetical string identifying the token

func (*TokenCreateTransaction) SetTransactionID

func (transaction *TokenCreateTransaction) SetTransactionID(transactionID TransactionID) *TokenCreateTransaction

SetTransactionID sets the TransactionID for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetTransactionMemo

func (transaction *TokenCreateTransaction) SetTransactionMemo(memo string) *TokenCreateTransaction

SetTransactionMemo sets the memo for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetTransactionValidDuration

func (transaction *TokenCreateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenCreateTransaction

SetTransactionValidDuration sets the valid duration for this TokenCreateTransaction.

func (*TokenCreateTransaction) SetTreasuryAccountID

func (transaction *TokenCreateTransaction) SetTreasuryAccountID(treasury AccountID) *TokenCreateTransaction

The account which will act as a treasury for the token. This account will receive the specified initial supply

func (*TokenCreateTransaction) SetWipeKey

func (transaction *TokenCreateTransaction) SetWipeKey(publicKey Key) *TokenCreateTransaction

The key which can wipe the token balance of an account. If empty, wipe is not possible

func (*TokenCreateTransaction) Sign

func (transaction *TokenCreateTransaction) Sign(
	privateKey PrivateKey,
) *TokenCreateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenCreateTransaction) SignWith

func (transaction *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 (transaction *TokenCreateTransaction) SignWithOperator(
	client *Client,
) (*TokenCreateTransaction, error)

type TokenDeleteTransaction

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

Deletes an already created Token. If no value is given for a field, that field is left unchanged. For an immutable tokens (that is, a token created without an adminKey), only the expiry may be deleted. Setting any other field in that case will cause the transaction status to resolve to TOKEN_IS_IMMUTABlE.

func NewTokenDeleteTransaction

func NewTokenDeleteTransaction() *TokenDeleteTransaction

func (*TokenDeleteTransaction) AddSignature added in v2.1.3

func (transaction *TokenDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenDeleteTransaction

func (*TokenDeleteTransaction) Execute

func (transaction *TokenDeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenDeleteTransaction) Freeze

func (transaction *TokenDeleteTransaction) Freeze() (*TokenDeleteTransaction, error)

func (*TokenDeleteTransaction) FreezeWith

func (transaction *TokenDeleteTransaction) FreezeWith(client *Client) (*TokenDeleteTransaction, error)

func (*TokenDeleteTransaction) GetMaxTransactionFee

func (transaction *TokenDeleteTransaction) GetMaxTransactionFee() Hbar

func (*TokenDeleteTransaction) GetTokenID

func (transaction *TokenDeleteTransaction) GetTokenID() TokenID

func (*TokenDeleteTransaction) GetTransactionID

func (transaction *TokenDeleteTransaction) GetTransactionID() TransactionID

func (*TokenDeleteTransaction) GetTransactionMemo

func (transaction *TokenDeleteTransaction) GetTransactionMemo() string

func (*TokenDeleteTransaction) GetTransactionValidDuration

func (transaction *TokenDeleteTransaction) GetTransactionValidDuration() time.Duration

func (*TokenDeleteTransaction) IsFrozen

func (transaction *TokenDeleteTransaction) IsFrozen() bool

func (*TokenDeleteTransaction) Schedule added in v2.1.5

func (transaction *TokenDeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenDeleteTransaction) SetMaxRetry added in v2.1.2

func (transaction *TokenDeleteTransaction) SetMaxRetry(count int) *TokenDeleteTransaction

func (*TokenDeleteTransaction) SetMaxTransactionFee

func (transaction *TokenDeleteTransaction) SetMaxTransactionFee(fee Hbar) *TokenDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetNodeAccountIDs

func (transaction *TokenDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenDeleteTransaction

SetNodeTokenID sets the node TokenID for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetTokenID

func (transaction *TokenDeleteTransaction) SetTokenID(tokenID TokenID) *TokenDeleteTransaction

The Token to be deleted

func (*TokenDeleteTransaction) SetTransactionID

func (transaction *TokenDeleteTransaction) SetTransactionID(transactionID TransactionID) *TokenDeleteTransaction

SetTransactionID sets the TransactionID for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetTransactionMemo

func (transaction *TokenDeleteTransaction) SetTransactionMemo(memo string) *TokenDeleteTransaction

SetTransactionMemo sets the memo for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) SetTransactionValidDuration

func (transaction *TokenDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *TokenDeleteTransaction

SetTransactionValidDuration sets the valid duration for this TokenDeleteTransaction.

func (*TokenDeleteTransaction) Sign

func (transaction *TokenDeleteTransaction) Sign(
	privateKey PrivateKey,
) *TokenDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenDeleteTransaction) SignWith

func (transaction *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 (transaction *TokenDeleteTransaction) SignWithOperator(
	client *Client,
) (*TokenDeleteTransaction, error)

type TokenDissociateTransaction

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

func NewTokenDissociateTransaction

func NewTokenDissociateTransaction() *TokenDissociateTransaction

func (*TokenDissociateTransaction) AddSignature added in v2.1.3

func (transaction *TokenDissociateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenDissociateTransaction

func (*TokenDissociateTransaction) AddTokenID

func (transaction *TokenDissociateTransaction) AddTokenID(tokenID TokenID) *TokenDissociateTransaction

func (*TokenDissociateTransaction) Execute

func (transaction *TokenDissociateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenDissociateTransaction) Freeze

func (*TokenDissociateTransaction) FreezeWith

func (transaction *TokenDissociateTransaction) FreezeWith(client *Client) (*TokenDissociateTransaction, error)

func (*TokenDissociateTransaction) GetAccountID

func (transaction *TokenDissociateTransaction) GetAccountID() AccountID

func (*TokenDissociateTransaction) GetMaxTransactionFee

func (transaction *TokenDissociateTransaction) GetMaxTransactionFee() Hbar

func (*TokenDissociateTransaction) GetTokenIDs

func (transaction *TokenDissociateTransaction) GetTokenIDs() []TokenID

func (*TokenDissociateTransaction) GetTransactionID

func (transaction *TokenDissociateTransaction) GetTransactionID() TransactionID

func (*TokenDissociateTransaction) GetTransactionMemo

func (transaction *TokenDissociateTransaction) GetTransactionMemo() string

func (*TokenDissociateTransaction) GetTransactionValidDuration

func (transaction *TokenDissociateTransaction) GetTransactionValidDuration() time.Duration

func (*TokenDissociateTransaction) IsFrozen

func (transaction *TokenDissociateTransaction) IsFrozen() bool

func (*TokenDissociateTransaction) Schedule added in v2.1.5

func (transaction *TokenDissociateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenDissociateTransaction) SetAccountID

func (transaction *TokenDissociateTransaction) SetAccountID(accountID AccountID) *TokenDissociateTransaction

The account to be dissociated with the provided tokens

func (*TokenDissociateTransaction) SetMaxRetry added in v2.1.2

func (transaction *TokenDissociateTransaction) SetMaxRetry(count int) *TokenDissociateTransaction

func (*TokenDissociateTransaction) SetMaxTransactionFee

func (transaction *TokenDissociateTransaction) SetMaxTransactionFee(fee Hbar) *TokenDissociateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetNodeAccountIDs

func (transaction *TokenDissociateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenDissociateTransaction

SetNodeTokenID sets the node TokenID for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetTokenIDs

func (transaction *TokenDissociateTransaction) SetTokenIDs(tokenIDs ...TokenID) *TokenDissociateTransaction

The tokens to be dissociated with the provided account

func (*TokenDissociateTransaction) SetTransactionID

func (transaction *TokenDissociateTransaction) SetTransactionID(transactionID TransactionID) *TokenDissociateTransaction

SetTransactionID sets the TransactionID for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetTransactionMemo

func (transaction *TokenDissociateTransaction) SetTransactionMemo(memo string) *TokenDissociateTransaction

SetTransactionMemo sets the memo for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) SetTransactionValidDuration

func (transaction *TokenDissociateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenDissociateTransaction

SetTransactionValidDuration sets the valid duration for this TokenDissociateTransaction.

func (*TokenDissociateTransaction) Sign

func (transaction *TokenDissociateTransaction) Sign(
	privateKey PrivateKey,
) *TokenDissociateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenDissociateTransaction) SignWith

func (transaction *TokenDissociateTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenDissociateTransaction

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 (transaction *TokenDissociateTransaction) SignWithOperator(
	client *Client,
) (*TokenDissociateTransaction, error)

type TokenFreezeTransaction

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

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

func (*TokenFreezeTransaction) AddSignature added in v2.1.3

func (transaction *TokenFreezeTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenFreezeTransaction

func (*TokenFreezeTransaction) Execute

func (transaction *TokenFreezeTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenFreezeTransaction) Freeze

func (transaction *TokenFreezeTransaction) Freeze() (*TokenFreezeTransaction, error)

func (*TokenFreezeTransaction) FreezeWith

func (transaction *TokenFreezeTransaction) FreezeWith(client *Client) (*TokenFreezeTransaction, error)

func (*TokenFreezeTransaction) GetAccountID

func (transaction *TokenFreezeTransaction) GetAccountID() AccountID

func (*TokenFreezeTransaction) GetMaxTransactionFee

func (transaction *TokenFreezeTransaction) GetMaxTransactionFee() Hbar

func (*TokenFreezeTransaction) GetTokenID

func (transaction *TokenFreezeTransaction) GetTokenID() TokenID

func (*TokenFreezeTransaction) GetTransactionID

func (transaction *TokenFreezeTransaction) GetTransactionID() TransactionID

func (*TokenFreezeTransaction) GetTransactionMemo

func (transaction *TokenFreezeTransaction) GetTransactionMemo() string

func (*TokenFreezeTransaction) GetTransactionValidDuration

func (transaction *TokenFreezeTransaction) GetTransactionValidDuration() time.Duration

func (*TokenFreezeTransaction) IsFrozen

func (transaction *TokenFreezeTransaction) IsFrozen() bool

func (*TokenFreezeTransaction) Schedule added in v2.1.5

func (transaction *TokenFreezeTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenFreezeTransaction) SetAccountID

func (transaction *TokenFreezeTransaction) SetAccountID(accountID AccountID) *TokenFreezeTransaction

The account to be frozen

func (*TokenFreezeTransaction) SetMaxRetry added in v2.1.2

func (transaction *TokenFreezeTransaction) SetMaxRetry(count int) *TokenFreezeTransaction

func (*TokenFreezeTransaction) SetMaxTransactionFee

func (transaction *TokenFreezeTransaction) SetMaxTransactionFee(fee Hbar) *TokenFreezeTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetNodeAccountIDs

func (transaction *TokenFreezeTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenFreezeTransaction

SetNodeTokenID sets the node TokenID for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetTokenID

func (transaction *TokenFreezeTransaction) SetTokenID(tokenID TokenID) *TokenFreezeTransaction

The token for which this account will be frozen. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenFreezeTransaction) SetTransactionID

func (transaction *TokenFreezeTransaction) SetTransactionID(transactionID TransactionID) *TokenFreezeTransaction

SetTransactionID sets the TransactionID for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetTransactionMemo

func (transaction *TokenFreezeTransaction) SetTransactionMemo(memo string) *TokenFreezeTransaction

SetTransactionMemo sets the memo for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) SetTransactionValidDuration

func (transaction *TokenFreezeTransaction) SetTransactionValidDuration(duration time.Duration) *TokenFreezeTransaction

SetTransactionValidDuration sets the valid duration for this TokenFreezeTransaction.

func (*TokenFreezeTransaction) Sign

func (transaction *TokenFreezeTransaction) Sign(
	privateKey PrivateKey,
) *TokenFreezeTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenFreezeTransaction) SignWith

func (transaction *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 (transaction *TokenFreezeTransaction) SignWithOperator(
	client *Client,
) (*TokenFreezeTransaction, error)

type TokenGrantKycTransaction

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

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

func (*TokenGrantKycTransaction) AddSignature added in v2.1.3

func (transaction *TokenGrantKycTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenGrantKycTransaction

func (*TokenGrantKycTransaction) Execute

func (transaction *TokenGrantKycTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenGrantKycTransaction) Freeze

func (transaction *TokenGrantKycTransaction) Freeze() (*TokenGrantKycTransaction, error)

func (*TokenGrantKycTransaction) FreezeWith

func (transaction *TokenGrantKycTransaction) FreezeWith(client *Client) (*TokenGrantKycTransaction, error)

func (*TokenGrantKycTransaction) GetAccountID

func (transaction *TokenGrantKycTransaction) GetAccountID() AccountID

func (*TokenGrantKycTransaction) GetMaxTransactionFee

func (transaction *TokenGrantKycTransaction) GetMaxTransactionFee() Hbar

func (*TokenGrantKycTransaction) GetTokenID

func (transaction *TokenGrantKycTransaction) GetTokenID() TokenID

func (*TokenGrantKycTransaction) GetTransactionID

func (transaction *TokenGrantKycTransaction) GetTransactionID() TransactionID

func (*TokenGrantKycTransaction) GetTransactionMemo

func (transaction *TokenGrantKycTransaction) GetTransactionMemo() string

func (*TokenGrantKycTransaction) GetTransactionValidDuration

func (transaction *TokenGrantKycTransaction) GetTransactionValidDuration() time.Duration

func (*TokenGrantKycTransaction) IsFrozen

func (transaction *TokenGrantKycTransaction) IsFrozen() bool

func (*TokenGrantKycTransaction) Schedule added in v2.1.5

func (transaction *TokenGrantKycTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenGrantKycTransaction) SetAccountID

func (transaction *TokenGrantKycTransaction) SetAccountID(accountID AccountID) *TokenGrantKycTransaction

The account to be KYCed

func (*TokenGrantKycTransaction) SetMaxRetry added in v2.1.2

func (transaction *TokenGrantKycTransaction) SetMaxRetry(count int) *TokenGrantKycTransaction

func (*TokenGrantKycTransaction) SetMaxTransactionFee

func (transaction *TokenGrantKycTransaction) SetMaxTransactionFee(fee Hbar) *TokenGrantKycTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetNodeAccountIDs

func (transaction *TokenGrantKycTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenGrantKycTransaction

SetNodeTokenID sets the node TokenID for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetTokenID

func (transaction *TokenGrantKycTransaction) SetTokenID(tokenID TokenID) *TokenGrantKycTransaction

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 (transaction *TokenGrantKycTransaction) SetTransactionID(transactionID TransactionID) *TokenGrantKycTransaction

SetTransactionID sets the TransactionID for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetTransactionMemo

func (transaction *TokenGrantKycTransaction) SetTransactionMemo(memo string) *TokenGrantKycTransaction

SetTransactionMemo sets the memo for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) SetTransactionValidDuration

func (transaction *TokenGrantKycTransaction) SetTransactionValidDuration(duration time.Duration) *TokenGrantKycTransaction

SetTransactionValidDuration sets the valid duration for this TokenGrantKycTransaction.

func (*TokenGrantKycTransaction) Sign

func (transaction *TokenGrantKycTransaction) Sign(
	privateKey PrivateKey,
) *TokenGrantKycTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenGrantKycTransaction) SignWith

func (transaction *TokenGrantKycTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenGrantKycTransaction

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 (transaction *TokenGrantKycTransaction) SignWithOperator(
	client *Client,
) (*TokenGrantKycTransaction, error)

type TokenID

type TokenID struct {
	Shard uint64
	Realm uint64
	Token uint64
}

func TokenIDFromBytes added in v2.1.3

func TokenIDFromBytes(data []byte) (TokenID, error)

func TokenIDFromString added in v2.1.4

func TokenIDFromString(s string) (TokenID, error)

TokenIDFromString constructs an TokenID from a string formatted as `Shard.Realm.TokenID` (for example "0.0.3")

func (TokenID) String

func (id TokenID) String() string

func (TokenID) ToBytes added in v2.1.3

func (id TokenID) ToBytes() []byte

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
}

func TokenInfoFromBytes added in v2.1.3

func TokenInfoFromBytes(data []byte) (TokenInfo, error)

func (*TokenInfo) FreezeStatusToProtobuf

func (tokenInfo *TokenInfo) FreezeStatusToProtobuf() *proto.TokenFreezeStatus

func (*TokenInfo) KycStatusToProtobuf

func (tokenInfo *TokenInfo) KycStatusToProtobuf() *proto.TokenKycStatus

func (TokenInfo) ToBytes added in v2.1.3

func (tokenInfo TokenInfo) ToBytes() []byte

type TokenInfoQuery

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

func NewTokenInfoQuery

func NewTokenInfoQuery() *TokenInfoQuery

NewTopicInfoQuery creates a TopicInfoQuery query which can be used to construct and execute a

Get Topic Info Query.

func (*TokenInfoQuery) Execute

func (query *TokenInfoQuery) Execute(client *Client) (TokenInfo, error)

Execute executes the TopicInfoQuery using the provided client

func (*TokenInfoQuery) GetCost

func (query *TokenInfoQuery) GetCost(client *Client) (Hbar, error)

func (*TokenInfoQuery) GetTokenID

func (query *TokenInfoQuery) GetTokenID() TokenID

func (*TokenInfoQuery) SetMaxQueryPayment

func (query *TokenInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *TokenInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*TokenInfoQuery) SetMaxRetry added in v2.1.2

func (query *TokenInfoQuery) SetMaxRetry(count int) *TokenInfoQuery

func (*TokenInfoQuery) SetNodeAccountIDs

func (query *TokenInfoQuery) SetNodeAccountIDs(accountID []AccountID) *TokenInfoQuery

func (*TokenInfoQuery) SetQueryPayment

func (query *TokenInfoQuery) SetQueryPayment(paymentAmount Hbar) *TokenInfoQuery

SetQueryPayment sets the payment amount for this Query.

func (*TokenInfoQuery) SetTokenID

func (query *TokenInfoQuery) SetTokenID(id TokenID) *TokenInfoQuery

SetTopicID sets the topic to retrieve info about (the parameters and running state of).

type TokenMintTransaction

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

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

func (*TokenMintTransaction) AddSignature added in v2.1.3

func (transaction *TokenMintTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenMintTransaction

func (*TokenMintTransaction) Execute

func (transaction *TokenMintTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenMintTransaction) Freeze

func (transaction *TokenMintTransaction) Freeze() (*TokenMintTransaction, error)

func (*TokenMintTransaction) FreezeWith

func (transaction *TokenMintTransaction) FreezeWith(client *Client) (*TokenMintTransaction, error)

func (*TokenMintTransaction) GetAmount

func (transaction *TokenMintTransaction) GetAmount() uint64

func (*TokenMintTransaction) GetMaxTransactionFee

func (transaction *TokenMintTransaction) GetMaxTransactionFee() Hbar

func (*TokenMintTransaction) GetTokenID

func (transaction *TokenMintTransaction) GetTokenID() TokenID

func (*TokenMintTransaction) GetTransactionID

func (transaction *TokenMintTransaction) GetTransactionID() TransactionID

func (*TokenMintTransaction) GetTransactionMemo

func (transaction *TokenMintTransaction) GetTransactionMemo() string

func (*TokenMintTransaction) GetTransactionValidDuration

func (transaction *TokenMintTransaction) GetTransactionValidDuration() time.Duration

func (*TokenMintTransaction) IsFrozen

func (transaction *TokenMintTransaction) IsFrozen() bool

func (*TokenMintTransaction) Schedule added in v2.1.5

func (transaction *TokenMintTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenMintTransaction) SetAmount

func (transaction *TokenMintTransaction) SetAmount(amount uint64) *TokenMintTransaction

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) SetMaxRetry added in v2.1.2

func (transaction *TokenMintTransaction) SetMaxRetry(count int) *TokenMintTransaction

func (*TokenMintTransaction) SetMaxTransactionFee

func (transaction *TokenMintTransaction) SetMaxTransactionFee(fee Hbar) *TokenMintTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenMintTransaction.

func (*TokenMintTransaction) SetNodeAccountIDs

func (transaction *TokenMintTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenMintTransaction

SetNodeTokenID sets the node TokenID for this TokenMintTransaction.

func (*TokenMintTransaction) SetTokenID

func (transaction *TokenMintTransaction) SetTokenID(tokenID TokenID) *TokenMintTransaction

The token for which to mint tokens. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenMintTransaction) SetTransactionID

func (transaction *TokenMintTransaction) SetTransactionID(transactionID TransactionID) *TokenMintTransaction

SetTransactionID sets the TransactionID for this TokenMintTransaction.

func (*TokenMintTransaction) SetTransactionMemo

func (transaction *TokenMintTransaction) SetTransactionMemo(memo string) *TokenMintTransaction

SetTransactionMemo sets the memo for this TokenMintTransaction.

func (*TokenMintTransaction) SetTransactionValidDuration

func (transaction *TokenMintTransaction) SetTransactionValidDuration(duration time.Duration) *TokenMintTransaction

SetTransactionValidDuration sets the valid duration for this TokenMintTransaction.

func (*TokenMintTransaction) Sign

func (transaction *TokenMintTransaction) Sign(
	privateKey PrivateKey,
) *TokenMintTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenMintTransaction) SignWith

func (transaction *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 (transaction *TokenMintTransaction) SignWithOperator(
	client *Client,
) (*TokenMintTransaction, error)

type TokenRelationship

type TokenRelationship struct {
	TokenID      TokenID
	Symbol       string
	Balance      uint64
	KycStatus    *bool
	FreezeStatus *bool
}

func TokenRelationshipFromBytes added in v2.1.3

func TokenRelationshipFromBytes(data []byte) (TokenRelationship, error)

func (TokenRelationship) ToBytes added in v2.1.3

func (relationship TokenRelationship) ToBytes() []byte

type TokenRevokeKycTransaction

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

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

func (*TokenRevokeKycTransaction) AddSignature added in v2.1.3

func (transaction *TokenRevokeKycTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenRevokeKycTransaction

func (*TokenRevokeKycTransaction) Execute

func (transaction *TokenRevokeKycTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenRevokeKycTransaction) Freeze

func (transaction *TokenRevokeKycTransaction) Freeze() (*TokenRevokeKycTransaction, error)

func (*TokenRevokeKycTransaction) FreezeWith

func (transaction *TokenRevokeKycTransaction) FreezeWith(client *Client) (*TokenRevokeKycTransaction, error)

func (*TokenRevokeKycTransaction) GetAccountID added in v2.1.3

func (transaction *TokenRevokeKycTransaction) GetAccountID() AccountID

func (*TokenRevokeKycTransaction) GetMaxTransactionFee

func (transaction *TokenRevokeKycTransaction) GetMaxTransactionFee() Hbar

func (*TokenRevokeKycTransaction) GetTokenID

func (transaction *TokenRevokeKycTransaction) GetTokenID() TokenID

func (*TokenRevokeKycTransaction) GetTransactionID

func (transaction *TokenRevokeKycTransaction) GetTransactionID() TransactionID

func (*TokenRevokeKycTransaction) GetTransactionMemo

func (transaction *TokenRevokeKycTransaction) GetTransactionMemo() string

func (*TokenRevokeKycTransaction) GetTransactionValidDuration

func (transaction *TokenRevokeKycTransaction) GetTransactionValidDuration() time.Duration

func (*TokenRevokeKycTransaction) IsFrozen

func (transaction *TokenRevokeKycTransaction) IsFrozen() bool

func (*TokenRevokeKycTransaction) Schedule added in v2.1.5

func (transaction *TokenRevokeKycTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenRevokeKycTransaction) SetAccountID

func (transaction *TokenRevokeKycTransaction) SetAccountID(accountID AccountID) *TokenRevokeKycTransaction

The account to be KYC Revoked

func (*TokenRevokeKycTransaction) SetMaxRetry added in v2.1.2

func (transaction *TokenRevokeKycTransaction) SetMaxRetry(count int) *TokenRevokeKycTransaction

func (*TokenRevokeKycTransaction) SetMaxTransactionFee

func (transaction *TokenRevokeKycTransaction) SetMaxTransactionFee(fee Hbar) *TokenRevokeKycTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetNodeAccountIDs

func (transaction *TokenRevokeKycTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenRevokeKycTransaction

SetNodeTokenID sets the node TokenID for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetTokenID

func (transaction *TokenRevokeKycTransaction) SetTokenID(tokenID TokenID) *TokenRevokeKycTransaction

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 (transaction *TokenRevokeKycTransaction) SetTransactionID(transactionID TransactionID) *TokenRevokeKycTransaction

SetTransactionID sets the TransactionID for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetTransactionMemo

func (transaction *TokenRevokeKycTransaction) SetTransactionMemo(memo string) *TokenRevokeKycTransaction

SetTransactionMemo sets the memo for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) SetTransactionValidDuration

func (transaction *TokenRevokeKycTransaction) SetTransactionValidDuration(duration time.Duration) *TokenRevokeKycTransaction

SetTransactionValidDuration sets the valid duration for this TokenRevokeKycTransaction.

func (*TokenRevokeKycTransaction) Sign

func (transaction *TokenRevokeKycTransaction) Sign(
	privateKey PrivateKey,
) *TokenRevokeKycTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenRevokeKycTransaction) SignWith

func (transaction *TokenRevokeKycTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenRevokeKycTransaction

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 (transaction *TokenRevokeKycTransaction) SignWithOperator(
	client *Client,
) (*TokenRevokeKycTransaction, error)

type TokenTransfer

type TokenTransfer struct {
	AccountID AccountID
	Amount    int64
}

func NewTokenTransfer

func NewTokenTransfer(accountID AccountID, amount int64) TokenTransfer

func TokenTransferFromBytes added in v2.1.3

func TokenTransferFromBytes(data []byte) (TokenTransfer, error)

func (TokenTransfer) ToBytes added in v2.1.3

func (transfer TokenTransfer) ToBytes() []byte

type TokenUnfreezeTransaction

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

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

func (*TokenUnfreezeTransaction) AddSignature added in v2.1.3

func (transaction *TokenUnfreezeTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenUnfreezeTransaction

func (*TokenUnfreezeTransaction) Execute

func (transaction *TokenUnfreezeTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenUnfreezeTransaction) GetAccountID

func (transaction *TokenUnfreezeTransaction) GetAccountID() AccountID

func (*TokenUnfreezeTransaction) GetMaxTransactionFee

func (transaction *TokenUnfreezeTransaction) GetMaxTransactionFee() Hbar

func (*TokenUnfreezeTransaction) GetTokenID

func (transaction *TokenUnfreezeTransaction) GetTokenID() TokenID

func (*TokenUnfreezeTransaction) GetTransactionID

func (transaction *TokenUnfreezeTransaction) GetTransactionID() TransactionID

func (*TokenUnfreezeTransaction) GetTransactionMemo

func (transaction *TokenUnfreezeTransaction) GetTransactionMemo() string

func (*TokenUnfreezeTransaction) GetTransactionValidDuration

func (transaction *TokenUnfreezeTransaction) GetTransactionValidDuration() time.Duration

func (*TokenUnfreezeTransaction) IsFrozen

func (transaction *TokenUnfreezeTransaction) IsFrozen() bool

func (*TokenUnfreezeTransaction) Schedule added in v2.1.5

func (transaction *TokenUnfreezeTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenUnfreezeTransaction) SetAccountID

func (transaction *TokenUnfreezeTransaction) SetAccountID(accountID AccountID) *TokenUnfreezeTransaction

The account to be unfrozen

func (*TokenUnfreezeTransaction) SetMaxRetry added in v2.1.2

func (transaction *TokenUnfreezeTransaction) SetMaxRetry(count int) *TokenUnfreezeTransaction

func (*TokenUnfreezeTransaction) SetMaxTransactionFee

func (transaction *TokenUnfreezeTransaction) SetMaxTransactionFee(fee Hbar) *TokenUnfreezeTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetNodeAccountIDs

func (transaction *TokenUnfreezeTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenUnfreezeTransaction

SetNodeTokenID sets the node TokenID for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetTokenID

func (transaction *TokenUnfreezeTransaction) SetTokenID(tokenID TokenID) *TokenUnfreezeTransaction

The token for which this account will be unfrozen. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenUnfreezeTransaction) SetTransactionID

func (transaction *TokenUnfreezeTransaction) SetTransactionID(transactionID TransactionID) *TokenUnfreezeTransaction

SetTransactionID sets the TransactionID for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetTransactionMemo

func (transaction *TokenUnfreezeTransaction) SetTransactionMemo(memo string) *TokenUnfreezeTransaction

SetTransactionMemo sets the memo for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) SetTransactionValidDuration

func (transaction *TokenUnfreezeTransaction) SetTransactionValidDuration(duration time.Duration) *TokenUnfreezeTransaction

SetTransactionValidDuration sets the valid duration for this TokenUnfreezeTransaction.

func (*TokenUnfreezeTransaction) Sign

func (transaction *TokenUnfreezeTransaction) Sign(
	privateKey PrivateKey,
) *TokenUnfreezeTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenUnfreezeTransaction) SignWith

func (transaction *TokenUnfreezeTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TokenUnfreezeTransaction

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 (transaction *TokenUnfreezeTransaction) SignWithOperator(
	client *Client,
) (*TokenUnfreezeTransaction, error)

func (*TokenUnfreezeTransaction) Unfreeze

func (transaction *TokenUnfreezeTransaction) Unfreeze() (*TokenUnfreezeTransaction, error)

func (*TokenUnfreezeTransaction) UnfreezeWith

func (transaction *TokenUnfreezeTransaction) UnfreezeWith(client *Client) (*TokenUnfreezeTransaction, error)

type TokenUpdateTransaction

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

Updates an already created Token. If no value is given for a field, that field is left unchanged. For an immutable tokens (that is, a token created without an adminKey), only the expiry may be updated. Setting any other field in that case will cause the transaction status to resolve to TOKEN_IS_IMMUTABlE.

func NewTokenUpdateTransaction

func NewTokenUpdateTransaction() *TokenUpdateTransaction

func (*TokenUpdateTransaction) AddSignature added in v2.1.3

func (transaction *TokenUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenUpdateTransaction

func (*TokenUpdateTransaction) Execute

func (transaction *TokenUpdateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenUpdateTransaction) Freeze

func (transaction *TokenUpdateTransaction) Freeze() (*TokenUpdateTransaction, error)

func (*TokenUpdateTransaction) FreezeWith

func (transaction *TokenUpdateTransaction) FreezeWith(client *Client) (*TokenUpdateTransaction, error)

func (*TokenUpdateTransaction) GeTokenMemo added in v2.1.5

func (transaction *TokenUpdateTransaction) GeTokenMemo() string

func (*TokenUpdateTransaction) GetAdminKey

func (transaction *TokenUpdateTransaction) GetAdminKey() Key

func (*TokenUpdateTransaction) GetAutoRenewAccount

func (transaction *TokenUpdateTransaction) GetAutoRenewAccount() AccountID

func (*TokenUpdateTransaction) GetAutoRenewPeriod

func (transaction *TokenUpdateTransaction) GetAutoRenewPeriod() time.Duration

func (*TokenUpdateTransaction) GetExpirationTime

func (transaction *TokenUpdateTransaction) GetExpirationTime() time.Time

func (*TokenUpdateTransaction) GetFreezeKey

func (transaction *TokenUpdateTransaction) GetFreezeKey() Key

func (*TokenUpdateTransaction) GetKycKey

func (transaction *TokenUpdateTransaction) GetKycKey() Key

func (*TokenUpdateTransaction) GetMaxTransactionFee

func (transaction *TokenUpdateTransaction) GetMaxTransactionFee() Hbar

func (*TokenUpdateTransaction) GetSupplyKey

func (transaction *TokenUpdateTransaction) GetSupplyKey() Key

func (*TokenUpdateTransaction) GetTokenID

func (transaction *TokenUpdateTransaction) GetTokenID() TokenID

func (*TokenUpdateTransaction) GetTokenName

func (transaction *TokenUpdateTransaction) GetTokenName() string

func (*TokenUpdateTransaction) GetTokenSymbol

func (transaction *TokenUpdateTransaction) GetTokenSymbol() string

func (*TokenUpdateTransaction) GetTransactionID

func (transaction *TokenUpdateTransaction) GetTransactionID() TransactionID

func (*TokenUpdateTransaction) GetTransactionMemo

func (transaction *TokenUpdateTransaction) GetTransactionMemo() string

func (*TokenUpdateTransaction) GetTransactionValidDuration

func (transaction *TokenUpdateTransaction) GetTransactionValidDuration() time.Duration

func (*TokenUpdateTransaction) GetTreasuryAccountID

func (transaction *TokenUpdateTransaction) GetTreasuryAccountID() AccountID

func (*TokenUpdateTransaction) GetWipeKey

func (transaction *TokenUpdateTransaction) GetWipeKey() Key

func (*TokenUpdateTransaction) IsFrozen

func (transaction *TokenUpdateTransaction) IsFrozen() bool

func (*TokenUpdateTransaction) Schedule added in v2.1.5

func (transaction *TokenUpdateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenUpdateTransaction) SetAdminKey

func (transaction *TokenUpdateTransaction) SetAdminKey(publicKey Key) *TokenUpdateTransaction

The new Admin key of the Token. If Token is immutable, transaction will resolve to TOKEN_IS_IMMUTABlE.

func (*TokenUpdateTransaction) SetAutoRenewAccount

func (transaction *TokenUpdateTransaction) SetAutoRenewAccount(autoRenewAccount AccountID) *TokenUpdateTransaction

The new account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval.

func (*TokenUpdateTransaction) SetAutoRenewPeriod

func (transaction *TokenUpdateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.Duration) *TokenUpdateTransaction

The new interval at which the auto-renew account will be charged to extend the token's expiry.

func (*TokenUpdateTransaction) SetExpirationTime

func (transaction *TokenUpdateTransaction) SetExpirationTime(expirationTime time.Time) *TokenUpdateTransaction

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) SetFreezeKey

func (transaction *TokenUpdateTransaction) SetFreezeKey(publicKey Key) *TokenUpdateTransaction

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) SetKycKey

func (transaction *TokenUpdateTransaction) SetKycKey(publicKey Key) *TokenUpdateTransaction

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) SetMaxRetry added in v2.1.2

func (transaction *TokenUpdateTransaction) SetMaxRetry(count int) *TokenUpdateTransaction

func (*TokenUpdateTransaction) SetMaxTransactionFee

func (transaction *TokenUpdateTransaction) SetMaxTransactionFee(fee Hbar) *TokenUpdateTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetNodeAccountIDs

func (transaction *TokenUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenUpdateTransaction

SetNodeTokenID sets the node TokenID for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetSupplyKey

func (transaction *TokenUpdateTransaction) SetSupplyKey(publicKey Key) *TokenUpdateTransaction

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 (transaction *TokenUpdateTransaction) SetTokenID(tokenID TokenID) *TokenUpdateTransaction

The Token to be updated

func (*TokenUpdateTransaction) SetTokenMemo added in v2.1.5

func (transaction *TokenUpdateTransaction) SetTokenMemo(memo string) *TokenUpdateTransaction

func (*TokenUpdateTransaction) SetTokenName

func (transaction *TokenUpdateTransaction) SetTokenName(name string) *TokenUpdateTransaction

The new Name of the Token. Must be a string of ASCII characters.

func (*TokenUpdateTransaction) SetTokenSymbol

func (transaction *TokenUpdateTransaction) SetTokenSymbol(symbol string) *TokenUpdateTransaction

The new Symbol of the Token. Must be UTF-8 capitalized alphabetical string identifying the token.

func (*TokenUpdateTransaction) SetTransactionID

func (transaction *TokenUpdateTransaction) SetTransactionID(transactionID TransactionID) *TokenUpdateTransaction

SetTransactionID sets the TransactionID for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetTransactionMemo

func (transaction *TokenUpdateTransaction) SetTransactionMemo(memo string) *TokenUpdateTransaction

SetTransactionMemo sets the memo for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetTransactionValidDuration

func (transaction *TokenUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *TokenUpdateTransaction

SetTransactionValidDuration sets the valid duration for this TokenUpdateTransaction.

func (*TokenUpdateTransaction) SetTreasuryAccountID

func (transaction *TokenUpdateTransaction) SetTreasuryAccountID(treasury AccountID) *TokenUpdateTransaction

The 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 (transaction *TokenUpdateTransaction) SetWipeKey(publicKey Key) *TokenUpdateTransaction

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

func (transaction *TokenUpdateTransaction) Sign(
	privateKey PrivateKey,
) *TokenUpdateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenUpdateTransaction) SignWith

func (transaction *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 (transaction *TokenUpdateTransaction) SignWithOperator(
	client *Client,
) (*TokenUpdateTransaction, error)

type TokenWipeTransaction

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

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

func (*TokenWipeTransaction) AddSignature added in v2.1.3

func (transaction *TokenWipeTransaction) AddSignature(publicKey PublicKey, signature []byte) *TokenWipeTransaction

func (*TokenWipeTransaction) Execute

func (transaction *TokenWipeTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TokenWipeTransaction) Freeze

func (transaction *TokenWipeTransaction) Freeze() (*TokenWipeTransaction, error)

func (*TokenWipeTransaction) FreezeWith

func (transaction *TokenWipeTransaction) FreezeWith(client *Client) (*TokenWipeTransaction, error)

func (*TokenWipeTransaction) GetAccountID

func (transaction *TokenWipeTransaction) GetAccountID() AccountID

func (*TokenWipeTransaction) GetAmount

func (transaction *TokenWipeTransaction) GetAmount() uint64

func (*TokenWipeTransaction) GetMaxTransactionFee

func (transaction *TokenWipeTransaction) GetMaxTransactionFee() Hbar

func (*TokenWipeTransaction) GetTokenID

func (transaction *TokenWipeTransaction) GetTokenID() TokenID

func (*TokenWipeTransaction) GetTransactionID

func (transaction *TokenWipeTransaction) GetTransactionID() TransactionID

func (*TokenWipeTransaction) GetTransactionMemo

func (transaction *TokenWipeTransaction) GetTransactionMemo() string

func (*TokenWipeTransaction) GetTransactionValidDuration

func (transaction *TokenWipeTransaction) GetTransactionValidDuration() time.Duration

func (*TokenWipeTransaction) IsFrozen

func (transaction *TokenWipeTransaction) IsFrozen() bool

func (*TokenWipeTransaction) Schedule added in v2.1.5

func (transaction *TokenWipeTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TokenWipeTransaction) SetAccountID

func (transaction *TokenWipeTransaction) SetAccountID(accountID AccountID) *TokenWipeTransaction

The account to be wiped

func (*TokenWipeTransaction) SetAmount

func (transaction *TokenWipeTransaction) SetAmount(amount uint64) *TokenWipeTransaction

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) SetMaxRetry added in v2.1.2

func (transaction *TokenWipeTransaction) SetMaxRetry(count int) *TokenWipeTransaction

func (*TokenWipeTransaction) SetMaxTransactionFee

func (transaction *TokenWipeTransaction) SetMaxTransactionFee(fee Hbar) *TokenWipeTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetNodeAccountIDs

func (transaction *TokenWipeTransaction) SetNodeAccountIDs(nodeID []AccountID) *TokenWipeTransaction

SetNodeTokenID sets the node TokenID for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetTokenID

func (transaction *TokenWipeTransaction) SetTokenID(tokenID TokenID) *TokenWipeTransaction

The token for which the account will be wiped. If token does not exist, transaction results in INVALID_TOKEN_ID

func (*TokenWipeTransaction) SetTransactionID

func (transaction *TokenWipeTransaction) SetTransactionID(transactionID TransactionID) *TokenWipeTransaction

SetTransactionID sets the TransactionID for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetTransactionMemo

func (transaction *TokenWipeTransaction) SetTransactionMemo(memo string) *TokenWipeTransaction

SetTransactionMemo sets the memo for this TokenWipeTransaction.

func (*TokenWipeTransaction) SetTransactionValidDuration

func (transaction *TokenWipeTransaction) SetTransactionValidDuration(duration time.Duration) *TokenWipeTransaction

SetTransactionValidDuration sets the valid duration for this TokenWipeTransaction.

func (*TokenWipeTransaction) Sign

func (transaction *TokenWipeTransaction) Sign(
	privateKey PrivateKey,
) *TokenWipeTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TokenWipeTransaction) SignWith

func (transaction *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 (transaction *TokenWipeTransaction) SignWithOperator(
	client *Client,
) (*TokenWipeTransaction, error)

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 (transaction *TopicCreateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicCreateTransaction

func (*TopicCreateTransaction) Execute

func (transaction *TopicCreateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TopicCreateTransaction) Freeze

func (transaction *TopicCreateTransaction) Freeze() (*TopicCreateTransaction, error)

func (*TopicCreateTransaction) FreezeWith

func (transaction *TopicCreateTransaction) FreezeWith(client *Client) (*TopicCreateTransaction, error)

func (*TopicCreateTransaction) GetAdminKey

func (transaction *TopicCreateTransaction) GetAdminKey() (Key, error)

func (*TopicCreateTransaction) GetAutoRenewAccountID

func (transaction *TopicCreateTransaction) GetAutoRenewAccountID() AccountID

func (*TopicCreateTransaction) GetAutoRenewPeriod

func (transaction *TopicCreateTransaction) GetAutoRenewPeriod() time.Duration

func (*TopicCreateTransaction) GetMaxTransactionFee

func (transaction *TopicCreateTransaction) GetMaxTransactionFee() Hbar

func (*TopicCreateTransaction) GetSubmitKey

func (transaction *TopicCreateTransaction) GetSubmitKey() (Key, error)

func (*TopicCreateTransaction) GetTopicMemo

func (transaction *TopicCreateTransaction) GetTopicMemo() string

func (*TopicCreateTransaction) GetTransactionID

func (transaction *TopicCreateTransaction) GetTransactionID() TransactionID

func (*TopicCreateTransaction) GetTransactionMemo

func (transaction *TopicCreateTransaction) GetTransactionMemo() string

func (*TopicCreateTransaction) GetTransactionValidDuration

func (transaction *TopicCreateTransaction) GetTransactionValidDuration() time.Duration

func (*TopicCreateTransaction) IsFrozen

func (transaction *TopicCreateTransaction) IsFrozen() bool

func (*TopicCreateTransaction) Schedule added in v2.1.5

func (transaction *TopicCreateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TopicCreateTransaction) SetAdminKey

func (transaction *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 (transaction *TopicCreateTransaction) SetAutoRenewAccountID(accountID 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 (transaction *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) SetMaxRetry added in v2.1.2

func (transaction *TopicCreateTransaction) SetMaxRetry(count int) *TopicCreateTransaction

func (*TopicCreateTransaction) SetMaxTransactionFee

func (transaction *TopicCreateTransaction) SetMaxTransactionFee(fee Hbar) *TopicCreateTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetNodeAccountIDs

func (transaction *TopicCreateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TopicCreateTransaction

SetNodeAccountID sets the node AccountID for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetSubmitKey

func (transaction *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 (transaction *TopicCreateTransaction) SetTopicMemo(memo string) *TopicCreateTransaction

SetTopicMemo sets a short publicly visible memo about the topic. No guarantee of uniqueness.

func (*TopicCreateTransaction) SetTransactionID

func (transaction *TopicCreateTransaction) SetTransactionID(transactionID TransactionID) *TopicCreateTransaction

SetTransactionID sets the TransactionID for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetTransactionMemo

func (transaction *TopicCreateTransaction) SetTransactionMemo(memo string) *TopicCreateTransaction

SetTransactionMemo sets the memo for this TopicCreateTransaction.

func (*TopicCreateTransaction) SetTransactionValidDuration

func (transaction *TopicCreateTransaction) SetTransactionValidDuration(duration time.Duration) *TopicCreateTransaction

SetTransactionValidDuration sets the valid duration for this TopicCreateTransaction.

func (*TopicCreateTransaction) Sign

func (transaction *TopicCreateTransaction) Sign(
	privateKey PrivateKey,
) *TopicCreateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TopicCreateTransaction) SignWith

func (transaction *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 (transaction *TopicCreateTransaction) SignWithOperator(
	client *Client,
) (*TopicCreateTransaction, error)

type TopicDeleteTransaction

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

A ConsensusTopicDeleteTransaction is for deleting a topic on HCS.

func NewTopicDeleteTransaction

func NewTopicDeleteTransaction() *TopicDeleteTransaction

NewConsensusTopicDeleteTransaction creates a ConsensusTopicDeleteTransaction transaction which can be used to construct and execute a Consensus Delete Topic Transaction.

func (*TopicDeleteTransaction) AddSignature added in v2.1.3

func (transaction *TopicDeleteTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicDeleteTransaction

func (*TopicDeleteTransaction) Execute

func (transaction *TopicDeleteTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TopicDeleteTransaction) Freeze

func (transaction *TopicDeleteTransaction) Freeze() (*TopicDeleteTransaction, error)

func (*TopicDeleteTransaction) FreezeWith

func (transaction *TopicDeleteTransaction) FreezeWith(client *Client) (*TopicDeleteTransaction, error)

func (*TopicDeleteTransaction) GetTopicID

func (transaction *TopicDeleteTransaction) GetTopicID() TopicID

func (*TopicDeleteTransaction) IsFrozen

func (transaction *TopicDeleteTransaction) IsFrozen() bool

func (*TopicDeleteTransaction) Schedule added in v2.1.5

func (transaction *TopicDeleteTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TopicDeleteTransaction) SetMaxRetry added in v2.1.2

func (transaction *TopicDeleteTransaction) SetMaxRetry(count int) *TopicDeleteTransaction

func (*TopicDeleteTransaction) SetMaxTransactionFee

func (transaction *TopicDeleteTransaction) SetMaxTransactionFee(fee Hbar) *TopicDeleteTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetNodeAccountIDs

func (transaction *TopicDeleteTransaction) SetNodeAccountIDs(nodeID []AccountID) *TopicDeleteTransaction

SetNodeAccountID sets the node AccountID for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetTopicID

func (transaction *TopicDeleteTransaction) SetTopicID(ID TopicID) *TopicDeleteTransaction

SetTopicID sets the topic IDentifier.

func (*TopicDeleteTransaction) SetTransactionID

func (transaction *TopicDeleteTransaction) SetTransactionID(transactionID TransactionID) *TopicDeleteTransaction

SetTransactionID sets the TransactionID for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetTransactionMemo

func (transaction *TopicDeleteTransaction) SetTransactionMemo(memo string) *TopicDeleteTransaction

SetTransactionMemo sets the memo for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) SetTransactionValidDuration

func (transaction *TopicDeleteTransaction) SetTransactionValidDuration(duration time.Duration) *TopicDeleteTransaction

SetTransactionValidDuration sets the valid duration for this TopicDeleteTransaction.

func (*TopicDeleteTransaction) Sign

func (transaction *TopicDeleteTransaction) Sign(
	privateKey PrivateKey,
) *TopicDeleteTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TopicDeleteTransaction) SignWith

func (transaction *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 (transaction *TopicDeleteTransaction) SignWithOperator(
	client *Client,
) (*TopicDeleteTransaction, error)

type TopicID

type TopicID struct {
	Shard uint64
	Realm uint64
	Topic uint64
}

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)

func TopicIDFromString

func TopicIDFromString(s 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

type TopicInfo

type TopicInfo struct {
	TopicMemo          string
	RunningHash        []byte
	SequenceNumber     uint64
	ExpirationTime     time.Time
	AdminKey           Key
	SubmitKey          Key
	AutoRenewPeriod    time.Duration
	AutoRenewAccountID *AccountID
}

func TopicInfoFromBytes added in v2.1.3

func TopicInfoFromBytes(data []byte) (TopicInfo, error)

func (TopicInfo) ToBytes added in v2.1.3

func (topicInfo TopicInfo) ToBytes() []byte

type TopicInfoQuery

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

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 (query *TopicInfoQuery) Execute(client *Client) (TopicInfo, error)

Execute executes the TopicInfoQuery using the provided client

func (*TopicInfoQuery) GetCost

func (query *TopicInfoQuery) GetCost(client *Client) (Hbar, error)

func (*TopicInfoQuery) GetTopicID

func (query *TopicInfoQuery) GetTopicID() TopicID

func (*TopicInfoQuery) SetMaxQueryPayment

func (query *TopicInfoQuery) SetMaxQueryPayment(maxPayment Hbar) *TopicInfoQuery

SetMaxQueryPayment sets the maximum payment allowed for this Query.

func (*TopicInfoQuery) SetMaxRetry added in v2.1.2

func (query *TopicInfoQuery) SetMaxRetry(count int) *TopicInfoQuery

func (*TopicInfoQuery) SetNodeAccountIDs

func (query *TopicInfoQuery) SetNodeAccountIDs(accountID []AccountID) *TopicInfoQuery

func (*TopicInfoQuery) SetQueryPayment

func (query *TopicInfoQuery) SetQueryPayment(paymentAmount Hbar) *TopicInfoQuery

SetQueryPayment sets the payment amount for this Query.

func (*TopicInfoQuery) SetTopicID

func (query *TopicInfoQuery) SetTopicID(id 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
}

type TopicMessageChunk

type TopicMessageChunk struct {
	ConsensusTimestamp time.Time
	ContentSize        uint64
	RunningHash        []byte
	SequenceNumber     uint64
}

type TopicMessageQuery

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

func NewTopicMessageQuery

func NewTopicMessageQuery() *TopicMessageQuery

func (*TopicMessageQuery) GetEndTime

func (query *TopicMessageQuery) GetEndTime() time.Time

func (*TopicMessageQuery) GetLimit

func (query *TopicMessageQuery) GetLimit() uint64

func (*TopicMessageQuery) GetStartTime

func (query *TopicMessageQuery) GetStartTime() time.Time

func (*TopicMessageQuery) GetTopicID

func (query *TopicMessageQuery) GetTopicID() TopicID

func (*TopicMessageQuery) SetEndTime

func (query *TopicMessageQuery) SetEndTime(endTime time.Time) *TopicMessageQuery

func (*TopicMessageQuery) SetErrorHandler added in v2.1.2

func (query *TopicMessageQuery) SetErrorHandler(errorHandler func(stat status.Status)) *TopicMessageQuery

func (*TopicMessageQuery) SetLimit

func (query *TopicMessageQuery) SetLimit(limit uint64) *TopicMessageQuery

func (*TopicMessageQuery) SetStartTime

func (query *TopicMessageQuery) SetStartTime(startTime time.Time) *TopicMessageQuery

func (*TopicMessageQuery) SetTopicID

func (query *TopicMessageQuery) SetTopicID(topicID TopicID) *TopicMessageQuery

func (*TopicMessageQuery) Subscribe

func (query *TopicMessageQuery) Subscribe(client *Client, onNext func(TopicMessage)) (SubscriptionHandle, error)

type TopicMessageSubmitTransaction

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

func NewTopicMessageSubmitTransaction

func NewTopicMessageSubmitTransaction() *TopicMessageSubmitTransaction

func (*TopicMessageSubmitTransaction) AddSignature added in v2.1.3

func (transaction *TopicMessageSubmitTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicMessageSubmitTransaction

func (*TopicMessageSubmitTransaction) Execute

func (transaction *TopicMessageSubmitTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

func (*TopicMessageSubmitTransaction) ExecuteAll

func (transaction *TopicMessageSubmitTransaction) ExecuteAll(
	client *Client,
) ([]TransactionResponse, error)

ExecuteAll executes the all the Transactions with the provided client

func (*TopicMessageSubmitTransaction) Freeze

func (*TopicMessageSubmitTransaction) FreezeWith

func (transaction *TopicMessageSubmitTransaction) FreezeWith(client *Client) (*TopicMessageSubmitTransaction, error)

func (*TopicMessageSubmitTransaction) GetMaxChunks

func (transaction *TopicMessageSubmitTransaction) GetMaxChunks() uint64

func (*TopicMessageSubmitTransaction) GetMaxTransactionFee

func (transaction *TopicMessageSubmitTransaction) GetMaxTransactionFee() Hbar

func (*TopicMessageSubmitTransaction) GetMessage

func (transaction *TopicMessageSubmitTransaction) GetMessage() []byte

func (*TopicMessageSubmitTransaction) GetTopicID

func (transaction *TopicMessageSubmitTransaction) GetTopicID() TopicID

func (*TopicMessageSubmitTransaction) GetTransactionID

func (transaction *TopicMessageSubmitTransaction) GetTransactionID() TransactionID

func (*TopicMessageSubmitTransaction) GetTransactionMemo

func (transaction *TopicMessageSubmitTransaction) GetTransactionMemo() string

func (*TopicMessageSubmitTransaction) GetTransactionValidDuration

func (transaction *TopicMessageSubmitTransaction) GetTransactionValidDuration() time.Duration

func (*TopicMessageSubmitTransaction) IsFrozen

func (transaction *TopicMessageSubmitTransaction) IsFrozen() bool

func (*TopicMessageSubmitTransaction) Schedule added in v2.1.5

func (*TopicMessageSubmitTransaction) SetMaxChunks

func (transaction *TopicMessageSubmitTransaction) SetMaxChunks(maxChunks uint64) *TopicMessageSubmitTransaction

func (*TopicMessageSubmitTransaction) SetMaxRetry added in v2.1.2

func (transaction *TopicMessageSubmitTransaction) SetMaxRetry(count int) *TopicMessageSubmitTransaction

func (*TopicMessageSubmitTransaction) SetMaxTransactionFee

func (transaction *TopicMessageSubmitTransaction) SetMaxTransactionFee(fee Hbar) *TopicMessageSubmitTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetMessage

func (transaction *TopicMessageSubmitTransaction) SetMessage(message []byte) *TopicMessageSubmitTransaction

func (*TopicMessageSubmitTransaction) SetNodeAccountIDs

func (transaction *TopicMessageSubmitTransaction) SetNodeAccountIDs(nodeID []AccountID) *TopicMessageSubmitTransaction

SetNodeAccountID sets the node AccountID for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetTopicID

func (*TopicMessageSubmitTransaction) SetTransactionID

func (transaction *TopicMessageSubmitTransaction) SetTransactionID(transactionID TransactionID) *TopicMessageSubmitTransaction

SetTransactionID sets the TransactionID for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetTransactionMemo

func (transaction *TopicMessageSubmitTransaction) SetTransactionMemo(memo string) *TopicMessageSubmitTransaction

SetTransactionMemo sets the memo for this TopicMessageSubmitTransaction.

func (*TopicMessageSubmitTransaction) SetTransactionValidDuration

func (transaction *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

func (transaction *TopicMessageSubmitTransaction) SignWith(
	publicKey PublicKey,
	signer TransactionSigner,
) *TopicMessageSubmitTransaction

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 (transaction *TopicMessageSubmitTransaction) SignWithOperator(
	client *Client,
) (*TopicMessageSubmitTransaction, error)

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 can be used to construct and execute a Update Topic Transaction.

func (*TopicUpdateTransaction) AddSignature added in v2.1.3

func (transaction *TopicUpdateTransaction) AddSignature(publicKey PublicKey, signature []byte) *TopicUpdateTransaction

func (*TopicUpdateTransaction) ClearAdminKey

func (transaction *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 (transaction *TopicUpdateTransaction) ClearAutoRenewAccountID() *TopicUpdateTransaction

ClearAutoRenewAccountID explicitly clears any auto renew account ID on the topic by sending an empty accountID

func (*TopicUpdateTransaction) ClearSubmitKey

func (transaction *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 (transaction *TopicUpdateTransaction) ClearTopicMemo() *TopicUpdateTransaction

ClearTopicMemo explicitly clears any memo on the topic by sending an empty string as the memo

func (*TopicUpdateTransaction) Execute

func (transaction *TopicUpdateTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TopicUpdateTransaction) Freeze

func (transaction *TopicUpdateTransaction) Freeze() (*TopicUpdateTransaction, error)

func (*TopicUpdateTransaction) FreezeWith

func (transaction *TopicUpdateTransaction) FreezeWith(client *Client) (*TopicUpdateTransaction, error)

func (*TopicUpdateTransaction) GetAdminKey

func (transaction *TopicUpdateTransaction) GetAdminKey() (Key, error)

func (*TopicUpdateTransaction) GetAutoRenewAccountID

func (transaction *TopicUpdateTransaction) GetAutoRenewAccountID() AccountID

func (*TopicUpdateTransaction) GetAutoRenewPeriod

func (transaction *TopicUpdateTransaction) GetAutoRenewPeriod() time.Duration

func (*TopicUpdateTransaction) GetExpirationTime

func (transaction *TopicUpdateTransaction) GetExpirationTime() time.Time

func (*TopicUpdateTransaction) GetMaxTransactionFee

func (transaction *TopicUpdateTransaction) GetMaxTransactionFee() Hbar

func (*TopicUpdateTransaction) GetSubmitKey

func (transaction *TopicUpdateTransaction) GetSubmitKey() (Key, error)

func (*TopicUpdateTransaction) GetTopicID

func (transaction *TopicUpdateTransaction) GetTopicID() TopicID

func (*TopicUpdateTransaction) GetTopicMemo

func (transaction *TopicUpdateTransaction) GetTopicMemo() string

func (*TopicUpdateTransaction) GetTransactionID

func (transaction *TopicUpdateTransaction) GetTransactionID() TransactionID

func (*TopicUpdateTransaction) GetTransactionMemo

func (transaction *TopicUpdateTransaction) GetTransactionMemo() string

func (*TopicUpdateTransaction) GetTransactionValidDuration

func (transaction *TopicUpdateTransaction) GetTransactionValidDuration() time.Duration

func (*TopicUpdateTransaction) IsFrozen

func (transaction *TopicUpdateTransaction) IsFrozen() bool

func (*TopicUpdateTransaction) Schedule added in v2.1.5

func (transaction *TopicUpdateTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TopicUpdateTransaction) SetAdminKey

func (transaction *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 (transaction *TopicUpdateTransaction) SetAutoRenewAccountID(accountID 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 (transaction *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 (transaction *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) SetMaxRetry added in v2.1.2

func (transaction *TopicUpdateTransaction) SetMaxRetry(count int) *TopicUpdateTransaction

func (*TopicUpdateTransaction) SetMaxTransactionFee

func (transaction *TopicUpdateTransaction) SetMaxTransactionFee(fee Hbar) *TopicUpdateTransaction

SetMaxTransactionFee sets the max transaction fee for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetNodeAccountIDs

func (transaction *TopicUpdateTransaction) SetNodeAccountIDs(nodeID []AccountID) *TopicUpdateTransaction

SetNodeAccountID sets the node AccountID for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetSubmitKey

func (transaction *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 (transaction *TopicUpdateTransaction) SetTopicID(topicID TopicID) *TopicUpdateTransaction

SetTopicID sets the topic to be updated.

func (*TopicUpdateTransaction) SetTopicMemo

func (transaction *TopicUpdateTransaction) SetTopicMemo(memo string) *TopicUpdateTransaction

SetTopicMemo sets a short publicly visible memo about the topic. No guarantee of uniqueness.

func (*TopicUpdateTransaction) SetTransactionID

func (transaction *TopicUpdateTransaction) SetTransactionID(transactionID TransactionID) *TopicUpdateTransaction

SetTransactionID sets the TransactionID for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetTransactionMemo

func (transaction *TopicUpdateTransaction) SetTransactionMemo(memo string) *TopicUpdateTransaction

SetTransactionMemo sets the memo for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) SetTransactionValidDuration

func (transaction *TopicUpdateTransaction) SetTransactionValidDuration(duration time.Duration) *TopicUpdateTransaction

SetTransactionValidDuration sets the valid duration for this TopicUpdateTransaction.

func (*TopicUpdateTransaction) Sign

func (transaction *TopicUpdateTransaction) Sign(
	privateKey PrivateKey,
) *TopicUpdateTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TopicUpdateTransaction) SignWith

func (transaction *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 (transaction *TopicUpdateTransaction) SignWithOperator(
	client *Client,
) (*TopicUpdateTransaction, error)

type Transaction

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

func (*Transaction) AddSignature

func (transaction *Transaction) AddSignature(publicKey PublicKey, signature []byte) *Transaction

func (*Transaction) GetMaxRetry added in v2.1.2

func (transaction *Transaction) GetMaxRetry() int

func (*Transaction) GetMaxTransactionFee

func (transaction *Transaction) GetMaxTransactionFee() Hbar

func (*Transaction) GetNodeAccountIDs

func (transaction *Transaction) GetNodeAccountIDs() []AccountID

func (*Transaction) GetSignatures

func (transaction *Transaction) GetSignatures() (map[AccountID]map[*PublicKey][]byte, error)

func (*Transaction) GetTransactionHash

func (transaction *Transaction) GetTransactionHash() ([]byte, error)

func (*Transaction) GetTransactionHashPerNode

func (transaction *Transaction) GetTransactionHashPerNode() (map[AccountID][]byte, error)

func (*Transaction) GetTransactionID

func (transaction *Transaction) GetTransactionID() TransactionID

func (*Transaction) GetTransactionMemo

func (transaction *Transaction) GetTransactionMemo() string

func (*Transaction) GetTransactionValidDuration

func (transaction *Transaction) GetTransactionValidDuration() time.Duration

func (*Transaction) SetMaxRetry added in v2.1.2

func (transaction *Transaction) SetMaxRetry(count int) *Transaction

func (*Transaction) SetMaxTransactionFee

func (transaction *Transaction) SetMaxTransactionFee(fee Hbar) *Transaction

SetMaxTransactionFee sets the max transaction fee for this Transaction.

func (*Transaction) SetNodeAccountIDs

func (transaction *Transaction) SetNodeAccountIDs(nodeID []AccountID) *Transaction

SetNodeAccountID sets the node AccountID for this Transaction.

func (*Transaction) SetTransactionID

func (transaction *Transaction) SetTransactionID(transactionID TransactionID) *Transaction

SetTransactionID sets the TransactionID for this Transaction.

func (*Transaction) SetTransactionMemo

func (transaction *Transaction) SetTransactionMemo(memo string) *Transaction

SetTransactionMemo sets the memo for this Transaction.

func (*Transaction) SetTransactionValidDuration

func (transaction *Transaction) SetTransactionValidDuration(duration time.Duration) *Transaction

SetTransactionValidDuration sets the valid duration for this Transaction.

func (*Transaction) String

func (transaction *Transaction) String() string

func (*Transaction) ToBytes

func (transaction *Transaction) ToBytes() ([]byte, error)

type TransactionID

type TransactionID struct {
	AccountID  *AccountID
	ValidStart *time.Time
	// 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 TransactionIDFromBytes added in v2.1.3

func TransactionIDFromBytes(data []byte) (TransactionID, error)

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)

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

func (TransactionID) SetScheduled added in v2.1.5

func (id TransactionID) SetScheduled(scheduled bool) TransactionID

func (TransactionID) String

func (id TransactionID) String() string

String returns a string representation of the TransactionID in `AccountID@ValidStartSeconds.ValidStartNanos` format

func (TransactionID) ToBytes added in v2.1.3

func (id TransactionID) ToBytes() []byte

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
}

func TransactionReceiptFromBytes added in v2.1.3

func TransactionReceiptFromBytes(data []byte) (TransactionReceipt, error)

func (TransactionReceipt) ToBytes added in v2.1.3

func (receipt TransactionReceipt) ToBytes() []byte

type TransactionReceiptQuery

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

func NewTransactionReceiptQuery

func NewTransactionReceiptQuery() *TransactionReceiptQuery

func (*TransactionReceiptQuery) Execute

func (query *TransactionReceiptQuery) Execute(client *Client) (TransactionReceipt, error)

func (*TransactionReceiptQuery) GetCost

func (query *TransactionReceiptQuery) GetCost(client *Client) (Hbar, error)

func (*TransactionReceiptQuery) GetTransactionID

func (query *TransactionReceiptQuery) GetTransactionID() TransactionID

func (*TransactionReceiptQuery) SetMaxQueryPayment

func (query *TransactionReceiptQuery) SetMaxQueryPayment(queryMaxPayment Hbar) *TransactionReceiptQuery

func (*TransactionReceiptQuery) SetMaxRetry added in v2.1.2

func (query *TransactionReceiptQuery) SetMaxRetry(count int) *TransactionReceiptQuery

func (*TransactionReceiptQuery) SetNodeAccountIDs

func (query *TransactionReceiptQuery) SetNodeAccountIDs(accountID []AccountID) *TransactionReceiptQuery

func (*TransactionReceiptQuery) SetQueryPayment

func (query *TransactionReceiptQuery) SetQueryPayment(queryPayment Hbar) *TransactionReceiptQuery

func (*TransactionReceiptQuery) SetTransactionID

func (query *TransactionReceiptQuery) SetTransactionID(transactionID TransactionID) *TransactionReceiptQuery

type TransactionRecord

type TransactionRecord struct {
	Receipt            TransactionReceipt
	TransactionHash    []byte
	ConsensusTimestamp time.Time
	TransactionID      TransactionID
	TransactionMemo    string
	TransactionFee     Hbar
	Transfers          []Transfer
	CallResult         *ContractFunctionResult
	CallResultIsCreate bool
}

func TransactionRecordFromBytes added in v2.1.3

func TransactionRecordFromBytes(data []byte) (TransactionRecord, error)

func (TransactionRecord) GetContractCreateResult

func (record TransactionRecord) GetContractCreateResult() (ContractFunctionResult, error)

func (TransactionRecord) GetContractExecuteResult

func (record TransactionRecord) GetContractExecuteResult() (ContractFunctionResult, error)

func (TransactionRecord) ToBytes added in v2.1.3

func (record TransactionRecord) ToBytes() []byte

type TransactionRecordQuery

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

func NewTransactionRecordQuery

func NewTransactionRecordQuery() *TransactionRecordQuery

func (*TransactionRecordQuery) Execute

func (query *TransactionRecordQuery) Execute(client *Client) (TransactionRecord, error)

func (*TransactionRecordQuery) GetCost

func (query *TransactionRecordQuery) GetCost(client *Client) (Hbar, error)

func (*TransactionRecordQuery) GetTransactionID

func (query *TransactionRecordQuery) GetTransactionID() TransactionID

func (*TransactionRecordQuery) SetMaxQueryPayment

func (query *TransactionRecordQuery) SetMaxQueryPayment(queryMaxPayment Hbar) *TransactionRecordQuery

func (*TransactionRecordQuery) SetMaxRetry added in v2.1.2

func (query *TransactionRecordQuery) SetMaxRetry(count int) *TransactionRecordQuery

func (*TransactionRecordQuery) SetNodeAccountIDs

func (query *TransactionRecordQuery) SetNodeAccountIDs(accountID []AccountID) *TransactionRecordQuery

func (*TransactionRecordQuery) SetQueryPayment

func (query *TransactionRecordQuery) SetQueryPayment(queryPayment Hbar) *TransactionRecordQuery

func (*TransactionRecordQuery) SetTransactionID

func (query *TransactionRecordQuery) SetTransactionID(transactionID TransactionID) *TransactionRecordQuery

type TransactionResponse

type TransactionResponse struct {
	TransactionID          TransactionID
	ScheduledTransactionId TransactionID
	NodeID                 AccountID
	Hash                   []byte
}

func (TransactionResponse) GetReceipt

func (response TransactionResponse) GetReceipt(client *Client) (TransactionReceipt, error)

func (TransactionResponse) GetRecord

func (response TransactionResponse) GetRecord(client *Client) (TransactionRecord, error)

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
}

type TransferTransaction

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

func NewTransferTransaction

func NewTransferTransaction() *TransferTransaction

func (*TransferTransaction) AddHbarTransfer

func (transaction *TransferTransaction) AddHbarTransfer(accountID AccountID, amount Hbar) *TransferTransaction

func (*TransferTransaction) AddSignature added in v2.1.3

func (transaction *TransferTransaction) AddSignature(publicKey PublicKey, signature []byte) *TransferTransaction

func (*TransferTransaction) AddTokenTransfer

func (transaction *TransferTransaction) AddTokenTransfer(tokenID TokenID, accountID AccountID, value int64) *TransferTransaction

func (*TransferTransaction) Execute

func (transaction *TransferTransaction) Execute(
	client *Client,
) (TransactionResponse, error)

Execute executes the Transaction with the provided client

func (*TransferTransaction) Freeze

func (transaction *TransferTransaction) Freeze() (*TransferTransaction, error)

func (*TransferTransaction) FreezeWith

func (transaction *TransferTransaction) FreezeWith(client *Client) (*TransferTransaction, error)

func (*TransferTransaction) GetHbarTransfers

func (transaction *TransferTransaction) GetHbarTransfers() map[AccountID]Hbar

func (*TransferTransaction) GetMaxTransactionFee

func (transaction *TransferTransaction) GetMaxTransactionFee() Hbar

func (*TransferTransaction) GetTokenTransfers

func (transaction *TransferTransaction) GetTokenTransfers() map[TokenID][]TokenTransfer

func (*TransferTransaction) GetTransactionID

func (transaction *TransferTransaction) GetTransactionID() TransactionID

func (*TransferTransaction) GetTransactionMemo

func (transaction *TransferTransaction) GetTransactionMemo() string

func (*TransferTransaction) GetTransactionValidDuration

func (transaction *TransferTransaction) GetTransactionValidDuration() time.Duration

func (*TransferTransaction) IsFrozen

func (transaction *TransferTransaction) IsFrozen() bool

func (*TransferTransaction) Schedule added in v2.1.5

func (transaction *TransferTransaction) Schedule() (*ScheduleCreateTransaction, error)

func (*TransferTransaction) SetMaxRetry added in v2.1.2

func (transaction *TransferTransaction) SetMaxRetry(count int) *TransferTransaction

func (*TransferTransaction) SetMaxTransactionFee

func (transaction *TransferTransaction) SetMaxTransactionFee(fee Hbar) *TransferTransaction

SetMaxTransactionFee sets the max transaction fee for this TokenUpdateTransaction.

func (*TransferTransaction) SetNodeAccountIDs

func (transaction *TransferTransaction) SetNodeAccountIDs(nodeID []AccountID) *TransferTransaction

SetNodeTokenID sets the node TokenID for this TokenUpdateTransaction.

func (*TransferTransaction) SetTransactionID

func (transaction *TransferTransaction) SetTransactionID(transactionID TransactionID) *TransferTransaction

SetTransactionID sets the TransactionID for this TokenUpdateTransaction.

func (*TransferTransaction) SetTransactionMemo

func (transaction *TransferTransaction) SetTransactionMemo(memo string) *TransferTransaction

SetTransactionMemo sets the memo for this TokenUpdateTransaction.

func (*TransferTransaction) SetTransactionValidDuration

func (transaction *TransferTransaction) SetTransactionValidDuration(duration time.Duration) *TransferTransaction

SetTransactionValidDuration sets the valid duration for this TokenUpdateTransaction.

func (*TransferTransaction) Sign

func (transaction *TransferTransaction) Sign(
	privateKey PrivateKey,
) *TransferTransaction

Sign uses the provided privateKey to sign the transaction.

func (*TransferTransaction) SignWith

func (transaction *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 (transaction *TransferTransaction) SignWithOperator(
	client *Client,
) (*TransferTransaction, error)

Source Files

Jump to

Keyboard shortcuts

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