Skip to content

dispatchUpdateOwnershipToChain

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

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.

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.

Promise<string>

A promise that resolves when the transaction is submitted successfully.

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

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

entry/src/Entry.chain.ts:664