Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶ added in v1.4.0
type Core interface { bind.ContractBackend ChainID(ctx context.Context) (*big.Int, error) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) BlockNumber(ctx context.Context) (uint64, error) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) }
type EVM ¶ added in v1.4.0
type EVM interface { ChainID(ctx context.Context) (*big.Int, error) GetClient() Core BlockNumber(ctx context.Context) (uint64, error) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) GetBlockTimestamp(blockNumber *big.Int) uint64 ValidateContractDeployedAt(contractAddress string) (*common.Address, error) // WaitForTransaction waits for transaction receipt and depending on receipt status calls one of the provided functions // onSuccess is called once the TX is successfully mined // onRevert is called once the TX is mined but it reverted // onError is called if an error occurs while waiting for TX to go into one of the other 2 states WaitForTransaction(hex string, onSuccess, onRevert func(), onError func(err error)) // WaitForConfirmations starts a loop which ends either when we reach the target block number or an error occurs with block number retrieval WaitForConfirmations(raw types.Log) error // GetPrivateKey retrieves private key used for the specific EVM Client GetPrivateKey() string BlockConfirmations() uint64 }
type HederaNode ¶
type HederaNode interface { // GetClient returns the underlying Hedera SDK client GetClient() *hedera.Client // SubmitTopicConsensusMessage submits the provided message bytes to the // specified HCS `topicId` SubmitTopicConsensusMessage(topicId hedera.TopicID, message []byte) (*hedera.TransactionID, error) // SubmitScheduledTokenTransferTransaction creates a token transfer transaction and submits it as a scheduled transaction SubmitScheduledTokenTransferTransaction(tokenID hedera.TokenID, transfers []transfer.Hedera, payerAccountID hedera.AccountID, memo string) (*hedera.TransactionResponse, error) // SubmitScheduledHbarTransferTransaction creates an hbar transfer transaction and submits it as a scheduled transfer transaction SubmitScheduledHbarTransferTransaction(transfers []transfer.Hedera, payerAccountID hedera.AccountID, memo string) (*hedera.TransactionResponse, error) // SubmitScheduleSign submits a ScheduleSign transaction for a given ScheduleID SubmitScheduleSign(scheduleID hedera.ScheduleID) (*hedera.TransactionResponse, error) // SubmitScheduledTokenMintTransaction creates a token mint transaction and submits it as a scheduled mint transaction SubmitScheduledTokenMintTransaction(tokenID hedera.TokenID, amount int64, payerAccountID hedera.AccountID, memo string) (*hedera.TransactionResponse, error) // SubmitScheduledTokenBurnTransaction creates a token burn transaction and submits it as a scheduled burn transaction SubmitScheduledTokenBurnTransaction(id hedera.TokenID, amount int64, account hedera.AccountID, memo string) (*hedera.TransactionResponse, error) }
type HttpClient ¶ added in v1.4.0
type MirrorNode ¶
type MirrorNode interface { // GetAccountTokenMintTransactionsAfterTimestampString queries the hedera mirror node for transactions on a certain account with type TokenMint GetAccountTokenMintTransactionsAfterTimestampString(accountId hedera.AccountID, from string) (*model.Response, error) // GetAccountTokenMintTransactionsAfterTimestamp queries the hedera mirror node for transactions on a certain account with type TokenMint GetAccountTokenMintTransactionsAfterTimestamp(accountId hedera.AccountID, from int64) (*model.Response, error) // GetAccountTokenBurnTransactionsAfterTimestampString queries the hedera mirror node for transactions on a certain account with type TokenBurn GetAccountTokenBurnTransactionsAfterTimestampString(accountId hedera.AccountID, from string) (*model.Response, error) // GetAccountTokenBurnTransactionsAfterTimestamp queries the hedera mirror node for transactions on a certain account with type TokenBurn GetAccountTokenBurnTransactionsAfterTimestamp(accountId hedera.AccountID, from int64) (*model.Response, error) // GetAccountDebitTransactionsAfterTimestampString queries the hedera mirror node for transactions that are debit and after a given timestamp GetAccountDebitTransactionsAfterTimestampString(accountId hedera.AccountID, from string) (*model.Response, error) // GetAccountCreditTransactionsAfterTimestampString returns all transaction after a given timestamp GetAccountCreditTransactionsAfterTimestampString(accountId hedera.AccountID, from string) (*model.Response, error) // GetAccountCreditTransactionsAfterTimestamp returns all transaction after a given timestamp GetAccountCreditTransactionsAfterTimestamp(accountId hedera.AccountID, from int64) (*model.Response, error) // GetAccountCreditTransactionsBetween returns all incoming Transfers for the specified account between timestamp `from` and `to` excluded GetAccountCreditTransactionsBetween(accountId hedera.AccountID, from, to int64) ([]model.Transaction, error) // GetMessagesAfterTimestamp returns all topic messages after the given timestamp GetMessagesAfterTimestamp(topicId hedera.TopicID, from int64) ([]model.Message, error) // GetMessagesForTopicBetween returns all topic messages for a given topic between timestamp `from` included and `to` excluded GetMessagesForTopicBetween(topicId hedera.TopicID, from, to int64) ([]model.Message, error) // GetScheduledTransaction gets the Scheduled transaction of an executed transaction GetScheduledTransaction(transactionID string) (*model.Response, error) // GetTransaction gets all data related to a specific transaction id or returns an error GetTransaction(transactionID string) (*model.Response, error) // GetSchedule retrieves a schedule entity by its id GetSchedule(scheduleID string) (*model.Schedule, error) // GetStateProof sends a query to get the state proof. If the query is successful, the function returns the state. // If the query returns a status != 200, the function returns an error. GetStateProof(transactionID string) ([]byte, error) // AccountExists sends a query to check whether a specific account exists. If the query returns a status != 200, the function returns a false value AccountExists(accountID hedera.AccountID) bool // TopicExists sends a query to check whether a specific topic exists. If the query returns a status != 200, the function returns a false value TopicExists(topicID hedera.TopicID) bool // WaitForTransaction Polls the transaction at intervals. Depending on the // result, the corresponding `onSuccess` and `onFailure` functions are called WaitForTransaction(txId string, onSuccess, onFailure func()) // WaitForScheduledTransaction Polls the transaction at intervals. Depending on the // result, the corresponding `onSuccess` and `onFailure` functions are called WaitForScheduledTransaction(txId string, onSuccess, onFailure func()) }
Click to show internal directories.
Click to hide internal directories.