Versions in this module Expand all Collapse all v1 v1.11.10 Jul 13, 2024 Changes in this version + var ErrInvalidIndicesLength = errors.New("number of indices should be greater than 0") + var ErrInvalidNumAddrsDerived = errors.New("incorrect number of ledger derived addresses") + var ErrInvalidNumAddrsToDerive = errors.New("number of addresses to derive should be greater than 0") + var ErrInvalidNumSignatures = errors.New("incorrect number of signatures") + type Keychain interface + Addresses func() set.Set[ids.ShortID] + Get func(addr ids.ShortID) (Signer, bool) + func NewLedgerKeychain(l Ledger, numToDerive int) (Keychain, error) + func NewLedgerKeychainFromIndices(l Ledger, indices []uint32) (Keychain, error) + type Ledger interface + Address func(displayHRP string, addressIndex uint32) (ids.ShortID, error) + Addresses func(addressIndices []uint32) ([]ids.ShortID, error) + Disconnect func() error + Sign func(unsignedTxBytes []byte, addressIndices []uint32) ([][]byte, error) + SignHash func(hash []byte, addressIndices []uint32) ([][]byte, error) + Version func() (v *version.Semantic, err error) + type MockLedger struct + func NewMockLedger(ctrl *gomock.Controller) *MockLedger + func (m *MockLedger) Address(arg0 string, arg1 uint32) (ids.ShortID, error) + func (m *MockLedger) Addresses(arg0 []uint32) ([]ids.ShortID, error) + func (m *MockLedger) Disconnect() error + func (m *MockLedger) EXPECT() *MockLedgerMockRecorder + func (m *MockLedger) Sign(arg0 []byte, arg1 []uint32) ([][]byte, error) + func (m *MockLedger) SignHash(arg0 []byte, arg1 []uint32) ([][]byte, error) + func (m *MockLedger) Version() (*version.Semantic, error) + type MockLedgerMockRecorder struct + func (mr *MockLedgerMockRecorder) Address(arg0, arg1 any) *gomock.Call + func (mr *MockLedgerMockRecorder) Addresses(arg0 any) *gomock.Call + func (mr *MockLedgerMockRecorder) Disconnect() *gomock.Call + func (mr *MockLedgerMockRecorder) Sign(arg0, arg1 any) *gomock.Call + func (mr *MockLedgerMockRecorder) SignHash(arg0, arg1 any) *gomock.Call + func (mr *MockLedgerMockRecorder) Version() *gomock.Call + type Signer interface + Address func() ids.ShortID + Sign func([]byte) ([]byte, error) + SignHash func([]byte) ([]byte, error)