Skip to content

dispatchUpdateOwnershipToChain

dispatchUpdateOwnershipToChain(registryId, registryEntryId, newOwnerAccount, authorAccount): Promise<void>

Dispatches a transaction to update the ownership of a registry entry on the CORD blockchain.

Transfers ownership to a new account, ensuring the entry exists before proceeding.

Parameters

registryId: string

The id of the registry containing the entry

registryEntryId: string

The id of the entry to update

newOwnerAccount: 3${string}

The SS58 address of the new owner (e.g., 5FHne...).

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

await dispatchUpdateOwnershipToChain(
'registry:cord:3xygo...',
'entry:cord:abc123...',
'5FHneW46xGXzs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
authorAccount
);
console.log('✅ Ownership updated');

Source

entry/src/Entry.chain.ts:659