Skip to main content

Interface: OrdinalsClient

ordinal-indexer.OrdinalsClient

Implemented by

Methods

getInscriptionFromId

getInscriptionFromId(id): Promise\<InscriptionDataFromId>

Retrieves an inscription based on its ID.

Parameters

NameTypeDescription
idInscriptionIdThe ID of the inscription to retrieve.

Returns

Promise\<InscriptionDataFromId>

A Promise that resolves to the inscription data.

Example

const client = new DefaultOrdinalsClient("regtest");
let inscription_id: InscriptionId = "enter_your_inscription_id_here" as InscriptionId;
const inscriptions: InscriptionDataFromId = await client.getInscriptionFromId(id);
console.log("Inscriptions Data:", inscriptions);

Defined in

ordinal-indexer/indexer.ts:271


getInscriptionFromUTXO

getInscriptionFromUTXO(utxo): Promise\<InscriptionUTXO>

Retrieves an inscription based on its UTXO (Unspent Transaction Output).

Parameters

NameTypeDescription
utxostringThe UTXO of the inscription to retrieve.

Returns

Promise\<InscriptionUTXO>

A Promise that resolves to the inscription data.

Example

const client = new DefaultOrdinalsClient("regtest");
let utxo: string = "enter_your_utxo_here";
const inscriptions: InscriptionUTXO = await client.getInscriptionFromUTXO(utxo);
console.log("Inscriptions Data:", inscriptions);

Defined in

ordinal-indexer/indexer.ts:314


getInscriptions

getInscriptions(): Promise\<InscriptionsData>

Retrieves a list of inscriptions.

Returns

Promise\<InscriptionsData>

A Promise that resolves to a inscriptions data.

Example

const client = new DefaultOrdinalsClient("regtest");
const inscriptions: InscriptionsData = await client.getInscriptions();
console.log("Inscriptions Data:", inscriptions);

Defined in

ordinal-indexer/indexer.ts:284


getInscriptionsFromBlock

getInscriptionsFromBlock(height): Promise\<InscriptionsData>

Retrieves an inscription based on its block height.

Parameters

NameTypeDescription
heightnumberThe block height of the inscription to retrieve.

Returns

Promise\<InscriptionsData>

A Promise that resolves to the inscription data.

Example

const client = new DefaultOrdinalsClient("regtest");
let block: number = "enter_your_block_number_here";
const inscriptions: InscriptionsData = await client.getInscriptionsFromBlock(block);
console.log("Inscriptions Data:", inscriptions);

Defined in

ordinal-indexer/indexer.ts:299


getInscriptionsFromSat

getInscriptionsFromSat(sat): Promise\<Ordinal>

Retrieves an inscription based on its sat (something specific to your use case).

Parameters

NameTypeDescription
satnumberThe sat of the inscription to retrieve.

Returns

Promise\<Ordinal>

A Promise that resolves to the ordinal data type.

Example

const client = new DefaultOrdinalsClient("regtest");
let sat: string = "enter_your_sat_number_here";
const ordinal: Ordinal = await client.getInscriptionsFromSat(sat);
console.log("Ordinal Data:", inscriptions);

Defined in

ordinal-indexer/indexer.ts:329


getInscriptionsFromStartBlock

getInscriptionsFromStartBlock(startHeight): Promise\<InscriptionsData>

Retrieves a list of inscriptions starting from a specified block and moving forward.

Parameters

NameTypeDescription
startHeightnumberThe start block height.

Returns

Promise\<InscriptionsData>

A Promise that resolves to the inscription data.

Example

const client = new DefaultOrdinalsClient("regtest");
let startBlock: number = "enter_your_block_number_here";
const inscriptions: InscriptionsData = await client.getInscriptionsFromStartBlock(block);
console.log("Inscriptions Data:", inscriptions);

Defined in

ordinal-indexer/indexer.ts:344