Options
All
  • Public
  • Public/Protected
  • All
Menu

Package @purser/software

@purser/software

A javascript library to interact with a software Ethereum wallet, based on the ethers.js library.

It extracts all the complexity from setting up, maintaining and interacting with it, while providing you with a predictable interface.

Installation

npm install ethers @purser/software

Quick Usage

import { open } from '@purser/software'

const wallet = await open({ mnemonic: '...' });

console.log(wallet); // { address: '...', privateKey: '...', publicKey: '...' }

Documentation

You can find more in-depth description for this module's API in the purser docs.

Contributing

This package is part of the purser monorepo package.

Please read our Contributing Guidelines for how to get started.

License

The purser-software library along with the whole purser monorepo are MIT licensed.

Index

Interfaces

Functions

Functions

Const create

  • Create a new wallet.

    This will use EtherWallet's createRandom() (with defaults and entropy) and use the resulting private key to instantiate a new SoftwareWallet.

    Parameters

    Returns Promise<SoftwareWallet | void>

    A new wallet object

Const open

  • Open an existing wallet Using either mnemonic, private key or encrypted keystore

    This will try to extract the private key from a mnemonic (if available), and create a new SoftwareWallet instance using whichever key is available. (the on passed in or the one extracted from the mnemonic).

    Parameters

    Returns Promise<SoftwareWallet | void>

    A new wallet object (or undefined) if somehwere along the line an error is thrown.

Generated using TypeDoc