Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateWalletID ¶
GenerateWalletID generates a random hex wallet ID
Types ¶
type Metadata ¶
type Metadata struct { ID []byte Name []byte DriverName string DriverVersion uint32 SupportsMnemonicUX bool SupportsMasterKey bool SupportedTransactions []protocol.TxType }
Metadata represents high-level information about a wallet, like its name, id and what operations it supports
type Wallet ¶
type Wallet interface { Init(pw []byte) error CheckPassword(pw []byte) error ExportMasterDerivationKey(pw []byte) (crypto.MasterDerivationKey, error) Metadata() (Metadata, error) ListKeys() ([]crypto.Digest, error) ImportKey(sk crypto.PrivateKey) (crypto.Digest, error) ExportKey(pk crypto.Digest, pw []byte) (crypto.PrivateKey, error) GenerateKey(displayMnemonic bool) (crypto.Digest, error) DeleteKey(pk crypto.Digest, pw []byte) error ImportMultisigAddr(version, threshold uint8, pks []crypto.PublicKey) (crypto.Digest, error) LookupMultisigPreimage(crypto.Digest) (version, threshold uint8, pks []crypto.PublicKey, err error) ListMultisigAddrs() (addrs []crypto.Digest, err error) DeleteMultisigAddr(addr crypto.Digest, pw []byte) error SignTransaction(tx transactions.Transaction, pk crypto.PublicKey, pw []byte) ([]byte, error) MultisigSignTransaction(tx transactions.Transaction, pk crypto.PublicKey, partial crypto.MultisigSig, pw []byte, signer crypto.Digest) (crypto.MultisigSig, error) SignProgram(program []byte, src crypto.Digest, pw []byte) ([]byte, error) MultisigSignProgram(program []byte, src crypto.Digest, pk crypto.PublicKey, partial crypto.MultisigSig, pw []byte) (crypto.MultisigSig, error) }
Wallet represents the interface that any wallet technology must satisfy in order to be used with KMD. Wallets start in a locked state until they are initialized with Init.
Click to show internal directories.
Click to hide internal directories.