kasperia-sdk
v0.1.2
Published
kasperia sdk util with Rollup + TypeScript
Maintainers
Readme
Kasperia SDK
Kasperia SDK is a lightweight TypeScript/JavaScript library for interacting with Kasperia blockchain transactions and scripts.
It provides essential utilities and abstractions for building, signing, and managing transactions.
This package exposes only the core modules:
tx/index— Transaction utilities and helperstx/script/index— Script op-codes and related functions
Other internal files and helpers are intentionally hidden from external usage.
Installation
Using npm:
npm install kasperia-sdkUsage
Importing transactions utilities
import { createTransaction, PaymentOutput } from "kasperia-sdk/tx";
// Example: create a simple payment transaction
const output = new PaymentOutput("address_here", 100000n);
const tx = createTransaction([output], "change_address_here");
console.log(tx);Importing script op-codes
import { OP_DUP, OP_HASH160, OP_EQUALVERIFY, OP_CHECKSIG } from "kasperia-sdk/tx/script";
// Example: build a simple P2PKH script
const script = [OP_DUP, OP_HASH160, "pubKeyHash", OP_EQUALVERIFY, OP_CHECKSIG];
console.log(script);Features
- Fully written in TypeScript with type definitions included
- Minimal and focused API surface — only exposes essential modules
- Supports transaction creation, signing, and script handling
- Easily integrates into Node.js and browser projects
Contributing
- Contributions and issues are welcome! Please open a GitHub issue or pull request.
