Skip to content

getRunes

getRunes(config, params): Promise<GetRunesResponse>

Gets the runes for an address, with optional limit and offset.

Import

ts
import { getRunes } from "@midl-xyz/midl-js-core";

Example

ts
const runes = await getRunes(config, {
  address: "bc1q...",
});

console.log(runes);

Parameters

NameTypeDescription
configConfigThe configuration object
paramsGetRunesParamsThe parameters for the request

GetRunesParams

NameTypeDescription
addressstringThe address to get the runes of
limit?numberThe maximum number of runes to get
offset?numberThe offset to start getting runes from

Returns

Promise<GetRunesResponse>

GetRunesResponse

PropertyTypeDescription
limitnumberThe limit of runes
offsetnumberThe offset of runes
totalnumberThe total number of runes
resultsarray<Rune>The runes for the address

Rune

PropertyTypeDescription
runeobjectThe rune details
rune.idstringThe rune ID
rune.numbernumberThe rune number
rune.namestringThe rune name
rune.spaced_namestringThe rune spaced name
balancestringThe balance of the rune
addressstringThe address