Documentation
¶
Index ¶
- func Close(handle int) ctx.Channel
- func Create(config Config, credentials Credentials) ctx.Channel
- func Delete(config Config, credentials Credentials) ctx.Channel
- func Export(handle int, exportCfg Credentials) ctx.Channel
- func GenerateKey(seed string) ctx.Channel
- func Import(config Config, credentials Credentials, importCfg Credentials) ctx.Channel
- func Open(config Config, credentials Credentials) ctx.Channel
- type Config
- type Credentials
- type StorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(config Config, credentials Credentials) ctx.Channel
Create creates the wallet. See Config and Credentials morey info.
func Delete ¶
func Delete(config Config, credentials Credentials) ctx.Channel
Delete permanently deletes the wallet with all of its file structures.
func Export ¶
func Export(handle int, exportCfg Credentials) ctx.Channel
Export generates a single encrypted file of the wallet identified by Config and Credentials. See more info of them.
func GenerateKey ¶
GenerateKey generates a wallet master key. Returned key is compatible with "RAW" key derivation method. It allows to avoid expensive key derivation for use cases when wallet keys can be stored in a secure enclave.
func Import ¶
func Import(config Config, credentials Credentials, importCfg Credentials) ctx.Channel
Import creates a new wallet from previously exported (Export function) wallet's export file. See more info of Config and Credentials.
Types ¶
type Config ¶
type Config struct { // ID is the name of the wallet i.e. the last directory in the wallet path ID string `json:"id"` // StorageType is optional, only use if indy_register_wallet_storage() is // called. 'Default' value is for local files sytem wallets. StorageType string `json:"storage_type,omitempty"` // StorageConfig is optional, use when the wallet root path needs to be set. *StorageConfig `json:"storage_config,omitempty"` }
Config is a config struct for indy wallet functions.
type Credentials ¶
type Credentials struct { // Path is used only with export and import functions Path string `json:"path,omitempty"` // Key with method are the actual credentials. Key string `json:"key,omitempty"` // KeyDerivationMethod is for the algorithm to use for the Key: // ARGON2I_MOD - derive secured wallet master rekey (used by default) // ARGON2I_INT - derive secured wallet master rekey (less secured but faster) // RAW - raw wallet key master provided (skip derivation) // RAW keys can be generated with indy_generate_wallet_key call KeyDerivationMethod string `json:"key_derivation_method,omitempty"` }
Credentials is a indy specific struct to set wallet credentials for the indy wallet functions for opening and exporting the wallet. The Path is only for export/import. The StorageConfig in the Config struct is for the actual wallet location.
type StorageConfig ¶
type StorageConfig struct {
Path string `json:"path,omitempty"`
}
StorageConfig is indy specific JSON configuration struct to set wallet location path.