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

evtscan

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

evtscan

The js(ts) SDK to help developer using evtscan api.

  • 1.0.5
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

evtscan-sdk

NHibiki NHibiki Docs NHibiki

How to use

For Browser

Refer to CDN
<script src="https://cdn.jsdelivr.net/npm/evtscan/dist/evtscan.js"></script>
<!-- OR -->
<script src="https://unpkg.com/evtscan/dist/evtscan.js"></script>
Write your Code
<script>

    const evtScan = EvtScan.new();
    // Or
    // const evtScan = new EvtScan();
    // Or [with homemade apiCaller]
    // const evtScan = new EvtScan({ endpoint: 'https://some-evtscans.io/api/' });

    const blocks = evtScan.block();

    console.log(await blocks.next()); // it will print the first 10 blocks
    console.log(await blocks.next()); // then next 10-19[included] blocks

    const b = blocks.data[0];    // will return the 10th block since the method is called twice
    console.log(b);              // view the block
    const prev = await b.prev(); // get the previous block
    console.log(prev);           // view the block

    assert(prev instanceof EvtScan.Classes.Block); // they both belones to Block class
    const { Block } = EvtScan.Classes;
    const otherBlock = await (new Block().update(BLOCK_ID)); 
    // Or
    // const otherBlock = new Block();
    // await otherBlock.update(BLOCK_ID));

    // enjoy ...

</script>

For Node(js/ts)

Install with yarn/npm
yarn add evtscan
# or
# npm install --save evtscan
Write your Code
import EvtScan from 'evtscan';

const evtScan = new EvtScan();

Or, if you want to use your own upstream:

import EvtScan, { ApiCaller } from 'evtscan';

const apiCaller = ApiCaller('https://some-evtscans.io/api/');
const evtScan = new EvtScan({ apiCaller });
// or
// const evtScan = new EvtScan({ endpoint: 'https://some-evtscans.io/api/' });

Keywords

FAQs

Package last updated on 28 Jun 2019

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