{"id":21410531,"url":"https://github.com/bitriel/wallet-sdk","last_synced_at":"2026-02-19T01:06:21.150Z","repository":{"id":238661360,"uuid":"797168078","full_name":"bitriel/wallet-sdk","owner":"bitriel","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-07T17:12:48.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-08T09:17:02.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/bitriel-wallet-sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitriel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-07T10:22:56.000Z","updated_at":"2025-03-07T17:12:52.000Z","dependencies_parsed_at":"2024-05-07T11:25:40.026Z","dependency_job_id":"5f0ccaf8-3999-4a43-b397-23c232762af9","html_url":"https://github.com/bitriel/wallet-sdk","commit_stats":null,"previous_names":["bitriel/bitriel-react-sdk","bitriel/wallet-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitriel%2Fwallet-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitriel%2Fwallet-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitriel%2Fwallet-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitriel%2Fwallet-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitriel","download_url":"https://codeload.github.com/bitriel/wallet-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910731,"owners_count":20367538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T17:40:29.769Z","updated_at":"2026-02-19T01:06:16.119Z","avatar_url":"https://github.com/bitriel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitriel Wallet SDK\n\n[![Version](https://img.shields.io/npm/v/bitriel-wallet-sdk.svg)](https://www.npmjs.com/package/bitriel-wallet-sdk)\n[![License](https://img.shields.io/npm/l/bitriel-wallet-sdk.svg)](https://github.com/bitriel/wallet-sdk/blob/main/LICENSE)\n\nA powerful TypeScript SDK for interacting with multiple blockchain networks, including the Selendra network, Polkadot ecosystem, and Ethereum EVM chains. This SDK provides a unified interface for wallet operations, token management, and transaction handling across different blockchain networks.\n\n## Features\n\n-   🌐 Multi-chain support:\n    -   Selendra Network\n    -   Polkadot Ecosystem\n    -   Ethereum EVM Chains\n-   💼 Unified wallet interface\n-   💰 Token management (ERC-20, native tokens)\n-   🔐 Secure account management\n-   📊 Real-time balance queries\n-   🔄 Network switching capabilities\n-   📝 Message signing\n-   🔍 Transaction history\n\n## Installation\n\n```bash\n# Using npm\nnpm install bitriel-wallet-sdk\n\n# Using yarn\nyarn add bitriel-wallet-sdk\n\n# Using pnpm\npnpm add bitriel-wallet-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { BitrielWalletSDK } from \"bitriel-wallet-sdk\";\n\n// Initialize the SDK\nconst sdk = new BitrielWalletSDK();\n\n// Get supported networks\nconst networks = sdk.getSupportedNetworks();\n\n// Connect to a network (e.g., Selendra Mainnet)\nawait sdk.connect(\"selendra\");\n\n// Get wallet state\nconst walletState = await sdk.getWalletState();\n\n// Send a transaction\nconst txHash = await sdk.sendTransaction({\n    to: \"0x...\",\n    value: \"1000000000000000000\", // 1 SEL\n});\n\n// Sign a message\nconst signature = await sdk.signMessage(\"Hello, World!\");\n\n// Disconnect\nawait sdk.disconnect();\n```\n\n## Supported Networks\n\n### Selendra Network\n\n-   Mainnet\n-   Testnet\n\n### Polkadot Ecosystem\n\n-   Polkadot Mainnet\n-   Kusama\n\n### Ethereum EVM Ecosystem\n\n-   Ethereum Mainnet\n-   Polygon Mainnet\n\n## API Reference\n\n### BitrielWalletSDK\n\n#### Constructor\n\n```typescript\nnew BitrielWalletSDK(options?: SDKOptions)\n```\n\n#### Methods\n\n##### Connection Management\n\n-   `connect(networkId: string): Promise\u003cvoid\u003e`\n\n    -   Connects to the specified network\n    -   Throws an error if the network is not supported\n    -   Returns a promise that resolves when connected\n\n-   `disconnect(): Promise\u003cvoid\u003e`\n    -   Disconnects from the current network\n    -   Cleans up resources and connections\n\n##### Wallet Operations\n\n-   `getWalletState(): Promise\u003cWalletState\u003e`\n\n    -   Returns the current wallet state including:\n        -   Address\n        -   Network\n        -   Balances (native and tokens)\n        -   Connection status\n\n-   `sendTransaction(tx: TransactionRequest): Promise\u003cstring\u003e`\n\n    -   Sends a transaction and returns the transaction hash\n    -   Supports both EVM and Polkadot transaction formats\n    -   Handles gas estimation and fee calculation\n\n-   `signMessage(message: string): Promise\u003cstring\u003e`\n    -   Signs a message using the current account\n    -   Returns the signature in the appropriate format for the network\n\n##### Network Management\n\n-   `getSupportedNetworks(): NetworkConfig[]`\n\n    -   Returns a list of all supported networks\n    -   Includes network details and configuration\n\n-   `getCurrentNetwork(): NetworkConfig | null`\n    -   Returns the currently connected network\n    -   Returns null if not connected\n\n##### Token Operations\n\n-   `getTokenBalance(tokenAddress: string): Promise\u003cstring\u003e`\n\n    -   Returns the balance of a specific token\n    -   Supports both ERC-20 and native tokens\n\n-   `getTokenInfo(tokenAddress: string): Promise\u003cTokenInfo\u003e`\n    -   Returns detailed information about a token\n    -   Includes decimals, symbol, and name\n\n## Development Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/bitriel/wallet-sdk.git\ncd wallet-sdk\n```\n\n2. Install dependencies:\n\n```bash\npnpm install\n```\n\n3. Build the project:\n\n```bash\npnpm build\n```\n\n4. Run tests:\n\n```bash\npnpm test\n```\n\n## Testing\n\nThe SDK includes comprehensive tests:\n\n-   Unit tests: `pnpm test`\n-   Watch mode: `pnpm test:watch`\n-   Coverage report: `pnpm test:coverage`\n-   Integration tests: `pnpm test:execute`\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Connection Failures**\n\n    - Ensure you have a stable internet connection\n    - Check if the network is supported\n    - Verify network configuration\n\n2. **Transaction Failures**\n\n    - Check sufficient balance\n    - Verify gas/fee settings\n    - Ensure correct network selection\n\n3. **Token Operations**\n    - Verify token contract address\n    - Check token decimals\n    - Ensure token is supported on the network\n\n## Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor support, please open an issue in the [GitHub repository](https://github.com/bitriel/wallet-sdk/issues) or contact the maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitriel%2Fwallet-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitriel%2Fwallet-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitriel%2Fwallet-sdk/lists"}