@coinbase/cdp-sdk 1.29.0 → 1.31.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.
Files changed (198) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/_cjs/accounts/evm/networkCapabilities.js +101 -0
  3. package/_cjs/accounts/evm/networkCapabilities.js.map +1 -1
  4. package/_cjs/accounts/evm/toEvmServerAccount.js +11 -0
  5. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  6. package/_cjs/accounts/evm/toEvmSmartAccount.js +11 -0
  7. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  8. package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +10 -0
  9. package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  10. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +10 -0
  11. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  12. package/_cjs/accounts/solana/toSolanaAccount.js +11 -1
  13. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  14. package/_cjs/actions/evm/getUserOperation.js +1 -0
  15. package/_cjs/actions/evm/getUserOperation.js.map +1 -1
  16. package/_cjs/actions/evm/spend-permissions/account.use.js +33 -0
  17. package/_cjs/actions/evm/spend-permissions/account.use.js.map +1 -0
  18. package/_cjs/actions/evm/spend-permissions/smartAccount.use.js +35 -0
  19. package/_cjs/actions/evm/spend-permissions/smartAccount.use.js.map +1 -0
  20. package/_cjs/actions/evm/spend-permissions/types.js +3 -0
  21. package/_cjs/actions/evm/spend-permissions/types.js.map +1 -0
  22. package/_cjs/actions/solana/sendTransaction.js +1 -0
  23. package/_cjs/actions/solana/sendTransaction.js.map +1 -1
  24. package/_cjs/actions/solana/signTransaction.js +1 -0
  25. package/_cjs/actions/solana/signTransaction.js.map +1 -1
  26. package/_cjs/auth/hooks/axios/withAuth.js +3 -0
  27. package/_cjs/auth/hooks/axios/withAuth.js.map +1 -1
  28. package/_cjs/auth/utils/http.js +2 -1
  29. package/_cjs/auth/utils/http.js.map +1 -1
  30. package/_cjs/client/evm/evm.js +51 -1
  31. package/_cjs/client/evm/evm.js.map +1 -1
  32. package/_cjs/client/solana/solana.js.map +1 -1
  33. package/_cjs/index.js +5 -1
  34. package/_cjs/index.js.map +1 -1
  35. package/_cjs/openapi-client/cdpApiClient.js +37 -0
  36. package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
  37. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +29 -2
  38. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  39. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +35 -1
  40. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  41. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +160 -1
  42. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
  43. package/_cjs/openapi-client/generated/index.msw.js +1 -0
  44. package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
  45. package/_cjs/openapi-client/generated/onramp/onramp.js +30 -0
  46. package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -0
  47. package/_cjs/openapi-client/generated/onramp/onramp.msw.js +98 -0
  48. package/_cjs/openapi-client/generated/onramp/onramp.msw.js.map +1 -0
  49. package/_cjs/openapi-client/index.js +1 -0
  50. package/_cjs/openapi-client/index.js.map +1 -1
  51. package/_cjs/spend-permissions/constants.js +716 -0
  52. package/_cjs/spend-permissions/constants.js.map +1 -0
  53. package/_cjs/spend-permissions/types.js +3 -0
  54. package/_cjs/spend-permissions/types.js.map +1 -0
  55. package/_cjs/version.js +1 -1
  56. package/_esm/accounts/evm/networkCapabilities.js +101 -0
  57. package/_esm/accounts/evm/networkCapabilities.js.map +1 -1
  58. package/_esm/accounts/evm/toEvmServerAccount.js +11 -0
  59. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  60. package/_esm/accounts/evm/toEvmSmartAccount.js +11 -0
  61. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  62. package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +10 -0
  63. package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  64. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +10 -0
  65. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  66. package/_esm/accounts/solana/toSolanaAccount.js +11 -1
  67. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  68. package/_esm/actions/evm/getUserOperation.js +1 -0
  69. package/_esm/actions/evm/getUserOperation.js.map +1 -1
  70. package/_esm/actions/evm/spend-permissions/account.use.js +30 -0
  71. package/_esm/actions/evm/spend-permissions/account.use.js.map +1 -0
  72. package/_esm/actions/evm/spend-permissions/smartAccount.use.js +32 -0
  73. package/_esm/actions/evm/spend-permissions/smartAccount.use.js.map +1 -0
  74. package/_esm/actions/evm/spend-permissions/types.js +2 -0
  75. package/_esm/actions/evm/spend-permissions/types.js.map +1 -0
  76. package/_esm/actions/solana/sendTransaction.js +1 -0
  77. package/_esm/actions/solana/sendTransaction.js.map +1 -1
  78. package/_esm/actions/solana/signTransaction.js +1 -0
  79. package/_esm/actions/solana/signTransaction.js.map +1 -1
  80. package/_esm/auth/hooks/axios/withAuth.js +3 -0
  81. package/_esm/auth/hooks/axios/withAuth.js.map +1 -1
  82. package/_esm/auth/utils/http.js +2 -1
  83. package/_esm/auth/utils/http.js.map +1 -1
  84. package/_esm/client/evm/evm.js +51 -1
  85. package/_esm/client/evm/evm.js.map +1 -1
  86. package/_esm/client/solana/solana.js +2 -2
  87. package/_esm/client/solana/solana.js.map +1 -1
  88. package/_esm/index.js +2 -1
  89. package/_esm/index.js.map +1 -1
  90. package/_esm/openapi-client/cdpApiClient.js +4 -0
  91. package/_esm/openapi-client/cdpApiClient.js.map +1 -1
  92. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +28 -1
  93. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  94. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +31 -0
  95. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  96. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +153 -0
  97. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
  98. package/_esm/openapi-client/generated/index.msw.js +1 -0
  99. package/_esm/openapi-client/generated/index.msw.js.map +1 -1
  100. package/_esm/openapi-client/generated/onramp/onramp.js +25 -0
  101. package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -0
  102. package/_esm/openapi-client/generated/onramp/onramp.msw.js +90 -0
  103. package/_esm/openapi-client/generated/onramp/onramp.msw.js.map +1 -0
  104. package/_esm/openapi-client/index.js +1 -0
  105. package/_esm/openapi-client/index.js.map +1 -1
  106. package/_esm/spend-permissions/constants.js +713 -0
  107. package/_esm/spend-permissions/constants.js.map +1 -0
  108. package/_esm/spend-permissions/types.js +2 -0
  109. package/_esm/spend-permissions/types.js.map +1 -0
  110. package/_esm/version.js +1 -1
  111. package/_types/accounts/evm/networkCapabilities.d.ts +101 -0
  112. package/_types/accounts/evm/networkCapabilities.d.ts.map +1 -1
  113. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  114. package/_types/accounts/evm/toEvmSmartAccount.d.ts +1 -1
  115. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  116. package/_types/accounts/evm/toNetworkScopedEvmServerAccount.d.ts.map +1 -1
  117. package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
  118. package/_types/accounts/evm/types.d.ts +6 -0
  119. package/_types/accounts/evm/types.d.ts.map +1 -1
  120. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  121. package/_types/actions/evm/getUserOperation.d.ts.map +1 -1
  122. package/_types/actions/evm/spend-permissions/account.use.d.ts +15 -0
  123. package/_types/actions/evm/spend-permissions/account.use.d.ts.map +1 -0
  124. package/_types/actions/evm/spend-permissions/smartAccount.use.d.ts +15 -0
  125. package/_types/actions/evm/spend-permissions/smartAccount.use.d.ts.map +1 -0
  126. package/_types/actions/evm/spend-permissions/types.d.ts +13 -0
  127. package/_types/actions/evm/spend-permissions/types.d.ts.map +1 -0
  128. package/_types/actions/evm/types.d.ts +75 -0
  129. package/_types/actions/evm/types.d.ts.map +1 -1
  130. package/_types/actions/solana/sendTransaction.d.ts +8 -2
  131. package/_types/actions/solana/sendTransaction.d.ts.map +1 -1
  132. package/_types/actions/solana/signTransaction.d.ts +8 -2
  133. package/_types/actions/solana/signTransaction.d.ts.map +1 -1
  134. package/_types/actions/solana/types.d.ts +38 -3
  135. package/_types/actions/solana/types.d.ts.map +1 -1
  136. package/_types/auth/hooks/axios/withAuth.d.ts.map +1 -1
  137. package/_types/auth/utils/http.d.ts.map +1 -1
  138. package/_types/client/evm/evm.d.ts +19 -1
  139. package/_types/client/evm/evm.d.ts.map +1 -1
  140. package/_types/client/evm/evm.types.d.ts +49 -2
  141. package/_types/client/evm/evm.types.d.ts.map +1 -1
  142. package/_types/client/solana/solana.d.ts +5 -3
  143. package/_types/client/solana/solana.d.ts.map +1 -1
  144. package/_types/index.d.ts +3 -1
  145. package/_types/index.d.ts.map +1 -1
  146. package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
  147. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +269 -5
  148. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  149. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +19 -1
  150. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  151. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts +7 -1
  152. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts.map +1 -1
  153. package/_types/openapi-client/generated/index.msw.d.ts +1 -0
  154. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
  155. package/_types/openapi-client/generated/onramp/onramp.d.ts +28 -0
  156. package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -0
  157. package/_types/openapi-client/generated/onramp/onramp.msw.d.ts +8 -0
  158. package/_types/openapi-client/generated/onramp/onramp.msw.d.ts.map +1 -0
  159. package/_types/openapi-client/index.d.ts +7 -0
  160. package/_types/openapi-client/index.d.ts.map +1 -1
  161. package/_types/spend-permissions/constants.d.ts +1357 -0
  162. package/_types/spend-permissions/constants.d.ts.map +1 -0
  163. package/_types/spend-permissions/types.d.ts +30 -0
  164. package/_types/spend-permissions/types.d.ts.map +1 -0
  165. package/_types/version.d.ts +1 -1
  166. package/accounts/evm/networkCapabilities.ts +101 -0
  167. package/accounts/evm/toEvmServerAccount.ts +15 -0
  168. package/accounts/evm/toEvmSmartAccount.ts +19 -4
  169. package/accounts/evm/toNetworkScopedEvmServerAccount.ts +15 -0
  170. package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +15 -0
  171. package/accounts/evm/types.ts +18 -0
  172. package/accounts/solana/toSolanaAccount.ts +17 -3
  173. package/actions/evm/getUserOperation.ts +1 -0
  174. package/actions/evm/spend-permissions/account.use.ts +48 -0
  175. package/actions/evm/spend-permissions/smartAccount.use.ts +49 -0
  176. package/actions/evm/spend-permissions/types.ts +13 -0
  177. package/actions/evm/types.ts +81 -0
  178. package/actions/solana/sendTransaction.ts +10 -2
  179. package/actions/solana/signTransaction.ts +10 -2
  180. package/actions/solana/types.ts +44 -2
  181. package/auth/hooks/axios/withAuth.ts +3 -0
  182. package/auth/utils/http.ts +2 -1
  183. package/client/evm/evm.ts +61 -1
  184. package/client/evm/evm.types.ts +55 -0
  185. package/client/solana/solana.ts +10 -5
  186. package/index.ts +6 -1
  187. package/openapi-client/cdpApiClient.ts +5 -0
  188. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +300 -5
  189. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.ts +203 -0
  190. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +65 -0
  191. package/openapi-client/generated/index.msw.ts +1 -0
  192. package/openapi-client/generated/onramp/onramp.msw.ts +135 -0
  193. package/openapi-client/generated/onramp/onramp.ts +54 -0
  194. package/openapi-client/index.ts +1 -0
  195. package/package.json +2 -1
  196. package/spend-permissions/constants.ts +713 -0
  197. package/spend-permissions/types.ts +42 -0
  198. package/version.ts +1 -1
@@ -0,0 +1,716 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SPEND_PERMISSION_MANAGER_ABI = exports.SPEND_PERMISSION_MANAGER_ADDRESS = void 0;
4
+ exports.SPEND_PERMISSION_MANAGER_ADDRESS = "0xf85210B21cC50302F477BA56686d2019dC9b67Ad";
5
+ exports.SPEND_PERMISSION_MANAGER_ABI = [
6
+ {
7
+ inputs: [
8
+ {
9
+ internalType: "contract PublicERC6492Validator",
10
+ name: "publicERC6492Validator",
11
+ type: "address",
12
+ },
13
+ { internalType: "address", name: "magicSpend", type: "address" },
14
+ ],
15
+ stateMutability: "nonpayable",
16
+ type: "constructor",
17
+ },
18
+ {
19
+ inputs: [
20
+ { internalType: "uint48", name: "currentTimestamp", type: "uint48" },
21
+ { internalType: "uint48", name: "end", type: "uint48" },
22
+ ],
23
+ name: "AfterSpendPermissionEnd",
24
+ type: "error",
25
+ },
26
+ {
27
+ inputs: [
28
+ { internalType: "uint48", name: "currentTimestamp", type: "uint48" },
29
+ { internalType: "uint48", name: "start", type: "uint48" },
30
+ ],
31
+ name: "BeforeSpendPermissionStart",
32
+ type: "error",
33
+ },
34
+ {
35
+ inputs: [{ internalType: "address", name: "token", type: "address" }],
36
+ name: "ERC721TokenNotSupported",
37
+ type: "error",
38
+ },
39
+ { inputs: [], name: "EmptySpendPermissionBatch", type: "error" },
40
+ {
41
+ inputs: [
42
+ { internalType: "uint256", name: "value", type: "uint256" },
43
+ { internalType: "uint256", name: "allowance", type: "uint256" },
44
+ ],
45
+ name: "ExceededSpendPermission",
46
+ type: "error",
47
+ },
48
+ {
49
+ inputs: [
50
+ {
51
+ components: [
52
+ { internalType: "uint48", name: "start", type: "uint48" },
53
+ { internalType: "uint48", name: "end", type: "uint48" },
54
+ { internalType: "uint160", name: "spend", type: "uint160" },
55
+ ],
56
+ internalType: "struct SpendPermissionManager.PeriodSpend",
57
+ name: "actualLastUpdatedPeriod",
58
+ type: "tuple",
59
+ },
60
+ {
61
+ components: [
62
+ { internalType: "uint48", name: "start", type: "uint48" },
63
+ { internalType: "uint48", name: "end", type: "uint48" },
64
+ { internalType: "uint160", name: "spend", type: "uint160" },
65
+ ],
66
+ internalType: "struct SpendPermissionManager.PeriodSpend",
67
+ name: "expectedLastUpdatedPeriod",
68
+ type: "tuple",
69
+ },
70
+ ],
71
+ name: "InvalidLastUpdatedPeriod",
72
+ type: "error",
73
+ },
74
+ {
75
+ inputs: [
76
+ { internalType: "address", name: "sender", type: "address" },
77
+ { internalType: "address", name: "expected", type: "address" },
78
+ ],
79
+ name: "InvalidSender",
80
+ type: "error",
81
+ },
82
+ { inputs: [], name: "InvalidSignature", type: "error" },
83
+ {
84
+ inputs: [
85
+ { internalType: "uint48", name: "start", type: "uint48" },
86
+ { internalType: "uint48", name: "end", type: "uint48" },
87
+ ],
88
+ name: "InvalidStartEnd",
89
+ type: "error",
90
+ },
91
+ {
92
+ inputs: [
93
+ { internalType: "uint128", name: "noncePostfix", type: "uint128" },
94
+ { internalType: "uint128", name: "permissionHashPostfix", type: "uint128" },
95
+ ],
96
+ name: "InvalidWithdrawRequestNonce",
97
+ type: "error",
98
+ },
99
+ {
100
+ inputs: [
101
+ { internalType: "address", name: "firstAccount", type: "address" },
102
+ { internalType: "address", name: "secondAccount", type: "address" },
103
+ ],
104
+ name: "MismatchedAccounts",
105
+ type: "error",
106
+ },
107
+ {
108
+ inputs: [{ internalType: "address", name: "token", type: "address" }],
109
+ name: "SafeERC20FailedOperation",
110
+ type: "error",
111
+ },
112
+ {
113
+ inputs: [
114
+ { internalType: "address", name: "spendToken", type: "address" },
115
+ { internalType: "address", name: "withdrawAsset", type: "address" },
116
+ ],
117
+ name: "SpendTokenWithdrawAssetMismatch",
118
+ type: "error",
119
+ },
120
+ {
121
+ inputs: [{ internalType: "uint256", name: "value", type: "uint256" }],
122
+ name: "SpendValueOverflow",
123
+ type: "error",
124
+ },
125
+ {
126
+ inputs: [
127
+ { internalType: "uint256", name: "spendValue", type: "uint256" },
128
+ { internalType: "uint256", name: "withdrawAmount", type: "uint256" },
129
+ ],
130
+ name: "SpendValueWithdrawAmountMismatch",
131
+ type: "error",
132
+ },
133
+ { inputs: [], name: "UnauthorizedSpendPermission", type: "error" },
134
+ {
135
+ inputs: [
136
+ { internalType: "uint256", name: "received", type: "uint256" },
137
+ { internalType: "uint256", name: "expected", type: "uint256" },
138
+ ],
139
+ name: "UnexpectedReceiveAmount",
140
+ type: "error",
141
+ },
142
+ { inputs: [], name: "ZeroAllowance", type: "error" },
143
+ { inputs: [], name: "ZeroPeriod", type: "error" },
144
+ { inputs: [], name: "ZeroSpender", type: "error" },
145
+ { inputs: [], name: "ZeroToken", type: "error" },
146
+ { inputs: [], name: "ZeroValue", type: "error" },
147
+ {
148
+ anonymous: false,
149
+ inputs: [
150
+ { indexed: true, internalType: "bytes32", name: "hash", type: "bytes32" },
151
+ {
152
+ components: [
153
+ { internalType: "address", name: "account", type: "address" },
154
+ { internalType: "address", name: "spender", type: "address" },
155
+ { internalType: "address", name: "token", type: "address" },
156
+ { internalType: "uint160", name: "allowance", type: "uint160" },
157
+ { internalType: "uint48", name: "period", type: "uint48" },
158
+ { internalType: "uint48", name: "start", type: "uint48" },
159
+ { internalType: "uint48", name: "end", type: "uint48" },
160
+ { internalType: "uint256", name: "salt", type: "uint256" },
161
+ { internalType: "bytes", name: "extraData", type: "bytes" },
162
+ ],
163
+ indexed: false,
164
+ internalType: "struct SpendPermissionManager.SpendPermission",
165
+ name: "spendPermission",
166
+ type: "tuple",
167
+ },
168
+ ],
169
+ name: "SpendPermissionApproved",
170
+ type: "event",
171
+ },
172
+ {
173
+ anonymous: false,
174
+ inputs: [
175
+ { indexed: true, internalType: "bytes32", name: "hash", type: "bytes32" },
176
+ {
177
+ components: [
178
+ { internalType: "address", name: "account", type: "address" },
179
+ { internalType: "address", name: "spender", type: "address" },
180
+ { internalType: "address", name: "token", type: "address" },
181
+ { internalType: "uint160", name: "allowance", type: "uint160" },
182
+ { internalType: "uint48", name: "period", type: "uint48" },
183
+ { internalType: "uint48", name: "start", type: "uint48" },
184
+ { internalType: "uint48", name: "end", type: "uint48" },
185
+ { internalType: "uint256", name: "salt", type: "uint256" },
186
+ { internalType: "bytes", name: "extraData", type: "bytes" },
187
+ ],
188
+ indexed: false,
189
+ internalType: "struct SpendPermissionManager.SpendPermission",
190
+ name: "spendPermission",
191
+ type: "tuple",
192
+ },
193
+ ],
194
+ name: "SpendPermissionRevoked",
195
+ type: "event",
196
+ },
197
+ {
198
+ anonymous: false,
199
+ inputs: [
200
+ { indexed: true, internalType: "bytes32", name: "hash", type: "bytes32" },
201
+ { indexed: true, internalType: "address", name: "account", type: "address" },
202
+ { indexed: true, internalType: "address", name: "spender", type: "address" },
203
+ { indexed: false, internalType: "address", name: "token", type: "address" },
204
+ {
205
+ components: [
206
+ { internalType: "uint48", name: "start", type: "uint48" },
207
+ { internalType: "uint48", name: "end", type: "uint48" },
208
+ { internalType: "uint160", name: "spend", type: "uint160" },
209
+ ],
210
+ indexed: false,
211
+ internalType: "struct SpendPermissionManager.PeriodSpend",
212
+ name: "periodSpend",
213
+ type: "tuple",
214
+ },
215
+ ],
216
+ name: "SpendPermissionUsed",
217
+ type: "event",
218
+ },
219
+ {
220
+ inputs: [],
221
+ name: "MAGIC_SPEND",
222
+ outputs: [{ internalType: "address", name: "", type: "address" }],
223
+ stateMutability: "view",
224
+ type: "function",
225
+ },
226
+ {
227
+ inputs: [],
228
+ name: "NATIVE_TOKEN",
229
+ outputs: [{ internalType: "address", name: "", type: "address" }],
230
+ stateMutability: "view",
231
+ type: "function",
232
+ },
233
+ {
234
+ inputs: [],
235
+ name: "PERMISSION_DETAILS_TYPEHASH",
236
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
237
+ stateMutability: "view",
238
+ type: "function",
239
+ },
240
+ {
241
+ inputs: [],
242
+ name: "PUBLIC_ERC6492_VALIDATOR",
243
+ outputs: [{ internalType: "contract PublicERC6492Validator", name: "", type: "address" }],
244
+ stateMutability: "view",
245
+ type: "function",
246
+ },
247
+ {
248
+ inputs: [],
249
+ name: "SPEND_PERMISSION_BATCH_TYPEHASH",
250
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
251
+ stateMutability: "view",
252
+ type: "function",
253
+ },
254
+ {
255
+ inputs: [],
256
+ name: "SPEND_PERMISSION_TYPEHASH",
257
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
258
+ stateMutability: "view",
259
+ type: "function",
260
+ },
261
+ {
262
+ inputs: [
263
+ {
264
+ components: [
265
+ { internalType: "address", name: "account", type: "address" },
266
+ { internalType: "address", name: "spender", type: "address" },
267
+ { internalType: "address", name: "token", type: "address" },
268
+ { internalType: "uint160", name: "allowance", type: "uint160" },
269
+ { internalType: "uint48", name: "period", type: "uint48" },
270
+ { internalType: "uint48", name: "start", type: "uint48" },
271
+ { internalType: "uint48", name: "end", type: "uint48" },
272
+ { internalType: "uint256", name: "salt", type: "uint256" },
273
+ { internalType: "bytes", name: "extraData", type: "bytes" },
274
+ ],
275
+ internalType: "struct SpendPermissionManager.SpendPermission",
276
+ name: "spendPermission",
277
+ type: "tuple",
278
+ },
279
+ ],
280
+ name: "approve",
281
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
282
+ stateMutability: "nonpayable",
283
+ type: "function",
284
+ },
285
+ {
286
+ inputs: [
287
+ {
288
+ components: [
289
+ { internalType: "address", name: "account", type: "address" },
290
+ { internalType: "uint48", name: "period", type: "uint48" },
291
+ { internalType: "uint48", name: "start", type: "uint48" },
292
+ { internalType: "uint48", name: "end", type: "uint48" },
293
+ {
294
+ components: [
295
+ { internalType: "address", name: "spender", type: "address" },
296
+ { internalType: "address", name: "token", type: "address" },
297
+ { internalType: "uint160", name: "allowance", type: "uint160" },
298
+ { internalType: "uint256", name: "salt", type: "uint256" },
299
+ { internalType: "bytes", name: "extraData", type: "bytes" },
300
+ ],
301
+ internalType: "struct SpendPermissionManager.PermissionDetails[]",
302
+ name: "permissions",
303
+ type: "tuple[]",
304
+ },
305
+ ],
306
+ internalType: "struct SpendPermissionManager.SpendPermissionBatch",
307
+ name: "spendPermissionBatch",
308
+ type: "tuple",
309
+ },
310
+ { internalType: "bytes", name: "signature", type: "bytes" },
311
+ ],
312
+ name: "approveBatchWithSignature",
313
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
314
+ stateMutability: "nonpayable",
315
+ type: "function",
316
+ },
317
+ {
318
+ inputs: [
319
+ {
320
+ components: [
321
+ { internalType: "address", name: "account", type: "address" },
322
+ { internalType: "address", name: "spender", type: "address" },
323
+ { internalType: "address", name: "token", type: "address" },
324
+ { internalType: "uint160", name: "allowance", type: "uint160" },
325
+ { internalType: "uint48", name: "period", type: "uint48" },
326
+ { internalType: "uint48", name: "start", type: "uint48" },
327
+ { internalType: "uint48", name: "end", type: "uint48" },
328
+ { internalType: "uint256", name: "salt", type: "uint256" },
329
+ { internalType: "bytes", name: "extraData", type: "bytes" },
330
+ ],
331
+ internalType: "struct SpendPermissionManager.SpendPermission",
332
+ name: "permissionToApprove",
333
+ type: "tuple",
334
+ },
335
+ {
336
+ components: [
337
+ { internalType: "address", name: "account", type: "address" },
338
+ { internalType: "address", name: "spender", type: "address" },
339
+ { internalType: "address", name: "token", type: "address" },
340
+ { internalType: "uint160", name: "allowance", type: "uint160" },
341
+ { internalType: "uint48", name: "period", type: "uint48" },
342
+ { internalType: "uint48", name: "start", type: "uint48" },
343
+ { internalType: "uint48", name: "end", type: "uint48" },
344
+ { internalType: "uint256", name: "salt", type: "uint256" },
345
+ { internalType: "bytes", name: "extraData", type: "bytes" },
346
+ ],
347
+ internalType: "struct SpendPermissionManager.SpendPermission",
348
+ name: "permissionToRevoke",
349
+ type: "tuple",
350
+ },
351
+ {
352
+ components: [
353
+ { internalType: "uint48", name: "start", type: "uint48" },
354
+ { internalType: "uint48", name: "end", type: "uint48" },
355
+ { internalType: "uint160", name: "spend", type: "uint160" },
356
+ ],
357
+ internalType: "struct SpendPermissionManager.PeriodSpend",
358
+ name: "expectedLastUpdatedPeriod",
359
+ type: "tuple",
360
+ },
361
+ ],
362
+ name: "approveWithRevoke",
363
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
364
+ stateMutability: "nonpayable",
365
+ type: "function",
366
+ },
367
+ {
368
+ inputs: [
369
+ {
370
+ components: [
371
+ { internalType: "address", name: "account", type: "address" },
372
+ { internalType: "address", name: "spender", type: "address" },
373
+ { internalType: "address", name: "token", type: "address" },
374
+ { internalType: "uint160", name: "allowance", type: "uint160" },
375
+ { internalType: "uint48", name: "period", type: "uint48" },
376
+ { internalType: "uint48", name: "start", type: "uint48" },
377
+ { internalType: "uint48", name: "end", type: "uint48" },
378
+ { internalType: "uint256", name: "salt", type: "uint256" },
379
+ { internalType: "bytes", name: "extraData", type: "bytes" },
380
+ ],
381
+ internalType: "struct SpendPermissionManager.SpendPermission",
382
+ name: "spendPermission",
383
+ type: "tuple",
384
+ },
385
+ { internalType: "bytes", name: "signature", type: "bytes" },
386
+ ],
387
+ name: "approveWithSignature",
388
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
389
+ stateMutability: "nonpayable",
390
+ type: "function",
391
+ },
392
+ {
393
+ inputs: [],
394
+ name: "eip712Domain",
395
+ outputs: [
396
+ { internalType: "bytes1", name: "fields", type: "bytes1" },
397
+ { internalType: "string", name: "name", type: "string" },
398
+ { internalType: "string", name: "version", type: "string" },
399
+ { internalType: "uint256", name: "chainId", type: "uint256" },
400
+ { internalType: "address", name: "verifyingContract", type: "address" },
401
+ { internalType: "bytes32", name: "salt", type: "bytes32" },
402
+ { internalType: "uint256[]", name: "extensions", type: "uint256[]" },
403
+ ],
404
+ stateMutability: "view",
405
+ type: "function",
406
+ },
407
+ {
408
+ inputs: [
409
+ {
410
+ components: [
411
+ { internalType: "address", name: "account", type: "address" },
412
+ { internalType: "uint48", name: "period", type: "uint48" },
413
+ { internalType: "uint48", name: "start", type: "uint48" },
414
+ { internalType: "uint48", name: "end", type: "uint48" },
415
+ {
416
+ components: [
417
+ { internalType: "address", name: "spender", type: "address" },
418
+ { internalType: "address", name: "token", type: "address" },
419
+ { internalType: "uint160", name: "allowance", type: "uint160" },
420
+ { internalType: "uint256", name: "salt", type: "uint256" },
421
+ { internalType: "bytes", name: "extraData", type: "bytes" },
422
+ ],
423
+ internalType: "struct SpendPermissionManager.PermissionDetails[]",
424
+ name: "permissions",
425
+ type: "tuple[]",
426
+ },
427
+ ],
428
+ internalType: "struct SpendPermissionManager.SpendPermissionBatch",
429
+ name: "spendPermissionBatch",
430
+ type: "tuple",
431
+ },
432
+ ],
433
+ name: "getBatchHash",
434
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
435
+ stateMutability: "view",
436
+ type: "function",
437
+ },
438
+ {
439
+ inputs: [
440
+ {
441
+ components: [
442
+ { internalType: "address", name: "account", type: "address" },
443
+ { internalType: "address", name: "spender", type: "address" },
444
+ { internalType: "address", name: "token", type: "address" },
445
+ { internalType: "uint160", name: "allowance", type: "uint160" },
446
+ { internalType: "uint48", name: "period", type: "uint48" },
447
+ { internalType: "uint48", name: "start", type: "uint48" },
448
+ { internalType: "uint48", name: "end", type: "uint48" },
449
+ { internalType: "uint256", name: "salt", type: "uint256" },
450
+ { internalType: "bytes", name: "extraData", type: "bytes" },
451
+ ],
452
+ internalType: "struct SpendPermissionManager.SpendPermission",
453
+ name: "spendPermission",
454
+ type: "tuple",
455
+ },
456
+ ],
457
+ name: "getCurrentPeriod",
458
+ outputs: [
459
+ {
460
+ components: [
461
+ { internalType: "uint48", name: "start", type: "uint48" },
462
+ { internalType: "uint48", name: "end", type: "uint48" },
463
+ { internalType: "uint160", name: "spend", type: "uint160" },
464
+ ],
465
+ internalType: "struct SpendPermissionManager.PeriodSpend",
466
+ name: "",
467
+ type: "tuple",
468
+ },
469
+ ],
470
+ stateMutability: "view",
471
+ type: "function",
472
+ },
473
+ {
474
+ inputs: [
475
+ {
476
+ components: [
477
+ { internalType: "address", name: "account", type: "address" },
478
+ { internalType: "address", name: "spender", type: "address" },
479
+ { internalType: "address", name: "token", type: "address" },
480
+ { internalType: "uint160", name: "allowance", type: "uint160" },
481
+ { internalType: "uint48", name: "period", type: "uint48" },
482
+ { internalType: "uint48", name: "start", type: "uint48" },
483
+ { internalType: "uint48", name: "end", type: "uint48" },
484
+ { internalType: "uint256", name: "salt", type: "uint256" },
485
+ { internalType: "bytes", name: "extraData", type: "bytes" },
486
+ ],
487
+ internalType: "struct SpendPermissionManager.SpendPermission",
488
+ name: "spendPermission",
489
+ type: "tuple",
490
+ },
491
+ ],
492
+ name: "getHash",
493
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
494
+ stateMutability: "view",
495
+ type: "function",
496
+ },
497
+ {
498
+ inputs: [
499
+ {
500
+ components: [
501
+ { internalType: "address", name: "account", type: "address" },
502
+ { internalType: "address", name: "spender", type: "address" },
503
+ { internalType: "address", name: "token", type: "address" },
504
+ { internalType: "uint160", name: "allowance", type: "uint160" },
505
+ { internalType: "uint48", name: "period", type: "uint48" },
506
+ { internalType: "uint48", name: "start", type: "uint48" },
507
+ { internalType: "uint48", name: "end", type: "uint48" },
508
+ { internalType: "uint256", name: "salt", type: "uint256" },
509
+ { internalType: "bytes", name: "extraData", type: "bytes" },
510
+ ],
511
+ internalType: "struct SpendPermissionManager.SpendPermission",
512
+ name: "spendPermission",
513
+ type: "tuple",
514
+ },
515
+ ],
516
+ name: "getLastUpdatedPeriod",
517
+ outputs: [
518
+ {
519
+ components: [
520
+ { internalType: "uint48", name: "start", type: "uint48" },
521
+ { internalType: "uint48", name: "end", type: "uint48" },
522
+ { internalType: "uint160", name: "spend", type: "uint160" },
523
+ ],
524
+ internalType: "struct SpendPermissionManager.PeriodSpend",
525
+ name: "",
526
+ type: "tuple",
527
+ },
528
+ ],
529
+ stateMutability: "view",
530
+ type: "function",
531
+ },
532
+ {
533
+ inputs: [
534
+ {
535
+ components: [
536
+ { internalType: "address", name: "account", type: "address" },
537
+ { internalType: "address", name: "spender", type: "address" },
538
+ { internalType: "address", name: "token", type: "address" },
539
+ { internalType: "uint160", name: "allowance", type: "uint160" },
540
+ { internalType: "uint48", name: "period", type: "uint48" },
541
+ { internalType: "uint48", name: "start", type: "uint48" },
542
+ { internalType: "uint48", name: "end", type: "uint48" },
543
+ { internalType: "uint256", name: "salt", type: "uint256" },
544
+ { internalType: "bytes", name: "extraData", type: "bytes" },
545
+ ],
546
+ internalType: "struct SpendPermissionManager.SpendPermission",
547
+ name: "spendPermission",
548
+ type: "tuple",
549
+ },
550
+ ],
551
+ name: "isApproved",
552
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
553
+ stateMutability: "view",
554
+ type: "function",
555
+ },
556
+ {
557
+ inputs: [
558
+ {
559
+ components: [
560
+ { internalType: "address", name: "account", type: "address" },
561
+ { internalType: "address", name: "spender", type: "address" },
562
+ { internalType: "address", name: "token", type: "address" },
563
+ { internalType: "uint160", name: "allowance", type: "uint160" },
564
+ { internalType: "uint48", name: "period", type: "uint48" },
565
+ { internalType: "uint48", name: "start", type: "uint48" },
566
+ { internalType: "uint48", name: "end", type: "uint48" },
567
+ { internalType: "uint256", name: "salt", type: "uint256" },
568
+ { internalType: "bytes", name: "extraData", type: "bytes" },
569
+ ],
570
+ internalType: "struct SpendPermissionManager.SpendPermission",
571
+ name: "spendPermission",
572
+ type: "tuple",
573
+ },
574
+ ],
575
+ name: "isRevoked",
576
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
577
+ stateMutability: "view",
578
+ type: "function",
579
+ },
580
+ {
581
+ inputs: [
582
+ {
583
+ components: [
584
+ { internalType: "address", name: "account", type: "address" },
585
+ { internalType: "address", name: "spender", type: "address" },
586
+ { internalType: "address", name: "token", type: "address" },
587
+ { internalType: "uint160", name: "allowance", type: "uint160" },
588
+ { internalType: "uint48", name: "period", type: "uint48" },
589
+ { internalType: "uint48", name: "start", type: "uint48" },
590
+ { internalType: "uint48", name: "end", type: "uint48" },
591
+ { internalType: "uint256", name: "salt", type: "uint256" },
592
+ { internalType: "bytes", name: "extraData", type: "bytes" },
593
+ ],
594
+ internalType: "struct SpendPermissionManager.SpendPermission",
595
+ name: "spendPermission",
596
+ type: "tuple",
597
+ },
598
+ ],
599
+ name: "isValid",
600
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
601
+ stateMutability: "view",
602
+ type: "function",
603
+ },
604
+ {
605
+ inputs: [
606
+ {
607
+ components: [
608
+ { internalType: "address", name: "account", type: "address" },
609
+ { internalType: "address", name: "spender", type: "address" },
610
+ { internalType: "address", name: "token", type: "address" },
611
+ { internalType: "uint160", name: "allowance", type: "uint160" },
612
+ { internalType: "uint48", name: "period", type: "uint48" },
613
+ { internalType: "uint48", name: "start", type: "uint48" },
614
+ { internalType: "uint48", name: "end", type: "uint48" },
615
+ { internalType: "uint256", name: "salt", type: "uint256" },
616
+ { internalType: "bytes", name: "extraData", type: "bytes" },
617
+ ],
618
+ internalType: "struct SpendPermissionManager.SpendPermission",
619
+ name: "spendPermission",
620
+ type: "tuple",
621
+ },
622
+ ],
623
+ name: "revoke",
624
+ outputs: [],
625
+ stateMutability: "nonpayable",
626
+ type: "function",
627
+ },
628
+ {
629
+ inputs: [
630
+ {
631
+ components: [
632
+ { internalType: "address", name: "account", type: "address" },
633
+ { internalType: "address", name: "spender", type: "address" },
634
+ { internalType: "address", name: "token", type: "address" },
635
+ { internalType: "uint160", name: "allowance", type: "uint160" },
636
+ { internalType: "uint48", name: "period", type: "uint48" },
637
+ { internalType: "uint48", name: "start", type: "uint48" },
638
+ { internalType: "uint48", name: "end", type: "uint48" },
639
+ { internalType: "uint256", name: "salt", type: "uint256" },
640
+ { internalType: "bytes", name: "extraData", type: "bytes" },
641
+ ],
642
+ internalType: "struct SpendPermissionManager.SpendPermission",
643
+ name: "spendPermission",
644
+ type: "tuple",
645
+ },
646
+ ],
647
+ name: "revokeAsSpender",
648
+ outputs: [],
649
+ stateMutability: "nonpayable",
650
+ type: "function",
651
+ },
652
+ {
653
+ inputs: [
654
+ {
655
+ components: [
656
+ { internalType: "address", name: "account", type: "address" },
657
+ { internalType: "address", name: "spender", type: "address" },
658
+ { internalType: "address", name: "token", type: "address" },
659
+ { internalType: "uint160", name: "allowance", type: "uint160" },
660
+ { internalType: "uint48", name: "period", type: "uint48" },
661
+ { internalType: "uint48", name: "start", type: "uint48" },
662
+ { internalType: "uint48", name: "end", type: "uint48" },
663
+ { internalType: "uint256", name: "salt", type: "uint256" },
664
+ { internalType: "bytes", name: "extraData", type: "bytes" },
665
+ ],
666
+ internalType: "struct SpendPermissionManager.SpendPermission",
667
+ name: "spendPermission",
668
+ type: "tuple",
669
+ },
670
+ { internalType: "uint160", name: "value", type: "uint160" },
671
+ ],
672
+ name: "spend",
673
+ outputs: [],
674
+ stateMutability: "nonpayable",
675
+ type: "function",
676
+ },
677
+ {
678
+ inputs: [
679
+ {
680
+ components: [
681
+ { internalType: "address", name: "account", type: "address" },
682
+ { internalType: "address", name: "spender", type: "address" },
683
+ { internalType: "address", name: "token", type: "address" },
684
+ { internalType: "uint160", name: "allowance", type: "uint160" },
685
+ { internalType: "uint48", name: "period", type: "uint48" },
686
+ { internalType: "uint48", name: "start", type: "uint48" },
687
+ { internalType: "uint48", name: "end", type: "uint48" },
688
+ { internalType: "uint256", name: "salt", type: "uint256" },
689
+ { internalType: "bytes", name: "extraData", type: "bytes" },
690
+ ],
691
+ internalType: "struct SpendPermissionManager.SpendPermission",
692
+ name: "spendPermission",
693
+ type: "tuple",
694
+ },
695
+ { internalType: "uint160", name: "value", type: "uint160" },
696
+ {
697
+ components: [
698
+ { internalType: "bytes", name: "signature", type: "bytes" },
699
+ { internalType: "address", name: "asset", type: "address" },
700
+ { internalType: "uint256", name: "amount", type: "uint256" },
701
+ { internalType: "uint256", name: "nonce", type: "uint256" },
702
+ { internalType: "uint48", name: "expiry", type: "uint48" },
703
+ ],
704
+ internalType: "struct MagicSpend.WithdrawRequest",
705
+ name: "withdrawRequest",
706
+ type: "tuple",
707
+ },
708
+ ],
709
+ name: "spendWithWithdraw",
710
+ outputs: [],
711
+ stateMutability: "nonpayable",
712
+ type: "function",
713
+ },
714
+ { stateMutability: "payable", type: "receive" },
715
+ ];
716
+ //# sourceMappingURL=constants.js.map