GithubHelp home page GithubHelp logo

isabella232 / lookup-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openethereum/lookup

0.0 0.0 0.0 90 KB

Parity lookup API ; lookup an Ethereum address from an e-mail or a name

Home Page: https://github.com/ethcore/lookup

License: Other

JavaScript 100.00%

lookup-1's Introduction

Parity lookup

Look up details about Ethereum accounts by address, name or e-mail.

Check out lookup-service for the web service and lookup-service-ui for the GUI.

Join the chat at https://gitter.im/ethcore/parity GPLv3

Installation

npm install --save lookup@ethcore/lookup

Usage

const {Api} = require('@parity/parity.js')

const api = new Api(new Api.Transport.Http('http://localhost:8545'))
api.transport._connectTimeout = -1

const lookup = require('lookup')(api)

lookup
  .byName('ngotchac')
  .then(console.log)

You will get a result like this:

{
  address: '0x639ba260535db072a41115c472830846e4e9ad0f',
  name: 'ngotchac',
  badges: [ {
    id: 12,
    address: '0x4A99350b039068fD326a318C599Be2E09E657D4A',
    name: 'emailverification',
    title: 'eMail verified',
    img: 'https://raw.githubusercontent.com/ethcore/dapp-assets/master/certifications/email-verification.svg'
  } ],
  tokens: [
    {
      id: 0,
      address: '0xAde20230C260f1fd46cD70174dd58363929fEa31',
      TLA: 'GOT',
      base: { [String: '1000000'] s: 1, e: 6, c: [ 1000000 ] }, // BigNumber
      name: 'Gotchacoin',
      img: 'http://vignette3.wikia.nocookie.net/farmville2/images/2/26/Baby_Caramel_Pygora_Goat.png/revision/latest?cb=20130201193031',
      balance: '3'
    }, {
      TLA: 'ETH',
      name: 'Ether',
      base: { [String: '1000000000000000000'] s: 1, e: 18, c: [ 10000 ] },
      img: 'https://raw.githubusercontent.com/ethcore/parity/1e6a2cb/js/assets/images/contracts/ethereum-black-64x64.png',
      balance: '12.5245565653765155'
    }
  ]
}

Refer to the example for more use cases.

lookup-1's People

Contributors

derhuerst avatar greenkeeper[bot] avatar ngotchac 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.