Skip to content

@gala-chain/apiAPI


API > createValidSubmitDTO

Function: createValidSubmitDTO()

createValidSubmitDTO\<T>(constructor, plain): Promise\<T> & object

Creates valid submit DTO object from provided plain object. Throws exception in case of validation errors. If the uniqueKey is not provided, it generates a random one: 32 random bytes in base64.

Type parameters

T extends SubmitCallDTO

Parameters

constructor: ClassConstructor\<T>

plain: Omit\<NonFunctionProperties\<T>, "uniqueKey"> & object

Source

chain-api/src/types/dtos.ts:101