@coinbase/cdp-sdk 1.50.0 → 1.51.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 (541) hide show
  1. package/README.md +39 -29
  2. package/_cjs/accounts/evm/chainToNetworkMapper.js.map +1 -1
  3. package/_cjs/accounts/evm/eip6492.js.map +1 -1
  4. package/_cjs/accounts/evm/getBaseNodeRpcUrl.js.map +1 -1
  5. package/_cjs/accounts/evm/networkCapabilities.js.map +1 -1
  6. package/_cjs/accounts/evm/networkToChainResolver.js.map +1 -1
  7. package/_cjs/accounts/evm/resolveViemClients.js.map +1 -1
  8. package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -1
  9. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  10. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  11. package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  12. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  13. package/_cjs/accounts/evm/types.js.map +1 -1
  14. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  15. package/_cjs/accounts/solana/types.js.map +1 -1
  16. package/_cjs/actions/evm/getUserOperation.js.map +1 -1
  17. package/_cjs/actions/evm/listSpendPermissions.js.map +1 -1
  18. package/_cjs/actions/evm/listTokenBalances.js.map +1 -1
  19. package/_cjs/actions/evm/requestFaucet.js.map +1 -1
  20. package/_cjs/actions/evm/sendTransaction.js.map +1 -1
  21. package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
  22. package/_cjs/actions/evm/signAndWrapTypedDataForSmartAccount.js.map +1 -1
  23. package/_cjs/actions/evm/spend-permissions/account.use.js.map +1 -1
  24. package/_cjs/actions/evm/spend-permissions/resolveSpendPermission.js.map +1 -1
  25. package/_cjs/actions/evm/spend-permissions/smartAccount.use.js.map +1 -1
  26. package/_cjs/actions/evm/spend-permissions/types.js.map +1 -1
  27. package/_cjs/actions/evm/swap/createSwapQuote.js.map +1 -1
  28. package/_cjs/actions/evm/swap/getSwapPrice.js.map +1 -1
  29. package/_cjs/actions/evm/swap/sendSwapOperation.js.map +1 -1
  30. package/_cjs/actions/evm/swap/sendSwapTransaction.js.map +1 -1
  31. package/_cjs/actions/evm/swap/types.js.map +1 -1
  32. package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  33. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  34. package/_cjs/actions/evm/transfer/transfer.js.map +1 -1
  35. package/_cjs/actions/evm/transfer/transferWithViem.js.map +1 -1
  36. package/_cjs/actions/evm/transfer/types.js.map +1 -1
  37. package/_cjs/actions/evm/transfer/utils.js.map +1 -1
  38. package/_cjs/actions/evm/types.js.map +1 -1
  39. package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -1
  40. package/_cjs/actions/evm/waitForUserOperation.js.map +1 -1
  41. package/_cjs/actions/solana/constants.js.map +1 -1
  42. package/_cjs/actions/solana/requestFaucet.js.map +1 -1
  43. package/_cjs/actions/solana/rpc.js.map +1 -1
  44. package/_cjs/actions/solana/sendTransaction.js.map +1 -1
  45. package/_cjs/actions/solana/signMessage.js.map +1 -1
  46. package/_cjs/actions/solana/signTransaction.js.map +1 -1
  47. package/_cjs/actions/solana/transfer.js.map +1 -1
  48. package/_cjs/actions/solana/types.js.map +1 -1
  49. package/_cjs/actions/solana/utils.js.map +1 -1
  50. package/_cjs/actions/webhooks/createWebhookSubscription.js.map +1 -1
  51. package/_cjs/actions/webhooks/index.js.map +1 -1
  52. package/_cjs/analytics.js.map +1 -1
  53. package/_cjs/auth/errors.js.map +1 -1
  54. package/_cjs/auth/hooks/axios/index.js.map +1 -1
  55. package/_cjs/auth/hooks/axios/withAuth.js.map +1 -1
  56. package/_cjs/auth/index.js.map +1 -1
  57. package/_cjs/auth/utils/hash.js.map +1 -1
  58. package/_cjs/auth/utils/http.js.map +1 -1
  59. package/_cjs/auth/utils/index.js.map +1 -1
  60. package/_cjs/auth/utils/jwt.js.map +1 -1
  61. package/_cjs/auth/utils/ws.js.map +1 -1
  62. package/_cjs/client/cdp.js.map +1 -1
  63. package/_cjs/client/end-user/endUser.js.map +1 -1
  64. package/_cjs/client/end-user/endUser.types.js.map +1 -1
  65. package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
  66. package/_cjs/client/evm/evm.js.map +1 -1
  67. package/_cjs/client/evm/evm.types.js.map +1 -1
  68. package/_cjs/client/policies/index.js.map +1 -1
  69. package/_cjs/client/policies/policies.js.map +1 -1
  70. package/_cjs/client/policies/policies.types.js.map +1 -1
  71. package/_cjs/client/solana/index.js.map +1 -1
  72. package/_cjs/client/solana/solana.js.map +1 -1
  73. package/_cjs/client/solana/solana.types.js.map +1 -1
  74. package/_cjs/client/webhooks/webhooks.js.map +1 -1
  75. package/_cjs/constants.js.map +1 -1
  76. package/_cjs/errors.js.map +1 -1
  77. package/_cjs/index.js.map +1 -1
  78. package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
  79. package/_cjs/openapi-client/errors.js.map +1 -1
  80. package/_cjs/openapi-client/generated/accounts/accounts.js +50 -0
  81. package/_cjs/openapi-client/generated/accounts/accounts.js.map +1 -0
  82. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +526 -46
  83. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  84. package/_cjs/openapi-client/generated/deposit-destinations/deposit-destinations.js +34 -0
  85. package/_cjs/openapi-client/generated/deposit-destinations/deposit-destinations.js.map +1 -0
  86. package/_cjs/openapi-client/generated/end-user-account-management/end-user-account-management.js +132 -0
  87. package/_cjs/openapi-client/generated/end-user-account-management/end-user-account-management.js.map +1 -0
  88. package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js +228 -74
  89. package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  90. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +12 -12
  91. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  92. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +10 -10
  93. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  94. package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js +2 -2
  95. package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
  96. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
  97. package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -1
  98. package/_cjs/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
  99. package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
  100. package/_cjs/openapi-client/generated/payment-methods/payment-methods.js +28 -0
  101. package/_cjs/openapi-client/generated/payment-methods/payment-methods.js.map +1 -0
  102. package/_cjs/openapi-client/generated/policy-engine/policy-engine.js +4 -4
  103. package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
  104. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js +11 -11
  105. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
  106. package/_cjs/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
  107. package/_cjs/openapi-client/generated/sql-api/sql-api.js +1 -1
  108. package/_cjs/openapi-client/generated/sql-api/sql-api.js.map +1 -1
  109. package/_cjs/openapi-client/generated/transfers/transfers.js +87 -0
  110. package/_cjs/openapi-client/generated/transfers/transfers.js.map +1 -0
  111. package/_cjs/openapi-client/generated/webhooks/webhooks.js +1 -1
  112. package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -1
  113. package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js +3 -3
  114. package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
  115. package/_cjs/openapi-client/index.js +7 -3
  116. package/_cjs/openapi-client/index.js.map +1 -1
  117. package/_cjs/policies/evmSchema.js +54 -1
  118. package/_cjs/policies/evmSchema.js.map +1 -1
  119. package/_cjs/policies/solanaSchema.js.map +1 -1
  120. package/_cjs/policies/types.js +2 -0
  121. package/_cjs/policies/types.js.map +1 -1
  122. package/_cjs/spend-permissions/constants.js.map +1 -1
  123. package/_cjs/spend-permissions/types.js.map +1 -1
  124. package/_cjs/spend-permissions/utils.js.map +1 -1
  125. package/_cjs/types/calls.js.map +1 -1
  126. package/_cjs/types/contract.js.map +1 -1
  127. package/_cjs/types/misc.js.map +1 -1
  128. package/_cjs/types/multicall.js.map +1 -1
  129. package/_cjs/types/utils.js.map +1 -1
  130. package/_cjs/utils/bigint.js.map +1 -1
  131. package/_cjs/utils/export.js.map +1 -1
  132. package/_cjs/utils/hash.js.map +1 -1
  133. package/_cjs/utils/serializeTransaction.js.map +1 -1
  134. package/_cjs/utils/sortKeys.js.map +1 -1
  135. package/_cjs/utils/uuidV4.js.map +1 -1
  136. package/_cjs/utils/wait.js.map +1 -1
  137. package/_cjs/version.js +1 -1
  138. package/_cjs/version.js.map +1 -1
  139. package/_esm/accounts/evm/chainToNetworkMapper.js.map +1 -1
  140. package/_esm/accounts/evm/eip6492.js.map +1 -1
  141. package/_esm/accounts/evm/getBaseNodeRpcUrl.js.map +1 -1
  142. package/_esm/accounts/evm/networkCapabilities.js.map +1 -1
  143. package/_esm/accounts/evm/networkToChainResolver.js.map +1 -1
  144. package/_esm/accounts/evm/resolveViemClients.js.map +1 -1
  145. package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -1
  146. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  147. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  148. package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  149. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  150. package/_esm/accounts/evm/types.js.map +1 -1
  151. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  152. package/_esm/accounts/solana/types.js.map +1 -1
  153. package/_esm/actions/evm/getUserOperation.js.map +1 -1
  154. package/_esm/actions/evm/listSpendPermissions.js.map +1 -1
  155. package/_esm/actions/evm/listTokenBalances.js.map +1 -1
  156. package/_esm/actions/evm/requestFaucet.js.map +1 -1
  157. package/_esm/actions/evm/sendTransaction.js.map +1 -1
  158. package/_esm/actions/evm/sendUserOperation.js.map +1 -1
  159. package/_esm/actions/evm/signAndWrapTypedDataForSmartAccount.js.map +1 -1
  160. package/_esm/actions/evm/spend-permissions/account.use.js.map +1 -1
  161. package/_esm/actions/evm/spend-permissions/resolveSpendPermission.js.map +1 -1
  162. package/_esm/actions/evm/spend-permissions/smartAccount.use.js.map +1 -1
  163. package/_esm/actions/evm/spend-permissions/types.js.map +1 -1
  164. package/_esm/actions/evm/swap/createSwapQuote.js.map +1 -1
  165. package/_esm/actions/evm/swap/getSwapPrice.js.map +1 -1
  166. package/_esm/actions/evm/swap/sendSwapOperation.js.map +1 -1
  167. package/_esm/actions/evm/swap/sendSwapTransaction.js.map +1 -1
  168. package/_esm/actions/evm/swap/types.js.map +1 -1
  169. package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  170. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  171. package/_esm/actions/evm/transfer/transfer.js.map +1 -1
  172. package/_esm/actions/evm/transfer/transferWithViem.js.map +1 -1
  173. package/_esm/actions/evm/transfer/types.js.map +1 -1
  174. package/_esm/actions/evm/transfer/utils.js.map +1 -1
  175. package/_esm/actions/evm/types.js.map +1 -1
  176. package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -1
  177. package/_esm/actions/evm/waitForUserOperation.js.map +1 -1
  178. package/_esm/actions/solana/constants.js.map +1 -1
  179. package/_esm/actions/solana/requestFaucet.js.map +1 -1
  180. package/_esm/actions/solana/rpc.js.map +1 -1
  181. package/_esm/actions/solana/sendTransaction.js.map +1 -1
  182. package/_esm/actions/solana/signMessage.js.map +1 -1
  183. package/_esm/actions/solana/signTransaction.js.map +1 -1
  184. package/_esm/actions/solana/transfer.js.map +1 -1
  185. package/_esm/actions/solana/types.js.map +1 -1
  186. package/_esm/actions/solana/utils.js.map +1 -1
  187. package/_esm/actions/webhooks/createWebhookSubscription.js.map +1 -1
  188. package/_esm/actions/webhooks/index.js.map +1 -1
  189. package/_esm/analytics.js.map +1 -1
  190. package/_esm/auth/errors.js.map +1 -1
  191. package/_esm/auth/hooks/axios/index.js.map +1 -1
  192. package/_esm/auth/hooks/axios/withAuth.js.map +1 -1
  193. package/_esm/auth/index.js.map +1 -1
  194. package/_esm/auth/utils/hash.js.map +1 -1
  195. package/_esm/auth/utils/http.js.map +1 -1
  196. package/_esm/auth/utils/index.js.map +1 -1
  197. package/_esm/auth/utils/jwt.js.map +1 -1
  198. package/_esm/auth/utils/ws.js.map +1 -1
  199. package/_esm/client/cdp.js.map +1 -1
  200. package/_esm/client/end-user/endUser.js.map +1 -1
  201. package/_esm/client/end-user/endUser.types.js.map +1 -1
  202. package/_esm/client/end-user/toEndUserAccount.js.map +1 -1
  203. package/_esm/client/evm/evm.js.map +1 -1
  204. package/_esm/client/evm/evm.types.js.map +1 -1
  205. package/_esm/client/policies/index.js.map +1 -1
  206. package/_esm/client/policies/policies.js.map +1 -1
  207. package/_esm/client/policies/policies.types.js.map +1 -1
  208. package/_esm/client/solana/index.js.map +1 -1
  209. package/_esm/client/solana/solana.js.map +1 -1
  210. package/_esm/client/solana/solana.types.js.map +1 -1
  211. package/_esm/client/webhooks/webhooks.js.map +1 -1
  212. package/_esm/constants.js.map +1 -1
  213. package/_esm/errors.js.map +1 -1
  214. package/_esm/index.js.map +1 -1
  215. package/_esm/openapi-client/cdpApiClient.js.map +1 -1
  216. package/_esm/openapi-client/errors.js.map +1 -1
  217. package/_esm/openapi-client/generated/accounts/accounts.js +42 -0
  218. package/_esm/openapi-client/generated/accounts/accounts.js.map +1 -0
  219. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +522 -43
  220. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  221. package/_esm/openapi-client/generated/deposit-destinations/deposit-destinations.js +28 -0
  222. package/_esm/openapi-client/generated/deposit-destinations/deposit-destinations.js.map +1 -0
  223. package/_esm/openapi-client/generated/end-user-account-management/end-user-account-management.js +120 -0
  224. package/_esm/openapi-client/generated/end-user-account-management/end-user-account-management.js.map +1 -0
  225. package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js +211 -64
  226. package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  227. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +12 -12
  228. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  229. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +10 -10
  230. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  231. package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js +2 -2
  232. package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
  233. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
  234. package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -1
  235. package/_esm/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
  236. package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
  237. package/_esm/openapi-client/generated/payment-methods/payment-methods.js +23 -0
  238. package/_esm/openapi-client/generated/payment-methods/payment-methods.js.map +1 -0
  239. package/_esm/openapi-client/generated/policy-engine/policy-engine.js +4 -4
  240. package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
  241. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js +11 -11
  242. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
  243. package/_esm/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
  244. package/_esm/openapi-client/generated/sql-api/sql-api.js +1 -1
  245. package/_esm/openapi-client/generated/sql-api/sql-api.js.map +1 -1
  246. package/_esm/openapi-client/generated/transfers/transfers.js +79 -0
  247. package/_esm/openapi-client/generated/transfers/transfers.js.map +1 -0
  248. package/_esm/openapi-client/generated/webhooks/webhooks.js +1 -1
  249. package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -1
  250. package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js +3 -3
  251. package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
  252. package/_esm/openapi-client/index.js +7 -3
  253. package/_esm/openapi-client/index.js.map +1 -1
  254. package/_esm/policies/evmSchema.js +52 -0
  255. package/_esm/policies/evmSchema.js.map +1 -1
  256. package/_esm/policies/solanaSchema.js.map +1 -1
  257. package/_esm/policies/types.js +3 -1
  258. package/_esm/policies/types.js.map +1 -1
  259. package/_esm/spend-permissions/constants.js.map +1 -1
  260. package/_esm/spend-permissions/types.js.map +1 -1
  261. package/_esm/spend-permissions/utils.js.map +1 -1
  262. package/_esm/types/calls.js.map +1 -1
  263. package/_esm/types/contract.js.map +1 -1
  264. package/_esm/types/misc.js.map +1 -1
  265. package/_esm/types/multicall.js.map +1 -1
  266. package/_esm/types/utils.js.map +1 -1
  267. package/_esm/utils/bigint.js.map +1 -1
  268. package/_esm/utils/export.js.map +1 -1
  269. package/_esm/utils/hash.js.map +1 -1
  270. package/_esm/utils/serializeTransaction.js.map +1 -1
  271. package/_esm/utils/sortKeys.js.map +1 -1
  272. package/_esm/utils/uuidV4.js.map +1 -1
  273. package/_esm/utils/wait.js.map +1 -1
  274. package/_esm/version.js +1 -1
  275. package/_esm/version.js.map +1 -1
  276. package/_types/accounts/evm/chainToNetworkMapper.d.ts.map +1 -1
  277. package/_types/accounts/evm/eip6492.d.ts.map +1 -1
  278. package/_types/accounts/evm/getBaseNodeRpcUrl.d.ts.map +1 -1
  279. package/_types/accounts/evm/networkCapabilities.d.ts.map +1 -1
  280. package/_types/accounts/evm/networkToChainResolver.d.ts.map +1 -1
  281. package/_types/accounts/evm/resolveViemClients.d.ts.map +1 -1
  282. package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -1
  283. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  284. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  285. package/_types/accounts/evm/toNetworkScopedEvmServerAccount.d.ts.map +1 -1
  286. package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
  287. package/_types/accounts/evm/types.d.ts.map +1 -1
  288. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  289. package/_types/accounts/solana/types.d.ts.map +1 -1
  290. package/_types/actions/evm/getUserOperation.d.ts.map +1 -1
  291. package/_types/actions/evm/listSpendPermissions.d.ts.map +1 -1
  292. package/_types/actions/evm/listTokenBalances.d.ts.map +1 -1
  293. package/_types/actions/evm/requestFaucet.d.ts.map +1 -1
  294. package/_types/actions/evm/sendTransaction.d.ts.map +1 -1
  295. package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
  296. package/_types/actions/evm/signAndWrapTypedDataForSmartAccount.d.ts.map +1 -1
  297. package/_types/actions/evm/spend-permissions/account.use.d.ts.map +1 -1
  298. package/_types/actions/evm/spend-permissions/resolveSpendPermission.d.ts.map +1 -1
  299. package/_types/actions/evm/spend-permissions/smartAccount.use.d.ts.map +1 -1
  300. package/_types/actions/evm/spend-permissions/types.d.ts.map +1 -1
  301. package/_types/actions/evm/swap/createSwapQuote.d.ts.map +1 -1
  302. package/_types/actions/evm/swap/getSwapPrice.d.ts.map +1 -1
  303. package/_types/actions/evm/swap/sendSwapOperation.d.ts.map +1 -1
  304. package/_types/actions/evm/swap/sendSwapTransaction.d.ts.map +1 -1
  305. package/_types/actions/evm/swap/types.d.ts.map +1 -1
  306. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -1
  307. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -1
  308. package/_types/actions/evm/transfer/transfer.d.ts.map +1 -1
  309. package/_types/actions/evm/transfer/transferWithViem.d.ts.map +1 -1
  310. package/_types/actions/evm/transfer/types.d.ts.map +1 -1
  311. package/_types/actions/evm/transfer/utils.d.ts.map +1 -1
  312. package/_types/actions/evm/types.d.ts.map +1 -1
  313. package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -1
  314. package/_types/actions/evm/waitForUserOperation.d.ts.map +1 -1
  315. package/_types/actions/solana/constants.d.ts.map +1 -1
  316. package/_types/actions/solana/requestFaucet.d.ts.map +1 -1
  317. package/_types/actions/solana/rpc.d.ts.map +1 -1
  318. package/_types/actions/solana/sendTransaction.d.ts.map +1 -1
  319. package/_types/actions/solana/signMessage.d.ts.map +1 -1
  320. package/_types/actions/solana/signTransaction.d.ts.map +1 -1
  321. package/_types/actions/solana/transfer.d.ts.map +1 -1
  322. package/_types/actions/solana/types.d.ts.map +1 -1
  323. package/_types/actions/solana/utils.d.ts.map +1 -1
  324. package/_types/actions/webhooks/createWebhookSubscription.d.ts.map +1 -1
  325. package/_types/actions/webhooks/index.d.ts.map +1 -1
  326. package/_types/analytics.d.ts.map +1 -1
  327. package/_types/auth/errors.d.ts.map +1 -1
  328. package/_types/auth/hooks/axios/index.d.ts.map +1 -1
  329. package/_types/auth/hooks/axios/withAuth.d.ts.map +1 -1
  330. package/_types/auth/index.d.ts.map +1 -1
  331. package/_types/auth/utils/hash.d.ts.map +1 -1
  332. package/_types/auth/utils/http.d.ts.map +1 -1
  333. package/_types/auth/utils/index.d.ts.map +1 -1
  334. package/_types/auth/utils/jwt.d.ts.map +1 -1
  335. package/_types/auth/utils/ws.d.ts.map +1 -1
  336. package/_types/client/cdp.d.ts.map +1 -1
  337. package/_types/client/end-user/endUser.d.ts.map +1 -1
  338. package/_types/client/end-user/endUser.types.d.ts.map +1 -1
  339. package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
  340. package/_types/client/evm/evm.d.ts.map +1 -1
  341. package/_types/client/evm/evm.types.d.ts.map +1 -1
  342. package/_types/client/policies/index.d.ts.map +1 -1
  343. package/_types/client/policies/policies.d.ts.map +1 -1
  344. package/_types/client/policies/policies.types.d.ts.map +1 -1
  345. package/_types/client/solana/index.d.ts.map +1 -1
  346. package/_types/client/solana/solana.d.ts.map +1 -1
  347. package/_types/client/solana/solana.types.d.ts.map +1 -1
  348. package/_types/client/webhooks/webhooks.d.ts.map +1 -1
  349. package/_types/constants.d.ts.map +1 -1
  350. package/_types/errors.d.ts.map +1 -1
  351. package/_types/index.d.ts.map +1 -1
  352. package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
  353. package/_types/openapi-client/errors.d.ts.map +1 -1
  354. package/_types/openapi-client/generated/accounts/accounts.d.ts +42 -0
  355. package/_types/openapi-client/generated/accounts/accounts.d.ts.map +1 -0
  356. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +1933 -269
  357. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  358. package/_types/openapi-client/generated/deposit-destinations/deposit-destinations.d.ts +30 -0
  359. package/_types/openapi-client/generated/deposit-destinations/deposit-destinations.d.ts.map +1 -0
  360. package/_types/openapi-client/generated/end-user-account-management/end-user-account-management.d.ts +91 -0
  361. package/_types/openapi-client/generated/end-user-account-management/end-user-account-management.d.ts.map +1 -0
  362. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +142 -60
  363. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
  364. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +12 -12
  365. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
  366. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +10 -10
  367. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  368. package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts +2 -2
  369. package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts.map +1 -1
  370. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -1
  371. package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -1
  372. package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts.map +1 -1
  373. package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
  374. package/_types/openapi-client/generated/payment-methods/payment-methods.d.ts +31 -0
  375. package/_types/openapi-client/generated/payment-methods/payment-methods.d.ts.map +1 -0
  376. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +4 -4
  377. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -1
  378. package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +11 -11
  379. package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
  380. package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts.map +1 -1
  381. package/_types/openapi-client/generated/sql-api/sql-api.d.ts +1 -1
  382. package/_types/openapi-client/generated/sql-api/sql-api.d.ts.map +1 -1
  383. package/_types/openapi-client/generated/transfers/transfers.d.ts +74 -0
  384. package/_types/openapi-client/generated/transfers/transfers.d.ts.map +1 -0
  385. package/_types/openapi-client/generated/webhooks/webhooks.d.ts +1 -1
  386. package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -1
  387. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +3 -3
  388. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -1
  389. package/_types/openapi-client/index.d.ts +14 -10
  390. package/_types/openapi-client/index.d.ts.map +1 -1
  391. package/_types/policies/evmSchema.d.ts +884 -39
  392. package/_types/policies/evmSchema.d.ts.map +1 -1
  393. package/_types/policies/solanaSchema.d.ts +20 -20
  394. package/_types/policies/solanaSchema.d.ts.map +1 -1
  395. package/_types/policies/types.d.ts +1996 -629
  396. package/_types/policies/types.d.ts.map +1 -1
  397. package/_types/spend-permissions/constants.d.ts.map +1 -1
  398. package/_types/spend-permissions/types.d.ts.map +1 -1
  399. package/_types/spend-permissions/utils.d.ts.map +1 -1
  400. package/_types/types/calls.d.ts.map +1 -1
  401. package/_types/types/contract.d.ts.map +1 -1
  402. package/_types/types/misc.d.ts.map +1 -1
  403. package/_types/types/multicall.d.ts.map +1 -1
  404. package/_types/types/utils.d.ts.map +1 -1
  405. package/_types/utils/bigint.d.ts.map +1 -1
  406. package/_types/utils/export.d.ts.map +1 -1
  407. package/_types/utils/hash.d.ts.map +1 -1
  408. package/_types/utils/serializeTransaction.d.ts.map +1 -1
  409. package/_types/utils/sortKeys.d.ts.map +1 -1
  410. package/_types/utils/uuidV4.d.ts.map +1 -1
  411. package/_types/utils/wait.d.ts.map +1 -1
  412. package/_types/version.d.ts +1 -1
  413. package/_types/version.d.ts.map +1 -1
  414. package/package.json +24 -3
  415. package/{auth → src/auth}/README.md +3 -3
  416. package/src/openapi-client/generated/accounts/accounts.ts +103 -0
  417. package/{openapi-client → src/openapi-client}/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +2368 -363
  418. package/src/openapi-client/generated/deposit-destinations/deposit-destinations.ts +72 -0
  419. package/{openapi-client/generated/end-user-accounts/end-user-accounts.ts → src/openapi-client/generated/end-user-account-management/end-user-account-management.ts} +6 -6
  420. package/{openapi-client/generated/embedded-wallets/embedded-wallets.ts → src/openapi-client/generated/end-user-accounts/end-user-accounts.ts} +11 -11
  421. package/{openapi-client → src/openapi-client}/generated/evm-accounts/evm-accounts.ts +12 -12
  422. package/{openapi-client → src/openapi-client}/generated/evm-smart-accounts/evm-smart-accounts.ts +10 -10
  423. package/{openapi-client → src/openapi-client}/generated/evm-swaps/evm-swaps.ts +2 -2
  424. package/src/openapi-client/generated/payment-methods/payment-methods.ts +53 -0
  425. package/{openapi-client → src/openapi-client}/generated/policy-engine/policy-engine.ts +4 -4
  426. package/{openapi-client → src/openapi-client}/generated/solana-accounts/solana-accounts.ts +11 -11
  427. package/{openapi-client → src/openapi-client}/generated/sql-api/sql-api.ts +1 -1
  428. package/src/openapi-client/generated/transfers/transfers.ts +131 -0
  429. package/{openapi-client → src/openapi-client}/generated/webhooks/webhooks.ts +1 -1
  430. package/{openapi-client → src/openapi-client}/generated/x402-facilitator/x402-facilitator.ts +3 -3
  431. package/{openapi-client → src/openapi-client}/index.ts +7 -3
  432. package/{policies → src/policies}/evmSchema.ts +63 -0
  433. package/{policies → src/policies}/types.ts +4 -0
  434. package/src/version.ts +1 -0
  435. package/CHANGELOG.md +0 -637
  436. package/_cjs/openapi-client/generated/embedded-wallets/embedded-wallets.js +0 -286
  437. package/_cjs/openapi-client/generated/embedded-wallets/embedded-wallets.js.map +0 -1
  438. package/_esm/openapi-client/generated/embedded-wallets/embedded-wallets.js +0 -267
  439. package/_esm/openapi-client/generated/embedded-wallets/embedded-wallets.js.map +0 -1
  440. package/_types/openapi-client/generated/embedded-wallets/embedded-wallets.d.ts +0 -173
  441. package/_types/openapi-client/generated/embedded-wallets/embedded-wallets.d.ts.map +0 -1
  442. package/version.ts +0 -1
  443. /package/{accounts → src/accounts}/evm/chainToNetworkMapper.ts +0 -0
  444. /package/{accounts → src/accounts}/evm/eip6492.ts +0 -0
  445. /package/{accounts → src/accounts}/evm/getBaseNodeRpcUrl.ts +0 -0
  446. /package/{accounts → src/accounts}/evm/networkCapabilities.ts +0 -0
  447. /package/{accounts → src/accounts}/evm/networkToChainResolver.ts +0 -0
  448. /package/{accounts → src/accounts}/evm/resolveViemClients.ts +0 -0
  449. /package/{accounts → src/accounts}/evm/toEvmDelegatedAccount.ts +0 -0
  450. /package/{accounts → src/accounts}/evm/toEvmServerAccount.ts +0 -0
  451. /package/{accounts → src/accounts}/evm/toEvmSmartAccount.ts +0 -0
  452. /package/{accounts → src/accounts}/evm/toNetworkScopedEvmServerAccount.ts +0 -0
  453. /package/{accounts → src/accounts}/evm/toNetworkScopedEvmSmartAccount.ts +0 -0
  454. /package/{accounts → src/accounts}/evm/types.ts +0 -0
  455. /package/{accounts → src/accounts}/solana/toSolanaAccount.ts +0 -0
  456. /package/{accounts → src/accounts}/solana/types.ts +0 -0
  457. /package/{actions → src/actions}/evm/getUserOperation.ts +0 -0
  458. /package/{actions → src/actions}/evm/listSpendPermissions.ts +0 -0
  459. /package/{actions → src/actions}/evm/listTokenBalances.ts +0 -0
  460. /package/{actions → src/actions}/evm/requestFaucet.ts +0 -0
  461. /package/{actions → src/actions}/evm/sendTransaction.ts +0 -0
  462. /package/{actions → src/actions}/evm/sendUserOperation.ts +0 -0
  463. /package/{actions → src/actions}/evm/signAndWrapTypedDataForSmartAccount.ts +0 -0
  464. /package/{actions → src/actions}/evm/spend-permissions/account.use.ts +0 -0
  465. /package/{actions → src/actions}/evm/spend-permissions/resolveSpendPermission.ts +0 -0
  466. /package/{actions → src/actions}/evm/spend-permissions/smartAccount.use.ts +0 -0
  467. /package/{actions → src/actions}/evm/spend-permissions/types.ts +0 -0
  468. /package/{actions → src/actions}/evm/swap/createSwapQuote.ts +0 -0
  469. /package/{actions → src/actions}/evm/swap/getSwapPrice.ts +0 -0
  470. /package/{actions → src/actions}/evm/swap/sendSwapOperation.ts +0 -0
  471. /package/{actions → src/actions}/evm/swap/sendSwapTransaction.ts +0 -0
  472. /package/{actions → src/actions}/evm/swap/types.ts +0 -0
  473. /package/{actions → src/actions}/evm/transfer/accountTransferStrategy.ts +0 -0
  474. /package/{actions → src/actions}/evm/transfer/smartAccountTransferStrategy.ts +0 -0
  475. /package/{actions → src/actions}/evm/transfer/transfer.ts +0 -0
  476. /package/{actions → src/actions}/evm/transfer/transferWithViem.ts +0 -0
  477. /package/{actions → src/actions}/evm/transfer/types.ts +0 -0
  478. /package/{actions → src/actions}/evm/transfer/utils.ts +0 -0
  479. /package/{actions → src/actions}/evm/types.ts +0 -0
  480. /package/{actions → src/actions}/evm/waitForEvmEip7702DelegationStatus.ts +0 -0
  481. /package/{actions → src/actions}/evm/waitForUserOperation.ts +0 -0
  482. /package/{actions → src/actions}/solana/constants.ts +0 -0
  483. /package/{actions → src/actions}/solana/requestFaucet.ts +0 -0
  484. /package/{actions → src/actions}/solana/rpc.ts +0 -0
  485. /package/{actions → src/actions}/solana/sendTransaction.ts +0 -0
  486. /package/{actions → src/actions}/solana/signMessage.ts +0 -0
  487. /package/{actions → src/actions}/solana/signTransaction.ts +0 -0
  488. /package/{actions → src/actions}/solana/transfer.ts +0 -0
  489. /package/{actions → src/actions}/solana/types.ts +0 -0
  490. /package/{actions → src/actions}/solana/utils.ts +0 -0
  491. /package/{actions → src/actions}/webhooks/createWebhookSubscription.ts +0 -0
  492. /package/{actions → src/actions}/webhooks/index.ts +0 -0
  493. /package/{analytics.ts → src/analytics.ts} +0 -0
  494. /package/{auth → src/auth}/errors.ts +0 -0
  495. /package/{auth → src/auth}/hooks/axios/index.ts +0 -0
  496. /package/{auth → src/auth}/hooks/axios/withAuth.ts +0 -0
  497. /package/{auth → src/auth}/index.ts +0 -0
  498. /package/{auth → src/auth}/utils/hash.ts +0 -0
  499. /package/{auth → src/auth}/utils/http.ts +0 -0
  500. /package/{auth → src/auth}/utils/index.ts +0 -0
  501. /package/{auth → src/auth}/utils/jwt.ts +0 -0
  502. /package/{auth → src/auth}/utils/ws.ts +0 -0
  503. /package/{client → src/client}/cdp.ts +0 -0
  504. /package/{client → src/client}/end-user/endUser.ts +0 -0
  505. /package/{client → src/client}/end-user/endUser.types.ts +0 -0
  506. /package/{client → src/client}/end-user/toEndUserAccount.ts +0 -0
  507. /package/{client → src/client}/evm/evm.ts +0 -0
  508. /package/{client → src/client}/evm/evm.types.ts +0 -0
  509. /package/{client → src/client}/policies/index.ts +0 -0
  510. /package/{client → src/client}/policies/policies.ts +0 -0
  511. /package/{client → src/client}/policies/policies.types.ts +0 -0
  512. /package/{client → src/client}/solana/index.ts +0 -0
  513. /package/{client → src/client}/solana/solana.ts +0 -0
  514. /package/{client → src/client}/solana/solana.types.ts +0 -0
  515. /package/{client → src/client}/webhooks/webhooks.ts +0 -0
  516. /package/{constants.ts → src/constants.ts} +0 -0
  517. /package/{errors.ts → src/errors.ts} +0 -0
  518. /package/{index.ts → src/index.ts} +0 -0
  519. /package/{openapi-client → src/openapi-client}/cdpApiClient.ts +0 -0
  520. /package/{openapi-client → src/openapi-client}/errors.ts +0 -0
  521. /package/{openapi-client → src/openapi-client}/generated/evm-token-balances/evm-token-balances.ts +0 -0
  522. /package/{openapi-client → src/openapi-client}/generated/faucets/faucets.ts +0 -0
  523. /package/{openapi-client → src/openapi-client}/generated/onchain-data/onchain-data.ts +0 -0
  524. /package/{openapi-client → src/openapi-client}/generated/onramp/onramp.ts +0 -0
  525. /package/{openapi-client → src/openapi-client}/generated/solana-token-balances/solana-token-balances.ts +0 -0
  526. /package/{policies → src/policies}/solanaSchema.ts +0 -0
  527. /package/{spend-permissions → src/spend-permissions}/constants.ts +0 -0
  528. /package/{spend-permissions → src/spend-permissions}/types.ts +0 -0
  529. /package/{spend-permissions → src/spend-permissions}/utils.ts +0 -0
  530. /package/{types → src/types}/calls.ts +0 -0
  531. /package/{types → src/types}/contract.ts +0 -0
  532. /package/{types → src/types}/misc.ts +0 -0
  533. /package/{types → src/types}/multicall.ts +0 -0
  534. /package/{types → src/types}/utils.ts +0 -0
  535. /package/{utils → src/utils}/bigint.ts +0 -0
  536. /package/{utils → src/utils}/export.ts +0 -0
  537. /package/{utils → src/utils}/hash.ts +0 -0
  538. /package/{utils → src/utils}/serializeTransaction.ts +0 -0
  539. /package/{utils → src/utils}/sortKeys.ts +0 -0
  540. /package/{utils → src/utils}/uuidV4.ts +0 -0
  541. /package/{utils → src/utils}/wait.ts +0 -0
@@ -5,6 +5,942 @@
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
6
6
  * OpenAPI spec version: 2.0.0
7
7
  */
8
+ /**
9
+ * The type of the Account.
10
+ */
11
+ export type AccountType = (typeof AccountType)[keyof typeof AccountType];
12
+
13
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
14
+ export const AccountType = {
15
+ prime: "prime",
16
+ business: "business",
17
+ cdp: "cdp",
18
+ } as const;
19
+
20
+ /**
21
+ * The ID of the Account, which is a UUID prefixed by the string `account_`.
22
+ * @pattern ^account_[a-f0-9\-]{36}$
23
+ */
24
+ export type AccountId = string;
25
+
26
+ /**
27
+ * The Owner ID of the Account.
28
+ Owner IDs are UUIDs prefixed with the Owner Type as follows:
29
+ * **Entity**: `entity_` - If the Owner is your Entity, e.g. `entity_af2937b0-9846-4fe7-bfe9-ccc22d935114`.
30
+ Support for Customer-owned accounts (`customer_` prefix) is in development.
31
+ * @pattern ^(entity|customer)_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
32
+ */
33
+ export type Owner = string;
34
+
35
+ /**
36
+ * An optional name for the account. Must be 1-64 characters and can only contain alphanumeric characters, hyphens, and spaces.
37
+ * @maxLength 64
38
+ * @pattern ^[a-zA-Z0-9 -]{1,64}$
39
+ */
40
+ export type AccountName = string;
41
+
42
+ export interface Account {
43
+ accountId: AccountId;
44
+ type: AccountType;
45
+ owner: Owner;
46
+ name?: AccountName;
47
+ /** The timestamp when the account was created. */
48
+ createdAt: string;
49
+ /** The timestamp when the account was last updated. */
50
+ updatedAt: string;
51
+ }
52
+
53
+ export interface ListResponse {
54
+ /** The token for the next page of items, if any. */
55
+ nextPageToken?: string;
56
+ }
57
+
58
+ /**
59
+ * The code that indicates the type of error that occurred. These error codes can be used to determine how to handle the error.
60
+ */
61
+ export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
62
+
63
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
64
+ export const ErrorType = {
65
+ already_exists: "already_exists",
66
+ authorization_expired: "authorization_expired",
67
+ bad_gateway: "bad_gateway",
68
+ capture_expired: "capture_expired",
69
+ client_closed_request: "client_closed_request",
70
+ customer_not_authorized: "customer_not_authorized",
71
+ endpoint_unavailable: "endpoint_unavailable",
72
+ faucet_limit_exceeded: "faucet_limit_exceeded",
73
+ forbidden: "forbidden",
74
+ idempotency_error: "idempotency_error",
75
+ internal_server_error: "internal_server_error",
76
+ invalid_request: "invalid_request",
77
+ invalid_sql_query: "invalid_sql_query",
78
+ invalid_signature: "invalid_signature",
79
+ malformed_transaction: "malformed_transaction",
80
+ not_found: "not_found",
81
+ payment_method_required: "payment_method_required",
82
+ payment_required: "payment_required",
83
+ settlement_failed: "settlement_failed",
84
+ rate_limit_exceeded: "rate_limit_exceeded",
85
+ request_canceled: "request_canceled",
86
+ service_unavailable: "service_unavailable",
87
+ timed_out: "timed_out",
88
+ unauthorized: "unauthorized",
89
+ unsupported_tos_language: "unsupported_tos_language",
90
+ policy_violation: "policy_violation",
91
+ policy_in_use: "policy_in_use",
92
+ account_limit_exceeded: "account_limit_exceeded",
93
+ network_not_tradable: "network_not_tradable",
94
+ guest_permission_denied: "guest_permission_denied",
95
+ guest_region_forbidden: "guest_region_forbidden",
96
+ guest_transaction_limit: "guest_transaction_limit",
97
+ guest_transaction_count: "guest_transaction_count",
98
+ phone_number_verification_expired: "phone_number_verification_expired",
99
+ document_verification_failed: "document_verification_failed",
100
+ recipient_allowlist_violation: "recipient_allowlist_violation",
101
+ recipient_allowlist_pending: "recipient_allowlist_pending",
102
+ refund_expired: "refund_expired",
103
+ travel_rules_recipient_violation: "travel_rules_recipient_violation",
104
+ source_account_invalid: "source_account_invalid",
105
+ target_account_invalid: "target_account_invalid",
106
+ source_account_not_found: "source_account_not_found",
107
+ target_account_not_found: "target_account_not_found",
108
+ source_asset_not_supported: "source_asset_not_supported",
109
+ target_asset_not_supported: "target_asset_not_supported",
110
+ target_email_invalid: "target_email_invalid",
111
+ target_onchain_address_invalid: "target_onchain_address_invalid",
112
+ transfer_amount_invalid: "transfer_amount_invalid",
113
+ transfer_asset_not_supported: "transfer_asset_not_supported",
114
+ transfer_quote_expired: "transfer_quote_expired",
115
+ insufficient_balance: "insufficient_balance",
116
+ metadata_too_many_entries: "metadata_too_many_entries",
117
+ metadata_key_too_long: "metadata_key_too_long",
118
+ metadata_value_too_long: "metadata_value_too_long",
119
+ travel_rules_field_missing: "travel_rules_field_missing",
120
+ asset_mismatch: "asset_mismatch",
121
+ mfa_already_enrolled: "mfa_already_enrolled",
122
+ mfa_invalid_code: "mfa_invalid_code",
123
+ mfa_flow_expired: "mfa_flow_expired",
124
+ mfa_required: "mfa_required",
125
+ mfa_not_enrolled: "mfa_not_enrolled",
126
+ order_quote_expired: "order_quote_expired",
127
+ order_already_filled: "order_already_filled",
128
+ order_already_canceled: "order_already_canceled",
129
+ account_not_ready: "account_not_ready",
130
+ insufficient_liquidity: "insufficient_liquidity",
131
+ insufficient_allowance: "insufficient_allowance",
132
+ transaction_simulation_failed: "transaction_simulation_failed",
133
+ delegation_not_found: "delegation_not_found",
134
+ delegation_expired: "delegation_expired",
135
+ delegation_revoked: "delegation_revoked",
136
+ delegation_not_authorized: "delegation_not_authorized",
137
+ delegation_not_enabled: "delegation_not_enabled",
138
+ network_mismatch: "network_mismatch",
139
+ already_enabled: "already_enabled",
140
+ } as const;
141
+
142
+ /**
143
+ * A valid HTTP or HTTPS URL.
144
+ * @minLength 11
145
+ * @maxLength 2048
146
+ * @pattern ^https?://.*$
147
+ */
148
+ export type Url = string;
149
+
150
+ /**
151
+ * The name of a capability. Capabilities represent granular functional permissions
152
+ that determine what actions a customer can perform. Each capability must be
153
+ explicitly requested before use.
154
+
155
+ */
156
+ export type CapabilityName = (typeof CapabilityName)[keyof typeof CapabilityName];
157
+
158
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
159
+ export const CapabilityName = {
160
+ custodyCrypto: "custodyCrypto",
161
+ custodyFiat: "custodyFiat",
162
+ custodyStablecoin: "custodyStablecoin",
163
+ tradeCrypto: "tradeCrypto",
164
+ tradeStablecoin: "tradeStablecoin",
165
+ transferCrypto: "transferCrypto",
166
+ transferFiat: "transferFiat",
167
+ transferStablecoin: "transferStablecoin",
168
+ } as const;
169
+
170
+ /**
171
+ * An error response including the code for the type of error and a human-readable message describing the error.
172
+ */
173
+ export interface Error {
174
+ errorType: ErrorType;
175
+ /** The error message. */
176
+ errorMessage: string;
177
+ /** A unique identifier for the request that generated the error. This can be used to help debug issues with the API. */
178
+ correlationId?: string;
179
+ /** A link to the corresponding error documentation. */
180
+ errorLink?: Url;
181
+ /** The capability code(s) that were not authorized for the customer on
182
+ this request. Present only when `errorType` is
183
+ `customer_not_authorized`; absent for every other error type.
184
+
185
+ Use this list to render onboarding UX for the listed capabilities, or
186
+ fetch `GET /v2/customers/{customerId}` and inspect each entry's
187
+ `status` / `requirements` to discover what (if anything) can be
188
+ submitted to resolve the block.
189
+ */
190
+ unauthorizedCapabilities?: CapabilityName[];
191
+ }
192
+
193
+ export interface CreateAccountRequest {
194
+ name?: AccountName;
195
+ }
196
+
197
+ /**
198
+ * The symbol of the asset (e.g., eth, usd, usdc, usdt).
199
+ * @minLength 1
200
+ * @maxLength 42
201
+ */
202
+ export type Asset = string;
203
+
204
+ /**
205
+ * The type of the asset.
206
+ */
207
+ export type AssetType = (typeof AssetType)[keyof typeof AssetType];
208
+
209
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
210
+ export const AssetType = {
211
+ fiat: "fiat",
212
+ crypto: "crypto",
213
+ } as const;
214
+
215
+ /**
216
+ * An asset, e.g. fiat or crypto.
217
+ */
218
+ export interface BalancesAsset {
219
+ symbol: Asset;
220
+ type: AssetType;
221
+ /** The name of the asset. */
222
+ name: string;
223
+ /** The number of decimals (i.e. significant digits to the right of the decimal point) supported for the asset. */
224
+ decimals: number;
225
+ }
226
+
227
+ /**
228
+ * Available and total amounts for a specific currency.
229
+ */
230
+ export interface AmountDetail {
231
+ /** The amount that is currently available to be used. */
232
+ available: string;
233
+ /** The total amount, including the amount that is currently on hold. */
234
+ total: string;
235
+ }
236
+
237
+ /**
238
+ * Amount details denominated in different assets.
239
+ - The keys represent the asset symbols (e.g., "btc", "usd"), - Each value contains available and total amounts. - There will always be an entry for the asset specified in the `asset` field.
240
+ */
241
+ export type BalanceAmount = { [key: string]: AmountDetail };
242
+
243
+ /**
244
+ * A balance of an asset.
245
+ */
246
+ export interface Balance {
247
+ asset: BalancesAsset;
248
+ /** Amount details denominated in different assets.
249
+ - The keys represent the asset symbols (e.g., "btc", "usd"), - Each value contains available and total amounts. - There will always be an entry for the asset specified in the `asset` field. */
250
+ amount: BalanceAmount;
251
+ }
252
+
253
+ /**
254
+ * A list of balances for an account.
255
+ */
256
+ export interface Balances {
257
+ /** The list of balances. */
258
+ balances: Balance[];
259
+ }
260
+
261
+ /**
262
+ * The type of deposit destination.
263
+ */
264
+ export type DepositDestinationType = string;
265
+
266
+ /**
267
+ * The ID of the Deposit Destination, which is a UUID prefixed by the string `depositDestination_`.
268
+ * @pattern ^depositDestination_[a-f0-9\-]{36}$
269
+ */
270
+ export type DepositDestinationId = string;
271
+
272
+ /**
273
+ * The blockchain network for the payment. Supported networks depend on the account type. See [API and Network Support](https://docs.cdp.coinbase.com/api-reference/payment-apis/supported-networks-assets#by-asset-and-network) for more details.
274
+ */
275
+ export type Network = (typeof Network)[keyof typeof Network];
276
+
277
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
278
+ export const Network = {
279
+ base: "base",
280
+ ethereum: "ethereum",
281
+ solana: "solana",
282
+ aptos: "aptos",
283
+ arbitrum: "arbitrum",
284
+ "arbitrum-sepolia": "arbitrum-sepolia",
285
+ optimism: "optimism",
286
+ polygon: "polygon",
287
+ world: "world",
288
+ "world-sepolia": "world-sepolia",
289
+ } as const;
290
+
291
+ /**
292
+ * A blockchain address. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana).
293
+ * @minLength 1
294
+ * @maxLength 128
295
+ */
296
+ export type BlockchainAddress = string;
297
+
298
+ /**
299
+ * Crypto-specific deposit destination details. In responses, this object is always present. Contains the network and address for the deposit destination.
300
+ */
301
+ export interface DepositDestinationCrypto {
302
+ network: Network;
303
+ address: BlockchainAddress;
304
+ }
305
+
306
+ /**
307
+ * The account and asset where incoming deposits should be credited.
308
+ */
309
+ export interface DepositDestinationTargetAccount {
310
+ /** The ID of the CDP Account to which deposited funds should be transferred. */
311
+ accountId?: AccountId;
312
+ /** The symbol of the asset that should land in the target account. */
313
+ asset: Asset;
314
+ }
315
+
316
+ /**
317
+ * The intended target for deposited funds.
318
+ */
319
+ export type DepositDestinationTarget = DepositDestinationTargetAccount;
320
+
321
+ /**
322
+ * The status of the deposit destination.
323
+ */
324
+ export type DepositDestinationStatus =
325
+ (typeof DepositDestinationStatus)[keyof typeof DepositDestinationStatus];
326
+
327
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
328
+ export const DepositDestinationStatus = {
329
+ active: "active",
330
+ inactive: "inactive",
331
+ pending: "pending",
332
+ } as const;
333
+
334
+ /**
335
+ * Optional metadata as key-value pairs. Use this to store additional structured information on a resource, such as customer IDs, order references, or any application-specific data. Up to 10 key/value pairs may be provided. Keys and values are both strings. Keys must be ≤ 40 characters; values must be ≤ 500 characters.
336
+ */
337
+ export interface Metadata {
338
+ [key: string]: string;
339
+ }
340
+
341
+ export type CryptoDepositDestinationType =
342
+ (typeof CryptoDepositDestinationType)[keyof typeof CryptoDepositDestinationType];
343
+
344
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
345
+ export const CryptoDepositDestinationType = {
346
+ crypto: "crypto",
347
+ } as const;
348
+
349
+ /**
350
+ * A cryptocurrency deposit destination.
351
+ */
352
+ export interface CryptoDepositDestination {
353
+ depositDestinationId: DepositDestinationId;
354
+ accountId: AccountId;
355
+ type: CryptoDepositDestinationType;
356
+ /** Crypto-specific details for this deposit destination. Always populated in responses. Contains the network and address. */
357
+ crypto: DepositDestinationCrypto;
358
+ target?: DepositDestinationTarget;
359
+ status: DepositDestinationStatus;
360
+ metadata?: Metadata;
361
+ /** The timestamp when the deposit destination was created. */
362
+ createdAt: string;
363
+ /** The timestamp when the deposit destination was last updated. */
364
+ updatedAt: string;
365
+ }
366
+
367
+ /**
368
+ * A deposit destination for receiving funds to an account.
369
+ */
370
+ export type DepositDestination = CryptoDepositDestination;
371
+
372
+ /**
373
+ * Common fields for creating a deposit destination.
374
+ */
375
+ export interface CreateDepositDestinationRequestBase {
376
+ /** The ID of the Account, which is a UUID prefixed by the string `account_`, that owns the deposit destination. */
377
+ accountId: AccountId;
378
+ type: DepositDestinationType;
379
+ target?: DepositDestinationTarget;
380
+ metadata?: Metadata;
381
+ }
382
+
383
+ /**
384
+ * Crypto-specific details for creating a deposit destination.
385
+ */
386
+ export interface CreateDepositDestinationCrypto {
387
+ network: Network;
388
+ }
389
+
390
+ export type CreateCryptoDepositDestinationRequestAllOfType =
391
+ (typeof CreateCryptoDepositDestinationRequestAllOfType)[keyof typeof CreateCryptoDepositDestinationRequestAllOfType];
392
+
393
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
394
+ export const CreateCryptoDepositDestinationRequestAllOfType = {
395
+ crypto: "crypto",
396
+ } as const;
397
+
398
+ export type CreateCryptoDepositDestinationRequestAllOf = {
399
+ type?: CreateCryptoDepositDestinationRequestAllOfType;
400
+ /** Crypto-specific details. Required when `type` is `crypto`. */
401
+ crypto: CreateDepositDestinationCrypto;
402
+ };
403
+
404
+ export type CreateCryptoDepositDestinationRequestType =
405
+ (typeof CreateCryptoDepositDestinationRequestType)[keyof typeof CreateCryptoDepositDestinationRequestType];
406
+
407
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
408
+ export const CreateCryptoDepositDestinationRequestType = {
409
+ crypto: "crypto",
410
+ } as const;
411
+
412
+ export type CreateCryptoDepositDestinationRequest = CreateDepositDestinationRequestBase &
413
+ CreateCryptoDepositDestinationRequestAllOf & {
414
+ type: CreateCryptoDepositDestinationRequestType;
415
+ };
416
+
417
+ /**
418
+ * Request to create a new deposit destination. Provide the type-specific details matching the chosen `type`.
419
+ */
420
+ export type CreateDepositDestinationRequest = CreateCryptoDepositDestinationRequest;
421
+
422
+ /**
423
+ * The current status of the transfer, indicating what action you need to take next. Required when validateOnly is false.
424
+ */
425
+ export type TransferStatus = (typeof TransferStatus)[keyof typeof TransferStatus];
426
+
427
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
428
+ export const TransferStatus = {
429
+ /** Transfer was created with `execute: true`, but is momentarily being quoted before executing _or_ the transfer was created with `execute: false`. It can be executed by calling `\/v2\/transfers\/{transferId}\/execute` with `execute: true`. */
430
+ quoted: "quoted",
431
+ /** Transfer is executing after being quoted. No action needed - monitor progress via the transfers webhook. */
432
+ processing: "processing",
433
+ /** Transfer completed successfully. */
434
+ completed: "completed",
435
+ /** Transfer failed. See `failureReason` for details. */
436
+ failed: "failed",
437
+ } as const;
438
+
439
+ /**
440
+ * An email address. Maximum length 254 characters per [RFC 5321](https://www.rfc-editor.org/rfc/rfc5321).
441
+ * @maxLength 254
442
+ */
443
+ export type Email = string;
444
+
445
+ /**
446
+ * The Account specific details for the transfer.
447
+ */
448
+ export interface TransfersAccount {
449
+ /** The ID of the Account. */
450
+ accountId: string;
451
+ asset: Asset;
452
+ }
453
+
454
+ /**
455
+ * The Payment Method specific details for the transfer.
456
+ */
457
+ export interface PaymentMethod {
458
+ /** The ID of the Payment Method. */
459
+ paymentMethodId: string;
460
+ asset: Asset;
461
+ }
462
+
463
+ /**
464
+ * The target of the payment is an onchain address.
465
+ */
466
+ export interface OnchainAddress {
467
+ /** The onchain crypto address of the recipient.
468
+
469
+ Examples:
470
+ - EVM address: 0xabc1234567890abcdef1234567890abcdef123456
471
+ - Solana address: HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT
472
+ - XRP address: rhccc5p23aKiCGFcEqqnjEfLRZ6xEvfy3s
473
+ */
474
+ address: BlockchainAddress;
475
+ network: Network;
476
+ /** The destination tag of the onchain address. Destination tags are used by certain networks
477
+ (primarily XRP/Ripple) to identify specific recipients when multiple users share a single address.
478
+ The tag ensures funds are credited to the correct account within the shared address.
479
+
480
+ Examples by network:
481
+ - XRP/Ripple: Numeric values like "1234567890" or "123456"
482
+ - Stellar (XLM): Memos which can be text, ID, or hash format
483
+
484
+ Note: Most networks (Ethereum, Bitcoin, Solana) do not use destination tags.
485
+ */
486
+ destinationTag?: string;
487
+ /** Asset symbol of the payment received by the recipient. */
488
+ asset: Asset;
489
+ }
490
+
491
+ /**
492
+ * The originating US bank account details for the transfer source. Present when funds were deposited from an external bank account into a deposit destination. Only the last 4 digits of the account number are exposed.
493
+ */
494
+ export interface OriginatingBankAccountUS {
495
+ /** The name of the bank that originated the deposit. */
496
+ bankName: string;
497
+ /**
498
+ * The last 4 digits of the originating bank account number.
499
+ * @pattern ^[0-9]{4}$
500
+ */
501
+ accountLast4: string;
502
+ /** The fiat currency of the deposit (e.g., `usd`). */
503
+ currency: string;
504
+ }
505
+
506
+ /**
507
+ * The source of the transfer.
508
+ */
509
+ export type TransferSource =
510
+ | TransfersAccount
511
+ | PaymentMethod
512
+ | OnchainAddress
513
+ | OriginatingBankAccountUS;
514
+
515
+ /**
516
+ * The target of the payment is an email address.
517
+ */
518
+ export interface EmailAddress {
519
+ /** The email address of the recipient. The recipient will need to have an account with Coinbase or onboard to Coinbase to receive the payment. */
520
+ email: Email;
521
+ }
522
+
523
+ export type EmailInstrumentAllOf = {
524
+ /** Asset symbol of the payment received by the recipient. */
525
+ asset: Asset;
526
+ };
527
+
528
+ /**
529
+ * The target of the payment is an email address.
530
+ */
531
+ export type EmailInstrument = EmailAddress & EmailInstrumentAllOf;
532
+
533
+ /**
534
+ * The target of the transfer.
535
+ */
536
+ export type TransferTarget = TransfersAccount | PaymentMethod | OnchainAddress | EmailInstrument;
537
+
538
+ /**
539
+ * Exchange rate information for currency conversion. The rate indicates how much of the target asset is equivalent to one unit of the source asset.
540
+ */
541
+ export interface TransferExchangeRate {
542
+ /** The asset being converted from. */
543
+ sourceAsset: Asset;
544
+ /** The asset being converted to. */
545
+ targetAsset: Asset;
546
+ /** The exchange rate value as a decimal string. Indicates how many units of the target asset equal one unit of the source asset. */
547
+ rate: string;
548
+ }
549
+
550
+ /**
551
+ * The type of the fee, indicating its purpose.
552
+ */
553
+ export type TransferFeeType = (typeof TransferFeeType)[keyof typeof TransferFeeType];
554
+
555
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
556
+ export const TransferFeeType = {
557
+ BankFee: "bank",
558
+ ConversionFee: "conversion",
559
+ NetworkFee: "network",
560
+ OtherFee: "other",
561
+ } as const;
562
+
563
+ /**
564
+ * A single fee for a transfer.
565
+ */
566
+ export interface TransferFee {
567
+ /** The type of the fee, indicating its purpose. */
568
+ type: TransferFeeType;
569
+ /** The amount of the fee in units of the asset specified by `asset`. */
570
+ amount: string;
571
+ /** The asset symbol. */
572
+ asset: Asset;
573
+ }
574
+
575
+ /**
576
+ * The fees associated with this transfer. Different transfer types have different fee structures.
577
+
578
+ **NOTE:** These examples are not exhaustive.
579
+
580
+ Common examples:
581
+ * **Crypto transfers**: Network fees (gas) paid in the native token
582
+ * **Fiat conversions**: Processing fees + exchange fees in USD
583
+ * **Wire transfers**: Wire fees ($15) + processing fees ($5) in USD
584
+ * **Crypto conversions**: Spread fees paid in the source asset.
585
+ */
586
+ export type TransferFees = TransferFee[];
587
+
588
+ /**
589
+ * A point-in-time snapshot of estimated values for a transfer where exact amounts cannot be locked in at quote time (e.g., when the executed rate is determined at execution time and moves with the market).
590
+
591
+ Present in both pre-execution and post-execution states:
592
+ * **Quoted state:** top-level fields whose values cannot be guaranteed are absent;
593
+ `estimate` holds their estimated values.
594
+
595
+ * **Completed state:** top-level fields contain the actual executed values;
596
+ `estimate` is retained as an immutable audit snapshot of the pre-execution estimate.
597
+ */
598
+ export interface TransferEstimate {
599
+ exchangeRate?: TransferExchangeRate;
600
+ /** Estimated amount of the target asset that will be received, as a decimal string in standard unit denomination. */
601
+ targetAmount?: string;
602
+ /** The asset symbol of the estimated target amount. */
603
+ targetAsset?: Asset;
604
+ fees?: TransferFees;
605
+ /** The date and time when this estimate was captured. */
606
+ estimatedAt: string;
607
+ }
608
+
609
+ /**
610
+ * A reference to the deposit destination associated with the transfer.
611
+ */
612
+ export interface DepositDestinationReference {
613
+ id: DepositDestinationId;
614
+ }
615
+
616
+ /**
617
+ * The status of a travel rule submission.
618
+ */
619
+ export type TravelRuleStatus = (typeof TravelRuleStatus)[keyof typeof TravelRuleStatus];
620
+
621
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
622
+ export const TravelRuleStatus = {
623
+ /** Additional fields are required before the transfer can proceed. */
624
+ TravelRuleStatusIncomplete: "incomplete",
625
+ /** All requirements are satisfied and the transfer will proceed. */
626
+ TravelRuleStatusCompleted: "completed",
627
+ } as const;
628
+
629
+ /**
630
+ * An onchain transaction associated with the transfer.
631
+ */
632
+ export type TransferDetailsOnchainTransactionsItem = {
633
+ /** The transaction hash. */
634
+ transactionHash: string;
635
+ network: Network;
636
+ };
637
+
638
+ /**
639
+ * Travel rule compliance status for deposit transfers. Present when the transfer requires travel rule information.
640
+ */
641
+ export type TransferDetailsTravelRule = {
642
+ status?: TravelRuleStatus;
643
+ /** Additional details about the current travel rule status. For example, when status is `incomplete`, this may indicate the specific missing information required to proceed. */
644
+ statusMessage?: string;
645
+ };
646
+
647
+ /**
648
+ * Additional details about the transfer. For example, if the transfer was sent to a deposit destination, the information about that destination will be included in this field.
649
+ */
650
+ export interface TransferDetails {
651
+ depositDestination?: DepositDestinationReference;
652
+ /** The onchain transactions associated with the transfer. */
653
+ onchainTransactions?: TransferDetailsOnchainTransactionsItem[];
654
+ /** Travel rule compliance status for deposit transfers. Present when the transfer requires travel rule information. */
655
+ travelRule?: TransferDetailsTravelRule;
656
+ }
657
+
658
+ /**
659
+ * A Transfer represents all the information needed to execute a transfer and tracks the lifecycle of a transfer from initiation through completion or failure.
660
+ */
661
+ export interface Transfer {
662
+ /** The ID of the transfer. Required when validateOnly is false. */
663
+ transferId?: string;
664
+ status?: TransferStatus;
665
+ source: TransferSource;
666
+ target: TransferTarget;
667
+ /** The amount of the source asset that will be transferred out, as a decimal string in standard unit denomination. */
668
+ sourceAmount?: string;
669
+ /** The asset symbol of the source amount. */
670
+ sourceAsset?: Asset;
671
+ /** The amount of the target asset that will be received, as a decimal string in standard unit denomination. */
672
+ targetAmount?: string;
673
+ /** The asset symbol of the target amount. */
674
+ targetAsset?: Asset;
675
+ exchangeRate?: TransferExchangeRate;
676
+ fees?: TransferFees;
677
+ estimate?: TransferEstimate;
678
+ /** The date and time the transfer was completed. */
679
+ completedAt?: string;
680
+ /** The reason for failure, if the transfer failed. Only present when status is `failed`. */
681
+ failureReason?: string;
682
+ /** The date and time when this transfer will expire if not executed. Only present for `quoted` status. A new transfer must be created to obtain an updated quote after expiration. Required when validateOnly is false. */
683
+ expiresAt?: string;
684
+ /** The date and time the transfer was executed and moved to processing. Only present when status has progressed beyond `quoted`. */
685
+ executedAt?: string;
686
+ /** The date and time the transfer was created. Required when validateOnly is false. */
687
+ createdAt?: string;
688
+ /** The date and time the transfer was last updated. Required when validateOnly is false. */
689
+ updatedAt?: string;
690
+ metadata?: Metadata;
691
+ details?: TransferDetails;
692
+ }
693
+
694
+ /**
695
+ * The source of the transfer.
696
+ */
697
+ export type CreateTransferSource = TransfersAccount | PaymentMethod;
698
+
699
+ /**
700
+ * A physical address with standard address components including street, city, state/province, postal code, and country.
701
+ */
702
+ export interface PhysicalAddress {
703
+ /** Primary street address. */
704
+ line1?: string;
705
+ /** Secondary address information. */
706
+ line2?: string;
707
+ /** City or locality. */
708
+ city?: string;
709
+ /** State, province, or region. */
710
+ state?: string;
711
+ /** Postal or ZIP code. */
712
+ postCode?: string;
713
+ /**
714
+ * ISO 3166-1 alpha-2 country code (2 characters). See https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes.
715
+ * @minLength 2
716
+ * @maxLength 2
717
+ */
718
+ countryCode?: string;
719
+ }
720
+
721
+ /**
722
+ * Information about a party (originator or beneficiary) for travel rule compliance.
723
+ */
724
+ export interface TravelRuleParty {
725
+ /** Name of the financial institution. */
726
+ financialInstitution?: string;
727
+ /** Full name of the party. */
728
+ name?: string;
729
+ address?: PhysicalAddress;
730
+ }
731
+
732
+ /**
733
+ * Information about the originating Virtual Asset Service Provider (VASP) that handles cryptocurrency or other virtual assets on behalf of customers.
734
+ */
735
+ export type TravelRuleOriginatorAllOfVirtualAssetServiceProvider = {
736
+ /** The name of the originating Virtual Asset Service Provider (VASP). */
737
+ name?: string;
738
+ /** The address of the originating Virtual Asset Service Provider (VASP). */
739
+ address?: PhysicalAddress;
740
+ /** The Legal Entity Identifier of the originating Virtual Asset Service Provider (VASP). */
741
+ identifier?: string;
742
+ };
743
+
744
+ export type TravelRuleOriginatorAllOf = {
745
+ /** Information about the originating Virtual Asset Service Provider (VASP) that handles cryptocurrency or other virtual assets on behalf of customers. */
746
+ virtualAssetServiceProvider?: TravelRuleOriginatorAllOfVirtualAssetServiceProvider;
747
+ };
748
+
749
+ /**
750
+ * Originator (sender) party.
751
+ */
752
+ export type TravelRuleOriginator = TravelRuleParty & TravelRuleOriginatorAllOf;
753
+
754
+ /**
755
+ * The type of the beneficiary's wallet.
756
+ */
757
+ export type TravelRuleBeneficiaryAllOfWalletType =
758
+ (typeof TravelRuleBeneficiaryAllOfWalletType)[keyof typeof TravelRuleBeneficiaryAllOfWalletType];
759
+
760
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
761
+ export const TravelRuleBeneficiaryAllOfWalletType = {
762
+ custodial: "custodial",
763
+ self_custody: "self_custody",
764
+ } as const;
765
+
766
+ export type TravelRuleBeneficiaryAllOf = {
767
+ /** The type of the beneficiary's wallet. */
768
+ walletType?: TravelRuleBeneficiaryAllOfWalletType;
769
+ };
770
+
771
+ /**
772
+ * Beneficiary (receiver) party.
773
+ */
774
+ export type TravelRuleBeneficiary = TravelRuleParty & TravelRuleBeneficiaryAllOf;
775
+
776
+ /**
777
+ * Required Travel Rule fields differ by region. These requirements are determined based on which Coinbase entity the customer has signed the service agreement for.
778
+ */
779
+ export interface TravelRule {
780
+ /** Indicates whether the user attests that the receiving wallet belongs to them. */
781
+ isSelf?: boolean;
782
+ /** Indicates whether Coinbase is being used as an intermediary Virtual Asset Service Provider (VASP) to send crypto on behalf of your customer.
783
+
784
+ **Background:**
785
+
786
+ The Travel Rule (FATF Recommendation 16) requires VASPs to share originator and beneficiary information for virtual asset transfers. When Coinbase acts as an intermediary, additional Travel Rule data must be provided to satisfy compliance requirements.
787
+
788
+ **Set to `true` when:**
789
+
790
+ - Your organization is a VASP using Coinbase to send crypto **on behalf of your end customer**
791
+ - In this scenario, Coinbase acts as an intermediary in the transfer chain and handles Travel Rule data exchange with the beneficiary VASP
792
+
793
+ **Set to `false` (or omit) when:**
794
+
795
+ - You are transferring funds directly from your own Coinbase account, where **Coinbase is your primary VASP** rather than an intermediary for another institution
796
+
797
+ **Impact on required fields:**
798
+
799
+ When `isIntermediary` is `true`, you must provide the `originator` object with details about the original sender, including:
800
+ - Originator name
801
+ - Originator address
802
+ - Your VASP information (`virtualAssetServiceProvider` object with `name`, `address`, and `identifier`)
803
+ */
804
+ isIntermediary?: boolean;
805
+ originator?: TravelRuleOriginator;
806
+ beneficiary?: TravelRuleBeneficiary;
807
+ }
808
+
809
+ /**
810
+ * Specifies whether the given amount is to be received by the target or taken from the source.
811
+
812
+ - `target`: The transfer `target` receives the exact value specified in `amount`. Fees are added to the amount taken from the transfer `source`.
813
+ - `source`: The transfer `target` receives the value specified in `amount`, minus any fees.
814
+
815
+ */
816
+ export type TransferRequestAmountType =
817
+ (typeof TransferRequestAmountType)[keyof typeof TransferRequestAmountType];
818
+
819
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
820
+ export const TransferRequestAmountType = {
821
+ target: "target",
822
+ source: "source",
823
+ } as const;
824
+
825
+ /**
826
+ * A request to create a transfer.
827
+ */
828
+ export interface TransferRequest {
829
+ source: CreateTransferSource;
830
+ target: TransferTarget;
831
+ /** The amount of the transfer, as a decimal string in standard unit denomination of the asset specified by `asset` (e.g., "100.00" for 100 USD, "0.05" for 0.05 ETH). */
832
+ amount: string;
833
+ /** The symbol of the asset for the amount. This must be one of the assets of the source or target. */
834
+ asset: Asset;
835
+ /** Specifies whether the given amount is to be received by the target or taken from the source.
836
+
837
+ - `target`: The transfer `target` receives the exact value specified in `amount`. Fees are added to the amount taken from the transfer `source`.
838
+ - `source`: The transfer `target` receives the value specified in `amount`, minus any fees.
839
+ */
840
+ amountType?: TransferRequestAmountType;
841
+ /** If true, validates the transfer without initiating it. If the request is valid, a 2xx will be returned. If the request is invalid, a 4xx error will be returned. The response will include an errorType, for e.g. invalid_target if the specified target cannot receive funds. */
842
+ validateOnly?: boolean;
843
+ /** Whether to immediately execute the transfer. If false, the transfer will be created in quoted status and must be executed manually via the /execute endpoint. */
844
+ execute: boolean;
845
+ metadata?: Metadata;
846
+ travelRule?: TravelRule;
847
+ }
848
+
849
+ /**
850
+ * Information about the Virtual Asset Service Provider (VASP) for a deposit travel rule submission.
851
+ */
852
+ export interface DepositTravelRuleVasp {
853
+ /** The Legal Entity Identifier (LEI) of the Virtual Asset Service Provider (VASP). */
854
+ identifier?: string;
855
+ /** The name of the Virtual Asset Service Provider (VASP). */
856
+ name?: string;
857
+ }
858
+
859
+ /**
860
+ * Date of birth.
861
+ */
862
+ export interface DateOfBirth {
863
+ /**
864
+ * Day of birth (01-31).
865
+ * @minLength 2
866
+ * @maxLength 2
867
+ * @pattern ^[0-9]{2}$
868
+ */
869
+ day?: string;
870
+ /**
871
+ * Month of birth (01-12).
872
+ * @minLength 2
873
+ * @maxLength 2
874
+ * @pattern ^[0-9]{2}$
875
+ */
876
+ month?: string;
877
+ /**
878
+ * Year of birth (four digits).
879
+ * @minLength 4
880
+ * @maxLength 4
881
+ * @pattern ^[0-9]{4}$
882
+ */
883
+ year?: string;
884
+ }
885
+
886
+ /**
887
+ * The type of the originator's wallet.
888
+ */
889
+ export type DepositTravelRuleOriginatorWalletType =
890
+ (typeof DepositTravelRuleOriginatorWalletType)[keyof typeof DepositTravelRuleOriginatorWalletType];
891
+
892
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
893
+ export const DepositTravelRuleOriginatorWalletType = {
894
+ /** The originator\'s wallet is held by a custodial service. */
895
+ custodial: "custodial",
896
+ /** The originator\'s wallet is self-custodied. */
897
+ self_custody: "self_custody",
898
+ } as const;
899
+
900
+ /**
901
+ * Originator information for a deposit travel rule submission.
902
+ */
903
+ export interface DepositTravelRuleOriginator {
904
+ /** Full name of the originator. */
905
+ name?: string;
906
+ address?: PhysicalAddress;
907
+ /** The type of the originator's wallet. */
908
+ walletType?: DepositTravelRuleOriginatorWalletType;
909
+ virtualAssetServiceProvider?: DepositTravelRuleVasp;
910
+ /** Government-issued personal identification number for the originator. */
911
+ personalId?: string;
912
+ dateOfBirth?: DateOfBirth;
913
+ }
914
+
915
+ /**
916
+ * Beneficiary information for a deposit travel rule submission.
917
+ */
918
+ export interface DepositTravelRuleBeneficiary {
919
+ /** Full name of the beneficiary. */
920
+ name?: string;
921
+ }
922
+
923
+ /**
924
+ * Request body for submitting travel rule information for a deposit transfer. Required fields vary by jurisdiction.
925
+ */
926
+ export interface DepositTravelRuleRequest {
927
+ originator?: DepositTravelRuleOriginator;
928
+ beneficiary?: DepositTravelRuleBeneficiary;
929
+ /** Indicates whether the user attests that the originating wallet belongs to them. */
930
+ isSelf?: boolean;
931
+ }
932
+
933
+ /**
934
+ * Response from submitting travel rule information for a deposit transfer.
935
+ */
936
+ export interface DepositTravelRuleResponse {
937
+ status: TravelRuleStatus;
938
+ /** List of field paths that are still required to complete travel rule compliance. Each entry is a dot-separated path (e.g., "originator.name", "originator.address.countryCode"). Empty when status is "completed". */
939
+ missingFields?: string[];
940
+ /** Additional context about the current status. Present when status is `incomplete` to explain what needs to be fixed before the transfer can proceed. */
941
+ reason?: string;
942
+ }
943
+
8
944
  /**
9
945
  * The type of authentication information.
10
946
  */
@@ -23,9 +959,15 @@ export interface EmailAuthentication {
23
959
  /** The type of authentication information. */
24
960
  type: EmailAuthenticationType;
25
961
  /** The email address of the end user. */
26
- email: string;
962
+ email: Email;
27
963
  }
28
964
 
965
+ /**
966
+ * A phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.
967
+ * @pattern ^\+[1-9]\d{1,14}$
968
+ */
969
+ export type PhoneNumber = string;
970
+
29
971
  /**
30
972
  * The type of authentication information.
31
973
  */
@@ -43,11 +985,8 @@ export const SmsAuthenticationType = {
43
985
  export interface SmsAuthentication {
44
986
  /** The type of authentication information. */
45
987
  type: SmsAuthenticationType;
46
- /**
47
- * The phone number of the end user in E.164 format.
48
- * @pattern ^\+[1-9]\d{1,14}$
49
- */
50
- phoneNumber: string;
988
+ /** Phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format. */
989
+ phoneNumber: PhoneNumber;
51
990
  }
52
991
 
53
992
  /**
@@ -121,13 +1060,6 @@ export interface TelegramAuthentication {
121
1060
  username?: string;
122
1061
  }
123
1062
 
124
- /**
125
- * A blockchain address. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana).
126
- * @minLength 1
127
- * @maxLength 128
128
- */
129
- export type BlockchainAddress = string;
130
-
131
1063
  /**
132
1064
  * The type of authentication information.
133
1065
  */
@@ -269,113 +1201,7 @@ export interface EndUser {
269
1201
  solanaAccountObjects: EndUserSolanaAccount[];
270
1202
  /** The date and time when the end user was created, in ISO 8601 format. */
271
1203
  createdAt: string;
272
- }
273
-
274
- export interface ListResponse {
275
- /** The token for the next page of items, if any. */
276
- nextPageToken?: string;
277
- }
278
-
279
- /**
280
- * The code that indicates the type of error that occurred. These error codes can be used to determine how to handle the error.
281
- */
282
- export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
283
-
284
- // eslint-disable-next-line @typescript-eslint/no-redeclare
285
- export const ErrorType = {
286
- already_exists: "already_exists",
287
- authorization_expired: "authorization_expired",
288
- bad_gateway: "bad_gateway",
289
- capture_expired: "capture_expired",
290
- client_closed_request: "client_closed_request",
291
- faucet_limit_exceeded: "faucet_limit_exceeded",
292
- forbidden: "forbidden",
293
- idempotency_error: "idempotency_error",
294
- internal_server_error: "internal_server_error",
295
- invalid_request: "invalid_request",
296
- invalid_sql_query: "invalid_sql_query",
297
- invalid_signature: "invalid_signature",
298
- malformed_transaction: "malformed_transaction",
299
- not_found: "not_found",
300
- payment_method_required: "payment_method_required",
301
- payment_required: "payment_required",
302
- settlement_failed: "settlement_failed",
303
- rate_limit_exceeded: "rate_limit_exceeded",
304
- request_canceled: "request_canceled",
305
- service_unavailable: "service_unavailable",
306
- timed_out: "timed_out",
307
- unauthorized: "unauthorized",
308
- policy_violation: "policy_violation",
309
- policy_in_use: "policy_in_use",
310
- account_limit_exceeded: "account_limit_exceeded",
311
- network_not_tradable: "network_not_tradable",
312
- guest_permission_denied: "guest_permission_denied",
313
- guest_region_forbidden: "guest_region_forbidden",
314
- guest_transaction_limit: "guest_transaction_limit",
315
- guest_transaction_count: "guest_transaction_count",
316
- phone_number_verification_expired: "phone_number_verification_expired",
317
- document_verification_failed: "document_verification_failed",
318
- recipient_allowlist_violation: "recipient_allowlist_violation",
319
- recipient_allowlist_pending: "recipient_allowlist_pending",
320
- refund_expired: "refund_expired",
321
- travel_rules_recipient_violation: "travel_rules_recipient_violation",
322
- source_account_invalid: "source_account_invalid",
323
- target_account_invalid: "target_account_invalid",
324
- source_account_not_found: "source_account_not_found",
325
- target_account_not_found: "target_account_not_found",
326
- source_asset_not_supported: "source_asset_not_supported",
327
- target_asset_not_supported: "target_asset_not_supported",
328
- target_email_invalid: "target_email_invalid",
329
- target_onchain_address_invalid: "target_onchain_address_invalid",
330
- transfer_amount_invalid: "transfer_amount_invalid",
331
- transfer_asset_not_supported: "transfer_asset_not_supported",
332
- insufficient_balance: "insufficient_balance",
333
- metadata_too_many_entries: "metadata_too_many_entries",
334
- metadata_key_too_long: "metadata_key_too_long",
335
- metadata_value_too_long: "metadata_value_too_long",
336
- travel_rules_field_missing: "travel_rules_field_missing",
337
- asset_mismatch: "asset_mismatch",
338
- mfa_already_enrolled: "mfa_already_enrolled",
339
- mfa_invalid_code: "mfa_invalid_code",
340
- mfa_flow_expired: "mfa_flow_expired",
341
- mfa_required: "mfa_required",
342
- mfa_not_enrolled: "mfa_not_enrolled",
343
- order_quote_expired: "order_quote_expired",
344
- order_already_filled: "order_already_filled",
345
- order_already_canceled: "order_already_canceled",
346
- account_not_ready: "account_not_ready",
347
- insufficient_liquidity: "insufficient_liquidity",
348
- insufficient_allowance: "insufficient_allowance",
349
- transaction_simulation_failed: "transaction_simulation_failed",
350
- } as const;
351
-
352
- /**
353
- * A valid HTTP or HTTPS URL.
354
- * @minLength 11
355
- * @maxLength 2048
356
- * @pattern ^https?://.*$
357
- */
358
- export type Url = string;
359
-
360
- /**
361
- * An error response including the code for the type of error and a human-readable message describing the error.
362
- */
363
- export interface Error {
364
- errorType: ErrorType;
365
- /** The error message. */
366
- errorMessage: string;
367
- /** A unique identifier for the request that generated the error. This can be used to help debug issues with the API. */
368
- correlationId?: string;
369
- /** A link to the corresponding error documentation. */
370
- errorLink?: Url;
371
- }
372
-
373
- /**
374
- * The symbol of the asset (e.g., eth, usd, usdc, usdt).
375
- * @minLength 1
376
- * @maxLength 42
377
- */
378
- export type Asset = string;
1204
+ }
379
1205
 
380
1206
  /**
381
1207
  * The domain of the EIP-712 typed data.
@@ -2419,6 +3245,7 @@ export interface PrepareUserOperationRule {
2419
3245
  export type SendUserOperationCriteriaItem =
2420
3246
  | EthValueCriterion
2421
3247
  | EvmAddressCriterion
3248
+ | EvmNetworkCriterion
2422
3249
  | EvmDataCriterion
2423
3250
  | NetUSDChangeCriterion;
2424
3251
 
@@ -2859,6 +3686,49 @@ export interface SendEndUserSolAssetRule {
2859
3686
  criteria: SendEndUserSolAssetCriteria;
2860
3687
  }
2861
3688
 
3689
+ export type SendEndUserOperationCriteriaItem =
3690
+ | EthValueCriterion
3691
+ | EvmAddressCriterion
3692
+ | EvmNetworkCriterion
3693
+ | EvmDataCriterion
3694
+ | NetUSDChangeCriterion;
3695
+
3696
+ /**
3697
+ * A schema for specifying criteria for the sendEndUserOperation operation.
3698
+ */
3699
+ export type SendEndUserOperationCriteria = SendEndUserOperationCriteriaItem[];
3700
+
3701
+ /**
3702
+ * Whether matching the rule will cause the request to be rejected or accepted.
3703
+ */
3704
+ export type SendEndUserOperationRuleAction =
3705
+ (typeof SendEndUserOperationRuleAction)[keyof typeof SendEndUserOperationRuleAction];
3706
+
3707
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
3708
+ export const SendEndUserOperationRuleAction = {
3709
+ reject: "reject",
3710
+ accept: "accept",
3711
+ } as const;
3712
+
3713
+ /**
3714
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
3715
+ */
3716
+ export type SendEndUserOperationRuleOperation =
3717
+ (typeof SendEndUserOperationRuleOperation)[keyof typeof SendEndUserOperationRuleOperation];
3718
+
3719
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
3720
+ export const SendEndUserOperationRuleOperation = {
3721
+ sendEndUserOperation: "sendEndUserOperation",
3722
+ } as const;
3723
+
3724
+ export interface SendEndUserOperationRule {
3725
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
3726
+ action: SendEndUserOperationRuleAction;
3727
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
3728
+ operation: SendEndUserOperationRuleOperation;
3729
+ criteria: SendEndUserOperationCriteria;
3730
+ }
3731
+
2862
3732
  export type CreateEndUserEvmSwapCriteriaItem =
2863
3733
  | EvmNetworkCriterion
2864
3734
  | EvmDataCriterion
@@ -2924,6 +3794,7 @@ export type Rule =
2924
3794
  | SignEndUserSolMessageRule
2925
3795
  | SendEndUserEvmAssetRule
2926
3796
  | SendEndUserSolAssetRule
3797
+ | SendEndUserOperationRule
2927
3798
  | CreateEndUserEvmSwapRule;
2928
3799
 
2929
3800
  /**
@@ -3201,13 +4072,6 @@ export interface AccountTokenAddressesResponse {
3201
4072
  totalCount?: number;
3202
4073
  }
3203
4074
 
3204
- /**
3205
- * Optional metadata as key-value pairs. Use this to store additional structured information on a resource, such as customer IDs, order references, or any application-specific data. Up to 10 key/value pairs may be provided. Keys and values are both strings. Keys must be ≤ 40 characters; values must be ≤ 500 characters.
3206
- */
3207
- export interface Metadata {
3208
- [key: string]: string;
3209
- }
3210
-
3211
4075
  /**
3212
4076
  * Additional headers to include in webhook requests.
3213
4077
  */
@@ -3457,99 +4321,462 @@ export type X402ExactEvmPayloadAuthorization = {
3457
4321
  };
3458
4322
 
3459
4323
  /**
3460
- * The x402 protocol exact scheme payload for EVM networks. The scheme is implemented using ERC-3009. For more details, please see [EVM Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md).
4324
+ * The x402 protocol exact scheme payload for EVM networks. The scheme is implemented using ERC-3009. For more details, please see [EVM Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md).
4325
+ */
4326
+ export interface X402ExactEvmPayload {
4327
+ /**
4328
+ * The EIP-712 hex-encoded signature of the ERC-3009 authorization message. Smart account signatures may be longer than 65 bytes.
4329
+ * @pattern ^0x[0-9a-fA-F]{130,}$
4330
+ */
4331
+ signature: string;
4332
+ /** The authorization data for the ERC-3009 authorization message. */
4333
+ authorization: X402ExactEvmPayloadAuthorization;
4334
+ }
4335
+
4336
+ /**
4337
+ * The token permissions for the transfer.
4338
+ */
4339
+ export type X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted = {
4340
+ /**
4341
+ * The 0x-prefixed, checksum EVM address of the token to transfer.
4342
+ * @pattern ^0x[0-9a-fA-F]{40}$
4343
+ */
4344
+ token: string;
4345
+ /** The amount to transfer in atomic units. */
4346
+ amount: string;
4347
+ };
4348
+
4349
+ /**
4350
+ * The witness data containing payment details.
4351
+ */
4352
+ export type X402ExactEvmPermit2PayloadPermit2AuthorizationWitness = {
4353
+ /**
4354
+ * The 0x-prefixed, checksum EVM address of the recipient.
4355
+ * @pattern ^0x[0-9a-fA-F]{40}$
4356
+ */
4357
+ to: string;
4358
+ /** The unix timestamp after which the payment is valid. */
4359
+ validAfter: string;
4360
+ /**
4361
+ * Optional hex-encoded extra data.
4362
+ * @pattern ^0x[0-9a-fA-F]*$
4363
+ */
4364
+ extra?: string;
4365
+ };
4366
+
4367
+ /**
4368
+ * The authorization data for the Permit2 PermitWitnessTransferFrom message.
4369
+ */
4370
+ export type X402ExactEvmPermit2PayloadPermit2Authorization = {
4371
+ /**
4372
+ * The 0x-prefixed, checksum EVM address of the sender of the payment.
4373
+ * @pattern ^0x[0-9a-fA-F]{40}$
4374
+ */
4375
+ from: string;
4376
+ /** The token permissions for the transfer. */
4377
+ permitted: X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted;
4378
+ /**
4379
+ * The 0x-prefixed, checksum EVM address of the spender (x402 Permit2 proxy contract).
4380
+ * @pattern ^0x[0-9a-fA-F]{40}$
4381
+ */
4382
+ spender: string;
4383
+ /**
4384
+ * The Permit2 nonce as a decimal string (uint256).
4385
+ * @pattern ^[0-9]+$
4386
+ */
4387
+ nonce: string;
4388
+ /** The unix timestamp before which the permit is valid. */
4389
+ deadline: string;
4390
+ /** The witness data containing payment details. */
4391
+ witness: X402ExactEvmPermit2PayloadPermit2AuthorizationWitness;
4392
+ };
4393
+
4394
+ /**
4395
+ * The x402 protocol exact scheme payload for EVM networks using Permit2. Permit2 is a universal token approval mechanism that works with any ERC-20 token, unlike ERC-3009 which requires token-level support.
4396
+ */
4397
+ export interface X402ExactEvmPermit2Payload {
4398
+ /**
4399
+ * The EIP-712 hex-encoded signature of the Permit2 PermitWitnessTransferFrom message. Smart account signatures may be longer than 65 bytes.
4400
+ * @pattern ^0x[0-9a-fA-F]{130,}$
4401
+ */
4402
+ signature: string;
4403
+ /** The authorization data for the Permit2 PermitWitnessTransferFrom message. */
4404
+ permit2Authorization: X402ExactEvmPermit2PayloadPermit2Authorization;
4405
+ }
4406
+
4407
+ /**
4408
+ * The x402 protocol exact scheme payload for Solana networks. For more details, please see [Solana Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md).
4409
+ */
4410
+ export interface X402ExactSolanaPayload {
4411
+ /** The base64-encoded Solana transaction. */
4412
+ transaction: string;
4413
+ }
4414
+
4415
+ /**
4416
+ * The token permissions for the transfer.
4417
+ */
4418
+ export type X402UptoEvmPermit2PayloadPermit2AuthorizationPermitted = {
4419
+ /**
4420
+ * The 0x-prefixed, checksum EVM address of the token to transfer.
4421
+ * @pattern ^0x[0-9a-fA-F]{40}$
4422
+ */
4423
+ token: string;
4424
+ /** The maximum amount the client authorizes to transfer in atomic units. */
4425
+ amount: string;
4426
+ };
4427
+
4428
+ /**
4429
+ * The witness data containing payment details. Includes a `facilitator` field to bind the authorization to a specific facilitator address.
4430
+ */
4431
+ export type X402UptoEvmPermit2PayloadPermit2AuthorizationWitness = {
4432
+ /**
4433
+ * The 0x-prefixed, checksum EVM address of the recipient.
4434
+ * @pattern ^0x[0-9a-fA-F]{40}$
4435
+ */
4436
+ to: string;
4437
+ /**
4438
+ * The 0x-prefixed, checksum EVM address of the facilitator authorized to settle this payment. MUST match the `facilitatorAddress` advertised in the payment requirements `extra` field.
4439
+ * @pattern ^0x[0-9a-fA-F]{40}$
4440
+ */
4441
+ facilitator: string;
4442
+ /** The unix timestamp after which the payment is valid. */
4443
+ validAfter: string;
4444
+ };
4445
+
4446
+ /**
4447
+ * The authorization data for the Permit2 PermitWitnessTransferFrom message. The `permitted.amount` is the maximum the client authorizes; the actual settled amount is decided by the resource server at settle time and MUST be less than or equal to it.
4448
+ */
4449
+ export type X402UptoEvmPermit2PayloadPermit2Authorization = {
4450
+ /**
4451
+ * The 0x-prefixed, checksum EVM address of the sender of the payment.
4452
+ * @pattern ^0x[0-9a-fA-F]{40}$
4453
+ */
4454
+ from: string;
4455
+ /** The token permissions for the transfer. */
4456
+ permitted: X402UptoEvmPermit2PayloadPermit2AuthorizationPermitted;
4457
+ /**
4458
+ * The 0x-prefixed, checksum EVM address of the spender (the x402 Upto Permit2 proxy contract).
4459
+ * @pattern ^0x[0-9a-fA-F]{40}$
4460
+ */
4461
+ spender: string;
4462
+ /**
4463
+ * The Permit2 nonce as a decimal string (uint256).
4464
+ * @pattern ^[0-9]+$
4465
+ */
4466
+ nonce: string;
4467
+ /** The unix timestamp before which the permit is valid. */
4468
+ deadline: string;
4469
+ /** The witness data containing payment details. Includes a `facilitator` field to bind the authorization to a specific facilitator address. */
4470
+ witness: X402UptoEvmPermit2PayloadPermit2AuthorizationWitness;
4471
+ };
4472
+
4473
+ /**
4474
+ * The x402 protocol upto scheme payload for EVM networks using Permit2. The `upto` scheme authorizes a maximum amount and lets the facilitator settle for the actual amount used. Structurally identical to `x402ExactEvmPermit2Payload` except `permit2Authorization.witness` carries an additional `facilitator` address that binds the authorization to a specific facilitator (the one announced via `extra.facilitatorAddress` in the payment requirements). For more details, see [EVM Upto Scheme Details](https://github.com/x402-foundation/x402/blob/main/specs/schemes/upto/scheme_upto_evm.md).
4475
+ */
4476
+ export interface X402UptoEvmPermit2Payload {
4477
+ /**
4478
+ * The EIP-712 hex-encoded signature of the Permit2 PermitWitnessTransferFrom message. Smart account signatures may be longer than 65 bytes.
4479
+ * @pattern ^0x[0-9a-fA-F]{130,}$
4480
+ */
4481
+ signature: string;
4482
+ /** The authorization data for the Permit2 PermitWitnessTransferFrom message. The `permitted.amount` is the maximum the client authorizes; the actual settled amount is decided by the resource server at settle time and MUST be less than or equal to it. */
4483
+ permit2Authorization: X402UptoEvmPermit2PayloadPermit2Authorization;
4484
+ }
4485
+
4486
+ /**
4487
+ * Immutable configuration for an x402 batch-settlement payment channel. The EIP-712 hash of this struct produces the `channelId` used by all batch-settlement payloads.
4488
+ */
4489
+ export interface X402BatchSettlementChannelConfig {
4490
+ /**
4491
+ * The 0x-prefixed, checksum EVM address of the payer (channel funder).
4492
+ * @pattern ^0x[0-9a-fA-F]{40}$
4493
+ */
4494
+ payer: string;
4495
+ /**
4496
+ * The 0x-prefixed, checksum EVM address authorized to sign vouchers on behalf of the payer.
4497
+ * @pattern ^0x[0-9a-fA-F]{40}$
4498
+ */
4499
+ payerAuthorizer: string;
4500
+ /**
4501
+ * The 0x-prefixed, checksum EVM address of the receiver (resource server / merchant).
4502
+ * @pattern ^0x[0-9a-fA-F]{40}$
4503
+ */
4504
+ receiver: string;
4505
+ /**
4506
+ * The 0x-prefixed, checksum EVM address authorized to sign claim batches on behalf of the receiver (typically the facilitator).
4507
+ * @pattern ^0x[0-9a-fA-F]{40}$
4508
+ */
4509
+ receiverAuthorizer: string;
4510
+ /**
4511
+ * The 0x-prefixed, checksum EVM address of the ERC-20 payment token.
4512
+ * @pattern ^0x[0-9a-fA-F]{40}$
4513
+ */
4514
+ token: string;
4515
+ /**
4516
+ * The non-cooperative withdraw delay in seconds. Must be between 900 (15 minutes) and 2,592,000 (30 days).
4517
+ * @minimum 900
4518
+ * @maximum 2592000
4519
+ */
4520
+ withdrawDelay: number;
4521
+ /**
4522
+ * A 32-byte salt used to differentiate channels between the same payer/receiver pair.
4523
+ * @pattern ^0x[0-9a-fA-F]{64}$
4524
+ */
4525
+ salt: string;
4526
+ }
4527
+
4528
+ /**
4529
+ * A signed cumulative-ceiling voucher for an x402 batch-settlement channel. `maxClaimableAmount` is monotonically increasing across requests in the same channel; the receiver may claim any amount up to this ceiling.
4530
+ */
4531
+ export interface X402BatchSettlementVoucher {
4532
+ /**
4533
+ * The 32-byte EIP-712 hash of the `channelConfig` for this voucher's channel.
4534
+ * @pattern ^0x[0-9a-fA-F]{64}$
4535
+ */
4536
+ channelId: string;
4537
+ /**
4538
+ * The cumulative maximum amount (uint128 as decimal string) the receiver is authorized to claim from this channel as of this voucher.
4539
+ * @pattern ^[0-9]+$
4540
+ */
4541
+ maxClaimableAmount: string;
4542
+ /**
4543
+ * The EIP-712 hex-encoded signature of the voucher by `payerAuthorizer`.
4544
+ * @pattern ^0x[0-9a-fA-F]+$
4545
+ */
4546
+ signature: string;
4547
+ }
4548
+
4549
+ export type X402BatchSettlementDepositPayloadType =
4550
+ (typeof X402BatchSettlementDepositPayloadType)[keyof typeof X402BatchSettlementDepositPayloadType];
4551
+
4552
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
4553
+ export const X402BatchSettlementDepositPayloadType = {
4554
+ deposit: "deposit",
4555
+ } as const;
4556
+
4557
+ /**
4558
+ * An ERC-3009 receiveWithAuthorization message authorizing the channel-funding transfer.
4559
+ */
4560
+ export type X402BatchSettlementDepositPayloadDepositAuthorizationErc3009Authorization = {
4561
+ /** The unix timestamp after which the authorization is valid. */
4562
+ validAfter: string;
4563
+ /** The unix timestamp before which the authorization is valid. */
4564
+ validBefore: string;
4565
+ /**
4566
+ * The 32-byte ERC-3009 nonce/salt for replay protection.
4567
+ * @pattern ^0x[0-9a-fA-F]{64}$
4568
+ */
4569
+ salt: string;
4570
+ /**
4571
+ * The EIP-712 hex-encoded signature of the ERC-3009 authorization.
4572
+ * @pattern ^0x[0-9a-fA-F]+$
4573
+ */
4574
+ signature: string;
4575
+ };
4576
+
4577
+ /**
4578
+ * The asset-transfer authorization for the deposit. Currently only ERC-3009 is supported.
4579
+ */
4580
+ export type X402BatchSettlementDepositPayloadDepositAuthorization = {
4581
+ /** An ERC-3009 receiveWithAuthorization message authorizing the channel-funding transfer. */
4582
+ erc3009Authorization?: X402BatchSettlementDepositPayloadDepositAuthorizationErc3009Authorization;
4583
+ };
4584
+
4585
+ /**
4586
+ * The deposit amount and asset-transfer authorization that funds the channel.
4587
+ */
4588
+ export type X402BatchSettlementDepositPayloadDeposit = {
4589
+ /**
4590
+ * The deposit amount in atomic units of `channelConfig.token`.
4591
+ * @pattern ^[0-9]+$
4592
+ */
4593
+ amount: string;
4594
+ /** The asset-transfer authorization for the deposit. Currently only ERC-3009 is supported. */
4595
+ authorization: X402BatchSettlementDepositPayloadDepositAuthorization;
4596
+ };
4597
+
4598
+ /**
4599
+ * Sent on the first request to fund a channel via an ERC-3009 receiveWithAuthorization deposit.
3461
4600
  */
3462
- export interface X402ExactEvmPayload {
3463
- /**
3464
- * The EIP-712 hex-encoded signature of the ERC-3009 authorization message. Smart account signatures may be longer than 65 bytes.
3465
- * @pattern ^0x[0-9a-fA-F]{130,}$
3466
- */
3467
- signature: string;
3468
- /** The authorization data for the ERC-3009 authorization message. */
3469
- authorization: X402ExactEvmPayloadAuthorization;
4601
+ export interface X402BatchSettlementDepositPayload {
4602
+ type: X402BatchSettlementDepositPayloadType;
4603
+ channelConfig: X402BatchSettlementChannelConfig;
4604
+ voucher: X402BatchSettlementVoucher;
4605
+ /** The deposit amount and asset-transfer authorization that funds the channel. */
4606
+ deposit: X402BatchSettlementDepositPayloadDeposit;
3470
4607
  }
3471
4608
 
4609
+ export type X402BatchSettlementVoucherPayloadType =
4610
+ (typeof X402BatchSettlementVoucherPayloadType)[keyof typeof X402BatchSettlementVoucherPayloadType];
4611
+
4612
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
4613
+ export const X402BatchSettlementVoucherPayloadType = {
4614
+ voucher: "voucher",
4615
+ } as const;
4616
+
3472
4617
  /**
3473
- * The token permissions for the transfer.
4618
+ * Sent on subsequent requests against an already-funded channel; carries only the latest cumulative voucher.
3474
4619
  */
3475
- export type X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted = {
4620
+ export interface X402BatchSettlementVoucherPayload {
4621
+ type: X402BatchSettlementVoucherPayloadType;
4622
+ channelConfig: X402BatchSettlementChannelConfig;
4623
+ voucher: X402BatchSettlementVoucher;
4624
+ }
4625
+
4626
+ /**
4627
+ * The voucher to claim, identified by the channel config it was signed against and its cumulative ceiling. Field shape mirrors the on-chain claim struct.
4628
+ */
4629
+ export type X402BatchSettlementClaimVoucher = {
4630
+ channel: X402BatchSettlementChannelConfig;
3476
4631
  /**
3477
- * The 0x-prefixed, checksum EVM address of the token to transfer.
3478
- * @pattern ^0x[0-9a-fA-F]{40}$
4632
+ * The cumulative maximum claimable amount (uint128 as decimal string) signed by the payer authorizer.
4633
+ * @pattern ^[0-9]+$
3479
4634
  */
3480
- token: string;
3481
- /** The amount to transfer in atomic units. */
3482
- amount: string;
4635
+ maxClaimableAmount: string;
3483
4636
  };
3484
4637
 
3485
4638
  /**
3486
- * The witness data containing payment details.
4639
+ * A single voucher claim within a batched on-chain claim transaction. Used by `x402BatchSettlementClaimPayload.claims` and by the server-enriched shape of `x402BatchSettlementRefundPayload.claims`.
4640
+ NOTE: the nested `voucher` here has a **different shape** from the top-level `x402BatchSettlementVoucher` schema. The top-level voucher is the signed cumulative-ceiling message sent by a client (`{channelId, maxClaimableAmount, signature}`). This nested `voucher` mirrors the on-chain claim struct (`{channel: ChannelConfig, maxClaimableAmount}`) that participates in the EIP-712 hash, with `signature` and `totalClaimed` as siblings rather than nested fields. The field names match the upstream x402 protocol and the on-chain Solidity struct; they cannot be renamed without breaking wire and EIP-712 compatibility.
3487
4641
  */
3488
- export type X402ExactEvmPermit2PayloadPermit2AuthorizationWitness = {
4642
+ export interface X402BatchSettlementClaim {
4643
+ /** The voucher to claim, identified by the channel config it was signed against and its cumulative ceiling. Field shape mirrors the on-chain claim struct. */
4644
+ voucher: X402BatchSettlementClaimVoucher;
3489
4645
  /**
3490
- * The 0x-prefixed, checksum EVM address of the recipient.
3491
- * @pattern ^0x[0-9a-fA-F]{40}$
4646
+ * The voucher signature from `payerAuthorizer`.
4647
+ * @pattern ^0x[0-9a-fA-F]+$
3492
4648
  */
3493
- to: string;
3494
- /** The unix timestamp after which the payment is valid. */
3495
- validAfter: string;
4649
+ signature: string;
3496
4650
  /**
3497
- * Optional hex-encoded extra data.
3498
- * @pattern ^0x[0-9a-fA-F]*$
4651
+ * The cumulative amount already claimed from this channel as of this claim.
4652
+ * @pattern ^[0-9]+$
3499
4653
  */
3500
- extra?: string;
3501
- };
4654
+ totalClaimed: string;
4655
+ }
4656
+
4657
+ export type X402BatchSettlementRefundPayloadType =
4658
+ (typeof X402BatchSettlementRefundPayloadType)[keyof typeof X402BatchSettlementRefundPayloadType];
4659
+
4660
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
4661
+ export const X402BatchSettlementRefundPayloadType = {
4662
+ refund: "refund",
4663
+ } as const;
3502
4664
 
3503
4665
  /**
3504
- * The authorization data for the Permit2 PermitWitnessTransferFrom message.
4666
+ * A cooperative refund request. The client emits the minimal shape (just `channelConfig` and `voucher`, with an optional `amount`). A mediating server enriches the payload with `amount`, `refundNonce`, and `claims` before forwarding to the facilitator. Authorizer signatures are optional — the facilitator auto-signs when absent. Field presence determines which shape was sent; the facilitator dispatches accordingly.
3505
4667
  */
3506
- export type X402ExactEvmPermit2PayloadPermit2Authorization = {
4668
+ export interface X402BatchSettlementRefundPayload {
4669
+ type: X402BatchSettlementRefundPayloadType;
4670
+ channelConfig: X402BatchSettlementChannelConfig;
4671
+ voucher: X402BatchSettlementVoucher;
3507
4672
  /**
3508
- * The 0x-prefixed, checksum EVM address of the sender of the payment.
3509
- * @pattern ^0x[0-9a-fA-F]{40}$
4673
+ * The refund amount in atomic units of `channelConfig.token`. Optional in the client-emitted shape (defaults to the full remaining channel balance). Required when the payload is enriched by a mediating server.
4674
+ * @pattern ^[0-9]+$
3510
4675
  */
3511
- from: string;
3512
- /** The token permissions for the transfer. */
3513
- permitted: X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted;
4676
+ amount?: string;
3514
4677
  /**
3515
- * The 0x-prefixed, checksum EVM address of the spender (x402 Permit2 proxy contract).
3516
- * @pattern ^0x[0-9a-fA-F]{40}$
4678
+ * The on-chain refund nonce for replay protection (uint256 as decimal string). Only present on the server-enriched shape.
4679
+ * @pattern ^[0-9]+$
3517
4680
  */
3518
- spender: string;
4681
+ refundNonce?: string;
4682
+ /** Voucher claims to include atomically with the refund. Only present on the server-enriched shape. */
4683
+ claims?: X402BatchSettlementClaim[];
3519
4684
  /**
3520
- * The Permit2 nonce as a decimal string (uint256).
3521
- * @pattern ^[0-9]+$
4685
+ * Optional EIP-712 signature from the receiver authorizer over the refund. When omitted, the facilitator auto-signs.
4686
+ * @pattern ^0x[0-9a-fA-F]+$
3522
4687
  */
3523
- nonce: string;
3524
- /** The unix timestamp before which the permit is valid. */
3525
- deadline: string;
3526
- /** The witness data containing payment details. */
3527
- witness: X402ExactEvmPermit2PayloadPermit2AuthorizationWitness;
3528
- };
4688
+ refundAuthorizerSignature?: string;
4689
+ /**
4690
+ * Optional EIP-712 signature from the receiver authorizer over the included claims. When omitted, the facilitator auto-signs.
4691
+ * @pattern ^0x[0-9a-fA-F]+$
4692
+ */
4693
+ claimAuthorizerSignature?: string;
4694
+ }
4695
+
4696
+ export type X402BatchSettlementClaimPayloadType =
4697
+ (typeof X402BatchSettlementClaimPayloadType)[keyof typeof X402BatchSettlementClaimPayloadType];
4698
+
4699
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
4700
+ export const X402BatchSettlementClaimPayloadType = {
4701
+ claim: "claim",
4702
+ } as const;
3529
4703
 
3530
4704
  /**
3531
- * The x402 protocol exact scheme payload for EVM networks using Permit2. Permit2 is a universal token approval mechanism that works with any ERC-20 token, unlike ERC-3009 which requires token-level support.
4705
+ * Server-to-facilitator request to batch on-chain claims of accumulated vouchers. `claimAuthorizerSignature` is optional; when absent the facilitator auto-signs with its receiver-authorizer key.
3532
4706
  */
3533
- export interface X402ExactEvmPermit2Payload {
4707
+ export interface X402BatchSettlementClaimPayload {
4708
+ type: X402BatchSettlementClaimPayloadType;
4709
+ /** The list of voucher claims to batch in a single on-chain `claim` call. */
4710
+ claims: X402BatchSettlementClaim[];
3534
4711
  /**
3535
- * The EIP-712 hex-encoded signature of the Permit2 PermitWitnessTransferFrom message. Smart account signatures may be longer than 65 bytes.
3536
- * @pattern ^0x[0-9a-fA-F]{130,}$
4712
+ * Optional EIP-712 signature from the receiver authorizer over the claim batch. When omitted, the facilitator auto-signs.
4713
+ * @pattern ^0x[0-9a-fA-F]+$
3537
4714
  */
3538
- signature: string;
3539
- /** The authorization data for the Permit2 PermitWitnessTransferFrom message. */
3540
- permit2Authorization: X402ExactEvmPermit2PayloadPermit2Authorization;
4715
+ claimAuthorizerSignature?: string;
3541
4716
  }
3542
4717
 
4718
+ export type X402BatchSettlementSettlePayloadType =
4719
+ (typeof X402BatchSettlementSettlePayloadType)[keyof typeof X402BatchSettlementSettlePayloadType];
4720
+
4721
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
4722
+ export const X402BatchSettlementSettlePayloadType = {
4723
+ settle: "settle",
4724
+ } as const;
4725
+
3543
4726
  /**
3544
- * The x402 protocol exact scheme payload for Solana networks. For more details, please see [Solana Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md).
4727
+ * Server-to-facilitator request to transfer claimed funds for a `(receiver, token)` pair to the receiver wallet.
3545
4728
  */
3546
- export interface X402ExactSolanaPayload {
3547
- /** The base64-encoded Solana transaction. */
3548
- transaction: string;
4729
+ export interface X402BatchSettlementSettlePayload {
4730
+ type: X402BatchSettlementSettlePayloadType;
4731
+ /**
4732
+ * The 0x-prefixed, checksum EVM address of the receiver to settle to.
4733
+ * @pattern ^0x[0-9a-fA-F]{40}$
4734
+ */
4735
+ receiver: string;
4736
+ /**
4737
+ * The 0x-prefixed, checksum EVM address of the token to settle.
4738
+ * @pattern ^0x[0-9a-fA-F]{40}$
4739
+ */
4740
+ token: string;
3549
4741
  }
3550
4742
 
3551
4743
  /**
3552
- * The scheme of the payment protocol to use. Supported schemes are `exact` and `upto`.
4744
+ * The x402 protocol batch-settlement scheme payload for EVM networks. The `batch-settlement` scheme uses pre-funded payment channels with off-chain cumulative-ceiling vouchers, allowing servers to batch-claim accumulated value in a single on-chain transaction. The payload is a discriminated union on the `type` field with five variants:
4745
+
4746
+ - `deposit`: client-initiated channel funding via ERC-3009.
4747
+ - `voucher`: client-side cumulative voucher against an already-funded channel.
4748
+ - `refund`: cooperative refund request. The client emits a minimal shape (just channelConfig + voucher, with an optional `amount`); a mediating server enriches it with `amount`, `refundNonce`, and `claims` before forwarding to the facilitator. Authorizer signatures are optional — the facilitator auto-signs when absent.
4749
+ - `claim`: server-to-facilitator request to batch on-chain voucher claims.
4750
+ - `settle`: server-to-facilitator request to transfer claimed funds to the receiver.
4751
+
4752
+ For more details, see [batch-settlement specs](https://github.com/x402-foundation/x402/tree/main/specs/schemes/batch-settlement).
4753
+ */
4754
+ export type X402BatchSettlementEvmPayload =
4755
+ | X402BatchSettlementDepositPayload
4756
+ | X402BatchSettlementVoucherPayload
4757
+ | X402BatchSettlementRefundPayload
4758
+ | X402BatchSettlementClaimPayload
4759
+ | X402BatchSettlementSettlePayload;
4760
+
4761
+ /**
4762
+ * The x402 v2 network identifier in CAIP-2 format. x402 v2 identifies networks by their CAIP-2 chain ID (e.g. `eip155:<chainId>` for EVM networks, `solana:<genesisHash>` for Solana). Supported networks: Base, Polygon, Arbitrum One, World Chain (EVM), and Solana.
4763
+ */
4764
+ export type X402V2Network = (typeof X402V2Network)[keyof typeof X402V2Network];
4765
+
4766
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
4767
+ export const X402V2Network = {
4768
+ "eip155:8453": "eip155:8453",
4769
+ "eip155:84532": "eip155:84532",
4770
+ "eip155:137": "eip155:137",
4771
+ "eip155:42161": "eip155:42161",
4772
+ "eip155:480": "eip155:480",
4773
+ "eip155:4801": "eip155:4801",
4774
+ "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
4775
+ "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
4776
+ } as const;
4777
+
4778
+ /**
4779
+ * The scheme of the payment protocol to use. Supported schemes are `exact`, `upto`, and `batch-settlement`.
3553
4780
  */
3554
4781
  export type X402V2PaymentRequirementsScheme =
3555
4782
  (typeof X402V2PaymentRequirementsScheme)[keyof typeof X402V2PaymentRequirementsScheme];
@@ -3558,6 +4785,7 @@ export type X402V2PaymentRequirementsScheme =
3558
4785
  export const X402V2PaymentRequirementsScheme = {
3559
4786
  exact: "exact",
3560
4787
  upto: "upto",
4788
+ "batch-settlement": "batch-settlement",
3561
4789
  } as const;
3562
4790
 
3563
4791
  /**
@@ -3566,33 +4794,27 @@ export const X402V2PaymentRequirementsScheme = {
3566
4794
  export type X402V2PaymentRequirementsExtra = { [key: string]: unknown };
3567
4795
 
3568
4796
  /**
3569
- * The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
4797
+ * The x402 v2 payment requirements. Uses CAIP-2 network identifiers and supports `exact`, `upto`, and `batch-settlement` schemes. Carries only the payment fields (no resource metadata that is in the enclosing `x402V2PaymentPayload.resource`).
3570
4798
  */
3571
4799
  export interface X402V2PaymentRequirements {
3572
- /** The scheme of the payment protocol to use. Supported schemes are `exact` and `upto`. */
4800
+ /** The scheme of the payment protocol to use. Supported schemes are `exact`, `upto`, and `batch-settlement`. */
3573
4801
  scheme: X402V2PaymentRequirementsScheme;
3574
- /** The network of the blockchain to send payment on in caip2 format. */
3575
- network: string;
3576
- /**
3577
- * The asset to pay with.
4802
+ /** The network of the blockchain to send payment on in CAIP-2 format. */
4803
+ network: X402V2Network;
4804
+ /** The asset to pay with.
3578
4805
 
3579
4806
  For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
3580
4807
 
3581
- For Solana-based networks, the asset will be a base58-encoded Solana address.
3582
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3583
- */
3584
- asset: string;
4808
+ For Solana-based networks, the asset will be a base58-encoded Solana address. */
4809
+ asset: BlockchainAddress;
3585
4810
  /** The amount to pay for the resource in atomic units of the payment asset. */
3586
4811
  amount: string;
3587
- /**
3588
- * The destination to pay value to.
4812
+ /** The destination to pay value to.
3589
4813
 
3590
4814
  For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
3591
4815
 
3592
- For Solana-based networks, payTo will be a base58-encoded Solana address.
3593
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3594
- */
3595
- payTo: string;
4816
+ For Solana-based networks, payTo will be a base58-encoded Solana address. */
4817
+ payTo: BlockchainAddress;
3596
4818
  /** The maximum time in seconds for the resource server to respond. */
3597
4819
  maxTimeoutSeconds: number;
3598
4820
  /** The optional additional scheme-specific payment info. */
@@ -3612,12 +4834,14 @@ export interface X402ResourceInfo {
3612
4834
  }
3613
4835
 
3614
4836
  /**
3615
- * The payload of the payment depending on the x402Version, scheme, and network.
4837
+ * The payload of the payment depending on the x402Version, scheme, and network. Discriminated by scheme-specific fields: exact-EVM/upto-EVM payloads carry a `signature`; exact-Solana carries a `transaction`; batch-settlement carries a `type` discriminator. See `x402BatchSettlementEvmPayload` for the documented batch-settlement variants.
3616
4838
  */
3617
4839
  export type X402V2PaymentPayloadPayload =
3618
4840
  | X402ExactEvmPayload
3619
4841
  | X402ExactEvmPermit2Payload
3620
- | X402ExactSolanaPayload;
4842
+ | X402ExactSolanaPayload
4843
+ | X402UptoEvmPermit2Payload
4844
+ | X402BatchSettlementEvmPayload;
3621
4845
 
3622
4846
  /**
3623
4847
  * Optional protocol extensions.
@@ -3625,11 +4849,12 @@ export type X402V2PaymentPayloadPayload =
3625
4849
  export type X402V2PaymentPayloadExtensions = { [key: string]: unknown };
3626
4850
 
3627
4851
  /**
3628
- * The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
4852
+ * The x402 v2 protocol payment payload. Uses CAIP-2 network identifiers. The `accepted` field carries the full payment requirements; `scheme` and `network` are not top-level fields (they are on the nested `accepted` object).
3629
4853
  */
3630
4854
  export interface X402V2PaymentPayload {
4855
+ /** The x402 protocol version. Must be `2` for this payload shape. */
3631
4856
  x402Version: X402Version;
3632
- /** The payload of the payment depending on the x402Version, scheme, and network. */
4857
+ /** The payload of the payment depending on the x402Version, scheme, and network. Discriminated by scheme-specific fields: exact-EVM/upto-EVM payloads carry a `signature`; exact-Solana carries a `transaction`; batch-settlement carries a `type` discriminator. See `x402BatchSettlementEvmPayload` for the documented batch-settlement variants. */
3633
4858
  payload: X402V2PaymentPayloadPayload;
3634
4859
  accepted: X402V2PaymentRequirements;
3635
4860
  resource?: X402ResourceInfo;
@@ -3638,29 +4863,27 @@ export interface X402V2PaymentPayload {
3638
4863
  }
3639
4864
 
3640
4865
  /**
3641
- * The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
4866
+ * The x402 v1 network identifier. x402 v1 uses human-readable network names. Supported networks: Base mainnet and testnet, Solana mainnet and devnet.
3642
4867
  */
3643
- export type X402V1PaymentPayloadScheme =
3644
- (typeof X402V1PaymentPayloadScheme)[keyof typeof X402V1PaymentPayloadScheme];
4868
+ export type X402V1Network = (typeof X402V1Network)[keyof typeof X402V1Network];
3645
4869
 
3646
4870
  // eslint-disable-next-line @typescript-eslint/no-redeclare
3647
- export const X402V1PaymentPayloadScheme = {
3648
- exact: "exact",
4871
+ export const X402V1Network = {
4872
+ base: "base",
4873
+ "base-sepolia": "base-sepolia",
4874
+ solana: "solana",
4875
+ "solana-devnet": "solana-devnet",
3649
4876
  } as const;
3650
4877
 
3651
4878
  /**
3652
- * The network of the blockchain to send payment on.
4879
+ * The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
3653
4880
  */
3654
- export type X402V1PaymentPayloadNetwork =
3655
- (typeof X402V1PaymentPayloadNetwork)[keyof typeof X402V1PaymentPayloadNetwork];
4881
+ export type X402V1PaymentPayloadScheme =
4882
+ (typeof X402V1PaymentPayloadScheme)[keyof typeof X402V1PaymentPayloadScheme];
3656
4883
 
3657
4884
  // eslint-disable-next-line @typescript-eslint/no-redeclare
3658
- export const X402V1PaymentPayloadNetwork = {
3659
- "base-sepolia": "base-sepolia",
3660
- base: "base",
3661
- "solana-devnet": "solana-devnet",
3662
- solana: "solana",
3663
- polygon: "polygon",
4885
+ export const X402V1PaymentPayloadScheme = {
4886
+ exact: "exact",
3664
4887
  } as const;
3665
4888
 
3666
4889
  /**
@@ -3672,14 +4895,15 @@ export type X402V1PaymentPayloadPayload =
3672
4895
  | X402ExactSolanaPayload;
3673
4896
 
3674
4897
  /**
3675
- * The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
4898
+ * The x402 v1 protocol payment payload. Uses human-readable network names and requires `scheme` and `network` alongside the inner `payload` object.
3676
4899
  */
3677
4900
  export interface X402V1PaymentPayload {
4901
+ /** The x402 protocol version. Must be `1` for this payload shape. */
3678
4902
  x402Version: X402Version;
3679
4903
  /** The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`. */
3680
4904
  scheme: X402V1PaymentPayloadScheme;
3681
4905
  /** The network of the blockchain to send payment on. */
3682
- network: X402V1PaymentPayloadNetwork;
4906
+ network: X402V1Network;
3683
4907
  /** The payload of the payment depending on the x402Version, scheme, and network. */
3684
4908
  payload: X402V1PaymentPayloadPayload;
3685
4909
  }
@@ -3701,21 +4925,6 @@ export const X402V1PaymentRequirementsScheme = {
3701
4925
  exact: "exact",
3702
4926
  } as const;
3703
4927
 
3704
- /**
3705
- * The network of the blockchain to send payment on.
3706
- */
3707
- export type X402V1PaymentRequirementsNetwork =
3708
- (typeof X402V1PaymentRequirementsNetwork)[keyof typeof X402V1PaymentRequirementsNetwork];
3709
-
3710
- // eslint-disable-next-line @typescript-eslint/no-redeclare
3711
- export const X402V1PaymentRequirementsNetwork = {
3712
- "base-sepolia": "base-sepolia",
3713
- base: "base",
3714
- "solana-devnet": "solana-devnet",
3715
- solana: "solana",
3716
- polygon: "polygon",
3717
- } as const;
3718
-
3719
4928
  /**
3720
4929
  * The optional JSON schema describing the resource output.
3721
4930
  */
@@ -3727,13 +4936,13 @@ export type X402V1PaymentRequirementsOutputSchema = { [key: string]: unknown };
3727
4936
  export type X402V1PaymentRequirementsExtra = { [key: string]: unknown };
3728
4937
 
3729
4938
  /**
3730
- * The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
4939
+ * The x402 v1 payment requirements. Uses human-readable network names, and carries resource metadata (`resource`, `description`, `mimeType`) alongside the payment fields. The only supported scheme is `exact`.
3731
4940
  */
3732
4941
  export interface X402V1PaymentRequirements {
3733
4942
  /** The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`. */
3734
4943
  scheme: X402V1PaymentRequirementsScheme;
3735
4944
  /** The network of the blockchain to send payment on. */
3736
- network: X402V1PaymentRequirementsNetwork;
4945
+ network: X402V1Network;
3737
4946
  /** The maximum amount required to pay for the resource in atomic units of the payment asset. */
3738
4947
  maxAmountRequired: string;
3739
4948
  /** The URL of the resource to pay for. */
@@ -3744,26 +4953,20 @@ export interface X402V1PaymentRequirements {
3744
4953
  mimeType: string;
3745
4954
  /** The optional JSON schema describing the resource output. */
3746
4955
  outputSchema?: X402V1PaymentRequirementsOutputSchema;
3747
- /**
3748
- * The destination to pay value to.
4956
+ /** The destination to pay value to.
3749
4957
 
3750
4958
  For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
3751
4959
 
3752
- For Solana-based networks, payTo will be a base58-encoded Solana address.
3753
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3754
- */
3755
- payTo: string;
4960
+ For Solana-based networks, payTo will be a base58-encoded Solana address. */
4961
+ payTo: BlockchainAddress;
3756
4962
  /** The maximum time in seconds for the resource server to respond. */
3757
4963
  maxTimeoutSeconds: number;
3758
- /**
3759
- * The asset to pay with.
4964
+ /** The asset to pay with.
3760
4965
 
3761
4966
  For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
3762
4967
 
3763
- For Solana-based networks, the asset will be a base58-encoded Solana address.
3764
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3765
- */
3766
- asset: string;
4968
+ For Solana-based networks, the asset will be a base58-encoded Solana address. */
4969
+ asset: BlockchainAddress;
3767
4970
  /** The optional additional scheme-specific payment info. */
3768
4971
  extra?: X402V1PaymentRequirementsExtra;
3769
4972
  }
@@ -3849,6 +5052,210 @@ export const X402VerifyInvalidReason = {
3849
5052
  "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts",
3850
5053
  invalid_exact_svm_payload_transaction_fee_payer_transferring_funds:
3851
5054
  "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds",
5055
+ invalid_batch_settlement_evm_scheme: "invalid_batch_settlement_evm_scheme",
5056
+ invalid_batch_settlement_evm_network_mismatch: "invalid_batch_settlement_evm_network_mismatch",
5057
+ invalid_batch_settlement_evm_payload_type: "invalid_batch_settlement_evm_payload_type",
5058
+ invalid_batch_settlement_evm_channel_not_found: "invalid_batch_settlement_evm_channel_not_found",
5059
+ invalid_batch_settlement_evm_deposit_simulation_failed:
5060
+ "invalid_batch_settlement_evm_deposit_simulation_failed",
5061
+ invalid_batch_settlement_evm_channel_id_mismatch:
5062
+ "invalid_batch_settlement_evm_channel_id_mismatch",
5063
+ invalid_batch_settlement_evm_channel_state_read_failed:
5064
+ "invalid_batch_settlement_evm_channel_state_read_failed",
5065
+ invalid_batch_settlement_evm_cumulative_below_claimed:
5066
+ "invalid_batch_settlement_evm_cumulative_below_claimed",
5067
+ invalid_batch_settlement_evm_cumulative_exceeds_balance:
5068
+ "invalid_batch_settlement_evm_cumulative_exceeds_balance",
5069
+ invalid_batch_settlement_evm_eip2612_amount_mismatch:
5070
+ "invalid_batch_settlement_evm_eip2612_amount_mismatch",
5071
+ invalid_batch_settlement_evm_eip2612_asset_mismatch:
5072
+ "invalid_batch_settlement_evm_eip2612_asset_mismatch",
5073
+ invalid_batch_settlement_evm_eip2612_deadline_expired:
5074
+ "invalid_batch_settlement_evm_eip2612_deadline_expired",
5075
+ invalid_batch_settlement_evm_eip2612_invalid_format:
5076
+ "invalid_batch_settlement_evm_eip2612_invalid_format",
5077
+ invalid_batch_settlement_evm_eip2612_invalid_signature:
5078
+ "invalid_batch_settlement_evm_eip2612_invalid_signature",
5079
+ invalid_batch_settlement_evm_eip2612_owner_mismatch:
5080
+ "invalid_batch_settlement_evm_eip2612_owner_mismatch",
5081
+ invalid_batch_settlement_evm_eip2612_spender_mismatch:
5082
+ "invalid_batch_settlement_evm_eip2612_spender_mismatch",
5083
+ invalid_batch_settlement_evm_erc20_approval_asset_mismatch:
5084
+ "invalid_batch_settlement_evm_erc20_approval_asset_mismatch",
5085
+ invalid_batch_settlement_evm_erc20_approval_from_mismatch:
5086
+ "invalid_batch_settlement_evm_erc20_approval_from_mismatch",
5087
+ invalid_batch_settlement_evm_erc20_approval_invalid_format:
5088
+ "invalid_batch_settlement_evm_erc20_approval_invalid_format",
5089
+ invalid_batch_settlement_evm_erc20_approval_unavailable:
5090
+ "invalid_batch_settlement_evm_erc20_approval_unavailable",
5091
+ invalid_batch_settlement_evm_erc20_approval_wrong_spender:
5092
+ "invalid_batch_settlement_evm_erc20_approval_wrong_spender",
5093
+ invalid_batch_settlement_evm_erc3009_authorization_required:
5094
+ "invalid_batch_settlement_evm_erc3009_authorization_required",
5095
+ invalid_batch_settlement_evm_insufficient_balance:
5096
+ "invalid_batch_settlement_evm_insufficient_balance",
5097
+ invalid_batch_settlement_evm_deposit_payload: "invalid_batch_settlement_evm_deposit_payload",
5098
+ invalid_batch_settlement_evm_receive_authorization_signature:
5099
+ "invalid_batch_settlement_evm_receive_authorization_signature",
5100
+ invalid_batch_settlement_evm_refund_payload: "invalid_batch_settlement_evm_refund_payload",
5101
+ invalid_batch_settlement_evm_voucher_payload: "invalid_batch_settlement_evm_voucher_payload",
5102
+ invalid_batch_settlement_evm_voucher_signature: "invalid_batch_settlement_evm_voucher_signature",
5103
+ invalid_batch_settlement_evm_missing_eip712_domain:
5104
+ "invalid_batch_settlement_evm_missing_eip712_domain",
5105
+ invalid_batch_settlement_evm_payload_authorization_valid_after:
5106
+ "invalid_batch_settlement_evm_payload_authorization_valid_after",
5107
+ invalid_batch_settlement_evm_payload_authorization_valid_before:
5108
+ "invalid_batch_settlement_evm_payload_authorization_valid_before",
5109
+ invalid_batch_settlement_evm_permit2_allowance_required:
5110
+ "invalid_batch_settlement_evm_permit2_allowance_required",
5111
+ invalid_batch_settlement_evm_permit2_amount_mismatch:
5112
+ "invalid_batch_settlement_evm_permit2_amount_mismatch",
5113
+ invalid_batch_settlement_evm_permit2_authorization_required:
5114
+ "invalid_batch_settlement_evm_permit2_authorization_required",
5115
+ invalid_batch_settlement_evm_permit2_deadline_expired:
5116
+ "invalid_batch_settlement_evm_permit2_deadline_expired",
5117
+ invalid_batch_settlement_evm_permit2_invalid_signature:
5118
+ "invalid_batch_settlement_evm_permit2_invalid_signature",
5119
+ invalid_batch_settlement_evm_permit2_invalid_spender:
5120
+ "invalid_batch_settlement_evm_permit2_invalid_spender",
5121
+ invalid_batch_settlement_evm_receiver_authorizer_mismatch:
5122
+ "invalid_batch_settlement_evm_receiver_authorizer_mismatch",
5123
+ invalid_batch_settlement_evm_receiver_mismatch: "invalid_batch_settlement_evm_receiver_mismatch",
5124
+ invalid_batch_settlement_evm_rpc_read_failed: "invalid_batch_settlement_evm_rpc_read_failed",
5125
+ invalid_batch_settlement_evm_token_mismatch: "invalid_batch_settlement_evm_token_mismatch",
5126
+ invalid_batch_settlement_evm_withdraw_delay_mismatch:
5127
+ "invalid_batch_settlement_evm_withdraw_delay_mismatch",
5128
+ invalid_batch_settlement_evm_withdraw_delay_out_of_range:
5129
+ "invalid_batch_settlement_evm_withdraw_delay_out_of_range",
5130
+ invalid_exact_evm_scheme: "invalid_exact_evm_scheme",
5131
+ invalid_exact_evm_network_mismatch: "invalid_exact_evm_network_mismatch",
5132
+ invalid_exact_evm_payload: "invalid_exact_evm_payload",
5133
+ invalid_exact_evm_payload_missing_signature: "invalid_exact_evm_payload_missing_signature",
5134
+ invalid_exact_evm_failed_to_get_network_config: "invalid_exact_evm_failed_to_get_network_config",
5135
+ invalid_exact_evm_missing_eip712_domain: "invalid_exact_evm_missing_eip712_domain",
5136
+ invalid_exact_evm_recipient_mismatch: "invalid_exact_evm_recipient_mismatch",
5137
+ invalid_exact_evm_authorization_value: "invalid_exact_evm_authorization_value",
5138
+ invalid_exact_evm_required_amount: "invalid_exact_evm_required_amount",
5139
+ invalid_exact_evm_payload_authorization_value_mismatch:
5140
+ "invalid_exact_evm_payload_authorization_value_mismatch",
5141
+ invalid_exact_evm_failed_to_check_nonce: "invalid_exact_evm_failed_to_check_nonce",
5142
+ invalid_exact_evm_nonce_already_used: "invalid_exact_evm_nonce_already_used",
5143
+ invalid_exact_evm_failed_to_get_balance: "invalid_exact_evm_failed_to_get_balance",
5144
+ invalid_exact_evm_insufficient_balance: "invalid_exact_evm_insufficient_balance",
5145
+ invalid_exact_evm_signature_format: "invalid_exact_evm_signature_format",
5146
+ invalid_exact_evm_failed_to_verify_signature: "invalid_exact_evm_failed_to_verify_signature",
5147
+ invalid_exact_evm_signature: "invalid_exact_evm_signature",
5148
+ invalid_exact_evm_token_name_mismatch: "invalid_exact_evm_token_name_mismatch",
5149
+ invalid_exact_evm_token_version_mismatch: "invalid_exact_evm_token_version_mismatch",
5150
+ invalid_exact_evm_eip3009_not_supported: "invalid_exact_evm_eip3009_not_supported",
5151
+ invalid_exact_evm_transaction_simulation_failed:
5152
+ "invalid_exact_evm_transaction_simulation_failed",
5153
+ invalid_exact_evm_verification_failed: "invalid_exact_evm_verification_failed",
5154
+ invalid_exact_evm_failed_to_parse_signature: "invalid_exact_evm_failed_to_parse_signature",
5155
+ invalid_exact_evm_failed_to_check_deployment: "invalid_exact_evm_failed_to_check_deployment",
5156
+ invalid_exact_evm_failed_to_execute_transfer: "invalid_exact_evm_failed_to_execute_transfer",
5157
+ invalid_exact_evm_failed_to_get_receipt: "invalid_exact_evm_failed_to_get_receipt",
5158
+ invalid_exact_evm_transaction_failed: "invalid_exact_evm_transaction_failed",
5159
+ invalid_exact_evm_payload_undeployed_smart_wallet:
5160
+ "invalid_exact_evm_payload_undeployed_smart_wallet",
5161
+ smart_wallet_deployment_failed: "smart_wallet_deployment_failed",
5162
+ unsupported_payload_type: "unsupported_payload_type",
5163
+ invalid_erc20_approval_extension_format: "invalid_erc20_approval_extension_format",
5164
+ erc20_approval_tx_failed: "erc20_approval_tx_failed",
5165
+ erc20_approval_from_mismatch: "erc20_approval_from_mismatch",
5166
+ erc20_approval_asset_mismatch: "erc20_approval_asset_mismatch",
5167
+ erc20_approval_spender_not_permit2: "erc20_approval_spender_not_permit2",
5168
+ erc20_approval_tx_parse_failed: "erc20_approval_tx_parse_failed",
5169
+ erc20_approval_tx_wrong_target: "erc20_approval_tx_wrong_target",
5170
+ erc20_approval_tx_wrong_selector: "erc20_approval_tx_wrong_selector",
5171
+ erc20_approval_tx_wrong_spender: "erc20_approval_tx_wrong_spender",
5172
+ erc20_approval_tx_signer_mismatch: "erc20_approval_tx_signer_mismatch",
5173
+ erc20_approval_tx_invalid_signature: "erc20_approval_tx_invalid_signature",
5174
+ invalid_exact_evm_unsupported_scheme: "invalid_exact_evm_unsupported_scheme",
5175
+ invalid_exact_evm_extra_field: "invalid_exact_evm_extra_field",
5176
+ invalid_exact_evm_payload_recipient_mismatch: "invalid_exact_evm_payload_recipient_mismatch",
5177
+ invalid_exact_evm_insufficient_funds: "invalid_exact_evm_insufficient_funds",
5178
+ invalid_exact_evm_transaction_state: "invalid_exact_evm_transaction_state",
5179
+ invalid_permit2_spender: "invalid_permit2_spender",
5180
+ invalid_permit2_recipient_mismatch: "invalid_permit2_recipient_mismatch",
5181
+ permit2_deadline_expired: "permit2_deadline_expired",
5182
+ permit2_not_yet_valid: "permit2_not_yet_valid",
5183
+ permit2_amount_mismatch: "permit2_amount_mismatch",
5184
+ permit2_token_mismatch: "permit2_token_mismatch",
5185
+ invalid_permit2_signature: "invalid_permit2_signature",
5186
+ permit2_allowance_required: "permit2_allowance_required",
5187
+ permit2_invalid_amount: "permit2_invalid_amount",
5188
+ permit2_invalid_destination: "permit2_invalid_destination",
5189
+ permit2_invalid_owner: "permit2_invalid_owner",
5190
+ permit2_payment_too_early: "permit2_payment_too_early",
5191
+ permit2_invalid_nonce: "permit2_invalid_nonce",
5192
+ permit2_2612_amount_mismatch: "permit2_2612_amount_mismatch",
5193
+ permit2_simulation_failed: "permit2_simulation_failed",
5194
+ permit2_insufficient_balance: "permit2_insufficient_balance",
5195
+ permit2_proxy_not_deployed: "permit2_proxy_not_deployed",
5196
+ erc20_approval_insufficient_eth_for_gas: "erc20_approval_insufficient_eth_for_gas",
5197
+ erc20_approval_broadcast_failed: "erc20_approval_broadcast_failed",
5198
+ invalid_exact_solana_unsupported_scheme: "invalid_exact_solana_unsupported_scheme",
5199
+ invalid_exact_solana_network_mismatch: "invalid_exact_solana_network_mismatch",
5200
+ invalid_exact_solana_payload_missing_fee_payer: "invalid_exact_solana_payload_missing_fee_payer",
5201
+ invalid_exact_solana_fee_payer_not_managed_by_facilitator:
5202
+ "invalid_exact_solana_fee_payer_not_managed_by_facilitator",
5203
+ invalid_exact_solana_payload_transaction: "invalid_exact_solana_payload_transaction",
5204
+ invalid_exact_solana_payload_transaction_could_not_be_decoded:
5205
+ "invalid_exact_solana_payload_transaction_could_not_be_decoded",
5206
+ invalid_exact_solana_payload_transaction_instructions_length:
5207
+ "invalid_exact_solana_payload_transaction_instructions_length",
5208
+ invalid_exact_solana_payload_unknown_fourth_instruction:
5209
+ "invalid_exact_solana_payload_unknown_fourth_instruction",
5210
+ invalid_exact_solana_payload_unknown_fifth_instruction:
5211
+ "invalid_exact_solana_payload_unknown_fifth_instruction",
5212
+ invalid_exact_solana_payload_unknown_sixth_instruction:
5213
+ "invalid_exact_solana_payload_unknown_sixth_instruction",
5214
+ invalid_exact_solana_payload_transaction_instructions_compute_limit_instruction:
5215
+ "invalid_exact_solana_payload_transaction_instructions_compute_limit_instruction",
5216
+ invalid_exact_solana_payload_transaction_instructions_compute_price_instruction:
5217
+ "invalid_exact_solana_payload_transaction_instructions_compute_price_instruction",
5218
+ invalid_exact_solana_payload_transaction_instructions_compute_price_instruction_too_high:
5219
+ "invalid_exact_solana_payload_transaction_instructions_compute_price_instruction_too_high",
5220
+ invalid_exact_solana_payload_no_transfer_instruction:
5221
+ "invalid_exact_solana_payload_no_transfer_instruction",
5222
+ invalid_exact_solana_payload_transaction_fee_payer_transferring_funds:
5223
+ "invalid_exact_solana_payload_transaction_fee_payer_transferring_funds",
5224
+ invalid_exact_solana_payload_mint_mismatch: "invalid_exact_solana_payload_mint_mismatch",
5225
+ invalid_exact_solana_payload_recipient_mismatch:
5226
+ "invalid_exact_solana_payload_recipient_mismatch",
5227
+ invalid_exact_solana_payload_amount_insufficient:
5228
+ "invalid_exact_solana_payload_amount_insufficient",
5229
+ invalid_exact_solana_invalid_fee_payer: "invalid_exact_solana_invalid_fee_payer",
5230
+ invalid_exact_solana_transaction_signing_failed:
5231
+ "invalid_exact_solana_transaction_signing_failed",
5232
+ invalid_exact_solana_transaction_simulation_failed:
5233
+ "invalid_exact_solana_transaction_simulation_failed",
5234
+ invalid_exact_solana_payload_memo_mismatch: "invalid_exact_solana_payload_memo_mismatch",
5235
+ invalid_exact_solana_payload_memo_count: "invalid_exact_solana_payload_memo_count",
5236
+ invalid_exact_solana_verification_failed: "invalid_exact_solana_verification_failed",
5237
+ invalid_exact_solana_fee_payer_mismatch: "invalid_exact_solana_fee_payer_mismatch",
5238
+ invalid_exact_solana_transaction_failed: "invalid_exact_solana_transaction_failed",
5239
+ invalid_exact_solana_transaction_confirmation_failed:
5240
+ "invalid_exact_solana_transaction_confirmation_failed",
5241
+ duplicate_settlement: "duplicate_settlement",
5242
+ invalid_exact_solana_extra_field: "invalid_exact_solana_extra_field",
5243
+ batch_settlement_cumulative_amount_mismatch: "batch_settlement_cumulative_amount_mismatch",
5244
+ batch_settlement_channel_busy: "batch_settlement_channel_busy",
5245
+ missing_batch_settlement_channel: "missing_batch_settlement_channel",
5246
+ batch_settlement_charge_exceeds_signed_cumulative:
5247
+ "batch_settlement_charge_exceeds_signed_cumulative",
5248
+ batch_settlement_refund_no_balance: "batch_settlement_refund_no_balance",
5249
+ batch_settlement_refund_amount_invalid: "batch_settlement_refund_amount_invalid",
5250
+ batch_settlement_refund_amount_exceeds_balance: "batch_settlement_refund_amount_exceeds_balance",
5251
+ amount_too_low: "amount_too_low",
5252
+ invalid_amount: "invalid_amount",
5253
+ kyt_risk_detected: "kyt_risk_detected",
5254
+ permit2_disabled: "permit2_disabled",
5255
+ preflight_validation_failed: "preflight_validation_failed",
5256
+ request_blocked_by_location: "request_blocked_by_location",
5257
+ self_send_not_allowed: "self_send_not_allowed",
5258
+ invalid_bazaar_extension: "invalid_bazaar_extension",
3852
5259
  unknown_error: "unknown_error",
3853
5260
  } as const;
3854
5261
 
@@ -3861,15 +5268,12 @@ export interface X402VerifyPaymentRejection {
3861
5268
  invalidReason: X402VerifyInvalidReason;
3862
5269
  /** The message describing the invalid reason. */
3863
5270
  invalidMessage?: string;
3864
- /**
3865
- * The onchain address of the client that is paying for the resource.
5271
+ /** The onchain address of the client that is paying for the resource.
3866
5272
 
3867
5273
  For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
3868
5274
 
3869
- For Solana-based networks, the payer will be a base58-encoded Solana address.
3870
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3871
- */
3872
- payer?: string;
5275
+ For Solana-based networks, the payer will be a base58-encoded Solana address. */
5276
+ payer?: BlockchainAddress;
3873
5277
  }
3874
5278
 
3875
5279
  /**
@@ -3955,6 +5359,236 @@ export const X402SettleErrorReason = {
3955
5359
  settle_exact_svm_block_height_exceeded: "settle_exact_svm_block_height_exceeded",
3956
5360
  settle_exact_svm_transaction_confirmation_timed_out:
3957
5361
  "settle_exact_svm_transaction_confirmation_timed_out",
5362
+ invalid_batch_settlement_evm_unknown_settle_action:
5363
+ "invalid_batch_settlement_evm_unknown_settle_action",
5364
+ invalid_batch_settlement_evm_claim_payload: "invalid_batch_settlement_evm_claim_payload",
5365
+ invalid_batch_settlement_evm_settle_payload: "invalid_batch_settlement_evm_settle_payload",
5366
+ invalid_batch_settlement_evm_authorizer_address_mismatch:
5367
+ "invalid_batch_settlement_evm_authorizer_address_mismatch",
5368
+ invalid_batch_settlement_evm_claim_simulation_failed:
5369
+ "invalid_batch_settlement_evm_claim_simulation_failed",
5370
+ invalid_batch_settlement_evm_claim_transaction_failed:
5371
+ "invalid_batch_settlement_evm_claim_transaction_failed",
5372
+ invalid_batch_settlement_evm_deposit_transaction_failed:
5373
+ "invalid_batch_settlement_evm_deposit_transaction_failed",
5374
+ invalid_batch_settlement_evm_refund_simulation_failed:
5375
+ "invalid_batch_settlement_evm_refund_simulation_failed",
5376
+ invalid_batch_settlement_evm_refund_transaction_failed:
5377
+ "invalid_batch_settlement_evm_refund_transaction_failed",
5378
+ invalid_batch_settlement_evm_settle_simulation_failed:
5379
+ "invalid_batch_settlement_evm_settle_simulation_failed",
5380
+ invalid_batch_settlement_evm_settle_transaction_failed:
5381
+ "invalid_batch_settlement_evm_settle_transaction_failed",
5382
+ invalid_batch_settlement_evm_transaction_reverted:
5383
+ "invalid_batch_settlement_evm_transaction_reverted",
5384
+ invalid_batch_settlement_evm_wait_for_receipt_failed:
5385
+ "invalid_batch_settlement_evm_wait_for_receipt_failed",
5386
+ invalid_batch_settlement_evm_erc20_approval_broadcast_failed:
5387
+ "invalid_batch_settlement_evm_erc20_approval_broadcast_failed",
5388
+ invalid_batch_settlement_evm_channel_id_mismatch:
5389
+ "invalid_batch_settlement_evm_channel_id_mismatch",
5390
+ invalid_batch_settlement_evm_channel_state_read_failed:
5391
+ "invalid_batch_settlement_evm_channel_state_read_failed",
5392
+ invalid_batch_settlement_evm_cumulative_below_claimed:
5393
+ "invalid_batch_settlement_evm_cumulative_below_claimed",
5394
+ invalid_batch_settlement_evm_cumulative_exceeds_balance:
5395
+ "invalid_batch_settlement_evm_cumulative_exceeds_balance",
5396
+ invalid_batch_settlement_evm_eip2612_amount_mismatch:
5397
+ "invalid_batch_settlement_evm_eip2612_amount_mismatch",
5398
+ invalid_batch_settlement_evm_eip2612_asset_mismatch:
5399
+ "invalid_batch_settlement_evm_eip2612_asset_mismatch",
5400
+ invalid_batch_settlement_evm_eip2612_deadline_expired:
5401
+ "invalid_batch_settlement_evm_eip2612_deadline_expired",
5402
+ invalid_batch_settlement_evm_eip2612_invalid_format:
5403
+ "invalid_batch_settlement_evm_eip2612_invalid_format",
5404
+ invalid_batch_settlement_evm_eip2612_invalid_signature:
5405
+ "invalid_batch_settlement_evm_eip2612_invalid_signature",
5406
+ invalid_batch_settlement_evm_eip2612_owner_mismatch:
5407
+ "invalid_batch_settlement_evm_eip2612_owner_mismatch",
5408
+ invalid_batch_settlement_evm_eip2612_spender_mismatch:
5409
+ "invalid_batch_settlement_evm_eip2612_spender_mismatch",
5410
+ invalid_batch_settlement_evm_erc20_approval_asset_mismatch:
5411
+ "invalid_batch_settlement_evm_erc20_approval_asset_mismatch",
5412
+ invalid_batch_settlement_evm_erc20_approval_from_mismatch:
5413
+ "invalid_batch_settlement_evm_erc20_approval_from_mismatch",
5414
+ invalid_batch_settlement_evm_erc20_approval_invalid_format:
5415
+ "invalid_batch_settlement_evm_erc20_approval_invalid_format",
5416
+ invalid_batch_settlement_evm_erc20_approval_unavailable:
5417
+ "invalid_batch_settlement_evm_erc20_approval_unavailable",
5418
+ invalid_batch_settlement_evm_erc20_approval_wrong_spender:
5419
+ "invalid_batch_settlement_evm_erc20_approval_wrong_spender",
5420
+ invalid_batch_settlement_evm_erc3009_authorization_required:
5421
+ "invalid_batch_settlement_evm_erc3009_authorization_required",
5422
+ invalid_batch_settlement_evm_insufficient_balance:
5423
+ "invalid_batch_settlement_evm_insufficient_balance",
5424
+ invalid_batch_settlement_evm_deposit_payload: "invalid_batch_settlement_evm_deposit_payload",
5425
+ invalid_batch_settlement_evm_receive_authorization_signature:
5426
+ "invalid_batch_settlement_evm_receive_authorization_signature",
5427
+ invalid_batch_settlement_evm_refund_payload: "invalid_batch_settlement_evm_refund_payload",
5428
+ invalid_batch_settlement_evm_voucher_payload: "invalid_batch_settlement_evm_voucher_payload",
5429
+ invalid_batch_settlement_evm_voucher_signature: "invalid_batch_settlement_evm_voucher_signature",
5430
+ invalid_batch_settlement_evm_missing_eip712_domain:
5431
+ "invalid_batch_settlement_evm_missing_eip712_domain",
5432
+ invalid_batch_settlement_evm_payload_authorization_valid_after:
5433
+ "invalid_batch_settlement_evm_payload_authorization_valid_after",
5434
+ invalid_batch_settlement_evm_payload_authorization_valid_before:
5435
+ "invalid_batch_settlement_evm_payload_authorization_valid_before",
5436
+ invalid_batch_settlement_evm_permit2_allowance_required:
5437
+ "invalid_batch_settlement_evm_permit2_allowance_required",
5438
+ invalid_batch_settlement_evm_permit2_amount_mismatch:
5439
+ "invalid_batch_settlement_evm_permit2_amount_mismatch",
5440
+ invalid_batch_settlement_evm_permit2_authorization_required:
5441
+ "invalid_batch_settlement_evm_permit2_authorization_required",
5442
+ invalid_batch_settlement_evm_permit2_deadline_expired:
5443
+ "invalid_batch_settlement_evm_permit2_deadline_expired",
5444
+ invalid_batch_settlement_evm_permit2_invalid_signature:
5445
+ "invalid_batch_settlement_evm_permit2_invalid_signature",
5446
+ invalid_batch_settlement_evm_permit2_invalid_spender:
5447
+ "invalid_batch_settlement_evm_permit2_invalid_spender",
5448
+ invalid_batch_settlement_evm_receiver_authorizer_mismatch:
5449
+ "invalid_batch_settlement_evm_receiver_authorizer_mismatch",
5450
+ invalid_batch_settlement_evm_receiver_mismatch: "invalid_batch_settlement_evm_receiver_mismatch",
5451
+ invalid_batch_settlement_evm_rpc_read_failed: "invalid_batch_settlement_evm_rpc_read_failed",
5452
+ invalid_batch_settlement_evm_token_mismatch: "invalid_batch_settlement_evm_token_mismatch",
5453
+ invalid_batch_settlement_evm_withdraw_delay_mismatch:
5454
+ "invalid_batch_settlement_evm_withdraw_delay_mismatch",
5455
+ invalid_batch_settlement_evm_withdraw_delay_out_of_range:
5456
+ "invalid_batch_settlement_evm_withdraw_delay_out_of_range",
5457
+ invalid_batch_settlement_evm_scheme: "invalid_batch_settlement_evm_scheme",
5458
+ invalid_batch_settlement_evm_network_mismatch: "invalid_batch_settlement_evm_network_mismatch",
5459
+ invalid_batch_settlement_evm_payload_type: "invalid_batch_settlement_evm_payload_type",
5460
+ invalid_batch_settlement_evm_channel_not_found: "invalid_batch_settlement_evm_channel_not_found",
5461
+ invalid_batch_settlement_evm_deposit_simulation_failed:
5462
+ "invalid_batch_settlement_evm_deposit_simulation_failed",
5463
+ invalid_exact_evm_scheme: "invalid_exact_evm_scheme",
5464
+ invalid_exact_evm_network_mismatch: "invalid_exact_evm_network_mismatch",
5465
+ invalid_exact_evm_payload: "invalid_exact_evm_payload",
5466
+ invalid_exact_evm_payload_missing_signature: "invalid_exact_evm_payload_missing_signature",
5467
+ invalid_exact_evm_failed_to_get_network_config: "invalid_exact_evm_failed_to_get_network_config",
5468
+ invalid_exact_evm_missing_eip712_domain: "invalid_exact_evm_missing_eip712_domain",
5469
+ invalid_exact_evm_recipient_mismatch: "invalid_exact_evm_recipient_mismatch",
5470
+ invalid_exact_evm_authorization_value: "invalid_exact_evm_authorization_value",
5471
+ invalid_exact_evm_required_amount: "invalid_exact_evm_required_amount",
5472
+ invalid_exact_evm_payload_authorization_value_mismatch:
5473
+ "invalid_exact_evm_payload_authorization_value_mismatch",
5474
+ invalid_exact_evm_failed_to_check_nonce: "invalid_exact_evm_failed_to_check_nonce",
5475
+ invalid_exact_evm_nonce_already_used: "invalid_exact_evm_nonce_already_used",
5476
+ invalid_exact_evm_failed_to_get_balance: "invalid_exact_evm_failed_to_get_balance",
5477
+ invalid_exact_evm_insufficient_balance: "invalid_exact_evm_insufficient_balance",
5478
+ invalid_exact_evm_signature_format: "invalid_exact_evm_signature_format",
5479
+ invalid_exact_evm_failed_to_verify_signature: "invalid_exact_evm_failed_to_verify_signature",
5480
+ invalid_exact_evm_signature: "invalid_exact_evm_signature",
5481
+ invalid_exact_evm_token_name_mismatch: "invalid_exact_evm_token_name_mismatch",
5482
+ invalid_exact_evm_token_version_mismatch: "invalid_exact_evm_token_version_mismatch",
5483
+ invalid_exact_evm_eip3009_not_supported: "invalid_exact_evm_eip3009_not_supported",
5484
+ invalid_exact_evm_transaction_simulation_failed:
5485
+ "invalid_exact_evm_transaction_simulation_failed",
5486
+ invalid_exact_evm_verification_failed: "invalid_exact_evm_verification_failed",
5487
+ invalid_exact_evm_failed_to_parse_signature: "invalid_exact_evm_failed_to_parse_signature",
5488
+ invalid_exact_evm_failed_to_check_deployment: "invalid_exact_evm_failed_to_check_deployment",
5489
+ invalid_exact_evm_failed_to_execute_transfer: "invalid_exact_evm_failed_to_execute_transfer",
5490
+ invalid_exact_evm_failed_to_get_receipt: "invalid_exact_evm_failed_to_get_receipt",
5491
+ invalid_exact_evm_transaction_failed: "invalid_exact_evm_transaction_failed",
5492
+ invalid_exact_evm_payload_undeployed_smart_wallet:
5493
+ "invalid_exact_evm_payload_undeployed_smart_wallet",
5494
+ smart_wallet_deployment_failed: "smart_wallet_deployment_failed",
5495
+ unsupported_payload_type: "unsupported_payload_type",
5496
+ invalid_erc20_approval_extension_format: "invalid_erc20_approval_extension_format",
5497
+ erc20_approval_tx_failed: "erc20_approval_tx_failed",
5498
+ erc20_approval_from_mismatch: "erc20_approval_from_mismatch",
5499
+ erc20_approval_asset_mismatch: "erc20_approval_asset_mismatch",
5500
+ erc20_approval_spender_not_permit2: "erc20_approval_spender_not_permit2",
5501
+ erc20_approval_tx_parse_failed: "erc20_approval_tx_parse_failed",
5502
+ erc20_approval_tx_wrong_target: "erc20_approval_tx_wrong_target",
5503
+ erc20_approval_tx_wrong_selector: "erc20_approval_tx_wrong_selector",
5504
+ erc20_approval_tx_wrong_spender: "erc20_approval_tx_wrong_spender",
5505
+ erc20_approval_tx_signer_mismatch: "erc20_approval_tx_signer_mismatch",
5506
+ erc20_approval_tx_invalid_signature: "erc20_approval_tx_invalid_signature",
5507
+ invalid_exact_evm_unsupported_scheme: "invalid_exact_evm_unsupported_scheme",
5508
+ invalid_exact_evm_extra_field: "invalid_exact_evm_extra_field",
5509
+ invalid_exact_evm_payload_recipient_mismatch: "invalid_exact_evm_payload_recipient_mismatch",
5510
+ invalid_exact_evm_insufficient_funds: "invalid_exact_evm_insufficient_funds",
5511
+ invalid_exact_evm_transaction_state: "invalid_exact_evm_transaction_state",
5512
+ invalid_permit2_spender: "invalid_permit2_spender",
5513
+ invalid_permit2_recipient_mismatch: "invalid_permit2_recipient_mismatch",
5514
+ permit2_deadline_expired: "permit2_deadline_expired",
5515
+ permit2_not_yet_valid: "permit2_not_yet_valid",
5516
+ permit2_amount_mismatch: "permit2_amount_mismatch",
5517
+ permit2_token_mismatch: "permit2_token_mismatch",
5518
+ invalid_permit2_signature: "invalid_permit2_signature",
5519
+ permit2_allowance_required: "permit2_allowance_required",
5520
+ permit2_invalid_amount: "permit2_invalid_amount",
5521
+ permit2_invalid_destination: "permit2_invalid_destination",
5522
+ permit2_invalid_owner: "permit2_invalid_owner",
5523
+ permit2_payment_too_early: "permit2_payment_too_early",
5524
+ permit2_invalid_nonce: "permit2_invalid_nonce",
5525
+ permit2_2612_amount_mismatch: "permit2_2612_amount_mismatch",
5526
+ permit2_simulation_failed: "permit2_simulation_failed",
5527
+ permit2_insufficient_balance: "permit2_insufficient_balance",
5528
+ permit2_proxy_not_deployed: "permit2_proxy_not_deployed",
5529
+ erc20_approval_insufficient_eth_for_gas: "erc20_approval_insufficient_eth_for_gas",
5530
+ erc20_approval_broadcast_failed: "erc20_approval_broadcast_failed",
5531
+ invalid_exact_solana_unsupported_scheme: "invalid_exact_solana_unsupported_scheme",
5532
+ invalid_exact_solana_network_mismatch: "invalid_exact_solana_network_mismatch",
5533
+ invalid_exact_solana_payload_missing_fee_payer: "invalid_exact_solana_payload_missing_fee_payer",
5534
+ invalid_exact_solana_fee_payer_not_managed_by_facilitator:
5535
+ "invalid_exact_solana_fee_payer_not_managed_by_facilitator",
5536
+ invalid_exact_solana_payload_transaction: "invalid_exact_solana_payload_transaction",
5537
+ invalid_exact_solana_payload_transaction_could_not_be_decoded:
5538
+ "invalid_exact_solana_payload_transaction_could_not_be_decoded",
5539
+ invalid_exact_solana_payload_transaction_instructions_length:
5540
+ "invalid_exact_solana_payload_transaction_instructions_length",
5541
+ invalid_exact_solana_payload_unknown_fourth_instruction:
5542
+ "invalid_exact_solana_payload_unknown_fourth_instruction",
5543
+ invalid_exact_solana_payload_unknown_fifth_instruction:
5544
+ "invalid_exact_solana_payload_unknown_fifth_instruction",
5545
+ invalid_exact_solana_payload_unknown_sixth_instruction:
5546
+ "invalid_exact_solana_payload_unknown_sixth_instruction",
5547
+ invalid_exact_solana_payload_transaction_instructions_compute_limit_instruction:
5548
+ "invalid_exact_solana_payload_transaction_instructions_compute_limit_instruction",
5549
+ invalid_exact_solana_payload_transaction_instructions_compute_price_instruction:
5550
+ "invalid_exact_solana_payload_transaction_instructions_compute_price_instruction",
5551
+ invalid_exact_solana_payload_transaction_instructions_compute_price_instruction_too_high:
5552
+ "invalid_exact_solana_payload_transaction_instructions_compute_price_instruction_too_high",
5553
+ invalid_exact_solana_payload_no_transfer_instruction:
5554
+ "invalid_exact_solana_payload_no_transfer_instruction",
5555
+ invalid_exact_solana_payload_transaction_fee_payer_transferring_funds:
5556
+ "invalid_exact_solana_payload_transaction_fee_payer_transferring_funds",
5557
+ invalid_exact_solana_payload_mint_mismatch: "invalid_exact_solana_payload_mint_mismatch",
5558
+ invalid_exact_solana_payload_recipient_mismatch:
5559
+ "invalid_exact_solana_payload_recipient_mismatch",
5560
+ invalid_exact_solana_payload_amount_insufficient:
5561
+ "invalid_exact_solana_payload_amount_insufficient",
5562
+ invalid_exact_solana_invalid_fee_payer: "invalid_exact_solana_invalid_fee_payer",
5563
+ invalid_exact_solana_transaction_signing_failed:
5564
+ "invalid_exact_solana_transaction_signing_failed",
5565
+ invalid_exact_solana_transaction_simulation_failed:
5566
+ "invalid_exact_solana_transaction_simulation_failed",
5567
+ invalid_exact_solana_payload_memo_mismatch: "invalid_exact_solana_payload_memo_mismatch",
5568
+ invalid_exact_solana_payload_memo_count: "invalid_exact_solana_payload_memo_count",
5569
+ invalid_exact_solana_verification_failed: "invalid_exact_solana_verification_failed",
5570
+ invalid_exact_solana_fee_payer_mismatch: "invalid_exact_solana_fee_payer_mismatch",
5571
+ invalid_exact_solana_transaction_failed: "invalid_exact_solana_transaction_failed",
5572
+ invalid_exact_solana_transaction_confirmation_failed:
5573
+ "invalid_exact_solana_transaction_confirmation_failed",
5574
+ duplicate_settlement: "duplicate_settlement",
5575
+ invalid_exact_solana_extra_field: "invalid_exact_solana_extra_field",
5576
+ batch_settlement_cumulative_amount_mismatch: "batch_settlement_cumulative_amount_mismatch",
5577
+ batch_settlement_channel_busy: "batch_settlement_channel_busy",
5578
+ missing_batch_settlement_channel: "missing_batch_settlement_channel",
5579
+ batch_settlement_charge_exceeds_signed_cumulative:
5580
+ "batch_settlement_charge_exceeds_signed_cumulative",
5581
+ batch_settlement_refund_no_balance: "batch_settlement_refund_no_balance",
5582
+ batch_settlement_refund_amount_invalid: "batch_settlement_refund_amount_invalid",
5583
+ batch_settlement_refund_amount_exceeds_balance: "batch_settlement_refund_amount_exceeds_balance",
5584
+ amount_too_low: "amount_too_low",
5585
+ invalid_amount: "invalid_amount",
5586
+ kyt_risk_detected: "kyt_risk_detected",
5587
+ permit2_disabled: "permit2_disabled",
5588
+ preflight_validation_failed: "preflight_validation_failed",
5589
+ request_blocked_by_location: "request_blocked_by_location",
5590
+ self_send_not_allowed: "self_send_not_allowed",
5591
+ invalid_bazaar_extension: "invalid_bazaar_extension",
3958
5592
  unknown_error: "unknown_error",
3959
5593
  } as const;
3960
5594
 
@@ -3967,15 +5601,12 @@ export interface X402SettlePaymentRejection {
3967
5601
  errorReason: X402SettleErrorReason;
3968
5602
  /** The message describing the error reason. */
3969
5603
  errorMessage?: string;
3970
- /**
3971
- * The onchain address of the client that is paying for the resource.
5604
+ /** The onchain address of the client that is paying for the resource.
3972
5605
 
3973
5606
  For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
3974
5607
 
3975
- For Solana-based networks, the payer will be a base58-encoded Solana address.
3976
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3977
- */
3978
- payer?: string;
5608
+ For Solana-based networks, the payer will be a base58-encoded Solana address. */
5609
+ payer?: BlockchainAddress;
3979
5610
  /**
3980
5611
  * The transaction of the settlement.
3981
5612
  For EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.
@@ -3997,10 +5628,11 @@ export type X402SupportedPaymentKindScheme =
3997
5628
  export const X402SupportedPaymentKindScheme = {
3998
5629
  exact: "exact",
3999
5630
  upto: "upto",
5631
+ "batch-settlement": "batch-settlement",
4000
5632
  } as const;
4001
5633
 
4002
5634
  /**
4003
- * The network of the blockchain.
5635
+ * The network of the blockchain. The format corresponds to the `x402Version` of the enclosing `x402SupportedPaymentKind`: v1 uses human-readable names (see `X402V1Network`); v2 uses CAIP-2 chain IDs (see `X402V2Network`).
4004
5636
  */
4005
5637
  export type X402SupportedPaymentKindNetwork =
4006
5638
  (typeof X402SupportedPaymentKindNetwork)[keyof typeof X402SupportedPaymentKindNetwork];
@@ -4011,21 +5643,22 @@ export const X402SupportedPaymentKindNetwork = {
4011
5643
  base: "base",
4012
5644
  "solana-devnet": "solana-devnet",
4013
5645
  solana: "solana",
4014
- polygon: "polygon",
4015
5646
  "eip155:8453": "eip155:8453",
4016
5647
  "eip155:84532": "eip155:84532",
4017
5648
  "eip155:137": "eip155:137",
5649
+ "eip155:42161": "eip155:42161",
5650
+ "eip155:480": "eip155:480",
5651
+ "eip155:4801": "eip155:4801",
4018
5652
  "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
4019
5653
  "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
4020
- avalanche: "avalanche",
4021
- arbitrum: "arbitrum",
4022
- "arbitrum-sepolia": "arbitrum-sepolia",
4023
- world: "world",
4024
- "world-sepolia": "world-sepolia",
4025
5654
  } as const;
4026
5655
 
4027
5656
  /**
4028
5657
  * The optional additional scheme-specific payment info.
5658
+ Common scheme-specific fields:
5659
+ - `exact` on Solana: `feePayer` — the base58-encoded Solana address that pays transaction fees.
5660
+ - `upto` on EVM: `name`, `version`, and `facilitatorAddress` — the EVM address of the facilitator that the client must bind into the Permit2 witness when constructing the payment payload.
5661
+ - `batch-settlement` on EVM: `name`, `version`, `receiverAuthorizer` (the EVM address authorized to sign claim batches), `withdrawDelay` (channel non-cooperative withdraw delay in seconds, 900–2,592,000), and optionally `assetTransferMethod` (e.g., `"eip3009"`).
4029
5662
  */
4030
5663
  export type X402SupportedPaymentKindExtra = { [key: string]: unknown };
4031
5664
 
@@ -4036,9 +5669,13 @@ export interface X402SupportedPaymentKind {
4036
5669
  x402Version: X402Version;
4037
5670
  /** The scheme of the payment protocol. */
4038
5671
  scheme: X402SupportedPaymentKindScheme;
4039
- /** The network of the blockchain. */
5672
+ /** The network of the blockchain. The format corresponds to the `x402Version` of the enclosing `x402SupportedPaymentKind`: v1 uses human-readable names (see `X402V1Network`); v2 uses CAIP-2 chain IDs (see `X402V2Network`). */
4040
5673
  network: X402SupportedPaymentKindNetwork;
4041
- /** The optional additional scheme-specific payment info. */
5674
+ /** The optional additional scheme-specific payment info.
5675
+ Common scheme-specific fields:
5676
+ - `exact` on Solana: `feePayer` — the base58-encoded Solana address that pays transaction fees.
5677
+ - `upto` on EVM: `name`, `version`, and `facilitatorAddress` — the EVM address of the facilitator that the client must bind into the Permit2 witness when constructing the payment payload.
5678
+ - `batch-settlement` on EVM: `name`, `version`, `receiverAuthorizer` (the EVM address authorized to sign claim batches), `withdrawDelay` (channel non-cooperative withdraw delay in seconds, 900–2,592,000), and optionally `assetTransferMethod` (e.g., `"eip3009"`). */
4042
5679
  extra?: X402SupportedPaymentKindExtra;
4043
5680
  }
4044
5681
 
@@ -4089,6 +5726,24 @@ export interface X402DiscoveryResource {
4089
5726
  /** Map of x402 protocol extensions supported by the resource, keyed by extension name. */
4090
5727
  extensions?: X402DiscoveryResourceExtensions;
4091
5728
  quality?: X402ResourceQuality;
5729
+ /** Provider-supplied display name of the service this resource belongs to. This is a free-form
5730
+ label for grouping and presentation only — it is not a stable identifier, and two resources
5731
+ sharing the same `serviceName` are not guaranteed to belong to the same logical service.
5732
+ */
5733
+ serviceName?: string;
5734
+ /** Provider-supplied, low-cardinality string labels associated with the resource for client-side
5735
+ filtering and display. Values are free-form (no controlled vocabulary) and case-sensitive.
5736
+ Order is not significant and duplicates are not expected.
5737
+ */
5738
+ tags?: string[];
5739
+ /** URL of a square icon representing the service this resource belongs to. Distinct from a
5740
+ brand logo: this is intended for compact, list-view rendering (favicon-style) and is
5741
+ normalized to a square aspect ratio at ingestion. The image is moderated and re-hosted by
5742
+ Coinbase, so the URL is stable and safe to render directly in clients. Omitted when the
5743
+ provider did not supply an icon, when the supplied icon failed moderation, or when image
5744
+ processing was unavailable at ingestion time.
5745
+ */
5746
+ iconUrl?: Url;
4092
5747
  }
4093
5748
 
4094
5749
  /**
@@ -4139,7 +5794,7 @@ export interface X402DiscoveryMerchantResponse {
4139
5794
  }
4140
5795
 
4141
5796
  /**
4142
- * The search method used to retrieve the results (e.g., "text" or "vector").
5797
+ * The search method used to retrieve the results (e.g., "text", "vector", "hybrid").
4143
5798
  */
4144
5799
  export type X402SearchResourcesResponseSearchMethod =
4145
5800
  (typeof X402SearchResourcesResponseSearchMethod)[keyof typeof X402SearchResourcesResponseSearchMethod];
@@ -4148,6 +5803,7 @@ export type X402SearchResourcesResponseSearchMethod =
4148
5803
  export const X402SearchResourcesResponseSearchMethod = {
4149
5804
  text: "text",
4150
5805
  vector: "vector",
5806
+ hybrid: "hybrid",
4151
5807
  } as const;
4152
5808
 
4153
5809
  /**
@@ -4158,7 +5814,7 @@ export interface X402SearchResourcesResponse {
4158
5814
  resources: X402DiscoveryResource[];
4159
5815
  /** Indicates whether the result set was truncated because there were more results than the requested limit. */
4160
5816
  partialResults: boolean;
4161
- /** The search method used to retrieve the results (e.g., "text" or "vector"). */
5817
+ /** The search method used to retrieve the results (e.g., "text", "vector", "hybrid"). */
4162
5818
  searchMethod?: X402SearchResourcesResponseSearchMethod;
4163
5819
  x402Version: X402Version;
4164
5820
  }
@@ -4415,100 +6071,275 @@ export interface OnrampQuote {
4415
6071
  }
4416
6072
 
4417
6073
  /**
4418
- * The type of user identifier:
4419
- - `phone_number`: A phone number in E.164 format associated with an onramp user.
4420
-
6074
+ * The type of user identifier:
6075
+ - `phone_number`: A phone number in E.164 format associated with an onramp user.
6076
+
6077
+ */
6078
+ export type OnrampUserIdType = (typeof OnrampUserIdType)[keyof typeof OnrampUserIdType];
6079
+
6080
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
6081
+ export const OnrampUserIdType = {
6082
+ phone_number: "phone_number",
6083
+ } as const;
6084
+
6085
+ /**
6086
+ * The type of limit:
6087
+ - `weekly_spending`: Rolling 7-day spending limit. The limit applies to the sum of all completed transactions
6088
+ within a sliding 168-hour (7-day) window. As time passes, older transactions naturally expire from the window.
6089
+ $500 is the default limit.
6090
+ - `lifetime_transactions`: All-time transaction count limit. Tracks the total number of completed transactions
6091
+ across the user's entire history with no time-based expiration. Once the limit is reached, no further
6092
+ transactions are allowed. 15 is the default limit.
6093
+
6094
+ */
6095
+ export type OnrampLimitType = (typeof OnrampLimitType)[keyof typeof OnrampLimitType];
6096
+
6097
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
6098
+ export const OnrampLimitType = {
6099
+ weekly_spending: "weekly_spending",
6100
+ lifetime_transactions: "lifetime_transactions",
6101
+ } as const;
6102
+
6103
+ /**
6104
+ * A single limit with remaining capacity.
6105
+ */
6106
+ export interface OnrampUserLimit {
6107
+ limitType: OnrampLimitType;
6108
+ /** The currency of the limit amounts. Only present for spending limits, not for count-based limits. */
6109
+ currency?: string;
6110
+ /** The maximum limit value. */
6111
+ limit: string;
6112
+ /** The remaining amount or count available. */
6113
+ remaining: string;
6114
+ }
6115
+
6116
+ /**
6117
+ * Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`.
6118
+ */
6119
+ export interface OnrampLimitUpgradeIdentityFields {
6120
+ /** Last 4 digits of the Social Security Number (no dashes or spaces). */
6121
+ ssnLast4?: string;
6122
+ /** Date of birth. */
6123
+ dateOfBirth?: DateOfBirth;
6124
+ }
6125
+
6126
+ /**
6127
+ * Request to request a limits upgrade for a user.
6128
+ */
6129
+ export interface OnrampLimitUpgradeRequest {
6130
+ /** The user identifier value. For `phone_number` type, this must be in E.164 format. */
6131
+ userId: string;
6132
+ userIdType: OnrampUserIdType;
6133
+ /** Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`. */
6134
+ fields: OnrampLimitUpgradeIdentityFields;
6135
+ }
6136
+
6137
+ /**
6138
+ * The ID of the Payment Method, which is a UUID prefixed by the string `paymentMethod_`.
6139
+ * @pattern ^paymentMethod_[a-f0-9\-]{36}$
6140
+ */
6141
+ export type PaymentMethodId = string;
6142
+
6143
+ /**
6144
+ * Common properties shared by all payment method types.
6145
+ */
6146
+ export interface PaymentMethodBase {
6147
+ paymentMethodId: PaymentMethodId;
6148
+ /** Whether the payment method is active and can be used in transfers. A payment method may be inactive due to verification requirements or entity-level restrictions. */
6149
+ active: boolean;
6150
+ /** The timestamp when the payment method was created. */
6151
+ createdAt: string;
6152
+ /** The timestamp when the payment method was last updated. */
6153
+ updatedAt: string;
6154
+ }
6155
+
6156
+ /**
6157
+ * Details specific to Fedwire (domestic USD wire) payment methods.
6158
+ */
6159
+ export interface FedwireDetails {
6160
+ /** The asset for this payment method. Always `usd` for Fedwire. */
6161
+ asset: string;
6162
+ /** The name of the bank. */
6163
+ bankName: string;
6164
+ /**
6165
+ * The last 4 digits of the bank account number.
6166
+ * @pattern ^[0-9]{4}$
6167
+ */
6168
+ accountLast4: string;
6169
+ /**
6170
+ * The ABA routing number of the bank.
6171
+ * @pattern ^[0-9]{9}$
6172
+ */
6173
+ routingNumber: string;
6174
+ }
6175
+
6176
+ /**
6177
+ * The payment rail for this payment method.
4421
6178
  */
4422
- export type OnrampUserIdType = (typeof OnrampUserIdType)[keyof typeof OnrampUserIdType];
6179
+ export type FedwirePaymentMethodAllOfPaymentRail =
6180
+ (typeof FedwirePaymentMethodAllOfPaymentRail)[keyof typeof FedwirePaymentMethodAllOfPaymentRail];
4423
6181
 
4424
6182
  // eslint-disable-next-line @typescript-eslint/no-redeclare
4425
- export const OnrampUserIdType = {
4426
- phone_number: "phone_number",
6183
+ export const FedwirePaymentMethodAllOfPaymentRail = {
6184
+ fedwire: "fedwire",
4427
6185
  } as const;
4428
6186
 
4429
- /**
4430
- * The type of limit:
4431
- - `weekly_spending`: Rolling 7-day spending limit. The limit applies to the sum of all completed transactions
4432
- within a sliding 168-hour (7-day) window. As time passes, older transactions naturally expire from the window.
4433
- $500 is the default limit.
4434
- - `lifetime_transactions`: All-time transaction count limit. Tracks the total number of completed transactions
4435
- across the user's entire history with no time-based expiration. Once the limit is reached, no further
4436
- transactions are allowed. 15 is the default limit.
6187
+ export type FedwirePaymentMethodAllOf = {
6188
+ /** The payment rail for this payment method. */
6189
+ paymentRail: FedwirePaymentMethodAllOfPaymentRail;
6190
+ /** Fedwire (domestic USD wire) details. */
6191
+ fedwire: FedwireDetails;
6192
+ };
4437
6193
 
4438
- */
4439
- export type OnrampLimitType = (typeof OnrampLimitType)[keyof typeof OnrampLimitType];
6194
+ export type FedwirePaymentMethodPaymentRail =
6195
+ (typeof FedwirePaymentMethodPaymentRail)[keyof typeof FedwirePaymentMethodPaymentRail];
4440
6196
 
4441
6197
  // eslint-disable-next-line @typescript-eslint/no-redeclare
4442
- export const OnrampLimitType = {
4443
- weekly_spending: "weekly_spending",
4444
- lifetime_transactions: "lifetime_transactions",
6198
+ export const FedwirePaymentMethodPaymentRail = {
6199
+ fedwire: "fedwire",
4445
6200
  } as const;
4446
6201
 
4447
6202
  /**
4448
- * A single limit with remaining capacity.
6203
+ * A Fedwire (domestic USD wire) payment method linked to your entity.
4449
6204
  */
4450
- export interface OnrampUserLimit {
4451
- limitType: OnrampLimitType;
4452
- /** The currency of the limit amounts. Only present for spending limits, not for count-based limits. */
4453
- currency?: string;
4454
- /** The maximum limit value. */
4455
- limit: string;
4456
- /** The remaining amount or count available. */
4457
- remaining: string;
4458
- }
6205
+ export type FedwirePaymentMethod = PaymentMethodBase &
6206
+ FedwirePaymentMethodAllOf & {
6207
+ paymentRail: FedwirePaymentMethodPaymentRail;
6208
+ };
4459
6209
 
4460
6210
  /**
4461
- * Date of birth.
6211
+ * Details specific to SWIFT (international wire) payment methods.
4462
6212
  */
4463
- export interface DateOfBirth {
6213
+ export interface SwiftDetails {
6214
+ /** The asset for this payment method (e.g., `eur`, `gbp`). */
6215
+ asset: string;
6216
+ /** The name of the bank. */
6217
+ bankName: string;
4464
6218
  /**
4465
- * Day of birth (01-31).
4466
- * @minLength 2
4467
- * @maxLength 2
4468
- * @pattern ^[0-9]{2}$
6219
+ * The last 4 characters of the account identifier. For IBAN-based accounts (e.g., EU), this is the last 4 characters of the IBAN. For account number-based accounts (e.g., US), this is the last 4 digits of the account number.
6220
+ * @pattern ^[A-Z0-9]{4}$
4469
6221
  */
4470
- day?: string;
6222
+ accountLast4: string;
4471
6223
  /**
4472
- * Month of birth (01-12).
4473
- * @minLength 2
4474
- * @maxLength 2
4475
- * @pattern ^[0-9]{2}$
6224
+ * Deprecated: use `accountLast4` instead. The last 4 characters of the account identifier.
6225
+ * @deprecated
6226
+ * @pattern ^[A-Z0-9]{4}$
4476
6227
  */
4477
- month?: string;
6228
+ ibanLast4?: string;
4478
6229
  /**
4479
- * Year of birth (four digits).
4480
- * @minLength 4
4481
- * @maxLength 4
4482
- * @pattern ^[0-9]{4}$
6230
+ * The Bank Identifier Code (BIC) / SWIFT code.
6231
+ * @pattern ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
4483
6232
  */
4484
- year?: string;
6233
+ bic: string;
4485
6234
  }
4486
6235
 
4487
6236
  /**
4488
- * Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`.
6237
+ * The payment rail for this payment method.
4489
6238
  */
4490
- export interface OnrampLimitUpgradeIdentityFields {
4491
- /** Last 4 digits of the Social Security Number (no dashes or spaces). */
4492
- ssnLast4?: string;
4493
- /** Date of birth. */
4494
- dateOfBirth?: DateOfBirth;
4495
- }
6239
+ export type SwiftPaymentMethodAllOfPaymentRail =
6240
+ (typeof SwiftPaymentMethodAllOfPaymentRail)[keyof typeof SwiftPaymentMethodAllOfPaymentRail];
6241
+
6242
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
6243
+ export const SwiftPaymentMethodAllOfPaymentRail = {
6244
+ swift: "swift",
6245
+ } as const;
6246
+
6247
+ export type SwiftPaymentMethodAllOf = {
6248
+ /** The payment rail for this payment method. */
6249
+ paymentRail: SwiftPaymentMethodAllOfPaymentRail;
6250
+ /** SWIFT (international wire) details. */
6251
+ swift: SwiftDetails;
6252
+ };
6253
+
6254
+ export type SwiftPaymentMethodPaymentRail =
6255
+ (typeof SwiftPaymentMethodPaymentRail)[keyof typeof SwiftPaymentMethodPaymentRail];
6256
+
6257
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
6258
+ export const SwiftPaymentMethodPaymentRail = {
6259
+ swift: "swift",
6260
+ } as const;
4496
6261
 
4497
6262
  /**
4498
- * Request to request a limits upgrade for a user.
6263
+ * A SWIFT (international wire) payment method linked to your entity.
4499
6264
  */
4500
- export interface OnrampLimitUpgradeRequest {
4501
- /** The user identifier value. For `phone_number` type, this must be in E.164 format. */
4502
- userId: string;
4503
- userIdType: OnrampUserIdType;
4504
- /** Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`. */
4505
- fields: OnrampLimitUpgradeIdentityFields;
6265
+ export type SwiftPaymentMethod = PaymentMethodBase &
6266
+ SwiftPaymentMethodAllOf & {
6267
+ paymentRail: SwiftPaymentMethodPaymentRail;
6268
+ };
6269
+
6270
+ /**
6271
+ * Details specific to SEPA (Single Euro Payments Area) payment methods.
6272
+ */
6273
+ export interface SepaDetails {
6274
+ /** The asset for this payment method. Always `eur` for SEPA. */
6275
+ asset: string;
6276
+ /** The name of the bank. */
6277
+ bankName: string;
6278
+ /**
6279
+ * The last 4 characters of the IBAN.
6280
+ * @pattern ^[A-Z0-9]{4}$
6281
+ */
6282
+ ibanLast4: string;
6283
+ /**
6284
+ * The Bank Identifier Code (BIC) / SWIFT code.
6285
+ * @pattern ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
6286
+ */
6287
+ bic: string;
4506
6288
  }
4507
6289
 
4508
6290
  /**
4509
- * Unauthorized.
6291
+ * The payment rail for this payment method.
4510
6292
  */
4511
- export type UnauthorizedErrorResponse = Error;
6293
+ export type SepaPaymentMethodAllOfPaymentRail =
6294
+ (typeof SepaPaymentMethodAllOfPaymentRail)[keyof typeof SepaPaymentMethodAllOfPaymentRail];
6295
+
6296
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
6297
+ export const SepaPaymentMethodAllOfPaymentRail = {
6298
+ sepa: "sepa",
6299
+ } as const;
6300
+
6301
+ export type SepaPaymentMethodAllOf = {
6302
+ /** The payment rail for this payment method. */
6303
+ paymentRail: SepaPaymentMethodAllOfPaymentRail;
6304
+ /** SEPA (Single Euro Payments Area) details. */
6305
+ sepa: SepaDetails;
6306
+ };
6307
+
6308
+ export type SepaPaymentMethodPaymentRail =
6309
+ (typeof SepaPaymentMethodPaymentRail)[keyof typeof SepaPaymentMethodPaymentRail];
6310
+
6311
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
6312
+ export const SepaPaymentMethodPaymentRail = {
6313
+ sepa: "sepa",
6314
+ } as const;
6315
+
6316
+ /**
6317
+ * A SEPA (Single Euro Payments Area) payment method linked to your entity.
6318
+ */
6319
+ export type SepaPaymentMethod = PaymentMethodBase &
6320
+ SepaPaymentMethodAllOf & {
6321
+ paymentRail: SepaPaymentMethodPaymentRail;
6322
+ };
6323
+
6324
+ /**
6325
+ * A payment method linked to your entity. Payment methods represent external financial instruments that can be used as a target for transfers.
6326
+
6327
+ The `paymentRail` field indicates which type-specific details object is present. Type-specific fields are nested under a key matching the rail name (e.g., `fedwire`, `swift`).
6328
+ */
6329
+ export type PaymentMethodsPaymentMethod =
6330
+ | FedwirePaymentMethod
6331
+ | SwiftPaymentMethod
6332
+ | SepaPaymentMethod;
6333
+
6334
+ /**
6335
+ * Idempotency key conflict.
6336
+ */
6337
+ export type IdempotencyErrorResponse = Error;
6338
+
6339
+ /**
6340
+ * The endpoint cannot serve the request right now, either because the API is in an unintended outage (`service_unavailable` — dependency failure, deploy issue) or because an operator has intentionally disabled this specific endpoint via a kill switch (`endpoint_unavailable`). Clients should dispatch on `errorType`: `service_unavailable` is typically transient and safe to retry, while `endpoint_unavailable` may persist until an operator re-enables the endpoint.
6341
+ */
6342
+ export type EndpointUnavailableErrorResponse = Error;
4512
6343
 
4513
6344
  /**
4514
6345
  * Internal server error.
@@ -4525,15 +6356,20 @@ export type BadGatewayErrorResponse = Error;
4525
6356
  */
4526
6357
  export type ServiceUnavailableErrorResponse = Error;
4527
6358
 
6359
+ /**
6360
+ * Unauthorized.
6361
+ */
6362
+ export type UnauthorizedErrorResponse = Error;
6363
+
4528
6364
  /**
4529
6365
  * A payment method is required to complete this operation.
4530
6366
  */
4531
6367
  export type PaymentMethodRequiredErrorResponse = Error;
4532
6368
 
4533
6369
  /**
4534
- * Idempotency key conflict.
6370
+ * The request was rejected due to a delegation issue. The errorType field indicates the specific reason.
4535
6371
  */
4536
- export type IdempotencyErrorResponse = Error;
6372
+ export type DelegationForbiddenErrorResponse = Error;
4537
6373
 
4538
6374
  /**
4539
6375
  * The resource already exists.
@@ -4555,21 +6391,25 @@ export type ClientClosedRequestErrorResponse = Error;
4555
6391
  */
4556
6392
  export type TimedOutErrorResponse = Error;
4557
6393
 
6394
+ /**
6395
+ * Optional scheme-specific verify metadata returned by the facilitator.
6396
+ */
6397
+ export type X402VerifyResponseResponseExtra = { [key: string]: unknown };
6398
+
4558
6399
  export type X402VerifyResponseResponse = {
4559
6400
  /** Indicates whether the payment is valid. */
4560
6401
  isValid: boolean;
4561
6402
  invalidReason?: X402VerifyInvalidReason;
4562
6403
  /** The message describing the invalid reason. */
4563
6404
  invalidMessage?: string;
4564
- /**
4565
- * The onchain address of the client that is paying for the resource.
6405
+ /** The onchain address of the client that is paying for the resource.
4566
6406
 
4567
6407
  For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
4568
6408
 
4569
- For Solana-based networks, the payer will be a base58-encoded Solana address.
4570
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
4571
- */
4572
- payer: string;
6409
+ For Solana-based networks, the payer will be a base58-encoded Solana address. */
6410
+ payer: BlockchainAddress;
6411
+ /** Optional scheme-specific verify metadata returned by the facilitator. */
6412
+ extra?: X402VerifyResponseResponseExtra;
4573
6413
  };
4574
6414
 
4575
6415
  /**
@@ -4577,21 +6417,23 @@ For Solana-based networks, the payer will be a base58-encoded Solana address.
4577
6417
  */
4578
6418
  export type X402VerifyInvalidErrorResponse = X402VerifyPaymentRejection;
4579
6419
 
6420
+ /**
6421
+ * Optional scheme-specific success metadata returned by the facilitator.
6422
+ */
6423
+ export type X402SettleResponseResponseExtra = { [key: string]: unknown };
6424
+
4580
6425
  export type X402SettleResponseResponse = {
4581
6426
  /** Indicates whether the payment settlement is successful. */
4582
6427
  success: boolean;
4583
6428
  errorReason?: X402SettleErrorReason;
4584
6429
  /** The message describing the error reason. */
4585
6430
  errorMessage?: string;
4586
- /**
4587
- * The onchain address of the client that is paying for the resource.
6431
+ /** The onchain address of the client that is paying for the resource.
4588
6432
 
4589
6433
  For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
4590
6434
 
4591
- For Solana-based networks, the payer will be a base58-encoded Solana address.
4592
- * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
4593
- */
4594
- payer: string;
6435
+ For Solana-based networks, the payer will be a base58-encoded Solana address. */
6436
+ payer: BlockchainAddress;
4595
6437
  /**
4596
6438
  * The transaction of the settlement.
4597
6439
  For EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.
@@ -4603,6 +6445,8 @@ For Solana-based networks, the transaction will be a base58-encoded Solana signa
4603
6445
  network: string;
4604
6446
  /** The amount that was settled, in atomic units. */
4605
6447
  amount?: string;
6448
+ /** Optional scheme-specific success metadata returned by the facilitator. */
6449
+ extra?: X402SettleResponseResponseExtra;
4606
6450
  };
4607
6451
 
4608
6452
  /**
@@ -4630,12 +6474,14 @@ export type X402SupportedPaymentKindsResponseResponse = {
4630
6474
  export type RateLimitExceededResponse = Error;
4631
6475
 
4632
6476
  /**
4633
- * A JWT signed using your Wallet Secret, encoded in base64. Refer to the
4634
- [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
4635
- section of our Authentication docs for more details on how to generate your Wallet Token.
6477
+ * The number of resources to return per page.
6478
+ */
6479
+ export type PageSizeParameter = number;
4636
6480
 
6481
+ /**
6482
+ * The token for the next page of resources, if any.
4637
6483
  */
4638
- export type XWalletAuthParameter = string;
6484
+ export type PageTokenParameter = string;
4639
6485
 
4640
6486
  /**
4641
6487
  * An optional string request header for making requests safely retryable.
@@ -4645,6 +6491,14 @@ Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/i
4645
6491
  */
4646
6492
  export type IdempotencyKeyParameter = string;
4647
6493
 
6494
+ /**
6495
+ * A JWT signed using your Wallet Secret, encoded in base64. Refer to the
6496
+ [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
6497
+ section of our Authentication docs for more details on how to generate your Wallet Token.
6498
+
6499
+ */
6500
+ export type XWalletAuthParameter = string;
6501
+
4648
6502
  /**
4649
6503
  * A JWT signed using your Wallet Secret, encoded in base64. Refer to the
4650
6504
  [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
@@ -4666,15 +6520,149 @@ export type XDeveloperAuthParameter = string;
4666
6520
  */
4667
6521
  export type ProjectIDOptionalParameter = string;
4668
6522
 
4669
- /**
4670
- * The number of resources to return per page.
4671
- */
4672
- export type PageSizeParameter = number;
6523
+ export type ListFoundationAccountsParams = {
6524
+ /**
6525
+ * The number of resources to return per page.
6526
+ */
6527
+ pageSize?: PageSizeParameter;
6528
+ /**
6529
+ * The token for the next page of resources, if any.
6530
+ */
6531
+ pageToken?: PageTokenParameter;
6532
+ /**
6533
+ * Filter accounts by account type. When omitted, accounts of any type are returned. Combined with `owner` using AND.
6534
+ */
6535
+ type?: AccountType;
6536
+ };
4673
6537
 
4674
- /**
4675
- * The token for the next page of resources, if any.
4676
- */
4677
- export type PageTokenParameter = string;
6538
+ export type ListFoundationAccounts200AllOf = {
6539
+ /** The list of accounts. */
6540
+ accounts: Account[];
6541
+ };
6542
+
6543
+ export type ListFoundationAccounts200 = ListFoundationAccounts200AllOf & ListResponse;
6544
+
6545
+ export type ListBalancesParams = {
6546
+ /**
6547
+ * The number of resources to return per page.
6548
+ */
6549
+ pageSize?: PageSizeParameter;
6550
+ /**
6551
+ * The token for the next page of resources, if any.
6552
+ */
6553
+ pageToken?: PageTokenParameter;
6554
+ };
6555
+
6556
+ export type ListBalances200 = Balances & ListResponse;
6557
+
6558
+ export type ListDepositDestinationsParams = {
6559
+ /**
6560
+ * Filter deposit destinations by account ID.
6561
+ */
6562
+ accountId?: AccountId;
6563
+ /**
6564
+ * The cryptocurrency address to filter by. Format depends on the network (e.g., 0x-prefixed for EVM networks, base58 for Solana).
6565
+ */
6566
+ address?: string;
6567
+ /**
6568
+ * Filter deposit destinations by type.
6569
+ */
6570
+ type?: DepositDestinationType;
6571
+ /**
6572
+ * The blockchain network to filter by (e.g., base, ethereum). Only applies to crypto deposit destinations.
6573
+ */
6574
+ network?: string;
6575
+ /**
6576
+ * The number of resources to return per page.
6577
+ */
6578
+ pageSize?: PageSizeParameter;
6579
+ /**
6580
+ * The token for the next page of resources, if any.
6581
+ */
6582
+ pageToken?: PageTokenParameter;
6583
+ };
6584
+
6585
+ export type ListDepositDestinations200AllOf = {
6586
+ /** The list of deposit destinations. */
6587
+ depositDestinations: DepositDestination[];
6588
+ };
6589
+
6590
+ export type ListDepositDestinations200 = ListDepositDestinations200AllOf & ListResponse;
6591
+
6592
+ export type ListTransfersParams = {
6593
+ /**
6594
+ * Filter transfers by status. Useful for building dashboards, monitoring active transfers, or finding transfers needing action.
6595
+ */
6596
+ status?: TransferStatus;
6597
+ /**
6598
+ * Filter transfers by account ID. Returns transfers where the specified account is either the source or target (OR semantics). Cannot be combined with `sourceAccountId` or `targetAccountId`.
6599
+ */
6600
+ accountId?: AccountId;
6601
+ /**
6602
+ * Filter transfers by source account ID. Returns only transfers where the specified account is the source. Cannot be combined with `accountId`.
6603
+ */
6604
+ sourceAccountId?: AccountId;
6605
+ /**
6606
+ * Filter transfers by target account ID. Returns only transfers where the specified account is the target. Cannot be combined with `accountId`.
6607
+ */
6608
+ targetAccountId?: AccountId;
6609
+ /**
6610
+ * Filter transfers to those created at or after this datetime (inclusive). ISO 8601 format.
6611
+ */
6612
+ createdAfter?: string;
6613
+ /**
6614
+ * Filter transfers to those created at or before this datetime (inclusive). ISO 8601 format.
6615
+ */
6616
+ createdBefore?: string;
6617
+ /**
6618
+ * Filter transfers to those updated at or after this datetime (inclusive). ISO 8601 format. Useful for incremental sync — poll for transfers that changed state since your last check.
6619
+ */
6620
+ updatedAfter?: string;
6621
+ /**
6622
+ * Filter transfers to those updated at or before this datetime (inclusive). ISO 8601 format.
6623
+ */
6624
+ updatedBefore?: string;
6625
+ /**
6626
+ * Filter transfers by source asset symbol (e.g., `usd`, `usdc`).
6627
+ */
6628
+ sourceAsset?: string;
6629
+ /**
6630
+ * Filter transfers by target asset symbol (e.g., `usdc`, `eth`).
6631
+ */
6632
+ targetAsset?: string;
6633
+ /**
6634
+ * Filter transfers by the on-chain address of the source.
6635
+ */
6636
+ sourceAddress?: BlockchainAddress;
6637
+ /**
6638
+ * Filter transfers by the on-chain destination address of the target.
6639
+ */
6640
+ targetAddress?: BlockchainAddress;
6641
+ /**
6642
+ * Filter transfers by the email address of the target recipient.
6643
+ */
6644
+ targetEmail?: Email;
6645
+ /**
6646
+ * Filter to a specific transfer by ID. When provided, returns only the matching transfer and bypasses pagination.
6647
+ * @pattern ^transfer_[a-f0-9\-]{36}$
6648
+ */
6649
+ transferId?: string;
6650
+ /**
6651
+ * The number of resources to return per page.
6652
+ */
6653
+ pageSize?: PageSizeParameter;
6654
+ /**
6655
+ * The token for the next page of resources, if any.
6656
+ */
6657
+ pageToken?: PageTokenParameter;
6658
+ };
6659
+
6660
+ export type ListTransfers200AllOf = {
6661
+ /** The list of transfers. */
6662
+ transfers: Transfer[];
6663
+ };
6664
+
6665
+ export type ListTransfers200 = ListTransfers200AllOf & ListResponse;
4678
6666
 
4679
6667
  /**
4680
6668
  * Configuration for creating an EVM account for the end user.
@@ -4753,7 +6741,7 @@ export type LookupEndUserParams = {
4753
6741
  /**
4754
6742
  * The email address to search for across all email-based authentication methods.
4755
6743
  */
4756
- email?: string;
6744
+ email?: Email;
4757
6745
  /**
4758
6746
  * The OAuth provider to search by. Must be provided together with oauthSubject.
4759
6747
  */
@@ -4764,9 +6752,8 @@ export type LookupEndUserParams = {
4764
6752
  oauthSubject?: string;
4765
6753
  /**
4766
6754
  * The E.164-formatted phone number to search for. Must be URL-encoded when passed as a query parameter (e.g. `+14155552671` → `%2B14155552671`).
4767
- * @pattern ^\+[1-9]\d{1,14}$
4768
6755
  */
4769
- phoneNumber?: string;
6756
+ phoneNumber?: PhoneNumber;
4770
6757
  };
4771
6758
 
4772
6759
  export type LookupEndUser200 = {
@@ -6171,3 +8158,21 @@ export type GetOnrampUserLimits200 = {
6171
8158
  /** The list of limits applicable to the user. */
6172
8159
  limits: OnrampUserLimit[];
6173
8160
  };
8161
+
8162
+ export type ListPaymentMethodsParams = {
8163
+ /**
8164
+ * The number of resources to return per page.
8165
+ */
8166
+ pageSize?: PageSizeParameter;
8167
+ /**
8168
+ * The token for the next page of resources, if any.
8169
+ */
8170
+ pageToken?: PageTokenParameter;
8171
+ };
8172
+
8173
+ export type ListPaymentMethods200AllOf = {
8174
+ /** The list of payment methods. */
8175
+ paymentMethods: PaymentMethodsPaymentMethod[];
8176
+ };
8177
+
8178
+ export type ListPaymentMethods200 = ListPaymentMethods200AllOf & ListResponse;