Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyWaitTxDefaults ¶
func ApplyWaitTxDefaults(cfg *WaitTxConfig)
ApplyWaitTxDefaults normalizes zero or negative values using defaults.
Types ¶
type Config ¶
type Config struct {
// Blockchain connection
ChainID string
GRPCEndpoint string // Lumera blockchain gRPC endpoint
RPCEndpoint string // Lumera RPC endpoint for websocket subscriptions
// Account settings
Address string // Your cosmos address (lumera1...)
KeyName string // Key name in keyring
// Timeouts
BlockchainTimeout time.Duration
StorageTimeout time.Duration
// Optional overrides
MaxRetries int
MaxRecvMsgSize int // Max message size for gRPC (default: 50MB)
MaxSendMsgSize int
// WaitTx controls transaction confirmation behaviour.
WaitTx WaitTxConfig
// LogLevel controls SDK logging (debug, info, warn, error). Default is error.
LogLevel string
// Logger is optional; when set, SDK operations emit diagnostics.
Logger *zap.Logger
}
Config holds all configuration for the Lumera client.
type WaitTxConfig ¶
type WaitTxConfig struct {
// SubscriberSetupTimeout defines how long we wait for the websocket subscription to become
// ready during the initial setup phase.
SubscriberSetupTimeout time.Duration
// Polling is a fallback mechanism when a websocket subscription is not available.
// PollInterval controls how frequently the fallback poller queries gRPC for the tx.
PollInterval time.Duration
// PollMaxRetries limits the number of poll attempts before failing (0 => unlimited until ctx deadline).
PollMaxRetries int
// PollBackoffMultiplier > 1 enables exponential growth for poll intervals.
PollBackoffMultiplier float64
// PollBackoffMaxInterval caps the exponential backoff delay (0 => unlimited).
PollBackoffMaxInterval time.Duration
// PollBackoffJitter randomizes delays (0..1) to avoid synced retries.
PollBackoffJitter float64
}
WaitTxConfig configures how the SDK waits for transaction inclusion.
func DefaultWaitTxConfig ¶
func DefaultWaitTxConfig() WaitTxConfig
DefaultWaitTxConfig returns recommended defaults for wait-tx behaviour.
Click to show internal directories.
Click to hide internal directories.