txcommon

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTokenApprovalInputs

func AddTokenApprovalInputs(op *core.Operation, approval *core.TokenApproval) (err error)

func AddTokenPoolActivateInputs

func AddTokenPoolActivateInputs(op *core.Operation, poolID *fftypes.UUID)

func AddTokenPoolCreateInputs

func AddTokenPoolCreateInputs(op *core.Operation, pool *core.TokenPool) (err error)

func AddTokenTransferInputs

func AddTokenTransferInputs(op *core.Operation, transfer *core.TokenTransfer) (err error)

func RetrieveBlockchainInvokeInputs

func RetrieveBlockchainInvokeInputs(ctx context.Context, op *core.Operation) (*core.ContractCallRequest, error)

func RetrieveTokenApprovalInputs

func RetrieveTokenApprovalInputs(ctx context.Context, op *core.Operation) (approval *core.TokenApproval, err error)

func RetrieveTokenPoolActivateInputs

func RetrieveTokenPoolActivateInputs(ctx context.Context, op *core.Operation) (*fftypes.UUID, error)

func RetrieveTokenPoolCreateInputs

func RetrieveTokenPoolCreateInputs(ctx context.Context, op *core.Operation) (*core.TokenPool, error)

func RetrieveTokenTransferInputs

func RetrieveTokenTransferInputs(ctx context.Context, op *core.Operation) (*core.TokenTransfer, error)

Types

type BatchPinData

type BatchPinData struct {
	Batch      *core.BatchPersisted `json:"batch"`
	Contexts   []*fftypes.Bytes32   `json:"contexts"`
	PayloadRef string               `json:"payloadRef"`
}

type BatchedTransactionInsert

type BatchedTransactionInsert struct {
	Input  TransactionInsertInput
	Output struct {
		IdempotencyError error
		Transaction      *core.Transaction
	}
}

type BlockchainInvokeData

type BlockchainInvokeData struct {
	Request  *core.ContractCallRequest `json:"request"`
	BatchPin *BatchPinData             `json:"batchPin"`
}

type Helper

type Helper interface {
	SubmitNewTransaction(ctx context.Context, txType core.TransactionType, idempotencyKey core.IdempotencyKey) (*fftypes.UUID, error)
	SubmitNewTransactionBatch(ctx context.Context, namespace string, batch []*BatchedTransactionInsert) error
	PersistTransaction(ctx context.Context, id *fftypes.UUID, txType core.TransactionType, blockchainTXID string) (valid bool, err error)
	AddBlockchainTX(ctx context.Context, tx *core.Transaction, blockchainTXID string) error
	InsertOrGetBlockchainEvent(ctx context.Context, event *core.BlockchainEvent) (existing *core.BlockchainEvent, err error)
	InsertNewBlockchainEvents(ctx context.Context, events []*core.BlockchainEvent) (inserted []*core.BlockchainEvent, err error)
	GetTransactionByIDCached(ctx context.Context, id *fftypes.UUID) (*core.Transaction, error)
	GetBlockchainEventByIDCached(ctx context.Context, id *fftypes.UUID) (*core.BlockchainEvent, error)
	FindOperationInTransaction(ctx context.Context, tx *fftypes.UUID, opType core.OpType) (*core.Operation, error)
}

func NewTransactionHelper

func NewTransactionHelper(ctx context.Context, ns string, di database.Plugin, dm data.Manager, cacheManager cache.Manager) (Helper, error)

type TransactionInsertInput

type TransactionInsertInput struct {
	Type           core.TransactionType
	IdempotencyKey core.IdempotencyKey
}

Jump to

Keyboard shortcuts

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