voidai-sdk
v0.1.1
Published
TypeScript SDK for VoidAI Bridge - Blockchain wallet authentication and API integration
Maintainers
Readme
VoidAI Bridge SDK
TypeScript SDK for VoidAI Bridge - A bridge application that bridges TAO tokens between Bittensor and Ethereum blockchains.
📦 Installation
npm install voidai-sdk🚀 Quick Start
import { BridgeSDK } from 'voidai-sdk';
// Initialize the SDK
const sdk = new BridgeSDK({
apiKey: 'your-api-key',
environment: 'development' // or 'production', 'staging'
});
await sdk.init();
// Connect wallets
await sdk.wallets.bittensor.connect();
await sdk.wallets.ethereum.connect();
await sdk.wallets.solana.connect();
// Use API methods
const chains = await sdk.api.getSupportedChains();
const assets = await sdk.api.getAssetList();🔑 Features
Multi-Wallet Support
- Bittensor (Talisman, Polkadot.js, Subwallet)
- Ethereum (MetaMask)
- Solana (Phantom)
API Methods
- Get supported chains
- Get asset list
- Chain filtering (by chainId, isActive, isCcipSupported)
TypeScript Support
- Full type definitions included
- IntelliSense support
🔧 Development
Build
# Build for Node.js
npm run build
# Build for browser
npm run build:browser
# Build both
npm run build:allTest
npm test📁 Project Structure
bridge-sdk/
├── src/ # SDK source code
│ ├── api/ # API client
│ ├── config.ts # Configuration
│ ├── core/ # Core bridge logic
│ ├── types/ # TypeScript types
│ ├── utils/ # Utilities
│ ├── wallet/ # Wallet integrations
│ └── index.ts # Main entry point
├── dist/ # Compiled SDK (Node.js)
├── dist-browser/ # Browser bundle
├── test/ # Test suite
├── examples/ # Example applications
│ └── frontend/ # Frontend demo
└── package.json🌐 Browser Usage
For browser usage, include the bundled SDK:
<script src="node_modules/voidai-sdk/dist-browser/voidai-sdk.js"></script>
<script>
const sdk = new VoidAISDK.BridgeSDK({
apiKey: 'your-api-key',
environment: 'development'
});
</script>📝 License
MIT
🤝 Contributing
Contributions are welcome! Please ensure all tests pass before submitting a pull request.
