import {
  IsNotEmpty,
  IsString,
  IsNumber,
  IsOptional,
  Min,
  Max,
  Length,
} from 'class-validator';

export class StoreShareDto {
  @IsNotEmpty()
  @IsString()
  userId: string;

  @IsNotEmpty()
  @IsString()
  accountSequence: string;

  @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;
}
