xrpl 0.0.1 copy "xrpl: ^0.0.1" to clipboard
xrpl: ^0.0.1 copied to clipboard

Dart bindings for the xrpl.js library.

xrpl.dart #

xrpl.dart is a Dart package that provides bindings to the xrpl.js library, allowing developers to interact with the XRP Ledger in Dart applications.

Features #

This package is a work in progress, and so does not fully replicate the functionality of xrpl.js.

Getting started #

To use xrpl.dart in your Dart project, simply add it as a dependency in your pubspec.yaml file:

dependencies:
  xrpl: ^0.0.1

Finally, run dart pub get to download the package.

Usage #

To use xrpl.dart, first import it into your code:

import 'package:xrpl/xrpl.dart;

You can then use the functionality provided by xrpl.js through the xrpl.dart bindings:

   var walletFromMneomicOptions = WalletFromMnemonicOptions(
      mnemonicEncoding: "bip39",
    );

    var wallet = Wallet.fromMnemonic(seed, walletFromMneomicOptions);

    Client client = Client("wss://s.altnet.rippletest.net:51233");

    client.connect().then((_) {
      client.fundWallet(wallet);

      String address = wallet!.address;
      client.getXrpBalance(address).then((balanceString) {
        print("Wallet balance: ${balanceString.toString()}");
      });
    });

Please do not use this example for production code!

Contributing #

Contributions to xrpl.dart are welcome! To contribute, please fork the repository and submit a pull request. Before submitting a pull request, please make sure that your code follows the Dart Style Guide.

license #

xrpl.dart is licensed under the MIT License. See the LICENSE file for more information.

0
likes
0
pub points
2%
popularity

Publisher

verified publisherdhali.io

Dart bindings for the xrpl.js library.

License

unknown (LICENSE)

Dependencies

flutter, js, node_interop

More

Packages that depend on xrpl