
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
@kasplex/kiwi-web
Advanced tools
A powered solution for effortless Kaspa wallet integration, delivering secure and streamlined blockchain operations.
**Kasplex Wallet SDK for web - Kasplex in Wallet Integration (Kiwi) is a powerful and easy-to-use SDK designed to simplify the management of Kaspa wallet assets. It provides seamless integration with Kaspa nodes, KRC20 tokens, and essential wallet functionalities, enabling developers to build robust Kaspa-based applications effortlessly.
Node.js Version Requirement: This SDK requires Node.js version 20.13.1 or higher. You can check your Node.js version by running:
node -v
To integrate Kasplex Wallet SDK - Kiwi into your project, follow these steps:
Install the SDK:
npm install @kasplex/kiwi-web
Set up networkType and init rpc client for use:
import { Kiwi, Rpc, Wasm, initialize } from '@kasplex/kiwi-web'
// Initialize WASM
// ⚠️ The wasm file MUST be from kaspa-wasm v1.1.0
// You can find `kaspa_bg.wasm` in:
// node_modules/@kasplex/kiwi-web/dist/kaspa_bg.wasm
//
// In browser environments, the wasm file should be copied
// to your project's public directory and referenced by URL.
// The path must be publicly accessible and served with `application/wasm` MIME type.
await initialize('/wasm/kaspa_bg.wasm')
// Set network type (Mainnet or Testnet)
await Kiwi.setNetwork(Wasm.NetworkType.Mainnet)
// Use NetworkType.Testnet for testnet
// await Kiwi.setNetwork(Wasm.NetworkType.Testnet)
// Initialize and connect RPC client (optional but required for node queries)
const rpc = Rpc.setInstance(Wasm.NetworkType.Mainnet)
await rpc.connect()
Generate a new wallet:
import { Mnemonic, Wallet } from "@kasplex/kiwi-web";
const mnemonic = Mnemonic.random(12);
console.log("Generated Mnemonic:", mnemonic);
let wallet = Wallet.fromMnemonic(mnemonic)
KAS Transfer:
import { KaspaTransaction } from "@kasplex/kiwi-web";
const resp = await KaspaTransaction.transferKas(privateKey, toAddress, 130000000n, 10000n)
KRC20:
import { Enum, Utils, KRC20 } from "@kasplex/kiwi-web";
const krc20data = Utils.createKrc20Data({
p: "krc-20",
op: Enum.OP.Mint,
tick: 'TCKFE',
})
let txid = await KRC20.mint(_privateKey, krc20data, 100000n)
console.log("Mint txid", txid)
Browser Extension Integration:
import { BrowerWallet, WalletApi } from "@kasplex/kiwi-web";
const walletList = await BrowerWallet.getBrowerWalletList();
console.log("walletList", walletList);
// Create and initialize wallet instance
const wallet = await WalletApi.create('kasware');
// Request account access
const accounts = await wallet.requestAccounts();
console.log('Connected accounts:', accounts);
// Get wallet balance
const balance = await wallet.getBalance();
console.log('Wallet balance:', balance);
For detailed browser extension integration guide, please refer to our Browser Extension Documentation
The Kiwi Web SDK depends on a WebAssembly module (kaspa_bg.wasm).
You must initialize it once before using any wallet, RPC, or transaction-related functionality.
WASM version requirement
🔒 WASM Version Compatibility
This SDK is tested and compatible only with kaspa-wasm@1.1.0. ❌ 0.x versions are not supported ❌ Mixing JS and WASM from different versions will cause runtime errors ✅ Recommended: kaspa-wasm@1.1.0-rc.2
💡 Tip: If you encounter errors like expected magic word 00 61 73 6d or __wbindgen_closure_wrapper please double-check your WASM version and loading path.
We welcome contributions from the community! Feel free to submit issues, feature requests, or pull requests to improve the Kasplex Wallet SDK - Kiwi.
This project is licensed under the MIT License.
🚀 Start building with Kasplex Wallet SDK - Kiwi today and unlock the full potential of the Kaspa ecosystem!
FAQs
A powered solution for effortless Kaspa wallet integration, delivering secure and streamlined blockchain operations.
The npm package @kasplex/kiwi-web receives a total of 28 weekly downloads. As such, @kasplex/kiwi-web popularity was classified as not popular.
We found that @kasplex/kiwi-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.