本页目录
getInscriptions
列出当前账户的铭文。
方法
declare function getInscriptions(cursor?: number, size?: number): Promise<InscriptionResponse>;参数
cursor— 可选number起始索引,默认为0size— 可选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();演示
最后更新于