Skip to content

dispatchAddDelegateToChain

dispatchAddDelegateToChain(registryId, delegateAddress, roles, authorAccount): Promise<string>

Dispatches a transaction to add a delegate to a registry with specified permissions.

registryId: string

The identifier of the registry (e.g., ‘3xygo…’).

delegateAddress: string

The SS58 address of the delegate.

roles: object | RegistryPermissionVariant

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

authorAccount: CordKeyringPair

The keyring pair of the author.

Promise<string>

A promise that resolves when the transaction is submitted.

If the transaction fails.

await dispatchAddDelegateToChain(
'2Lwwd3xygo...',
'5FHne...',
[RegistryPermissionVariant.Entry, RegistryPermissionVariant.Delegate],
alice
);

registry/src/Registry.chain.ts:341