keystest

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: LGPL-3.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addresses

type Addresses []common.Address

func (Addresses) CheckEnabled

func (a Addresses) CheckEnabled(ctx context.Context, address common.Address) error

func (Addresses) EnabledAddresses

func (a Addresses) EnabledAddresses(ctx context.Context) (addresses []common.Address, err error)

func (Addresses) GetNextAddress

func (a Addresses) GetNextAddress(ctx context.Context, addresses ...common.Address) (address common.Address, err error)

type ECDSAMessageSigner

type ECDSAMessageSigner ecdsa.PrivateKey

func (*ECDSAMessageSigner) SignMessage

func (k *ECDSAMessageSigner) SignMessage(ctx context.Context, address common.Address, message []byte) ([]byte, error)

type FakeChainStore

type FakeChainStore struct {
	Addresses

	TxSigner
	MessageSigner
	Signer

	internal.Locker[keys.Mutex]
}

FakeChainStore is an implementation of keys.ChainStore for testing. The zero value is usable.

type MemoryChainStore

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

func NewMemoryChainStore

func NewMemoryChainStore() *MemoryChainStore

func (*MemoryChainStore) Accounts

func (m *MemoryChainStore) Accounts(ctx context.Context) (accounts []string, err error)

func (*MemoryChainStore) Create

func (m *MemoryChainStore) Create() (common.Address, error)

func (*MemoryChainStore) Delete

func (m *MemoryChainStore) Delete(addr common.Address)

func (*MemoryChainStore) MustCreate

func (m *MemoryChainStore) MustCreate(t require.TestingT) common.Address

func (*MemoryChainStore) Sign

func (m *MemoryChainStore) Sign(ctx context.Context, account string, data []byte) (signed []byte, err error)

type MessageSigner

type MessageSigner func(ctx context.Context, address common.Address, message []byte) ([]byte, error)

func (MessageSigner) SignMessage

func (f MessageSigner) SignMessage(ctx context.Context, address common.Address, message []byte) ([]byte, error)

type Signer

type Signer func(ctx context.Context, address common.Address, message []byte) ([]byte, error)

func (Signer) Sign

func (f Signer) Sign(ctx context.Context, address common.Address, message []byte) ([]byte, error)

type TxSigner

type TxSigner func(ctx context.Context, from common.Address, tx *types.Transaction) (*types.Transaction, error)

func (TxSigner) SignTx

Jump to

Keyboard shortcuts

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