Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
ProCrypt is a small, simple, and ultrafast library for managing crypto wallets, built on Web Standards for Deno.
Welcome on ProCrypt !
ProCrypt is a small, simple, and ultrafast library for managing crypto wallets, built on Web Standards for Deno.
✨ Features
- Multi-chain wallet support (UTXO and EVM-based)
- Supports Bitcoin, Litecoin, Ethereum, BSC, Solana, and Tron
- Built-in testnet support for all chains
- Easy transaction signing and broadcasting
- Generates address from existing or new private keys
📦 Installation
deno add jsr:@webtools/procrypt
🧠 Usage Example
ProCrypt provides a unified API to interact with all supported blockchains. Here is a minimal example using Ethereum testnet. All other chain classes follow the same interface.
import * as procrypt from "jsr:@webtools/procrypt"; // Use an existing private key or leave empty to auto-generate one const wallet = new procrypt.Chains.EthereumSepolia("0xb14e0a4c18767..."); console.log(wallet.getPrivateKey()); // => prints your private key console.log(wallet.getAddress()); // => prints your wallet address console.log(wallet.isValidAddress("0xb14e0a4c18767...")); // => boolean // Sign transactions const signedTransactions = await wallet.signTransactions([ { to: "0xRecipientAddress", amount: 0.001 }, ]); console.log(signedTransactions); // => array of signed raw transactions // Broadcast transactions const txIds = await wallet.sendTransactions(signedTransactions); console.log(txIds); // => array of transaction IDs
🏗️ Available Classes
You can import and use any of the following wallet classes:
UTXO-based:
Bitcoin
BitcoinTest4
Litecoin
LitecoinTest
EVM-based:
Ethereum
EthereumSepolia
Bsc
BscTest
Solana
SolanaTest
Tron
TronTest
📚 API Overview
interface Transaction
interface Transaction { readonly to: string; readonly amount: number; }
interface Chain
All blockchain classes implement the Chain
interface:
interface Chain { getPrivateKey(): string; getAddress(): string; signTransactions(transactions: Transaction[]): Promise<string[]>; sendTransactions(transactions: string[]): Promise<string[]>; isValidAddress(address: string): boolean; }
✅ Supported Networks
Blockchain | Mainnet | Testnet |
---|---|---|
Bitcoin | ✅ | ✅ |
Litecoin | ✅ | ✅ |
Ethereum | ✅ | ✅ |
Binance Smart Chain | ✅ | ✅ |
Solana | ✅ | ✅ |
Tron | ✅ | ✅ |
License
Distributed under the MIT License. See LICENSE for more information.
Add Package
deno add jsr:@webtools/procrypt
Import symbol
import * as procrypt from "@webtools/procrypt";
Import directly with a jsr specifier
import * as procrypt from "jsr:@webtools/procrypt";
Add Package
pnpm i jsr:@webtools/procrypt
pnpm dlx jsr add @webtools/procrypt
Import symbol
import * as procrypt from "@webtools/procrypt";
Add Package
yarn add jsr:@webtools/procrypt
yarn dlx jsr add @webtools/procrypt
Import symbol
import * as procrypt from "@webtools/procrypt";
Add Package
npx jsr add @webtools/procrypt
Import symbol
import * as procrypt from "@webtools/procrypt";
Add Package
bunx jsr add @webtools/procrypt
Import symbol
import * as procrypt from "@webtools/procrypt";