Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @radarrelay/wallet-manager with all npm packages installed. Try it out:

var walletManager = require("@radarrelay/wallet-manager")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@radarrelay/wallet-manager v0.3.3

A library that simplifies Ethereum wallet creation.


A library that simplifies Ethereum wallet creation.

npm version CircleCI



npm install @radarrelay/wallet-manager


yarn add @radarrelay/wallet-manager

LightWallet Usage


import { LightWalletManager } from '@radarrelay/wallet-manager';

LightWalletManager Methods

Create a new wallet

Create a new lightwallet and save it into local storage or as a file.


  • password (mandatory) A string used to encrypt the vault when serialized.
  • seedPhrase (optional) A twelve-word mnemonic used to generate all accounts. Randomly generated if not supplied.
  • salt (optional) The salt used to encrypt & decrypt the vault. Randomly generated if not supplied.
  • hdPathString (optional) A BIP39 compliant HD Path String. Defaults to m/44'/60'/0'/0.
  • storageKeyName (optional) The local storage key or file name.
const lightWallet = await LightWalletManager.createWalletAsync(options: LightWalletOptions): Promise<LightWallet>

Save an existing wallet

Save the encrypted lightwallet into local storage or as a file.

LightWalletManager.saveWallet(wallet: LightWallet): void

Load an existing wallet

Load the lightwallet from local storage or the file system.

const lightWallet = await LightWalletManager.loadWalletAsync(password: string): Promise<LightWallet>

LightWallet Methods

Add new accounts

Adds 1 or more accounts to the lightwallet instance and saves the updated wallet.

lightWallet.addNewAccounts(numberOfAccounts: number = 1): void

Export private key

Exports the private key for a single account.

const privateKey = lightWallet.exportAccountPrivateKeyAsync(account: string, password: string): Promise<string>

Export seed phrase

Exports the wallet's seed phrase.

const seedPhrase = await lightWallet.exportSeedPhraseAsync(password: string): Promise<string>

Get accounts

Gets all the accounts from the wallet.

const accounts = lightWallet.getAccounts(): string[]


Serialize the encrypted lightwallet.

const serializedWallet = lightWallet.serialize(): string

Signer Methods

Sign a message

const signedMsg = await lightWallet.signer.signPersonalMessageAsync(account: string, message: string): Promise<string>

Sign a message hash

const signedMsgHash = await lightWallet.signer.signPersonalMessageHashAsync(account: string, messageHash: string): Promise<string>

Sign a transaction

const signedTx = await lightWallet.signer.signTransactionAsync(txParams: PartialTxParams): Promise<string>


Please read for details on our code of conduct and the process for submitting pull requests.


This project is licensed under the MIT License - see the file for details.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free