Getting Started
joltz-js is the TypeScript wrapper for the Joltz SDK. Currently the SDK can only run with Node.js however you can still connect to the SDK using Joltz Connect (our alternative to Wallet Connect) in the browser.
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-js
Example
import { SDK, generateSeed } from "joltz-js";
// First, you need to generate a seed phrase. This seed phrase is in the azseed format (like LND).
const seed = await generateSeed();
// Then you need to initialize the SDK.
const sdk = new SDK({
seed,
network: "signet"
});
// 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:
- 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));
- Make a request to the faucet.
curl "https://signet-faucet-1-796811734715.us-west1.run.app/v1/fund?address=${ADDRESS}"
- 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.
- Create an Address.
// Set up the SDK like shown in the Example above.
// ...
// Create the address.
console.log("address", await sdk.bitcoin.newAddress());
- Fill out this form with the address: signet25.bublina.eu.org/.