ledger_sui 1.0.0 copy "ledger_sui: ^1.0.0" to clipboard
ledger_sui: ^1.0.0 copied to clipboard

A Ledger App Plugin for the Sui blockchain


ledger-sui

A Flutter Ledger App Plugin for the Sui blockchain
« Explore the docs »

Report Bug · Request Feature · Ledger Flutter



Overview #

Ledger Nano devices are the perfect hardware wallets for managing your crypto & NFTs on the go. This Flutter package is a plugin for the ledger_flutter package to get public keys and sign transactions on the Sui blockchain.

Web3 Ecosystem Integrations #

We are expanding the Flutter ecosystem to grow the Web3 community. Check out our other Web3 packages below:

Getting started #

Installation #

Install the latest version of this package via pub.flutter-io.cn:

ledger_sui: ^latest-version

For integration with the Ledger Flutter package, check out the documentation here.

Setup #

Create a new instance of a SuiLedgerApp and pass an instance of your Ledger object.

final suiApp = SuiLedgerApp(ledger);

Usage #

Get public key #

Fetch the public key and address from the Ledger Nano device.

final result = await suiApp.getPublicKey(device);
print(result.publicKey); // Ed25519 public key
print(result.address);   // Sui address

Discover multiple accounts #

Fetch a page of Sui accounts by derivation index.

final accounts = await suiApp.getAccountsWithDetails(
  device,
  startIndex: 0,
  count: 5,
);

for (final account in accounts) {
  print(account.accountIndex);
  print(account.addressHex);
}

Signing transactions #

You can sign transactions using the SuiLedgerApp. The signing flow uses a block-chain protocol to handle large transactions:

final signature = await suiApp.signTransaction(
    device,
    transaction,
);

Contributing #

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag enhancement.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/my-feature)
  3. Commit your Changes (git commit -m 'feat: my new feature)
  4. Push to the Branch (git push origin feature/my-feature)
  5. Open a Pull Request

Please read our Contributing guidelines and try to follow Conventional Commits.

License #

The ledger_sui SDK is released under the Apache License 2.0. See LICENSE for details.

0
likes
140
points
21
downloads

Documentation

API reference

Publisher

verified publisherscallop.io

Weekly Downloads

A Ledger App Plugin for the Sui blockchain

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

crypto, flutter, ledger_flutter_plus

More

Packages that depend on ledger_sui