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

@asbjornenge/tzkt-api

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asbjornenge/tzkt-api

TzKTApi is a Node.js module to communicate with a [tzkt API](https://api.tzkt.io/).

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

TzKTAPI

TzKTApi is a Node.js module to communicate with a tzkt API.

Heavily inspired by the dipdup-sdk.

It uses the openapi-typescript-codegen to generate the api code from the spec. It transpiles and modified this code to produce a module for Node.js in Javascript. It uses the module pattern.

It also exposes a wrapper around SignalR to ease consumption of the available websocket methods.

Install

npm i @asbjornenge/tzkt-api

Use

TzKTAPI

import { TzKTAPI } from '@asbjornenge/tzkt-api'

const api = new TzKTAPI({ baseUrl: 'https://api.tzkt.io' })

const contracts = await api.accounts.accountsGet({
  type: 'contract',
  limit: 10
})

console.log(contracts)

TzKTEvents

import { TzKTEvents } from '@asbjornenge/tzkt-api'

const events = new TzKTEvents({ baseUrl: 'https://api.tzkt.io/v1/events' })
await events.start()
events.on('head', async (head) => console.log(head))
await events.listen('head')

Test

npm test

enjoy.

FAQs

Package last updated on 04 Feb 2022

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