Skip to content

adgojoe/wallet-manager

 
 

Repository files navigation

A dart library to easily create Web3 Wallet.

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

  1. Generate wallet address (public key) and private key
  2. Get current wallet address
  3. 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.

About

A dart package to easily create web3 wallet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 94.0%
  • Swift 4.2%
  • Kotlin 1.4%
  • Objective-C 0.4%