搜索插件、代码仓与 APP 分类

插件详情v0.1.24+1

agent_dart

一个为 Internet Computer 构建的代理库,是 Dart 和 Flutter 应用的插件包。开发者可以构建自己的库,直接与 Dfinity 的区块链进行交互。

近 30 天下载
644
喜欢数
21
Pub 分数
60

安装插件

flutter pub add agent_dart

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

agent_dart 是一个 Dart 和 Flutter 插件,可让开发者直接与 Internet Computer 区块链交互,该区块链是 Dfinity 去中心化生态系统的一部分。专为 Web3 应用设计,它提供了构建代理(软件实体)的工具,这些代理可以对区块链上的 canister 进行身份验证调用。该包简化了在 Flutter 应用中集成区块链服务的过程,支持与去中心化应用进行安全高效的通信。非常适合希望创建具有直接区块链访问能力的原生加密移动体验的开发者。

适合场景

  • 构建与互联网计算机合约交互的Flutter应用
  • 创建去中心化身份解决方案
  • 启用钱包和代币交互
  • 通过直接区块链通信开发 dApps
  • 与 Dfinity 的智能合约基础设施集成

主要特点

  • 与互联网计算机智能合约的直接交互
  • 对基于代理的身份验证的支持
  • 轻量级 Dart/Flutter 集成
  • 与区块链节点的安全通信
  • 内置对IC特定数据类型的支援

适合对象

  • Flutter 开发人员构建 Web3 应用程序
  • 面向互联网计算机的Dart开发者
  • 创建去中心化移动应用的团队
  • 使用 Dart 的区块链工程师
  • 专注于加密货币的初创公司,位于 Dfinity 生态系统中

使用建议

  • 需要熟悉互联网计算机和canister架构
  • 仅限Dfinity的区块链平台
  • 可能需要为本地开发进行额外设置
  • 依赖于与IC节点的稳定网络连接
  • 不适用于非IC区块链环境

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Agent Dart

Pub License

An agent library built for Internet Computer for Dart and Flutter apps.

Join the Discord channel: Discord


📃 Table of content


⚡️ Quick start

For Dart/Flutter app

The latest stable version is: pub

dependencies:
  agent_dart: ^latest-version
For iOS projects

When you're using the plugin in your Flutter projects that contains iOS platform, make sure you've done the following setup the build settings.

  1. Open ios/Runner.xcworkspace.
  2. Select Runner on left folder view, and Project -> Runner.
  3. Select Build Settings, All, Combined and type strip style in the filter input field.
  4. Switch Strip Style and select Non-Global Symbols.

Settings

For developing the plugin
  1. Clone and follow Prerequisites, and make sure your Flutter installed properly.

  2. MUST DO: Bootstrap your project

./scripts/bootstrap.sh

🚦 Prerequisites

🧰 Resources

📖 Documentation
🔧 Helpers/Tooling
  • candid_dart, an automated candid builder for Dart classes
  • agent_dart_auth, an extension plugin for authorization, used for Internet-Identity authorization.
💡 Examples
  • simple counter, a simple counter demonstrate how to use agent_dart, a backend canister within.
  • auth counter, a counter needs user's authorization from Internet-Identity, demonstrate how to combine with agent_dart_auth.
  • ledger_app, a ledger app demonstrate how to import seed-phrase and make transactions.

🧘‍♂️ Motivation

The Internet Computer is powered by blockchain and its major impact is to bring WebApp to be truly decentralized. However, we are in the mobile internet era, even we can use Safari or Chrome on our cell phones. But most average people, not crypto enthusiasts, are likely to use native mobile apps, major users are there.

It's important to attract these people to use DApps of Internet Computer, by providing stable, fast, and fully integrated to Dfinity's blockchain. We likely to provide further solution to balancing the "Decentralization" and "Efficiency". But first things first, we have to make mobile native apps work.

agent-rs and agent-js are the actual lower level client-SDKs, just like ether.js or web3.js of Ethereum's ecosystem. This library is aiming to port and replicate features from them. And this library is mainly for mobile apps to connect canisters, not deploying contracts (you can do that if you want, but use dart directly).

We have tried our best to migrate most interface styles just like Javascript version, but there are limitations and differences between different programming languages, we will document them as much as possible.

🏆 Milestones

  • Milestone 1: ✅ Core features/libraries implementation.
  • Milestone 2: ✅ Enhanced built tool and more example apps
  • Milestone 3: 👷 Documentation and community driven development

👨‍💻 Contributing

By contributing to agent_dart, you agree that your contributions will be licensed under its MIT License.

  1. Fork this library and add your own branch like {feat|fix|test|dep}-{detail}.
  2. Follow the Prerequisites.
  3. Build rust dependencies for all supported platforms:
sh ./scripts/bootstrap
  1. Start the example.
cd example
flutter run
  1. Tests. (Unit Test and Integration Test)
flutter test
  1. Commit and make a pull request.

🔗 Reference and related projects

Feel free to list your project here, you can submit here.

⚠️ FAQ

Build rust libraries for iOS/MacOS
  • All rust method have to be written inside SwiftAgentDartPlugin.swift to avoid tree shaking by XCode.
Network problem in macOS
  • If you run example or build a flutter app, you may come up with this:
[macOS] SocketException: Connection failed (OS Error: Operation not permitted, errno = 1)
  • Go to macos/Runner of macOS.
  • Add following in DebugProfile.entitlements and ReleaseProfile.entitlements:
<key>com.apple.security.network.client</key>
<true/>

所属分类

依赖

依赖清单 23 项

源码仓库

使用此插件的项目