Package Requirements
Installation
OP_NET provides dedicated packages for address, signature, wallet, and mnemonic functionality. These packages include all classes and utilities required for address management, signature operations, wallet derivation, and cryptographic functions.
The following packages are required:
- @btc-vision/transaction: Provides address management, signature operations, wallet derivation, and cryptographic functions.
- @btc-vision/bitcoin: Provides network definitions. Required for network specific operations.
npm install @btc-vision/transaction
# Only needed when using network related operations!
npm install @btc-vision/bitcoin
Importing Required Components
For Mnemonic, Addresses, Message Signing and Quantum Resistant Features
Import the necessary classes and enums from the @btc-vision/transaction package.
// Adjust imports according to your requirement!
import { Mnemonic,
MnemonicStrength,
MLDSASecurityLevel,
Address,
AddressVerificator,
MessageSigner,
QuantumBIP32Factory
} from '@btc-vision/transaction';For Network Specific Operations
Import the necessary classes from the @btc-vision/bitcoin packages.
import { networks } from '@btc-vision/bitcoin';Additional packages and imports may be required depending on your use case. Refer to the packages documentation for a complete list of available exports.
For comprehensive installation instructions including TypeScript configuration, bundler setup, and environment-specific requirements, refer to the Installing the Libraries section in the Quick Start guide.