stellar_flutter_sdk 3.0.4 copy "stellar_flutter_sdk: ^3.0.4" to clipboard
stellar_flutter_sdk: ^3.0.4 copied to clipboard

A Stellar SDK for Flutter, that can query Horizon and Soroban RPC, build, signs and submit transactions to Stellar. Supports many SEPs and can deploy and invoke Soroban Contracts.

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 17 SEPs.

Installation #

dependencies:
  stellar_flutter_sdk: ^3.0.4
flutter pub get

Requires Dart SDK >=3.8.0 <4.0.0.

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
SEPs Anchor integration, authentication, KYC, etc.

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.

17
likes
140
points
1.44k
downloads

Publisher

unverified uploader

Weekly Downloads

A Stellar SDK for Flutter, that can query Horizon and Soroban RPC, build, signs and submit transactions to Stellar. Supports many SEPs and can deploy and invoke Soroban Contracts.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

archive, collection, convert, crypto, decimal, dio, flutter, http, http_parser, meta, pinenacl, pointycastle, toml, unorm_dart

More

Packages that depend on stellar_flutter_sdk