wallet 0.0.13 copy "wallet: ^0.0.13" to clipboard
wallet: ^0.0.13 copied to clipboard

Crypto wallet package for Bitcoin, Ethereum and Tron written in pure Dart.

Crypto wallet package for Bitcoin, Ethereum and Tron written in pure Dart.

Getting started #

In your pubspec.yaml file add:

dependencies:
  wallet: any
copied to clipboard

Usage #

Create Tron address from Mnemonic and Passphrase #

import 'package:wallet/wallet.dart' as wallet;

final mnemonic = '<YOUR MNEMONIC>';
final passphrase = '';

final seed = wallet.mnemonicToSeed(mnemonic, passphrase: passphrase);
final master = wallet.ExtendedPrivateKey.master(seed, wallet.xprv);
final root = master.forPath("m/44'/195'/0'/0/0");

final privateKey = wallet.PrivateKey((root as wallet.ExtendedPrivateKey).key);
final publicKey = wallet.tron.createPublicKey(privateKey);
final address = wallet.tron.createAddress(publicKey);

print(address);
copied to clipboard

Validate a Tron address #

import 'package:wallet/wallet.dart' as wallet;

const address = 'TCB9WxaRSMEXiVaVys9DEAXbRc6JNuKpjA';
final isValid = wallet.isValidTronAddress(address);

print(isValid); // True
copied to clipboard
21
likes
160
points
22k
downloads

Publisher

verified publisherpwa.ir

Weekly Downloads

2024.09.10 - 2025.03.25

Crypto wallet package for Bitcoin, Ethereum and Tron written in pure Dart.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

convert, eip55, pointycastle, sec

More

Packages that depend on wallet