{"id":36632157,"url":"https://github.com/ava-labs/avalanche-sdk-typescript","last_synced_at":"2026-01-12T09:39:23.354Z","repository":{"id":313199322,"uuid":"946652731","full_name":"ava-labs/avalanche-sdk-typescript","owner":"ava-labs","description":"Avalanche SDK TypeScript provides a complete set of tools and libraries for developers to interact with the Avalanche blockchain ecosystem. ","archived":false,"fork":false,"pushed_at":"2026-01-04T18:46:55.000Z","size":8822,"stargazers_count":15,"open_issues_count":4,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-05T05:03:06.518Z","etag":null,"topics":["avalanche-sdk","avax","blockchain","rpc","wallet"],"latest_commit_sha":null,"homepage":"https://build.avax.network/docs/tooling/avalanche-sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ava-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-11T13:23:54.000Z","updated_at":"2025-12-15T20:28:53.000Z","dependencies_parsed_at":"2025-09-04T14:39:32.101Z","dependency_job_id":"38ad56ca-788c-48a3-8077-2099545150f4","html_url":"https://github.com/ava-labs/avalanche-sdk-typescript","commit_stats":null,"previous_names":["ava-labs/avalanche-sdk-typescript"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/ava-labs/avalanche-sdk-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-labs%2Favalanche-sdk-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-labs%2Favalanche-sdk-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-labs%2Favalanche-sdk-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-labs%2Favalanche-sdk-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ava-labs","download_url":"https://codeload.github.com/ava-labs/avalanche-sdk-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-labs%2Favalanche-sdk-typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["avalanche-sdk","avax","blockchain","rpc","wallet"],"created_at":"2026-01-12T09:39:21.854Z","updated_at":"2026-01-12T09:39:23.338Z","avatar_url":"https://github.com/ava-labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./images/avalanche-sdk.jpg\" alt=\"Avalanche SDK\" width=\"100%\" /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eAvalanche SDK Typescript\u003c/h1\u003e\n  \u003ch3\u003eThe official TypeScript SDK suite for building on Avalanche\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n      \u003ca href=\"https://opensource.org/licenses/BSD-3-Clause\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-BSD%203--Clause-blue.svg\" alt=\"License: BSD-3-Clause\" /\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://nodejs.org\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen\" alt=\"Node Version\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.typescriptlang.org/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/TypeScript-5.0%2B-blue\" alt=\"TypeScript\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Overview\nAvalanche SDK for TypeScript is a modular suite for building on the Avalanche ecosystem. It covers:\n- Direct chain access (RPC, wallets, transactions)\n- Indexed data + metrics (Glacier Data API \u0026 Metrics API)\n- Interchain messaging (ICM/Teleporter for cross–L1 apps)\n\nThis monorepo includes multiple specialized SDKs, each designed for specific use cases while maintaining consistency and interoperability.\n\n\u003e ⚠️ **Developer Preview**: This suite of SDKs is currently in beta and is subject to change. We'd love to hear about your experience! **[Please share your feedback here](https://forms.gle/kpunVSkA9nuCa1wM9).** Use in production at your own risk.\n\n### Which SDK Should I Use?\n\n| SDK | Description |\n|-----|-------------|\n| `@avalanche-sdk/client` | Direct blockchain interaction - transactions, wallets, RPC calls |\n| `@avalanche-sdk/chainkit` | Complete suite: Data, Metrics and Webhooks API |\n| `@avalanche-sdk/interchain` | Send messages between Avalanche L1s using ICM/Teleporter |\n\n\n## Available SDKs\n\n### [Client SDK](./client/)\nThe main Avalanche client SDK for interacting with Avalanche nodes and building blockchain applications.\n\n**Features:**\n- Complete API coverage for P-Chain, X-Chain, and C-Chain\n- Full \u003ca href=\"https://viem.sh\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eviem\u003c/a\u003e compatibility - anything you can do with viem works here\n- TypeScript-first design with full type safety\n- Abstractions over the JSON-RPC API to make your life easier\n- Wallet integration and transaction management\n- First-class APIs for interacting with Smart Contracts\n- Retrieve balances and UTXOs for addresses\n- Build, sign, and issue transactions to any chain\n- Perform cross-chain transfers between X, P and C chains\n- Add validators and delegators\n- Create subnets and blockchains, convert subnets to L1s\n\n### [ChainKit SDK](./chainkit/)\nCombined SDK with full typed coverage of Avalanche Data (Glacier) and Metrics APIs.\n\n**Features:**\n- Full endpoint coverage for Glacier Data API and Metrics API\n  - Glacier API: \u003ca href=\"https://glacier-api.avax.network/api\" target=\"_blank\" rel=\"noopener noreferrer\"\u003ehttps://glacier-api.avax.network/api\u003c/a\u003e\n  - Metrics API: \u003ca href=\"https://metrics.avax.network/api\" target=\"_blank\" rel=\"noopener noreferrer\"\u003ehttps://metrics.avax.network/api\u003c/a\u003e\n- Strongly-typed models, pagination helpers, and automatic retries/backoff\n- High-level helpers for transactions, blocks, addresses, tokens, NFTs, and logs\n- Metrics: network health, validator stats, throughput, latency, and block production analytics\n- Webhooks-compatible payload shapes and utilities for signature verification\n- Configurable base URL and API key authentication\n- Request logging and middleware hooks for observability\n\n### [Interchain SDK](./interchain/)\nSDK for building cross-L1 applications and bridges.\n\n**Features:**\n- Type-safe ICM client for sending cross-chain messages\n- Works seamlessly with wallet clients\n- Built-in support for Avalanche C-Chain and custom subnets\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 20+ \n- npm, yarn, or pnpm\n- TypeScript 5.0+ (recommended)\n\n### Installation\n\n#### Install SDKs\n```bash\n# Install only what you need\nnpm install @avalanche-sdk/client        # Core RPC functionality\nnpm install @avalanche-sdk/interchain    # Cross-chain messaging\nnpm install @avalanche-sdk/chainkit      # Indexed data, metrics, and webhooks\n```\n\n### Quick Examples\n\n#### Client: Get AVAX Balance\n```typescript\nimport { createAvalancheClient } from '@avalanche-sdk/client'\nimport { avalanche } from '@avalanche-sdk/client/chains'\n\nconst client = createAvalancheClient({\n  chain: avalanche,\n  transport: {\n    type: \"http\"\n  }\n})\n\n// Get account balance\nconst balance = await client.getBalance({ \n  address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n})\n```\n\n\u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/tree/main/client/examples\"\u003eView more Client SDK examples →\u003c/a\u003e\n\n#### ChainKit: Get ERC20 balances\n\n```typescript\nimport { Avalanche } from \"@avalanche-sdk/chainkit\";\n\nconst avalanche = new Avalanche({\n  chainId: \"43114\",\n});\n\nasync function run() {\n  const result = await avalanche.data.evm.address.balances.listErc20({\n    address: \"0x8ae323046633A07FB162043f28Cea39FFc23B50A\",\n  });\n  console.log(JSON.stringify(result, null, 2));\n}\n\nrun();\n```\n\n\u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/tree/main/chainkit/examples\"\u003eView more ChainKit SDK examples →\u003c/a\u003e\n\n#### Interchain: Send cross-chain message\n```typescript\nimport { createWalletClient, http } from \"viem\";\nimport { createICMClient } from \"@avalanche-sdk/interchain\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nimport * as dotenv from 'dotenv';\n\n// Load environment variables\ndotenv.config();\n\n// these will be made available in a separate SDK soon\nimport { avalancheFuji, dispatch } from \"@avalanche-sdk/interchain/chains\";\n\n// Get private key from environment\nconst privateKey = process.env.PRIVATE_KEY;\nif (!privateKey) {\n  throw new Error(\"PRIVATE_KEY not found in environment variables\");\n}\n\n// Load your signer/account\nconst account = privateKeyToAccount(privateKey as `0x${string}`);\n\n// Create a viem wallet client connected to Avalanche Fuji\nconst wallet = createWalletClient({\n  transport: http('https://api.avax-test.network/ext/bc/C/rpc'),\n  account,\n});\n\n// Initialize the ICM client\nconst icmClient = createICMClient(wallet);\n\n// Send a message across chains\nasync function main() {\n  try {\n    const hash = await icmClient.sendMsg({\n      sourceChain: avalancheFuji,\n      destinationChain: dispatch,\n      message: 'Hello from Avalanche Fuji to Dispatch Fuji!',\n    });\n    console.log('Message sent with hash:', hash);\n  } catch (error) {\n    console.error('Error sending message:', error);\n    process.exit(1);\n  }\n}\n\nmain();\n```\n\n\u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/tree/main/interchain/examples\"\u003eView more Interchain SDK examples →\u003c/a\u003e\n\n## What You Can Build\n\n### Blockchain Infrastructure\n- Custom RPC endpoints and API gateways\n- Transaction broadcasting services\n- Multi-chain wallet backends\n- Account management systems\n\n### Data Analytics \u0026 Monitoring\n- Portfolio tracking applications\n- Transaction history explorers\n- Token balance dashboards\n- Network health monitoring tools\n- Validator performance trackers\n\n### Real-Time Applications\n- Price alert systems\n- Transaction notification services\n- Smart contract event monitors\n- Blockchain activity feeds\n\n### Cross-Chain Communication\n- ICM message relayers\n- Cross-L1 notification systems\n- Interchain data synchronization\n- Multi-chain coordination tools\n\n### Developer Tools\n- Smart contract debugging interfaces\n- Transaction simulation tools\n- Network testing utilities\n- Blockchain data indexers\n\n## Documentation\n\nEach SDK includes comprehensive documentation:\n\n- **[Client SDK Documentation](./client/README.md)** - Complete API reference and usage examples\n- **[ChainKit SDK Documentation](./chainkit/README.md)** - Development utilities guide\n- **[Interchain SDK Documentation](./interchain/README.md)** - Cross-chain development guide\n\n## Examples\n\nEach SDK includes practical examples demonstrating common use cases:\n\n- **Client SDK Examples** - [View Examples](./client/examples/)\n- **ChainKit SDK Examples** - [View Examples](./chainkit/examples/)\n- **Interchain SDK Examples** - [View Examples](./interchain/examples/)\n\n## Architecture\n\nThe Avalanche SDK TypeScript suite is designed with modularity in mind:\n\n```\navalanche-sdk-typescript/\n├── client/          # Main client SDK\n├── chainkit/        # Development tools\n└── interchain/      # Cross-chain SDK\n```\n\nEach SDK is:\n- **Independent** - Can be used standalone\n- **Modular** - Import only what you need\n- **Type-safe** - Full TypeScript support\n- **Well-documented** - Comprehensive guides and examples\n\n## Performance \u0026 Best Practices\n\n### Optimization Tips\n- Use the unified SDK for better tree-shaking when using multiple features\n- Enable request batching for bulk operations\n- Implement proper error handling and retries\n- Cache frequently accessed data\n- Use WebSocket connections for real-time data\n\n### Security Considerations\n- Never expose private keys in client-side code\n- Use environment variables for sensitive data\n- Validate all inputs before blockchain interactions\n- Implement proper access controls\n- Follow \u003ca href=\"https://docs.avax.network/build/references/security\" target=\"_blank\" rel=\"noopener noreferrer\"\u003esecurity best practices\u003c/a\u003e\n\n## Troubleshooting\n\n### Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| `Module not found` errors | Ensure you're using Node.js 20+ and have installed dependencies |\n| TypeScript errors | Update to TypeScript 5.0+ and check `tsconfig.json` |\n| Connection timeouts | Check network settings and RPC endpoint availability |\n| Transaction failures | Verify gas settings and account balance |\n| Type mismatches | Ensure all SDKs are on compatible versions |\n\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Quick Start for Contributors\n```bash\n# Clone the repository\ngit clone https://github.com/ava-labs/avalanche-sdk-typescript.git\ncd avalanche-sdk-typescript\n\n# Move to the SDK directory you want to work on\ncd client\n\n# Install dependencies\nnpm install\n\n# Run tests\nnpm test\n\n# Build all packages\nnpm run build\n```\n\n### Looking for Good First Issues?\nCheck out our \u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/labels/good%20first%20issue\" target=\"_blank\" rel=\"noopener noreferrer\"\u003egood first issues\u003c/a\u003e to get started!\n\n## Support\n\n### Documentation \u0026 Resources\n- \u003ca href=\"https://build.avax.network/docs/api-reference\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eAPI Reference\u003c/a\u003e\n- \u003ca href=\"https://docs.avax.network\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eDeveloper Docs\u003c/a\u003e\n- \u003ca href=\"https://www.youtube.com/Avalancheavax\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eVideo Tutorials\u003c/a\u003e\n- \u003ca href=\"./examples\"\u003eCode Examples\u003c/a\u003e\n\n### Community \u0026 Help\n- \u003ca href=\"https://discord.gg/avax\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eDiscord\u003c/a\u003e - Get real-time help in the #avalanche-sdk channel\n- \u003ca href=\"https://t.me/+KDajA4iToKY2ZjBk\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eTelegram\u003c/a\u003e - Join discussions\n- \u003ca href=\"https://x.com/AvaxDevelopers\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eTwitter\u003c/a\u003e - Stay updated\n\n### Feedback Sessions\n- \u003ca href=\"https://calendar.google.com/calendar/appointments/schedules/AcZssZ1RkNFpny9hBimkOmBXghLkGJ8RXV0GgHZb2tfrIRoZ9Su3s1wYZOP2R_OjXpwG2aQw_zlHf2JQ?gv=true\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eBook a Google Meet Feedback Session\u003c/a\u003e - Schedule a 1-on-1 session to share your feedback and suggestions\n\n### Issue Tracking\n- \u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/issues/new?template=bug_report.md\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eReport a Bug\u003c/a\u003e\n- \u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/issues/new?template=feature_request.md\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eRequest a Feature\u003c/a\u003e\n- \u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/issues\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eView All Issues\u003c/a\u003e\n\n### Direct Support\n- Technical Issues: \u003ca href=\"https://github.com/ava-labs/avalanche-sdk-typescript/issues\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eGitHub Issues\u003c/a\u003e\n- Security Issues: security@avalabs.org\n- General Inquiries: data-platform@avalabs.org\n\n## Release Notes\n\nSee [CHANGELOG.md](CHANGELOG.md) for a detailed version history.\n\n## License\n\nThis project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e Built with ❤️ by the Avalanche Team\u003c/h3\u003e\n  \n  \u003ca href=\"https://www.avax.network/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eWebsite\u003c/a\u003e • \n  \u003ca href=\"https://docs.avax.network/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eDocumentation\u003c/a\u003e • \n  \u003ca href=\"https://medium.com/@avaxdevelopers\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eBlog\u003c/a\u003e • \n  \u003ca href=\"https://github.com/ava-labs\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eGitHub\u003c/a\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fava-labs%2Favalanche-sdk-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fava-labs%2Favalanche-sdk-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fava-labs%2Favalanche-sdk-typescript/lists"}