common

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParallelListenerManagerProvider

func NewParallelListenerManagerProvider[V comparable](provider driver.ListenerManagerProvider[V]) *parallelListenerManagerProvider[V]

func NewPublicParamsFetcher

func NewPublicParamsFetcher(fetcher Fetcher, namespace string) *publicParamsFetcher

Types

type AcceptTxInDBFilterProvider

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

AcceptTxInDBFilterProvider provides instances of AcceptTxInDBsFilter based on the transaction db and audit db for a given TMS

func NewAcceptTxInDBFilterProvider

func NewAcceptTxInDBFilterProvider(ttxDBProvider *ttxdb.Manager, auditDBProvider *auditdb.Manager) *AcceptTxInDBFilterProvider

func (*AcceptTxInDBFilterProvider) New

type AcceptTxInDBsFilter

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

AcceptTxInDBsFilter uses the transaction db and the audit db to decide if a given transaction needs to be further processed by the token-sdk upon a network event about its finality

func (*AcceptTxInDBsFilter) Accept

func (t *AcceptTxInDBsFilter) Accept(txID string, env []byte) (bool, error)

type Configuration

type Configuration interface {
	// LookupNamespace searches for a TMS configuration that matches the given network and channel, and
	// return its namespace.
	// If no matching configuration is found, an error is returned.
	// If multiple matching configurations are found, an error is returned.
	LookupNamespace(network, channel string) (string, error)

	ConfigurationFor(network, channel, namespace string) (config.Configuration, error)
}

Configuration models the configuration provider

type Fetcher

type Fetcher interface {
	FetchPublicParameters(namespace string) ([]byte, error)
}

type FinalityListener

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

func NewFinalityListener

func NewFinalityListener(logger logging.Logger, tmsProvider TokenManagementServiceProvider, tmsID token.TMSID, ttxDB transactionDB, tokens *tokens.Tokens, tracer trace.Tracer) *FinalityListener

func (*FinalityListener) OnStatus

func (t *FinalityListener) OnStatus(ctx context.Context, txID string, status int, message string, tokenRequestHash []byte)

type TokenManagementServiceProvider

type TokenManagementServiceProvider interface {
	GetManagementService(opts ...token.ServiceOption) (*token.ManagementService, error)
}

type TransactionFilterProvider

type TransactionFilterProvider[F driver2.TransactionFilter] interface {
	New(tmsID token3.TMSID) (F, error)
}

Directories

Path Synopsis
rws
translator/mock
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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