client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyWaitTxDefaults

func ApplyWaitTxDefaults(cfg *WaitTxConfig)

ApplyWaitTxDefaults mirrors config.ApplyWaitTxDefaults.

Types

type Client

type Client struct {
	// High-level modules
	Blockchain *blockchain.Client
	Cascade    *cascade.Client
	// contains filtered or unexported fields
}

Client provides unified access to Lumera blockchain and storage

func New

func New(ctx context.Context, cfg Config, kr keyring.Keyring, opts ...Option) (*Client, error)

New creates a new unified Lumera client

func (*Client) Close

func (c *Client) Close() error

Close releases all resources

func (*Client) Config

func (c *Client) Config() Config

Config returns the client configuration

type Config

type Config = clientconfig.Config

Config re-exports the config.Config type for backwards compatibility.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig mirrors config.Default.

type Factory

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

Factory keeps a base configuration and keyring so callers can easily create per-signer clients without re-specifying shared settings.

func NewFactory

func NewFactory(cfg Config, kr keyring.Keyring, opts ...Option) (*Factory, error)

NewFactory captures the shared configuration and keyring. The base config may omit Address/KeyName; they are supplied when creating signer-specific clients.

func (*Factory) WithSigner

func (f *Factory) WithSigner(ctx context.Context, address, keyName string, extraOpts ...Option) (*Client, error)

WithSigner returns a Client bound to the provided address/keyName pair. Extra options override/extend the factory defaults for this instance.

type Option

type Option func(*Config)

Option is a function that modifies Config

func WithAccountHRP added in v1.2.0

func WithAccountHRP(hrp string) Option

WithAccountHRP sets the bech32 account address prefix (e.g. "lumera"). Empty leaves the Lumera default applied by blockchain.New.

func WithBlockchainTimeout

func WithBlockchainTimeout(timeout time.Duration) Option

WithBlockchainTimeout sets the blockchain timeout

func WithChainID

func WithChainID(chainID string) Option

WithChainID sets the chain ID

func WithEVMChainID added in v1.2.0

func WithEVMChainID(id *big.Int) Option

WithEVMChainID sets the EIP-155 chain ID used for Ethereum-format transactions. Distinct from the Cosmos ChainID. Required for EVM tx helpers.

func WithEVMExtendedDenom added in v1.2.0

func WithEVMExtendedDenom(denom string) Option

WithEVMExtendedDenom sets the 18-decimal precisebank denom (e.g. "alume").

func WithEVMGasCaps added in v1.2.0

func WithEVMGasCaps(tip, fee *big.Int) Option

WithEVMGasCaps sets optional defaults for EIP-1559 gas pricing in the extended denom's integer unit (alume/gas). Nil means "fetch from chain state at tx time".

func WithEVMNativeDenom added in v1.2.0

func WithEVMNativeDenom(denom string) Option

WithEVMNativeDenom sets the cosmos/evm `evm_denom` (e.g. "ulume").

func WithFeeDenom added in v1.2.0

func WithFeeDenom(denom string) Option

WithFeeDenom sets the cosmos fee denom used for non-EVM transactions (e.g. "ulume"). Empty leaves the Lumera default applied by blockchain.New.

func WithGRPCEndpoint

func WithGRPCEndpoint(endpoint string) Option

WithGRPCEndpoint sets the gRPC address.

func WithGasPrice added in v1.2.0

func WithGasPrice(price sdkmath.LegacyDec) Option

WithGasPrice sets the gas price in FeeDenom/gas (e.g. 0.025). A nil/zero LegacyDec leaves the Lumera default applied by blockchain.New.

func WithKeyName

func WithKeyName(name string) Option

WithKeyName sets the key name in the keyring.

func WithLogLevel added in v1.0.6

func WithLogLevel(level string) Option

WithLogLevel sets the SDK log level.

func WithLogger

func WithLogger(logger *zap.Logger) Option

WithLogger enables diagnostic logging using the provided logger.

func WithMaxMessageSize

func WithMaxMessageSize(size int) Option

WithMaxMessageSize sets both send and receive message sizes

func WithMaxRetries

func WithMaxRetries(retries int) Option

WithMaxRetries sets the maximum number of retries

func WithRPCEndpoint

func WithRPCEndpoint(endpoint string) Option

WithRPCEndpoint sets the CometBFT RPC endpoint.

func WithStorageTimeout

func WithStorageTimeout(timeout time.Duration) Option

WithStorageTimeout sets the storage timeout

func WithWaitTxConfig

func WithWaitTxConfig(waitCfg clientconfig.WaitTxConfig) Option

WithWaitTxConfig overrides the wait-for-tx behavior.

type WaitTxConfig

type WaitTxConfig = clientconfig.WaitTxConfig

WaitTxConfig re-exports the wait-tx config type for backwards compatibility.

func DefaultWaitTxConfig

func DefaultWaitTxConfig() WaitTxConfig

DefaultWaitTxConfig mirrors config.DefaultWaitTxConfig.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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