@sqds/grid
v3.1.2
Published
Grid SDK - Core TypeScript client (platform-agnostic)
Keywords
Readme
@sqds/grid
Grid SDK for typescript applications.
Installation
npm install @sqds/gridFeatures
- 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: '[email protected]'
});
const otpCode = '123456';
const response = await client.completeAuthAndCreateAccount({
email: '[email protected]',
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.
