搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。