Documentation
¶
Overview ¶
Copyright (C) 2022-2025, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Variables
- func WrapCryptoKeychain(cryptoKC keychain.Keychain) wallkeychain.Keychain
- func WrapNodeToWalletKeychain(nodeKC nodekeychain.Keychain) walletkeychain.Keychain
- func WrapSecp256k1fxKeychain(secpKC *secp256k1fx.Keychain) nodekeychain.Keychain
- type CryptoToWalletWrapper
- type Keychain
- func GetKeychain(app *application.Lux, useLocalKey bool, useLedger bool, ...) (*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 NodeToWalletWrapper
- type Secp256k1fxToNodeWrapper
Constants ¶
This section is empty.
Variables ¶
var ( ErrMutuallyExlusiveKeySource = errors.New("key source flags --key and --ledger/--ledger-addrs are mutually exclusive") // AllowInsecureKeysOnMainnet is a flag that allows use of software keys on mainnet // This should only be set to true for testing or if you understand the security risks AllowInsecureKeysOnMainnet = false )
Functions ¶
func WrapCryptoKeychain ¶ added in v1.9.4
func WrapCryptoKeychain(cryptoKC keychain.Keychain) wallkeychain.Keychain
WrapCryptoKeychain wraps a crypto keychain to implement wallet keychain interface
func WrapNodeToWalletKeychain ¶ added in v1.9.4
func WrapNodeToWalletKeychain(nodeKC nodekeychain.Keychain) walletkeychain.Keychain
WrapNodeToWalletKeychain wraps a node keychain to implement wallet 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 CryptoToWalletWrapper ¶ added in v1.9.4
type CryptoToWalletWrapper struct {
// contains filtered or unexported fields
}
CryptoToWalletWrapper wraps a crypto keychain to implement wallet keychain interface
func (*CryptoToWalletWrapper) Addresses ¶ added in v1.9.4
func (w *CryptoToWalletWrapper) Addresses() set.Set[ids.ShortID]
Addresses returns the addresses managed by this keychain as a set
func (*CryptoToWalletWrapper) Get ¶ added in v1.9.4
func (w *CryptoToWalletWrapper) Get(addr ids.ShortID) (wallkeychain.Signer, bool)
Get returns the signer for the given address
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 WrapNodeKeychain ¶ added in v1.9.4
func WrapNodeKeychain(nodeKC nodekeychain.Keychain) *NodeToLedgerWrapper
WrapNodeKeychain wraps a node keychain to implement ledger keychain interface
func (*NodeToLedgerWrapper) Addresses ¶ added in v1.9.4
func (w *NodeToLedgerWrapper) Addresses() set.Set[ids.ShortID]
Addresses returns the addresses managed by this keychain as a set
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 NodeToWalletWrapper ¶ added in v1.9.4
type NodeToWalletWrapper struct {
// contains filtered or unexported fields
}
NodeToWalletWrapper wraps a node keychain to implement wallet keychain interface
func (*NodeToWalletWrapper) Addresses ¶ added in v1.9.4
func (w *NodeToWalletWrapper) Addresses() set.Set[ids.ShortID]
Addresses returns the addresses managed by this keychain as a set
func (*NodeToWalletWrapper) Get ¶ added in v1.9.4
func (w *NodeToWalletWrapper) Get(addr ids.ShortID) (walletkeychain.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
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