GithubHelp home page GithubHelp logo

blockchainharry / purser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joincolony/purser

0.0 1.0 0.0 1.22 MB

Interact with Ethereum wallets easily

Home Page: https://docs.colony.io/purser/docs-overview/

License: MIT License

JavaScript 99.26% Shell 0.74%

purser's Introduction

Purser

Purser simplifies interaction with Ethereum based wallets. It supports both hardware and software wallets and provides a consistent and predictable interface to work with during dApp development.

Purser is:

Simple - Has an easy and intuitive API. Get started in minutes!

Predictable - Uses the same commands for all wallet types.

Sane - Maintains developer health by using proper error messages, validations and sanitisers.

Plug & Play - Supports Hardware (Ledger, Trezor) and Software (ethers.js) wallets out of the box.

Purser was brought to you by the fine folks at Colony. To learn more about Colony, you can visit the website or read the white paper.

Quickstart (software wallet)

To use the software wallet (based on the ethers wallet):

Installation

yarn add @colony/purser-software

Usage

Create a new wallet

import { create } from '@colony/purser-software'

const wallet = await create();

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

or open an existing one (based on the mnemnonic)

import { open } from '@colony/purser-software'

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

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

Quickstart (hardware wallet)

For hardware wallets (let's use trezor in this example) do:

Installation

yarn add @colony/purser-trezor

Usage

import { open } from '@colony/purser-trezor'

const wallet = await open();

console.log(wallet); // { address: '...', otherAddrresses: [...], publicKey: '...' }

wallet.setDefaultAddress(2); // Sets the current address to the third address in the list of `otherAddresses`

Documentation

Please see the documentation with detailed examples and explanations.

Packages

Purser is a monorepo consisting of a collection of Ethereum wallet libraries:

  • purser-core: A collection of helpers, utils, validators and normalizers to assist the individual purser modules.
  • purser-ledger: A javascript library to interact with a Ledger based Ethereum wallet.
  • purser-metamask: A javascript library to interact with the a Metamask based Ethereum wallet.
  • purser-software: A javascript library to interact with a software Ethereum wallet, based on the ethers.js library.
  • purser-trezor: A javascript library to interact with a Trezor based Ethereum wallet.

The future

We plan to add support more hardware wallets and other features that will make wallet interactions even easier. Stay tuned!

Contributing

We welcome all contributions to Purser. You can help by adding support for new wallet types, testing existing wallets, or improving the documentation.

Please read our Contributing Guidelines for how to get started.

License

The purser monorepo and each individual purser library are MIT licensed.

purser's People

Contributors

rdig avatar greenkeeper[bot] avatar greenkeeperio-bot avatar sprusr avatar ryanchristo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.