constants

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 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 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 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"
)

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"
)

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