wallet

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const KNamePrefix = "wallet-"

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	keystore.KeyInfo

	PublicKey []byte
	Address   common.Address
}

func NewKey

func NewKey(keyinfo keystore.KeyInfo) (*Key, error)

type LocalWallet

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

func NewWallet

func NewWallet(keystore keystore.KeyStore) (*LocalWallet, error)

func (*LocalWallet) Has

func (w *LocalWallet) Has(ctx context.Context, addr common.Address) (bool, error)

func (*LocalWallet) Import

func (w *LocalWallet) Import(ctx context.Context, ki *keystore.KeyInfo) (common.Address, error)

func (*LocalWallet) List

func (w *LocalWallet) List(ctx context.Context) ([]*Key, error)

func (*LocalWallet) SignTransaction

func (w *LocalWallet) SignTransaction(ctx context.Context, addr common.Address, signer types.Signer, tx *types.Transaction) (*types.Transaction, error)

type Wallet

type Wallet interface {
	Import(ctx context.Context, ki *keystore.KeyInfo) (common.Address, error)
	SignTransaction(ctx context.Context, addr common.Address, signer types.Signer, tx *types.Transaction) (*types.Transaction, error)
}

Jump to

Keyboard shortcuts

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