Skip to Content
dApp 接入
本页目录

getInscriptions

列出当前账户的铭文。

方法

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

参数

  • cursor — 可选 number 起始索引,默认为 0
  • size — 可选 number 查询数量,默认为 20

响应

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; };

示例

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

演示

打开示例 

最后更新于