On this page
getInscriptions
List inscriptions of current account.
Method
declare function getInscriptions(cursor?: number, size?: number): Promise<InscriptionResponse>;Params
cursor— optionalnumberInitial index, Default is0size— optionalnumberQuery quantity, Default is20
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
Last updated on