Skip to main content
This guide takes you from zero to your first successful API call in each of the official Yativo Crypto SDKs. Each example shows install, initialization, authentication, and creating your first wallet.
All examples connect to the Sandbox at https://crypto-sandbox.yativo.com/api/ by default. Switch to https://crypto-api.yativo.com/api/ when you’re ready for production.

Prerequisites

  1. Sign up at crypto.yativo.com
  2. Create an API key in the Dashboard under Settings → API Keys
  3. Copy the key — it starts with yvk_

Install

npm install @yativo/crypto-sdk
# or
yarn add @yativo/crypto-sdk
# or
pnpm add @yativo/crypto-sdk

Initialize

TypeScript
import { YativoCrypto } from "@yativo/crypto-sdk";

const client = new YativoCrypto({
  apiKey: process.env.YATIVO_API_KEY!, // yvk_sandbox_...
  baseUrl: "https://crypto-sandbox.yativo.com/api/", // switch to crypto-api for production
});

Authenticate and make your first call

TypeScript
import { YativoCrypto } from "@yativo/crypto-sdk";

const client = new YativoCrypto({
  apiKey: process.env.YATIVO_API_KEY!,
  baseUrl: "https://crypto-sandbox.yativo.com/api/",
});

async function main() {
  // 1. Verify credentials
  const me = await client.auth.me();
  console.log(`Authenticated as: ${me.email}`);
  console.log(`Organization: ${me.organizationName}`);

  // 2. Create an account
  const account = await client.accounts.create({
    label: "my_first_account",
    metadata: { purpose: "quickstart" },
  });
  console.log(`Account created: ${account.accountId}`);

  // 3. Add a USDC wallet on Polygon
  const wallet = await client.assets.addAsset({
    accountId: account.accountId,
    chain: "polygon",
    asset: "USDC",
  });
  console.log(`Wallet address: ${wallet.address}`);
  // 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
}

main().catch(console.error);

TypeScript types

The SDK ships with full TypeScript types. No additional @types package is needed.
TypeScript
import type { Account, Asset, Transaction } from "@yativo/crypto-sdk";

async function getAccountWallets(accountId: string): Promise<Asset[]> {
  return client.assets.listByAccount(accountId);
}

Environment setup

.env
YATIVO_API_KEY=yvk_sandbox_01J2K9MNPQ3R4S5T6U7VAPIKEY
TypeScript
// Use dotenv in Node.js
import "dotenv/config";
import { YativoCrypto } from "@yativo/crypto-sdk";

const client = new YativoCrypto({
  apiKey: process.env.YATIVO_API_KEY!,
  baseUrl: process.env.YATIVO_BASE_URL ?? "https://crypto-sandbox.yativo.com/api/",
});

Next Steps

Accept Crypto Payments

Create accounts, generate deposit addresses, and handle webhook notifications.

Send Crypto

Programmatically send funds to external wallets with idempotency.

Webhook Integration

Set up real-time event notifications with signature verification.

Issue Cards

Issue crypto-funded virtual and physical cards to users.