{"id":13410162,"url":"https://github.com/novusnota/tonutils-dart","last_synced_at":"2025-07-15T17:32:11.619Z","repository":{"id":178717800,"uuid":"639972368","full_name":"novusnota/tonutils-dart","owner":"novusnota","description":"Comprehensive Dart SDK for interacting with TON Blockchain. When combined with Flutter can be used for any popular platform out there!","archived":false,"fork":false,"pushed_at":"2024-09-12T13:41:06.000Z","size":281,"stargazers_count":18,"open_issues_count":10,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-13T01:45:01.908Z","etag":null,"topics":["crypto","cryptocurrency","dart","flutter","hack-ton-berfest","hacktoberfest","library","sdk","the-open-network","ton","ton-blockchain"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/tonutils","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/novusnota.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://github.com/novusnota/novusnota/blob/main/DONATE.md"]}},"created_at":"2023-05-12T16:52:38.000Z","updated_at":"2024-09-12T13:41:10.000Z","dependencies_parsed_at":"2024-10-26T05:50:32.042Z","dependency_job_id":"43b73e6a-22ae-4036-9dd9-55c428ea4149","html_url":"https://github.com/novusnota/tonutils-dart","commit_stats":null,"previous_names":["novusnota/tonutils-dart"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/novusnota/tonutils-dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ftonutils-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ftonutils-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ftonutils-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ftonutils-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novusnota","download_url":"https://codeload.github.com/novusnota/tonutils-dart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novusnota%2Ftonutils-dart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265450210,"owners_count":23767569,"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":["crypto","cryptocurrency","dart","flutter","hack-ton-berfest","hacktoberfest","library","sdk","the-open-network","ton","ton-blockchain"],"created_at":"2024-07-30T20:01:05.286Z","updated_at":"2025-07-15T17:32:11.288Z","avatar_url":"https://github.com/novusnota.png","language":"Dart","funding_links":["https://github.com/novusnota/novusnota/blob/main/DONATE.md"],"categories":["🧑‍💻 Development"],"sub_categories":["Libraries \u0026 SDKs"],"readme":"# 💎 Dart/Flutter library for TON blockchain\n\nA composable and versatile library for all things TON!\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Pub](https://img.shields.io/pub/v/tonutils.svg)](https://pub.dartlang.org/packages/tonutils)\n\nWARNING: Some underlying APIs of this library are subject to change in near future, so it's advised to pin down specific minor version rather than specifying ranges in your pubspec.yaml. At least until we hit stable 1.0.0 release.\n\n---\n\nIf you love this library and want to support its development you can donate any amount of coins to this TON address ☺️`EQDew1rvHuMmMkmxG_fQahGymzIOF2_9TpgLftMUuxpKLE_u`\\\nTo donate in other cryptocurrencies, use: \u003ca href=\"https://github.com/novusnota/novusnota/blob/main/DONATE.md\" alt=\"Donate button\"\u003e\u003cimg src=\"https://img.shields.io/badge/-Donate-red?logo=undertale\" /\u003e\u003c/a\u003e\n\n## 🍰 Features\n\n- jsonRPC client to work with TON network: [lib/client](https://github.com/novusnota/tonutils-dart/blob/main/lib/client.dart)\n- Cell, Slice, Builder, and BOC (de)serialization: [lib/dataformat](https://github.com/novusnota/tonutils-dart/blob/main/lib/dataformat.dart)\n- Support for popular structures from block.tlb: [lib/dataformat](https://github.com/novusnota/tonutils-dart/blob/main/lib/dataformat.dart)\n- Support of TON base64 addresses: [lib/dataformat](https://github.com/novusnota/tonutils-dart/blob/main/lib/dataformat.dart)\n- Support of HashmapE: [lib/dataformat](https://github.com/novusnota/tonutils-dart/blob/main/lib/dataformat.dart)\n- Support of TON \u0026 BIP39 Mnemonics: [lib/mnemonic](https://github.com/novusnota/tonutils-dart/blob/main/lib/mnemonic.dart)\n- Support of wallets (v3, v3r2, v4r2): [lib/wallet](https://github.com/novusnota/tonutils-dart/blob/main/lib/wallet.dart)\n- Ed25519 signing of transactions and crypto primitives: [lib/crypto](https://github.com/novusnota/tonutils-dart/blob/main/lib/crypto.dart)\n- Workings with Jettons: [lib/jetton](https://github.com/novusnota/tonutils-dart/blob/main/lib/jetton.dart)\n- Workings with NFTs: [lib/nft](https://github.com/novusnota/tonutils-dart/blob/main/lib/nft.dart)\n- ...and much more!\n\n## 🚀 Usage\n\n### Install via `dart pub`:\n\n```bash\ndart pub add tonutils\n```\n\n### Get it all or use a few\n\nMost common way is to import the whole library and cherry-pick the needed elements:\n\n```dart\nimport 'package:tonutils/tonutils.dart' show Mnemonic;\n```\n\nAlternatively, consider using only the sub-libraries if you know precisely what you need:\n\n```dart\nimport 'package:tonutils/mnemonic.dart'; // provides Mnemonic and WordList classes \n```\n\n**All the individual things you can import and use are listed in the [root of lib/ folder](https://github.com/novusnota/tonutils-dart/tree/main/lib).**\n\n### RPC Client (Toncenter API)\n\nYou can use one of the public endpoints:\n\n- Mainnet: https://toncenter.com/api/v2/jsonRPC\n- Testnet: https://testnet.toncenter.com/api/v2/jsonRPC\n\nOr host [your own instance of TON HTTP API](https://github.com/toncenter/ton-http-api).\n\n```dart\n// Client uses testnet by default:\nfinal testnetClient = TonJsonRpc();\n\n// But you can specify an alternative endpoint, say, for mainnet:\nfinal client = TonJsonRpc('https://toncenter.com/api/v2/jsonRPC');\n\n// You can also specify an API key obtained from https://t.me/tonapibot!\n\n// Generate a new key pair\nvar mnemonics = Mnemonic.generate();\nvar keyPair = Mnemonic.toKeyPair(mnemonics);\n\n// Wallet contracts use workchain = 0, but this can be overriden\nvar wallet = WalletContractV4R2.create(publicKey: keyPair.publicKey);\n\n// Opening a wallet contract (this specifies the TonJsonRpc as a ContractProvider)\nvar openedContract = client.open(wallet);\n\n// Get the balance of the contract\nvar balance = await openedContract.getBalance();\nprint(balance);\n\n// Create a transfer\nvar seqno = await openedContract.getSeqno();\nvar transfer = openedContract.createTransfer(\n  seqno: seqno,\n  privateKey: keyPair.privateKey,\n  messages: [\n    internal(\n      to: SiaString('EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N'),\n      value: SbiString('1.5'),\n      body: ScString('Hello, world!'),\n    )\n  ],\n);\nprint(transfer.toString());\n```\n\nAs you can see from this example, this library is 90% compatible with the API of the ton-core and ton-community TypeScript libraries. The main sources of divergence are types: this library uses sealed classes and extends from them to provide union-like types, while maintaining compile-time checked type safety and soundness.\n\nBut worry not — editor hints in VS Code, Emacs, Vim, NeoVim, Helix and other editors with Language Server Provider (LSP) support won't leave you astray and provide all the answers if you ever find yourself stuck.\n\n### 📺 Videos\n\nPlaylist with examples on YouTube: [link](https://www.youtube.com/playlist?list=PLd8io4_DrUzlbG3SB89J1Eeq0VVdJh62R)\n\n## 🔧 Tests\n\nTests are positioned to mirror the structure inside `lib/src/`, and grouped by the relative path from test folder to the test file (excluding the `_test.dart` suffix).\n\nExamples:\n- Tests for mnemonics are located in the file `test/mnemonic/mnemonic_test.dart`, and the test group name is `mnemonic/mnemonic`\n- Tests for addresses are located in the file `test/dataformat/address/address_test.dart`, and the test group name is `dataformat/address/address`\n\nTo invoke a group of tests by their name, run:\n\n```bash\ndart test -N 'group name'\n```\n\nFor example, to test mnemonics:\n\n```bash\ndart test -N 'mnemonic/mnemonic'\n```\n\n## 📄 License\n\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovusnota%2Ftonutils-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovusnota%2Ftonutils-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovusnota%2Ftonutils-dart/lists"}