constants

package
v0.9.13-RC03 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DVAdminSecretKeyName = "admin_secret_key"

Variables

This section is empty.

Functions

func ConfirmationsTimeout

func ConfirmationsTimeout(blockchain wconstants.BlockchainType, confirmations uint64) time.Duration

func ConfirmationsTimeoutWithRequired

func ConfirmationsTimeoutWithRequired(blockchain wconstants.BlockchainType, requiredConfirmations, currentConfirmations uint64) time.Duration

func GetClientIDFromContext

func GetClientIDFromContext(ctx context.Context) string

func GetMinConfirmations

func GetMinConfirmations(blockchain wconstants.BlockchainType) uint64

func RollbackFallbackBlock added in v0.9.10

func RollbackFallbackBlock(blockchain wconstants.BlockchainType, currentBlock int64) int64

RollbackFallbackBlock returns the safe block to revert to when no recent incident is found.

func RollbackIncidentMaxAge added in v0.9.10

func RollbackIncidentMaxAge() time.Duration

RollbackIncidentMaxAge is the maximum age of a rollback incident to be considered relevant.

func WithClientContext

func WithClientContext(ctx context.Context, clientID uuid.UUID) context.Context

Types

type ClientContextKeyType

type ClientContextKeyType string
const (
	ClientContextKey ClientContextKeyType = "client_context"
)

type ClientCtx

type ClientCtx struct {
	ClientID uuid.UUID
}

type DVAdminKey

type DVAdminKey string

type ProcessingContextKeyType

type ProcessingContextKeyType string
const (
	ProcessingIDParamName       ProcessingContextKeyType = "X-Processing-ID"
	ProcessingVersionParamName  ProcessingContextKeyType = "X-Processing-Version"
	ProcessingClientIDParamName ProcessingContextKeyType = "X-Processing-Client-ID"
)

func (ProcessingContextKeyType) String

func (p ProcessingContextKeyType) String() string

type ProcessingIdentity

type ProcessingIdentity struct {
	ID, Version string
}

func IdentityFromContext

func IdentityFromContext(ctx context.Context) (ProcessingIdentity, error)

type TransferPurpose added in v0.9.13

type TransferPurpose string
const (
	// TransferPurposeDefault
	//
	// Regular transfer between owner's wallets (hot -> cold/processing, etc.)
	TransferPurposeDefault TransferPurpose = "default"

	// TransferPurposeWithdrawal
	//
	// Withdrawal to an external address. Requires TOTP and is executed immediately.
	TransferPurposeWithdrawal TransferPurpose = "withdrawal"

	// TransferPurposeRefund
	//
	// Refund of an incoming deposit from a hot wallet.
	// Without TOTP it is allowed only back to the deposit sender and is executed after the configured cooldown.
	// With TOTP it is allowed to any external address and is executed immediately.
	TransferPurposeRefund TransferPurpose = "refund"
)

func (*TransferPurpose) Scan added in v0.9.13

func (p *TransferPurpose) Scan(src interface{}) error

Scan implements the sql.Scanner interface

func (TransferPurpose) String added in v0.9.13

func (p TransferPurpose) String() string

String returns the transfer purpose as a string

func (TransferPurpose) Valid added in v0.9.13

func (p TransferPurpose) Valid() bool

Valid checks if the transfer purpose is valid

type TransferStatus

type TransferStatus string
const (
	// TransferStatusNew
	//
	// The transfer was created, but not yet taken into processing
	TransferStatusNew TransferStatus = "new"

	// TransferStatusPending
	//
	// The transfer is in anticipation. The transfer is placed in Task Manager and expects when he is taken to work.
	TransferStatusPending TransferStatus = "pending"

	// TransferStatusProcessing
	//
	// Transfer is in processing. In this status, a transfer can activate a wallet, delegate resources, make an ITD translation.
	TransferStatusProcessing TransferStatus = "processing"

	// TransferStatusInMempool
	//
	// The transaction is located in a mempoule (pool of unconfirmed transactions) and expects to include in the block.
	TransferStatusInMempool TransferStatus = "in_mempool"

	// TransferStatusUnconfirmed
	//
	// The transaction expects a sufficient number of confirmations.
	TransferStatusUnconfirmed TransferStatus = "unconfirmed"

	// TransferStatusCompleted
	//
	// The transaction was confirmed and completed (all post -cutting ended, for example, divided resources).
	TransferStatusCompleted TransferStatus = "completed"

	// TransferStatusFailed
	//
	// The transaction ended with an error. It may be associated with insufficient balance, not compliance with the conditions of the smart contract, etc.
	TransferStatusFailed TransferStatus = "failed"

	// TransferStatusFrozen
	//
	// The transaction was frozen (on Hold).
	// can occur when problems of different nature arose in the process of transaction processing,
	// For example, at the time of sending, a network failure and it is not clear whether the transfer occurred or not,
	// and the transaction requires manual intervention.
	TransferStatusFrozen TransferStatus = "frozen"

	// TransferStatusCanceled
	//
	// The transaction was canceled by the user or by the system.
	TransferStatusCanceled TransferStatus = "canceled"
)

func AllTransferStatuses

func AllTransferStatuses() []TransferStatus

AllTransferStatuses

func (TransferStatus) String

func (t TransferStatus) String() string

String

func (TransferStatus) Valid

func (t TransferStatus) Valid() bool

Valid

type TronTransferKind

type TronTransferKind string
const (
	TronTransferKindBurnTRX       TronTransferKind = "burntrx"
	TronTransferKindResources     TronTransferKind = "resources"
	TronTransferKindCloudDelegate TronTransferKind = "cloud_delegate"
)

func (TronTransferKind) String

func (t TronTransferKind) String() string

func (TronTransferKind) Valid

func (t TronTransferKind) Valid() bool

Validate

type WalletType

type WalletType string
const (
	WalletTypeCold       WalletType = "cold"
	WalletTypeHot        WalletType = "hot"
	WalletTypeProcessing WalletType = "processing"
	WalletTypeExternal   WalletType = "external"
)

func (*WalletType) Scan

func (w *WalletType) Scan(src interface{}) error

Scan implements the sql.Scanner interface

func (WalletType) String

func (w WalletType) String() string

String returns the wallet type as a string

func (WalletType) Valid

func (w WalletType) Valid() bool

Valid checks if the wallet type is valid

Jump to

Keyboard shortcuts

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