Skip to content

Commit

Permalink
Added index field to TransferEthOffchainKMS (#127)
Browse files Browse the repository at this point in the history
* Used the correct endpoint in `tronGetCurrentBlock`

* Added optional index field
  • Loading branch information
ncodes authored Aug 24, 2021
1 parent 72089da commit a5b0693
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/tatum",
"version": "1.22.5",
"version": "1.22.6",
"description": "Tatum API client allows browsers and Node.js clients to interact with Tatum API.",
"main": "dist/src/index.js",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
35 changes: 25 additions & 10 deletions src/model/request/TransferEthOffchainKMS.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
import {IsNotEmpty, IsOptional, IsUUID, Length, MaxLength, ValidateIf,} from 'class-validator'
import {BaseTransferEthErc20Offchain} from './BaseTransferEthErc20Offchain'
import {
IsInt,
IsNotEmpty,
IsOptional,
IsUUID,
Length,
Max,
MaxLength,
Min,
ValidateIf,
} from 'class-validator';
import { BaseTransferEthErc20Offchain } from './BaseTransferEthErc20Offchain';

export class TransferEthOffchainKMS extends BaseTransferEthErc20Offchain {
@ValidateIf((o) => !o.mnemonic && !o.privateKey)
@Length(36, 36)
@IsUUID('4')
@IsNotEmpty()
public signatureId?: string;

@ValidateIf(o => !o.mnemonic && !o.privateKey)
@Length(36, 36)
@IsUUID('4')
@IsNotEmpty()
public signatureId?: string;
@MaxLength(50000)
@IsOptional()
public data?: string;

@MaxLength(50000)
@IsOptional()
public data?: string;
@Min(0)
@IsInt()
@Max(2147483647)
@IsOptional()
public index?: number;
}

0 comments on commit a5b0693

Please sign in to comment.