wallet

package
v1.14.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0, MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDefaultFromAddress = errors.New("unable to determine a default walletModule address")

Functions

This section is empty.

Types

type WalletAPI

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

func (*WalletAPI) HasPassword added in v0.9.4

func (walletAPI *WalletAPI) HasPassword(ctx context.Context) bool

HasPassword return whether the wallet has password

func (*WalletAPI) LockWallet added in v0.9.7

func (walletAPI *WalletAPI) LockWallet(ctx context.Context) error

LockWallet lock wallet

func (*WalletAPI) SetPassword added in v0.9.1

func (walletAPI *WalletAPI) SetPassword(ctx context.Context, password []byte) error

SetPassword set wallet password

func (*WalletAPI) UnLockWallet added in v0.9.7

func (walletAPI *WalletAPI) UnLockWallet(ctx context.Context, password []byte) error

UnLockWallet unlock wallet

func (*WalletAPI) WalletAddresses

func (walletAPI *WalletAPI) WalletAddresses(ctx context.Context) []address.Address

WalletAddresses gets addresses from the walletModule

func (*WalletAPI) WalletBalance

func (walletAPI *WalletAPI) WalletBalance(ctx context.Context, addr address.Address) (abi.TokenAmount, error)

WalletBalance returns the current balance of the given wallet address.

func (*WalletAPI) WalletDefaultAddress

func (walletAPI *WalletAPI) WalletDefaultAddress(ctx context.Context) (address.Address, error)

SetWalletDefaultAddress set the specified address as the default in the config.

func (*WalletAPI) WalletDelete added in v1.8.0

func (walletAPI *WalletAPI) WalletDelete(ctx context.Context, addr address.Address) error

WalletDelete delete the given walletModule address

func (*WalletAPI) WalletExport

func (walletAPI *WalletAPI) WalletExport(ctx context.Context, addr address.Address, password string) (*types.KeyInfo, error)

WalletExport returns the KeyInfos for the given walletModule addresses

func (*WalletAPI) WalletHas

func (walletAPI *WalletAPI) WalletHas(ctx context.Context, addr address.Address) (bool, error)

WalletHas indicates whether the given address is in the wallet.

func (*WalletAPI) WalletImport

func (walletAPI *WalletAPI) WalletImport(ctx context.Context, key *types.KeyInfo) (address.Address, error)

WalletImport adds a given set of KeyInfos to the walletModule

func (*WalletAPI) WalletNewAddress

func (walletAPI *WalletAPI) WalletNewAddress(ctx context.Context, protocol address.Protocol) (address.Address, error)

WalletNewAddress generates a new walletModule address

func (*WalletAPI) WalletSetDefault

func (walletAPI *WalletAPI) WalletSetDefault(ctx context.Context, addr address.Address) error

SetWalletDefaultAddress set the specified address as the default in the config.

func (*WalletAPI) WalletSign

func (walletAPI *WalletAPI) WalletSign(ctx context.Context, k address.Address, msg []byte, meta types.MsgMeta) (*crypto.Signature, error)

WalletSign signs the given bytes using the given address.

func (*WalletAPI) WalletSignMessage

func (walletAPI *WalletAPI) WalletSignMessage(ctx context.Context, k address.Address, msg *types.Message) (*types.SignedMessage, error)

WalletSignMessage signs the given message using the given address.

func (*WalletAPI) WalletState added in v0.9.4

func (walletAPI *WalletAPI) WalletState(ctx context.Context) int

WalletState return wallet state

type WalletSubmodule

type WalletSubmodule struct {
	Chain  *chain.ChainSubmodule
	Wallet *wallet.Wallet

	Signer types.Signer
	Config *config.ConfigModule
	// contains filtered or unexported fields
}

WalletSubmodule enhances the `Node` with a "wallet" and FIL transfer capabilities.

func NewWalletSubmodule

func NewWalletSubmodule(ctx context.Context,
	repo walletRepo,
	cfgModule *config.ConfigModule,
	chain *chain.ChainSubmodule,
	password []byte,
) (*WalletSubmodule, error)

NewWalletSubmodule creates a new storage protocol submodule.

func (*WalletSubmodule) API

func (wallet *WalletSubmodule) API() v1api.IWallet

API create a new wallet api implement

func (*WalletSubmodule) V0API added in v0.9.7

func (wallet *WalletSubmodule) V0API() v0api.IWallet

func (*WalletSubmodule) WalletIntersection added in v1.1.2

func (wallet *WalletSubmodule) WalletIntersection() wallet.WalletIntersection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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