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

套件詳情v3.10.0

stellar_flutter_sdk

適用於 Flutter 的 Stellar SDK,可查詢 Horizon 和 Soroban RPC,建構、簽署並提交交易至 Stellar。支援多種 SEPs,可部署及呼叫 Soroban 合約。

AndroidiOSWeb
近 30 天下載
3180
喜歡數
18
Pub 分數
150

安裝套件

flutter pub add stellar_flutter_sdk

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Stellar Flutter SDK 讓 Flutter 應用程式能夠與 Stellar 區塊鏈互動。它支援查詢 Horizon 和 Soroban RPC 端點,建立、簽署和提交交易。該套件促進了與多個 SEPs 的整合,並提供部署和呼叫 Soroban 智能合約的工具。設計為跨平台使用,可在 Android、iOS 和 Web 上順暢運作。非常適合於在 Stellar 上建構去中心化金融(DeFi)應用、代幣發行者或基於合約的服務的開發人員。

適用情境

  • 在Stellar上建構DeFi應用
  • 發行和管理數位資產
  • 與 Soroban 智能合約互動
  • 啟用符合 SEP 的支付整合
  • 為Stellar網絡創建錢包介面

主要特色

  • 支援 Horizon 和 Soroban RPC
  • 交易簽署與提交
  • Soroban 合約部署與呼叫
  • 多 SEP 集成
  • 跨平台相容性(Android、iOS、Web)

適合對象

  • Web3中的Flutter開發者
  • 面向Stellar的區塊鏈應用開發者
  • 使用智能合約的DApp建構者
  • 加密錢包開發者
  • SEPs實施團隊

使用建議

  • 需要了解恆星網路基礎
  • 需要安全的密鑰管理實踐
  • 依賴外部RPC端點
  • 可能需要額外的錯誤處理來應對網路延遲
  • 最佳搭配Flutter應用中的正確狀態管理使用

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Stellar SDK for Flutter

Dart Flutter codecov Ask DeepWiki

Build and sign Stellar transactions, query Horizon, and interact with Soroban smart contracts via RPC. Communicate with anchors and external services using built-in support for 18 SEPs.

Installation

dependencies:
  stellar_flutter_sdk: ^3.7.0
flutter pub get

Requires Dart SDK >=3.8.0 <4.0.0 and Flutter >=3.32.0.

iOS

Set your app's iOS deployment target to 15.0 or higher (platform :ios, '15.0' in ios/Podfile, and the Xcode project's iOS Deployment Target). Smart account passkey features additionally require iOS 16 at runtime; on iOS 15 those calls return a not-supported result while the rest of the SDK works normally.

Quick examples

Send a payment

Transfer XLM between accounts:

import 'package:stellar_flutter_sdk/stellar_flutter_sdk.dart';

Transaction transaction = TransactionBuilder(senderAccount)
    .addOperation(PaymentOperationBuilder(receiverId, Asset.NATIVE, '100').build())
    .build();
transaction.sign(senderKeyPair, Network.TESTNET);
await sdk.submitTransaction(transaction);
Trust an asset

Enable your account to receive a token (like USDC):

Asset usdc = Asset.createNonNativeAsset('USDC', issuerAccountId);
Transaction transaction = TransactionBuilder(account)
    .addOperation(ChangeTrustOperationBuilder(usdc, ChangeTrustOperationBuilder.MAX_LIMIT).build())
    .build();
transaction.sign(accountKeyPair, Network.TESTNET);
await sdk.submitTransaction(transaction);
Call a smart contract

Invoke a Soroban contract method:

SorobanClient client = await SorobanClient.forClientOptions(
    options: ClientOptions(
        sourceAccountKeyPair: keyPair,
        contractId: 'CABC...',
        network: Network.TESTNET,
        rpcUrl: 'https://soroban-testnet.stellar.org',
    ),
);
XdrSCVal result = await client.invokeMethod(name: 'hello', args: [XdrSCVal.forSymbol('World')]);

For complete walkthroughs, see the documentation.

Agent Skill

This repository includes an Agent Skill that teaches AI coding agents how to use this SDK. See skills/ for installation instructions.

Documentation

Guide Description
Quick start Your first transaction in 15 minutes
Getting started Keys, accounts, and fundamentals
SDK usage Transactions, operations, Horizon queries, streaming
Soroban Smart contract deployment and interaction
Smart Accounts OpenZeppelin smart account support: passkeys, multi-signer authorization, context rules, policies
SEPs Anchor integration, authentication, KYC, etc.

Smart Accounts (Passkey) support

This SDK ships first-class support for OpenZeppelin smart accounts on Stellar: WebAuthn passkey authentication on iOS, Android, and Web; multi-signer authorization; on-chain context rules; and policy contracts (threshold, weighted threshold, spending limit). An optional fee-bump relayer and credential indexer integrate transparently.

See the Smart Accounts documentation for an overview, the developer onboarding guide for conceptual material, the API reference for every public symbol, and the per-platform WebAuthn setup guides: iOS, Android, Web. For a runnable reference implementation, see the demo app.

Web Support

Starting with version 3.0.0, this SDK fully supports Flutter web. All 64-bit integer types have been migrated to BigInt to address JavaScript's 53-bit number precision limitation.

If you are upgrading from version 2.x, please refer to the Migration Guide for details on breaking changes and how to update your code.

Compatibility

Feedback

If you're using this SDK, feedback helps improve it:

Contributing

See CONTRIBUTING.md for guidelines.

所屬分類

依賴

依賴清單 13 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。