@safe-global/protocol-kit 2.0.0-alpha.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -102,14 +102,14 @@ Check the `create` method in the [API Reference](#sdk-api) for more details on a
102
102
  ### 3. Create a Safe transaction
103
103
 
104
104
  ```js
105
- import { SafeTransactionDataPartial } from '@safe-global/safe-core-sdk-types'
105
+ import { MetaTransactionData } from '@safe-global/safe-core-sdk-types'
106
106
 
107
- const safeTransactionData: SafeTransactionDataPartial = {
107
+ const safeTransactionData: MetaTransactionData = {
108
108
  to: '0x<address>',
109
109
  value: '<eth_value_in_wei>',
110
110
  data: '0x<data>'
111
111
  }
112
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
112
+ const safeTransaction = await safeSdk.createTransaction({ transactions: [safeTransactionData] })
113
113
  ```
114
114
 
115
115
  Check the `createTransaction` method in the [API Reference](#sdk-api) for additional details on creating MultiSend transactions.
@@ -515,90 +515,68 @@ const isOwner = await safeSdk.isOwner(address)
515
515
 
516
516
  Returns a Safe transaction ready to be signed by the owners and executed. The Protocol Kit supports the creation of single Safe transactions but also MultiSend transactions.
517
517
 
518
- - **Single transactions**
518
+ This method takes an array of `MetaTransactionData` objects that represent the individual transactions we want to include in our MultiSend transaction.
519
519
 
520
- This method can take an object of type `SafeTransactionDataPartial` that represents the transaction we want to execute (once the signatures are collected). It accepts some optional properties as follows.
520
+ When the array contains only one transaction, it is not wrapped in the MultiSend.
521
521
 
522
- ```js
523
- import { SafeTransactionDataPartial } from '@safe-global/safe-core-sdk-types'
524
-
525
- const safeTransactionData: SafeTransactionDataPartial = {
522
+ ```js
523
+ const transactions: MetaTransactionData[] = [
524
+ {
525
+ to,
526
+ data,
527
+ value,
528
+ operation // Optional
529
+ },
530
+ {
526
531
  to,
527
532
  data,
528
533
  value,
529
- operation, // Optional
530
- safeTxGas, // Optional
531
- baseGas, // Optional
532
- gasPrice, // Optional
533
- gasToken, // Optional
534
- refundReceiver, // Optional
535
- nonce // Optional
534
+ operation // Optional
536
535
  }
537
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
538
- ```
539
-
540
- - **MultiSend transactions**
541
-
542
- This method can take an array of `MetaTransactionData` objects that represent the multiple transactions we want to include in our MultiSend transaction. If we want to specify some of the optional properties in our MultiSend transaction, we can pass a second argument to the `createTransaction` method with the `SafeTransactionOptionalProps` object.
543
-
544
- ```js
545
- const safeTransactionData: MetaTransactionData[] = [
546
- {
547
- to,
548
- data,
549
- value,
550
- operation // Optional
551
- },
552
- {
553
- to,
554
- data,
555
- value,
556
- operation // Optional
557
- }
558
- // ...
559
- ]
560
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
561
- ```
536
+ // ...
537
+ ]
538
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
539
+ ```
562
540
 
563
- This method can also receive the `options` parameter to set the optional properties in the MultiSend transaction:
541
+ This method can also receive the `options` parameter to set the optional properties in the MultiSend transaction:
564
542
 
565
- ```js
566
- const safeTransactionData: MetaTransactionData[] = [
567
- {
568
- to,
569
- data,
570
- value,
571
- operation // Optional
572
- },
573
- {
574
- to,
575
- data,
576
- value,
577
- operation // Optional
578
- }
579
- // ...
580
- ]
581
- const options: SafeTransactionOptionalProps = {
582
- safeTxGas, // Optional
583
- baseGas, // Optional
584
- gasPrice, // Optional
585
- gasToken, // Optional
586
- refundReceiver, // Optional
587
- nonce // Optional
543
+ ```js
544
+ const transactions: MetaTransactionData[] = [
545
+ {
546
+ to,
547
+ data,
548
+ value,
549
+ operation // Optional
550
+ },
551
+ {
552
+ to,
553
+ data,
554
+ value,
555
+ operation // Optional
588
556
  }
589
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData, options })
590
- ```
557
+ // ...
558
+ ]
559
+ const options: SafeTransactionOptionalProps = {
560
+ safeTxGas, // Optional
561
+ baseGas, // Optional
562
+ gasPrice, // Optional
563
+ gasToken, // Optional
564
+ refundReceiver, // Optional
565
+ nonce // Optional
566
+ }
567
+ const safeTransaction = await safeSdk.createTransaction({ transactions, options })
568
+ ```
591
569
 
592
- In addition, the optional `callsOnly` parameter, which is `false` by default, allows to force the use of the `MultiSendCallOnly` instead of the `MultiSend` contract when sending a batch transaction:
570
+ In addition, the optional `callsOnly` parameter, which is `false` by default, allows to force the use of the `MultiSendCallOnly` instead of the `MultiSend` contract when sending a batch transaction:
593
571
 
594
- ```js
595
- const callsOnly = true
596
- const safeTransaction = await safeSdk.createTransaction({
597
- safeTransactionData,
598
- options,
599
- callsOnly
600
- })
601
- ```
572
+ ```js
573
+ const callsOnly = true
574
+ const safeTransaction = await safeSdk.createTransaction({
575
+ transactions,
576
+ options,
577
+ callsOnly
578
+ })
579
+ ```
602
580
 
603
581
  If the optional properties are not manually set, the Safe transaction returned will have the default value for each one:
604
582
 
@@ -617,10 +595,12 @@ Read more about [create transactions from a Safe](https://docs.safe.global/safe-
617
595
  Returns a Safe transaction ready to be signed by the owners that invalidates the pending Safe transaction/s with a specific nonce.
618
596
 
619
597
  ```js
620
- const safeTransactionData: SafeTransactionDataPartial = {
621
- // ...
622
- }
623
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
598
+ const transactions: MetaTransactionData[] = [
599
+ {
600
+ // ...
601
+ }
602
+ ]
603
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
624
604
  const rejectionTransaction = await safeSdk.createRejectionTransaction(safeTransaction.data.nonce)
625
605
  ```
626
606
 
@@ -629,7 +609,7 @@ const rejectionTransaction = await safeSdk.createRejectionTransaction(safeTransa
629
609
  Copies a Safe transaction.
630
610
 
631
611
  ```js
632
- const safeTransaction1 = await safeSdk.createTransaction({ safeTransactionData })
612
+ const safeTransaction1 = await safeSdk.createTransaction({ transactions })
633
613
  const safeTransaction2 = await copyTransaction(safeTransaction1)
634
614
  ```
635
615
 
@@ -638,10 +618,12 @@ const safeTransaction2 = await copyTransaction(safeTransaction1)
638
618
  Returns the transaction hash of a Safe transaction.
639
619
 
640
620
  ```js
641
- const safeTransactionData: SafeTransactionDataPartial = {
642
- // ...
643
- }
644
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
621
+ const transactions: MetaTransactionData[] = [
622
+ {
623
+ // ...
624
+ }
625
+ ]
626
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
645
627
  const txHash = await safeSdk.getTransactionHash(safeTransaction)
646
628
  ```
647
629
 
@@ -650,10 +632,12 @@ const txHash = await safeSdk.getTransactionHash(safeTransaction)
650
632
  Signs a hash using the current owner account.
651
633
 
652
634
  ```js
653
- const safeTransactionData: SafeTransactionDataPartial = {
654
- // ...
655
- }
656
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
635
+ const transactions: MetaTransactionData[] = [
636
+ {
637
+ // ...
638
+ }
639
+ ]
640
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
657
641
  const txHash = await safeSdk.getTransactionHash(safeTransaction)
658
642
  const signature = await safeSdk.signTransactionHash(txHash)
659
643
  ```
@@ -663,10 +647,12 @@ const signature = await safeSdk.signTransactionHash(txHash)
663
647
  Signs a transaction according to the EIP-712 using the current signer account.
664
648
 
665
649
  ```js
666
- const safeTransactionData: SafeTransactionDataPartial = {
667
- // ...
668
- }
669
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
650
+ const transactions: MetaTransactionData[] = [
651
+ {
652
+ // ...
653
+ }
654
+ ]
655
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
670
656
  const signature = await safeSdk.signTypedData(safeTransaction)
671
657
  ```
672
658
 
@@ -675,10 +661,12 @@ const signature = await safeSdk.signTypedData(safeTransaction)
675
661
  Returns a new `SafeTransaction` object that includes the signature of the current owner. `eth_sign` will be used by default to generate the signature.
676
662
 
677
663
  ```js
678
- const safeTransactionData: SafeTransactionDataPartial = {
679
- // ...
680
- }
681
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
664
+ const transactions: MetaTransactionData[] = [
665
+ {
666
+ // ...
667
+ }
668
+ ]
669
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
682
670
  const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction)
683
671
  ```
684
672
 
@@ -697,10 +685,12 @@ const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction, 'et
697
685
  Approves a hash on-chain using the current owner account.
698
686
 
699
687
  ```js
700
- const safeTransactionData: SafeTransactionDataPartial = {
701
- // ...
702
- }
703
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
688
+ const transactions: MetaTransactionData[] = [
689
+ {
690
+ // ...
691
+ }
692
+ ]
693
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
704
694
  const txHash = await safeSdk.getTransactionHash(safeTransaction)
705
695
  const txResponse = await safeSdk.approveTransactionHash(txHash)
706
696
  await txResponse.transactionResponse?.wait()
@@ -739,10 +729,12 @@ const txResponse = await safeSdk.approveTransactionHash(txHash, options)
739
729
  Returns a list of owners who have approved a specific Safe transaction.
740
730
 
741
731
  ```js
742
- const safeTransactionData: SafeTransactionDataPartial = {
743
- // ...
744
- }
745
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
732
+ const transactions: MetaTransactionData[] = [
733
+ {
734
+ // ...
735
+ }
736
+ ]
737
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
746
738
  const txHash = await safeSdk.getTransactionHash(safeTransaction)
747
739
  const ownerAddresses = await safeSdk.getOwnersWhoApprovedTx(txHash)
748
740
  ```
@@ -948,10 +940,12 @@ const safeTransaction = await safeSdk.createChangeThresholdTx(newThreshold, opti
948
940
  Checks if a Safe transaction can be executed successfully with no errors.
949
941
 
950
942
  ```js
951
- const safeTransactionData: SafeTransactionDataPartial = {
952
- // ...
953
- }
954
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
943
+ const transactions: MetaTransactionData[] = [
944
+ {
945
+ // ...
946
+ }
947
+ ]
948
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
955
949
  const isValidTx = await safeSdk.isValidTransaction(safeTransaction)
956
950
  ```
957
951
 
@@ -988,10 +982,12 @@ const isValidTx = await safeSdk.isValidTransaction(safeTransaction, options)
988
982
  Executes a Safe transaction.
989
983
 
990
984
  ```js
991
- const safeTransactionData: SafeTransactionDataPartial = {
992
- // ...
993
- }
994
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
985
+ const transactions: MetaTransactionData[] = [
986
+ {
987
+ // ...
988
+ }
989
+ ]
990
+ const safeTransaction = await safeSdk.createTransaction({ transactions })
995
991
  const txResponse = await safeSdk.executeTransaction(safeTransaction)
996
992
  await txResponse.transactionResponse?.wait()
997
993
  ```
@@ -144,7 +144,7 @@ declare class Safe {
144
144
  * @returns The Safe transaction
145
145
  * @throws "Invalid empty array of transactions"
146
146
  */
147
- createTransaction({ safeTransactionData, onlyCalls, options }: CreateTransactionProps): Promise<SafeTransaction>;
147
+ createTransaction({ transactions, onlyCalls, options }: CreateTransactionProps): Promise<SafeTransaction>;
148
148
  /**
149
149
  * Returns a Safe transaction ready to be signed by the owners that invalidates the pending Safe transaction/s with a specific nonce.
150
150
  *
package/dist/src/Safe.js CHANGED
@@ -309,20 +309,20 @@ class Safe {
309
309
  * @returns The Safe transaction
310
310
  * @throws "Invalid empty array of transactions"
311
311
  */
312
- async createTransaction({ safeTransactionData, onlyCalls = false, options }) {
312
+ async createTransaction({ transactions, onlyCalls = false, options }) {
313
313
  const safeVersion = await this.getContractVersion();
314
314
  if (__classPrivateFieldGet(this, _Safe_predictedSafe, "f") && !(0, utils_2.hasSafeFeature)(utils_2.SAFE_FEATURES.ACCOUNT_ABSTRACTION, safeVersion)) {
315
315
  throw new Error('Account Abstraction functionality is not available for Safes with version lower than v1.3.0');
316
316
  }
317
- if ((0, utils_2.isMetaTransactionArray)(safeTransactionData) && safeTransactionData.length === 0) {
317
+ if (transactions.length === 0) {
318
318
  throw new Error('Invalid empty array of transactions');
319
319
  }
320
320
  let newTransaction;
321
- if ((0, utils_2.isMetaTransactionArray)(safeTransactionData) && safeTransactionData.length > 1) {
321
+ if (transactions.length > 1) {
322
322
  const multiSendContract = onlyCalls
323
323
  ? __classPrivateFieldGet(this, _Safe_contractManager, "f").multiSendCallOnlyContract
324
324
  : __classPrivateFieldGet(this, _Safe_contractManager, "f").multiSendContract;
325
- const multiSendData = (0, utils_4.encodeMultiSendData)(safeTransactionData.map(utils_4.standardizeMetaTransactionData));
325
+ const multiSendData = (0, utils_4.encodeMultiSendData)(transactions.map(utils_4.standardizeMetaTransactionData));
326
326
  const multiSendTransaction = {
327
327
  ...options,
328
328
  to: await multiSendContract.getAddress(),
@@ -333,9 +333,7 @@ class Safe {
333
333
  newTransaction = multiSendTransaction;
334
334
  }
335
335
  else {
336
- newTransaction = (0, utils_2.isMetaTransactionArray)(safeTransactionData)
337
- ? { ...options, ...safeTransactionData[0] }
338
- : safeTransactionData;
336
+ newTransaction = { ...options, ...transactions[0] };
339
337
  }
340
338
  if (__classPrivateFieldGet(this, _Safe_predictedSafe, "f")) {
341
339
  return new SafeTransaction_1.default(await (0, utils_4.standardizeSafeTransactionData)({
@@ -364,12 +362,14 @@ class Safe {
364
362
  async createRejectionTransaction(nonce) {
365
363
  const safeTransactionData = {
366
364
  to: await this.getAddress(),
367
- nonce,
368
365
  value: '0',
369
- data: '0x',
366
+ data: '0x'
367
+ };
368
+ const options = {
369
+ nonce,
370
370
  safeTxGas: '0'
371
371
  };
372
- return this.createTransaction({ safeTransactionData });
372
+ return this.createTransaction({ transactions: [safeTransactionData], options });
373
373
  }
374
374
  /**
375
375
  * Copies a Safe transaction
@@ -378,8 +378,16 @@ class Safe {
378
378
  * @returns The new Safe transaction
379
379
  */
380
380
  async copyTransaction(safeTransaction) {
381
+ const { to, value, data, operation, ...options } = safeTransaction.data;
382
+ const safeTransactionData = {
383
+ to,
384
+ value,
385
+ data,
386
+ operation
387
+ };
381
388
  const signedSafeTransaction = await this.createTransaction({
382
- safeTransactionData: safeTransaction.data
389
+ transactions: [safeTransactionData],
390
+ options
383
391
  });
384
392
  safeTransaction.signatures.forEach((signature) => {
385
393
  signedSafeTransaction.addSignature(signature);
@@ -464,12 +472,7 @@ class Safe {
464
472
  const txHash = await this.getTransactionHash(transaction);
465
473
  signature = await this.signTransactionHash(txHash);
466
474
  }
467
- const signedSafeTransaction = await this.createTransaction({
468
- safeTransactionData: transaction.data
469
- });
470
- transaction.signatures.forEach((signature) => {
471
- signedSafeTransaction.addSignature(signature);
472
- });
475
+ const signedSafeTransaction = await this.copyTransaction(transaction);
473
476
  signedSafeTransaction.addSignature(signature);
474
477
  return signedSafeTransaction;
475
478
  }
@@ -537,10 +540,12 @@ class Safe {
537
540
  const safeTransactionData = {
538
541
  to: await this.getAddress(),
539
542
  value: '0',
540
- data: await __classPrivateFieldGet(this, _Safe_fallbackHandlerManager, "f").encodeEnableFallbackHandlerData(fallbackHandlerAddress),
541
- ...options
543
+ data: await __classPrivateFieldGet(this, _Safe_fallbackHandlerManager, "f").encodeEnableFallbackHandlerData(fallbackHandlerAddress)
542
544
  };
543
- const safeTransaction = await this.createTransaction({ safeTransactionData });
545
+ const safeTransaction = await this.createTransaction({
546
+ transactions: [safeTransactionData],
547
+ options
548
+ });
544
549
  return safeTransaction;
545
550
  }
546
551
  /**
@@ -555,10 +560,12 @@ class Safe {
555
560
  const safeTransactionData = {
556
561
  to: await this.getAddress(),
557
562
  value: '0',
558
- data: await __classPrivateFieldGet(this, _Safe_fallbackHandlerManager, "f").encodeDisableFallbackHandlerData(),
559
- ...options
563
+ data: await __classPrivateFieldGet(this, _Safe_fallbackHandlerManager, "f").encodeDisableFallbackHandlerData()
560
564
  };
561
- const safeTransaction = await this.createTransaction({ safeTransactionData });
565
+ const safeTransaction = await this.createTransaction({
566
+ transactions: [safeTransactionData],
567
+ options
568
+ });
562
569
  return safeTransaction;
563
570
  }
564
571
  /**
@@ -575,10 +582,12 @@ class Safe {
575
582
  const safeTransactionData = {
576
583
  to: await this.getAddress(),
577
584
  value: '0',
578
- data: await __classPrivateFieldGet(this, _Safe_guardManager, "f").encodeEnableGuardData(guardAddress),
579
- ...options
585
+ data: await __classPrivateFieldGet(this, _Safe_guardManager, "f").encodeEnableGuardData(guardAddress)
580
586
  };
581
- const safeTransaction = await this.createTransaction({ safeTransactionData });
587
+ const safeTransaction = await this.createTransaction({
588
+ transactions: [safeTransactionData],
589
+ options
590
+ });
582
591
  return safeTransaction;
583
592
  }
584
593
  /**
@@ -593,10 +602,12 @@ class Safe {
593
602
  const safeTransactionData = {
594
603
  to: await this.getAddress(),
595
604
  value: '0',
596
- data: await __classPrivateFieldGet(this, _Safe_guardManager, "f").encodeDisableGuardData(),
597
- ...options
605
+ data: await __classPrivateFieldGet(this, _Safe_guardManager, "f").encodeDisableGuardData()
598
606
  };
599
- const safeTransaction = await this.createTransaction({ safeTransactionData });
607
+ const safeTransaction = await this.createTransaction({
608
+ transactions: [safeTransactionData],
609
+ options
610
+ });
600
611
  return safeTransaction;
601
612
  }
602
613
  /**
@@ -612,10 +623,12 @@ class Safe {
612
623
  const safeTransactionData = {
613
624
  to: await this.getAddress(),
614
625
  value: '0',
615
- data: await __classPrivateFieldGet(this, _Safe_moduleManager, "f").encodeEnableModuleData(moduleAddress),
616
- ...options
626
+ data: await __classPrivateFieldGet(this, _Safe_moduleManager, "f").encodeEnableModuleData(moduleAddress)
617
627
  };
618
- const safeTransaction = await this.createTransaction({ safeTransactionData });
628
+ const safeTransaction = await this.createTransaction({
629
+ transactions: [safeTransactionData],
630
+ options
631
+ });
619
632
  return safeTransaction;
620
633
  }
621
634
  /**
@@ -631,10 +644,12 @@ class Safe {
631
644
  const safeTransactionData = {
632
645
  to: await this.getAddress(),
633
646
  value: '0',
634
- data: await __classPrivateFieldGet(this, _Safe_moduleManager, "f").encodeDisableModuleData(moduleAddress),
635
- ...options
647
+ data: await __classPrivateFieldGet(this, _Safe_moduleManager, "f").encodeDisableModuleData(moduleAddress)
636
648
  };
637
- const safeTransaction = await this.createTransaction({ safeTransactionData });
649
+ const safeTransaction = await this.createTransaction({
650
+ transactions: [safeTransactionData],
651
+ options
652
+ });
638
653
  return safeTransaction;
639
654
  }
640
655
  /**
@@ -652,10 +667,12 @@ class Safe {
652
667
  const safeTransactionData = {
653
668
  to: await this.getAddress(),
654
669
  value: '0',
655
- data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeAddOwnerWithThresholdData(ownerAddress, threshold),
656
- ...options
670
+ data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeAddOwnerWithThresholdData(ownerAddress, threshold)
657
671
  };
658
- const safeTransaction = await this.createTransaction({ safeTransactionData });
672
+ const safeTransaction = await this.createTransaction({
673
+ transactions: [safeTransactionData],
674
+ options
675
+ });
659
676
  return safeTransaction;
660
677
  }
661
678
  /**
@@ -673,10 +690,12 @@ class Safe {
673
690
  const safeTransactionData = {
674
691
  to: await this.getAddress(),
675
692
  value: '0',
676
- data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeRemoveOwnerData(ownerAddress, threshold),
677
- ...options
693
+ data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeRemoveOwnerData(ownerAddress, threshold)
678
694
  };
679
- const safeTransaction = await this.createTransaction({ safeTransactionData });
695
+ const safeTransaction = await this.createTransaction({
696
+ transactions: [safeTransactionData],
697
+ options
698
+ });
680
699
  return safeTransaction;
681
700
  }
682
701
  /**
@@ -694,10 +713,12 @@ class Safe {
694
713
  const safeTransactionData = {
695
714
  to: await this.getAddress(),
696
715
  value: '0',
697
- data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeSwapOwnerData(oldOwnerAddress, newOwnerAddress),
698
- ...options
716
+ data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeSwapOwnerData(oldOwnerAddress, newOwnerAddress)
699
717
  };
700
- const safeTransaction = await this.createTransaction({ safeTransactionData });
718
+ const safeTransaction = await this.createTransaction({
719
+ transactions: [safeTransactionData],
720
+ options
721
+ });
701
722
  return safeTransaction;
702
723
  }
703
724
  /**
@@ -713,10 +734,12 @@ class Safe {
713
734
  const safeTransactionData = {
714
735
  to: await this.getAddress(),
715
736
  value: '0',
716
- data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeChangeThresholdData(threshold),
717
- ...options
737
+ data: await __classPrivateFieldGet(this, _Safe_ownerManager, "f").encodeChangeThresholdData(threshold)
718
738
  };
719
- const safeTransaction = await this.createTransaction({ safeTransactionData });
739
+ const safeTransaction = await this.createTransaction({
740
+ transactions: [safeTransactionData],
741
+ options
742
+ });
720
743
  return safeTransaction;
721
744
  }
722
745
  /**
@@ -730,7 +753,9 @@ class Safe {
730
753
  to: serviceTransactionResponse.to,
731
754
  value: serviceTransactionResponse.value,
732
755
  data: serviceTransactionResponse.data || '0x',
733
- operation: serviceTransactionResponse.operation,
756
+ operation: serviceTransactionResponse.operation
757
+ };
758
+ const options = {
734
759
  safeTxGas: serviceTransactionResponse.safeTxGas.toString(),
735
760
  baseGas: serviceTransactionResponse.baseGas.toString(),
736
761
  gasPrice: serviceTransactionResponse.gasPrice,
@@ -738,7 +763,10 @@ class Safe {
738
763
  refundReceiver: serviceTransactionResponse.refundReceiver,
739
764
  nonce: serviceTransactionResponse.nonce
740
765
  };
741
- const safeTransaction = await this.createTransaction({ safeTransactionData });
766
+ const safeTransaction = await this.createTransaction({
767
+ transactions: [safeTransactionData],
768
+ options
769
+ });
742
770
  serviceTransactionResponse.confirmations?.map((confirmation) => {
743
771
  const signature = new utils_2.EthSafeSignature(confirmation.owner, confirmation.signature);
744
772
  safeTransaction.addSignature(signature);