queryAllDokenStateHistory
queryAllDokenStateHistory(
api,doken):Promise<DokenState[]>
Retrieves the complete history of state changes for a given doken identifier.
Parameters
Section titled “Parameters”• api: ApiPromise
An instance of ApiPromise from @polkadot/api, connected to the CORD network.
• doken: string
A string representing the doken identifier (not necessarily in hex).
Returns
Section titled “Returns”Promise<DokenState[]>
A Promise resolving to an array of DokenState objects, or an empty array if no history is found.
Throws
Section titled “Throws”Error if doken is invalid.
Example
Section titled “Example”const history = await queryAllDokenStateHistory(api, 'T6fvpeF1Q5y1qFB15aUnTpreo7JRLgJFM1ED5Qzqw6dV8oCnP4kS');console.log(history); // [{ state: '...', action: 'RegistryEntryCreated', height: 748 }, ...]