Official TypeScript/JavaScript SDK for Bloque platform.
⚠️ Development NoticeThis SDK is currently under active development. Breaking changes may occur between versions. We strongly recommend pinning to a specific version in your
package.jsonto avoid unexpected issues.{ "dependencies": { "@bloque/sdk": "x.x.x" } }Replace
x.x.xwith the latest version from npm.
This SDK is compatible with multiple JavaScript runtimes:
- Node.js 22.x or higher
- Bun 1.x or higher
- Deno Latest version
- Web/Browsers Modern browsers with ES2020+ support
One command. Then just ask your agent.
npx @bloque/cli setupAfter setup, talk to your agent naturally:
- "Create a card for food expenses, load it with $200"
- "I need a $25 disposable card for this website"
- "Show me my balances"
- "Top up my account with 100,000 COP from my bank"
Supports Cursor, Claude Desktop, Claude Code, and Antigravity on macOS, Linux, and Windows.
See the full CLI docs at packages/cli.
This monorepo contains the following packages:
| Package | Description |
|---|---|
| @bloque/sdk | Main SDK — aggregates all packages |
| @bloque/sdk-core | Core utilities, HTTP client, and shared types |
| @bloque/sdk-accounts | Accounts, cards, Polygon, and transfers |
| @bloque/sdk-orgs | Organizations API |
| @bloque/sdk-compliance | KYC verification and compliance |
| @bloque/sdk-identity | Identity and aliases |
| @bloque/cli | CLI + MCP server for AI agents |
npx @bloque/cli setupnpm install @bloque/sdk
# or
bun add @bloque/sdkRun npx @bloque/cli setup, restart your agent, and start asking. No code needed.
import { SDK } from '@bloque/sdk';
const bloque = new SDK({
origin: 'your-origin',
auth: {
type: 'apiKey',
apiKey: process.env.BLOQUE_API_KEY!,
},
mode: 'production',
});
const session = await bloque.connect('user-alias');
// Create a virtual card
const card = await session.accounts.card.create({
urn: 'did:bloque:your-origin:user-alias',
name: 'My Virtual Card',
});
console.log('Card created:', card.urn);
console.log('Last four digits:', card.lastFour);
// Create a Polygon wallet
const wallet = await session.accounts.polygon.create({
metadata: { purpose: 'web3-transactions' },
});
console.log('Polygon wallet created:', wallet.address);For detailed SDK documentation, see the @bloque/sdk package README.
- One of the supported runtimes: Node.js 22.x+, Bun 1.x+, Deno, or modern browsers
- TypeScript 5.x or higher (optional, for TypeScript projects)
# Install dependencies
bun install
# Build all packages
bun run build
# Clean all packages
bun run cleanbun run build- Build all packages in the correct orderbun run clean- Clean all package builds and node_modulesbun run changeset- Create a new changeset for versioningbun run version- Apply changesets and version packagesbun run publish- Publish packages to npm
Each package has its own development scripts:
# Navigate to a package
cd packages/sdk
# Build the package
bun run build
# Watch mode for development
bun run dev
# Type check
bun run typecheck
# Code quality checks
bun run checkContributions are welcome! Please ensure all tests pass and code quality checks are satisfied before submitting a PR.
Copyright (c) 2025-present Bloque Copilot Inc.