Skip to content

dispatchRotateKeyToChain

dispatchRotateKeyToChain(newKey, authorAccount): Promise<void>

Dispatches a request to rotate the key for a profile on the CORD blockchain using the rotateKey extrinsic.

Parameters

newKey: string

The new account ID (SS58 address) to set as the profile’s key.

authorAccount: CordKeyringPair

The keyring pair of the current profile owner to sign the transaction.

Returns

Promise<void>

A promise that resolves when the transaction is successfully submitted.

Throws

If the newKey is invalid or an error occurs during dispatch.

Source

profile/src/Profile.chain.ts:101