peppermint_sdk 0.0.1 peppermint_sdk: ^0.0.1 copied to clipboard
Flutter sdk to support Peppermint functionality.
A flutter library to easily use Peppermint functionality.
The most common usage of web3 wallet is to generate wallet address (public key) and private key. This library makes it easy to do it without much complexity to manually implement other web3 packages.
Features #
- Generate wallet address (public key) and private key
- Get current wallet address
- Get current private key
Usage #
Import package:wallet_manager/wallet_manager.dart
, insantiate WalletManager
.
import 'package:wallet_manager/wallet_manager.dart';
WalletManager manager = WalletManager();
// generate new wallet
WalletKeys keys = manager.createWallet();
print('${keys.publicKey}');
print('${keys.privateKey}');
// generate wallet from existing private key
String walletAddress = await manager.restoreWallet('enter your private key here')
// get current wallet address
String walletAddress = await manager.getPublicKey();
// get current private key
String walletAddress = await manager.getPrivateKey();
This library manage only 1 private key and public key per device.