keychain

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMutuallyExlusiveKeySource = errors.New("key source flags --key, --ewoq, --ledger/--ledger-addrs are mutually exclusive")
	ErrStoredKeyOrEwoqOnMainnet  = errors.New("key sources --key, --ewoq are not available for mainnet operations")
	ErrNonEwoqKeyOnDevnet        = errors.New("key source --ewoq is the only one available for devnet operations")
	ErrEwoqKeyOnFuji             = errors.New("key source --ewoq is not available for fuji operations")
)

Functions

This section is empty.

Types

type Keychain

type Keychain struct {
	Network       models.Network
	Keychain      keychain.Keychain
	Ledger        keychain.Ledger
	UsesLedger    bool
	LedgerIndices []uint32
}

func GetKeychain

func GetKeychain(
	app *application.Avalanche,
	useEwoq bool,
	useLedger bool,
	ledgerAddresses []string,
	keyName string,
	network models.Network,
	requiredFunds uint64,
) (*Keychain, error)

func GetKeychainFromCmdLineFlags

func GetKeychainFromCmdLineFlags(
	app *application.Avalanche,
	keychainGoal string,
	network models.Network,
	keyName string,
	useEwoq bool,
	useLedger bool,
	ledgerAddresses []string,
	requiredFunds uint64,
) (*Keychain, error)

func NewKeychain

func NewKeychain(network models.Network, keychain keychain.Keychain, ledger keychain.Ledger, ledgerIndices []uint32) *Keychain

func (*Keychain) AddAddresses

func (kc *Keychain) AddAddresses(addresses []string) error

func (*Keychain) Addresses

func (kc *Keychain) Addresses() set.Set[ids.ShortID]

func (*Keychain) HasOnlyOneKey

func (kc *Keychain) HasOnlyOneKey() bool

func (*Keychain) PChainFormattedStrAddresses

func (kc *Keychain) PChainFormattedStrAddresses() ([]string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL