Skip to content

prepareUpdateExtrinsic

prepareUpdateExtrinsic(registryEntryDetails): Promise<SubmittableExtrinsic>

Prepares a transaction to update an existing registry entry on the CORD blockchain.

Constructs an extrinsic using the provided registry entry details, including the registry ID, transaction hash, and optional blob data.

registryEntryDetails: IRegistryEntryUpdate

The details of the entry to update.

Promise<SubmittableExtrinsic>

A promise resolving to the prepared extrinsic for submission.

If an error occurs while preparing the extrinsic.

const updateDetails = {
registryEntryId: '2Kwdabc123...',
registryId: '2Lwdjh3xygo...',
tx_hash: '0x5678efgh...',
blob: '{"data":"updated"}',
};
const extrinsic = await prepareUpdateExtrinsic(updateDetails);
console.log(extrinsic); // Prepared extrinsic for submission

entry/src/Entry.chain.ts:218