client

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 8 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 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 WithGRPCEndpoint

func WithGRPCEndpoint(endpoint string) Option

WithGRPCEndpoint sets the gRPC address.

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