stellar_hd_wallet 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new56

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 packages get

Alternatively, your editor might support pub get or flutter packages 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';
  
Version Uploaded Documentation Archive
1.0.0 Feb 1, 2019 Go to the documentation of stellar_hd_wallet 1.0.0 Download stellar_hd_wallet 1.0.0 archive
0.0.1 Jan 31, 2019 Go to the documentation of stellar_hd_wallet 0.0.1 Download stellar_hd_wallet 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
13
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Format lib/src/hd_wallet.dart.

Run dartfmt to format lib/src/hd_wallet.dart.

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.0
stellar ^0.3.2 0.3.2
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
eventsource 0.2.1
fixnum 0.10.9
hex 0.1.2
http 0.11.3+17 0.12.0+1
http_parser 3.1.3
logging 0.11.3+2
meta 1.1.7
path 1.6.2
source_span 1.5.4
string_scanner 1.0.4
sync 0.2.0
term_glyph 1.1.0
tweetnacl 0.3.1
typed_data 1.1.6
Dev dependencies
test ^1.0.0