Skip to main content

Getting Started

@joltz/sdk-js is the JavaScript wrapper for the Joltz SDK. Currently only Node.js is supported, but support for the browser will soon be added as well.

Install

The Joltz SDK public beta is on npm, this beta is limited to the signet network. Contact Joltz to access our private mainnet beta (request access here). Run the following command to install:

npm install @joltz/sdk-js

Example

import { SDK, newSeed } from "@joltz/sdk-js";

// First, you need to generate a seed phrase. This seed phrase is in the azseed format (like LND).
const seed = await newSeed();

// Then you need to initialize the SDK.
const sdk = new SDK({ seed });

// Now you are all set, you can start calling SDK functions (i.e. create a bitcoin address!).
console.log("address", await sdk.bitcoin.newAddress());

Using the Signet Faucet (Assets)

Joltz offers a dummy asset on signet available via our faucet. The asset ID is 53b1309c60afd64068025de0c2a3d0bc01952cb6d8b0f9126da54dbda2d06ccf. You can send coins to yourself by doing the following:

  1. Create an Address.
// Set up the SDK like shown in the Example above.
// ...

// Create a Taproot Asset address for 1k units or less.
console.log("address", await sdk.tap.newAddress("53b1309c60afd64068025de0c2a3d0bc01952cb6d8b0f9126da54dbda2d06ccf", 1_000));
  1. Make a request to the faucet.
curl "https://signet-faucet-1-796811734715.us-west1.run.app/v1/fund?address=${ADDRESS}"
  1. Done, you should see your assets in your balance after your funding transaction is confirmed.

Using the Signet Faucet (Bitcoin)

You can request signet coins from the public faucet.

  1. Create an Address.
// Set up the SDK like shown in the Example above.
// ...

// Create the address.
console.log("address", await sdk.bitcoin.newAddress());
  1. Fill out this form with the address: signet25.bublina.eu.org/.