rwadurian/backend/services/backup-service/src/api/dto/request/store-share.dto.ts

42 lines
583 B
TypeScript

import {
IsNotEmpty,
IsString,
IsNumber,
IsOptional,
Min,
Max,
Length,
} from 'class-validator';
export class StoreShareDto {
@IsNotEmpty()
@IsString()
userId: string;
@IsNotEmpty()
@IsNumber()
@Min(1)
accountSequence: number;
@IsNotEmpty()
@IsString()
@Length(66, 130) // Compressed or uncompressed public key
publicKey: string;
@IsNotEmpty()
@IsString()
encryptedShareData: string;
@IsOptional()
@IsNumber()
@Min(2)
@Max(10)
threshold?: number;
@IsOptional()
@IsNumber()
@Min(2)
@Max(10)
totalParties?: number;
}