localwallet

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

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

Wallet is a container for Filecoin wallet addresses.

func New

func New(pks []string) (*Wallet, error)

New returns a new wallet.

func (*Wallet) GetAddresses

func (w *Wallet) GetAddresses() []string

GetAddresses returns all the addresses that the wallet contains its private keys.

func (*Wallet) Has

func (w *Wallet) Has(addr string) (bool, error)

Has returns true if the wallet contains the private keys of addr.

func (*Wallet) Sign

func (w *Wallet) Sign(addr string, payload []byte) (*crypto.Signature, error)

Sign returns the signature of payload for wallet address addr. If the wallet doesn't contain the private keys for addr, it returns an error.

Jump to

Keyboard shortcuts

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