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