stamper

package
v0.32.5 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg *ClientConfig) *Client

func (*Client) Create

func (s *Client) Create(ctx context.Context, duration time.Duration, depth uint16, postageLabel string) error

Create creates a postage batch.

func (*Client) Dilute

func (s *Client) Dilute(ctx context.Context, usageThreshold float64, dilutionDepth uint16, opts ...Option) error

Dilute dilutes a postage batch.

func (*Client) Set

func (s *Client) Set(ctx context.Context, ttlThreshold time.Duration, topupTo time.Duration, usageThreshold float64, dilutionDepth uint16, opts ...Option) error

Set sets the topup and dilution parameters.

func (*Client) Topup

func (s *Client) Topup(ctx context.Context, ttlThreshold time.Duration, topupTo time.Duration, opts ...Option) (err error)

Topup tops up a postage batch.

type ClientConfig

type ClientConfig struct {
	Log        logging.Logger
	SwapClient swap.BlockTimeFetcher
	NodeClient node.NodeProvider
}

type Option

type Option func(*options)

func WithBatchIDs

func WithBatchIDs(batchIds []string) Option

func WithPostageLabels added in v0.26.0

func WithPostageLabels(postageLabels []string) Option

Jump to

Keyboard shortcuts

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