Skip to content
 
 

Repository files navigation

UTXOS Web3 Services SDK

The official SDK for UTXOS - a Web3 infrastructure platform for UTXO-based blockchains. This SDK provides comprehensive tools for building Web3 applications with support for Bitcoin, Cardano, and Spark networks.

Visit UTXOS for more information.

Features

  • Multi-Chain Support: Bitcoin, Cardano, and Spark blockchains
  • Developer-Controlled Wallets: Manage wallets on behalf of users with secure backend integration
  • User-Controlled Wallets: Non-custodial wallet solutions with OAuth integration (Google, Twitter, Discord)
  • Transaction Sponsorship: Sponsor transactions for gasless user experiences
  • Shard-Based Security: Client-side key management with multi-shard encryption
  • TypeScript Native: Full type safety and IntelliSense support

Installation

npm install @utxos/sdk

Quick Start

User-Controlled Wallets

Enable users to create non-custodial wallets with OAuth:

import { Web3Wallet, EnableWeb3WalletOptions } from '@utxos/sdk';

const options: EnableWeb3WalletOptions = {
  networkId: 0, // 0: TESTNET, 1: MAINNET
  projectId: process.env.NEXT_PUBLIC_UTXOS_PROJECT_ID,
};

const wallet = await Web3Wallet.enable(options);

const bitcoinWallet = wallet.bitcoin;
const cardanoWallet = wallet.cardano;
const sparkWallet = wallet.spark;

Check https://docs.utxos.dev/wallet for more details.

Initialize the SDK

import { Web3Sdk } from '@utxos/sdk';

const sdk = new Web3Sdk({
  projectId: 'your-project-id',
  apiKey: 'your-api-key',
  privateKey: 'your-private-key',
  network: 'mainnet',
});

Developer-Controlled Wallets

Create and manage wallets on your backend:

// Create a new wallet
const wallet = await sdk.wallet.create();

// Get wallet
const { info, wallet } = await sdk.wallet.getWallet("WALLET_ID", NETWORK_ID);

Check https://docs.utxos.dev/wallet/developer-controlled for more details.

Transaction Sponsorship

Sponsor transactions to provide gasless experiences:

// Sponsor a transaction
const sponsoredTx = await sdk.sponsorship.sponsor({
  unsignedTx: transactionHex,
  chain: 'cardano',
});

Check https://docs.utxos.dev/sponsor for more details.

Supported Chains

  • Bitcoin: Mainnet and Testnet
  • Cardano: Mainnet (Preview, Preprod, Mainnet)
  • Spark: Mainnet and Regtest

Repository notes (local changes)

  • Config presets are now published with the package (src/configs/** is included in package.json:files) so consumers can import the ESLint/TypeScript/Prettier configs directly.
  • Security hardening: package.json overrides point npm to a minimal stub in stubs/npm. This removes the vulnerable bundled npm CLI pulled in by @cardano-sdk/* dependencies while leaving runtime behavior unchanged. If you need the real npm CLI for tooling inside those packages, delete the override and rerun npm install (audit warnings will return).

Links

Support

For questions and support, join our Discord community.

About

SDK for Web3 Services

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages