Skip to content

bostagintings/peppermint-flutter-sdk

 
 

Repository files navigation

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. Peppermint SDK makes it easy to do it without much complexity to manually implement other web3 packages. This package also store the keys safely using flutter_secure_storage.

In future, this package is a bridge to use Peppermint’s functionality with ease.

Features

  1. Generate wallet address (public key) and private key
  2. Get current wallet address
  3. Get current private key

Usage

Import package:peppermint_sdk/peppermint_sdk.dart, instantiate WalletManager.

import 'package:peppermint_sdk/peppermint_sdk.dart';    

WalletManager manager = WalletManager();  

// generate new wallet
WalletKeys keys = manager.createWallet();  
print('${keys.publicKey}');
print('${keys.privateKey}');

// generate new wallet with key
WalletKeys keys = manager.createWallet(key: "wallet1");

// generate wallet from existing private key
String walletAddress = await manager.restoreWallet('enter your private key here')

// get current wallet address
String publicKey = await manager.getPublicKey();

// get current private key
String privateKey = await manager.getPrivateKey();

// delete all wallet
await deleteAllWallet();

// check if has any wallet
bool hasWallet = await manager.hasAnyWallet();

This library is able to manage multiple private key and public key per device.

About

Flutter SDK to support peppermint functionality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 98.7%
  • Other 1.3%