Documentation
¶
Overview ¶
Copyright (C) 2025, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2024, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Variables
- func WrapNodeKeychain(nodeKC nodekeychain.Keychain) ledgerkeychain.Keychain
- func WrapSecp256k1fxKeychain(secpKC *secp256k1fx.Keychain) nodekeychain.Keychain
- type Keychain
- func GetKeychain(app *application.Lux, useEwoq bool, useLedger bool, ledgerAddresses []string, ...) (*Keychain, error)
- func GetKeychainFromCmdLineFlags(app *application.Lux, keychainGoal string, network models.Network, ...) (*Keychain, error)
- func NewKeychain(network models.Network, keychain keychain.Keychain, ledger keychain.Ledger, ...) *Keychain
- type NodeToLedgerWrapper
- type Secp256k1fxToNodeWrapper
Constants ¶
This section is empty.
Variables ¶
var ( ErrMutuallyExlusiveKeySource = errors.New("key source flags --key, --ewoq, --ledger/--ledger-addrs are mutually exclusive") ErrEwoqKeyOnTestnetOrMainnet = errors.New("key source ewoq is not available for mainnet/testnet operations") )
Functions ¶
func WrapNodeKeychain ¶ added in v1.9.4
func WrapNodeKeychain(nodeKC nodekeychain.Keychain) ledgerkeychain.Keychain
WrapNodeKeychain wraps a node keychain to implement ledger keychain interface
func WrapSecp256k1fxKeychain ¶ added in v1.9.4
func WrapSecp256k1fxKeychain(secpKC *secp256k1fx.Keychain) nodekeychain.Keychain
WrapSecp256k1fxKeychain wraps a secp256k1fx keychain to implement node keychain interface
Types ¶
type Keychain ¶
type Keychain struct {
Network models.Network
Keychain keychain.Keychain
Ledger keychain.Ledger
UsesLedger bool
LedgerIndices []uint32
}
func GetKeychain ¶
func NewKeychain ¶
func (*Keychain) AddAddresses ¶
func (*Keychain) HasOnlyOneKey ¶
func (*Keychain) PChainFormattedStrAddresses ¶
type NodeToLedgerWrapper ¶ added in v1.9.4
type NodeToLedgerWrapper struct {
// contains filtered or unexported fields
}
NodeToLedgerWrapper wraps a node keychain to implement ledger keychain interface
func (*NodeToLedgerWrapper) Addresses ¶ added in v1.9.4
func (w *NodeToLedgerWrapper) Addresses() []ids.ShortID
Addresses returns the addresses managed by this keychain as a slice
func (*NodeToLedgerWrapper) Get ¶ added in v1.9.4
func (w *NodeToLedgerWrapper) Get(addr ids.ShortID) (ledgerkeychain.Signer, bool)
Get returns the signer for the given address
type Secp256k1fxToNodeWrapper ¶ added in v1.9.4
type Secp256k1fxToNodeWrapper struct {
// contains filtered or unexported fields
}
Secp256k1fxToNodeWrapper wraps a secp256k1fx keychain to implement node keychain interface
func (*Secp256k1fxToNodeWrapper) Addresses ¶ added in v1.9.4
func (w *Secp256k1fxToNodeWrapper) Addresses() set.Set[ids.ShortID]
Addresses returns the addresses managed by this keychain as a set
func (*Secp256k1fxToNodeWrapper) Get ¶ added in v1.9.4
func (w *Secp256k1fxToNodeWrapper) Get(addr ids.ShortID) (nodekeychain.Signer, bool)
Get returns the signer for the given address