Quick start
Install dependencies and set up your environment:
npm install @arkade-os/sdk @scure/base
import {
RestArkProvider,
RestIndexerProvider,
SingleKey,
VtxoScript,
Transaction,
MultisigTapscript,
CLTVMultisigTapscript,
buildOffchainTx,
CSVMultisigTapscript,
networks
} from '@arkade-os/sdk';
import { hex, base64 } from '@scure/base';
// Setup providers (use same URL for both on mutinynet)
const arkProvider = new RestArkProvider('https://mutinynet.arkade.sh');
const indexerProvider = new RestIndexerProvider('https://mutinynet.arkade.sh');
const info = await arkProvider.getInfo();
// Convert 33-byte compressed pubkey to 32-byte x-only
const serverPubkey = hex.decode(info.signerPubkey).slice(1);
// Create identity
const identity = SingleKey.fromRandomBytes();
const myPubkey = await identity.xOnlyPublicKey();
Use @scure/base for encoding, NOT bitcoinjs-lib. The SDK is built on @scure libraries.
Tapscript helpers
The SDK includes helper classes for common Tapscript patterns:
| Helper | Purpose |
|---|
MultisigTapscript | N-of-N multisig scripts |
CLTVMultisigTapscript | Multisig with absolute timelock (CLTV) |
CSVMultisigTapscript | Multisig with relative timelock (CSV) |
VtxoScript | Combine multiple spending paths into a Taproot tree |
Learn how to use these helpers with VTXOs and the two-phase transaction flow
Next steps