powergate: github.com/textileio/powergate/wallet/module Index | Files

package module

import "github.com/textileio/powergate/wallet/module"

Index

Package Files

wallet.go

type Module Uses

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

Module exposes the filecoin wallet api.

func New Uses

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 Uses

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

Balance returns the balance of the specified address.

func (*Module) FundFromFaucet Uses

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

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

func (*Module) List Uses

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

List returns all wallet addresses.

func (*Module) MasterAddr Uses

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 Uses

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

NewAddress creates a new address.

func (*Module) SendFil Uses

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

SendFil sends fil from one address to another.

Package module imports 12 packages (graph) and is imported by 5 packages. Updated 2020-09-21. Refresh now. Tools for package owners.