app_authentication_kit

Last updated:

0 purchases

app_authentication_kit Image
app_authentication_kit Images
Add to Cart

Description:

app authentication kit

app_authentication_kit #
app_authentication_kit is a plugin for application to preform a set of authentication functions e.g. generate mnemonic phrase, generate private key from mnemonic phrase.
Usage #
Generate Mnemonic Phrase #
import 'package:app_authentication_kit/app_authentication_kit.dart';

// Generate 12 words mnemonic phrase
// Return [String] contains 12 words
String mPharse = MnemonicKit().genMnemonicPhrase();

// Generate 24 words mnemonic phrase
// Return [String] contains 24 words
String mPharse = MnemonicKit().genMnemonicPhrase(strength: 256);
copied to clipboard
Validate Mneonic Phraase #
import 'package:app_authentication_kit/app_authentication_kit.dart';

// Validate mnemonic phrase
// Return [bool], [true] indicates valid, [false] indicates invalid
bool isValid = MnemonicKit().validateMnemonic(mPhrase);
copied to clipboard
Import Mnemonic Phrase #
import 'package:app_authentication_kit/app_authentication_kit.dart';

// Generate root key for application to store in local
// Uses this key to derivative Address and Private key
String base58 = MnemonicKit().mnemonicToBase58(mPhrase);

// Generate Address Pair
// [AddressPair] includes [String] [address], [String] [publicKey] and [String] [privateKey]
AddressPair addressPair = MnemonicKit().genAddressPairFromBase58(base58);

// Or directly Generate Address Pair from Mnemonic Phrase
AddressPair addressPair = MnemonicKit().mnemonicPhraseToAddressPair(mPhrase);
copied to clipboard
License #
MIT

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.