forked from PolymeshAssociation/polymesh-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* istanbul ignore file */ | ||
|
||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsArray, IsString } from 'class-validator'; | ||
|
||
import { ProofDto } from '~/confidential-accounts/dto/proof.dto'; | ||
|
||
export class FundMovesDto { | ||
@ApiProperty({ | ||
description: 'The Confidential Account from which to move the funds from', | ||
example: '0xdeadbeef00000000000000000000000000000000000000000000000000000000', | ||
type: 'string', | ||
}) | ||
@IsString() | ||
readonly from: string; | ||
|
||
@ApiProperty({ | ||
description: 'The Confidential Account to which to move the funds to', | ||
example: '0xdeadbeef00000000000000000000000000000000000000000000000000000000', | ||
type: 'string', | ||
}) | ||
@IsString() | ||
readonly to: string; | ||
|
||
@ApiProperty({ | ||
description: 'Proofs of the transaction', | ||
type: ProofDto, | ||
isArray: true, | ||
}) | ||
@IsArray() | ||
proofs: ProofDto[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* istanbul ignore file */ | ||
|
||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsArray } from 'class-validator'; | ||
|
||
import { FundMovesDto } from '~/confidential-accounts/dto/fund-moves.dto'; | ||
import { TransactionBaseDto } from '~/polymesh-rest-api/src/common/dto/transaction-base-dto'; | ||
|
||
export class MoveFundsDto extends TransactionBaseDto { | ||
@ApiProperty({ | ||
description: 'Asset moves', | ||
type: FundMovesDto, | ||
isArray: true, | ||
}) | ||
@IsArray() | ||
moves: FundMovesDto[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* istanbul ignore file */ | ||
|
||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString } from 'class-validator'; | ||
|
||
import { IsConfidentialAssetId } from '~/confidential-assets/decorators/validation'; | ||
|
||
export class ProofDto { | ||
@ApiProperty({ | ||
description: 'The confidential Asset IDs to be moved.', | ||
type: 'string', | ||
isArray: true, | ||
example: ['76702175-d8cb-e3a5-5a19-734433351e25'], | ||
}) | ||
@IsConfidentialAssetId() | ||
readonly asset: string; | ||
|
||
@ApiProperty({ | ||
description: 'The Proof of the transaction', | ||
example: '0xdeadbeef00000000000000000000000000000000000000000000000000000000', | ||
type: 'string', | ||
}) | ||
@IsString() | ||
readonly proof: string; | ||
} |