Skip to content

dispatchCreateEntryToChain

dispatchCreateEntryToChain(registryEntryDetails, authorAccount): Promise<void>

Dispatches a transaction to create a new registry entry on the CORD blockchain.

Creates a new entry within a specified registry, storing its transaction hash and optional blob data.

Parameters

registryEntryDetails: IRegistryEntry

The details of the entry to create.

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 transaction fails or is invalid.

Example

const entryDetails = {
registryId: '2Lddw3xygo...',
tx_hash: '0x1234abcd...',
blob: '{"data":"example"}',
};
await dispatchCreateEntryToChain(entryDetails, authorAccount);
console.log('✅ Entry created');

Source

entry/src/Entry.chain.ts:174