@@ -157,95 +157,18 @@ export class AggregateTransaction extends Transaction {
157157 * @param initiatorAccount - Initiator account
158158 * @param {CosignatureSignedTransaction[]} cosignatureSignedTransactions - Array of cosigned transaction
159159 * @param generationHash - Network generation hash hex
160+ * @param {SignSchema} signSchema The Sign Schema. (KECCAK_REVERSED_KEY / SHA3)
160161 * @return {SignedTransaction}
161162 */
162163 public signTransactionGivenSignatures(initiatorAccount: Account,
163164 cosignatureSignedTransactions: CosignatureSignedTransaction[],
164- generationHash: string) {
165- const aggregateTransaction = this.buildTransaction();
166- const signedTransactionRaw = aggregateTransaction.signTransactionGivenSignatures(initiatorAccount,
167- cosignatureSignedTransactions,
168- generationHash);
169- return new SignedTransaction(signedTransactionRaw.payload, signedTransactionRaw.hash, initiatorAccount.publicKey,
170- this.type, this.networkType);
171- }
172-
173- /**
174- * @internal
175- * Sign transaction with cosignatories collected from cosigned transactions and creating a new SignedTransaction
176- * For off chain Aggregated Complete Transaction co-signing.
177- * @param initiatorAccount - Initiator account
178- * @param {CosignatureSignedTransaction[]} cosignatureSignedTransactions - Array of cosigned transaction
179- * @param generationHash - Network generation hash hex
180- * @return {SignedTransaction}
181- */
182- public signTransactionGivenSignatures(initiatorAccount: Account,
183- cosignatureSignedTransactions: CosignatureSignedTransaction[],
184- generationHash: string) {
185- const aggregateTransaction = this.buildTransaction();
186- const signedTransactionRaw = aggregateTransaction.signTransactionGivenSignatures(initiatorAccount,
187- cosignatureSignedTransactions,
188- generationHash);
189- return new SignedTransaction(signedTransactionRaw.payload, signedTransactionRaw.hash, initiatorAccount.publicKey,
190- this.type, this.networkType);
191- }
192-
193- /**
194- * @internal
195- * Sign transaction with cosignatories collected from cosigned transactions and creating a new SignedTransaction
196- * For off chain Aggregated Complete Transaction co-signing.
197- * @param initiatorAccount - Initiator account
198- * @param {CosignatureSignedTransaction[]} cosignatureSignedTransactions - Array of cosigned transaction
199- * @param generationHash - Network generation hash hex
200- * @return {SignedTransaction}
201- */
202- public signTransactionGivenSignatures(initiatorAccount: Account,
203- cosignatureSignedTransactions: CosignatureSignedTransaction[],
204- generationHash: string) {
205- const aggregateTransaction = this.buildTransaction();
206- const signedTransactionRaw = aggregateTransaction.signTransactionGivenSignatures(initiatorAccount,
207- cosignatureSignedTransactions,
208- generationHash);
209- return new SignedTransaction(signedTransactionRaw.payload, signedTransactionRaw.hash, initiatorAccount.publicKey,
210- this.type, this.networkType);
211- }
212-
213- /**
214- * @internal
215- * Sign transaction with cosignatories collected from cosigned transactions and creating a new SignedTransaction
216- * For off chain Aggregated Complete Transaction co-signing.
217- * @param initiatorAccount - Initiator account
218- * @param {CosignatureSignedTransaction[]} cosignatureSignedTransactions - Array of cosigned transaction
219- * @param generationHash - Network generation hash hex
220- * @return {SignedTransaction}
221- */
222- public signTransactionGivenSignatures(initiatorAccount: Account,
223- cosignatureSignedTransactions: CosignatureSignedTransaction[],
224- generationHash: string) {
225- const aggregateTransaction = this.buildTransaction();
226- const signedTransactionRaw = aggregateTransaction.signTransactionGivenSignatures(initiatorAccount,
227- cosignatureSignedTransactions,
228- generationHash);
229- return new SignedTransaction(signedTransactionRaw.payload, signedTransactionRaw.hash, initiatorAccount.publicKey,
230- this.type, this.networkType);
231- }
232-
233- /**
234- * @internal
235- * Sign transaction with cosignatories collected from cosigned transactions and creating a new SignedTransaction
236- * For off chain Aggregated Complete Transaction co-signing.
237- * @param initiatorAccount - Initiator account
238- * @param {CosignatureSignedTransaction[]} cosignatureSignedTransactions - Array of cosigned transaction
239- * @param generationHash - Network generation hash hex
240- * @return {SignedTransaction}
241- */
242- public signTransactionGivenSignatures(initiatorAccount: Account,
243- cosignatureSignedTransactions: CosignatureSignedTransaction[],
244- generationHash: string) {
165+ generationHash: string,
166+ signSchema: SignSchema= SignSchema.SHA3) {
245167 const aggregateTransaction = this.buildTransaction();
246168 const signedTransactionRaw = aggregateTransaction.signTransactionGivenSignatures(initiatorAccount,
247169 cosignatureSignedTransactions,
248- generationHash);
170+ generationHash,
171+ signSchema);
249172 return new SignedTransaction(signedTransactionRaw.payload, signedTransactionRaw.hash, initiatorAccount.publicKey,
250173 this.type, this.networkType);
251174 }
0 commit comments