@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,113 @@
|
|
|
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 PrepareAndSendUserOperationInput =
|
|
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
|
+
"zora",
|
|
15
|
+
"polygon",
|
|
16
|
+
"bnb",
|
|
17
|
+
"avalanche",
|
|
18
|
+
"ethereum",
|
|
19
|
+
"ethereum-sepolia",
|
|
20
|
+
]),
|
|
21
|
+
calls: Schema.Array(
|
|
22
|
+
Schema.Struct({
|
|
23
|
+
to: Schema.String,
|
|
24
|
+
value: Schema.String,
|
|
25
|
+
data: Schema.String,
|
|
26
|
+
overrideGasLimit: Schema.optional(Schema.String),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
paymasterUrl: Schema.optional(Schema.Struct({})),
|
|
30
|
+
}).pipe(
|
|
31
|
+
T.Http({
|
|
32
|
+
method: "POST",
|
|
33
|
+
path: "/v2/evm/smart-accounts/{address}/user-operations/prepare-and-send",
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
36
|
+
export type PrepareAndSendUserOperationInput =
|
|
37
|
+
typeof PrepareAndSendUserOperationInput.Type;
|
|
38
|
+
|
|
39
|
+
// Output Schema
|
|
40
|
+
export const PrepareAndSendUserOperationOutput =
|
|
41
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
42
|
+
network: Schema.Literals([
|
|
43
|
+
"base-sepolia",
|
|
44
|
+
"base",
|
|
45
|
+
"arbitrum",
|
|
46
|
+
"optimism",
|
|
47
|
+
"zora",
|
|
48
|
+
"polygon",
|
|
49
|
+
"bnb",
|
|
50
|
+
"avalanche",
|
|
51
|
+
"ethereum",
|
|
52
|
+
"ethereum-sepolia",
|
|
53
|
+
]),
|
|
54
|
+
userOpHash: Schema.String,
|
|
55
|
+
calls: Schema.Array(
|
|
56
|
+
Schema.Struct({
|
|
57
|
+
to: Schema.String,
|
|
58
|
+
value: Schema.String,
|
|
59
|
+
data: Schema.String,
|
|
60
|
+
overrideGasLimit: Schema.optional(Schema.String),
|
|
61
|
+
}),
|
|
62
|
+
),
|
|
63
|
+
status: Schema.Literals([
|
|
64
|
+
"pending",
|
|
65
|
+
"signed",
|
|
66
|
+
"broadcast",
|
|
67
|
+
"complete",
|
|
68
|
+
"dropped",
|
|
69
|
+
"failed",
|
|
70
|
+
]),
|
|
71
|
+
transactionHash: Schema.optional(Schema.String),
|
|
72
|
+
receipts: Schema.optional(
|
|
73
|
+
Schema.Array(
|
|
74
|
+
Schema.Struct({
|
|
75
|
+
revert: Schema.optional(
|
|
76
|
+
Schema.Struct({
|
|
77
|
+
data: Schema.String,
|
|
78
|
+
message: Schema.String,
|
|
79
|
+
}),
|
|
80
|
+
),
|
|
81
|
+
transactionHash: Schema.optional(Schema.String),
|
|
82
|
+
blockHash: Schema.optional(Schema.String),
|
|
83
|
+
blockNumber: Schema.optional(Schema.Number),
|
|
84
|
+
gasUsed: Schema.optional(Schema.String),
|
|
85
|
+
}),
|
|
86
|
+
),
|
|
87
|
+
),
|
|
88
|
+
});
|
|
89
|
+
export type PrepareAndSendUserOperationOutput =
|
|
90
|
+
typeof PrepareAndSendUserOperationOutput.Type;
|
|
91
|
+
|
|
92
|
+
// The operation
|
|
93
|
+
/**
|
|
94
|
+
* Prepare and send a user operation for EVM Smart Account
|
|
95
|
+
*
|
|
96
|
+
* Prepares, signs, and sends a user operation for an EVM Smart Account. This API can be used only if the owner on Smart Account is a CDP EVM Account.
|
|
97
|
+
*
|
|
98
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
99
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
100
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
101
|
+
|
|
102
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
103
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
104
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
105
|
+
|
|
106
|
+
* @param address - The address of the EVM Smart Account to execute the user operation from.
|
|
107
|
+
*/
|
|
108
|
+
export const prepareAndSendUserOperation = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
109
|
+
() => ({
|
|
110
|
+
inputSchema: PrepareAndSendUserOperationInput,
|
|
111
|
+
outputSchema: PrepareAndSendUserOperationOutput,
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
@@ -0,0 +1,104 @@
|
|
|
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 PrepareUserOperationInput =
|
|
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
|
+
"zora",
|
|
15
|
+
"polygon",
|
|
16
|
+
"bnb",
|
|
17
|
+
"avalanche",
|
|
18
|
+
"ethereum",
|
|
19
|
+
"ethereum-sepolia",
|
|
20
|
+
]),
|
|
21
|
+
calls: Schema.Array(
|
|
22
|
+
Schema.Struct({
|
|
23
|
+
to: Schema.String,
|
|
24
|
+
value: Schema.String,
|
|
25
|
+
data: Schema.String,
|
|
26
|
+
overrideGasLimit: Schema.optional(Schema.String),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
paymasterUrl: Schema.optional(Schema.Struct({})),
|
|
30
|
+
dataSuffix: Schema.optional(Schema.String),
|
|
31
|
+
}).pipe(
|
|
32
|
+
T.Http({
|
|
33
|
+
method: "POST",
|
|
34
|
+
path: "/v2/evm/smart-accounts/{address}/user-operations",
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
37
|
+
export type PrepareUserOperationInput = typeof PrepareUserOperationInput.Type;
|
|
38
|
+
|
|
39
|
+
// Output Schema
|
|
40
|
+
export const PrepareUserOperationOutput =
|
|
41
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
42
|
+
network: Schema.Literals([
|
|
43
|
+
"base-sepolia",
|
|
44
|
+
"base",
|
|
45
|
+
"arbitrum",
|
|
46
|
+
"optimism",
|
|
47
|
+
"zora",
|
|
48
|
+
"polygon",
|
|
49
|
+
"bnb",
|
|
50
|
+
"avalanche",
|
|
51
|
+
"ethereum",
|
|
52
|
+
"ethereum-sepolia",
|
|
53
|
+
]),
|
|
54
|
+
userOpHash: Schema.String,
|
|
55
|
+
calls: Schema.Array(
|
|
56
|
+
Schema.Struct({
|
|
57
|
+
to: Schema.String,
|
|
58
|
+
value: Schema.String,
|
|
59
|
+
data: Schema.String,
|
|
60
|
+
overrideGasLimit: Schema.optional(Schema.String),
|
|
61
|
+
}),
|
|
62
|
+
),
|
|
63
|
+
status: Schema.Literals([
|
|
64
|
+
"pending",
|
|
65
|
+
"signed",
|
|
66
|
+
"broadcast",
|
|
67
|
+
"complete",
|
|
68
|
+
"dropped",
|
|
69
|
+
"failed",
|
|
70
|
+
]),
|
|
71
|
+
transactionHash: Schema.optional(Schema.String),
|
|
72
|
+
receipts: Schema.optional(
|
|
73
|
+
Schema.Array(
|
|
74
|
+
Schema.Struct({
|
|
75
|
+
revert: Schema.optional(
|
|
76
|
+
Schema.Struct({
|
|
77
|
+
data: Schema.String,
|
|
78
|
+
message: Schema.String,
|
|
79
|
+
}),
|
|
80
|
+
),
|
|
81
|
+
transactionHash: Schema.optional(Schema.String),
|
|
82
|
+
blockHash: Schema.optional(Schema.String),
|
|
83
|
+
blockNumber: Schema.optional(Schema.Number),
|
|
84
|
+
gasUsed: Schema.optional(Schema.String),
|
|
85
|
+
}),
|
|
86
|
+
),
|
|
87
|
+
),
|
|
88
|
+
});
|
|
89
|
+
export type PrepareUserOperationOutput = typeof PrepareUserOperationOutput.Type;
|
|
90
|
+
|
|
91
|
+
// The operation
|
|
92
|
+
/**
|
|
93
|
+
* Prepare a user operation
|
|
94
|
+
*
|
|
95
|
+
* Prepares a new user operation on a Smart Account for a specific network.
|
|
96
|
+
*
|
|
97
|
+
* @param address - The address of the Smart Account to create the user operation on.
|
|
98
|
+
*/
|
|
99
|
+
export const prepareUserOperation = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
100
|
+
() => ({
|
|
101
|
+
inputSchema: PrepareUserOperationInput,
|
|
102
|
+
outputSchema: PrepareUserOperationOutput,
|
|
103
|
+
}),
|
|
104
|
+
);
|
|
@@ -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 RequestEvmFaucetInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
network: Schema.Literals([
|
|
8
|
+
"base-sepolia",
|
|
9
|
+
"ethereum-sepolia",
|
|
10
|
+
"ethereum-hoodi",
|
|
11
|
+
]),
|
|
12
|
+
address: Schema.String,
|
|
13
|
+
token: Schema.Literals(["eth", "usdc", "eurc", "cbbtc"]),
|
|
14
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/evm/faucet" }));
|
|
15
|
+
export type RequestEvmFaucetInput = typeof RequestEvmFaucetInput.Type;
|
|
16
|
+
|
|
17
|
+
// Output Schema
|
|
18
|
+
export const RequestEvmFaucetOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
19
|
+
{
|
|
20
|
+
transactionHash: Schema.String,
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
export type RequestEvmFaucetOutput = typeof RequestEvmFaucetOutput.Type;
|
|
24
|
+
|
|
25
|
+
// The operation
|
|
26
|
+
/**
|
|
27
|
+
* Request funds on EVM test networks
|
|
28
|
+
*
|
|
29
|
+
* Request funds from the CDP Faucet on supported EVM test networks.
|
|
30
|
+
* Faucets are available for ETH, USDC, EURC, and cbBTC on Base Sepolia and Ethereum Sepolia, and for ETH only on Ethereum Hoodi.
|
|
31
|
+
* To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
32
|
+
* These limits are applied at both the CDP User level and the blockchain address level.
|
|
33
|
+
* A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
|
|
34
|
+
*/
|
|
35
|
+
export const requestEvmFaucet = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
36
|
+
inputSchema: RequestEvmFaucetInput,
|
|
37
|
+
outputSchema: RequestEvmFaucetOutput,
|
|
38
|
+
}));
|
|
@@ -0,0 +1,33 @@
|
|
|
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 RequestSolanaFaucetInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String,
|
|
9
|
+
token: Schema.Literals(["sol", "usdc"]),
|
|
10
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/solana/faucet" }));
|
|
11
|
+
export type RequestSolanaFaucetInput = typeof RequestSolanaFaucetInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const RequestSolanaFaucetOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
transactionSignature: Schema.String,
|
|
17
|
+
});
|
|
18
|
+
export type RequestSolanaFaucetOutput = typeof RequestSolanaFaucetOutput.Type;
|
|
19
|
+
|
|
20
|
+
// The operation
|
|
21
|
+
/**
|
|
22
|
+
* Request funds on Solana devnet
|
|
23
|
+
*
|
|
24
|
+
* Request funds from the CDP Faucet on Solana devnet.
|
|
25
|
+
* Faucets are available for SOL.
|
|
26
|
+
* To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
27
|
+
* These limits are applied at both the CDP Project level and the blockchain address level.
|
|
28
|
+
* A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
|
|
29
|
+
*/
|
|
30
|
+
export const requestSolanaFaucet = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
31
|
+
inputSchema: RequestSolanaFaucetInput,
|
|
32
|
+
outputSchema: RequestSolanaFaucetOutput,
|
|
33
|
+
}));
|
|
@@ -0,0 +1,103 @@
|
|
|
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 RevokeSpendPermissionInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
network: Schema.Literals([
|
|
10
|
+
"base",
|
|
11
|
+
"base-sepolia",
|
|
12
|
+
"ethereum",
|
|
13
|
+
"ethereum-sepolia",
|
|
14
|
+
"optimism",
|
|
15
|
+
"arbitrum",
|
|
16
|
+
"avalanche",
|
|
17
|
+
"polygon",
|
|
18
|
+
]),
|
|
19
|
+
permissionHash: Schema.String,
|
|
20
|
+
paymasterUrl: Schema.optional(Schema.Struct({})),
|
|
21
|
+
}).pipe(
|
|
22
|
+
T.Http({
|
|
23
|
+
method: "POST",
|
|
24
|
+
path: "/v2/evm/smart-accounts/{address}/spend-permissions/revoke",
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
export type RevokeSpendPermissionInput = typeof RevokeSpendPermissionInput.Type;
|
|
28
|
+
|
|
29
|
+
// Output Schema
|
|
30
|
+
export const RevokeSpendPermissionOutput =
|
|
31
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
32
|
+
network: Schema.Literals([
|
|
33
|
+
"base-sepolia",
|
|
34
|
+
"base",
|
|
35
|
+
"arbitrum",
|
|
36
|
+
"optimism",
|
|
37
|
+
"zora",
|
|
38
|
+
"polygon",
|
|
39
|
+
"bnb",
|
|
40
|
+
"avalanche",
|
|
41
|
+
"ethereum",
|
|
42
|
+
"ethereum-sepolia",
|
|
43
|
+
]),
|
|
44
|
+
userOpHash: Schema.String,
|
|
45
|
+
calls: Schema.Array(
|
|
46
|
+
Schema.Struct({
|
|
47
|
+
to: Schema.String,
|
|
48
|
+
value: Schema.String,
|
|
49
|
+
data: Schema.String,
|
|
50
|
+
overrideGasLimit: Schema.optional(Schema.String),
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
status: Schema.Literals([
|
|
54
|
+
"pending",
|
|
55
|
+
"signed",
|
|
56
|
+
"broadcast",
|
|
57
|
+
"complete",
|
|
58
|
+
"dropped",
|
|
59
|
+
"failed",
|
|
60
|
+
]),
|
|
61
|
+
transactionHash: Schema.optional(Schema.String),
|
|
62
|
+
receipts: Schema.optional(
|
|
63
|
+
Schema.Array(
|
|
64
|
+
Schema.Struct({
|
|
65
|
+
revert: Schema.optional(
|
|
66
|
+
Schema.Struct({
|
|
67
|
+
data: Schema.String,
|
|
68
|
+
message: Schema.String,
|
|
69
|
+
}),
|
|
70
|
+
),
|
|
71
|
+
transactionHash: Schema.optional(Schema.String),
|
|
72
|
+
blockHash: Schema.optional(Schema.String),
|
|
73
|
+
blockNumber: Schema.optional(Schema.Number),
|
|
74
|
+
gasUsed: Schema.optional(Schema.String),
|
|
75
|
+
}),
|
|
76
|
+
),
|
|
77
|
+
),
|
|
78
|
+
});
|
|
79
|
+
export type RevokeSpendPermissionOutput =
|
|
80
|
+
typeof RevokeSpendPermissionOutput.Type;
|
|
81
|
+
|
|
82
|
+
// The operation
|
|
83
|
+
/**
|
|
84
|
+
* Revoke a spend permission
|
|
85
|
+
*
|
|
86
|
+
* Revokes an existing spend permission.
|
|
87
|
+
*
|
|
88
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
89
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
90
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
91
|
+
|
|
92
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
93
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
94
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
95
|
+
|
|
96
|
+
* @param address - The address of the Smart account this spend permission is valid for.
|
|
97
|
+
*/
|
|
98
|
+
export const revokeSpendPermission = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
99
|
+
() => ({
|
|
100
|
+
inputSchema: RevokeSpendPermissionInput,
|
|
101
|
+
outputSchema: RevokeSpendPermissionOutput,
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
@@ -0,0 +1,92 @@
|
|
|
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 RunSQLQueryInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
sql: Schema.String,
|
|
8
|
+
cache: Schema.optional(
|
|
9
|
+
Schema.Struct({
|
|
10
|
+
maxAgeMs: Schema.optional(Schema.Number),
|
|
11
|
+
}),
|
|
12
|
+
),
|
|
13
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/data/query/run" }));
|
|
14
|
+
export type RunSQLQueryInput = typeof RunSQLQueryInput.Type;
|
|
15
|
+
|
|
16
|
+
// Output Schema
|
|
17
|
+
export const RunSQLQueryOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
18
|
+
result: Schema.optional(
|
|
19
|
+
Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
|
|
20
|
+
),
|
|
21
|
+
schema: Schema.optional(
|
|
22
|
+
Schema.Struct({
|
|
23
|
+
columns: Schema.optional(
|
|
24
|
+
Schema.Array(
|
|
25
|
+
Schema.Struct({
|
|
26
|
+
name: Schema.optional(Schema.String),
|
|
27
|
+
type: Schema.optional(
|
|
28
|
+
Schema.Literals([
|
|
29
|
+
"String",
|
|
30
|
+
"UInt8",
|
|
31
|
+
"UInt16",
|
|
32
|
+
"UInt32",
|
|
33
|
+
"UInt64",
|
|
34
|
+
"UInt128",
|
|
35
|
+
"UInt256",
|
|
36
|
+
"Int8",
|
|
37
|
+
"Int16",
|
|
38
|
+
"Int32",
|
|
39
|
+
"Int64",
|
|
40
|
+
"Int128",
|
|
41
|
+
"Int256",
|
|
42
|
+
"Float32",
|
|
43
|
+
"Float64",
|
|
44
|
+
"Bool",
|
|
45
|
+
"Date",
|
|
46
|
+
"DateTime",
|
|
47
|
+
"DateTime64",
|
|
48
|
+
"UUID",
|
|
49
|
+
]),
|
|
50
|
+
),
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
}),
|
|
55
|
+
),
|
|
56
|
+
metadata: Schema.optional(
|
|
57
|
+
Schema.Struct({
|
|
58
|
+
cached: Schema.optional(Schema.Boolean),
|
|
59
|
+
executionTimestamp: Schema.optional(Schema.String),
|
|
60
|
+
executionTimeMs: Schema.optional(Schema.Number),
|
|
61
|
+
rowCount: Schema.optional(Schema.Number),
|
|
62
|
+
}),
|
|
63
|
+
),
|
|
64
|
+
});
|
|
65
|
+
export type RunSQLQueryOutput = typeof RunSQLQueryOutput.Type;
|
|
66
|
+
|
|
67
|
+
// The operation
|
|
68
|
+
/**
|
|
69
|
+
* Run SQL Query
|
|
70
|
+
*
|
|
71
|
+
* Run a read-only SQL query against indexed blockchain data including transactions, events, and decoded logs.
|
|
72
|
+
* This endpoint provides direct SQL access to comprehensive blockchain data across supported networks.
|
|
73
|
+
* Queries are executed against optimized data structures for high-performance analytics.
|
|
74
|
+
* ### Allowed Queries
|
|
75
|
+
* - Standard SQL syntax (ClickHouse dialect)
|
|
76
|
+
* - Read-only queries (SELECT statements)
|
|
77
|
+
* - No DDL or DML operations
|
|
78
|
+
* - No cartesian products
|
|
79
|
+
* ### Supported Tables
|
|
80
|
+
* - `base.events` - Base mainnet decoded event logs with parameters, event signature, topics, and more.
|
|
81
|
+
* - `base.transactions` - Base mainnet transaction data including hash, block number, gas usage.
|
|
82
|
+
* - `base.blocks` - Base mainnet block information.
|
|
83
|
+
* - `base.encoded_logs` - Encoded log data of event logs that aren't able to be decoded by our event decoder (ex: log0 opcode).
|
|
84
|
+
* - `base.transfers` - All event logs with event signature `Transfer(address,address,uint256)`. ERC-20, ERC-721, and ERC-1155 transfers are all included.
|
|
85
|
+
* ### Query Limits
|
|
86
|
+
* - Maximum result set: 100,000 rows
|
|
87
|
+
* - Query timeout: 30 seconds
|
|
88
|
+
*/
|
|
89
|
+
export const runSQLQuery = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
90
|
+
inputSchema: RunSQLQueryInput,
|
|
91
|
+
outputSchema: RunSQLQueryOutput,
|
|
92
|
+
}));
|
|
@@ -0,0 +1,70 @@
|
|
|
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 SendEvmTransactionInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
network: Schema.Literals([
|
|
10
|
+
"base",
|
|
11
|
+
"base-sepolia",
|
|
12
|
+
"ethereum",
|
|
13
|
+
"ethereum-sepolia",
|
|
14
|
+
"avalanche",
|
|
15
|
+
"polygon",
|
|
16
|
+
"optimism",
|
|
17
|
+
"arbitrum",
|
|
18
|
+
]),
|
|
19
|
+
transaction: Schema.String,
|
|
20
|
+
}).pipe(
|
|
21
|
+
T.Http({
|
|
22
|
+
method: "POST",
|
|
23
|
+
path: "/v2/evm/accounts/{address}/send/transaction",
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
export type SendEvmTransactionInput = typeof SendEvmTransactionInput.Type;
|
|
27
|
+
|
|
28
|
+
// Output Schema
|
|
29
|
+
export const SendEvmTransactionOutput =
|
|
30
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
31
|
+
transactionHash: Schema.String,
|
|
32
|
+
});
|
|
33
|
+
export type SendEvmTransactionOutput = typeof SendEvmTransactionOutput.Type;
|
|
34
|
+
|
|
35
|
+
// The operation
|
|
36
|
+
/**
|
|
37
|
+
* Send a transaction
|
|
38
|
+
*
|
|
39
|
+
* Signs a transaction with the given EVM account and sends it to the indicated supported network. This API handles nonce management and gas estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
|
|
40
|
+
* The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md).
|
|
41
|
+
* **Transaction fields and API behavior**
|
|
42
|
+
* - `to` *(Required)*: The address of the contract or account to send the transaction to.
|
|
43
|
+
* - `chainId` *(Ignored)*: The value of the `chainId` field in the transaction is ignored.
|
|
44
|
+
* The transaction will be sent to the network indicated by the `network` field in the request body.
|
|
45
|
+
* - `nonce` *(Optional)*: The nonce to use for the transaction. If not provided, the API will assign
|
|
46
|
+
* a nonce to the transaction based on the current state of the account.
|
|
47
|
+
* - `maxPriorityFeePerGas` *(Optional)*: The maximum priority fee per gas to use for the transaction.
|
|
48
|
+
* If not provided, the API will estimate a value based on current network conditions.
|
|
49
|
+
* - `maxFeePerGas` *(Optional)*: The maximum fee per gas to use for the transaction.
|
|
50
|
+
* If not provided, the API will estimate a value based on current network conditions.
|
|
51
|
+
* - `gasLimit` *(Optional)*: The gas limit to use for the transaction. If not provided, the API will estimate a value
|
|
52
|
+
* based on the `to` and `data` fields of the transaction.
|
|
53
|
+
* - `value` *(Optional)*: The amount of ETH, in wei, to send with the transaction.
|
|
54
|
+
* - `data` *(Optional)*: The data to send with the transaction; only used for contract calls.
|
|
55
|
+
* - `accessList` *(Optional)*: The access list to use for the transaction.
|
|
56
|
+
*
|
|
57
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
58
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
59
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
60
|
+
|
|
61
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
62
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
63
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
64
|
+
|
|
65
|
+
* @param address - The 0x-prefixed address of the Ethereum account.
|
|
66
|
+
*/
|
|
67
|
+
export const sendEvmTransaction = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
68
|
+
inputSchema: SendEvmTransactionInput,
|
|
69
|
+
outputSchema: SendEvmTransactionOutput,
|
|
70
|
+
}));
|
|
@@ -0,0 +1,55 @@
|
|
|
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 SendSolanaTransactionInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
network: Schema.Literals(["solana", "solana-devnet"]),
|
|
9
|
+
transaction: Schema.String,
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({ method: "POST", path: "/v2/solana/accounts/send/transaction" }),
|
|
12
|
+
);
|
|
13
|
+
export type SendSolanaTransactionInput = typeof SendSolanaTransactionInput.Type;
|
|
14
|
+
|
|
15
|
+
// Output Schema
|
|
16
|
+
export const SendSolanaTransactionOutput =
|
|
17
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
18
|
+
transactionSignature: Schema.String,
|
|
19
|
+
});
|
|
20
|
+
export type SendSolanaTransactionOutput =
|
|
21
|
+
typeof SendSolanaTransactionOutput.Type;
|
|
22
|
+
|
|
23
|
+
// The operation
|
|
24
|
+
/**
|
|
25
|
+
* Send a Solana transaction
|
|
26
|
+
*
|
|
27
|
+
* Signs and sends a single Solana transaction using multiple Solana accounts. The transaction may contain contain several instructions, each of which may require signatures from different account keys.
|
|
28
|
+
* The transaction should be serialized into a byte array and base64 encoded. The API handles recent blockhash management and fee estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction.
|
|
29
|
+
* **Transaction types**
|
|
30
|
+
* The following transaction types are supported:
|
|
31
|
+
* * [Legacy transactions](https://solana.com/developers/guides/advanced/versions#current-transaction-versions)
|
|
32
|
+
* * [Versioned transactions](https://solana.com/developers/guides/advanced/versions)
|
|
33
|
+
* **Instruction Batching**
|
|
34
|
+
* To batch multiple operations, include multiple instructions within a single transaction. All instructions within a transaction are executed atomically - if any instruction fails, the entire transaction fails and is rolled back.
|
|
35
|
+
* **Network Support**
|
|
36
|
+
* The following Solana networks are supported:
|
|
37
|
+
* * `solana` - Solana Mainnet
|
|
38
|
+
* * `solana-devnet` - Solana Devnet
|
|
39
|
+
* The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
40
|
+
*
|
|
41
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
42
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
43
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
44
|
+
|
|
45
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
46
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
47
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
48
|
+
|
|
49
|
+
*/
|
|
50
|
+
export const sendSolanaTransaction = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
51
|
+
() => ({
|
|
52
|
+
inputSchema: SendSolanaTransactionInput,
|
|
53
|
+
outputSchema: SendSolanaTransactionOutput,
|
|
54
|
+
}),
|
|
55
|
+
);
|