搜尋套件、儲存庫與 APP 分類

套件詳情v0.1.24+1

agent_dart

一個為 Internet Computer 建構的代理程式庫,是 Dart 與 Flutter 應用的外掛套件。開發者可建立自己的套件,直接與 Dfinity 區塊鏈互動。

近 30 天下載
834
喜歡數
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 項

原始碼儲存庫

使用此套件的專案