{"id":13820331,"url":"https://github.com/reaster/cardano_wallet_sdk","last_synced_at":"2025-04-13T14:54:21.044Z","repository":{"id":48431842,"uuid":"362238124","full_name":"reaster/cardano_wallet_sdk","owner":"reaster","description":"Targeting Flutter apps, the Cardano Wallet SDK is a high-level Dart library for managing cryptocurrency accounts \u0026 executing transactions on the blockchain.","archived":false,"fork":false,"pushed_at":"2023-01-20T01:22:40.000Z","size":3374,"stargazers_count":39,"open_issues_count":10,"forks_count":18,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-13T14:54:10.354Z","etag":null,"topics":["ada","blockchain","cardano","cryptocurrency","dart","finance","flutter","wallet"],"latest_commit_sha":null,"homepage":"","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/reaster.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-27T20:10:27.000Z","updated_at":"2024-10-06T21:15:51.000Z","dependencies_parsed_at":"2023-02-11T23:01:05.958Z","dependency_job_id":null,"html_url":"https://github.com/reaster/cardano_wallet_sdk","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/reaster%2Fcardano_wallet_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaster%2Fcardano_wallet_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaster%2Fcardano_wallet_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reaster%2Fcardano_wallet_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reaster","download_url":"https://codeload.github.com/reaster/cardano_wallet_sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732512,"owners_count":21152851,"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":["ada","blockchain","cardano","cryptocurrency","dart","finance","flutter","wallet"],"created_at":"2024-08-04T08:01:01.518Z","updated_at":"2025-04-13T14:54:21.026Z","avatar_url":"https://github.com/reaster.png","language":"Dart","funding_links":[],"categories":["Flutter"],"sub_categories":["Flutter SDK / Libraries"],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/reaster/cardano_wallet_sdk/actions/workflows/test-package.yml\"\u003e\n    \u003cimg src=\"https://github.com/reaster/cardano_wallet_sdk/workflows/Dart%20CI/badge.svg\" alt=\"CI status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/reaster/cardano_wallet_sdk/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/reaster/cardano_wallet_sdk.svg?style=flat\u0026logo=github\u0026colorB=blue\u0026label=stars\" alt=\"Stars count on GitHub\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://pub.dev/packages/cardano_wallet_sdk\"\u003e\n\t\u003cimg src=\"https://img.shields.io/pub/v/cardano_wallet_sdk.svg?style=flat\u0026logo=github\u0026colorB=blue\" alt=\"Latest Release on pub.dev\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/reaster/cardano_wallet_sdk\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/reaster/cardano_wallet_sdk/branch/main/graph/badge.svg?token=ZR5AO2WML0\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n# cardano_wallet_sdk\n\nFlutter SDK for building [Cardano](https://cardano.org) blockchain mobile apps in [Flutter](https://flutter.dev) using the [Dart](https://dart.dev) programming language.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg style=\"margin:5px;\" src=\"https://github.com/reaster/cardano_wallet_sdk/raw/main/example/flutter_example/screenshots/FlutterSDK_Drawer_iPadPro9_7-inch.png\" width=\"200px\"\u003c/img\u003e \n    \u003cimg style=\"margin:5px;\" src=\"https://github.com/reaster/cardano_wallet_sdk/raw/main/example/flutter_example/screenshots/FlutterSDK_ListWallets_iPodTouch7thGen.png\" width=\"100px\"\u003c/img\u003e \n    \u003cimg style=\"margin:5px;\" src=\"https://github.com/reaster/cardano_wallet_sdk/raw/main/example/flutter_example/screenshots/FlutterSDK_Sliders_MacOS.png\" width=\"200px\"\u003c/img\u003e \n    \u003cimg style=\"margin:5px;\" src=\"https://github.com/reaster/cardano_wallet_sdk/raw/main/example/flutter_example/screenshots/FlutterSDK_DarkMode_MacOS.png\" width=\"200px\"\u003c/img\u003e \n\u003c/div\u003e\n\n## Current Features\n* Create Wallets - Create and restore, both read-only and transactional wallets using staking addresses, mnemonics or private keys.\n* Transaction History - List transactions, rewards and fees for both ADA and Native Tokens.\n* Addresses - Generate and manage Shelley key pairs and addresses.\n* Transactions - Build, sign and submit simple ADA payment transactions.\n* Blockchain API - Cardano blockchain access via the [BlockFrost API package](https://github.com/reaster/blockfrost_api)\n* Binary Encoding - Enough [CBOR](https://cbor.io) support is provided to submit simple payment transactions.\n\n\n## Kick the Tires\nTo see the SDK in action, both a pure [Dart example](https://github.com/reaster/cardano_wallet_sdk/blob/main/example/dart_example.dart) and multi-platform [Flutter example](https://github.com/reaster/cardano_wallet_sdk/tree/main/example/flutter_example) are incuded in this distribution. You can also visit the live [Flutter Demonstration Wallet](https://flutter-cardano-wallet.web.app/) hosted on google cloud.\n\n## Project Status\n\nThis library is currently under development and is not yet production quality. It is being developed on a part-time basis with an evolving schedule based on funding and developer resources. To date it has been funded by a series of modest [Project Catalyst](https://cardano.ideascale.com) grants. The current schedule is:\n* 2022-04-07 [0.1.0-alpha.12](https://pub.dev/packages/cardano_wallet_sdk/versions/0.1.0-alpha.12) **completed** [Fund 5](https://cardano.ideascale.com/a/dtd/Cardano-Wallet-Flutter-SDK/352623-48088) SDK prototype and demo Flutter wallet supporting blockchain access, loading wallet balances and submitting simple transactions.\n* 2022-12-31 **active** [Fund 7](https://cardano.ideascale.com/a/dtd/Flutter-SDK/381288-48088) phase to build a solid foundation for production SDK. Features include improved API, third-party dependency reduction, mnemonics, all Cardano address types, full CBOR support, native token/NFT minting/burning, basic staking and basic smart contract support.\n* 2023-03-31 **planned** [Fund 8](https://cardano.ideascale.com/c/idea/400720) work will mostly focus on higher-level smart contract support, and as time allows, may include tutorials, DApp linking and community driven features.\n* 2023-06-31 **planned** Fund 9 will be for ongoing maintenance and community-driven development requests.\n\nThis is an ambitious project, requiring much ongoing maintenance, development and community support. If you'd like to see this project succeed, please support us by voting for the Flutter SDK in Fund 9. Proposals will be published in June 2022 and voting will be in August 2022.\n\nIf you'd like to can contribute directly, the Flutter SDK has a dedicated wallet:\n```\n  addr1qx90lkpwhpwu42jnw00w483krjyfvhhpgk97hdfw9nz3xqaqg6dycrrc4qw0l5fsvfgx95gnqmrfxhgrfy8afsxxje5qgplx9r\n```\n\n## Usage\n\nReleased versions and installation details can be found on [pub.dev](https://pub.dev/packages/cardano_wallet_sdk/install).\n\n### Coding Style\n\nAlthough Dart is an imperative language, the framework uses functional idioms whenever possible. In particular, \nthe majority of the classes are immutible and rather than creating side effects by throwing \nexceptions, the Result class is used. The WalletBuilder's build method\nprovides a concrete example, returning either a wallet instance or error message if issues arise:\n```dart\nResult\u003cWallet, String\u003e result = walletBuilder.build();\nresult.when(\n    ok: (wallet) =\u003e print(\"Success: ${wallet.walletName}\"),\n    err: (message) =\u003e print(\"Error: $message\"),\n);\n```\n\n### Wallet Management\n\nCreate a wallet builder for the testnet using a [BlockFrost](https://github.com/reaster/blockfrost_api) key.\n```dart\nfinal walletBuilder = WalletBuilder()\n    ..network = Networks.testnet\n    ..testnetAdapterKey = blockfrostKey;\n```\n\nCreate a read-only wallet using a staking address.\n```dart\nvar address = ShelleyAddress.fromBech32('stake_test1uqvwl7a...');\nfinal walletBuilder = WalletBuilder()\n    ..network = Networks.testnet\n    ..testnetAdapterKey = blockfrostKey\n    ..stakeAddress = address;\nResult\u003cReadOnlyWallet, String\u003e result = await walletBuilder.readOnlyBuildAndSync();\nresult.when(\n    ok: (wallet) =\u003e print(\"${wallet.walletName}: ${wallet.balance}\"),\n    err: (message) =\u003e print(\"Error: $message\"),\n);\n```\n\nRestore existing wallet using 24 word mnemonic.\n```dart\nList\u003cString\u003e mnemonic = 'rude stadium move gallery receive just...'.split(' ');\nfinal walletBuilder = WalletBuilder()\n    ..network = Networks.testnet\n    ..testnetAdapterKey = blockfrostKey\n    ..mnemonic = mnemonic;\nResult\u003cWallet, String\u003e result = await walletBuilder.buildAndSync();\nif (result.isOk()) {\n    var wallet = result.unwrap();\n    print(\"${wallet.walletName}: ${wallet.balance}\");\n}\n```\n\nUpdate existing wallet.\n```dart\nfinal walletBuilder = WalletBuilder()\n    ..network = Networks.testnet\n    ..testnetAdapterKey = blockfrostKey\n    ..mnemonic = mnemonic;\nResult\u003cWallet, String\u003e result = walletBuilder.build();\nWallet wallet = result.unwrap();\nCoin oldBalance = wallet.balance;\nvar result2 = await wallet.update();\nresult2.when(\n    ok: (_) =\u003e print(\"old:$oldBalance lovelace, new: ${wallet.balance} lovelace\"),\n    err: (message) =\u003e print(\"Error: $message\"),\n);\n```\n\nCreate a new 24 word mnemonic.\n```dart\nList\u003cString\u003e mnemonic = WalletBuilder.generateNewMnemonic();\nprint(\"mnemonic: ${mnemonic.join(' ')}\");\n```\n\n### Wallet Details\n\nList transaction history.\n```dart\nwallet.transactions.forEach((tx) =\u003e print(tx));\n```\n\nList addresses.\n```dart\nwallet.addresses.forEach((addr) =\u003e print(addr.toBech32()));\n```\n\nList currency balances.\n```dart\nfinal formatter = AdaFormattter.compactCurrency();\nwallet.currencies.forEach((assetId, balance) {\n    final isAda = assetId == lovelaceHex;\n    print(\"$assetId: ${isAda ? formatter.format(balance) : balance}\");\n});\n```\n\nList staking rewards.\n```dart\nwallet.stakeAccounts.forEach((acct) {\n    acct.rewards.forEach((reward) {\n        print(\"epoch: ${reward.epoch}, ${reward.amount} ADA\");\n    });\n});\n```\n\n### Wallet Keys and Addresses \n\n\nAccess root private and public key pair.\n```dart\nBip32KeyPair pair = wallet.rootKeyPair;\nprint(\"${pair.signingKey}, ${pair.verifyKey}\");\n```\n\nAccess staking address.\n```dart\nprint(wallet.account.stakeAddress));\n```\n\nFirst unused change address.\n```dart\nprint(wallet.firstUnusedChangeAddress));\n```\n\nFirst unused spend address.\n```dart\nprint(wallet.firstUnusedSpendAddress));\n```\n\n### Submit Transactions\n\nSend 3 ADA to Bob.\n```dart\nvar bobsAddress = parseAddress('addr1qyy6...');\nfinal Result\u003cShelleyTransaction, String\u003e result = await wallet.sendAda(\n    toAddress: bobsAddress,\n    lovelace: 3 * 1000000,\n);\nif (result.isOk()) {\n    final tx = result.unwrap();\n    print(\"ADA sent. Fee: ${tx.body.fee} lovelace\");\n}\n```\n\n### Running Integration Tests\nSeveral of the integration tests (suffixed with '_itest.dart') require a BlockFrost key to run. Installation steps are as follows:\n* git clone git@github.com:reaster/cardano_wallet_sdk.git\n* register for a free [BlockFrost](https://blockfrost.io/) testnet policy-id key.\n* paste the policy-id key into a text file named: blockfrost_project_id.txt in the parent directory of this project.\n\n```\necho \"your-project-id\" \u003e ../blockfrost_project_id.txt\n```\nNow you can include the integration tests:\n```\ndart test -P itest\n```\n\n***\nCopyright 2021 Richard Easterling\\\nSPDX-License-Identifier: Apache-2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freaster%2Fcardano_wallet_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freaster%2Fcardano_wallet_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freaster%2Fcardano_wallet_sdk/lists"}