vault

package
v0.0.0-...-4ce4a32 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MPL-2.0 Imports: 40 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Config is a configuration file to map known wallet keys to unknown wallet keys
	Config *settlement.Config

	// VaultCmd adds a command to cobra for vault interfacing
	VaultCmd = &cobra.Command{
		Use:   "vault",
		Short: "provides a succinct interface with vault",
	}
)
View Source
var (
	// CreateWalletCmd transfer funds command
	CreateWalletCmd = &cobra.Command{
		Use:   "create-wallet WALLET_NAME",
		Short: "creates a wallet on a given provider",
		Run:   rootcmd.Perform("create wallet", CreateWallet),
	}
)
View Source
var (

	// ImportKeyCmd imports keys to be used in vault
	ImportKeyCmd = &cobra.Command{
		Use:   "import-key",
		Short: "import keys to be used in vault",
		Run:   rootcmd.Perform("import key", ImportKey),
	}
)
View Source
var (
	// InitCmd initializes the vault server
	InitCmd = &cobra.Command{
		Use:   "init",
		Short: "initializes the vault server",
		Run:   rootcmd.Perform("init vault", Initialize),
	}
)
View Source
var (
	// SignSettlementCmd signs a settlement file's transactions
	SignSettlementCmd = &cobra.Command{
		Use:   "sign-settlement INPUT_FILE...",
		Short: "sign settlement files using vault held secrets",
		Run:   rootcmd.Perform("sign settlement", SignSettlement),
	}
)
View Source
var (
	// UnsealCmd initializes the vault server
	UnsealCmd = &cobra.Command{
		Use:   "unseal",
		Short: "unseals the vault server",
		Run:   rootcmd.Perform("unseal vault", Unseal),
	}
)

Functions

func CreateWallet

func CreateWallet(command *cobra.Command, args []string) error

CreateWallet creates a wallet

func ImportKey

func ImportKey(command *cobra.Command, args []string) error

ImportKey pulls in keys from environment variables

func Initialize

func Initialize(command *cobra.Command, args []string) error

Initialize initializes the vault server

func NewRefreshTokenPayloadFromViper

func NewRefreshTokenPayloadFromViper() *bitflyer.TokenPayload

NewRefreshTokenPayloadFromViper creates the payload to refresh a bitflyer token from viper

func ReadConfig

func ReadConfig(command *cobra.Command) *settlement.Config

ReadConfig sets up the config flag

func SignSettlement

func SignSettlement(command *cobra.Command, args []string) error

SignSettlement runs the signing of a settlement

func Unseal

func Unseal(command *cobra.Command, args []string) error

Unseal unseals the vault to allow for insertions

Types

type State

type State struct {
	WalletInfo   wallet.Info `json:"walletInfo"`
	Registration string      `json:"registration"`
}

State contains the current state of the registration

Jump to

Keyboard shortcuts

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