A clean, opinionated TypeScript demo project for interacting with the Fireblocks platform using the official Fireblocks TypeScript SDK.
This repository is designed as a practical starting point for developers new to Fireblocks, with a structure that mirrors real workflows in the Fireblocks Console.
All core functionality is SDK-first.
Optional raw REST + JWT tooling is included only to explain authentication mechanics and
support learning or debugging with tools like Postman.
-
SDK-first
Uses@fireblocks/ts-sdkfor all standard operations. No manual JWT handling required. -
Console-aligned
Commands map directly to Fireblocks Console concepts: vaults, wallets, deposit addresses, and transactions. -
REST explained, not required
Raw REST examples exist only to demonstrate how Fireblocks authentication works under the hood. -
Beginner-friendly, production-aware
Minimal abstractions, clear CLI commands, and strong typing throughout.
Fireblocks exposes a single REST API, but SDKs simplify and secure access.
This project uses the TypeScript SDK for all normal usage.
Raw REST access is included only for educational purposes.
Building an app? Use the SDK.
Learning how Fireblocks works? Explore the REST examples.
- Node.js 18+
- pnpm
- Fireblocks workspace
- Fireblocks API key + private key (PEM)
pnpm installCreate a .env file in the project root:
FIREBLOCKS_API_KEY=<YOUR_API_KEY>
FIREBLOCKS_SECRET_PATH=./secrets/fireblocks_secret.key
# Sandbox (recommended)
# FIREBLOCKS_BASE_PATH=https://sandbox-api.fireblocks.io
# Production
FIREBLOCKS_BASE_PATH=https://api.fireblocks.io.env or private keys
pnpm run vault:listYou should see a paginated list of vault accounts.
src/
├─ lib/
│ ├─ fireblocks.ts # Fireblocks client bootstrap
│ ├─ cli.ts # CLI arg parsing
│ └─ output.ts # JSON formatting + truncation
│
├─ commands/
│ ├─ vaults/
│ │ ├─ listVaults.ts
│ │ ├─ createVault.ts
│ │ ├─ listDepositAddresses.ts
│ │ └─ createDepositAddress.ts
│ │
│ ├─ wallets/
│ │ ├─ internal/
│ │ │ ├─ listInternalWallets.ts
│ │ │ └─ getInternalWallet.ts
│ │ └─ external/
│ │ └─ listExternalWallets.ts
│ │
│ ├─ transactions/
│ │ ├─ createTransfer.ts
│ │ ├─ listTransactions.ts
│ │ ├─ getTransaction.ts
│ │ └─ pollTransaction.ts
│ │
│ └─ advanced/
│ ├─ transferAssist.ts
│ ├─ contractCall.ts
│ └─ rawSigning.ts
│
└─ tools/
└─ generateJwt.ts # REST / Postman helper only
pnpm run vault:list
pnpm run vault:create -- "My New Vault"pnpm run deposit:list -- <vaultId> SOL
pnpm run deposit:create -- <vaultId> SOLNote: Some assets (ETH, MATIC) may require address creation via the Console UI first.
pnpm run wallets:internal:list
pnpm run wallets:internal:get -- <walletId>pnpm run wallets:external:listCreate a transfer (Vault → Vault):
pnpm run tx:create -- <fromVaultId> <toVaultId> SOL 0.01 --note "demo sol transfer"List transactions:
pnpm run tx:list
pnpm run tx:list -- --asset SOL --limit 5
pnpm run tx:list -- --asset SOL --limit 5 --rawGet a transaction:
pnpm run tx:get -- <transactionId>
pnpm run tx:get -- <transactionId> --rawPoll until completion:
pnpm run tx:poll -- <transactionId> --interval 3 --timeout 180Fireblocks exposes one REST API, but provides SDKs for safety and convenience.
- Handles JWT signing automatically
- Strong typing
- Retry + error handling
- Much harder to misuse
All main commands in this repo use the SDK.
The tools/generateJwt.ts script exists only to help with:
- Postman testing
- Understanding JWT signing
- Debugging raw requests
You do not need REST JWTs when using the SDK.
When calling REST endpoints directly:
JWT uri must match the request exactly.
Rules:
- Include
/v1 - Include query string
- Exclude domain
- No trailing slashes
Example:
Request:
GET /v1/vault/accounts_paged?limit=50JWT payload:
{
"uri": "/v1/vault/accounts_paged?limit=50",
"sub": "<API_KEY>",
"nonce": 123456789,
"iat": 1700000000,
"exp": 1700000180
}This project intentionally demonstrates differences between:
- ETH (EVM, account-based)
- SOL (non-EVM, staking, rent)
- POLYGON (MATIC) (EVM sidechain)
You will see real behavioral differences across:
- Deposit address creation
- Fees
- Transaction metadata
- Extra parameters
- Amounts are passed as strings to avoid floating-point errors
- CLI flags are consistent across commands
--rawalways returns full API payloads- Output is truncated by default for readability
- Extend transfers to external wallets
- Add ERC-20 contract calls
- Add policy-aware flows
- Build UI on top of these commands
This repository is for educational and demo purposes. Always follow your organization’s security and operational policies when interacting with production assets.
Happy building 🚀