パッケージ、リポジトリ、アプリカテゴリを検索

wallet_connect のカバー
パッケージ詳細v1.0.4

wallet_connect

Dartで愛を込めて作られたウォレットコネクトクライアント。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
116
いいね数
68
Pub ポイント
110

パッケージをインストール

flutter pub add wallet_connect

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Wallet Connectは、Flutterアプリケーションにブロックチェーンウォレットの接続機能を統合するためのDartベースのクライアントです。丁寧に設計されており、複数のプラットフォーム上でdAppsと暗号資産ウォレット間で安全なピアツーピア通信を実現します。このパッケージは、シームレスなウォレットペアリング、セッション管理、トランザクション署名をサポートしており、Web3アプリ開発に最適です。Android、iOS、macOS、Windows、Linuxでネイティブに対応しており、広範な互換性を確保しています。洗練されたAPIと活発なオープンソースコミュニティにより、デジタルアイデンティティおよび決済ワークフローの統合を簡単にします。

用途

  • ユーザーを暗号ウォレットに接続する
  • アプリでのブロックチェーン取引の有効化
  • dApp認証のサポート
  • クロスプラットフォームウォレット相互作用の促進
  • Web3対応のモバイルおよびデスクトップアプリの構築

主な機能

  • クロスプラットフォーム対応(Android、iOS、macOS、Windows、Linux)
  • セキュアなピアツーピア接続
  • セッション管理と回復
  • ウォレットによるトランザクション署名
  • オープンソースで、積極的にメンテナンスされています

適している対象

  • Flutter開発者がdAppsを構築しています
  • Web3アプリケーション作成者
  • 暗号通貨ウォレット統合業者
  • モバイルおよびデスクトップブロックチェーンアプリ
  • セキュアなウォレットペアリングを必要とするプロジェクト

注意事項

  • Web3の概念を理解している必要がある
  • 外部ウォレットプロバイダーに依存しています
  • ペアリングフロー用の追加UIが必要になる可能性があります
  • ブロックチェーン以外の用途には適していません
  • 基本的な例以外のドキュメントは限られている

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Wallet Connect Logo

Wallet Connect

Wallet Connect client in dart highly inspired from wallet-connect-kotlin by Trust Wallet.

Usage

    import 'package:wallet_connect/wallet_connect.dart';
  1. Create instance of Wallet connect client and define callbacks.
    final wcClient = WCClient(
      onConnect: () {
        // Respond to connect callback
      },
      onDisconnect: (code, reason) {
        // Respond to disconnect callback
      },
      onFailure: (error) {
        // Respond to connection failure callback
      },
      onSessionRequest: (id, peerMeta) {
        // Respond to connection request callback
      },
      onEthSign: (id, message) {
        // Respond to personal_sign or eth_sign or eth_signTypedData request callback
      },
      onEthSendTransaction: (id, tx) {
        // Respond to eth_sendTransaction request callback
      },
      onEthSignTransaction: (id, tx) {
        // Respond to eth_signTransaction request callback
      },
    );
  1. Create WCSession object from wc: uri.
    final session = WCSession.from(wcUri);
  1. Create WCPeerMeta object containing metadata for your app.
    final peerMeta = WCPeerMeta(
        name: 'Example Wallet',
        url: 'https://example.wallet',
        description: 'Example Wallet',
        icons: [],
    );
  1. Connect to a new session.
    wcClient.connectNewSession(session: session, peerMeta: peerMeta);
  1. Or connect to a saved session (from step 8).
    wcClient.connectFromSessionStore(sessionStore);
  1. Approve a session connection request.
    wcClient.approveSession(
        accounts: [], // account addresses
        chainId: 1, // chain id
    );
  1. Or reject a session connection request.
    wcClient.rejectSession();
  1. Get active session from sessionStore getter to save for later use.
    final sessionStore = wcClient.sessionStore;
  1. Approve a sign transaction request by signing the transaction and sending the signed hex data.
    wcClient.approveRequest<String>(
        id: id,
        result: signedDataAsHex,
    );
  1. Approve a send transaction request by sending the transaction hash generated from sending the transaction.
    wcClient.approveRequest<String>(
        id: id,
        result: transactionHash,
    );
  1. Approve a sign request by sending the signed data hex generated.
    wcClient.approveRequest<String>(
        id: id,
        result: signedDataAsHex,
    );
  1. Or reject any of the requests above by specifying request id.
    wcClient.rejectRequest(id: id);
  1. Disconnect from a connected session locally.
    wcClient.disconnect();
  1. Permanently close a connected session.
    wcClient.killSession();

カテゴリー

依存関係

依存関係一覧 8 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。