@voidaisdk/bridge-sdk 0.0.5 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # VoidAI Bridge SDK
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/voidai-sdk.svg)](https://www.npmjs.com/package/voidai-sdk)
3
+ [![npm version](https://img.shields.io/npm/v/@voidaisdk/bridge-sdk.svg)](https://www.npmjs.com/package/@voidaisdk/bridge-sdk)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
6
  **TypeScript SDK for VoidAI Bridge** - Cross-chain asset bridging and routing across Bittensor, Ethereum, Solana, and other supported chains.
@@ -20,11 +20,11 @@ Perfect for building DeFi applications, cross-chain DEXs, or any app that needs
20
20
  ## 📦 Installation
21
21
 
22
22
  ```bash
23
- npm install voidai-sdk
23
+ npm install @voidaisdk/bridge-sdk
24
24
  # or
25
- yarn add voidai-sdk
25
+ yarn add @voidaisdk/bridge-sdk
26
26
  # or
27
- pnpm add voidai-sdk
27
+ pnpm add @voidaisdk/bridge-sdk
28
28
  ```
29
29
 
30
30
  ### Requirements
@@ -38,7 +38,7 @@ pnpm add voidai-sdk
38
38
  ### 1. Initialize the SDK
39
39
 
40
40
  ```typescript
41
- import { BridgeSDK } from 'voidai-sdk';
41
+ import { BridgeSDK } from '@voidaisdk/bridge-sdk';
42
42
 
43
43
  const sdk = new BridgeSDK({
44
44
  apiKey: process.env.VOIDAI_API_KEY!,
@@ -170,12 +170,16 @@ console.log('Total fee:', swapFee.totalFee);
170
170
 
171
171
  **📖 [Full Documentation](docs/README.md)** - Complete API reference, guides, and examples
172
172
 
173
- - [Getting Started Guide](docs/getting-started.md)
174
- - [SDK Initialization](docs/sdk-initialization.md)
175
- - [API Reference](docs/api/overview.md)
176
- - [Frontend Integration Examples](docs/frontend-integration.md)
177
- - [Error Handling](docs/error-handling.md)
178
- - [Best Practices](docs/best-practices.md)
173
+ - [Getting Started](docs/getting-started.md) – Installation, authentication, configuration
174
+ - [Wallets](docs/wallets.md) – Bittensor, EVM, Solana wallet connections
175
+ - [Bridge Operations](docs/bridge.md) – Cross-chain bridging
176
+ - [Router Swaps](docs/swap.md) – Token swaps via VoidAI Router
177
+ - [CCIP Routing](docs/ccip.md) – Cross-chain CCIP operations
178
+ - [Transactions](docs/transactions.md) – History, cancel, confirm
179
+ - [Server-Side Usage](docs/server.md) – Backend integration with BridgeSDKServer
180
+ - [API Reference](docs/api-reference.md) – SDK methods and types
181
+ - [FAQ](docs/FAQ.md) – Frequently asked questions
182
+ - [Error Handling](docs/error-handling.md) – Troubleshooting and error codes
179
183
 
180
184
  ## 💡 Key Features
181
185
 
@@ -224,12 +228,12 @@ console.log('Total fee:', swapFee.totalFee);
224
228
  For server-side or backend integrations, use `BridgeSDKServer` with both `apiKey` and `secretKey`:
225
229
 
226
230
  ```typescript
227
- import { BridgeSDKServer } from 'voidai-sdk';
231
+ import { BridgeSDKServer } from '@voidaisdk/bridge-sdk';
228
232
 
229
233
  const sdk = new BridgeSDKServer({
230
234
  apiKey: process.env.VOIDAI_API_KEY!,
231
235
  secretKey: process.env.VOIDAI_SECRET_KEY!,
232
- environment: 'production',
236
+ environment: 'mainnet', // 'devnet' | 'testnet' | 'mainnet'
233
237
  });
234
238
 
235
239
  await sdk.ready;
@@ -245,24 +249,24 @@ const result = await sdk.bridge.bridge({
245
249
 
246
250
  ## 🔧 Environment Configuration
247
251
 
248
- The SDK supports three environments:
252
+ The SDK supports three environments. The base URL and EVM bridge contract address are set per environment in the SDK config.
249
253
 
250
- | Environment | Base URL | Use Case |
251
- | ------------- | -------------------------------------------- | ----------------- |
252
- | `development` | `http://localhost:3003` | Local development |
253
- | `staging` | `https://api-staging.voidai.envistudios.com` | Testing & QA |
254
- | `production` | `https://api.voidai.envistudios.com` | Live applications |
254
+ | Environment | Base URL | Bridge Contract (EVM) | Use Case |
255
+ | ----------- | ------------------------------------------------------ | ------------------------------------------- | -------------------------- |
256
+ | `devnet` | `https://api-sdk-dev.voidai.envistudios.com/api` | `0x6266ce15aC4f32F096Ff91881dd887a0F4bBa569` | Development & testing |
257
+ | `testnet` | `https://sdk-backend.voidai.com/sdk` | `0x4aA4396BfD6F268b427077079800F420dF947b63` | Staging / pre-production |
258
+ | `mainnet` | `https://sdk.voidai.com/sdk` | `0x604e8Ef901C0E69E79463D997ba7D0724A909b84` | Production |
255
259
 
256
260
  ## 📝 Example: Complete Bridge Flow
257
261
 
258
262
  ```typescript
259
- import { BridgeSDK } from 'voidai-sdk';
263
+ import { BridgeSDK } from '@voidaisdk/bridge-sdk';
260
264
 
261
265
  async function bridgeTAO() {
262
266
  // 1. Initialize SDK
263
267
  const sdk = new BridgeSDK({
264
268
  apiKey: process.env.VOIDAI_API_KEY!,
265
- environment: 'staging',
269
+ environment: 'testnet', // or 'mainnet' for production
266
270
  });
267
271
 
268
272
  await sdk.ready;
@@ -365,11 +369,11 @@ bridge-sdk/
365
369
 
366
370
  ```html
367
371
  <script type="module">
368
- import { BridgeSDK } from './node_modules/voidai-sdk/dist-browser/voidai-sdk.js';
372
+ import { BridgeSDK } from './node_modules/@voidaisdk/bridge-sdk/dist-browser/voidai-sdk.js';
369
373
 
370
374
  const sdk = new BridgeSDK({
371
375
  apiKey: 'your-api-key',
372
- environment: 'staging',
376
+ environment: 'mainnet', // 'devnet' | 'testnet' | 'mainnet'
373
377
  });
374
378
  </script>
375
379
  ```
@@ -377,10 +381,10 @@ bridge-sdk/
377
381
  ### Bundler (Webpack/Vite/Rollup)
378
382
 
379
383
  ```typescript
380
- import { BridgeSDK } from 'voidai-sdk';
384
+ import { BridgeSDK } from '@voidaisdk/bridge-sdk';
381
385
 
382
386
  // Use normally - bundler will handle it
383
- const sdk = new BridgeSDK({ apiKey, environment: 'production' });
387
+ const sdk = new BridgeSDK({ apiKey, environment: 'mainnet' }); // 'devnet' | 'testnet' | 'mainnet'
384
388
  ```
385
389
 
386
390
  ## ⚠️ Error Handling
@@ -412,7 +416,7 @@ See [Error Handling Guide](docs/error-handling.md) for detailed patterns.
412
416
  - ✅ **Validate user inputs** before passing to SDK
413
417
  - ✅ **Keep dependencies updated** - Monitor security advisories
414
418
 
415
- See [Best Practices](docs/best-practices.md) for more guidance.
419
+ See [Full Documentation](docs/README.md) for more guidance.
416
420
 
417
421
  ## 📖 Examples
418
422
 
@@ -429,7 +433,7 @@ Check out the [example frontend app](examples/frontend/) for a complete integrat
429
433
 
430
434
  - **Documentation**: [Full docs](docs/README.md)
431
435
  - **Issues**: [GitHub Issues](https://github.com/your-org/bridge-sdk/issues)
432
- - **FAQ**: [Troubleshooting Guide](docs/faq.md)
436
+ - **FAQ**: [FAQ](docs/FAQ.md)
433
437
 
434
438
  ## 📄 License
435
439
 
package/dist/config.js CHANGED
@@ -31,11 +31,11 @@ BridgeConfig.DEFAULTS = {
31
31
  bridgeContractAddress: '0x6266ce15aC4f32F096Ff91881dd887a0F4bBa569',
32
32
  },
33
33
  testnet: {
34
- baseUrl: 'https://sdk-backend.voidai.com/api',
34
+ baseUrl: 'https://sdk-backend.voidai.com/sdk',
35
35
  bridgeContractAddress: '0x4aA4396BfD6F268b427077079800F420dF947b63',
36
36
  },
37
37
  mainnet: {
38
- baseUrl: 'https://d45byonnywfx1.cloudfront.net/sdk',
39
- bridgeContractAddress: '0x4aA4396BfD6F268b427077079800F420dF947b63',
38
+ baseUrl: 'https://sdk.voidai.com/sdk',
39
+ bridgeContractAddress: '0x604e8Ef901C0E69E79463D997ba7D0724A909b84',
40
40
  },
41
41
  };