Installation
npm install @rebelfi/sdk
yarn add @rebelfi/sdk
pnpm add @rebelfi/sdk
bun add @rebelfi/sdk
RebelfiClient
The main SDK client class.Constructor
import { RebelfiClient } from '@rebelfi/sdk';
const client = new RebelfiClient(config: RebelfiSDKConfig);
RebelfiSDKConfig
interface RebelfiSDKConfig {
/** Your RebelFi API key (required) */
apiKey: string;
/** Set to true to use sandbox environment (sandbox-api.rebelfi.io) */
sandbox?: boolean;
/** Optional: Override base URL (e.g., for proxying) */
baseUrl?: string;
/** Request timeout in milliseconds (default: 60000) */
timeout?: number;
}
Properties
| Property | Type | Description |
|---|---|---|
venues | VenuesAPI | Venue and strategy operations |
wallets | WalletsAPI | Wallet registration and management |
allocations | AllocationsAPI | Allocation queries and org overview |
operations | OperationsAPI | Supply and unwind operations |
transactions | TransactionsAPI | Transaction submission |
walletProfiles | WalletProfilesAPI | Wallet profile listing |
Example
// Production
const client = new RebelfiClient({
apiKey: process.env.REBELFI_API_KEY
});
// Sandbox
const sandbox = new RebelfiClient({
apiKey: process.env.REBELFI_SANDBOX_API_KEY,
sandbox: true
});