wallet

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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