Skip to main content
Version: 3.0.1 | View on npm Grid SDK for TypeScript applications.

Installation

npm install @sqds/grid

Features

  • Multi-provider: Turnkey, Privy, and passkey authentication
  • Smart accounts: Multi-sig policies, spending limits, time locks
  • Smart transactions: Automated DCA, limit orders, and trading strategies
  • Fiat on/off-ramp: ACH, SEPA, wire transfers with virtual accounts
  • KYC verification: Identity verification for regulated operations

Usage

import { GridClient } from '@sqds/grid';

const client = new GridClient({
  apiKey: 'your-api-key',
  environment: 'sandbox',
});

try {
  const sessionSecrets = await client.generateSessionSecrets();

  await client.createAccount({
    email: 'user@example.com'
  });

  const otpCode = '123456';

  const response = await client.completeAuthAndCreateAccount({
    email: 'user@example.com',
    code: otpCode,
    sessionSecrets
  });

  const balances = await client.getBalances({
    accountAddress: response.data.address,
  });

  console.log('Balances:', balances.data);
} catch (error) {
  console.error('Error:', error.message);
}
Note: After calling createAccount, an OTP code will be sent to the user’s email. The user must enter this code, which you then pass to completeAuthAndCreateAccount to complete the authentication flow.