99} from '@bitgo/sdk-core' ;
1010import { BaseCoin as CoinConfig } from '@bitgo/statics' ;
1111import {
12+ TransactionData as IotaTransactionData ,
1213 Transaction as IotaTransaction ,
1314 TransactionDataBuilder as IotaTransactionDataBuilder ,
1415} from '@iota/iota-sdk/transactions' ;
@@ -38,7 +39,7 @@ export abstract class Transaction extends BaseTransaction {
3839 private _sender : string ;
3940 private _signature ?: Signature ;
4041 private _gasSponsorSignature ?: Signature ;
41- private _txDataBytes ?: Uint8Array < ArrayBuffer > ;
42+ private _txDataBytes ?: Uint8Array < ArrayBufferLike > ;
4243 private _isSimulateTx : boolean ;
4344
4445 protected constructor ( coinConfig : Readonly < CoinConfig > ) {
@@ -154,11 +155,11 @@ export abstract class Transaction extends BaseTransaction {
154155 }
155156
156157 async toBroadcastFormat ( ) : Promise < string > {
157- const txDataBytes : Uint8Array < ArrayBuffer > = await this . build ( ) ;
158+ const txDataBytes : Uint8Array < ArrayBufferLike > = await this . build ( ) ;
158159 return toBase64 ( txDataBytes ) ;
159160 }
160161
161- async build ( ) : Promise < Uint8Array < ArrayBuffer > > {
162+ async build ( ) : Promise < Uint8Array < ArrayBufferLike > > {
162163 if ( this . isSimulateTx ) {
163164 return this . buildDryRunTransaction ( ) ;
164165 }
@@ -265,10 +266,10 @@ export abstract class Transaction extends BaseTransaction {
265266 explanationResult : TransactionExplanation
266267 ) : TransactionExplanation ;
267268
268- private async buildDryRunTransaction ( ) : Promise < Uint8Array < ArrayBuffer > > {
269+ private async buildDryRunTransaction ( ) : Promise < Uint8Array < ArrayBufferLike > > {
269270 this . validateTxDataImplementation ( ) ;
270271 await this . populateTxData ( ) ;
271- const txDataBuilder = new IotaTransactionDataBuilder ( this . _iotaTransaction . getData ( ) ) ;
272+ const txDataBuilder = new IotaTransactionDataBuilder ( this . _iotaTransaction . getData ( ) as IotaTransactionData ) ;
272273 return txDataBuilder . build ( {
273274 overrides : {
274275 gasData : {
@@ -280,7 +281,7 @@ export abstract class Transaction extends BaseTransaction {
280281 } ) ;
281282 }
282283
283- private async buildTransaction ( ) : Promise < Uint8Array < ArrayBuffer > > {
284+ private async buildTransaction ( ) : Promise < Uint8Array < ArrayBufferLike > > {
284285 if ( this . _txDataBytes === undefined || this . _rebuildRequired ) {
285286 this . validateTxData ( ) ;
286287 await this . populateTxData ( ) ;
0 commit comments