Wallet

Overview

Manages both classical (ECDSA/Schnorr) and quantum-resistant (ML-DSA) key pairs in a unified interface. The Wallet class encapsulates key derivation, address generation for all Bitcoin address types, and secure disposal of private key material. It integrates with the Mnemonic class for BIP39/BIP360 hierarchical deterministic derivation.

The Wallet implements Disposable for secure zeroing of private key buffers.

The full source code is available on GitHub at Wallet.ts.

Import

import { Wallet } from '@btc-vision/transaction';
import { MLDSASecurityLevel } from '@btc-vision/bip32';
import { networks } from '@btc-vision/bitcoin';

Constructor

constructor()

Static Methods

fromWif()
fromPrivateKeys()
generate()

Instance Methods

toWIF()
toPrivateKeyHex()
toPublicKeyHex()
toQuantumBase58()
derivePath()
zeroize()
[Symbol.dispose]()

Properties

address
p2tr
p2wpkh
legacy
segwitLegacy
p2wda
addresses
keypair
mldsaKeypair
publicKey
tweakedPubKeyKey
xOnly
quantumPublicKey
quantumPrivateKey
quantumPublicKeyHex
quantumPrivateKeyHex
securityLevel
chainCode
network