This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@dipdup/tzkt-api
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

TzKT API

npm version Made With License: MIT

Fully typed cliend for working with TzKT blockchain API.
Automatically generated from the OpenAPI specification.

Installation

yarn add @dipdup/tzkt-api

Usage

TzKT endpoints are split by groups called services to facilitate treeshaking:

You need to create an instance of a service pointing to a particular TzKT API host:

import { AccountsService } from '@dipdup/tzkt-api'

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

After that you can start making requests:

const smartContracts = await accounts.get({
    kind: { eq: 'smart_contract' },
    balance: { gt: 0 },
    staked: { eq: true },
    select: { fields: [ 'address', 'balance', 'delegate' ] },
    sort: { desc: 'lastActivity' },
    limit: 10
});

VSCode will provide autocompletion and tooltips for the request body, but generally you can build queries by just using the docs.

Examples

Check out demo apps using TzKT API:

Readme

Keywords

none

Package Sidebar

Install

npm i @dipdup/tzkt-api

Homepage

dipdup.net

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

1.87 MB

Total Files

392

Last publish

Collaborators

  • dmirg
  • m_kus