@chainvue/verus-sdk
v0.5.1
Published
100% offline, fully typed TypeScript SDK for Verus transaction signing
Maintainers
Readme
@chainvue/verus-sdk
Offline Verus transaction signing. Bring UTXOs and a WIF; get back signed transaction hex — no daemon, no network. Native transfers, token/currency transfers, conversions, and the full VerusID lifecycle. Serialization uses VerusCoin's own primitives, so the wire format is the daemon's, not a reimpl.
npm i @chainvue/verus-sdkimport { VerusSDK } from "@chainvue/verus-sdk";
const sdk = new VerusSDK({ network: "testnet" }); // or "mainnet"
const { signedTx, txid, fee } = sdk.transfer({
wif: "<WIF>",
to: "R…recipient",
amount: 100_000_000n, // satoshis (bigint)
utxos: [{ txid, outputIndex, satoshis: 500_000_000n, script }],
changeAddress: "R…change",
});
// broadcast signedTx yourself, e.g. verus-rpc `sendrawtransaction`Money is bigint satoshis end to end — never a float. Convert at the edges:
parseSats("1.5") → 150000000n, toCoins(150000000n) → "1.5".
What it does
- Transfers —
transfer,transferToken,convert, andsendCurrency(full control over multi-output / cross-chain sends). - VerusID —
createCommitment→registerIdentity(incl. sub-IDs), thenupdateIdentity/lockIdentity/unlockIdentity/revokeIdentity/recoverIdentity, plussignMessage/verifyMessage. - Helpers —
VerusSDK.generateWif(),deriveAddress(wif),deriveIdentityAddress(name, parent?),validateAddress,validateWif;utils.summarizeSignedTransaction(hex)decodes a signed tx (txid, spent outpoints, addressed outputs) for your ledger.
Every built transfer is re-validated against its intent — per-currency value conservation, change to the declared address — before the hex is returned. A selection or change bug throws; it never hands you a bad transaction.
Good to know
- Self-contained bundle: the VerusCoin forks (utxo-lib, primitives,
bitcoin-ops) are inlined — no
github:deps or install-time patches in your tree. Regular npm deps install normally. - TypeScript: self-contained declarations — no
skipLibCheckneeded and no fork packages to install; the type surface for the bundled forks ships with the package. - Signing only: broadcasting, UTXO fetching, and confirmation tracking are
yours (see
verus-rpc). - Node ≥ 18. Wire format proven against a live VRSCTEST daemon — see RISKS.md.
Apache-2.0 · see NOTICE for the bundled forks.
