types

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	ID             string
	Name           string
	Prefix         string
	DerivationPath string
}

Chain contains the data of a single chain

func NewChain

func NewChain(id, name, prefix, derivationPath string) Chain

NewChain returns a new Chain instance

type ChainLinkReferenceGetter

type ChainLinkReferenceGetter interface {
	// GetMnemonic returns the mnemonic
	GetMnemonic() (string, error)

	// GetChain returns Chain instance
	GetChain() (Chain, error)

	// GetFilename returns filename to save
	GetFilename() (string, error)
}

ChainLinkReferenceGetter allows to get all the data needed to generate a ChainLinkJSON instance

type ChainLinkReferencePrompt

type ChainLinkReferencePrompt struct {
	ChainLinkReferenceGetter
	// contains filtered or unexported fields
}

ChainLinkReferencePrompt is a ChainLinkReferenceGetter implemented with an interactive prompt

func NewChainLinkReferencePrompt

func NewChainLinkReferencePrompt() *ChainLinkReferencePrompt

NewChainLinkReferencePrompt returns an instance implementing ChainLinkReferencePrompt

func (ChainLinkReferencePrompt) GetChain

func (cp ChainLinkReferencePrompt) GetChain() (Chain, error)

GetChain implements ChainLinkReferenceGetter

func (ChainLinkReferencePrompt) GetFilename

func (cp ChainLinkReferencePrompt) GetFilename() (string, error)

GetFilename implements ChainLinkReferenceGetter

func (ChainLinkReferencePrompt) GetMnemonic

func (cp ChainLinkReferencePrompt) GetMnemonic() (string, error)

GetMnemonic implements ChainLinkReferenceGetter

type Config

type Config struct {
	Chains []Chain
}

Config contains the data of the configuration

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default config instance of the configuration

Jump to

Keyboard shortcuts

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