secrets

package
v0.73.9 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryWallets

type BinaryWallets struct {
	NodewalletPath       string `json:"nodewallet_path"`
	NodewalletBase64     string `json:"nodewallet"`
	VegaWalletPath       string `json:"vegawallet_path"`
	VegaWalletBase64     string `json:"vegawallet"`
	EthereumWalletPath   string `json:"ethereumwallet_path"`
	EthereumWalletBase64 string `json:"ethereumwallet"`
}

type EthereumWalletPrivate

type EthereumWalletPrivate struct {
	Address    string `json:"address"`
	Mnemonic   string `json:"mnemonic"`
	Seed       string `json:"seed"`
	PrivateKey string `json:"private_key"`
}

type NodeSecretStore

type NodeSecretStore interface {
	GetVegaNode(network string, node string) (*VegaNodePrivate, error)
	StoreVegaNode(network string, node string, privateData *VegaNodePrivate) error
	DoesVegaNodeExist(network string, node string) (bool, error)
	GetVegaNodeList(network string) ([]string, error)
	GetAllVegaNode(network string) (map[string]*VegaNodePrivate, error)
}

type ServiceSecretStore

type ServiceSecretStore interface {
	GetInfuraProjectId() (string, error)
	GetEthereumNodeURL(string) (string, error)
	GetEtherscanApikey() (string, error)
	GetDigitalOceanApiToken() (string, error)
	GetBotsApiToken() (string, error)
}

type VegaNodePrivate

type VegaNodePrivate struct {
	// Metadata
	Name      string `json:"name"`
	Country   string `json:"country"`
	InfoURL   string `json:"info_url"`
	AvatarURL string `json:"avatar_url"`
	// Ethereum
	EthereumAddress    string `json:"ethereum_address"`
	EthereumPrivateKey string `json:"ethereum_private_key"`
	EthereumMnemonic   string `json:"ethereum_mnemonic"`
	// Vega
	VegaId             string  `json:"vega_id"`
	VegaPubKey         string  `json:"vega_public_key"`
	VegaPrivateKey     string  `json:"vega_private_key"`
	VegaRecoveryPhrase string  `json:"vega_recovery_phrase"`
	VegaPubKeyIndex    *uint64 `json:"vega_public_key_index"`
	// Data-Node DeHistory
	DeHistoryPeerId          string `json:"de_history_peer_id"`
	DeHistoryPrivateKey      string `json:"de_history_private_key"`
	NetworkHistoryPeerId     string `json:"network_history_peer_id"`
	NetworkHistoryPrivateKey string `json:"network_history_private_key"`
	// Tendermint
	TendermintNodeId              string `json:"tendermint_node_id"`
	TendermintNodePubKey          string `json:"tendermint_node_public_key"`
	TendermintNodePrivateKey      string `json:"tendermint_node_private_key"`
	TendermintValidatorAddress    string `json:"tendermint_validator_address"`
	TendermintValidatorPubKey     string `json:"tendermint_validator_public_key"`
	TendermintValidatorPrivateKey string `json:"tendermint_validator_private_key"`
	// Binary wallet file passphrase
	WalletBinaryPassphrase string         `json:"wallet_binary_passphrase"`
	BinaryWallets          *BinaryWallets `json:"binary_wallets"`
}

Private part stored in HashiCorp Vault

type VegaWalletPrivate

type VegaWalletPrivate struct {
	Id             string `json:"id"`
	PublicKey      string `json:"public_key"`
	PrivateKey     string `json:"private_key"`
	RecoveryPhrase string `json:"recovery_phrase"`
}

type WalletSecretStore

type WalletSecretStore interface {
	GetEthereumWallet(secretPath string) (*EthereumWalletPrivate, error)
	StoreEthereumWallet(secretPath string, secretData *EthereumWalletPrivate) error
	DoesEthereumWalletExist(secretPath string) (bool, error)

	GetVegaWallet(secretPath string) (*VegaWalletPrivate, error)
	StoreVegaWallet(secretPath string, secretData *VegaWalletPrivate) error
	DoesVegaWalletExist(secretPath string) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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