Skip to content

dispatchCreateToChain

dispatchCreateToChain(registryDetails, authorAccount): Promise<void>

Dispatches a transaction to create a new registry on the CORD blockchain.

Parameters

registryDetails: IRegistryCreate

The details of the registry to create, including transaction hash and optional blob.

authorAccount: CordKeyringPair

The keyring pair of the author creating the registry.

Returns

Promise<void>

A promise that resolves when the transaction is submitted.

Throws

If the transaction fails.

Example

const registryDetails = {
tx_hash: '0x1234567890abcdef',
blob: '{"key":"value"}',
};
await dispatchCreateToChain(registryDetails, alice);

Source

registry/src/Registry.chain.ts:115