A foundational wallet capable of cryptographic operations (key derivation, encrypt/decrypt, sign/verify, HMAC) but not transaction management or blockchain interaction.
Implements the BSV.Wallet behaviour for crypto-only operations.
Summary
Functions
Create an 'anyone' ProtoWallet (scalar=1).
Create an HMAC-SHA256 using a derived symmetric key.
Create a DER-encoded signature using a derived private key.
Decrypt ciphertext using a derived symmetric key.
Encrypt plaintext using a derived symmetric key.
Create a ProtoWallet from a KeyDeriver.
Create a ProtoWallet from a private key.
Derive a public key based on encryption args, or return the identity key.
The identity public key.
Verify an HMAC-SHA256 using a derived symmetric key.
Verify a DER-encoded signature using a derived public key.
Types
@type t() :: %BSV.Wallet.ProtoWallet{key_deriver: BSV.Wallet.KeyDeriver.t()}
Functions
@spec anyone() :: t()
Create an 'anyone' ProtoWallet (scalar=1).
Create an HMAC-SHA256 using a derived symmetric key.
Create a DER-encoded signature using a derived private key.
Decrypt ciphertext using a derived symmetric key.
Automatically falls back to legacy key derivation (raw ECDH x-coordinate) if decryption with the current KDF (SHA-256) fails, for backward compatibility.
Encrypt plaintext using a derived symmetric key.
@spec from_key_deriver(BSV.Wallet.KeyDeriver.t()) :: t()
Create a ProtoWallet from a KeyDeriver.
@spec from_private_key(BSV.PrivateKey.t()) :: t()
Create a ProtoWallet from a private key.
Derive a public key based on encryption args, or return the identity key.
@spec identity_key(t()) :: BSV.PublicKey.t()
The identity public key.
Verify an HMAC-SHA256 using a derived symmetric key.
Falls back to legacy key derivation if the current key doesn't match, for backward compatibility with HMACs created by v0.1.
Verify a DER-encoded signature using a derived public key.