@gearbox-protocol/sdk 14.12.0-next.16 → 14.12.0-next.18

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.
Files changed (104) hide show
  1. package/dist/cjs/abi/{IWithdrawalCompressorV312.js → IWithdrawalCompressorV313.js} +49 -6
  2. package/dist/cjs/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.js +45 -1
  3. package/dist/cjs/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +45 -1
  4. package/dist/cjs/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +45 -1
  5. package/dist/cjs/abi/compressors/withdrawalCompressor.js +45 -1
  6. package/dist/cjs/dev/index.js +3 -1
  7. package/dist/cjs/dev/withdrawalAbi.js +2105 -0
  8. package/dist/cjs/dev/withdrawalUtils.js +271 -0
  9. package/dist/cjs/permissionless/bindings/factory/rate-keeper-factory.js +35 -0
  10. package/dist/cjs/permissionless/bindings/market-configurator.js +11 -0
  11. package/dist/cjs/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +1015 -0
  12. package/dist/cjs/plugins/adapters/abi/adapters/{iMidasIssuanceVaultAdapter.js → iMidasIssuanceVaultAdapterV310.js} +6 -6
  13. package/dist/cjs/plugins/adapters/abi/adapters/{iMidasRedemptionVault.js → iMidasRedemptionVaultAdapterV310.js} +9 -9
  14. package/dist/cjs/plugins/adapters/abi/adapters/index.js +6 -4
  15. package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +3 -0
  16. package/dist/cjs/plugins/adapters/abi/targetContractAbi.js +3 -3
  17. package/dist/cjs/plugins/adapters/contracts/MidasGatewayAdapterContract.js +121 -0
  18. package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -2
  19. package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -2
  20. package/dist/cjs/plugins/adapters/contracts/index.js +2 -0
  21. package/dist/cjs/plugins/adapters/createAdapter.js +2 -0
  22. package/dist/cjs/plugins/adapters/types.js +1 -0
  23. package/dist/cjs/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +20 -37
  24. package/dist/cjs/sdk/OnchainSDK.js +11 -0
  25. package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +11 -58
  26. package/dist/cjs/sdk/accounts/index.js +3 -1
  27. package/dist/cjs/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +229 -0
  28. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +40 -0
  29. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +40 -0
  30. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +40 -0
  31. package/dist/cjs/sdk/accounts/withdrawal-compressor/addresses.js +52 -0
  32. package/dist/cjs/sdk/accounts/withdrawal-compressor/createWithdrawalCompressor.js +53 -0
  33. package/dist/cjs/sdk/accounts/withdrawal-compressor/index.js +36 -0
  34. package/dist/cjs/sdk/accounts/withdrawal-compressor/intent.js +172 -0
  35. package/dist/cjs/sdk/accounts/withdrawal-compressor/types.js +16 -0
  36. package/dist/esm/abi/{IWithdrawalCompressorV312.js → IWithdrawalCompressorV313.js} +45 -2
  37. package/dist/esm/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.js +45 -1
  38. package/dist/esm/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +45 -1
  39. package/dist/esm/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +45 -1
  40. package/dist/esm/abi/compressors/withdrawalCompressor.js +45 -1
  41. package/dist/esm/dev/index.js +1 -0
  42. package/dist/esm/dev/withdrawalAbi.js +2074 -0
  43. package/dist/esm/dev/withdrawalUtils.js +259 -0
  44. package/dist/esm/permissionless/bindings/factory/rate-keeper-factory.js +11 -0
  45. package/dist/esm/permissionless/bindings/market-configurator.js +11 -0
  46. package/dist/esm/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.js +990 -0
  47. package/dist/esm/plugins/adapters/abi/adapters/{iMidasIssuanceVaultAdapter.js → iMidasIssuanceVaultAdapterV310.js} +2 -2
  48. package/dist/esm/plugins/adapters/abi/adapters/{iMidasRedemptionVault.js → iMidasRedemptionVaultAdapterV310.js} +4 -4
  49. package/dist/esm/plugins/adapters/abi/adapters/index.js +3 -2
  50. package/dist/esm/plugins/adapters/abi/conctructorAbi.js +3 -0
  51. package/dist/esm/plugins/adapters/abi/targetContractAbi.js +2 -2
  52. package/dist/esm/plugins/adapters/contracts/MidasGatewayAdapterContract.js +104 -0
  53. package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +4 -4
  54. package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +4 -4
  55. package/dist/esm/plugins/adapters/contracts/index.js +1 -0
  56. package/dist/esm/plugins/adapters/createAdapter.js +3 -0
  57. package/dist/esm/plugins/adapters/types.js +1 -0
  58. package/dist/esm/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +21 -39
  59. package/dist/esm/sdk/OnchainSDK.js +13 -1
  60. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +10 -56
  61. package/dist/esm/sdk/accounts/index.js +1 -0
  62. package/dist/esm/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +205 -0
  63. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +16 -0
  64. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +16 -0
  65. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +16 -0
  66. package/dist/esm/sdk/accounts/withdrawal-compressor/addresses.js +28 -0
  67. package/dist/esm/sdk/accounts/withdrawal-compressor/createWithdrawalCompressor.js +29 -0
  68. package/dist/esm/sdk/accounts/withdrawal-compressor/index.js +8 -0
  69. package/dist/esm/sdk/accounts/withdrawal-compressor/intent.js +137 -0
  70. package/dist/esm/sdk/accounts/withdrawal-compressor/types.js +0 -0
  71. package/dist/types/abi/{IWithdrawalCompressorV312.d.ts → IWithdrawalCompressorV313.d.ts} +74 -1
  72. package/dist/types/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.d.ts +77 -0
  73. package/dist/types/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.d.ts +77 -0
  74. package/dist/types/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.d.ts +77 -0
  75. package/dist/types/abi/compressors/withdrawalCompressor.d.ts +77 -0
  76. package/dist/types/dev/index.d.ts +1 -0
  77. package/dist/types/dev/withdrawalAbi.d.ts +1584 -0
  78. package/dist/types/dev/withdrawalUtils.d.ts +19 -0
  79. package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +77 -0
  80. package/dist/types/permissionless/bindings/factory/rate-keeper-factory.d.ts +179 -0
  81. package/dist/types/permissionless/bindings/market-configurator.d.ts +2 -0
  82. package/dist/types/plugins/adapters/abi/adapters/iMidasGatewayAdapterV311.d.ts +754 -0
  83. package/dist/types/plugins/adapters/abi/adapters/{iMidasIssuanceVaultAdapter.d.ts → iMidasIssuanceVaultAdapterV310.d.ts} +1 -1
  84. package/dist/types/plugins/adapters/abi/adapters/{iMidasRedemptionVault.d.ts → iMidasRedemptionVaultAdapterV310.d.ts} +2 -2
  85. package/dist/types/plugins/adapters/abi/adapters/index.d.ts +3 -2
  86. package/dist/types/plugins/adapters/abi/targetContractAbi.d.ts +1 -1
  87. package/dist/types/plugins/adapters/contracts/MidasGatewayAdapterContract.d.ts +790 -0
  88. package/dist/types/plugins/adapters/contracts/index.d.ts +1 -0
  89. package/dist/types/plugins/adapters/types.d.ts +2 -1
  90. package/dist/types/plugins/delayed-withdrawal/types.d.ts +4 -17
  91. package/dist/types/sdk/OnchainSDK.d.ts +10 -1
  92. package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +4 -12
  93. package/dist/types/sdk/accounts/index.d.ts +1 -0
  94. package/dist/types/sdk/accounts/types.d.ts +5 -19
  95. package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +35 -0
  96. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts +334 -0
  97. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts +338 -0
  98. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +300 -0
  99. package/dist/types/sdk/accounts/withdrawal-compressor/addresses.d.ts +21 -0
  100. package/dist/types/sdk/accounts/withdrawal-compressor/createWithdrawalCompressor.d.ts +11 -0
  101. package/dist/types/sdk/accounts/withdrawal-compressor/index.d.ts +8 -0
  102. package/dist/types/sdk/accounts/withdrawal-compressor/intent.d.ts +106 -0
  103. package/dist/types/sdk/accounts/withdrawal-compressor/types.d.ts +122 -0
  104. package/package.json +1 -1
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var IWithdrawalCompressorV312_exports = {};
20
- __export(IWithdrawalCompressorV312_exports, {
21
- iWithdrawalCompressorV312Abi: () => iWithdrawalCompressorV312Abi
19
+ var IWithdrawalCompressorV313_exports = {};
20
+ __export(IWithdrawalCompressorV313_exports, {
21
+ iWithdrawalCompressorV313Abi: () => iWithdrawalCompressorV313Abi
22
22
  });
23
- module.exports = __toCommonJS(IWithdrawalCompressorV312_exports);
24
- const iWithdrawalCompressorV312Abi = [
23
+ module.exports = __toCommonJS(IWithdrawalCompressorV313_exports);
24
+ const iWithdrawalCompressorV313Abi = [
25
25
  {
26
26
  type: "function",
27
27
  name: "contractType",
@@ -131,6 +131,49 @@ const iWithdrawalCompressorV312Abi = [
131
131
  ],
132
132
  stateMutability: "view"
133
133
  },
134
+ {
135
+ type: "function",
136
+ name: "getWithdrawalRequestResult",
137
+ inputs: [
138
+ { name: "creditAccount", type: "address", internalType: "address" },
139
+ { name: "token", type: "address", internalType: "address" },
140
+ { name: "withdrawalToken", type: "address", internalType: "address" },
141
+ { name: "amount", type: "uint256", internalType: "uint256" },
142
+ { name: "extraData", type: "bytes", internalType: "bytes" }
143
+ ],
144
+ outputs: [
145
+ {
146
+ name: "",
147
+ type: "tuple",
148
+ internalType: "struct RequestableWithdrawal",
149
+ components: [
150
+ { name: "token", type: "address", internalType: "address" },
151
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
152
+ {
153
+ name: "outputs",
154
+ type: "tuple[]",
155
+ internalType: "struct WithdrawalOutput[]",
156
+ components: [
157
+ { name: "token", type: "address", internalType: "address" },
158
+ { name: "isDelayed", type: "bool", internalType: "bool" },
159
+ { name: "amount", type: "uint256", internalType: "uint256" }
160
+ ]
161
+ },
162
+ {
163
+ name: "requestCalls",
164
+ type: "tuple[]",
165
+ internalType: "struct MultiCall[]",
166
+ components: [
167
+ { name: "target", type: "address", internalType: "address" },
168
+ { name: "callData", type: "bytes", internalType: "bytes" }
169
+ ]
170
+ },
171
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
172
+ ]
173
+ }
174
+ ],
175
+ stateMutability: "view"
176
+ },
134
177
  {
135
178
  type: "function",
136
179
  name: "getWithdrawalRequestResult",
@@ -182,5 +225,5 @@ const iWithdrawalCompressorV312Abi = [
182
225
  ];
183
226
  // Annotate the CommonJS export names for ESM import in node:
184
227
  0 && (module.exports = {
185
- iWithdrawalCompressorV312Abi
228
+ iWithdrawalCompressorV313Abi
186
229
  });
@@ -71,7 +71,8 @@ const mellowWithdrawalSubcompressorAbi = [
71
71
  { name: "target", type: "address", internalType: "address" },
72
72
  { name: "callData", type: "bytes", internalType: "bytes" }
73
73
  ]
74
- }
74
+ },
75
+ { name: "extraData", type: "bytes", internalType: "bytes" }
75
76
  ]
76
77
  },
77
78
  {
@@ -132,6 +133,49 @@ const mellowWithdrawalSubcompressorAbi = [
132
133
  ],
133
134
  stateMutability: "view"
134
135
  },
136
+ {
137
+ type: "function",
138
+ name: "getWithdrawalRequestResult",
139
+ inputs: [
140
+ { name: "creditAccount", type: "address", internalType: "address" },
141
+ { name: "token", type: "address", internalType: "address" },
142
+ { name: "withdrawalToken", type: "address", internalType: "address" },
143
+ { name: "amount", type: "uint256", internalType: "uint256" },
144
+ { name: "", type: "bytes", internalType: "bytes" }
145
+ ],
146
+ outputs: [
147
+ {
148
+ name: "requestableWithdrawal",
149
+ type: "tuple",
150
+ internalType: "struct RequestableWithdrawal",
151
+ components: [
152
+ { name: "token", type: "address", internalType: "address" },
153
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
154
+ {
155
+ name: "outputs",
156
+ type: "tuple[]",
157
+ internalType: "struct WithdrawalOutput[]",
158
+ components: [
159
+ { name: "token", type: "address", internalType: "address" },
160
+ { name: "isDelayed", type: "bool", internalType: "bool" },
161
+ { name: "amount", type: "uint256", internalType: "uint256" }
162
+ ]
163
+ },
164
+ {
165
+ name: "requestCalls",
166
+ type: "tuple[]",
167
+ internalType: "struct MultiCall[]",
168
+ components: [
169
+ { name: "target", type: "address", internalType: "address" },
170
+ { name: "callData", type: "bytes", internalType: "bytes" }
171
+ ]
172
+ },
173
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
174
+ ]
175
+ }
176
+ ],
177
+ stateMutability: "view"
178
+ },
135
179
  {
136
180
  type: "function",
137
181
  name: "getWithdrawalRequestResult",
@@ -71,7 +71,8 @@ const midasWithdrawalSubcompressorAbi = [
71
71
  { name: "target", type: "address", internalType: "address" },
72
72
  { name: "callData", type: "bytes", internalType: "bytes" }
73
73
  ]
74
- }
74
+ },
75
+ { name: "extraData", type: "bytes", internalType: "bytes" }
75
76
  ]
76
77
  },
77
78
  {
@@ -132,6 +133,49 @@ const midasWithdrawalSubcompressorAbi = [
132
133
  ],
133
134
  stateMutability: "view"
134
135
  },
136
+ {
137
+ type: "function",
138
+ name: "getWithdrawalRequestResult",
139
+ inputs: [
140
+ { name: "creditAccount", type: "address", internalType: "address" },
141
+ { name: "token", type: "address", internalType: "address" },
142
+ { name: "withdrawalToken", type: "address", internalType: "address" },
143
+ { name: "amount", type: "uint256", internalType: "uint256" },
144
+ { name: "extraData", type: "bytes", internalType: "bytes" }
145
+ ],
146
+ outputs: [
147
+ {
148
+ name: "requestableWithdrawal",
149
+ type: "tuple",
150
+ internalType: "struct RequestableWithdrawal",
151
+ components: [
152
+ { name: "token", type: "address", internalType: "address" },
153
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
154
+ {
155
+ name: "outputs",
156
+ type: "tuple[]",
157
+ internalType: "struct WithdrawalOutput[]",
158
+ components: [
159
+ { name: "token", type: "address", internalType: "address" },
160
+ { name: "isDelayed", type: "bool", internalType: "bool" },
161
+ { name: "amount", type: "uint256", internalType: "uint256" }
162
+ ]
163
+ },
164
+ {
165
+ name: "requestCalls",
166
+ type: "tuple[]",
167
+ internalType: "struct MultiCall[]",
168
+ components: [
169
+ { name: "target", type: "address", internalType: "address" },
170
+ { name: "callData", type: "bytes", internalType: "bytes" }
171
+ ]
172
+ },
173
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
174
+ ]
175
+ }
176
+ ],
177
+ stateMutability: "view"
178
+ },
135
179
  {
136
180
  type: "function",
137
181
  name: "getWithdrawalRequestResult",
@@ -71,7 +71,8 @@ const securitizeRedemptionSubcompressorAbi = [
71
71
  { name: "target", type: "address", internalType: "address" },
72
72
  { name: "callData", type: "bytes", internalType: "bytes" }
73
73
  ]
74
- }
74
+ },
75
+ { name: "extraData", type: "bytes", internalType: "bytes" }
75
76
  ]
76
77
  },
77
78
  {
@@ -132,6 +133,49 @@ const securitizeRedemptionSubcompressorAbi = [
132
133
  ],
133
134
  stateMutability: "view"
134
135
  },
136
+ {
137
+ type: "function",
138
+ name: "getWithdrawalRequestResult",
139
+ inputs: [
140
+ { name: "creditAccount", type: "address", internalType: "address" },
141
+ { name: "token", type: "address", internalType: "address" },
142
+ { name: "withdrawalToken", type: "address", internalType: "address" },
143
+ { name: "amount", type: "uint256", internalType: "uint256" },
144
+ { name: "extraData", type: "bytes", internalType: "bytes" }
145
+ ],
146
+ outputs: [
147
+ {
148
+ name: "requestableWithdrawal",
149
+ type: "tuple",
150
+ internalType: "struct RequestableWithdrawal",
151
+ components: [
152
+ { name: "token", type: "address", internalType: "address" },
153
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
154
+ {
155
+ name: "outputs",
156
+ type: "tuple[]",
157
+ internalType: "struct WithdrawalOutput[]",
158
+ components: [
159
+ { name: "token", type: "address", internalType: "address" },
160
+ { name: "isDelayed", type: "bool", internalType: "bool" },
161
+ { name: "amount", type: "uint256", internalType: "uint256" }
162
+ ]
163
+ },
164
+ {
165
+ name: "requestCalls",
166
+ type: "tuple[]",
167
+ internalType: "struct MultiCall[]",
168
+ components: [
169
+ { name: "target", type: "address", internalType: "address" },
170
+ { name: "callData", type: "bytes", internalType: "bytes" }
171
+ ]
172
+ },
173
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
174
+ ]
175
+ }
176
+ ],
177
+ stateMutability: "view"
178
+ },
135
179
  {
136
180
  type: "function",
137
181
  name: "getWithdrawalRequestResult",
@@ -92,7 +92,8 @@ const withdrawalCompressorAbi = [
92
92
  { name: "target", type: "address", internalType: "address" },
93
93
  { name: "callData", type: "bytes", internalType: "bytes" }
94
94
  ]
95
- }
95
+ },
96
+ { name: "extraData", type: "bytes", internalType: "bytes" }
96
97
  ]
97
98
  },
98
99
  {
@@ -152,6 +153,49 @@ const withdrawalCompressorAbi = [
152
153
  ],
153
154
  stateMutability: "view"
154
155
  },
156
+ {
157
+ type: "function",
158
+ name: "getWithdrawalRequestResult",
159
+ inputs: [
160
+ { name: "creditAccount", type: "address", internalType: "address" },
161
+ { name: "token", type: "address", internalType: "address" },
162
+ { name: "withdrawalToken", type: "address", internalType: "address" },
163
+ { name: "amount", type: "uint256", internalType: "uint256" },
164
+ { name: "extraData", type: "bytes", internalType: "bytes" }
165
+ ],
166
+ outputs: [
167
+ {
168
+ name: "withdrawal",
169
+ type: "tuple",
170
+ internalType: "struct RequestableWithdrawal",
171
+ components: [
172
+ { name: "token", type: "address", internalType: "address" },
173
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
174
+ {
175
+ name: "outputs",
176
+ type: "tuple[]",
177
+ internalType: "struct WithdrawalOutput[]",
178
+ components: [
179
+ { name: "token", type: "address", internalType: "address" },
180
+ { name: "isDelayed", type: "bool", internalType: "bool" },
181
+ { name: "amount", type: "uint256", internalType: "uint256" }
182
+ ]
183
+ },
184
+ {
185
+ name: "requestCalls",
186
+ type: "tuple[]",
187
+ internalType: "struct MultiCall[]",
188
+ components: [
189
+ { name: "target", type: "address", internalType: "address" },
190
+ { name: "callData", type: "bytes", internalType: "bytes" }
191
+ ]
192
+ },
193
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
194
+ ]
195
+ }
196
+ ],
197
+ stateMutability: "view"
198
+ },
155
199
  {
156
200
  type: "function",
157
201
  name: "getWithdrawalRequestResult",
@@ -46,6 +46,7 @@ __reExport(dev_exports, require("./resilientTransport.js"), module.exports);
46
46
  __reExport(dev_exports, require("./transports.js"), module.exports);
47
47
  __reExport(dev_exports, require("./types.js"), module.exports);
48
48
  __reExport(dev_exports, require("./verifyTestnet.js"), module.exports);
49
+ __reExport(dev_exports, require("./withdrawalUtils.js"), module.exports);
49
50
  // Annotate the CommonJS export names for ESM import in node:
50
51
  0 && (module.exports = {
51
52
  isRangeError,
@@ -71,5 +72,6 @@ __reExport(dev_exports, require("./verifyTestnet.js"), module.exports);
71
72
  ...require("./resilientTransport.js"),
72
73
  ...require("./transports.js"),
73
74
  ...require("./types.js"),
74
- ...require("./verifyTestnet.js")
75
+ ...require("./verifyTestnet.js"),
76
+ ...require("./withdrawalUtils.js")
75
77
  });