Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

depay-blockchains

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depay-blockchains

``` yarn add depay-blockchains ```

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Quickstart

yarn add depay-blockchains

or

npm install --save depay-blockchains
import { Blockchain } from 'depay-blockchains'

Blockchain.all
// [
//   { name: 'ethereum', id: '0x01', label: 'Ethereum', logo: '...' },
//   { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' },
//   ...
// ]

Blockchain.findById('0x01')
// { name: 'ethereum', id: '0x01', label: 'Ethereum', logo: '...' }

Blockchain.findByName('ethereum')
// { name: 'ethereum', id: '0x01', label: 'Ethereum', logo: '...' }

Support

This libraries supports the following blockchains:

  • Ethereum
  • Binance Smart Chain
  • Polygon

Data Structure

Blockchain data is provided in the following structure:

{
  name: String,
  id: String,
  label: String,
  logo: String (base64 encoded PNG)
}

Functionalities

all: Retreive all information for all blockchains

import { Blockchain } from 'depay-blockchains'

Blockchain.all
// [
//   { name: 'ethereum', id: '0x01', label: 'Ethereum', logo: '...' },
//   { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' },
//   ...
// ]

findById: Get blockchain by blockchain id

import { Blockchain } from 'depay-blockchains'

Blockchain.findById('0x01')
// { name: 'ethereum', id: '0x01', label: 'Ethereum', logo: '...' }

Blockchain.findById('0x38')
// { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' }

findByName: Get blockchain by blockchain name

import { Blockchain } from 'depay-blockchains'

Blockchain.findByName('ethereum')
// { name: 'ethereum', id: '0x01', label: 'Ethereum', logo: '...' }

Blockchain.findByName('bsc')
// { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' }

Development

Get started

yarn install
yarn start

Release

npm publish

Keywords

FAQs

Package last updated on 21 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc