@distilled.cloud/coinbase 0.0.0 → 0.2.5-alpha2
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.
- package/lib/category.d.ts +5 -0
- package/lib/category.d.ts.map +1 -0
- package/lib/category.js +5 -0
- package/lib/category.js.map +1 -0
- package/lib/client.d.ts +45 -0
- package/lib/client.d.ts.map +1 -0
- package/lib/client.js +244 -0
- package/lib/client.js.map +1 -0
- package/lib/credentials.d.ts +32 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +29 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +855 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +466 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +16 -0
- package/lib/index.js.map +1 -0
- package/lib/operations/addEndUserEvmAccount.d.ts +30 -0
- package/lib/operations/addEndUserEvmAccount.d.ts.map +1 -0
- package/lib/operations/addEndUserEvmAccount.js +38 -0
- package/lib/operations/addEndUserEvmAccount.js.map +1 -0
- package/lib/operations/addEndUserEvmSmartAccount.d.ts +32 -0
- package/lib/operations/addEndUserEvmSmartAccount.d.ts.map +1 -0
- package/lib/operations/addEndUserEvmSmartAccount.js +43 -0
- package/lib/operations/addEndUserEvmSmartAccount.js.map +1 -0
- package/lib/operations/addEndUserSolanaAccount.d.ts +30 -0
- package/lib/operations/addEndUserSolanaAccount.d.ts.map +1 -0
- package/lib/operations/addEndUserSolanaAccount.js +38 -0
- package/lib/operations/addEndUserSolanaAccount.js.map +1 -0
- package/lib/operations/createEndUser.d.ts +61 -0
- package/lib/operations/createEndUser.d.ts.map +1 -0
- package/lib/operations/createEndUser.js +67 -0
- package/lib/operations/createEndUser.js.map +1 -0
- package/lib/operations/createEvmAccount.d.ts +30 -0
- package/lib/operations/createEvmAccount.d.ts.map +1 -0
- package/lib/operations/createEvmAccount.js +36 -0
- package/lib/operations/createEvmAccount.js.map +1 -0
- package/lib/operations/createEvmEip7702Delegation.d.ts +34 -0
- package/lib/operations/createEvmEip7702Delegation.d.ts.map +1 -0
- package/lib/operations/createEvmEip7702Delegation.js +53 -0
- package/lib/operations/createEvmEip7702Delegation.js.map +1 -0
- package/lib/operations/createEvmSmartAccount.d.ts +27 -0
- package/lib/operations/createEvmSmartAccount.d.ts.map +1 -0
- package/lib/operations/createEvmSmartAccount.js +35 -0
- package/lib/operations/createEvmSmartAccount.js.map +1 -0
- package/lib/operations/createEvmSwapQuote.d.ts +26 -0
- package/lib/operations/createEvmSwapQuote.d.ts.map +1 -0
- package/lib/operations/createEvmSwapQuote.js +40 -0
- package/lib/operations/createEvmSwapQuote.js.map +1 -0
- package/lib/operations/createOnrampOrder.d.ts +58 -0
- package/lib/operations/createOnrampOrder.d.ts.map +1 -0
- package/lib/operations/createOnrampOrder.js +79 -0
- package/lib/operations/createOnrampOrder.js.map +1 -0
- package/lib/operations/createOnrampSession.d.ts +55 -0
- package/lib/operations/createOnrampSession.d.ts.map +1 -0
- package/lib/operations/createOnrampSession.js +70 -0
- package/lib/operations/createOnrampSession.js.map +1 -0
- package/lib/operations/createPolicy.d.ts +28 -0
- package/lib/operations/createPolicy.d.ts.map +1 -0
- package/lib/operations/createPolicy.js +34 -0
- package/lib/operations/createPolicy.js.map +1 -0
- package/lib/operations/createSolanaAccount.d.ts +30 -0
- package/lib/operations/createSolanaAccount.d.ts.map +1 -0
- package/lib/operations/createSolanaAccount.js +38 -0
- package/lib/operations/createSolanaAccount.js.map +1 -0
- package/lib/operations/createSpendPermission.d.ts +55 -0
- package/lib/operations/createSpendPermission.d.ts.map +1 -0
- package/lib/operations/createSpendPermission.js +93 -0
- package/lib/operations/createSpendPermission.js.map +1 -0
- package/lib/operations/createWebhookSubscription.d.ts +74 -0
- package/lib/operations/createWebhookSubscription.d.ts.map +1 -0
- package/lib/operations/createWebhookSubscription.js +82 -0
- package/lib/operations/createWebhookSubscription.js.map +1 -0
- package/lib/operations/deletePolicy.d.ts +20 -0
- package/lib/operations/deletePolicy.d.ts.map +1 -0
- package/lib/operations/deletePolicy.js +26 -0
- package/lib/operations/deletePolicy.js.map +1 -0
- package/lib/operations/deleteWebhookSubscription.d.ts +21 -0
- package/lib/operations/deleteWebhookSubscription.d.ts.map +1 -0
- package/lib/operations/deleteWebhookSubscription.js +32 -0
- package/lib/operations/deleteWebhookSubscription.js.map +1 -0
- package/lib/operations/exportEvmAccount.d.ts +27 -0
- package/lib/operations/exportEvmAccount.d.ts.map +1 -0
- package/lib/operations/exportEvmAccount.js +33 -0
- package/lib/operations/exportEvmAccount.js.map +1 -0
- package/lib/operations/exportEvmAccountByName.d.ts +27 -0
- package/lib/operations/exportEvmAccountByName.d.ts.map +1 -0
- package/lib/operations/exportEvmAccountByName.js +35 -0
- package/lib/operations/exportEvmAccountByName.js.map +1 -0
- package/lib/operations/exportSolanaAccount.d.ts +27 -0
- package/lib/operations/exportSolanaAccount.d.ts.map +1 -0
- package/lib/operations/exportSolanaAccount.js +35 -0
- package/lib/operations/exportSolanaAccount.js.map +1 -0
- package/lib/operations/exportSolanaAccountByName.d.ts +27 -0
- package/lib/operations/exportSolanaAccountByName.d.ts.map +1 -0
- package/lib/operations/exportSolanaAccountByName.js +38 -0
- package/lib/operations/exportSolanaAccountByName.js.map +1 -0
- package/lib/operations/getEndUser.d.ts +46 -0
- package/lib/operations/getEndUser.d.ts.map +1 -0
- package/lib/operations/getEndUser.js +52 -0
- package/lib/operations/getEndUser.js.map +1 -0
- package/lib/operations/getEvmAccount.d.ts +22 -0
- package/lib/operations/getEvmAccount.d.ts.map +1 -0
- package/lib/operations/getEvmAccount.js +28 -0
- package/lib/operations/getEvmAccount.js.map +1 -0
- package/lib/operations/getEvmAccountByName.d.ts +22 -0
- package/lib/operations/getEvmAccountByName.d.ts.map +1 -0
- package/lib/operations/getEvmAccountByName.js +30 -0
- package/lib/operations/getEvmAccountByName.js.map +1 -0
- package/lib/operations/getEvmEip7702DelegationOperationById.d.ts +22 -0
- package/lib/operations/getEvmEip7702DelegationOperationById.d.ts.map +1 -0
- package/lib/operations/getEvmEip7702DelegationOperationById.js +48 -0
- package/lib/operations/getEvmEip7702DelegationOperationById.js.map +1 -0
- package/lib/operations/getEvmSmartAccount.d.ts +23 -0
- package/lib/operations/getEvmSmartAccount.d.ts.map +1 -0
- package/lib/operations/getEvmSmartAccount.js +31 -0
- package/lib/operations/getEvmSmartAccount.js.map +1 -0
- package/lib/operations/getEvmSmartAccountByName.d.ts +23 -0
- package/lib/operations/getEvmSmartAccountByName.d.ts.map +1 -0
- package/lib/operations/getEvmSmartAccountByName.js +31 -0
- package/lib/operations/getEvmSmartAccountByName.js.map +1 -0
- package/lib/operations/getEvmSwapPrice.d.ts +21 -0
- package/lib/operations/getEvmSwapPrice.d.ts.map +1 -0
- package/lib/operations/getEvmSwapPrice.js +27 -0
- package/lib/operations/getEvmSwapPrice.js.map +1 -0
- package/lib/operations/getOnrampOrderById.d.ts +39 -0
- package/lib/operations/getOnrampOrderById.d.ts.map +1 -0
- package/lib/operations/getOnrampOrderById.js +56 -0
- package/lib/operations/getOnrampOrderById.js.map +1 -0
- package/lib/operations/getOnrampUserLimits.d.ts +24 -0
- package/lib/operations/getOnrampUserLimits.d.ts.map +1 -0
- package/lib/operations/getOnrampUserLimits.js +38 -0
- package/lib/operations/getOnrampUserLimits.js.map +1 -0
- package/lib/operations/getPolicyById.d.ts +23 -0
- package/lib/operations/getPolicyById.d.ts.map +1 -0
- package/lib/operations/getPolicyById.js +29 -0
- package/lib/operations/getPolicyById.js.map +1 -0
- package/lib/operations/getSQLGrammar.d.ts +14 -0
- package/lib/operations/getSQLGrammar.d.ts.map +1 -0
- package/lib/operations/getSQLGrammar.js +20 -0
- package/lib/operations/getSQLGrammar.js.map +1 -0
- package/lib/operations/getSolanaAccount.d.ts +22 -0
- package/lib/operations/getSolanaAccount.d.ts.map +1 -0
- package/lib/operations/getSolanaAccount.js +28 -0
- package/lib/operations/getSolanaAccount.js.map +1 -0
- package/lib/operations/getSolanaAccountByName.d.ts +22 -0
- package/lib/operations/getSolanaAccountByName.d.ts.map +1 -0
- package/lib/operations/getSolanaAccountByName.js +30 -0
- package/lib/operations/getSolanaAccountByName.js.map +1 -0
- package/lib/operations/getUserOperation.d.ts +39 -0
- package/lib/operations/getUserOperation.d.ts.map +1 -0
- package/lib/operations/getUserOperation.js +66 -0
- package/lib/operations/getUserOperation.js.map +1 -0
- package/lib/operations/getWebhookSubscription.d.ts +37 -0
- package/lib/operations/getWebhookSubscription.d.ts.map +1 -0
- package/lib/operations/getWebhookSubscription.js +48 -0
- package/lib/operations/getWebhookSubscription.js.map +1 -0
- package/lib/operations/importEndUser.d.ts +56 -0
- package/lib/operations/importEndUser.d.ts.map +1 -0
- package/lib/operations/importEndUser.js +62 -0
- package/lib/operations/importEndUser.js.map +1 -0
- package/lib/operations/importEvmAccount.d.ts +31 -0
- package/lib/operations/importEvmAccount.d.ts.map +1 -0
- package/lib/operations/importEvmAccount.js +37 -0
- package/lib/operations/importEvmAccount.js.map +1 -0
- package/lib/operations/importSolanaAccount.d.ts +30 -0
- package/lib/operations/importSolanaAccount.d.ts.map +1 -0
- package/lib/operations/importSolanaAccount.js +38 -0
- package/lib/operations/importSolanaAccount.js.map +1 -0
- package/lib/operations/index.d.ts +74 -0
- package/lib/operations/index.d.ts.map +1 -0
- package/lib/operations/index.js +74 -0
- package/lib/operations/index.js.map +1 -0
- package/lib/operations/listDataTokenBalances.d.ts +37 -0
- package/lib/operations/listDataTokenBalances.d.ts.map +1 -0
- package/lib/operations/listDataTokenBalances.js +48 -0
- package/lib/operations/listDataTokenBalances.js.map +1 -0
- package/lib/operations/listEndUsers.d.ts +53 -0
- package/lib/operations/listEndUsers.d.ts.map +1 -0
- package/lib/operations/listEndUsers.js +59 -0
- package/lib/operations/listEndUsers.js.map +1 -0
- package/lib/operations/listEvmAccounts.d.ts +28 -0
- package/lib/operations/listEvmAccounts.d.ts.map +1 -0
- package/lib/operations/listEvmAccounts.js +34 -0
- package/lib/operations/listEvmAccounts.js.map +1 -0
- package/lib/operations/listEvmSmartAccounts.d.ts +29 -0
- package/lib/operations/listEvmSmartAccounts.d.ts.map +1 -0
- package/lib/operations/listEvmSmartAccounts.js +37 -0
- package/lib/operations/listEvmSmartAccounts.js.map +1 -0
- package/lib/operations/listEvmTokenBalances.d.ts +37 -0
- package/lib/operations/listEvmTokenBalances.d.ts.map +1 -0
- package/lib/operations/listEvmTokenBalances.js +48 -0
- package/lib/operations/listEvmTokenBalances.js.map +1 -0
- package/lib/operations/listPolicies.d.ts +31 -0
- package/lib/operations/listPolicies.d.ts.map +1 -0
- package/lib/operations/listPolicies.js +37 -0
- package/lib/operations/listPolicies.js.map +1 -0
- package/lib/operations/listSolanaAccounts.d.ts +29 -0
- package/lib/operations/listSolanaAccounts.d.ts.map +1 -0
- package/lib/operations/listSolanaAccounts.js +37 -0
- package/lib/operations/listSolanaAccounts.js.map +1 -0
- package/lib/operations/listSolanaTokenBalances.d.ts +36 -0
- package/lib/operations/listSolanaTokenBalances.d.ts.map +1 -0
- package/lib/operations/listSolanaTokenBalances.js +47 -0
- package/lib/operations/listSolanaTokenBalances.js.map +1 -0
- package/lib/operations/listSpendPermissions.d.ts +40 -0
- package/lib/operations/listSpendPermissions.d.ts.map +1 -0
- package/lib/operations/listSpendPermissions.js +60 -0
- package/lib/operations/listSpendPermissions.js.map +1 -0
- package/lib/operations/listTokensForAccount.d.ts +23 -0
- package/lib/operations/listTokensForAccount.d.ts.map +1 -0
- package/lib/operations/listTokensForAccount.js +34 -0
- package/lib/operations/listTokensForAccount.js.map +1 -0
- package/lib/operations/listWebhookSubscriptions.d.ts +42 -0
- package/lib/operations/listWebhookSubscriptions.d.ts.map +1 -0
- package/lib/operations/listWebhookSubscriptions.js +50 -0
- package/lib/operations/listWebhookSubscriptions.js.map +1 -0
- package/lib/operations/prepareAndSendUserOperation.d.ts +53 -0
- package/lib/operations/prepareAndSendUserOperation.d.ts.map +1 -0
- package/lib/operations/prepareAndSendUserOperation.js +93 -0
- package/lib/operations/prepareAndSendUserOperation.js.map +1 -0
- package/lib/operations/prepareUserOperation.d.ts +46 -0
- package/lib/operations/prepareUserOperation.d.ts.map +1 -0
- package/lib/operations/prepareUserOperation.js +86 -0
- package/lib/operations/prepareUserOperation.js.map +1 -0
- package/lib/operations/requestEvmFaucet.d.ts +22 -0
- package/lib/operations/requestEvmFaucet.d.ts.map +1 -0
- package/lib/operations/requestEvmFaucet.js +32 -0
- package/lib/operations/requestEvmFaucet.js.map +1 -0
- package/lib/operations/requestSolanaFaucet.d.ts +21 -0
- package/lib/operations/requestSolanaFaucet.d.ts.map +1 -0
- package/lib/operations/requestSolanaFaucet.js +29 -0
- package/lib/operations/requestSolanaFaucet.js.map +1 -0
- package/lib/operations/revokeSpendPermission.d.ts +48 -0
- package/lib/operations/revokeSpendPermission.d.ts.map +1 -0
- package/lib/operations/revokeSpendPermission.js +86 -0
- package/lib/operations/revokeSpendPermission.js.map +1 -0
- package/lib/operations/runSQLQuery.d.ts +47 -0
- package/lib/operations/runSQLQuery.d.ts.map +1 -0
- package/lib/operations/runSQLQuery.js +74 -0
- package/lib/operations/runSQLQuery.js.map +1 -0
- package/lib/operations/sendEvmTransaction.d.ts +44 -0
- package/lib/operations/sendEvmTransaction.d.ts.map +1 -0
- package/lib/operations/sendEvmTransaction.js +64 -0
- package/lib/operations/sendEvmTransaction.js.map +1 -0
- package/lib/operations/sendSolanaTransaction.d.ts +38 -0
- package/lib/operations/sendSolanaTransaction.d.ts.map +1 -0
- package/lib/operations/sendSolanaTransaction.js +46 -0
- package/lib/operations/sendSolanaTransaction.js.map +1 -0
- package/lib/operations/sendUserOperation.d.ts +43 -0
- package/lib/operations/sendUserOperation.d.ts.map +1 -0
- package/lib/operations/sendUserOperation.js +71 -0
- package/lib/operations/sendUserOperation.js.map +1 -0
- package/lib/operations/settleX402Payment.d.ts +23 -0
- package/lib/operations/settleX402Payment.d.ts.map +1 -0
- package/lib/operations/settleX402Payment.js +79 -0
- package/lib/operations/settleX402Payment.js.map +1 -0
- package/lib/operations/signEvmHash.d.ts +27 -0
- package/lib/operations/signEvmHash.d.ts.map +1 -0
- package/lib/operations/signEvmHash.js +33 -0
- package/lib/operations/signEvmHash.js.map +1 -0
- package/lib/operations/signEvmMessage.d.ts +28 -0
- package/lib/operations/signEvmMessage.d.ts.map +1 -0
- package/lib/operations/signEvmMessage.js +34 -0
- package/lib/operations/signEvmMessage.js.map +1 -0
- package/lib/operations/signEvmTransaction.d.ts +29 -0
- package/lib/operations/signEvmTransaction.d.ts.map +1 -0
- package/lib/operations/signEvmTransaction.js +40 -0
- package/lib/operations/signEvmTransaction.js.map +1 -0
- package/lib/operations/signEvmTypedData.d.ts +36 -0
- package/lib/operations/signEvmTypedData.d.ts.map +1 -0
- package/lib/operations/signEvmTypedData.js +45 -0
- package/lib/operations/signEvmTypedData.js.map +1 -0
- package/lib/operations/signSolanaMessage.d.ts +28 -0
- package/lib/operations/signSolanaMessage.d.ts.map +1 -0
- package/lib/operations/signSolanaMessage.js +38 -0
- package/lib/operations/signSolanaMessage.js.map +1 -0
- package/lib/operations/signSolanaTransaction.d.ts +33 -0
- package/lib/operations/signSolanaTransaction.d.ts.map +1 -0
- package/lib/operations/signSolanaTransaction.js +44 -0
- package/lib/operations/signSolanaTransaction.js.map +1 -0
- package/lib/operations/supportedX402PaymentKinds.d.ts +21 -0
- package/lib/operations/supportedX402PaymentKinds.d.ts.map +1 -0
- package/lib/operations/supportedX402PaymentKinds.js +40 -0
- package/lib/operations/supportedX402PaymentKinds.js.map +1 -0
- package/lib/operations/updateEvmAccount.d.ts +28 -0
- package/lib/operations/updateEvmAccount.d.ts.map +1 -0
- package/lib/operations/updateEvmAccount.js +34 -0
- package/lib/operations/updateEvmAccount.js.map +1 -0
- package/lib/operations/updateEvmSmartAccount.d.ts +24 -0
- package/lib/operations/updateEvmSmartAccount.d.ts.map +1 -0
- package/lib/operations/updateEvmSmartAccount.js +32 -0
- package/lib/operations/updateEvmSmartAccount.js.map +1 -0
- package/lib/operations/updatePolicy.d.ts +29 -0
- package/lib/operations/updatePolicy.d.ts.map +1 -0
- package/lib/operations/updatePolicy.js +35 -0
- package/lib/operations/updatePolicy.js.map +1 -0
- package/lib/operations/updateSolanaAccount.d.ts +28 -0
- package/lib/operations/updateSolanaAccount.d.ts.map +1 -0
- package/lib/operations/updateSolanaAccount.js +36 -0
- package/lib/operations/updateSolanaAccount.js.map +1 -0
- package/lib/operations/updateWebhookSubscription.d.ts +47 -0
- package/lib/operations/updateWebhookSubscription.d.ts.map +1 -0
- package/lib/operations/updateWebhookSubscription.js +58 -0
- package/lib/operations/updateWebhookSubscription.js.map +1 -0
- package/lib/operations/validateEndUserAccessToken.d.ts +44 -0
- package/lib/operations/validateEndUserAccessToken.d.ts.map +1 -0
- package/lib/operations/validateEndUserAccessToken.js +52 -0
- package/lib/operations/validateEndUserAccessToken.js.map +1 -0
- package/lib/operations/verifyX402Payment.d.ts +21 -0
- package/lib/operations/verifyX402Payment.d.ts.map +1 -0
- package/lib/operations/verifyX402Payment.js +72 -0
- package/lib/operations/verifyX402Payment.js.map +1 -0
- package/lib/retry.d.ts +22 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +21 -0
- package/lib/retry.js.map +1 -0
- package/lib/sensitive.d.ts +5 -0
- package/lib/sensitive.d.ts.map +1 -0
- package/lib/sensitive.js +5 -0
- package/lib/sensitive.js.map +1 -0
- package/lib/traits.d.ts +5 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +5 -0
- package/lib/traits.js.map +1 -0
- package/package.json +82 -9
- package/src/category.ts +4 -0
- package/src/client.ts +290 -0
- package/src/credentials.ts +65 -0
- package/src/errors.ts +694 -0
- package/src/index.ts +15 -0
- package/src/operations/addEndUserEvmAccount.ts +44 -0
- package/src/operations/addEndUserEvmSmartAccount.ts +53 -0
- package/src/operations/addEndUserSolanaAccount.ts +46 -0
- package/src/operations/createEndUser.ts +87 -0
- package/src/operations/createEvmAccount.ts +42 -0
- package/src/operations/createEvmEip7702Delegation.ts +63 -0
- package/src/operations/createEvmSmartAccount.ts +42 -0
- package/src/operations/createEvmSwapQuote.ts +44 -0
- package/src/operations/createOnrampOrder.ts +89 -0
- package/src/operations/createOnrampSession.ts +80 -0
- package/src/operations/createPolicy.ts +38 -0
- package/src/operations/createSolanaAccount.ts +42 -0
- package/src/operations/createSpendPermission.ts +110 -0
- package/src/operations/createWebhookSubscription.ts +92 -0
- package/src/operations/deletePolicy.ts +32 -0
- package/src/operations/deleteWebhookSubscription.ts +42 -0
- package/src/operations/exportEvmAccount.ts +39 -0
- package/src/operations/exportEvmAccountByName.ts +45 -0
- package/src/operations/exportSolanaAccount.ts +41 -0
- package/src/operations/exportSolanaAccountByName.ts +48 -0
- package/src/operations/getEndUser.ts +68 -0
- package/src/operations/getEvmAccount.ts +32 -0
- package/src/operations/getEvmAccountByName.ts +34 -0
- package/src/operations/getEvmEip7702DelegationOperationById.ts +56 -0
- package/src/operations/getEvmSmartAccount.ts +35 -0
- package/src/operations/getEvmSmartAccountByName.ts +41 -0
- package/src/operations/getEvmSwapPrice.ts +31 -0
- package/src/operations/getOnrampOrderById.ts +62 -0
- package/src/operations/getOnrampUserLimits.ts +44 -0
- package/src/operations/getPolicyById.ts +35 -0
- package/src/operations/getSQLGrammar.ts +26 -0
- package/src/operations/getSolanaAccount.ts +34 -0
- package/src/operations/getSolanaAccountByName.ts +40 -0
- package/src/operations/getUserOperation.ts +82 -0
- package/src/operations/getWebhookSubscription.ts +60 -0
- package/src/operations/importEndUser.ts +78 -0
- package/src/operations/importEvmAccount.ts +43 -0
- package/src/operations/importSolanaAccount.ts +42 -0
- package/src/operations/index.ts +73 -0
- package/src/operations/listDataTokenBalances.ts +59 -0
- package/src/operations/listEndUsers.ts +77 -0
- package/src/operations/listEvmAccounts.ts +40 -0
- package/src/operations/listEvmSmartAccounts.ts +45 -0
- package/src/operations/listEvmTokenBalances.ts +58 -0
- package/src/operations/listPolicies.ts +43 -0
- package/src/operations/listSolanaAccounts.ts +43 -0
- package/src/operations/listSolanaTokenBalances.ts +59 -0
- package/src/operations/listSpendPermissions.ts +70 -0
- package/src/operations/listTokensForAccount.ts +42 -0
- package/src/operations/listWebhookSubscriptions.ts +62 -0
- package/src/operations/prepareAndSendUserOperation.ts +113 -0
- package/src/operations/prepareUserOperation.ts +104 -0
- package/src/operations/requestEvmFaucet.ts +38 -0
- package/src/operations/requestSolanaFaucet.ts +33 -0
- package/src/operations/revokeSpendPermission.ts +103 -0
- package/src/operations/runSQLQuery.ts +92 -0
- package/src/operations/sendEvmTransaction.ts +70 -0
- package/src/operations/sendSolanaTransaction.ts +55 -0
- package/src/operations/sendUserOperation.ts +87 -0
- package/src/operations/settleX402Payment.ts +87 -0
- package/src/operations/signEvmHash.ts +37 -0
- package/src/operations/signEvmMessage.ts +40 -0
- package/src/operations/signEvmTransaction.ts +46 -0
- package/src/operations/signEvmTypedData.ts +53 -0
- package/src/operations/signSolanaMessage.ts +46 -0
- package/src/operations/signSolanaTransaction.ts +53 -0
- package/src/operations/supportedX402PaymentKinds.ts +52 -0
- package/src/operations/updateEvmAccount.ts +40 -0
- package/src/operations/updateEvmSmartAccount.ts +39 -0
- package/src/operations/updatePolicy.ts +41 -0
- package/src/operations/updateSolanaAccount.ts +40 -0
- package/src/operations/updateWebhookSubscription.ts +70 -0
- package/src/operations/validateEndUserAccessToken.ts +74 -0
- package/src/operations/verifyX402Payment.ts +80 -0
- package/src/retry.ts +37 -0
- package/src/sensitive.ts +4 -0
- package/src/traits.ts +4 -0
- package/index.js +0 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const AddEndUserEvmAccountInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
userId: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/end-users/{userId}/evm" }));
|
|
10
|
+
export type AddEndUserEvmAccountInput = typeof AddEndUserEvmAccountInput.Type;
|
|
11
|
+
|
|
12
|
+
// Output Schema
|
|
13
|
+
export const AddEndUserEvmAccountOutput =
|
|
14
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
15
|
+
evmAccount: Schema.Struct({
|
|
16
|
+
address: Schema.String,
|
|
17
|
+
createdAt: Schema.String,
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
export type AddEndUserEvmAccountOutput = typeof AddEndUserEvmAccountOutput.Type;
|
|
21
|
+
|
|
22
|
+
// The operation
|
|
23
|
+
/**
|
|
24
|
+
* Add an EVM account to an end user
|
|
25
|
+
*
|
|
26
|
+
* Adds a new EVM EOA account to an existing end user. End users can have up to 10 EVM accounts.
|
|
27
|
+
* This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
|
|
28
|
+
*
|
|
29
|
+
* @param userId - The ID of the end user to add the account to.
|
|
30
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
31
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
32
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
33
|
+
|
|
34
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
35
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
36
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
37
|
+
|
|
38
|
+
*/
|
|
39
|
+
export const addEndUserEvmAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
40
|
+
() => ({
|
|
41
|
+
inputSchema: AddEndUserEvmAccountInput,
|
|
42
|
+
outputSchema: AddEndUserEvmAccountOutput,
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const AddEndUserEvmSmartAccountInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
userId: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
enableSpendPermissions: Schema.optional(Schema.Boolean),
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({
|
|
12
|
+
method: "POST",
|
|
13
|
+
path: "/v2/end-users/{userId}/evm-smart-account",
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
export type AddEndUserEvmSmartAccountInput =
|
|
17
|
+
typeof AddEndUserEvmSmartAccountInput.Type;
|
|
18
|
+
|
|
19
|
+
// Output Schema
|
|
20
|
+
export const AddEndUserEvmSmartAccountOutput =
|
|
21
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
22
|
+
evmSmartAccount: Schema.Struct({
|
|
23
|
+
address: Schema.String,
|
|
24
|
+
ownerAddresses: Schema.Array(Schema.String),
|
|
25
|
+
createdAt: Schema.String,
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
export type AddEndUserEvmSmartAccountOutput =
|
|
29
|
+
typeof AddEndUserEvmSmartAccountOutput.Type;
|
|
30
|
+
|
|
31
|
+
// The operation
|
|
32
|
+
/**
|
|
33
|
+
* Add an EVM smart account to an end user
|
|
34
|
+
*
|
|
35
|
+
* Creates an EVM smart account for an existing end user. The backend will create a new EVM EOA account to serve as the owner of the smart account.
|
|
36
|
+
* This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
|
|
37
|
+
*
|
|
38
|
+
* @param userId - The ID of the end user to add the smart account to.
|
|
39
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
40
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
41
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
42
|
+
|
|
43
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
44
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
45
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
46
|
+
|
|
47
|
+
*/
|
|
48
|
+
export const addEndUserEvmSmartAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
49
|
+
() => ({
|
|
50
|
+
inputSchema: AddEndUserEvmSmartAccountInput,
|
|
51
|
+
outputSchema: AddEndUserEvmSmartAccountOutput,
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const AddEndUserSolanaAccountInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
userId: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/end-users/{userId}/solana" }));
|
|
10
|
+
export type AddEndUserSolanaAccountInput =
|
|
11
|
+
typeof AddEndUserSolanaAccountInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const AddEndUserSolanaAccountOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
solanaAccount: Schema.Struct({
|
|
17
|
+
address: Schema.String,
|
|
18
|
+
createdAt: Schema.String,
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
export type AddEndUserSolanaAccountOutput =
|
|
22
|
+
typeof AddEndUserSolanaAccountOutput.Type;
|
|
23
|
+
|
|
24
|
+
// The operation
|
|
25
|
+
/**
|
|
26
|
+
* Add a Solana account to an end user
|
|
27
|
+
*
|
|
28
|
+
* Adds a new Solana account to an existing end user. End users can have up to 10 Solana accounts.
|
|
29
|
+
* This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
|
|
30
|
+
*
|
|
31
|
+
* @param userId - The ID of the end user to add the account to.
|
|
32
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
33
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
34
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
35
|
+
|
|
36
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
37
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
38
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
39
|
+
|
|
40
|
+
*/
|
|
41
|
+
export const addEndUserSolanaAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
42
|
+
() => ({
|
|
43
|
+
inputSchema: AddEndUserSolanaAccountInput,
|
|
44
|
+
outputSchema: AddEndUserSolanaAccountOutput,
|
|
45
|
+
}),
|
|
46
|
+
);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateEndUserInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
userId: Schema.optional(Schema.String),
|
|
8
|
+
authenticationMethods: Schema.Array(Schema.Unknown),
|
|
9
|
+
evmAccount: Schema.optional(
|
|
10
|
+
Schema.Struct({
|
|
11
|
+
createSmartAccount: Schema.optional(Schema.Boolean),
|
|
12
|
+
enableSpendPermissions: Schema.optional(Schema.Boolean),
|
|
13
|
+
}),
|
|
14
|
+
),
|
|
15
|
+
solanaAccount: Schema.optional(
|
|
16
|
+
Schema.Struct({
|
|
17
|
+
createSmartAccount: Schema.optional(Schema.Boolean),
|
|
18
|
+
}),
|
|
19
|
+
),
|
|
20
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/end-users" }));
|
|
21
|
+
export type CreateEndUserInput = typeof CreateEndUserInput.Type;
|
|
22
|
+
|
|
23
|
+
// Output Schema
|
|
24
|
+
export const CreateEndUserOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
25
|
+
userId: Schema.String,
|
|
26
|
+
authenticationMethods: Schema.Array(Schema.Unknown),
|
|
27
|
+
mfaMethods: Schema.optional(
|
|
28
|
+
Schema.Struct({
|
|
29
|
+
enrollmentPromptedAt: Schema.optional(Schema.String),
|
|
30
|
+
totp: Schema.optional(
|
|
31
|
+
Schema.Struct({
|
|
32
|
+
enrolledAt: Schema.String,
|
|
33
|
+
}),
|
|
34
|
+
),
|
|
35
|
+
sms: Schema.optional(
|
|
36
|
+
Schema.Struct({
|
|
37
|
+
enrolledAt: Schema.String,
|
|
38
|
+
}),
|
|
39
|
+
),
|
|
40
|
+
}),
|
|
41
|
+
),
|
|
42
|
+
evmAccounts: Schema.Array(Schema.String),
|
|
43
|
+
evmAccountObjects: Schema.Array(
|
|
44
|
+
Schema.Struct({
|
|
45
|
+
address: Schema.String,
|
|
46
|
+
createdAt: Schema.String,
|
|
47
|
+
}),
|
|
48
|
+
),
|
|
49
|
+
evmSmartAccounts: Schema.Array(Schema.String),
|
|
50
|
+
evmSmartAccountObjects: Schema.Array(
|
|
51
|
+
Schema.Struct({
|
|
52
|
+
address: Schema.String,
|
|
53
|
+
ownerAddresses: Schema.Array(Schema.String),
|
|
54
|
+
createdAt: Schema.String,
|
|
55
|
+
}),
|
|
56
|
+
),
|
|
57
|
+
solanaAccounts: Schema.Array(Schema.String),
|
|
58
|
+
solanaAccountObjects: Schema.Array(
|
|
59
|
+
Schema.Struct({
|
|
60
|
+
address: Schema.String,
|
|
61
|
+
createdAt: Schema.String,
|
|
62
|
+
}),
|
|
63
|
+
),
|
|
64
|
+
createdAt: Schema.String,
|
|
65
|
+
});
|
|
66
|
+
export type CreateEndUserOutput = typeof CreateEndUserOutput.Type;
|
|
67
|
+
|
|
68
|
+
// The operation
|
|
69
|
+
/**
|
|
70
|
+
* Create an end user
|
|
71
|
+
*
|
|
72
|
+
* Creates an end user. An end user is an entity that can own CDP EVM accounts, EVM smart accounts, and/or Solana accounts. 1 or more authentication methods must be associated with an end user. By default, no accounts are created unless the optional `evmAccount` and/or `solanaAccount` fields are provided.
|
|
73
|
+
* This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
|
|
74
|
+
*
|
|
75
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
76
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
77
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
78
|
+
|
|
79
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
80
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
81
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
82
|
+
|
|
83
|
+
*/
|
|
84
|
+
export const createEndUser = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
85
|
+
inputSchema: CreateEndUserInput,
|
|
86
|
+
outputSchema: CreateEndUserOutput,
|
|
87
|
+
}));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateEvmAccountInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
name: Schema.optional(Schema.String),
|
|
8
|
+
accountPolicy: Schema.optional(Schema.String),
|
|
9
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/evm/accounts" }));
|
|
10
|
+
export type CreateEvmAccountInput = typeof CreateEvmAccountInput.Type;
|
|
11
|
+
|
|
12
|
+
// Output Schema
|
|
13
|
+
export const CreateEvmAccountOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
14
|
+
{
|
|
15
|
+
address: Schema.String,
|
|
16
|
+
name: Schema.optional(Schema.String),
|
|
17
|
+
policies: Schema.optional(Schema.Array(Schema.String)),
|
|
18
|
+
createdAt: Schema.optional(Schema.String),
|
|
19
|
+
updatedAt: Schema.optional(Schema.String),
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
export type CreateEvmAccountOutput = typeof CreateEvmAccountOutput.Type;
|
|
23
|
+
|
|
24
|
+
// The operation
|
|
25
|
+
/**
|
|
26
|
+
* Create an EVM account
|
|
27
|
+
*
|
|
28
|
+
* Creates a new EVM account.
|
|
29
|
+
*
|
|
30
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
31
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
32
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
33
|
+
|
|
34
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
35
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
36
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
37
|
+
|
|
38
|
+
*/
|
|
39
|
+
export const createEvmAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
40
|
+
inputSchema: CreateEvmAccountInput,
|
|
41
|
+
outputSchema: CreateEvmAccountOutput,
|
|
42
|
+
}));
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateEvmEip7702DelegationInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
network: Schema.Literals([
|
|
10
|
+
"base-sepolia",
|
|
11
|
+
"base",
|
|
12
|
+
"arbitrum",
|
|
13
|
+
"optimism",
|
|
14
|
+
"polygon",
|
|
15
|
+
"ethereum",
|
|
16
|
+
"ethereum-sepolia",
|
|
17
|
+
]),
|
|
18
|
+
enableSpendPermissions: Schema.optional(Schema.Boolean),
|
|
19
|
+
}).pipe(
|
|
20
|
+
T.Http({
|
|
21
|
+
method: "POST",
|
|
22
|
+
path: "/v2/evm/accounts/{address}/eip7702/delegation",
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
25
|
+
export type CreateEvmEip7702DelegationInput =
|
|
26
|
+
typeof CreateEvmEip7702DelegationInput.Type;
|
|
27
|
+
|
|
28
|
+
// Output Schema
|
|
29
|
+
export const CreateEvmEip7702DelegationOutput =
|
|
30
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
31
|
+
delegationOperationId: Schema.String,
|
|
32
|
+
});
|
|
33
|
+
export type CreateEvmEip7702DelegationOutput =
|
|
34
|
+
typeof CreateEvmEip7702DelegationOutput.Type;
|
|
35
|
+
|
|
36
|
+
// The operation
|
|
37
|
+
/**
|
|
38
|
+
* Create EIP-7702 delegation
|
|
39
|
+
*
|
|
40
|
+
* Creates an EIP-7702 delegation for an EVM EOA account, upgrading it with smart account capabilities.
|
|
41
|
+
* This endpoint:
|
|
42
|
+
* - Retrieves delegation artifacts from onchain
|
|
43
|
+
* - Signs the EIP-7702 authorization for delegation
|
|
44
|
+
* - Assembles and submits a Type 4 transaction
|
|
45
|
+
* - Creates an associated smart account object
|
|
46
|
+
* The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.
|
|
47
|
+
*
|
|
48
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
49
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
50
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
51
|
+
|
|
52
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
53
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
54
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
55
|
+
|
|
56
|
+
* @param address - The 0x-prefixed address of the EVM account to delegate.
|
|
57
|
+
*/
|
|
58
|
+
export const createEvmEip7702Delegation = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
59
|
+
() => ({
|
|
60
|
+
inputSchema: CreateEvmEip7702DelegationInput,
|
|
61
|
+
outputSchema: CreateEvmEip7702DelegationOutput,
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateEvmSmartAccountInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
owners: Schema.Array(Schema.String),
|
|
9
|
+
name: Schema.optional(Schema.String),
|
|
10
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/evm/smart-accounts" }));
|
|
11
|
+
export type CreateEvmSmartAccountInput = typeof CreateEvmSmartAccountInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const CreateEvmSmartAccountOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
address: Schema.String,
|
|
17
|
+
owners: Schema.Array(Schema.String),
|
|
18
|
+
name: Schema.optional(Schema.String),
|
|
19
|
+
policies: Schema.optional(Schema.Array(Schema.String)),
|
|
20
|
+
createdAt: Schema.optional(Schema.String),
|
|
21
|
+
updatedAt: Schema.optional(Schema.String),
|
|
22
|
+
});
|
|
23
|
+
export type CreateEvmSmartAccountOutput =
|
|
24
|
+
typeof CreateEvmSmartAccountOutput.Type;
|
|
25
|
+
|
|
26
|
+
// The operation
|
|
27
|
+
/**
|
|
28
|
+
* Create a Smart Account
|
|
29
|
+
*
|
|
30
|
+
* Creates a new Smart Account.
|
|
31
|
+
*
|
|
32
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
33
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
34
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
export const createEvmSmartAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
38
|
+
() => ({
|
|
39
|
+
inputSchema: CreateEvmSmartAccountInput,
|
|
40
|
+
outputSchema: CreateEvmSmartAccountOutput,
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateEvmSwapQuoteInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
network: Schema.Literals([
|
|
9
|
+
"base",
|
|
10
|
+
"ethereum",
|
|
11
|
+
"arbitrum",
|
|
12
|
+
"optimism",
|
|
13
|
+
"polygon",
|
|
14
|
+
]),
|
|
15
|
+
toToken: Schema.String,
|
|
16
|
+
fromToken: Schema.String,
|
|
17
|
+
fromAmount: Schema.String,
|
|
18
|
+
taker: Schema.String,
|
|
19
|
+
signerAddress: Schema.optional(Schema.String),
|
|
20
|
+
gasPrice: Schema.optional(Schema.String),
|
|
21
|
+
slippageBps: Schema.optional(Schema.Number),
|
|
22
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/evm/swaps" }));
|
|
23
|
+
export type CreateEvmSwapQuoteInput = typeof CreateEvmSwapQuoteInput.Type;
|
|
24
|
+
|
|
25
|
+
// Output Schema
|
|
26
|
+
export const CreateEvmSwapQuoteOutput =
|
|
27
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
|
|
28
|
+
export type CreateEvmSwapQuoteOutput = typeof CreateEvmSwapQuoteOutput.Type;
|
|
29
|
+
|
|
30
|
+
// The operation
|
|
31
|
+
/**
|
|
32
|
+
* Create a swap quote
|
|
33
|
+
*
|
|
34
|
+
* Create a swap quote, which includes the payload to sign as well as the transaction data needed to execute the swap. The developer is responsible for signing the payload and submitting the transaction to the network in order to execute the swap.
|
|
35
|
+
*
|
|
36
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
37
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
38
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
39
|
+
|
|
40
|
+
*/
|
|
41
|
+
export const createEvmSwapQuote = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
42
|
+
inputSchema: CreateEvmSwapQuoteInput,
|
|
43
|
+
outputSchema: CreateEvmSwapQuoteOutput,
|
|
44
|
+
}));
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateOnrampOrderInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
7
|
+
{
|
|
8
|
+
agreementAcceptedAt: Schema.String,
|
|
9
|
+
destinationAddress: Schema.Struct({}),
|
|
10
|
+
destinationNetwork: Schema.String,
|
|
11
|
+
email: Schema.String,
|
|
12
|
+
isQuote: Schema.optional(Schema.Boolean),
|
|
13
|
+
partnerOrderRef: Schema.optional(Schema.String),
|
|
14
|
+
partnerUserRef: Schema.String,
|
|
15
|
+
paymentAmount: Schema.optional(Schema.String),
|
|
16
|
+
paymentCurrency: Schema.String,
|
|
17
|
+
paymentMethod: Schema.Literals([
|
|
18
|
+
"GUEST_CHECKOUT_APPLE_PAY",
|
|
19
|
+
"GUEST_CHECKOUT_GOOGLE_PAY",
|
|
20
|
+
]),
|
|
21
|
+
phoneNumber: Schema.String,
|
|
22
|
+
phoneNumberVerifiedAt: Schema.String,
|
|
23
|
+
purchaseAmount: Schema.optional(Schema.String),
|
|
24
|
+
purchaseCurrency: Schema.String,
|
|
25
|
+
clientIp: Schema.optional(Schema.String),
|
|
26
|
+
domain: Schema.optional(Schema.String),
|
|
27
|
+
},
|
|
28
|
+
).pipe(T.Http({ method: "POST", path: "/v2/onramp/orders" }));
|
|
29
|
+
export type CreateOnrampOrderInput = typeof CreateOnrampOrderInput.Type;
|
|
30
|
+
|
|
31
|
+
// Output Schema
|
|
32
|
+
export const CreateOnrampOrderOutput =
|
|
33
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
34
|
+
order: Schema.Struct({
|
|
35
|
+
orderId: Schema.String,
|
|
36
|
+
paymentTotal: Schema.String,
|
|
37
|
+
paymentSubtotal: Schema.String,
|
|
38
|
+
paymentCurrency: Schema.String,
|
|
39
|
+
paymentMethod: Schema.Literals([
|
|
40
|
+
"GUEST_CHECKOUT_APPLE_PAY",
|
|
41
|
+
"GUEST_CHECKOUT_GOOGLE_PAY",
|
|
42
|
+
]),
|
|
43
|
+
purchaseAmount: Schema.String,
|
|
44
|
+
purchaseCurrency: Schema.String,
|
|
45
|
+
fees: Schema.Array(
|
|
46
|
+
Schema.Struct({
|
|
47
|
+
type: Schema.Literals(["FEE_TYPE_NETWORK", "FEE_TYPE_EXCHANGE"]),
|
|
48
|
+
amount: Schema.String,
|
|
49
|
+
currency: Schema.String,
|
|
50
|
+
}),
|
|
51
|
+
),
|
|
52
|
+
exchangeRate: Schema.String,
|
|
53
|
+
destinationAddress: Schema.Struct({}),
|
|
54
|
+
destinationNetwork: Schema.String,
|
|
55
|
+
status: Schema.Literals([
|
|
56
|
+
"ONRAMP_ORDER_STATUS_PENDING_AUTH",
|
|
57
|
+
"ONRAMP_ORDER_STATUS_PENDING_PAYMENT",
|
|
58
|
+
"ONRAMP_ORDER_STATUS_PROCESSING",
|
|
59
|
+
"ONRAMP_ORDER_STATUS_COMPLETED",
|
|
60
|
+
"ONRAMP_ORDER_STATUS_FAILED",
|
|
61
|
+
]),
|
|
62
|
+
txHash: Schema.optional(Schema.String),
|
|
63
|
+
createdAt: Schema.String,
|
|
64
|
+
updatedAt: Schema.String,
|
|
65
|
+
partnerUserRef: Schema.optional(Schema.String),
|
|
66
|
+
}),
|
|
67
|
+
paymentLink: Schema.optional(
|
|
68
|
+
Schema.Struct({
|
|
69
|
+
url: Schema.Struct({}),
|
|
70
|
+
paymentLinkType: Schema.Literals([
|
|
71
|
+
"PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON",
|
|
72
|
+
]),
|
|
73
|
+
}),
|
|
74
|
+
),
|
|
75
|
+
});
|
|
76
|
+
export type CreateOnrampOrderOutput = typeof CreateOnrampOrderOutput.Type;
|
|
77
|
+
|
|
78
|
+
// The operation
|
|
79
|
+
/**
|
|
80
|
+
* Create an onramp order
|
|
81
|
+
*
|
|
82
|
+
* Create a new Onramp order or get a quote for an Onramp order. Either `paymentAmount` or `purchaseAmount` must be provided.
|
|
83
|
+
* This API currently only supports the payment method `GUEST_CHECKOUT_APPLE_PAY`.
|
|
84
|
+
* For detailed integration instructions and to get access to this API, refer to the [Apple Pay Onramp API docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/apple-pay-onramp-api).
|
|
85
|
+
*/
|
|
86
|
+
export const createOnrampOrder = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
87
|
+
inputSchema: CreateOnrampOrderInput,
|
|
88
|
+
outputSchema: CreateOnrampOrderOutput,
|
|
89
|
+
}));
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateOnrampSessionInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
purchaseCurrency: Schema.String,
|
|
9
|
+
destinationNetwork: Schema.String,
|
|
10
|
+
destinationAddress: Schema.Struct({}),
|
|
11
|
+
paymentAmount: Schema.optional(Schema.String),
|
|
12
|
+
purchaseAmount: Schema.optional(Schema.String),
|
|
13
|
+
paymentCurrency: Schema.optional(Schema.String),
|
|
14
|
+
paymentMethod: Schema.optional(
|
|
15
|
+
Schema.Literals([
|
|
16
|
+
"CARD",
|
|
17
|
+
"ACH",
|
|
18
|
+
"APPLE_PAY",
|
|
19
|
+
"PAYPAL",
|
|
20
|
+
"FIAT_WALLET",
|
|
21
|
+
"CRYPTO_WALLET",
|
|
22
|
+
]),
|
|
23
|
+
),
|
|
24
|
+
country: Schema.optional(Schema.String),
|
|
25
|
+
subdivision: Schema.optional(Schema.String),
|
|
26
|
+
redirectUrl: Schema.optional(Schema.Struct({})),
|
|
27
|
+
clientIp: Schema.optional(Schema.String),
|
|
28
|
+
partnerUserRef: Schema.optional(Schema.String),
|
|
29
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/onramp/sessions" }));
|
|
30
|
+
export type CreateOnrampSessionInput = typeof CreateOnrampSessionInput.Type;
|
|
31
|
+
|
|
32
|
+
// Output Schema
|
|
33
|
+
export const CreateOnrampSessionOutput =
|
|
34
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
35
|
+
session: Schema.Struct({
|
|
36
|
+
onrampUrl: Schema.Struct({}),
|
|
37
|
+
}),
|
|
38
|
+
quote: Schema.optional(
|
|
39
|
+
Schema.Struct({
|
|
40
|
+
paymentTotal: Schema.String,
|
|
41
|
+
paymentSubtotal: Schema.String,
|
|
42
|
+
paymentCurrency: Schema.String,
|
|
43
|
+
purchaseAmount: Schema.String,
|
|
44
|
+
purchaseCurrency: Schema.String,
|
|
45
|
+
destinationNetwork: Schema.String,
|
|
46
|
+
fees: Schema.Array(
|
|
47
|
+
Schema.Struct({
|
|
48
|
+
type: Schema.Literals(["FEE_TYPE_NETWORK", "FEE_TYPE_EXCHANGE"]),
|
|
49
|
+
amount: Schema.String,
|
|
50
|
+
currency: Schema.String,
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
exchangeRate: Schema.String,
|
|
54
|
+
}),
|
|
55
|
+
),
|
|
56
|
+
});
|
|
57
|
+
export type CreateOnrampSessionOutput = typeof CreateOnrampSessionOutput.Type;
|
|
58
|
+
|
|
59
|
+
// The operation
|
|
60
|
+
/**
|
|
61
|
+
* Create an onramp session
|
|
62
|
+
*
|
|
63
|
+
* Returns a single-use URL for an Onramp session. This API provides flexible functionality based on the parameters provided, supporting three cases:
|
|
64
|
+
* **Important**: The returned URL is single-use only. Once a user visits the URL, no one else can access it.
|
|
65
|
+
* ## Use Cases
|
|
66
|
+
* ### 1. Basic Session (Minimum Parameters)
|
|
67
|
+
* **Required**: `destinationAddress`, `purchaseCurrency`, `destinationNetwork`
|
|
68
|
+
* **Returns**: Basic single-use onramp URL. The `quote` object will not be included in the response.
|
|
69
|
+
* ### 2. One-Click Onramp URL
|
|
70
|
+
* **Required**: Basic parameters + (`paymentAmount` OR `purchaseAmount`), `paymentCurrency`
|
|
71
|
+
* **Returns**: One-click onramp URL for streamlined checkout. The `quote` object will not be included in the response.
|
|
72
|
+
* ### 3. One-Click Onramp URL with Quote
|
|
73
|
+
* **Required**: One-Click Onramp parameters + `paymentMethod`, `country`, `subdivision`
|
|
74
|
+
* **Returns**: Complete pricing quote and one-click onramp URL. Both `session` and `quote` objects will be included in the response.
|
|
75
|
+
* **Note**: Only one of `paymentAmount` or `purchaseAmount` should be provided, not both. Providing both will result in an error. When `paymentAmount` is provided, the quote shows how much crypto the user will receive for the specified fiat amount (fee-inclusive). When `purchaseAmount` is provided, the quote shows how much fiat the user needs to pay for the specified crypto amount (fee-exclusive).
|
|
76
|
+
*/
|
|
77
|
+
export const createOnrampSession = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
78
|
+
inputSchema: CreateOnrampSessionInput,
|
|
79
|
+
outputSchema: CreateOnrampSessionOutput,
|
|
80
|
+
}));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreatePolicyInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
scope: Schema.Literals(["project", "account"]),
|
|
8
|
+
description: Schema.optional(Schema.String),
|
|
9
|
+
rules: Schema.Array(Schema.Unknown),
|
|
10
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/policy-engine/policies" }));
|
|
11
|
+
export type CreatePolicyInput = typeof CreatePolicyInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const CreatePolicyOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
15
|
+
id: Schema.String,
|
|
16
|
+
description: Schema.optional(Schema.String),
|
|
17
|
+
scope: Schema.Literals(["project", "account"]),
|
|
18
|
+
rules: Schema.Array(Schema.Unknown),
|
|
19
|
+
createdAt: Schema.String,
|
|
20
|
+
updatedAt: Schema.String,
|
|
21
|
+
});
|
|
22
|
+
export type CreatePolicyOutput = typeof CreatePolicyOutput.Type;
|
|
23
|
+
|
|
24
|
+
// The operation
|
|
25
|
+
/**
|
|
26
|
+
* Create a policy
|
|
27
|
+
*
|
|
28
|
+
* Create a policy that can be used to govern the behavior of accounts.
|
|
29
|
+
*
|
|
30
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
31
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
32
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
33
|
+
|
|
34
|
+
*/
|
|
35
|
+
export const createPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
36
|
+
inputSchema: CreatePolicyInput,
|
|
37
|
+
outputSchema: CreatePolicyOutput,
|
|
38
|
+
}));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateSolanaAccountInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
name: Schema.optional(Schema.String),
|
|
9
|
+
accountPolicy: Schema.optional(Schema.String),
|
|
10
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/solana/accounts" }));
|
|
11
|
+
export type CreateSolanaAccountInput = typeof CreateSolanaAccountInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const CreateSolanaAccountOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
address: Schema.String,
|
|
17
|
+
name: Schema.optional(Schema.String),
|
|
18
|
+
policies: Schema.optional(Schema.Array(Schema.String)),
|
|
19
|
+
createdAt: Schema.optional(Schema.String),
|
|
20
|
+
updatedAt: Schema.optional(Schema.String),
|
|
21
|
+
});
|
|
22
|
+
export type CreateSolanaAccountOutput = typeof CreateSolanaAccountOutput.Type;
|
|
23
|
+
|
|
24
|
+
// The operation
|
|
25
|
+
/**
|
|
26
|
+
* Create a Solana account
|
|
27
|
+
*
|
|
28
|
+
* Creates a new Solana account.
|
|
29
|
+
*
|
|
30
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
31
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
32
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
33
|
+
|
|
34
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
35
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
36
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
37
|
+
|
|
38
|
+
*/
|
|
39
|
+
export const createSolanaAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
40
|
+
inputSchema: CreateSolanaAccountInput,
|
|
41
|
+
outputSchema: CreateSolanaAccountOutput,
|
|
42
|
+
}));
|