Skip to content

@gala-chain/apiAPI


API > createAndSignValidDTO

Function: createAndSignValidDTO()

createAndSignValidDTO\<T>(constructor, plain, privateKey): Promise\<T>

Creates valid signed DTO object from provided plain object. Throws exception in case of validation errors.

Type parameters

T extends ChainCallDTO

Parameters

constructor: ClassConstructor\<T>

plain: NonFunctionProperties\<T>

privateKey: string

Returns

Deprecated

Use (await createValidDTO(...)).signed(...) instead

Source

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