@safe-global/api-kit 4.0.0-alpha.0 → 4.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.
@@ -522,7 +522,7 @@ var SafeApiKit = class {
522
522
  throw new Error("Invalid safeTxHash");
523
523
  }
524
524
  return this.#api({
525
- url: `${this.#txServiceBaseUrl}/v1/multisig-transactions/${safeTxHash}/`,
525
+ url: `${this.#txServiceBaseUrl}/v2/multisig-transactions/${safeTxHash}/`,
526
526
  method: "get" /* Get */
527
527
  });
528
528
  }
@@ -667,7 +667,7 @@ var SafeApiKit = class {
667
667
  throw new Error("Invalid safeTxHash");
668
668
  }
669
669
  return this.#api({
670
- url: `${this.#txServiceBaseUrl}/v1/safes/${safe}/multisig-transactions/`,
670
+ url: `${this.#txServiceBaseUrl}/v2/safes/${safe}/multisig-transactions/`,
671
671
  method: "post" /* Post */,
672
672
  body: {
673
673
  ...safeTransactionData,
@@ -735,7 +735,7 @@ var SafeApiKit = class {
735
735
  throw new Error("Invalid Safe address");
736
736
  }
737
737
  const { address } = this.#getEip3770Address(safeAddress);
738
- const url = new URL(`${this.#txServiceBaseUrl}/v1/safes/${address}/multisig-transactions/`);
738
+ const url = new URL(`${this.#txServiceBaseUrl}/v2/safes/${address}/multisig-transactions/`);
739
739
  this.#addUrlQueryParams(url, options);
740
740
  return this.#api({
741
741
  url: url.toString(),
@@ -760,7 +760,7 @@ var SafeApiKit = class {
760
760
  const { address } = this.#getEip3770Address(safeAddress);
761
761
  const nonce = currentNonce ? currentNonce : (await this.getSafeInfo(address)).nonce;
762
762
  const url = new URL(
763
- `${this.#txServiceBaseUrl}/v1/safes/${address}/multisig-transactions/?executed=false&nonce__gte=${nonce}`
763
+ `${this.#txServiceBaseUrl}/v2/safes/${address}/multisig-transactions/?executed=false&nonce__gte=${nonce}`
764
764
  );
765
765
  if (hasConfirmations) {
766
766
  url.searchParams.set("has_confirmations", hasConfirmations.toString());
@@ -794,7 +794,7 @@ var SafeApiKit = class {
794
794
  throw new Error("Invalid Safe address");
795
795
  }
796
796
  const { address } = this.#getEip3770Address(safeAddress);
797
- const url = new URL(`${this.#txServiceBaseUrl}/v1/safes/${address}/all-transactions/`);
797
+ const url = new URL(`${this.#txServiceBaseUrl}/v2/safes/${address}/all-transactions/`);
798
798
  this.#addUrlQueryParams(url, options);
799
799
  return this.#api({
800
800
  url: url.toString(),
@@ -486,7 +486,7 @@ var SafeApiKit = class {
486
486
  throw new Error("Invalid safeTxHash");
487
487
  }
488
488
  return this.#api({
489
- url: `${this.#txServiceBaseUrl}/v1/multisig-transactions/${safeTxHash}/`,
489
+ url: `${this.#txServiceBaseUrl}/v2/multisig-transactions/${safeTxHash}/`,
490
490
  method: "get" /* Get */
491
491
  });
492
492
  }
@@ -631,7 +631,7 @@ var SafeApiKit = class {
631
631
  throw new Error("Invalid safeTxHash");
632
632
  }
633
633
  return this.#api({
634
- url: `${this.#txServiceBaseUrl}/v1/safes/${safe}/multisig-transactions/`,
634
+ url: `${this.#txServiceBaseUrl}/v2/safes/${safe}/multisig-transactions/`,
635
635
  method: "post" /* Post */,
636
636
  body: {
637
637
  ...safeTransactionData,
@@ -699,7 +699,7 @@ var SafeApiKit = class {
699
699
  throw new Error("Invalid Safe address");
700
700
  }
701
701
  const { address } = this.#getEip3770Address(safeAddress);
702
- const url = new URL(`${this.#txServiceBaseUrl}/v1/safes/${address}/multisig-transactions/`);
702
+ const url = new URL(`${this.#txServiceBaseUrl}/v2/safes/${address}/multisig-transactions/`);
703
703
  this.#addUrlQueryParams(url, options);
704
704
  return this.#api({
705
705
  url: url.toString(),
@@ -724,7 +724,7 @@ var SafeApiKit = class {
724
724
  const { address } = this.#getEip3770Address(safeAddress);
725
725
  const nonce = currentNonce ? currentNonce : (await this.getSafeInfo(address)).nonce;
726
726
  const url = new URL(
727
- `${this.#txServiceBaseUrl}/v1/safes/${address}/multisig-transactions/?executed=false&nonce__gte=${nonce}`
727
+ `${this.#txServiceBaseUrl}/v2/safes/${address}/multisig-transactions/?executed=false&nonce__gte=${nonce}`
728
728
  );
729
729
  if (hasConfirmations) {
730
730
  url.searchParams.set("has_confirmations", hasConfirmations.toString());
@@ -758,7 +758,7 @@ var SafeApiKit = class {
758
758
  throw new Error("Invalid Safe address");
759
759
  }
760
760
  const { address } = this.#getEip3770Address(safeAddress);
761
- const url = new URL(`${this.#txServiceBaseUrl}/v1/safes/${address}/all-transactions/`);
761
+ const url = new URL(`${this.#txServiceBaseUrl}/v2/safes/${address}/all-transactions/`);
762
762
  this.#addUrlQueryParams(url, options);
763
763
  return this.#api({
764
764
  url: url.toString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-global/api-kit",
3
- "version": "4.0.0-alpha.0",
3
+ "version": "4.0.0",
4
4
  "description": "SDK that facilitates the interaction with the Safe Transaction Service API",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "main": "dist/cjs/index.cjs",
@@ -46,13 +46,13 @@
46
46
  ],
47
47
  "homepage": "https://github.com/safe-global/safe-core-sdk#readme",
48
48
  "devDependencies": {
49
- "@safe-global/relay-kit": "^4.0.3",
49
+ "@safe-global/relay-kit": "^4.0.5",
50
50
  "@safe-global/testing-kit": "^0.2.1",
51
51
  "@types/chai": "^4.3.20",
52
52
  "@types/chai-as-promised": "^7.1.8",
53
53
  "@types/mocha": "^10.0.10",
54
54
  "@types/node-fetch": "^2.6.12",
55
- "@types/semver": "^7.5.8",
55
+ "@types/semver": "^7.7.0",
56
56
  "@types/sinon": "^17.0.4",
57
57
  "chai": "^4.5.0",
58
58
  "chai-as-promised": "^7.1.2",
@@ -65,8 +65,8 @@
65
65
  "tsconfig-paths": "^4.2.0"
66
66
  },
67
67
  "dependencies": {
68
- "@safe-global/protocol-kit": "^6.0.4",
69
- "@safe-global/types-kit": "^2.0.1",
68
+ "@safe-global/protocol-kit": "^6.1.0",
69
+ "@safe-global/types-kit": "^3.0.0",
70
70
  "node-fetch": "^2.7.0",
71
71
  "viem": "^2.21.8"
72
72
  }