@hirosystems/ordhook-sdk-js
TypeScript icon, indicating that this package has built-in type declarations

0.6.4 • Public • Published

ordhook-sdk-js

ordhook-sdk-js is a node library, designed to let developers write protocols sitting on top of the Ordinals theory. It is implemented as a dynamic library that can be loaded by Node.

Installation

# Yarn
yarn add dev @hirosystems/ordhook-sdk-js

# NPM
npm install --save-dev @hirosystems/ordhook-sdk-js

If any error occurs during the installation of this package, feel free to open an issue on this repository.

Usage

import { OrdinalsIndexer } from "@hirosystems/ordhook-sdk-js";

let indexer = new OrdinalsIndexer({
  bitcoinRpcUrl: 'http://localhost:8332',
  bitcoinRpcUsername: 'devnet',
  bitcoinRpcPassword: 'devnet',
  workingDirectory: '/etc/ordinals/db'
  logs: true
});

indexer.applyBlock((block) => {

})

indexer.undoBlock((block) => {

})

indexer.onTermination(() => {

})

indexer.start();


// indexer.dropBlock();
// indexer.recomputeBlock();
// indexer.replayBlocks();

Case Study

BRC20

Screencasts

Readme

Keywords

none

Package Sidebar

Install

npm i @hirosystems/ordhook-sdk-js

Weekly Downloads

6

Version

0.6.4

License

MIT

Unpacked Size

10.8 kB

Total Files

5

Last publish

Collaborators

  • cohars
  • rafaelcr
  • blockstack-devops
  • lgalabru