{"id":50547575,"url":"https://github.com/emeraldpay/emerald-api-dart","last_synced_at":"2026-06-04T00:02:54.169Z","repository":{"id":355698960,"uuid":"1223032407","full_name":"emeraldpay/emerald-api-dart","owner":"emeraldpay","description":"Dart client for Emerald API","archived":false,"fork":false,"pushed_at":"2026-05-04T20:20:30.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-04T22:23:33.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emeraldpay.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-28T00:21:21.000Z","updated_at":"2026-05-04T20:20:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/emeraldpay/emerald-api-dart","commit_stats":null,"previous_names":["emeraldpay/emerald-api-dart"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/emeraldpay/emerald-api-dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-api-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-api-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-api-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-api-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emeraldpay","download_url":"https://codeload.github.com/emeraldpay/emerald-api-dart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-api-dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33884738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-04T00:02:49.077Z","updated_at":"2026-06-04T00:02:54.164Z","avatar_url":"https://github.com/emeraldpay.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Emerald API for Dart / Flutter\n\nDart client for the Emerald gRPC API. Targets Dart 3 and Flutter on mobile (iOS / Android).\n\nNOTE: This is a preliminary version. Service and message definitions may change without backward compatibility until version 1.0.\n\n== Usage\n\nAdd the dependency:\n\n[source,yaml]\n----\ndependencies:\n  emerald_api: ^0.1.0\n----\n\nImport the main library plus the per-service barrels you need:\n\n[source,dart]\n----\nimport 'package:emerald_api/emerald_api.dart';\nimport 'package:emerald_api/blockchain.dart';\nimport 'package:emerald_api/common.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final api = EmeraldApi(token: 'emrld_...');\n  try {\n    final fee = await api.blockchain().estimateFee(\n      EstimateFeeRequest()\n        ..chain = ChainRef.CHAIN_ETHEREUM\n        ..mode = FeeEstimationMode.AVG_LAST\n        ..blocks = 10,\n    );\n    print(fee);\n  } finally {\n    await api.shutdown();\n  }\n}\n----\n\n== Authentication\n\nPass a secret API token via the `token:` parameter on any constructor. On the first call, the client exchanges it for a short-lived JWT via `Auth.Authenticate`; the JWT is then attached to subsequent calls as the `authorization: Bearer ...` header and refreshed automatically before it expires.\n\nWithout a token, only unauthenticated methods (such as `Monitoring.Ping`) succeed.\n\nTo force authentication eagerly (before the first user-facing call), call `await api.authenticate()`.\n\n== Available services\n\n`address`, `auth`, `blockchain`, `insights`, `market`, `monitoring`, `sierra` (project / org / stat), `token`, `transaction`.\n\nEach is exposed as a method on `EmeraldApi`, returning the corresponding generated gRPC client.\n\n== Development\n\n=== Layout\n\n* `api-definitions/` — protobuf definitions, included as a Git submodule.\n* `lib/src/generated/` — generated `*.pb.dart` and `*.pbgrpc.dart` files. **Committed** to the repository so consumers don't need `protoc`.\n* `lib/\u003cservice\u003e.dart` — per-service barrel libraries that re-export the generated types.\n* `lib/src/emerald_api.dart` — the `EmeraldApi` channel wrapper.\n\n=== Regenerate Dart stubs\n\nRequires `protoc` 3.x on `PATH`. The script activates the `protoc_plugin` package globally on first run.\n\n----\n./tool/generate.sh\n----\n\n=== Update protobuf definitions\n\n----\ngit submodule update --remote api-definitions\ngit commit api-definitions\n./tool/generate.sh\n----\n\n=== Run tests\n\nUnit tests (no network):\n\n----\ndart pub get\ndart test --exclude-tags=integration\n----\n\nIntegration tests:\n\n----\n# Unauthenticated endpoints (Monitoring.Ping):\ndart test --tags=integration\n\n# Authenticated endpoints (Auth.WhoAmI, ...):\nEMERALD_API_TOKEN=emrld_... dart test --tags=integration\n----\n\n== License\n\nCopyright 2026 EmeraldPay Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femeraldpay%2Femerald-api-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femeraldpay%2Femerald-api-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femeraldpay%2Femerald-api-dart/lists"}