external

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: GPL-3.0, GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewExternalBackend

func NewExternalBackend(endpoint string) (*Backend, error)

func (*Backend) Close added in v0.3.0

func (eb *Backend) Close()

func (*Backend) Subscribe

func (eb *Backend) Subscribe(sink chan<- accounts.WalletEvent) event.Subscription

func (*Backend) Wallets

func (eb *Backend) Wallets() []accounts.Wallet

type Signer

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

Signer provides an API to interact with an external signer (clef) It proxies request to the external signer while forwarding relevant request headers

func NewExternalSigner

func NewExternalSigner(endpoint string) (*Signer, error)

func (*Signer) Accounts

func (api *Signer) Accounts() []accounts.Account

func (*Signer) Close

func (api *Signer) Close() error

func (*Signer) Contains

func (api *Signer) Contains(account accounts.Account) bool

func (*Signer) Derive

func (api *Signer) Derive(path accounts.DerivationPath, pin bool) (accounts.Account, error)

func (*Signer) Open

func (api *Signer) Open(passphrase string) error

func (*Signer) SelfDerive

func (api *Signer) SelfDerive(bases []accounts.DerivationPath, chain ethereum.ChainStateReader)

func (*Signer) SignData

func (api *Signer) SignData(account accounts.Account, mimeType string, data []byte) ([]byte, error)

SignData signs keccak256(data). The mimetype parameter describes the type of data being signed

func (*Signer) SignDataWithPassphrase

func (api *Signer) SignDataWithPassphrase(account accounts.Account, passphrase, mimeType string, data []byte) ([]byte, error)

func (*Signer) SignText

func (api *Signer) SignText(account accounts.Account, text []byte) ([]byte, error)

func (*Signer) SignTextWithPassphrase

func (api *Signer) SignTextWithPassphrase(account accounts.Account, passphrase string, text []byte) ([]byte, error)

func (*Signer) SignTx

func (api *Signer) SignTx(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)

func (*Signer) SignTxWithPassphrase

func (api *Signer) SignTxWithPassphrase(account accounts.Account, passphrase string, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)

func (*Signer) Status

func (api *Signer) Status() (string, error)

func (*Signer) URL

func (api *Signer) URL() accounts.URL

Jump to

Keyboard shortcuts

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