@gearbox-protocol/sdk 14.12.0-next.17 → 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 +9 -55
  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 +8 -53
  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 +3 -11
  93. package/dist/types/sdk/accounts/index.d.ts +1 -0
  94. package/dist/types/sdk/accounts/types.d.ts +4 -18
  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
@@ -1,4 +1,4 @@
1
- const iWithdrawalCompressorV312Abi = [
1
+ const iWithdrawalCompressorV313Abi = [
2
2
  {
3
3
  type: "function",
4
4
  name: "contractType",
@@ -108,6 +108,49 @@ const iWithdrawalCompressorV312Abi = [
108
108
  ],
109
109
  stateMutability: "view"
110
110
  },
111
+ {
112
+ type: "function",
113
+ name: "getWithdrawalRequestResult",
114
+ inputs: [
115
+ { name: "creditAccount", type: "address", internalType: "address" },
116
+ { name: "token", type: "address", internalType: "address" },
117
+ { name: "withdrawalToken", type: "address", internalType: "address" },
118
+ { name: "amount", type: "uint256", internalType: "uint256" },
119
+ { name: "extraData", type: "bytes", internalType: "bytes" }
120
+ ],
121
+ outputs: [
122
+ {
123
+ name: "",
124
+ type: "tuple",
125
+ internalType: "struct RequestableWithdrawal",
126
+ components: [
127
+ { name: "token", type: "address", internalType: "address" },
128
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
129
+ {
130
+ name: "outputs",
131
+ type: "tuple[]",
132
+ internalType: "struct WithdrawalOutput[]",
133
+ components: [
134
+ { name: "token", type: "address", internalType: "address" },
135
+ { name: "isDelayed", type: "bool", internalType: "bool" },
136
+ { name: "amount", type: "uint256", internalType: "uint256" }
137
+ ]
138
+ },
139
+ {
140
+ name: "requestCalls",
141
+ type: "tuple[]",
142
+ internalType: "struct MultiCall[]",
143
+ components: [
144
+ { name: "target", type: "address", internalType: "address" },
145
+ { name: "callData", type: "bytes", internalType: "bytes" }
146
+ ]
147
+ },
148
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
149
+ ]
150
+ }
151
+ ],
152
+ stateMutability: "view"
153
+ },
111
154
  {
112
155
  type: "function",
113
156
  name: "getWithdrawalRequestResult",
@@ -158,5 +201,5 @@ const iWithdrawalCompressorV312Abi = [
158
201
  }
159
202
  ];
160
203
  export {
161
- iWithdrawalCompressorV312Abi
204
+ iWithdrawalCompressorV313Abi
162
205
  };
@@ -48,7 +48,8 @@ const mellowWithdrawalSubcompressorAbi = [
48
48
  { name: "target", type: "address", internalType: "address" },
49
49
  { name: "callData", type: "bytes", internalType: "bytes" }
50
50
  ]
51
- }
51
+ },
52
+ { name: "extraData", type: "bytes", internalType: "bytes" }
52
53
  ]
53
54
  },
54
55
  {
@@ -109,6 +110,49 @@ const mellowWithdrawalSubcompressorAbi = [
109
110
  ],
110
111
  stateMutability: "view"
111
112
  },
113
+ {
114
+ type: "function",
115
+ name: "getWithdrawalRequestResult",
116
+ inputs: [
117
+ { name: "creditAccount", type: "address", internalType: "address" },
118
+ { name: "token", type: "address", internalType: "address" },
119
+ { name: "withdrawalToken", type: "address", internalType: "address" },
120
+ { name: "amount", type: "uint256", internalType: "uint256" },
121
+ { name: "", type: "bytes", internalType: "bytes" }
122
+ ],
123
+ outputs: [
124
+ {
125
+ name: "requestableWithdrawal",
126
+ type: "tuple",
127
+ internalType: "struct RequestableWithdrawal",
128
+ components: [
129
+ { name: "token", type: "address", internalType: "address" },
130
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
131
+ {
132
+ name: "outputs",
133
+ type: "tuple[]",
134
+ internalType: "struct WithdrawalOutput[]",
135
+ components: [
136
+ { name: "token", type: "address", internalType: "address" },
137
+ { name: "isDelayed", type: "bool", internalType: "bool" },
138
+ { name: "amount", type: "uint256", internalType: "uint256" }
139
+ ]
140
+ },
141
+ {
142
+ name: "requestCalls",
143
+ type: "tuple[]",
144
+ internalType: "struct MultiCall[]",
145
+ components: [
146
+ { name: "target", type: "address", internalType: "address" },
147
+ { name: "callData", type: "bytes", internalType: "bytes" }
148
+ ]
149
+ },
150
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
151
+ ]
152
+ }
153
+ ],
154
+ stateMutability: "view"
155
+ },
112
156
  {
113
157
  type: "function",
114
158
  name: "getWithdrawalRequestResult",
@@ -48,7 +48,8 @@ const midasWithdrawalSubcompressorAbi = [
48
48
  { name: "target", type: "address", internalType: "address" },
49
49
  { name: "callData", type: "bytes", internalType: "bytes" }
50
50
  ]
51
- }
51
+ },
52
+ { name: "extraData", type: "bytes", internalType: "bytes" }
52
53
  ]
53
54
  },
54
55
  {
@@ -109,6 +110,49 @@ const midasWithdrawalSubcompressorAbi = [
109
110
  ],
110
111
  stateMutability: "view"
111
112
  },
113
+ {
114
+ type: "function",
115
+ name: "getWithdrawalRequestResult",
116
+ inputs: [
117
+ { name: "creditAccount", type: "address", internalType: "address" },
118
+ { name: "token", type: "address", internalType: "address" },
119
+ { name: "withdrawalToken", type: "address", internalType: "address" },
120
+ { name: "amount", type: "uint256", internalType: "uint256" },
121
+ { name: "extraData", type: "bytes", internalType: "bytes" }
122
+ ],
123
+ outputs: [
124
+ {
125
+ name: "requestableWithdrawal",
126
+ type: "tuple",
127
+ internalType: "struct RequestableWithdrawal",
128
+ components: [
129
+ { name: "token", type: "address", internalType: "address" },
130
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
131
+ {
132
+ name: "outputs",
133
+ type: "tuple[]",
134
+ internalType: "struct WithdrawalOutput[]",
135
+ components: [
136
+ { name: "token", type: "address", internalType: "address" },
137
+ { name: "isDelayed", type: "bool", internalType: "bool" },
138
+ { name: "amount", type: "uint256", internalType: "uint256" }
139
+ ]
140
+ },
141
+ {
142
+ name: "requestCalls",
143
+ type: "tuple[]",
144
+ internalType: "struct MultiCall[]",
145
+ components: [
146
+ { name: "target", type: "address", internalType: "address" },
147
+ { name: "callData", type: "bytes", internalType: "bytes" }
148
+ ]
149
+ },
150
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
151
+ ]
152
+ }
153
+ ],
154
+ stateMutability: "view"
155
+ },
112
156
  {
113
157
  type: "function",
114
158
  name: "getWithdrawalRequestResult",
@@ -48,7 +48,8 @@ const securitizeRedemptionSubcompressorAbi = [
48
48
  { name: "target", type: "address", internalType: "address" },
49
49
  { name: "callData", type: "bytes", internalType: "bytes" }
50
50
  ]
51
- }
51
+ },
52
+ { name: "extraData", type: "bytes", internalType: "bytes" }
52
53
  ]
53
54
  },
54
55
  {
@@ -109,6 +110,49 @@ const securitizeRedemptionSubcompressorAbi = [
109
110
  ],
110
111
  stateMutability: "view"
111
112
  },
113
+ {
114
+ type: "function",
115
+ name: "getWithdrawalRequestResult",
116
+ inputs: [
117
+ { name: "creditAccount", type: "address", internalType: "address" },
118
+ { name: "token", type: "address", internalType: "address" },
119
+ { name: "withdrawalToken", type: "address", internalType: "address" },
120
+ { name: "amount", type: "uint256", internalType: "uint256" },
121
+ { name: "extraData", type: "bytes", internalType: "bytes" }
122
+ ],
123
+ outputs: [
124
+ {
125
+ name: "requestableWithdrawal",
126
+ type: "tuple",
127
+ internalType: "struct RequestableWithdrawal",
128
+ components: [
129
+ { name: "token", type: "address", internalType: "address" },
130
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
131
+ {
132
+ name: "outputs",
133
+ type: "tuple[]",
134
+ internalType: "struct WithdrawalOutput[]",
135
+ components: [
136
+ { name: "token", type: "address", internalType: "address" },
137
+ { name: "isDelayed", type: "bool", internalType: "bool" },
138
+ { name: "amount", type: "uint256", internalType: "uint256" }
139
+ ]
140
+ },
141
+ {
142
+ name: "requestCalls",
143
+ type: "tuple[]",
144
+ internalType: "struct MultiCall[]",
145
+ components: [
146
+ { name: "target", type: "address", internalType: "address" },
147
+ { name: "callData", type: "bytes", internalType: "bytes" }
148
+ ]
149
+ },
150
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
151
+ ]
152
+ }
153
+ ],
154
+ stateMutability: "view"
155
+ },
112
156
  {
113
157
  type: "function",
114
158
  name: "getWithdrawalRequestResult",
@@ -69,7 +69,8 @@ const withdrawalCompressorAbi = [
69
69
  { name: "target", type: "address", internalType: "address" },
70
70
  { name: "callData", type: "bytes", internalType: "bytes" }
71
71
  ]
72
- }
72
+ },
73
+ { name: "extraData", type: "bytes", internalType: "bytes" }
73
74
  ]
74
75
  },
75
76
  {
@@ -129,6 +130,49 @@ const withdrawalCompressorAbi = [
129
130
  ],
130
131
  stateMutability: "view"
131
132
  },
133
+ {
134
+ type: "function",
135
+ name: "getWithdrawalRequestResult",
136
+ inputs: [
137
+ { name: "creditAccount", type: "address", internalType: "address" },
138
+ { name: "token", type: "address", internalType: "address" },
139
+ { name: "withdrawalToken", type: "address", internalType: "address" },
140
+ { name: "amount", type: "uint256", internalType: "uint256" },
141
+ { name: "extraData", type: "bytes", internalType: "bytes" }
142
+ ],
143
+ outputs: [
144
+ {
145
+ name: "withdrawal",
146
+ type: "tuple",
147
+ internalType: "struct RequestableWithdrawal",
148
+ components: [
149
+ { name: "token", type: "address", internalType: "address" },
150
+ { name: "amountIn", type: "uint256", internalType: "uint256" },
151
+ {
152
+ name: "outputs",
153
+ type: "tuple[]",
154
+ internalType: "struct WithdrawalOutput[]",
155
+ components: [
156
+ { name: "token", type: "address", internalType: "address" },
157
+ { name: "isDelayed", type: "bool", internalType: "bool" },
158
+ { name: "amount", type: "uint256", internalType: "uint256" }
159
+ ]
160
+ },
161
+ {
162
+ name: "requestCalls",
163
+ type: "tuple[]",
164
+ internalType: "struct MultiCall[]",
165
+ components: [
166
+ { name: "target", type: "address", internalType: "address" },
167
+ { name: "callData", type: "bytes", internalType: "bytes" }
168
+ ]
169
+ },
170
+ { name: "claimableAt", type: "uint256", internalType: "uint256" }
171
+ ]
172
+ }
173
+ ],
174
+ stateMutability: "view"
175
+ },
132
176
  {
133
177
  type: "function",
134
178
  name: "getWithdrawalRequestResult",
@@ -24,6 +24,7 @@ export * from "./resilientTransport.js";
24
24
  export * from "./transports.js";
25
25
  export * from "./types.js";
26
26
  export * from "./verifyTestnet.js";
27
+ export * from "./withdrawalUtils.js";
27
28
  export {
28
29
  isRangeError,
29
30
  logSplitterTransport