Skip to content

prepareAddDelegateExtrinsic

prepareAddDelegateExtrinsic(registryId, delegateAddress, roles): Promise<SubmittableExtrinsic>

Prepares an extrinsic to add a delegate to a registry with specified permissions.

Parameters

registryId: string

The identifier of the registry (e.g., ‘2Ldew3xygo…’).

delegateAddress: string

The SS58 address of the delegate.

roles: object | RegistryPermissionVariant

A single RegistryPermissionVariant or array of variants (‘Entry’, ‘Delegate’, ‘Admin’).

Returns

Promise<SubmittableExtrinsic>

A promise that resolves to the prepared extrinsic.

Throws

If the preparation fails.

Example

const extrinsic = await prepareAddDelegateExtrinsic(
'registry:cord:3xygo...',
'5FHne...',
[RegistryPermissionVariant.Entry, RegistryPermissionVariant.Delegate]
);

Source

registry/src/Registry.chain.ts:295