Documentation
¶
Index ¶
- Variables
- func NewAuthNeededError(needed string) error
- type Account
- type AuthNeededError
- type Backend
- type DerivationPath
- type Manager
- func (am *Manager) Backends(kind reflect.Type) []Backend
- func (am *Manager) Close() error
- func (am *Manager) Find(account Account) (Wallet, error)
- func (am *Manager) Subscribe(sink chan<- WalletEvent) event.Subscription
- func (am *Manager) Wallet(url string) (Wallet, error)
- func (am *Manager) Wallets() []Wallet
- type URL
- type Wallet
- type WalletEvent
- type WalletEventType
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBaseDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0}
View Source
var DefaultLedgerBaseDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0}
View Source
var DefaultRootDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0}
View Source
var ErrInvalidPassphrase = errors.New("invalid passphrase")
View Source
var ErrNotSupported = errors.New("not supported")
View Source
var ErrUnknownAccount = errors.New("unknown account")
View Source
var ErrUnknownWallet = errors.New("unknown wallet")
View Source
var ErrWalletAlreadyOpen = errors.New("wallet already open")
View Source
var ErrWalletClosed = errors.New("wallet closed")
Functions ¶
func NewAuthNeededError ¶
Types ¶
type AuthNeededError ¶
type AuthNeededError struct {
Needed string
}
func (*AuthNeededError) Error ¶
func (err *AuthNeededError) Error() string
type Backend ¶
type Backend interface {
Wallets() []Wallet
Subscribe(sink chan<- WalletEvent) event.Subscription
}
type DerivationPath ¶
type DerivationPath []uint32
func ParseDerivationPath ¶
func ParseDerivationPath(path string) (DerivationPath, error)
func (DerivationPath) String ¶
func (path DerivationPath) String() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) Subscribe ¶
func (am *Manager) Subscribe(sink chan<- WalletEvent) event.Subscription
type Wallet ¶
type Wallet interface {
URL() URL
Status() (string, error)
Open(passphrase string) error
Close() error
Accounts() []Account
Contains(account Account) bool
Derive(path DerivationPath, pin bool) (Account, error)
SelfDerive(base DerivationPath, chain neatio.ChainStateReader)
SignHash(account Account, hash []byte) ([]byte, error)
SignTx(account Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
SignTxWithAddress(account Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
SignHashWithPassphrase(account Account, passphrase string, hash []byte) ([]byte, error)
SignTxWithPassphrase(account Account, passphrase string, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
}
type WalletEvent ¶
type WalletEvent struct {
Wallet Wallet
Kind WalletEventType
}
type WalletEventType ¶
type WalletEventType int
const ( WalletArrived WalletEventType = iota WalletOpened WalletDropped )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package usbwallet implements support for USB hardware wallets.
|
Package usbwallet implements support for USB hardware wallets. |
|
internal/trezor
Package trezor contains the wire protocol wrapper in Go.
|
Package trezor contains the wire protocol wrapper in Go. |
Click to show internal directories.
Click to hide internal directories.