🎨ord_getInscriptions

You can use the ord_getInscriptions method to retrieve all your user's Inscriptionsarrow-up-right, i.e. the list of inscribed sats that their connected wallet's ordinal address owns, and their key attributes.

Your app must have first connected to the wallet and obtained account read permissions.

The response will be paginated when the inscriptions dataset is large. You can set your preferred pagination parameters in the request:

Request parameters
Description

limit (ℹ️ optional)

An integer defining the number of inscriptions returned per page. Defaults to 60, capped at 100.

offset (ℹ️ optional)

The number of results to skip over before returning new results. Defaults to 0.

import { request } from 'sats-connect';

const response = await request('ord_getInscriptions', undefined);

if (response.status === 'success') {
  console.log(response.result);
} else {
  console.error(response.error);
}

The ord_getInscriptions method will not trigger any operation or prompt your user to sign any transaction. It will return an inscriptions objects, detailing the connected ordinal address's inscriptions holdings:

inscriptions
Description

total

an integer representing the total count of inscriptions held by the connected ordinal address

[inscription]

an array of objects representing each inscription held by the connected ordinal address, with the below properties:

  • inscriptionId - string: the idarrow-up-right of the inscription.

  • inscriptionNumber - string: the numberarrow-up-right of the inscription.

  • parentInscriptionId - string: the idarrow-up-right of the parentarrow-up-right inscription. (ℹ️ optional, defaults to null)

  • collectionName - string: the name of the parent collectionarrow-up-right (ℹ️ optional, defaults to null)

  • contentType - number: the contentarrow-up-right type of the content inscribed on the sat

  • genesisTransaction - string: the txid of the inscription's genesis transactionarrow-up-right

  • timestamp - number: the timestamp of the block the inscription was created on

  • satNumber - string: the number of the inscribed sat

  • output - string: the output containing the inscribed sat as txid:vout

  • postage - string : the size of the inscription’s containing output in sats

  • contentType - number : the content type of inscription.

page_info

an object helping you identify the page queried and its location in a paginated response

  • page_number - integer: the number of the page queried

  • total_pages - integer: the total number of pages required for the response dataset, for the page_size specified in the request

Last updated