Account Abstraction
SDK
Getting Started

Getting Started 🚀

To start using the Xellar Javascript SDK, follow these steps:

  1. Install the SDK:
npm install @xellar/sdk
  1. Import and initialize the SDK:
ℹ️

You can get your appId in Xellar Dashboard .

import { XellarSDK } from '@xellar/sdk';
 
const xellar = new XellarSDK({
   clientSecret: 'YOUR_CLIENT_SECRET',
   appId: 'YOUR_APP_ID', // Optional. If you use appId, you need to add your origin in Xellar Dashboard.
   env: 'sandbox | production',
});
  1. Usage

Everything related to account abstraction functionality can be accessed from xellar.accountAbstraction. Example:

  xellar.accountAbstraction.auth.createAccount({
    owner: "0x....."
  })

Platform Specific Instructions

React Native

ℹ️

You need to install react-native-quick-crypto to use the SDK for React Native.

import { XellarSDK } from '@xellar/sdk/react-native'; // <<-- Import for React Native
 
const xellar = new XellarSDK({
   clientSecret: 'YOUR_CLIENT_SECRET',
   appId: 'YOUR_APP_ID', // Optional. If you use appId, you need to add your origin in Xellar Dashboard.
   env: 'sandbox | production',
});

You can get your client secret from the Xellar Dashboard (opens in a new tab).