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

插件详情v6.1.1

ethereum

一个用于 Dart 的以太坊 JSON RPC 2.0 客户端。将以太坊 API 调用与 Dart 类型相互转换。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
535
喜欢数
45
Pub 分数
160

安装插件

flutter pub add ethereum

插件介绍

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

ethereum 包是 Ethereum 的 JSON RPC 2.0 API 的 Dart 客户端,可实现与 Ethereum 网络的无缝交互。它将 Ethereum API 调用转换为 Dart 类型,反之亦然,从而简化了查询余额、发送交易以及与智能合约交互等区块链操作。该包专为构建去中心化应用(dApps)的开发者设计,支持移动、Web 和桌面等多种平台。该包可直接集成到 Dart 生态系统中,使在 Flutter 应用中接入 Ethereum 变得简单易行。

适合场景

  • 使用以太坊集成构建去中心化应用
  • 查询区块链数据,如余额和交易历史
  • 向以太坊网络发送签名交易
  • 通过 RPC 与智能合约交互
  • 开发跨平台加密钱包

主要特点

  • Ethereum RPC 响应的原生 Dart 类型映射
  • 支持所有标准的以太坊 JSON RPC 方法
  • 跨平台兼容性,支持 Android、iOS、Web、macOS、Windows 和 Linux
  • 轻松集成到Flutter项目中
  • 强大的错误处理和响应解析

适合对象

  • Flutter 开发人员构建区块链应用
  • 加密钱包或 dApp 创建者
  • 移动和桌面应用程序中的 Web3 集成
  • Dart 开发者新手入门以太坊 RPC
  • 需要可靠以太坊网络通信的项目

使用建议

  • 需要连接以太坊节点或第三方提供商(例如 Infura)
  • 不是完整的区块链客户端——依赖外部RPC端点
  • 处理私钥时必须遵循安全最佳实践
  • 仅限RPC级别功能,不支持高级合约抽象

原始 README

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

ethereum

Build Status

An ethereum RPC 2 client for Dart.

This package provides a client to access the Ethereum JSON RPC API documented here It uses the JSON RPC2 interface and can be configured to use any of the endpoints described except ipc. The client runs on the server using HTTP, and in the browser using both HTTP and web sockets.

The package currently implements most of the eth API and some of the admin API. Work is ongoing to complete the implementation of the admin API.

The mapping of Ethereum RPC data types to Dart types is as follows :-

  • boolean - bool
  • string - String
  • quantity - int
  • data - BigInt

Examples can be found in the examples directory, also the unit test suite contains examples of calling every API interface.

The package was tested against a geth client.

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。