Skip to content

dispatchUpdateEntryToChain

dispatchUpdateEntryToChain(registryEntryDetails, authorAccount): Promise<void>

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

Verifies the entry exists before updating its transaction hash and optional blob data.

Parameters

registryEntryDetails: IRegistryEntryUpdate

The details for updating the entry.

authorAccount: CordKeyringPair

The keyring pair of the account authorizing the transaction.

Returns

Promise<void>

A promise that resolves when the transaction is submitted successfully.

Throws

If the entry doesn’t exist or the transaction fails.

Example

const updateDetails = {
registryEntryId: '2Lddabc123...',
registryId: '2Lwdk3xygo...',
tx_hash: '0x5678efgh...',
blob: '{"data":"updated"}',
};
await dispatchUpdateEntryToChain(updateDetails, authorAccount);
console.log('✅ Entry updated');

Source

entry/src/Entry.chain.ts:275