{"id":13794186,"url":"https://github.com/CDDelta/arweave-dart","last_synced_at":"2025-05-12T20:31:41.170Z","repository":{"id":43370733,"uuid":"278365185","full_name":"CDDelta/arweave-dart","owner":"CDDelta","description":"Dart package for interfacing with the Arweave network.","archived":false,"fork":false,"pushed_at":"2023-03-06T19:34:37.000Z","size":101708,"stargazers_count":17,"open_issues_count":11,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-18T08:56:14.360Z","etag":null,"topics":["arweave","dart","flutter"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CDDelta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-07-09T12:57:52.000Z","updated_at":"2023-02-13T09:22:20.000Z","dependencies_parsed_at":"2024-01-21T02:45:22.266Z","dependency_job_id":"933178a8-0db3-46d2-ae82-e853ee08be15","html_url":"https://github.com/CDDelta/arweave-dart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDDelta%2Farweave-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDDelta%2Farweave-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDDelta%2Farweave-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDDelta%2Farweave-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CDDelta","download_url":"https://codeload.github.com/CDDelta/arweave-dart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253816771,"owners_count":21968879,"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":["arweave","dart","flutter"],"created_at":"2024-08-03T23:00:36.940Z","updated_at":"2025-05-12T20:31:36.131Z","avatar_url":"https://github.com/CDDelta.png","language":"Dart","funding_links":[],"categories":["Tools ⚙️"],"sub_categories":[],"readme":"# Arweave Dart SDK\n\n![tests](https://github.com/CDDelta/arweave-dart/workflows/tests/badge.svg)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/CDDelta/arweave-dart/issues)\n\nDart package for interfacing with the Arweave network, modelled after [arweave-js](https://github.com/ArweaveTeam/arweave-js).\n\n## Installation\n\n`arweave-dart` is currently not available on [pub.dev](https://pub.dev) but you can use it by referencing this repository in your `pubspec.yaml` as shown below:\n\n```yaml\ndependencies:\n  arweave:\n    git: https://github.com/CDDelta/arweave-dart.git\n```\n\nYou can optionally pin your dependency to a specific commit, branch, or tag to avoid possible breaking changes:\n\n```yaml\ndependencies:\n  arweave:\n    git:\n      url: https://github.com/CDDelta/arweave-dart.git\n      ref: some-branch\n```\n\n## Initialisation\n\nOnce you have the package, you can create an instance of the client with its default configuration:\n\n```dart\nimport 'package:arweave/arweave.dart';\n\nvoid main() {\n  var client = Arweave();\n}\n```\n\nThis will create an instance of the client that connects to the `arweave.net` gateway or if you're running on the web, this will detect the origin you're hosting on and use that as the gateway to connect to.\n\nYou can optionally choose to provide your own gateway url:\n\n```dart\nArweave(gatewayUrl: Uri.parse('https://arweave.dev'));\n```\n\n## Usage\n\n### Working with Wallets\n\nLoading an Arweave wallet can be done as shown below:\n\n```dart\nWallet.fromJwk(json.decode('\u003cwallet data\u003e'));\n```\n\n### Creating Transactions\n\nCreating transactions with `arweave-dart` is easy. First prepare a transaction like below, optionally adding some tags:\n\n```dart\nfinal transaction = await client.transactions.prepare(\n  Transaction.withBlobData(data: utf8.encode('Hello world!')),\n  wallet,\n);\n\ntransaction.addTag('App-Name', 'Hello World App');\ntransaction.addTag('App-Version', '1.0.0');\n```\n\nSecondly, sign the transaction:\n\n```dart\nawait transaction.sign(wallet);\n```\n\nFinally upload the transaction.\n\nThis can be done in a single call, useful for small transactions.\n\n```dart\nawait client.transactions.post(transaction);\n```\n\nOr progressively for more granularity.\n\n```dart\nawait for (final upload in client.transactions.upload(transaction)) {\n  print('${upload.progress * 100}%');\n}\n```\n\n### Using Data Bundles\n\nUse ANS-102 data bundles by first preparing some data items as so:\n\n```dart\nfinal dataItem = DataItem.withBlobData(\n  owner: wallet.owner,\n  data: utf8.encode('hello world'),\n)\n  ..addTag('MyTag', '0')\n  ..addTag('OtherTag', 'Foo');\n\nawait dataItem.sign(wallet);\n```\n\nand then creating the data bundle transaction:\n\n```dart\nfinal transaction = await client.transactions.prepare(\n  Transaction.withDataBundle(bundle: DataBundle(items: [dataItem])),\n  wallet,\n);\n```\n\n### Utilities\n\nDart's Base64 encoder/decoder is incompatible with Arweave's returned Base64 content, so `arweave-dart` exposes utilities for working with Base64 from Arweave. It also includes other utilities for AR/Winston conversions etc.\n\nTo use these utilities, import them like so:\n\n```dart\nimport 'package:arweave/utils.dart' as utils;\n```\n\n## Development\n\nTo rebuild the generated code (eg. for JSON serialisation) run:\n\n```shell\ndart pub run build_runner build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCDDelta%2Farweave-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCDDelta%2Farweave-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCDDelta%2Farweave-dart/lists"}