Skip to content

dispatchSetProfileToChain

dispatchSetProfileToChain(profileData, authorAccount): Promise<void>

Dispatches a request to create or update a profile on the CORD blockchain using the setProfile extrinsic.

profileData

An array of key-value pairs representing profile attributes (e.g., [["pub_name", "Alice"], ["pub_email", Bytes([97, 108, 105, 99, 101])]]). Keys and values can be strings, Bytes, or Uint8Array.

authorAccount: CordKeyringPair

The keyring pair of the account creating or updating the profile to sign the transaction.

Promise<void>

A promise that resolves when the transaction is successfully submitted.

If the profile data is invalid or an error occurs during dispatch.

profile/src/Profile.chain.ts:45