defindex_sdk 1.0.1 copy "defindex_sdk: ^1.0.1" to clipboard
defindex_sdk: ^1.0.1 copied to clipboard

This package provides a Dart interface to interact with the Defindex Smart Contract on Soroban in the Stellar network. It simplifies the process of sending transactions and querying contract state, ma [...]

Defindex Smart Contract Interaction Package #

This package provides a Dart interface to interact with the Defindex Smart Contract on the Soroban network. It simplifies the process of sending transactions and querying contract state, making it easier for developers to integrate Defindex into their Dart or Flutter applications.

Features #

  • Easy interaction with the Defindex Smart Contract
  • Supports both testnet and mainnet
  • Provides a high-level API for sending transactions and querying contract state

Getting started #

To use this package, add defindex as a dependency in your pubspec.yaml file.

Usage #

Here's a simple example of how to use the DefiIndex class to deposit an amount into an account:

import 'package:defindex/defindex.dart';

void main() async {
  var vault = Vault(
    sorobanRPCUrl: 'your_rpc_url',
    network: SorobanNetwork.TESTNET,
    contractId: 'contract_id'
  );

  String? transactionHash = await vault.deposit(
    'your_account_id',
    100.0,
    (transaction) async => 'your_signed_transaction',
  );

  print('Transaction hash: $transactionHash');
}
0
likes
130
points
136
downloads

Publisher

unverified uploader

Weekly Downloads

This package provides a Dart interface to interact with the Defindex Smart Contract on Soroban in the Stellar network. It simplifies the process of sending transactions and querying contract state, making it easier for developers to integrate Defindex into their Dart or Flutter applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter, stellar_flutter_sdk

More

Packages that depend on defindex_sdk