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

ordinalsbot

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ordinalsbot

Node.js library for OrdinalsBot API

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
78
decreased by-39.53%
Maintainers
1
Weekly downloads
 
Created
Source

OrdinalsBot Node.js Library

Version Try ordinalsbot on RunKit

The OrdinalsBot Node library provides convenient access to the OrdinalsBot API from applications written in JavaScript.

Documentation

You can find examples here. For more information refer to our API docs.

Installation

Install the package with:

npm install ordinalsbot --save
or
yarn add ordinalsbot

Usage

The package needs to be configured with your account's API key which you can get by opening a ticket in our Discord for now. Our developer dashboard is coming soon...

const ordinalsbot = require('ordinalsbot');

// if no parameter given, default environment is 'live'
// API_KEY only required for creating collection orders
ordinalsbot.setCredentials('MY_API_KEY', 'dev'); 

try {
  const order = await ordinalsbot.createOrder({
    files: [
        {
          size: 10,
          type: "plain/text",
          name: "my-text-inscription-file.txt",
          dataURL: "data:plain/text;base64,dGVzdCBvcmRlcg==",
        }
    ],
    lowPostage: true,
    receiveAddress: "",
    fee: 11
  });
} catch (error) {
  console.error(`${error.status} | ${error.message}`);
}

Using Promises

Every method returns a chainable promise which can be used instead of a regular callback:

// You can also use import
import ordinalsbot from 'ordinalsbot'
ordinalsbot.setCredentials('', 'dev');

// Create a new order
ordinalsbot.createOrder({
    files: [
        {
          size: 10,
          type: "plain/text",
          name: "my-text-inscription-file.txt",
          dataURL: "data:plain/text;base64,dGVzdCBvcmRlcg==",
        }
    ],
    lowPostage: true,
    receiveAddress: "",
    fee: 11
}).then(order => {
  console.log(order);
}).catch(error => {
  console.error(`${error.status} | ${error.message}`);
});

Keywords

FAQs

Package last updated on 20 Sep 2023

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