@@ -2,6 +2,7 @@ import { Client } from '../client'
22import { Page } from '../page'
33import { Query } from '../query'
44import { QueryParams } from '../types'
5+ import { validate } from '../validate'
56
67/**
78 * A blockchain consists of an immutable set of cryptographically linked
@@ -61,6 +62,7 @@ export class TransactionBuilder {
6162 tokenTags ?: object
6263 actionTags ?: object
6364 } ) {
65+ validate ( params , 'IssueActionSchema' )
6466 this . actions . push ( Object . assign ( { } , params , { type : 'issue' } ) )
6567 }
6668
@@ -84,6 +86,7 @@ export class TransactionBuilder {
8486 filterParams ?: object
8587 actionTags ?: object
8688 } ) {
89+ validate ( params , 'RetireActionSchema' )
8790 this . actions . push ( Object . assign ( { } , params , { type : 'retire' } ) )
8891 }
8992
@@ -94,6 +97,7 @@ export class TransactionBuilder {
9497 * @param {Object } params Action parameters
9598 * @param {String } params.sourceAccountId - Account ID specifying the account
9699 * controlling the flavor.
100+ * @param {String } params.flavorId - ID of flavor to be transferred.
97101 * @param {Integer } params.amount - Amount of the flavor to be transferred.
98102 * @param {String } params.destinationAccountId - Account ID specifying the
99103 * account controlling the flavor.
@@ -112,16 +116,11 @@ export class TransactionBuilder {
112116 tokenTags ?: object
113117 actionTags ?: object
114118 } ) {
119+ validate ( params , 'TransferActionSchema' )
115120 this . actions . push ( Object . assign ( { } , params , { type : 'transfer' } ) )
116121 }
117122}
118123
119- export interface TransactionQueryParameters extends QueryParams {
120- startTime ?: number
121- endTime ?: number
122- timeout ?: number
123- }
124-
125124/**
126125 * API for interacting with {@link Transaction transactions}.
127126 *
0 commit comments