Skip to content

getRuneBalance

getRuneBalance(config, params): Promise<GetRuneBalanceResponse>

Gets the balance of a rune for an address

Import

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

Example

ts
const balance = await getRuneBalance(config, {
  address: "bc1q...",
  runeId: "1:1",
});
console.log(balance);

Parameters

NameTypeDescription
configConfigThe configuration object
paramsGetRuneBalanceParamsThe parameters for the request

GetRuneBalanceParams

NameTypeDescription
addressstringThe address
runeIdstringThe rune ID to get the balance of

Returns

Promise<GetRuneBalanceResponse>

The balance of the rune for the address

GetRuneBalanceResponse

NameTypeDescription
address?stringThe address
balancestringThe balance of the rune