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
// Chain economics overrides. Empty/nil values fall back to Lumera defaults
// applied by blockchain.New (AccountHRP "lumera", FeeDenom "ulume",
// GasPrice 0.025). Set these for non-Lumera chains.
AccountHRP string // bech32 account prefix (Lumera: "lumera")
FeeDenom string // cosmos fee denom for non-EVM txs (Lumera: "ulume")
GasPrice sdkmath.LegacyDec // gas price in FeeDenom/gas (Lumera: 0.025)
// Timeouts
BlockchainTimeout time.Duration
StorageTimeout time.Duration
// Optional overrides
MaxRetries int
MaxRecvMsgSize int // Max receive message size for gRPC (default: 4MB)
MaxSendMsgSize int // Max send message size for gRPC (default: 50MB)
// 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
// EVM settings (cosmos/evm). Set when the chain has EVM enabled.
EVMChainID *big.Int // EIP-155 chain ID (distinct from cosmos ChainID)
EVMNativeDenom string // cosmos/evm `evm_denom` (Lumera: "ulume")
EVMExtendedDenom string // 18-decimal precisebank denom (Lumera: "alume")
EVMGasTipCap *big.Int // optional default tip cap (alume/gas)
EVMGasFeeCap *big.Int // optional default fee cap (alume/gas)
}
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.