module

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 12 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

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module exposes the filecoin wallet api.

func New

func New(clientBuilder lotus.ClientBuilder, maddr address.Address, iam big.Int, autocreate bool, networkName string) (*Module, error)

New creates a new wallet module.

func (*Module) Balance

func (m *Module) Balance(ctx context.Context, addr string) (*big.Int, error)

Balance returns the balance of the specified address.

func (*Module) FundFromFaucet

func (m *Module) FundFromFaucet(ctx context.Context, addr string) error

FundFromFaucet make a faucet call to fund the provided wallet address.

func (*Module) List

func (m *Module) List(ctx context.Context) ([]string, error)

List returns all wallet addresses.

func (*Module) MasterAddr added in v0.3.0

func (m *Module) MasterAddr() address.Address

MasterAddr returns the master address. Will return address.Undef is Powergate was started with no master address.

func (*Module) NewAddress

func (m *Module) NewAddress(ctx context.Context, typ string) (string, error)

NewAddress creates a new address.

func (*Module) SendFil

func (m *Module) SendFil(ctx context.Context, from string, to string, amount *big.Int) error

SendFil sends fil from one address to another.

func (*Module) Sign added in v0.6.9

func (m *Module) Sign(ctx context.Context, addr string, message []byte) ([]byte, error)

Sign signs a message with an address.

func (*Module) Verify added in v0.6.9

func (m *Module) Verify(ctx context.Context, addr string, message, signature []byte) (bool, error)

Verify verifies a message signature from an address.

Jump to

Keyboard shortcuts

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