Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidIndicesLength = errors.New("number of indices should be greater than 0") ErrInvalidNumAddrsToDerive = errors.New("number of addresses to derive should be greater than 0") ErrInvalidNumAddrsDerived = errors.New("incorrect number of ledger derived addresses") ErrInvalidNumSignatures = errors.New("incorrect number of signatures") )
Functions ¶
This section is empty.
Types ¶
type Keychain ¶
type Keychain interface {
// The returned Signer can provide a signature for [addr]
Get(addr ids.ShortID) (Signer, bool)
// Returns the set of addresses for which the accessor keeps an associated
// signer
Addresses() set.Set[ids.ShortID]
}
Keychain maintains a set of addresses together with their corresponding signers
type Ledger ¶
type Ledger interface {
Address(displayHRP string, addressIndex uint32) (ids.ShortID, error)
SignHash(hash []byte, addressIndex uint32) ([]byte, error)
Sign(hash []byte, addressIndex uint32) ([]byte, error)
SignTransaction(rawUnsignedHash []byte, addressIndices []uint32) ([][]byte, error)
GetAddresses(addressIndices []uint32) ([]ids.ShortID, error)
Disconnect() error
}
Ledger interface for hardware wallet support
Directories
¶
| Path | Synopsis |
|---|---|
|
Package keychainmock is a generated GoMock package.
|
Package keychainmock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.