Skip to Content
dApps
On this page

getInscriptions

List inscriptions of current account.

Method

declare function getInscriptions(cursor?: number, size?: number): Promise<InscriptionResponse>;

Params

  • cursor — optional number Initial index, Default is 0
  • size — optional number Query quantity, Default is 20

Response

export type InscriptionResponse = { total: number; list: InscriptionInfo[]; }; export type InscriptionInfo = { inscriptionId: string; inscriptionNumber: number; address: string; outputValue: number; preview: string; content: string; contentLength: number; contentType: string; timestamp: number; genesisTransaction: string; location: string; output: string; offset: number; };

Example

const provider = (window.$onekey && window.$onekey.btc) || window.unisat; const inscriptions = await provider.getInscriptions();

Demo

Open example 

Last updated on