pool

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpServiceName                     = "op-subscriber"
	OpQueryTransfer                   = "tm.event='Tx' AND operation_approved.operation_type='TRANSFER'"
	OpQueryFeeManagement              = "tm.event='NewBlock' AND operation_approved.operation_type='FEE_TOKEN_MANAGEMENT'"
	OpQueryContractUpgrade            = "tm.event='NewBlock' AND operation_approved.operation_type='CONTRACT_UPGRADE'"
	OpQueryIdentityDefaultTransfer    = "tm.event='Tx' AND operation_approved.operation_type='IDENTITY_DEFAULT_TRANSFER'"
	OpQueryIdentityGISTTransfer       = "tm.event='Tx' AND operation_approved.operation_type='IDENTITY_GIST_TRANSFER'"
	OpQueryIdentityStateTransfer      = "tm.event='Tx' AND operation_approved.operation_type='IDENTITY_STATE_TRANSFER'"
	OpQueryWorldCoinIdentityTransfer  = "tm.event='Tx' AND operation_approved.operation_type='WORLDCOIN_IDENTITY_TRANSFER'"
	OpQueryIdentityAggregatedTransfer = "tm.event='NewBlock' AND operation_approved.operation_type='IDENTITY_AGGREGATED_TRANSFER'"
	OpPoolSize                        = 1000
)

Variables

View Source
var (
	// ErrOpShouldBeApproved appears when someone tries to add operation that has been already signed
	ErrOpShouldBeApproved = errors.New("operation should be approved")
)

Functions

This section is empty.

Types

type OperationCatchupper

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

OperationCatchupper catches up old unsigned operations from core.

func NewOperationCatchupper

func NewOperationCatchupper(pool *Pool, core *grpc.ClientConn, log *logan.Entry) *OperationCatchupper

NewOperationCatchupper creates the catchup instance for adding all unsigned operations to the pool

func (*OperationCatchupper) Run

func (o *OperationCatchupper) Run()

type OperationSubscriber

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

OperationSubscriber subscribes to the NewOperation events on the tendermint core.

func NewContractUpgradeOperationSubscriber

func NewContractUpgradeOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewContractUpgradeOperationSubscriber creates the subscriber instance for listening new contract upgrades operations

func NewFeeManagementOperationSubscriber

func NewFeeManagementOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewFeeManagementOperationSubscriber creates the subscriber instance for listening new fee token management operations

func NewIdentityAggregatedTransferOperationSubscriber

func NewIdentityAggregatedTransferOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewIdentityAggregatedTransferOperationSubscriber creates the subscriber instance for listening new identity aggregated transfer operations

func NewIdentityGISTTransferOperationSubscriber added in v1.0.9

func NewIdentityGISTTransferOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewIdentityGISTTransferOperationSubscriber creates the subscriber instance for listening new identity GIST transfer operations

func NewIdentityStateTransferOperationSubscriber added in v1.0.9

func NewIdentityStateTransferOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewIdentityStateTransferOperationSubscriber creates the subscriber instance for listening new identity state transfer operations

func NewIdentityTransferOperationSubscriber

func NewIdentityTransferOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewIdentityTransferOperationSubscriber creates the subscriber instance for listening new identity transfer operations

func NewTransferOperationSubscriber

func NewTransferOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewTransferOperationSubscriber creates the subscriber instance for listening new transfer operations

func NewWorldCoinIdentityTransferOperationSubscriber added in v1.0.11

func NewWorldCoinIdentityTransferOperationSubscriber(pool *Pool, tendermint *http.HTTP, log *logan.Entry) *OperationSubscriber

NewWorldCoinIdentityTransferOperationSubscriber creates the subscriber instance for listening new wordlcoin identity transfer operations

func (*OperationSubscriber) Run

func (o *OperationSubscriber) Run()

type Pool

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

Pool represents the pool of operation to be signed by tss protocol. It should take care about collecting validated state with unsigned operations only.

func NewPool

func NewPool(cfg config.Config) *Pool

func (*Pool) Add

func (p *Pool) Add(id string) error

Add will add operation index to the pool with signed flag check. Returns an error if signed check fails (cause or rpc errors).

func (*Pool) GetNext

func (p *Pool) GetNext(n uint) ([]string, error)

GetNext returns checked pool of maximum n unsigned operations or an error in case of rpc call errors.

Jump to

Keyboard shortcuts

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