List inscriptions of current account.
async function getInscriptions(cursor: number, size: number): InscriptionResponse
cursor
— optionalnumber
Initial index, Default is0
size
— optionalnumber
Query quantity, Default is20
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 = async provider.getInscriptions();
{% embed url="https://codepen.io/OneKeyHQ/pen/MWLqvEv" %}