0.0.26 • Published 5 months ago

ordexplorer v0.0.26

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Ordinal Explorer

GorillaPool 1satordinal API wrapper

Install

npm i ordexplorer

Require

let ordexplorer = require('ordexplorer')

Import

import ordexplorer from 'ordexplorer'

API Calls

stats


txos

address

unspent

get (address, options)

options: { q: string, type: string, tag: string, limit: number, offset: number, bsv20: boolean, origins: boolean, refresh: boolean }

post (body, options)

options: { type: string, tag: string, limit: number, offset: number, bsv20: boolean, origins: boolean, refresh: boolean }

history

get (address, options)

options: { q: string, type: string, tag: string, limit: number, offset: number, bsv20: boolean, origins: boolean, refresh: boolean }

post (body, options)

options: { type: string, tag: string, limit: number, offset: number, bsv20: boolean, origins: boolean, refresh: boolean }

sync (address, options)

options: { unspent: boolean }

balance (address, options)

options: { refresh: boolean }


search

get ( query, options)

options: { tag: string, limit: number, offset: number, dir: asc || desc, type: string }

post( body, options)

options: { tag: string, limit: number, offset: number, dir: asc || desc, type: string }

unspent

get ( query, options)

options: { tag: string, limit: number, offset: number, dir: asc || desc, type: string }

post (body, options)

options: { tag: string, limit: number, offset: number, dir: asc || desc, type: string }

outpoint(outpoint, options)

options: { script: boolean }

outpoints( body, options)

options: { script: Boolean }

tx

sendBuffer (txbuf, options)

options: { format: tx || ef || beef }

send(rawtx, options)

options: { format: tx || ef || beef }

getSubmit (txid)

postSubmit (txid)

status (txid)

raw (txid)

proof (txid)

txid (txid)

getBatch (txidsArray)

postBatch (txidsArray)

address

sinceBlock (address, block, options)

options: { auth: authString, limit: Number, offset: Number }

sinceTimeStamp (address, block, options)

options: { auth: authString, format: tx || ef || beef, tags: Arraystring, broadcast: boolean }

origins

count ()

num (num)

map (origin)


inscription

get (outpoint, options)

options: { script: boolean }

spends (outpoint)

content (outpoint, options)

options: { fuzzy: boolean }

latestContent (outpoint)


locks

txid (txid)

address

unspent (address, options)

options: { limit: number, offset: number }

history (address, options)

options: { limit: number, offset: number }

search

get (query, options)

options: { limit: number, offset: number }

post (body, options)

options: { limit: number, offset: number }

inscriptions

fromTxid (txid)

fromNum (num)

search

get (query, options)

options: { tag: string, limit: number, offset: number, dir: asc || desc }

post (body, options)

options: { tag: string, limit: number, offset: number, dir: asc || desc }

recent (options)

options: { limit: number, offset: number }

geohash (geohashes)

outpoint (outpoint, options)

options: { script: boolean }

txids (origin, options)

history (origin, options)

ancestors

get (outpoint)

post (body, options)

address

ancestors (address, options)

options: { limit: number, offset: number }

latest

get (origin)

options: { script: boolean }

post (body, options)


collections

stats (collectionId)

holders (collectionId)


opns

get (domain)

mine (domain)


bsv20

info (options)

options: { limit: number, offset: number, sort: pct_minted || available || tick || max || height , dir: asc || desc, included: boolean}

tick

info (tick, options)

options: { limit: number, offset: number, dir: asc || desc, listing: boolean}

holders (tick, options)

options: { limit: number, offset: number }

address

status (address, tick, options)

options: { since: number, limit: number, offset: number }

balance (address, tick, options)

options: { limit: number, offset: number, dir: asc || desc, included: boolean, listing: boolean, sale: boolean }

history (address, tick, options)

options: { limit: number, offset: number, dir: asc || desc, included: boolean, listing: boolean, sale: boolean }

locks (address, tick, options)

options: { limit: number, offset: number, dir: asc || desc, included: boolean }

address

balance (address)


addresses

balance (addressesArray)


market (options)

options: { limit: number, offset: number, sort: price|| price_per_token || height, dir: asc || desc, type: v1 || v2 || all, id: string, tick: string }

sales (options)

options: { limit: number, offset: number, sort: price|| price_per_token || height, dir: asc || desc, type: v1 || v2 || all, id: string, tick: string, address: string }


bsv20v2

list (options)

options: { limit: number, offset: number, sort: fund_total || fund_used || fund_balance || height , dir: asc || desc, included: boolean}

info (id)

holders (id)

options: { since: number, limit: number, offset: number }

locked (id)

burned (id)

address

balance (address, id, options)

options: { limit: number, offset: number, dir: asc || desc, listing: boolean, includePending: boolean }

status (address, id, options)

options: { since: number, limit: number, offset: number }

deps (address, id, options)

options: { limit: number, offset: number }

history (address, id, options)

options: { limit: number, offset: number, dir: asc || desc, listing: boolean, listing: boolean, sale: boolean }

ancestors (address, id )

locks (address, id, options)

options: { limit: number, offset: number, dir: asc || desc }


events

get (channel,lastEventId)

subscribe (EventSource, addressesArray, scriptHashesArray)


market

get (options)

options: { sort: recent || price || num, dir: asc || desc, q: string, limit: number, offset: number, type: string, text: string, minPrice: number, maxPrice: number }

post (body, options)

options: { sort: recent || price || num, dir: asc || desc, q: string, limit: number, offset: number, type: string, text: string, minPrice: number, maxPrice: number }

sales

get (options)

options: { sort: recent || price || num, dir: asc || desc, q: string, limit: number, offset: number, type: string, text: string, minPrice: number, maxPrice: number, address: string }

post (body, options)

options: { sort: recent || price || num, dir: asc || desc, q: string, limit: number, offset: number, type: string, text: string, minPrice: number, maxPrice: number, address: string }

blocks

tip ()

list (height, options)

height (height, options)


POST body schema

{
  "types": [
    "string"
  ],
  "insc": {
    "json": "string",
    "text": "string",
    "words": [
      "string"
    ],
    "file": {
      "hash": "string",
      "size": 0,
      "type": "string"
    },
    "parent": "string"
  },
  "map": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "b": {
    "hash": "string",
    "size": 0,
    "type": "string"
  },
  "sigma": [
    {
      "algorithm": "string",
      "address": "string",
      "signature": "string",
      "vin": 0
    }
  ],
  "list": {
    "sale": true,
    "payout": "string",
    "price": 0
  },
  "bsv20": {
    "implied": true,
    "status": -1,
    "amt": "string",
    "sym": "string",
    "tick": "string",
    "op": "string",
    "p": "string",
    "id": "string"
  },
  "lock": {
    "until": 0,
    "address": "string"
  },
  "sigil": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "opns": {
    "status": 0,
    "domain": "string",
    "genesis": "string"
  },
  "opnsMine": {
    "pow": "string",
    "status": 0,
    "domain": "string",
    "genesis": "string"
  }
}

Examples

await ordexplorer.bsv20.tick.holders("COCO")
    .then((info)=>{
        console.log("holders: ",info)            
    })
  
await ordexplorer.bsv20.tick.address.status("1sY4QWkQszqGPCPnZPBtmGivUGor4HgXd","COCO",{ debug:true })
    .then((info) => {
        console.log("Status:", info.length)
                })        
await ordexplorer.bsv20.tick.address.balance("1sY4QWkQszqGPCPnZPBtmGivUGor4HgXd","COCO")
    .then((info) => {
        console.log("balance: ",info.length)
        
    })          
await ordexplorer.bsv20.tick.address.history("1sY4QWkQszqGPCPnZPBtmGivUGor4HgXd","COCO")
    .then((info) => {
        console.log("history: ",info.length)
        
    }) 

await ordexplorer.bsv20.tick.address.locks("1sY4QWkQszqGPCPnZPBtmGivUGor4HgXd","COCO")
    .then((info) => {
        console.log("locks: ",info)
        
    })            

GorillaPool API docs

1sat Ordinal Protocol

0.0.20

5 months ago

0.0.21

5 months ago

0.0.10

6 months ago

0.0.22

5 months ago

0.0.11

6 months ago

0.0.23

5 months ago

0.0.12

6 months ago

0.0.24

5 months ago

0.0.13

6 months ago

0.0.25

5 months ago

0.0.14

6 months ago

0.0.26

5 months ago

0.0.15

6 months ago

0.0.16

5 months ago

0.0.8

6 months ago

0.0.17

5 months ago

0.0.18

5 months ago

0.0.19

5 months ago

0.0.7

6 months ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago