@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,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 SendUserOperationInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
7
|
+
{
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
userOpHash: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
signature: Schema.String,
|
|
11
|
+
},
|
|
12
|
+
).pipe(
|
|
13
|
+
T.Http({
|
|
14
|
+
method: "POST",
|
|
15
|
+
path: "/v2/evm/smart-accounts/{address}/user-operations/{userOpHash}/send",
|
|
16
|
+
}),
|
|
17
|
+
);
|
|
18
|
+
export type SendUserOperationInput = typeof SendUserOperationInput.Type;
|
|
19
|
+
|
|
20
|
+
// Output Schema
|
|
21
|
+
export const SendUserOperationOutput =
|
|
22
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
23
|
+
network: Schema.Literals([
|
|
24
|
+
"base-sepolia",
|
|
25
|
+
"base",
|
|
26
|
+
"arbitrum",
|
|
27
|
+
"optimism",
|
|
28
|
+
"zora",
|
|
29
|
+
"polygon",
|
|
30
|
+
"bnb",
|
|
31
|
+
"avalanche",
|
|
32
|
+
"ethereum",
|
|
33
|
+
"ethereum-sepolia",
|
|
34
|
+
]),
|
|
35
|
+
userOpHash: Schema.String,
|
|
36
|
+
calls: Schema.Array(
|
|
37
|
+
Schema.Struct({
|
|
38
|
+
to: Schema.String,
|
|
39
|
+
value: Schema.String,
|
|
40
|
+
data: Schema.String,
|
|
41
|
+
overrideGasLimit: Schema.optional(Schema.String),
|
|
42
|
+
}),
|
|
43
|
+
),
|
|
44
|
+
status: Schema.Literals([
|
|
45
|
+
"pending",
|
|
46
|
+
"signed",
|
|
47
|
+
"broadcast",
|
|
48
|
+
"complete",
|
|
49
|
+
"dropped",
|
|
50
|
+
"failed",
|
|
51
|
+
]),
|
|
52
|
+
transactionHash: Schema.optional(Schema.String),
|
|
53
|
+
receipts: Schema.optional(
|
|
54
|
+
Schema.Array(
|
|
55
|
+
Schema.Struct({
|
|
56
|
+
revert: Schema.optional(
|
|
57
|
+
Schema.Struct({
|
|
58
|
+
data: Schema.String,
|
|
59
|
+
message: Schema.String,
|
|
60
|
+
}),
|
|
61
|
+
),
|
|
62
|
+
transactionHash: Schema.optional(Schema.String),
|
|
63
|
+
blockHash: Schema.optional(Schema.String),
|
|
64
|
+
blockNumber: Schema.optional(Schema.Number),
|
|
65
|
+
gasUsed: Schema.optional(Schema.String),
|
|
66
|
+
}),
|
|
67
|
+
),
|
|
68
|
+
),
|
|
69
|
+
});
|
|
70
|
+
export type SendUserOperationOutput = typeof SendUserOperationOutput.Type;
|
|
71
|
+
|
|
72
|
+
// The operation
|
|
73
|
+
/**
|
|
74
|
+
* Send a user operation
|
|
75
|
+
*
|
|
76
|
+
* Sends a user operation with a signature.
|
|
77
|
+
* The payload to sign must be the `userOpHash` field of the user operation. This hash should be signed directly (not using `personal_sign` or EIP-191 message hashing).
|
|
78
|
+
* The signature must be 65 bytes in length, consisting of: - 32 bytes for the `r` value - 32 bytes for the `s` value - 1 byte for the `v` value (must be 27 or 28)
|
|
79
|
+
* If using the CDP Paymaster, the user operation must be signed and sent within 2 minutes of being prepared.
|
|
80
|
+
*
|
|
81
|
+
* @param address - The address of the Smart Account to send the user operation from.
|
|
82
|
+
* @param userOpHash - The hash of the user operation to send.
|
|
83
|
+
*/
|
|
84
|
+
export const sendUserOperation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
85
|
+
inputSchema: SendUserOperationInput,
|
|
86
|
+
outputSchema: SendUserOperationOutput,
|
|
87
|
+
}));
|
|
@@ -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 SettleX402PaymentInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
7
|
+
{
|
|
8
|
+
x402Version: Schema.Literals(["1", "2"]),
|
|
9
|
+
paymentPayload: Schema.Unknown,
|
|
10
|
+
paymentRequirements: Schema.Unknown,
|
|
11
|
+
},
|
|
12
|
+
).pipe(T.Http({ method: "POST", path: "/v2/x402/settle" }));
|
|
13
|
+
export type SettleX402PaymentInput = typeof SettleX402PaymentInput.Type;
|
|
14
|
+
|
|
15
|
+
// Output Schema
|
|
16
|
+
export const SettleX402PaymentOutput =
|
|
17
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
18
|
+
success: Schema.Boolean,
|
|
19
|
+
errorReason: Schema.optional(
|
|
20
|
+
Schema.Literals([
|
|
21
|
+
"insufficient_funds",
|
|
22
|
+
"invalid_scheme",
|
|
23
|
+
"invalid_network",
|
|
24
|
+
"invalid_x402_version",
|
|
25
|
+
"invalid_payment_requirements",
|
|
26
|
+
"invalid_payload",
|
|
27
|
+
"invalid_exact_evm_payload_authorization_value",
|
|
28
|
+
"invalid_exact_evm_payload_authorization_value_too_low",
|
|
29
|
+
"invalid_exact_evm_payload_authorization_valid_after",
|
|
30
|
+
"invalid_exact_evm_payload_authorization_valid_before",
|
|
31
|
+
"invalid_exact_evm_payload_authorization_typed_data_message",
|
|
32
|
+
"invalid_exact_evm_payload_authorization_from_address_kyt",
|
|
33
|
+
"invalid_exact_evm_payload_authorization_to_address_kyt",
|
|
34
|
+
"invalid_exact_evm_payload_signature",
|
|
35
|
+
"invalid_exact_evm_payload_signature_address",
|
|
36
|
+
"invalid_exact_evm_permit2_payload_allowance_required",
|
|
37
|
+
"invalid_exact_evm_permit2_payload_signature",
|
|
38
|
+
"invalid_exact_evm_permit2_payload_deadline",
|
|
39
|
+
"invalid_exact_evm_permit2_payload_valid_after",
|
|
40
|
+
"invalid_exact_evm_permit2_payload_spender",
|
|
41
|
+
"invalid_exact_evm_permit2_payload_recipient",
|
|
42
|
+
"invalid_exact_evm_permit2_payload_amount",
|
|
43
|
+
"invalid_exact_svm_payload_transaction",
|
|
44
|
+
"invalid_exact_svm_payload_transaction_amount_mismatch",
|
|
45
|
+
"invalid_exact_svm_payload_transaction_create_ata_instruction",
|
|
46
|
+
"invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee",
|
|
47
|
+
"invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset",
|
|
48
|
+
"invalid_exact_svm_payload_transaction_instructions",
|
|
49
|
+
"invalid_exact_svm_payload_transaction_instructions_length",
|
|
50
|
+
"invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction",
|
|
51
|
+
"invalid_exact_svm_payload_transaction_instructions_compute_price_instruction",
|
|
52
|
+
"invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high",
|
|
53
|
+
"invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked",
|
|
54
|
+
"invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked",
|
|
55
|
+
"invalid_exact_svm_payload_transaction_not_a_transfer_instruction",
|
|
56
|
+
"invalid_exact_svm_payload_transaction_cannot_derive_receiver_ata",
|
|
57
|
+
"invalid_exact_svm_payload_transaction_receiver_ata_not_found",
|
|
58
|
+
"invalid_exact_svm_payload_transaction_sender_ata_not_found",
|
|
59
|
+
"invalid_exact_svm_payload_transaction_simulation_failed",
|
|
60
|
+
"invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata",
|
|
61
|
+
"invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts",
|
|
62
|
+
"invalid_exact_svm_payload_transaction_fee_payer_transferring_funds",
|
|
63
|
+
"settle_exact_evm_transaction_confirmation_timed_out",
|
|
64
|
+
"settle_exact_node_failure",
|
|
65
|
+
"settle_exact_failed_onchain",
|
|
66
|
+
"settle_exact_svm_block_height_exceeded",
|
|
67
|
+
"settle_exact_svm_transaction_confirmation_timed_out",
|
|
68
|
+
"unknown_error",
|
|
69
|
+
]),
|
|
70
|
+
),
|
|
71
|
+
errorMessage: Schema.optional(Schema.String),
|
|
72
|
+
payer: Schema.String,
|
|
73
|
+
transaction: Schema.String,
|
|
74
|
+
network: Schema.String,
|
|
75
|
+
});
|
|
76
|
+
export type SettleX402PaymentOutput = typeof SettleX402PaymentOutput.Type;
|
|
77
|
+
|
|
78
|
+
// The operation
|
|
79
|
+
/**
|
|
80
|
+
* Settle a payment
|
|
81
|
+
*
|
|
82
|
+
* Settle an x402 protocol payment with a specific scheme and network.
|
|
83
|
+
*/
|
|
84
|
+
export const settleX402Payment = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
85
|
+
inputSchema: SettleX402PaymentInput,
|
|
86
|
+
outputSchema: SettleX402PaymentOutput,
|
|
87
|
+
}));
|
|
@@ -0,0 +1,37 @@
|
|
|
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 SignEvmHashInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
hash: Schema.String,
|
|
9
|
+
}).pipe(T.Http({ method: "POST", path: "/v2/evm/accounts/{address}/sign" }));
|
|
10
|
+
export type SignEvmHashInput = typeof SignEvmHashInput.Type;
|
|
11
|
+
|
|
12
|
+
// Output Schema
|
|
13
|
+
export const SignEvmHashOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
14
|
+
signature: Schema.String,
|
|
15
|
+
});
|
|
16
|
+
export type SignEvmHashOutput = typeof SignEvmHashOutput.Type;
|
|
17
|
+
|
|
18
|
+
// The operation
|
|
19
|
+
/**
|
|
20
|
+
* Sign a hash
|
|
21
|
+
*
|
|
22
|
+
* Signs an arbitrary 32 byte hash with the given EVM account.
|
|
23
|
+
*
|
|
24
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
25
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
26
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
27
|
+
|
|
28
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
29
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
30
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
31
|
+
|
|
32
|
+
* @param address - The 0x-prefixed address of the EVM account.
|
|
33
|
+
*/
|
|
34
|
+
export const signEvmHash = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
35
|
+
inputSchema: SignEvmHashInput,
|
|
36
|
+
outputSchema: SignEvmHashOutput,
|
|
37
|
+
}));
|
|
@@ -0,0 +1,40 @@
|
|
|
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 SignEvmMessageInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
message: Schema.String,
|
|
9
|
+
}).pipe(
|
|
10
|
+
T.Http({ method: "POST", path: "/v2/evm/accounts/{address}/sign/message" }),
|
|
11
|
+
);
|
|
12
|
+
export type SignEvmMessageInput = typeof SignEvmMessageInput.Type;
|
|
13
|
+
|
|
14
|
+
// Output Schema
|
|
15
|
+
export const SignEvmMessageOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
signature: Schema.String,
|
|
17
|
+
});
|
|
18
|
+
export type SignEvmMessageOutput = typeof SignEvmMessageOutput.Type;
|
|
19
|
+
|
|
20
|
+
// The operation
|
|
21
|
+
/**
|
|
22
|
+
* Sign an EIP-191 message
|
|
23
|
+
*
|
|
24
|
+
* Signs an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message with the given EVM account.
|
|
25
|
+
* Per the specification, the message in the request body is prepended with `0x19 <0x45 (E)> <thereum Signed Message:\\n" + len(message)>` before being signed.
|
|
26
|
+
*
|
|
27
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
28
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
29
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
30
|
+
|
|
31
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
32
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
33
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
34
|
+
|
|
35
|
+
* @param address - The 0x-prefixed address of the EVM account.
|
|
36
|
+
*/
|
|
37
|
+
export const signEvmMessage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
38
|
+
inputSchema: SignEvmMessageInput,
|
|
39
|
+
outputSchema: SignEvmMessageOutput,
|
|
40
|
+
}));
|
|
@@ -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 SignEvmTransactionInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
transaction: Schema.String,
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({
|
|
12
|
+
method: "POST",
|
|
13
|
+
path: "/v2/evm/accounts/{address}/sign/transaction",
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
export type SignEvmTransactionInput = typeof SignEvmTransactionInput.Type;
|
|
17
|
+
|
|
18
|
+
// Output Schema
|
|
19
|
+
export const SignEvmTransactionOutput =
|
|
20
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
21
|
+
signedTransaction: Schema.String,
|
|
22
|
+
});
|
|
23
|
+
export type SignEvmTransactionOutput = typeof SignEvmTransactionOutput.Type;
|
|
24
|
+
|
|
25
|
+
// The operation
|
|
26
|
+
/**
|
|
27
|
+
* Sign a transaction
|
|
28
|
+
*
|
|
29
|
+
* Signs a transaction with the given EVM account.
|
|
30
|
+
* The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
|
|
31
|
+
* The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
32
|
+
*
|
|
33
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
34
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
35
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
36
|
+
|
|
37
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
38
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
39
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
40
|
+
|
|
41
|
+
* @param address - The 0x-prefixed address of the EVM account.
|
|
42
|
+
*/
|
|
43
|
+
export const signEvmTransaction = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
44
|
+
inputSchema: SignEvmTransactionInput,
|
|
45
|
+
outputSchema: SignEvmTransactionOutput,
|
|
46
|
+
}));
|
|
@@ -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 SignEvmTypedDataInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
domain: Schema.Struct({
|
|
9
|
+
name: Schema.optional(Schema.String),
|
|
10
|
+
version: Schema.optional(Schema.String),
|
|
11
|
+
chainId: Schema.optional(Schema.Number),
|
|
12
|
+
verifyingContract: Schema.optional(Schema.String),
|
|
13
|
+
salt: Schema.optional(Schema.String),
|
|
14
|
+
}),
|
|
15
|
+
types: Schema.Unknown,
|
|
16
|
+
primaryType: Schema.String,
|
|
17
|
+
message: Schema.Unknown,
|
|
18
|
+
}).pipe(
|
|
19
|
+
T.Http({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/v2/evm/accounts/{address}/sign/typed-data",
|
|
22
|
+
}),
|
|
23
|
+
);
|
|
24
|
+
export type SignEvmTypedDataInput = typeof SignEvmTypedDataInput.Type;
|
|
25
|
+
|
|
26
|
+
// Output Schema
|
|
27
|
+
export const SignEvmTypedDataOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
28
|
+
{
|
|
29
|
+
signature: Schema.String,
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
export type SignEvmTypedDataOutput = typeof SignEvmTypedDataOutput.Type;
|
|
33
|
+
|
|
34
|
+
// The operation
|
|
35
|
+
/**
|
|
36
|
+
* Sign EIP-712 typed data
|
|
37
|
+
*
|
|
38
|
+
* Signs [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data with the given EVM account.
|
|
39
|
+
*
|
|
40
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
41
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
42
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
43
|
+
|
|
44
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
45
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
46
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
47
|
+
|
|
48
|
+
* @param address - The 0x-prefixed address of the EVM account.
|
|
49
|
+
*/
|
|
50
|
+
export const signEvmTypedData = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
51
|
+
inputSchema: SignEvmTypedDataInput,
|
|
52
|
+
outputSchema: SignEvmTypedDataOutput,
|
|
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 SignSolanaMessageInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
7
|
+
{
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
message: Schema.String,
|
|
10
|
+
},
|
|
11
|
+
).pipe(
|
|
12
|
+
T.Http({
|
|
13
|
+
method: "POST",
|
|
14
|
+
path: "/v2/solana/accounts/{address}/sign/message",
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
export type SignSolanaMessageInput = typeof SignSolanaMessageInput.Type;
|
|
18
|
+
|
|
19
|
+
// Output Schema
|
|
20
|
+
export const SignSolanaMessageOutput =
|
|
21
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
22
|
+
signature: Schema.String,
|
|
23
|
+
});
|
|
24
|
+
export type SignSolanaMessageOutput = typeof SignSolanaMessageOutput.Type;
|
|
25
|
+
|
|
26
|
+
// The operation
|
|
27
|
+
/**
|
|
28
|
+
* Sign a message
|
|
29
|
+
*
|
|
30
|
+
* Signs an arbitrary message with the given Solana account.
|
|
31
|
+
* **WARNING:** Never sign a message that you didn't generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.
|
|
32
|
+
*
|
|
33
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
34
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
35
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
36
|
+
|
|
37
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
38
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
39
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
40
|
+
|
|
41
|
+
* @param address - The base58 encoded address of the Solana account.
|
|
42
|
+
*/
|
|
43
|
+
export const signSolanaMessage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
44
|
+
inputSchema: SignSolanaMessageInput,
|
|
45
|
+
outputSchema: SignSolanaMessageOutput,
|
|
46
|
+
}));
|
|
@@ -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 SignSolanaTransactionInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
transaction: Schema.String,
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({
|
|
12
|
+
method: "POST",
|
|
13
|
+
path: "/v2/solana/accounts/{address}/sign/transaction",
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
export type SignSolanaTransactionInput = typeof SignSolanaTransactionInput.Type;
|
|
17
|
+
|
|
18
|
+
// Output Schema
|
|
19
|
+
export const SignSolanaTransactionOutput =
|
|
20
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
21
|
+
signedTransaction: Schema.String,
|
|
22
|
+
});
|
|
23
|
+
export type SignSolanaTransactionOutput =
|
|
24
|
+
typeof SignSolanaTransactionOutput.Type;
|
|
25
|
+
|
|
26
|
+
// The operation
|
|
27
|
+
/**
|
|
28
|
+
* Sign a transaction
|
|
29
|
+
*
|
|
30
|
+
* Signs a transaction with the given Solana account.
|
|
31
|
+
* The unsigned transaction should be serialized into a byte array and then encoded as base64.
|
|
32
|
+
* **Transaction types**
|
|
33
|
+
* The following transaction types are supported:
|
|
34
|
+
* * [Legacy transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html)
|
|
35
|
+
* * [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html)
|
|
36
|
+
* The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
37
|
+
*
|
|
38
|
+
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
39
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
40
|
+
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
41
|
+
|
|
42
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
43
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
44
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
45
|
+
|
|
46
|
+
* @param address - The base58 encoded address of the Solana account.
|
|
47
|
+
*/
|
|
48
|
+
export const signSolanaTransaction = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
49
|
+
() => ({
|
|
50
|
+
inputSchema: SignSolanaTransactionInput,
|
|
51
|
+
outputSchema: SignSolanaTransactionOutput,
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
@@ -0,0 +1,52 @@
|
|
|
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 SupportedX402PaymentKindsInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
|
|
8
|
+
T.Http({ method: "GET", path: "/v2/x402/supported" }),
|
|
9
|
+
);
|
|
10
|
+
export type SupportedX402PaymentKindsInput =
|
|
11
|
+
typeof SupportedX402PaymentKindsInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const SupportedX402PaymentKindsOutput =
|
|
15
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
16
|
+
kinds: Schema.Array(
|
|
17
|
+
Schema.Struct({
|
|
18
|
+
x402Version: Schema.Literals(["1", "2"]),
|
|
19
|
+
scheme: Schema.Literals(["exact"]),
|
|
20
|
+
network: Schema.Literals([
|
|
21
|
+
"base-sepolia",
|
|
22
|
+
"base",
|
|
23
|
+
"solana-devnet",
|
|
24
|
+
"solana",
|
|
25
|
+
"polygon",
|
|
26
|
+
"eip155:8453",
|
|
27
|
+
"eip155:84532",
|
|
28
|
+
"eip155:137",
|
|
29
|
+
"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
30
|
+
"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
|
|
31
|
+
]),
|
|
32
|
+
extra: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
33
|
+
}),
|
|
34
|
+
),
|
|
35
|
+
extensions: Schema.Array(Schema.String),
|
|
36
|
+
signers: Schema.Record(Schema.String, Schema.Array(Schema.String)),
|
|
37
|
+
});
|
|
38
|
+
export type SupportedX402PaymentKindsOutput =
|
|
39
|
+
typeof SupportedX402PaymentKindsOutput.Type;
|
|
40
|
+
|
|
41
|
+
// The operation
|
|
42
|
+
/**
|
|
43
|
+
* Get supported payment schemes and networks
|
|
44
|
+
*
|
|
45
|
+
* Get the supported x402 protocol payment schemes and networks that the facilitator is able to verify and settle payments for.
|
|
46
|
+
*/
|
|
47
|
+
export const supportedX402PaymentKinds = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
48
|
+
() => ({
|
|
49
|
+
inputSchema: SupportedX402PaymentKindsInput,
|
|
50
|
+
outputSchema: SupportedX402PaymentKindsOutput,
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
@@ -0,0 +1,40 @@
|
|
|
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 UpdateEvmAccountInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
name: Schema.optional(Schema.String),
|
|
9
|
+
accountPolicy: Schema.optional(Schema.String),
|
|
10
|
+
}).pipe(T.Http({ method: "PUT", path: "/v2/evm/accounts/{address}" }));
|
|
11
|
+
export type UpdateEvmAccountInput = typeof UpdateEvmAccountInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const UpdateEvmAccountOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
15
|
+
{
|
|
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
|
+
);
|
|
23
|
+
export type UpdateEvmAccountOutput = typeof UpdateEvmAccountOutput.Type;
|
|
24
|
+
|
|
25
|
+
// The operation
|
|
26
|
+
/**
|
|
27
|
+
* Update an EVM account
|
|
28
|
+
*
|
|
29
|
+
* Updates an existing EVM account. Use this to update the account's name or account-level policy.
|
|
30
|
+
*
|
|
31
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
32
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
33
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
34
|
+
|
|
35
|
+
* @param address - The 0x-prefixed address of the EVM account. The address does not need to be checksummed.
|
|
36
|
+
*/
|
|
37
|
+
export const updateEvmAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
38
|
+
inputSchema: UpdateEvmAccountInput,
|
|
39
|
+
outputSchema: UpdateEvmAccountOutput,
|
|
40
|
+
}));
|
|
@@ -0,0 +1,39 @@
|
|
|
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 UpdateEvmSmartAccountInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
name: Schema.optional(Schema.String),
|
|
10
|
+
}).pipe(T.Http({ method: "PUT", path: "/v2/evm/smart-accounts/{address}" }));
|
|
11
|
+
export type UpdateEvmSmartAccountInput = typeof UpdateEvmSmartAccountInput.Type;
|
|
12
|
+
|
|
13
|
+
// Output Schema
|
|
14
|
+
export const UpdateEvmSmartAccountOutput =
|
|
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 UpdateEvmSmartAccountOutput =
|
|
24
|
+
typeof UpdateEvmSmartAccountOutput.Type;
|
|
25
|
+
|
|
26
|
+
// The operation
|
|
27
|
+
/**
|
|
28
|
+
* Update an EVM Smart Account
|
|
29
|
+
*
|
|
30
|
+
* Updates an existing EVM smart account. Use this to update the smart account's name.
|
|
31
|
+
*
|
|
32
|
+
* @param address - The 0x-prefixed address of the EVM smart account. The address does not need to be checksummed.
|
|
33
|
+
*/
|
|
34
|
+
export const updateEvmSmartAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
35
|
+
() => ({
|
|
36
|
+
inputSchema: UpdateEvmSmartAccountInput,
|
|
37
|
+
outputSchema: UpdateEvmSmartAccountOutput,
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
@@ -0,0 +1,41 @@
|
|
|
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 UpdatePolicyInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
policyId: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
description: Schema.optional(Schema.String),
|
|
9
|
+
rules: Schema.Array(Schema.Unknown),
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({ method: "PUT", path: "/v2/policy-engine/policies/{policyId}" }),
|
|
12
|
+
);
|
|
13
|
+
export type UpdatePolicyInput = typeof UpdatePolicyInput.Type;
|
|
14
|
+
|
|
15
|
+
// Output Schema
|
|
16
|
+
export const UpdatePolicyOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
17
|
+
id: Schema.String,
|
|
18
|
+
description: Schema.optional(Schema.String),
|
|
19
|
+
scope: Schema.Literals(["project", "account"]),
|
|
20
|
+
rules: Schema.Array(Schema.Unknown),
|
|
21
|
+
createdAt: Schema.String,
|
|
22
|
+
updatedAt: Schema.String,
|
|
23
|
+
});
|
|
24
|
+
export type UpdatePolicyOutput = typeof UpdatePolicyOutput.Type;
|
|
25
|
+
|
|
26
|
+
// The operation
|
|
27
|
+
/**
|
|
28
|
+
* Update a policy
|
|
29
|
+
*
|
|
30
|
+
* Updates a policy by its ID. This will have the effect of applying the updated policy to all accounts that are currently using it.
|
|
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
|
+
* @param policyId - The ID of the policy to update.
|
|
37
|
+
*/
|
|
38
|
+
export const updatePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
39
|
+
inputSchema: UpdatePolicyInput,
|
|
40
|
+
outputSchema: UpdatePolicyOutput,
|
|
41
|
+
}));
|
|
@@ -0,0 +1,40 @@
|
|
|
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 UpdateSolanaAccountInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
address: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
name: Schema.optional(Schema.String),
|
|
10
|
+
accountPolicy: Schema.optional(Schema.String),
|
|
11
|
+
}).pipe(T.Http({ method: "PUT", path: "/v2/solana/accounts/{address}" }));
|
|
12
|
+
export type UpdateSolanaAccountInput = typeof UpdateSolanaAccountInput.Type;
|
|
13
|
+
|
|
14
|
+
// Output Schema
|
|
15
|
+
export const UpdateSolanaAccountOutput =
|
|
16
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
17
|
+
address: 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 UpdateSolanaAccountOutput = typeof UpdateSolanaAccountOutput.Type;
|
|
24
|
+
|
|
25
|
+
// The operation
|
|
26
|
+
/**
|
|
27
|
+
* Update a Solana account
|
|
28
|
+
*
|
|
29
|
+
* Updates an existing Solana account. Use this to update the account's name or account-level policy.
|
|
30
|
+
*
|
|
31
|
+
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
32
|
+
When included, duplicate requests with the same key will return identical responses.
|
|
33
|
+
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
34
|
+
|
|
35
|
+
* @param address - The base58 encoded address of the Solana account.
|
|
36
|
+
*/
|
|
37
|
+
export const updateSolanaAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
38
|
+
inputSchema: UpdateSolanaAccountInput,
|
|
39
|
+
outputSchema: UpdateSolanaAccountOutput,
|
|
40
|
+
}));
|