agent_dart 0.0.2 copy "agent_dart: ^0.0.2" to clipboard
agent_dart: ^0.0.2 copied to clipboard

outdated

An agent library built for Internet Computer, a plugin package for dart and flutter apps. Developers can build ones to interact with Dfinity's blockchain directly.

agent_dart #

An agent library built for Internet Computer, a plugin package for dart and flutter apps. Developers can build ones to interact with Dfinity's blockchain directly.


📃 Table of content #

  1. Table of content
  2. Prerequisites
  3. Quick start
  4. Motivation
  5. Milestones
  6. Documentation
  7. Contributing
  8. Reference and related projects
  9. FAQ

🚦 Prerequisites #

  • Flutter version in the agent_dart/pubspec.yaml
  • CMake v3.2.0 or later
  • Xcode (10.12) or later (Running on macOS or iOS)
  • Android NDK version 21.4.7075529 (Running on Android)
  • Rust version 1.51
  • Node.js v15.0 or later, TBD

⚡️ Quick start #

  1. git clone

  2. install Prerequisites, make sure you run

    flutter doctor -v
    

    Without errors

  3. To run example, follow instructions under example folder

  4. To run tests:

    flutter test
    

🧘‍♂️ 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 #

Milestones Tracker


📘 Documentation #

(TBD) Reference on pub.dev

Plan for docs site


👨‍💻 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 this:

    {github_id}/{feat|fix|test|dep}-{detail}
    
  2. Install Prerequisites

  3. Build rust dependencies for all supported platform (macOS, iOS, Android, windows, linux)

    $ sh ./scripts/clean && ./scripts/init.sh && ./scripts/build.sh
    
  4. Start example

    Read instruction first, then run

    $ cd example
    $ flutter run
    
  5. Test (Unit Test and Integration Test)

    $ flutter test
    
  6. Commit and make a pull request, process is TBD for now. We will use CI to automate



⚠️ FAQ #

Build rust libraries for iOS/macOS #

  • All rust method have to be written inside SwiftAgentDartPlugin.swift, to avoid tree shaking of latest release build by XCode.
  • The agent_dart_podspec should change accordingly when this repo goes 1.0.0

Network problem in iOS and 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 and ios/Runner
  • Edit DebugProfile.entitlements and ReleaseProfile.entitlements, Add following:
<key>com.apple.security.network.client</key>
<true/>
21
likes
0
pub points
67%
popularity

Publisher

verified publisherastrox.io

An agent library built for Internet Computer, a plugin package for dart and flutter apps. Developers can build ones to interact with Dfinity's blockchain directly.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

args, cbor, collection, convert, crypto, ffi, flutter, flutter_web_auth, http, pinenacl, recase, tuple, typed_data, validators

More

Packages that depend on agent_dart