Events

Events represent specific actions that happen within the Runes protocol. They are emitted every time a new block is processed by the indexer.

An example "Event" object looks as follows:

{
  "id": 10440750,
  "type": "Mint",
  "block": 842019,
  "transaction_hash": "9617caffcc0f25ae3aca9911584dc4d23599803f3b6b518438ee355ce2cbdcdb",
  "rune_protocol_id": "840000:63",
  "rune_name": "DOPE•ASS•TICKER",
  "rune_raw_name": "DOPEASSTICKER",
  "amount": "21000",
  "decimals": 0,
  "from_address": "GENESIS",
  "to_address": "UNALLOCATED"
}

Attribute descriptions

id

Unique identifier for an event (in sequential order from when they were processed by the indexer)

type

Represents the type of action the event represents. The nana indexer exposes three different type of events, which are the following

block

The block in which the event ocurred

transaction_hash

The transaction hash in which the event ocurred

rune_protocol_id

A unique identifier representing the rune. Runes are identified by the block and tx index of an "etch" transaction with the format block:tx

rune_name

A readable representation of a rune name with spacers included (the "•")

rune_raw_name

The raw representation of the rune (without spacers included). These are unique to every rune.

amount

The raw amount of the rune transferred with decimals excluded. To get the amount with decimals you can do amount / 10^decimals

decimals

The amount of decimals specified by the Rune during its "etch".

from_address & to_address

For "from_address" represents the source of the runes event. For "to_address" represents the desitnation of the runes from the event. Can be any of the following:

GET /runes/events/block/:height

Description

This endpoint retrieves all Mint, Etch, and Transfer events from a specific block. It returns an array of events.

URL

/runes/events/block/:height

Method

GET

URL Parameters

  • height (integer) - The block height from which to retrieve events.

Success Response

  • Code: 200 OK

  • Content:

[
  {
    "id": 10440750,
    "type": "Mint",
    "block": 842019,
    "transaction_hash": "9617caffcc0f25ae3aca9911584dc4d23599803f3b6b518438ee355ce2cbdcdb",
    "rune_protocol_id": "840000:63",
    "rune_name": "DOPE•ASS•TICKER",
    "rune_raw_name": "DOPEASSTICKER",
    "amount": "21000",
    "decimals": 0,
    "from_address": "GENESIS",
    "to_address": "UNALLOCATED"
  },
  {
    "id": 10440879,
    "type": "Mint",
    "block": 842019,
    "transaction_hash": "6831040836e6cedea0673169cc5642959a66982ee7178d5438cfa6e057bcd999",
    "rune_protocol_id": "840000:63",
    "rune_name": "DOPE•ASS•TICKER",
    "rune_raw_name": "DOPEASSTICKER",
    "amount": "21000",
    "decimals": 0,
    "from_address": "GENESIS",
    "to_address": "UNALLOCATED"
  },
  ...
]

GET /runes/events/tx/:hash

Description

This endpoint retrieves all Mint, Etch, and Transfer events from a specific transaction. It returns an array of events.

URL

/runes/events/tx/:hash

Method

GET

URL Parameters

  • hash (string) - The transaction hash of the transaction you want to fetch events from.

Success Response

  • Code: 200 OK

  • Content:

[
  {
    "id": 10440750,
    "type": "Mint",
    "block": 842019,
    "transaction_hash": "9617caffcc0f25ae3aca9911584dc4d23599803f3b6b518438ee355ce2cbdcdb",
    "rune_protocol_id": "840000:63",
    "rune_name": "DOPE•ASS•TICKER",
    "rune_raw_name": "DOPEASSTICKER",
    "amount": "21000",
    "decimals": 0,
    "from_address": "GENESIS",
    "to_address": "UNALLOCATED"
  },
  ...
]

GET /runes/events/address/:address

Description

This endpoint retrieves all Mint, Etch, and Transfer events from or to an address. It returns an array of events.

URL

/runes/events/tx/:hash

Method

GET

URL Parameters

  • address (string) - A valid bitcoin address (RPC does not support getting from UNALLOCATED or GENESIS)

Success Response

  • Code: 200 OK

  • Content:

[
   {
    "id": 10441129,
    "type": "Transfer",
    "block": 842019,
    "transaction_hash": "326dafad0b23f552627f141055cb74f8ec0b8c94197f6d0c8cd8e31378efdc88",
    "rune_protocol_id": "840000:1579",
    "rune_name": "QUARTER•POUNDER",
    "rune_raw_name": "QUARTERPOUNDER",
    "amount": "2100",
    "decimals": 1,
    "from_address": "UNALLOCATED",
    "to_address": "bc1p2vvy5ulfqsfy84j289x7y4mw23lh7ljys52h30dtg7ljga8uflmsflg2lh"
  },
  ...
]

Last updated