wallet

package
v2.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoVerifiedClient indicates that the provided
	// wallet-address isn't a verified client.
	ErrNoVerifiedClient = errors.New("the wallet-address isn't a verified client")
)

Functions

This section is empty.

Types

type Module

type Module interface {
	// NewAddress returns a new wallet address of the specified type.
	NewAddress(ctx context.Context, typ string) (string, error)
	// List lists all known wallet addresses.
	List(ctx context.Context) ([]string, error)
	// GetVerifiedClientInfo returns details about a wallet-address that's
	// a verified client. If the wallet address isn't a verified client,
	// it will return ErrNoVerifiedClient.
	GetVerifiedClientInfo(ctx context.Context, addr string) (VerifiedClientInfo, error)
	// Balance returns the balance of a wallet-address.
	Balance(ctx context.Context, addr string) (*big.Int, error)
	// SendFil sends `amount` attoFIL from `from` to `to` and returns the
	// message Cid.
	SendFil(ctx context.Context, from string, to string, amount *big.Int) (cid.Cid, error)
	// FundFromFaucet funds addr from the master address (if configured).
	FundFromFaucet(ctx context.Context, addr string) error
}

Module provides wallet management access to a Filecoin client.

type VerifiedClientInfo added in v2.3.0

type VerifiedClientInfo struct {
	RemainingDatacapBytes *big.Int
}

VerifiedClientInfo contains information for a wallet address that is a verified-client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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