Skip to main content

Installation

The official Urblock TypeScript SDK for Node.js and modern runtimes.

Requirements

  • Node.js ≥ 18.0.0 (uses native fetch)
  • TypeScript ≥ 5.0 (recommended)

Install

# npm
npm install @urblock/sdk

# pnpm
pnpm add @urblock/sdk

# yarn
yarn add @urblock/sdk

Quick Setup

import { Urblock } from "@urblock/sdk";

const urblock = new Urblock("sk_test_...");

// Deploy an ERC-20 token
const token = await urblock.tokens.create({
name: "My Token",
symbol: "MTK",
standard: "ERC20",
network: "polygon_amoy",
initial_supply: "1000000000000000000000000",
idempotency_key: "deploy-mtk-001",
});

console.log(token.id); // tok_...
console.log(token.status); // "deploying"

Environments

Key prefixEnvironmentNetworks
sk_test_TestPolygon Amoy (testnet)
sk_live_LivePolygon PoS (mainnet)
pk_test_Test (read-only)Polygon Amoy
pk_live_Live (read-only)Polygon PoS

Use sk_test_ keys during development. Switch to sk_live_ for production.

Module Formats

The SDK ships with dual builds:

FormatEntry point
ESM@urblock/sdk (import)
CommonJS@urblock/sdk (require)

TypeScript type declarations are included in both formats.

Zero Dependencies

The SDK has zero runtime dependencies. It uses the native fetch API available in Node.js 18+ and all modern browsers/runtimes (Deno, Bun, Cloudflare Workers).

Next Steps