hedera

package
v1.4.2-rc-1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitMultipleScheduledTransactions

func AwaitMultipleScheduledTransactions(
	outParams *OutParams,
	sourceChainId uint64,
	targetChainId uint64,
	asset string,
	transferID string,
	callback func(sourceChainId, targetChainId uint64, nativeAsset string, transferID string, isTransferSuccessful bool))

AwaitMultipleScheduledTransactions is meant to be used when you need to wait all the scheduled transactions to be mined.

func IsTokenID

func IsTokenID(tokenID string) bool

func OriginatorFromTxId

func OriginatorFromTxId(txId string) string

func ScheduledNftTxExecutionCallbacks

func ScheduledNftTxExecutionCallbacks(
	transferRepository repository.Transfer,
	scheduleRepository repository.Schedule,
	logger *log.Entry,
	id string,
	hasReceiver bool,
	statusResult *string,
	operation string,
	wg *sync.WaitGroup,
) (onExecutionSuccess func(transactionID, scheduleID string), onExecutionFail func(transactionID string))

func ScheduledNftTxMinedCallbacks

func ScheduledNftTxMinedCallbacks(
	transferRepository repository.Transfer,
	scheduleRepository repository.Schedule,
	logger *log.Entry,
	id string,
	status *string,
	wg *sync.WaitGroup,
) (onSuccess, onFail func(transactionID string))

func ToMirrorNodeTransactionID

func ToMirrorNodeTransactionID(txId string) string

ToMirrorNodeTransactionID parses TX with format `0.0.X@{seconds}.{nanos}?scheduled` to format `0.0.X-{seconds}-{nanos}`

Types

type FeeOutParams

type FeeOutParams struct {
	*OutParams
	// contains filtered or unexported fields
}

FeeOutParams Helper struct for AwaitMultipleScheduledTransactions

func NewFeeOutParams

func NewFeeOutParams(countOfAllSplitTransfers int) *FeeOutParams

NewFeeOutParams is used to initialize out parameters needed for awaiting fee transfers to be mined. Helper func for AwaitMultipleScheduledTransactions.

func (*FeeOutParams) HandleResultForAwaitedTransfer

func (params *FeeOutParams) HandleResultForAwaitedTransfer(result *bool, hasReceiver bool, splitTransfer []model.Hedera)

HandleResultForAwaitedTransfer is used to handle result from mined scheduled transfer for Fees. Helper func to collect results for AwaitMultipleScheduledTransactions.

type HederaTransactionID

type HederaTransactionID struct {
	AccountId string
	Seconds   string
	Nanos     string
}

func FromHederaTransactionID

func FromHederaTransactionID(id hedera.TransactionID) HederaTransactionID

func (HederaTransactionID) String

func (txId HederaTransactionID) String() string

func (HederaTransactionID) Timestamp

func (txId HederaTransactionID) Timestamp() string

type OutParams

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

type UserOutParams

type UserOutParams struct {
	*OutParams
}

UserOutParams Helper struct for AwaitMultipleScheduledTransactions

func NewUserOutParams

func NewUserOutParams() *UserOutParams

NewUserOutParams is used to initialize out parameters needed for awaiting user transfer to be mined. Helper func for AwaitMultipleScheduledTransactions.

func (*UserOutParams) HandleResultForAwaitedTransfer

func (params *UserOutParams) HandleResultForAwaitedTransfer(result *bool, hasReceiver bool)

HandleResultForAwaitedTransfer is used to handle result from mined scheduled transfer for User. Helper func to collect results for AwaitMultipleScheduledTransactions.

Jump to

Keyboard shortcuts

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