stellar_hd_wallet 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 69

Stellar HD Wallet #

Stellar HD Wallet, base on bip39 and stelalr sdk,you can use it to generate random mnemonic and get account from mnemonic

import #

pubspec.yaml

stellar_hd_wallet: ^1.0.0

example #

    import 'package:stellar_hd_wallet/stellar_hd_wallet.dart';

    void main(){
        // get random mnemonic ( english )
        final mnemonic = StellarHDWallet.generateMnemonic();
        print(mnemonic);
        final wallet = StellarHDWallet.fromMnemonic(mnemonic);
        final keypair = wallet.getKeyPair();
        // get accountId
        final accountId = keypair.accountId;
        final secretSeed = keypair.secretSeed;
        print(accountId);
        print(secretSeed);
        final keypairIndex1 = wallet.getKeyPair(index: 1);
        print(keypairIndex1.accountId);
        print(keypairIndex1.secretSeed);
    }

[1.0.0] - 20190131

  • support hex seed
  • 1.0.0 released

[0.0.1] - 20190131

  • generate random mnemonic
  • get keypair from mnemonic

example/example.dart

import 'package:stellar_hd_wallet/stellar_hd_wallet.dart';

void main() {
  // get random mnemonic ( english )
  final mnemonic = StellarHDWallet.generateMnemonic();
  print(mnemonic);
  final wallet = StellarHDWallet.fromMnemonic(mnemonic);
  final keypair = wallet.getKeyPair();
  // get accountId
  final accountId = keypair.accountId;
  final secretSeed = keypair.secretSeed;
  print(accountId);
  print(secretSeed);
  final keypairIndex1 = wallet.getKeyPair(index: 1);
  print(keypairIndex1.accountId);
  print(keypairIndex1.secretSeed);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  stellar_hd_wallet: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:stellar_hd_wallet/stellar_hd_wallet.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
39
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
69
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:stellar_hd_wallet/stellar_hd_wallet.dart.

Health suggestions

Fix lib/src/hd_wallet.dart. (-1.49 points)

Analysis of lib/src/hd_wallet.dart reported 3 hints:

line 25 col 3: Prefer using /// for doc comments.

line 37 col 3: Prefer using /// for doc comments.

line 93 col 3: Prefer using /// for doc comments.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
bip39 ^1.0.3 1.0.3
pointycastle ^1.0.0 1.0.1
stellar ^0.3.2 0.3.2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.3
eventsource 0.2.2
fixnum 0.10.9
hex 0.1.2
http 0.11.3+17 0.12.0+2
http_parser 3.1.3
logging 0.11.3+2
meta 1.1.7
path 1.6.4
source_span 1.5.5
string_scanner 1.0.5
sync 0.2.0
term_glyph 1.1.0
tweetnacl 0.3.2
typed_data 1.1.6
Dev dependencies
test ^1.0.0