@distilled.cloud/coinbase 0.30.3 → 1.0.0-rc.2
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/credentials.d.ts.map +1 -1
- package/lib/credentials.js +8 -0
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +17 -2
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +8 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -6
- package/lib/index.js.map +1 -1
- package/lib/protocol.d.ts +24 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/{client.js → protocol.js} +107 -46
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +4 -4
- package/lib/retry.js +4 -4
- package/lib/services/cdp.d.ts +5054 -0
- package/lib/services/cdp.d.ts.map +1 -0
- package/lib/services/cdp.js +4331 -0
- package/lib/services/cdp.js.map +1 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +3 -0
- package/lib/services/index.js.map +1 -0
- package/lib/traits.d.ts +8 -2
- package/lib/traits.d.ts.map +1 -1
- package/lib/traits.js +8 -2
- package/lib/traits.js.map +1 -1
- package/package.json +29 -42
- package/src/credentials.ts +8 -0
- package/src/errors.ts +92 -2
- package/src/index.ts +12 -6
- package/src/{client.ts → protocol.ts} +163 -52
- package/src/retry.ts +4 -4
- package/src/services/cdp.ts +11912 -0
- package/src/services/index.ts +2 -0
- package/src/traits.ts +42 -2
- package/README.md +0 -78
- package/lib/category.d.ts +0 -5
- package/lib/category.d.ts.map +0 -1
- package/lib/category.js +0 -5
- package/lib/category.js.map +0 -1
- package/lib/client.d.ts +0 -13
- package/lib/client.d.ts.map +0 -1
- package/lib/client.js.map +0 -1
- package/lib/operations/addEndUserEvmAccount.d.ts +0 -30
- package/lib/operations/addEndUserEvmAccount.d.ts.map +0 -1
- package/lib/operations/addEndUserEvmAccount.js +0 -36
- package/lib/operations/addEndUserEvmAccount.js.map +0 -1
- package/lib/operations/addEndUserEvmSmartAccount.d.ts +0 -32
- package/lib/operations/addEndUserEvmSmartAccount.d.ts.map +0 -1
- package/lib/operations/addEndUserEvmSmartAccount.js +0 -41
- package/lib/operations/addEndUserEvmSmartAccount.js.map +0 -1
- package/lib/operations/addEndUserSolanaAccount.d.ts +0 -30
- package/lib/operations/addEndUserSolanaAccount.d.ts.map +0 -1
- package/lib/operations/addEndUserSolanaAccount.js +0 -36
- package/lib/operations/addEndUserSolanaAccount.js.map +0 -1
- package/lib/operations/createDelegationForEndUserAccount.d.ts +0 -34
- package/lib/operations/createDelegationForEndUserAccount.d.ts.map +0 -1
- package/lib/operations/createDelegationForEndUserAccount.js +0 -44
- package/lib/operations/createDelegationForEndUserAccount.js.map +0 -1
- package/lib/operations/createDepositDestination.d.ts +0 -34
- package/lib/operations/createDepositDestination.d.ts.map +0 -1
- package/lib/operations/createDepositDestination.js +0 -50
- package/lib/operations/createDepositDestination.js.map +0 -1
- package/lib/operations/createEndUser.d.ts +0 -115
- package/lib/operations/createEndUser.d.ts.map +0 -1
- package/lib/operations/createEndUser.js +0 -133
- package/lib/operations/createEndUser.js.map +0 -1
- package/lib/operations/createEvmAccount.d.ts +0 -30
- package/lib/operations/createEvmAccount.d.ts.map +0 -1
- package/lib/operations/createEvmAccount.js +0 -34
- package/lib/operations/createEvmAccount.js.map +0 -1
- package/lib/operations/createEvmEip7702Delegation.d.ts +0 -34
- package/lib/operations/createEvmEip7702Delegation.d.ts.map +0 -1
- package/lib/operations/createEvmEip7702Delegation.js +0 -51
- package/lib/operations/createEvmEip7702Delegation.js.map +0 -1
- package/lib/operations/createEvmEip7702DelegationWithEndUserAccount.d.ts +0 -42
- package/lib/operations/createEvmEip7702DelegationWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/createEvmEip7702DelegationWithEndUserAccount.js +0 -60
- package/lib/operations/createEvmEip7702DelegationWithEndUserAccount.js.map +0 -1
- package/lib/operations/createEvmSmartAccount.d.ts +0 -27
- package/lib/operations/createEvmSmartAccount.d.ts.map +0 -1
- package/lib/operations/createEvmSmartAccount.js +0 -33
- package/lib/operations/createEvmSmartAccount.js.map +0 -1
- package/lib/operations/createEvmSwapQuote.d.ts +0 -80
- package/lib/operations/createEvmSwapQuote.d.ts.map +0 -1
- package/lib/operations/createEvmSwapQuote.js +0 -95
- package/lib/operations/createEvmSwapQuote.js.map +0 -1
- package/lib/operations/createFoundationAccount.d.ts +0 -26
- package/lib/operations/createFoundationAccount.d.ts.map +0 -1
- package/lib/operations/createFoundationAccount.js +0 -32
- package/lib/operations/createFoundationAccount.js.map +0 -1
- package/lib/operations/createOnrampOrder.d.ts +0 -60
- package/lib/operations/createOnrampOrder.d.ts.map +0 -1
- package/lib/operations/createOnrampOrder.js +0 -79
- package/lib/operations/createOnrampOrder.js.map +0 -1
- package/lib/operations/createOnrampSession.d.ts +0 -55
- package/lib/operations/createOnrampSession.d.ts.map +0 -1
- package/lib/operations/createOnrampSession.js +0 -68
- package/lib/operations/createOnrampSession.js.map +0 -1
- package/lib/operations/createPolicy.d.ts +0 -28
- package/lib/operations/createPolicy.d.ts.map +0 -1
- package/lib/operations/createPolicy.js +0 -32
- package/lib/operations/createPolicy.js.map +0 -1
- package/lib/operations/createSolanaAccount.d.ts +0 -30
- package/lib/operations/createSolanaAccount.d.ts.map +0 -1
- package/lib/operations/createSolanaAccount.js +0 -36
- package/lib/operations/createSolanaAccount.js.map +0 -1
- package/lib/operations/createSpendPermission.d.ts +0 -56
- package/lib/operations/createSpendPermission.d.ts.map +0 -1
- package/lib/operations/createSpendPermission.js +0 -92
- package/lib/operations/createSpendPermission.js.map +0 -1
- package/lib/operations/createTransfer.d.ts +0 -178
- package/lib/operations/createTransfer.d.ts.map +0 -1
- package/lib/operations/createTransfer.js +0 -244
- package/lib/operations/createTransfer.js.map +0 -1
- package/lib/operations/createWebhookSubscription.d.ts +0 -54
- package/lib/operations/createWebhookSubscription.d.ts.map +0 -1
- package/lib/operations/createWebhookSubscription.js +0 -109
- package/lib/operations/createWebhookSubscription.js.map +0 -1
- package/lib/operations/deletePolicy.d.ts +0 -20
- package/lib/operations/deletePolicy.d.ts.map +0 -1
- package/lib/operations/deletePolicy.js +0 -25
- package/lib/operations/deletePolicy.js.map +0 -1
- package/lib/operations/deleteWebhookSubscription.d.ts +0 -21
- package/lib/operations/deleteWebhookSubscription.d.ts.map +0 -1
- package/lib/operations/deleteWebhookSubscription.js +0 -30
- package/lib/operations/deleteWebhookSubscription.js.map +0 -1
- package/lib/operations/executeFundTransfer.d.ts +0 -103
- package/lib/operations/executeFundTransfer.d.ts.map +0 -1
- package/lib/operations/executeFundTransfer.js +0 -152
- package/lib/operations/executeFundTransfer.js.map +0 -1
- package/lib/operations/exportEvmAccount.d.ts +0 -27
- package/lib/operations/exportEvmAccount.d.ts.map +0 -1
- package/lib/operations/exportEvmAccount.js +0 -31
- package/lib/operations/exportEvmAccount.js.map +0 -1
- package/lib/operations/exportEvmAccountByName.d.ts +0 -27
- package/lib/operations/exportEvmAccountByName.d.ts.map +0 -1
- package/lib/operations/exportEvmAccountByName.js +0 -33
- package/lib/operations/exportEvmAccountByName.js.map +0 -1
- package/lib/operations/exportSolanaAccount.d.ts +0 -27
- package/lib/operations/exportSolanaAccount.d.ts.map +0 -1
- package/lib/operations/exportSolanaAccount.js +0 -33
- package/lib/operations/exportSolanaAccount.js.map +0 -1
- package/lib/operations/exportSolanaAccountByName.d.ts +0 -27
- package/lib/operations/exportSolanaAccountByName.d.ts.map +0 -1
- package/lib/operations/exportSolanaAccountByName.js +0 -36
- package/lib/operations/exportSolanaAccountByName.js.map +0 -1
- package/lib/operations/getBalanceByAsset.d.ts +0 -29
- package/lib/operations/getBalanceByAsset.d.ts.map +0 -1
- package/lib/operations/getBalanceByAsset.js +0 -34
- package/lib/operations/getBalanceByAsset.js.map +0 -1
- package/lib/operations/getDelegationForEndUser.d.ts +0 -20
- package/lib/operations/getDelegationForEndUser.d.ts.map +0 -1
- package/lib/operations/getDelegationForEndUser.js +0 -29
- package/lib/operations/getDelegationForEndUser.js.map +0 -1
- package/lib/operations/getDelegationForEndUserAccount.d.ts +0 -23
- package/lib/operations/getDelegationForEndUserAccount.d.ts.map +0 -1
- package/lib/operations/getDelegationForEndUserAccount.js +0 -33
- package/lib/operations/getDelegationForEndUserAccount.js.map +0 -1
- package/lib/operations/getDepositDestinationById.d.ts +0 -32
- package/lib/operations/getDepositDestinationById.d.ts.map +0 -1
- package/lib/operations/getDepositDestinationById.js +0 -52
- package/lib/operations/getDepositDestinationById.js.map +0 -1
- package/lib/operations/getEndUser.d.ts +0 -73
- package/lib/operations/getEndUser.d.ts.map +0 -1
- package/lib/operations/getEndUser.js +0 -84
- package/lib/operations/getEndUser.js.map +0 -1
- package/lib/operations/getEvmAccount.d.ts +0 -22
- package/lib/operations/getEvmAccount.d.ts.map +0 -1
- package/lib/operations/getEvmAccount.js +0 -26
- package/lib/operations/getEvmAccount.js.map +0 -1
- package/lib/operations/getEvmAccountByName.d.ts +0 -22
- package/lib/operations/getEvmAccountByName.d.ts.map +0 -1
- package/lib/operations/getEvmAccountByName.js +0 -28
- package/lib/operations/getEvmAccountByName.js.map +0 -1
- package/lib/operations/getEvmEip7702DelegationOperationById.d.ts +0 -22
- package/lib/operations/getEvmEip7702DelegationOperationById.d.ts.map +0 -1
- package/lib/operations/getEvmEip7702DelegationOperationById.js +0 -46
- package/lib/operations/getEvmEip7702DelegationOperationById.js.map +0 -1
- package/lib/operations/getEvmSmartAccount.d.ts +0 -23
- package/lib/operations/getEvmSmartAccount.d.ts.map +0 -1
- package/lib/operations/getEvmSmartAccount.js +0 -29
- package/lib/operations/getEvmSmartAccount.js.map +0 -1
- package/lib/operations/getEvmSmartAccountByName.d.ts +0 -23
- package/lib/operations/getEvmSmartAccountByName.d.ts.map +0 -1
- package/lib/operations/getEvmSmartAccountByName.js +0 -29
- package/lib/operations/getEvmSmartAccountByName.js.map +0 -1
- package/lib/operations/getEvmSwapPrice.d.ts +0 -55
- package/lib/operations/getEvmSwapPrice.d.ts.map +0 -1
- package/lib/operations/getEvmSwapPrice.js +0 -62
- package/lib/operations/getEvmSwapPrice.js.map +0 -1
- package/lib/operations/getFoundationAccountById.d.ts +0 -23
- package/lib/operations/getFoundationAccountById.d.ts.map +0 -1
- package/lib/operations/getFoundationAccountById.js +0 -29
- package/lib/operations/getFoundationAccountById.js.map +0 -1
- package/lib/operations/getOnrampOrderById.d.ts +0 -39
- package/lib/operations/getOnrampOrderById.d.ts.map +0 -1
- package/lib/operations/getOnrampOrderById.js +0 -54
- package/lib/operations/getOnrampOrderById.js.map +0 -1
- package/lib/operations/getOnrampUserLimits.d.ts +0 -24
- package/lib/operations/getOnrampUserLimits.d.ts.map +0 -1
- package/lib/operations/getOnrampUserLimits.js +0 -36
- package/lib/operations/getOnrampUserLimits.js.map +0 -1
- package/lib/operations/getPaymentMethod.d.ts +0 -53
- package/lib/operations/getPaymentMethod.d.ts.map +0 -1
- package/lib/operations/getPaymentMethod.js +0 -61
- package/lib/operations/getPaymentMethod.js.map +0 -1
- package/lib/operations/getPolicyById.d.ts +0 -23
- package/lib/operations/getPolicyById.d.ts.map +0 -1
- package/lib/operations/getPolicyById.js +0 -27
- package/lib/operations/getPolicyById.js.map +0 -1
- package/lib/operations/getSQLGrammar.d.ts +0 -16
- package/lib/operations/getSQLGrammar.d.ts.map +0 -1
- package/lib/operations/getSQLGrammar.js +0 -20
- package/lib/operations/getSQLGrammar.js.map +0 -1
- package/lib/operations/getSQLSchema.d.ts +0 -31
- package/lib/operations/getSQLSchema.d.ts.map +0 -1
- package/lib/operations/getSQLSchema.js +0 -35
- package/lib/operations/getSQLSchema.js.map +0 -1
- package/lib/operations/getSolanaAccount.d.ts +0 -22
- package/lib/operations/getSolanaAccount.d.ts.map +0 -1
- package/lib/operations/getSolanaAccount.js +0 -26
- package/lib/operations/getSolanaAccount.js.map +0 -1
- package/lib/operations/getSolanaAccountByName.d.ts +0 -22
- package/lib/operations/getSolanaAccountByName.d.ts.map +0 -1
- package/lib/operations/getSolanaAccountByName.js +0 -28
- package/lib/operations/getSolanaAccountByName.js.map +0 -1
- package/lib/operations/getTransferById.d.ts +0 -99
- package/lib/operations/getTransferById.d.ts.map +0 -1
- package/lib/operations/getTransferById.js +0 -146
- package/lib/operations/getTransferById.js.map +0 -1
- package/lib/operations/getUserOperation.d.ts +0 -40
- package/lib/operations/getUserOperation.d.ts.map +0 -1
- package/lib/operations/getUserOperation.js +0 -65
- package/lib/operations/getUserOperation.js.map +0 -1
- package/lib/operations/getWebhookSubscription.d.ts +0 -39
- package/lib/operations/getWebhookSubscription.d.ts.map +0 -1
- package/lib/operations/getWebhookSubscription.js +0 -73
- package/lib/operations/getWebhookSubscription.js.map +0 -1
- package/lib/operations/importEndUser.d.ts +0 -110
- package/lib/operations/importEndUser.d.ts.map +0 -1
- package/lib/operations/importEndUser.js +0 -128
- package/lib/operations/importEndUser.js.map +0 -1
- package/lib/operations/importEvmAccount.d.ts +0 -31
- package/lib/operations/importEvmAccount.d.ts.map +0 -1
- package/lib/operations/importEvmAccount.js +0 -35
- package/lib/operations/importEvmAccount.js.map +0 -1
- package/lib/operations/importSolanaAccount.d.ts +0 -30
- package/lib/operations/importSolanaAccount.d.ts.map +0 -1
- package/lib/operations/importSolanaAccount.js +0 -36
- package/lib/operations/importSolanaAccount.js.map +0 -1
- package/lib/operations/index.d.ts +0 -116
- package/lib/operations/index.d.ts.map +0 -1
- package/lib/operations/index.js +0 -116
- package/lib/operations/index.js.map +0 -1
- package/lib/operations/initiateOnrampVerification.d.ts +0 -24
- package/lib/operations/initiateOnrampVerification.d.ts.map +0 -1
- package/lib/operations/initiateOnrampVerification.js +0 -30
- package/lib/operations/initiateOnrampVerification.js.map +0 -1
- package/lib/operations/listBalances.d.ts +0 -34
- package/lib/operations/listBalances.d.ts.map +0 -1
- package/lib/operations/listBalances.js +0 -38
- package/lib/operations/listBalances.js.map +0 -1
- package/lib/operations/listDataTokenBalances.d.ts +0 -37
- package/lib/operations/listDataTokenBalances.d.ts.map +0 -1
- package/lib/operations/listDataTokenBalances.js +0 -46
- package/lib/operations/listDataTokenBalances.js.map +0 -1
- package/lib/operations/listDepositDestinations.d.ts +0 -45
- package/lib/operations/listDepositDestinations.d.ts.map +0 -1
- package/lib/operations/listDepositDestinations.js +0 -62
- package/lib/operations/listDepositDestinations.js.map +0 -1
- package/lib/operations/listEndUsers.d.ts +0 -80
- package/lib/operations/listEndUsers.d.ts.map +0 -1
- package/lib/operations/listEndUsers.js +0 -103
- package/lib/operations/listEndUsers.js.map +0 -1
- package/lib/operations/listEvmAccounts.d.ts +0 -28
- package/lib/operations/listEvmAccounts.d.ts.map +0 -1
- package/lib/operations/listEvmAccounts.js +0 -32
- package/lib/operations/listEvmAccounts.js.map +0 -1
- package/lib/operations/listEvmSmartAccounts.d.ts +0 -29
- package/lib/operations/listEvmSmartAccounts.d.ts.map +0 -1
- package/lib/operations/listEvmSmartAccounts.js +0 -35
- package/lib/operations/listEvmSmartAccounts.js.map +0 -1
- package/lib/operations/listEvmTokenBalances.d.ts +0 -37
- package/lib/operations/listEvmTokenBalances.d.ts.map +0 -1
- package/lib/operations/listEvmTokenBalances.js +0 -46
- package/lib/operations/listEvmTokenBalances.js.map +0 -1
- package/lib/operations/listFoundationAccounts.d.ts +0 -30
- package/lib/operations/listFoundationAccounts.d.ts.map +0 -1
- package/lib/operations/listFoundationAccounts.js +0 -36
- package/lib/operations/listFoundationAccounts.js.map +0 -1
- package/lib/operations/listPaymentMethods.d.ts +0 -63
- package/lib/operations/listPaymentMethods.d.ts.map +0 -1
- package/lib/operations/listPaymentMethods.js +0 -73
- package/lib/operations/listPaymentMethods.js.map +0 -1
- package/lib/operations/listPolicies.d.ts +0 -31
- package/lib/operations/listPolicies.d.ts.map +0 -1
- package/lib/operations/listPolicies.js +0 -35
- package/lib/operations/listPolicies.js.map +0 -1
- package/lib/operations/listSolanaAccounts.d.ts +0 -29
- package/lib/operations/listSolanaAccounts.d.ts.map +0 -1
- package/lib/operations/listSolanaAccounts.js +0 -35
- package/lib/operations/listSolanaAccounts.js.map +0 -1
- package/lib/operations/listSolanaTokenBalances.d.ts +0 -36
- package/lib/operations/listSolanaTokenBalances.d.ts.map +0 -1
- package/lib/operations/listSolanaTokenBalances.js +0 -45
- package/lib/operations/listSolanaTokenBalances.js.map +0 -1
- package/lib/operations/listSpendPermissions.d.ts +0 -40
- package/lib/operations/listSpendPermissions.d.ts.map +0 -1
- package/lib/operations/listSpendPermissions.js +0 -58
- package/lib/operations/listSpendPermissions.js.map +0 -1
- package/lib/operations/listTokensForAccount.d.ts +0 -23
- package/lib/operations/listTokensForAccount.d.ts.map +0 -1
- package/lib/operations/listTokensForAccount.js +0 -32
- package/lib/operations/listTokensForAccount.js.map +0 -1
- package/lib/operations/listTransfers.d.ts +0 -153
- package/lib/operations/listTransfers.d.ts.map +0 -1
- package/lib/operations/listTransfers.js +0 -205
- package/lib/operations/listTransfers.js.map +0 -1
- package/lib/operations/listWebhookSubscriptionEvents.d.ts +0 -52
- package/lib/operations/listWebhookSubscriptionEvents.d.ts.map +0 -1
- package/lib/operations/listWebhookSubscriptionEvents.js +0 -68
- package/lib/operations/listWebhookSubscriptionEvents.js.map +0 -1
- package/lib/operations/listWebhookSubscriptions.d.ts +0 -44
- package/lib/operations/listWebhookSubscriptions.d.ts.map +0 -1
- package/lib/operations/listWebhookSubscriptions.js +0 -75
- package/lib/operations/listWebhookSubscriptions.js.map +0 -1
- package/lib/operations/listX402DiscoveryMerchant.d.ts +0 -69
- package/lib/operations/listX402DiscoveryMerchant.d.ts.map +0 -1
- package/lib/operations/listX402DiscoveryMerchant.js +0 -92
- package/lib/operations/listX402DiscoveryMerchant.js.map +0 -1
- package/lib/operations/listX402DiscoveryResources.d.ts +0 -67
- package/lib/operations/listX402DiscoveryResources.d.ts.map +0 -1
- package/lib/operations/listX402DiscoveryResources.js +0 -90
- package/lib/operations/listX402DiscoveryResources.js.map +0 -1
- package/lib/operations/lookupEndUser.d.ts +0 -93
- package/lib/operations/lookupEndUser.d.ts.map +0 -1
- package/lib/operations/lookupEndUser.js +0 -116
- package/lib/operations/lookupEndUser.js.map +0 -1
- package/lib/operations/postX402DiscoveryMcp.d.ts +0 -26
- package/lib/operations/postX402DiscoveryMcp.d.ts.map +0 -1
- package/lib/operations/postX402DiscoveryMcp.js +0 -32
- package/lib/operations/postX402DiscoveryMcp.js.map +0 -1
- package/lib/operations/prepareAndSendUserOperation.d.ts +0 -55
- package/lib/operations/prepareAndSendUserOperation.d.ts.map +0 -1
- package/lib/operations/prepareAndSendUserOperation.js +0 -93
- package/lib/operations/prepareAndSendUserOperation.js.map +0 -1
- package/lib/operations/prepareUserOperation.d.ts +0 -48
- package/lib/operations/prepareUserOperation.d.ts.map +0 -1
- package/lib/operations/prepareUserOperation.js +0 -86
- package/lib/operations/prepareUserOperation.js.map +0 -1
- package/lib/operations/requestEvmFaucet.d.ts +0 -22
- package/lib/operations/requestEvmFaucet.d.ts.map +0 -1
- package/lib/operations/requestEvmFaucet.js +0 -30
- package/lib/operations/requestEvmFaucet.js.map +0 -1
- package/lib/operations/requestLimitsUpgrade.d.ts +0 -29
- package/lib/operations/requestLimitsUpgrade.d.ts.map +0 -1
- package/lib/operations/requestLimitsUpgrade.js +0 -35
- package/lib/operations/requestLimitsUpgrade.js.map +0 -1
- package/lib/operations/requestSolanaFaucet.d.ts +0 -21
- package/lib/operations/requestSolanaFaucet.d.ts.map +0 -1
- package/lib/operations/requestSolanaFaucet.js +0 -27
- package/lib/operations/requestSolanaFaucet.js.map +0 -1
- package/lib/operations/revokeDelegationForEndUser.d.ts +0 -31
- package/lib/operations/revokeDelegationForEndUser.d.ts.map +0 -1
- package/lib/operations/revokeDelegationForEndUser.js +0 -40
- package/lib/operations/revokeDelegationForEndUser.js.map +0 -1
- package/lib/operations/revokeDelegationForEndUserAccount.d.ts +0 -34
- package/lib/operations/revokeDelegationForEndUserAccount.d.ts.map +0 -1
- package/lib/operations/revokeDelegationForEndUserAccount.js +0 -44
- package/lib/operations/revokeDelegationForEndUserAccount.js.map +0 -1
- package/lib/operations/revokeSpendPermission.d.ts +0 -49
- package/lib/operations/revokeSpendPermission.d.ts.map +0 -1
- package/lib/operations/revokeSpendPermission.js +0 -85
- package/lib/operations/revokeSpendPermission.js.map +0 -1
- package/lib/operations/runSQLQuery.d.ts +0 -57
- package/lib/operations/runSQLQuery.d.ts.map +0 -1
- package/lib/operations/runSQLQuery.js +0 -82
- package/lib/operations/runSQLQuery.js.map +0 -1
- package/lib/operations/searchX402Resources.d.ts +0 -83
- package/lib/operations/searchX402Resources.d.ts.map +0 -1
- package/lib/operations/searchX402Resources.js +0 -106
- package/lib/operations/searchX402Resources.js.map +0 -1
- package/lib/operations/sendEvmAssetWithEndUserAccount.d.ts +0 -45
- package/lib/operations/sendEvmAssetWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/sendEvmAssetWithEndUserAccount.js +0 -67
- package/lib/operations/sendEvmAssetWithEndUserAccount.js.map +0 -1
- package/lib/operations/sendEvmTransaction.d.ts +0 -44
- package/lib/operations/sendEvmTransaction.d.ts.map +0 -1
- package/lib/operations/sendEvmTransaction.js +0 -65
- package/lib/operations/sendEvmTransaction.js.map +0 -1
- package/lib/operations/sendEvmTransactionWithEndUserAccount.d.ts +0 -52
- package/lib/operations/sendEvmTransactionWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/sendEvmTransactionWithEndUserAccount.js +0 -74
- package/lib/operations/sendEvmTransactionWithEndUserAccount.js.map +0 -1
- package/lib/operations/sendSolanaAssetWithEndUserAccount.d.ts +0 -44
- package/lib/operations/sendSolanaAssetWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/sendSolanaAssetWithEndUserAccount.js +0 -54
- package/lib/operations/sendSolanaAssetWithEndUserAccount.js.map +0 -1
- package/lib/operations/sendSolanaTransaction.d.ts +0 -39
- package/lib/operations/sendSolanaTransaction.d.ts.map +0 -1
- package/lib/operations/sendSolanaTransaction.js +0 -45
- package/lib/operations/sendSolanaTransaction.js.map +0 -1
- package/lib/operations/sendSolanaTransactionWithEndUserAccount.d.ts +0 -50
- package/lib/operations/sendSolanaTransactionWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/sendSolanaTransactionWithEndUserAccount.js +0 -60
- package/lib/operations/sendSolanaTransactionWithEndUserAccount.js.map +0 -1
- package/lib/operations/sendUserOperation.d.ts +0 -44
- package/lib/operations/sendUserOperation.d.ts.map +0 -1
- package/lib/operations/sendUserOperation.js +0 -70
- package/lib/operations/sendUserOperation.js.map +0 -1
- package/lib/operations/sendUserOperationWithEndUserAccount.d.ts +0 -66
- package/lib/operations/sendUserOperationWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/sendUserOperationWithEndUserAccount.js +0 -105
- package/lib/operations/sendUserOperationWithEndUserAccount.js.map +0 -1
- package/lib/operations/settleX402Payment.d.ts +0 -245
- package/lib/operations/settleX402Payment.d.ts.map +0 -1
- package/lib/operations/settleX402Payment.js +0 -355
- package/lib/operations/settleX402Payment.js.map +0 -1
- package/lib/operations/signEvmHash.d.ts +0 -27
- package/lib/operations/signEvmHash.d.ts.map +0 -1
- package/lib/operations/signEvmHash.js +0 -31
- package/lib/operations/signEvmHash.js.map +0 -1
- package/lib/operations/signEvmMessage.d.ts +0 -28
- package/lib/operations/signEvmMessage.d.ts.map +0 -1
- package/lib/operations/signEvmMessage.js +0 -32
- package/lib/operations/signEvmMessage.js.map +0 -1
- package/lib/operations/signEvmMessageWithEndUserAccount.d.ts +0 -36
- package/lib/operations/signEvmMessageWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/signEvmMessageWithEndUserAccount.js +0 -46
- package/lib/operations/signEvmMessageWithEndUserAccount.js.map +0 -1
- package/lib/operations/signEvmTransaction.d.ts +0 -29
- package/lib/operations/signEvmTransaction.d.ts.map +0 -1
- package/lib/operations/signEvmTransaction.js +0 -38
- package/lib/operations/signEvmTransaction.js.map +0 -1
- package/lib/operations/signEvmTransactionWithEndUserAccount.d.ts +0 -37
- package/lib/operations/signEvmTransactionWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/signEvmTransactionWithEndUserAccount.js +0 -47
- package/lib/operations/signEvmTransactionWithEndUserAccount.js.map +0 -1
- package/lib/operations/signEvmTypedData.d.ts +0 -36
- package/lib/operations/signEvmTypedData.d.ts.map +0 -1
- package/lib/operations/signEvmTypedData.js +0 -43
- package/lib/operations/signEvmTypedData.js.map +0 -1
- package/lib/operations/signEvmTypedDataWithEndUserAccount.d.ts +0 -46
- package/lib/operations/signEvmTypedDataWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/signEvmTypedDataWithEndUserAccount.js +0 -56
- package/lib/operations/signEvmTypedDataWithEndUserAccount.js.map +0 -1
- package/lib/operations/signSolanaMessage.d.ts +0 -28
- package/lib/operations/signSolanaMessage.d.ts.map +0 -1
- package/lib/operations/signSolanaMessage.js +0 -36
- package/lib/operations/signSolanaMessage.js.map +0 -1
- package/lib/operations/signSolanaMessageWithEndUserAccount.d.ts +0 -36
- package/lib/operations/signSolanaMessageWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/signSolanaMessageWithEndUserAccount.js +0 -46
- package/lib/operations/signSolanaMessageWithEndUserAccount.js.map +0 -1
- package/lib/operations/signSolanaTransaction.d.ts +0 -33
- package/lib/operations/signSolanaTransaction.d.ts.map +0 -1
- package/lib/operations/signSolanaTransaction.js +0 -42
- package/lib/operations/signSolanaTransaction.js.map +0 -1
- package/lib/operations/signSolanaTransactionWithEndUserAccount.d.ts +0 -41
- package/lib/operations/signSolanaTransactionWithEndUserAccount.d.ts.map +0 -1
- package/lib/operations/signSolanaTransactionWithEndUserAccount.js +0 -51
- package/lib/operations/signSolanaTransactionWithEndUserAccount.js.map +0 -1
- package/lib/operations/submitDepositTravelRule.d.ts +0 -52
- package/lib/operations/submitDepositTravelRule.d.ts.map +0 -1
- package/lib/operations/submitDepositTravelRule.js +0 -58
- package/lib/operations/submitDepositTravelRule.js.map +0 -1
- package/lib/operations/submitOnrampVerification.d.ts +0 -26
- package/lib/operations/submitOnrampVerification.d.ts.map +0 -1
- package/lib/operations/submitOnrampVerification.js +0 -35
- package/lib/operations/submitOnrampVerification.js.map +0 -1
- package/lib/operations/supportedX402PaymentKinds.d.ts +0 -22
- package/lib/operations/supportedX402PaymentKinds.d.ts.map +0 -1
- package/lib/operations/supportedX402PaymentKinds.js +0 -40
- package/lib/operations/supportedX402PaymentKinds.js.map +0 -1
- package/lib/operations/updateEvmAccount.d.ts +0 -28
- package/lib/operations/updateEvmAccount.d.ts.map +0 -1
- package/lib/operations/updateEvmAccount.js +0 -32
- package/lib/operations/updateEvmAccount.js.map +0 -1
- package/lib/operations/updateEvmSmartAccount.d.ts +0 -24
- package/lib/operations/updateEvmSmartAccount.d.ts.map +0 -1
- package/lib/operations/updateEvmSmartAccount.js +0 -30
- package/lib/operations/updateEvmSmartAccount.js.map +0 -1
- package/lib/operations/updatePolicy.d.ts +0 -29
- package/lib/operations/updatePolicy.d.ts.map +0 -1
- package/lib/operations/updatePolicy.js +0 -33
- package/lib/operations/updatePolicy.js.map +0 -1
- package/lib/operations/updateSolanaAccount.d.ts +0 -28
- package/lib/operations/updateSolanaAccount.d.ts.map +0 -1
- package/lib/operations/updateSolanaAccount.js +0 -34
- package/lib/operations/updateSolanaAccount.js.map +0 -1
- package/lib/operations/updateWebhookSubscription.d.ts +0 -49
- package/lib/operations/updateWebhookSubscription.d.ts.map +0 -1
- package/lib/operations/updateWebhookSubscription.js +0 -107
- package/lib/operations/updateWebhookSubscription.js.map +0 -1
- package/lib/operations/validateEndUserAccessToken.d.ts +0 -72
- package/lib/operations/validateEndUserAccessToken.d.ts.map +0 -1
- package/lib/operations/validateEndUserAccessToken.js +0 -86
- package/lib/operations/validateEndUserAccessToken.js.map +0 -1
- package/lib/operations/validateX402Resource.d.ts +0 -64
- package/lib/operations/validateX402Resource.d.ts.map +0 -1
- package/lib/operations/validateX402Resource.js +0 -92
- package/lib/operations/validateX402Resource.js.map +0 -1
- package/lib/operations/verifyX402Payment.d.ts +0 -242
- package/lib/operations/verifyX402Payment.d.ts.map +0 -1
- package/lib/operations/verifyX402Payment.js +0 -333
- package/lib/operations/verifyX402Payment.js.map +0 -1
- package/lib/sensitive.d.ts +0 -5
- package/lib/sensitive.d.ts.map +0 -1
- package/lib/sensitive.js +0 -5
- package/lib/sensitive.js.map +0 -1
- package/src/category.ts +0 -4
- package/src/operations/addEndUserEvmAccount.ts +0 -48
- package/src/operations/addEndUserEvmSmartAccount.ts +0 -58
- package/src/operations/addEndUserSolanaAccount.ts +0 -48
- package/src/operations/createDelegationForEndUserAccount.ts +0 -60
- package/src/operations/createDepositDestination.ts +0 -83
- package/src/operations/createEndUser.ts +0 -230
- package/src/operations/createEvmAccount.ts +0 -51
- package/src/operations/createEvmEip7702Delegation.ts +0 -72
- package/src/operations/createEvmEip7702DelegationWithEndUserAccount.ts +0 -84
- package/src/operations/createEvmSmartAccount.ts +0 -51
- package/src/operations/createEvmSwapQuote.ts +0 -167
- package/src/operations/createFoundationAccount.ts +0 -49
- package/src/operations/createOnrampOrder.ts +0 -142
- package/src/operations/createOnrampSession.ts +0 -117
- package/src/operations/createPolicy.ts +0 -51
- package/src/operations/createSolanaAccount.ts +0 -53
- package/src/operations/createSpendPermission.ts +0 -163
- package/src/operations/createTransfer.ts +0 -461
- package/src/operations/createWebhookSubscription.ts +0 -189
- package/src/operations/deletePolicy.ts +0 -35
- package/src/operations/deleteWebhookSubscription.ts +0 -40
- package/src/operations/executeFundTransfer.ts +0 -282
- package/src/operations/exportEvmAccount.ts +0 -44
- package/src/operations/exportEvmAccountByName.ts +0 -46
- package/src/operations/exportSolanaAccount.ts +0 -46
- package/src/operations/exportSolanaAccountByName.ts +0 -49
- package/src/operations/getBalanceByAsset.ts +0 -56
- package/src/operations/getDelegationForEndUser.ts +0 -42
- package/src/operations/getDelegationForEndUserAccount.ts +0 -47
- package/src/operations/getDepositDestinationById.ts +0 -87
- package/src/operations/getEndUser.ts +0 -148
- package/src/operations/getEvmAccount.ts +0 -42
- package/src/operations/getEvmAccountByName.ts +0 -44
- package/src/operations/getEvmEip7702DelegationOperationById.ts +0 -69
- package/src/operations/getEvmSmartAccount.ts +0 -46
- package/src/operations/getEvmSmartAccountByName.ts +0 -46
- package/src/operations/getEvmSwapPrice.ts +0 -112
- package/src/operations/getFoundationAccountById.ts +0 -46
- package/src/operations/getOnrampOrderById.ts +0 -94
- package/src/operations/getOnrampUserLimits.ts +0 -57
- package/src/operations/getPaymentMethod.ts +0 -106
- package/src/operations/getPolicyById.ts +0 -44
- package/src/operations/getSQLGrammar.ts +0 -28
- package/src/operations/getSQLSchema.ts +0 -68
- package/src/operations/getSolanaAccount.ts +0 -42
- package/src/operations/getSolanaAccountByName.ts +0 -44
- package/src/operations/getTransferById.ts +0 -274
- package/src/operations/getUserOperation.ts +0 -119
- package/src/operations/getWebhookSubscription.ts +0 -122
- package/src/operations/importEndUser.ts +0 -218
- package/src/operations/importEvmAccount.ts +0 -53
- package/src/operations/importSolanaAccount.ts +0 -53
- package/src/operations/index.ts +0 -115
- package/src/operations/initiateOnrampVerification.ts +0 -44
- package/src/operations/listBalances.ts +0 -66
- package/src/operations/listDataTokenBalances.ts +0 -72
- package/src/operations/listDepositDestinations.ts +0 -107
- package/src/operations/listEndUsers.ts +0 -174
- package/src/operations/listEvmAccounts.ts +0 -54
- package/src/operations/listEvmSmartAccounts.ts +0 -58
- package/src/operations/listEvmTokenBalances.ts +0 -72
- package/src/operations/listFoundationAccounts.ts +0 -60
- package/src/operations/listPaymentMethods.ts +0 -130
- package/src/operations/listPolicies.ts +0 -59
- package/src/operations/listSolanaAccounts.ts +0 -57
- package/src/operations/listSolanaTokenBalances.ts +0 -66
- package/src/operations/listSpendPermissions.ts +0 -100
- package/src/operations/listTokensForAccount.ts +0 -47
- package/src/operations/listTransfers.ts +0 -355
- package/src/operations/listWebhookSubscriptionEvents.ts +0 -101
- package/src/operations/listWebhookSubscriptions.ts +0 -130
- package/src/operations/listX402DiscoveryMerchant.ts +0 -172
- package/src/operations/listX402DiscoveryResources.ts +0 -169
- package/src/operations/lookupEndUser.ts +0 -188
- package/src/operations/postX402DiscoveryMcp.ts +0 -54
- package/src/operations/prepareAndSendUserOperation.ts +0 -169
- package/src/operations/prepareUserOperation.ts +0 -163
- package/src/operations/requestEvmFaucet.ts +0 -44
- package/src/operations/requestLimitsUpgrade.ts +0 -54
- package/src/operations/requestSolanaFaucet.ts +0 -40
- package/src/operations/revokeDelegationForEndUser.ts +0 -52
- package/src/operations/revokeDelegationForEndUserAccount.ts +0 -57
- package/src/operations/revokeSpendPermission.ts +0 -149
- package/src/operations/runSQLQuery.ts +0 -141
- package/src/operations/searchX402Resources.ts +0 -194
- package/src/operations/sendEvmAssetWithEndUserAccount.ts +0 -103
- package/src/operations/sendEvmTransaction.ts +0 -90
- package/src/operations/sendEvmTransactionWithEndUserAccount.ts +0 -102
- package/src/operations/sendSolanaAssetWithEndUserAccount.ts +0 -75
- package/src/operations/sendSolanaTransaction.ts +0 -59
- package/src/operations/sendSolanaTransactionWithEndUserAccount.ts +0 -78
- package/src/operations/sendUserOperation.ts +0 -125
- package/src/operations/sendUserOperationWithEndUserAccount.ts +0 -186
- package/src/operations/settleX402Payment.ts +0 -819
- package/src/operations/signEvmHash.ts +0 -44
- package/src/operations/signEvmMessage.ts +0 -45
- package/src/operations/signEvmMessageWithEndUserAccount.ts +0 -62
- package/src/operations/signEvmTransaction.ts +0 -51
- package/src/operations/signEvmTransactionWithEndUserAccount.ts +0 -63
- package/src/operations/signEvmTypedData.ts +0 -65
- package/src/operations/signEvmTypedDataWithEndUserAccount.ts +0 -83
- package/src/operations/signSolanaMessage.ts +0 -49
- package/src/operations/signSolanaMessageWithEndUserAccount.ts +0 -62
- package/src/operations/signSolanaTransaction.ts +0 -55
- package/src/operations/signSolanaTransactionWithEndUserAccount.ts +0 -67
- package/src/operations/submitDepositTravelRule.ts +0 -101
- package/src/operations/submitOnrampVerification.ts +0 -49
- package/src/operations/supportedX402PaymentKinds.ts +0 -71
- package/src/operations/updateEvmAccount.ts +0 -50
- package/src/operations/updateEvmSmartAccount.ts +0 -48
- package/src/operations/updatePolicy.ts +0 -52
- package/src/operations/updateSolanaAccount.ts +0 -52
- package/src/operations/updateWebhookSubscription.ts +0 -188
- package/src/operations/validateEndUserAccessToken.ts +0 -150
- package/src/operations/validateX402Resource.ts +0 -170
- package/src/operations/verifyX402Payment.ts +0 -775
- package/src/sensitive.ts +0 -4
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface SendEvmAssetWithEndUserAccountInput {
|
|
7
|
-
userId: string;
|
|
8
|
-
address: string;
|
|
9
|
-
asset: "usdc";
|
|
10
|
-
projectID?: string;
|
|
11
|
-
to: string;
|
|
12
|
-
amount: string;
|
|
13
|
-
network:
|
|
14
|
-
| "base"
|
|
15
|
-
| "base-sepolia"
|
|
16
|
-
| "ethereum"
|
|
17
|
-
| "ethereum-sepolia"
|
|
18
|
-
| "avalanche"
|
|
19
|
-
| "polygon"
|
|
20
|
-
| "optimism"
|
|
21
|
-
| "arbitrum"
|
|
22
|
-
| "arbitrum-sepolia"
|
|
23
|
-
| "world"
|
|
24
|
-
| "world-sepolia";
|
|
25
|
-
useCdpPaymaster?: boolean;
|
|
26
|
-
paymasterUrl?: string;
|
|
27
|
-
paymasterContext?: Record<string, unknown>;
|
|
28
|
-
walletSecretId?: string;
|
|
29
|
-
}
|
|
30
|
-
export const SendEvmAssetWithEndUserAccountInput =
|
|
31
|
-
/*@__PURE__*/ Schema.Struct({
|
|
32
|
-
userId: Schema.String.pipe(T.PathParam()),
|
|
33
|
-
address: Schema.String.pipe(T.PathParam()),
|
|
34
|
-
asset: Schema.Literals(["usdc"]).pipe(T.PathParam()),
|
|
35
|
-
projectID: Schema.optional(Schema.String),
|
|
36
|
-
to: Schema.String,
|
|
37
|
-
amount: Schema.String,
|
|
38
|
-
network: Schema.Literals([
|
|
39
|
-
"base",
|
|
40
|
-
"base-sepolia",
|
|
41
|
-
"ethereum",
|
|
42
|
-
"ethereum-sepolia",
|
|
43
|
-
"avalanche",
|
|
44
|
-
"polygon",
|
|
45
|
-
"optimism",
|
|
46
|
-
"arbitrum",
|
|
47
|
-
"arbitrum-sepolia",
|
|
48
|
-
"world",
|
|
49
|
-
"world-sepolia",
|
|
50
|
-
]),
|
|
51
|
-
useCdpPaymaster: Schema.optional(Schema.Boolean),
|
|
52
|
-
paymasterUrl: Schema.optional(Schema.String),
|
|
53
|
-
paymasterContext: Schema.optional(
|
|
54
|
-
Schema.Record(Schema.String, Schema.Unknown),
|
|
55
|
-
),
|
|
56
|
-
walletSecretId: Schema.optional(Schema.String),
|
|
57
|
-
}).pipe(
|
|
58
|
-
T.Http({
|
|
59
|
-
method: "POST",
|
|
60
|
-
path: "/v2/embedded-wallet-api/end-users/{userId}/evm/{address}/send/{asset}",
|
|
61
|
-
}),
|
|
62
|
-
) as unknown as Schema.Codec<SendEvmAssetWithEndUserAccountInput>;
|
|
63
|
-
|
|
64
|
-
// Output Schema
|
|
65
|
-
export interface SendEvmAssetWithEndUserAccountOutput {
|
|
66
|
-
transactionHash?: string | null;
|
|
67
|
-
userOpHash?: string | null;
|
|
68
|
-
}
|
|
69
|
-
export const SendEvmAssetWithEndUserAccountOutput =
|
|
70
|
-
/*@__PURE__*/ Schema.Struct({
|
|
71
|
-
transactionHash: Schema.optional(Schema.NullOr(Schema.String)),
|
|
72
|
-
userOpHash: Schema.optional(Schema.NullOr(Schema.String)),
|
|
73
|
-
}) as unknown as Schema.Codec<SendEvmAssetWithEndUserAccountOutput>;
|
|
74
|
-
|
|
75
|
-
// The operation
|
|
76
|
-
/**
|
|
77
|
-
* Send USDC on EVM
|
|
78
|
-
*
|
|
79
|
-
* Sends USDC from an end user's EVM account (EOA or Smart Account) to a recipient address on a supported EVM network. This endpoint simplifies USDC transfers by automatically handling contract resolution, decimal conversion, gas estimation, and transaction encoding.
|
|
80
|
-
* The `amount` field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50").
|
|
81
|
-
*
|
|
82
|
-
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
83
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
84
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
85
|
-
|
|
86
|
-
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
87
|
-
When included, duplicate requests with the same key will return identical responses.
|
|
88
|
-
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
89
|
-
|
|
90
|
-
* @param userId - The ID of the end user.
|
|
91
|
-
* @param address - The 0x-prefixed address of the EVM account (EOA or Smart Account) to send USDC from. The address does not need to be checksummed.
|
|
92
|
-
* @param asset - The asset to send. Currently only "usdc" is supported.
|
|
93
|
-
* @param X-Developer-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
94
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
95
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
96
|
-
|
|
97
|
-
* @param projectID - The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
98
|
-
*/
|
|
99
|
-
export const sendEvmAssetWithEndUserAccount =
|
|
100
|
-
/*@__PURE__*/ API.make(() => ({
|
|
101
|
-
inputSchema: SendEvmAssetWithEndUserAccountInput,
|
|
102
|
-
outputSchema: SendEvmAssetWithEndUserAccountOutput,
|
|
103
|
-
}));
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface SendEvmTransactionInput {
|
|
7
|
-
address: string;
|
|
8
|
-
network:
|
|
9
|
-
| "base"
|
|
10
|
-
| "base-sepolia"
|
|
11
|
-
| "ethereum"
|
|
12
|
-
| "ethereum-sepolia"
|
|
13
|
-
| "avalanche"
|
|
14
|
-
| "polygon"
|
|
15
|
-
| "optimism"
|
|
16
|
-
| "arbitrum"
|
|
17
|
-
| "arbitrum-sepolia"
|
|
18
|
-
| "world"
|
|
19
|
-
| "world-sepolia";
|
|
20
|
-
transaction: string;
|
|
21
|
-
}
|
|
22
|
-
export const SendEvmTransactionInput =
|
|
23
|
-
/*@__PURE__*/ Schema.Struct({
|
|
24
|
-
address: Schema.String.pipe(T.PathParam()),
|
|
25
|
-
network: Schema.Literals([
|
|
26
|
-
"base",
|
|
27
|
-
"base-sepolia",
|
|
28
|
-
"ethereum",
|
|
29
|
-
"ethereum-sepolia",
|
|
30
|
-
"avalanche",
|
|
31
|
-
"polygon",
|
|
32
|
-
"optimism",
|
|
33
|
-
"arbitrum",
|
|
34
|
-
"arbitrum-sepolia",
|
|
35
|
-
"world",
|
|
36
|
-
"world-sepolia",
|
|
37
|
-
]),
|
|
38
|
-
transaction: Schema.String,
|
|
39
|
-
}).pipe(
|
|
40
|
-
T.Http({
|
|
41
|
-
method: "POST",
|
|
42
|
-
path: "/v2/evm/accounts/{address}/send/transaction",
|
|
43
|
-
}),
|
|
44
|
-
) as unknown as Schema.Codec<SendEvmTransactionInput>;
|
|
45
|
-
|
|
46
|
-
// Output Schema
|
|
47
|
-
export interface SendEvmTransactionOutput {
|
|
48
|
-
transactionHash: string;
|
|
49
|
-
}
|
|
50
|
-
export const SendEvmTransactionOutput =
|
|
51
|
-
/*@__PURE__*/ Schema.Struct({
|
|
52
|
-
transactionHash: Schema.String,
|
|
53
|
-
}) as unknown as Schema.Codec<SendEvmTransactionOutput>;
|
|
54
|
-
|
|
55
|
-
// The operation
|
|
56
|
-
/**
|
|
57
|
-
* Send transaction
|
|
58
|
-
*
|
|
59
|
-
* 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/).
|
|
60
|
-
* The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md).
|
|
61
|
-
* **Transaction fields and API behavior**
|
|
62
|
-
* - `to` *(Required)*: The address of the contract or account to send the transaction to.
|
|
63
|
-
* - `chainId` *(Ignored)*: The value of the `chainId` field in the transaction is ignored.
|
|
64
|
-
* The transaction will be sent to the network indicated by the `network` field in the request body.
|
|
65
|
-
* - `nonce` *(Optional)*: The nonce to use for the transaction. If not provided, the API will assign
|
|
66
|
-
* a nonce to the transaction based on the current state of the account.
|
|
67
|
-
* - `maxPriorityFeePerGas` *(Optional)*: The maximum priority fee per gas to use for the transaction.
|
|
68
|
-
* If not provided, the API will estimate a value based on current network conditions.
|
|
69
|
-
* - `maxFeePerGas` *(Optional)*: The maximum fee per gas to use for the transaction.
|
|
70
|
-
* If not provided, the API will estimate a value based on current network conditions.
|
|
71
|
-
* - `gasLimit` *(Optional)*: The gas limit to use for the transaction. If not provided, the API will estimate a value
|
|
72
|
-
* based on the `to` and `data` fields of the transaction.
|
|
73
|
-
* - `value` *(Optional)*: The amount of ETH, in wei, to send with the transaction.
|
|
74
|
-
* - `data` *(Optional)*: The data to send with the transaction; only used for contract calls.
|
|
75
|
-
* - `accessList` *(Optional)*: The access list to use for the transaction.
|
|
76
|
-
*
|
|
77
|
-
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
78
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
79
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
80
|
-
|
|
81
|
-
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
82
|
-
When included, duplicate requests with the same key will return identical responses.
|
|
83
|
-
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
84
|
-
|
|
85
|
-
* @param address - The 0x-prefixed address of the Ethereum account.
|
|
86
|
-
*/
|
|
87
|
-
export const sendEvmTransaction = /*@__PURE__*/ API.make(() => ({
|
|
88
|
-
inputSchema: SendEvmTransactionInput,
|
|
89
|
-
outputSchema: SendEvmTransactionOutput,
|
|
90
|
-
}));
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface SendEvmTransactionWithEndUserAccountInput {
|
|
7
|
-
userId: string;
|
|
8
|
-
projectID?: string;
|
|
9
|
-
address: string;
|
|
10
|
-
network:
|
|
11
|
-
| "base"
|
|
12
|
-
| "base-sepolia"
|
|
13
|
-
| "ethereum"
|
|
14
|
-
| "ethereum-sepolia"
|
|
15
|
-
| "avalanche"
|
|
16
|
-
| "polygon"
|
|
17
|
-
| "optimism"
|
|
18
|
-
| "arbitrum"
|
|
19
|
-
| "arbitrum-sepolia"
|
|
20
|
-
| "world"
|
|
21
|
-
| "world-sepolia";
|
|
22
|
-
walletSecretId?: string;
|
|
23
|
-
transaction: string;
|
|
24
|
-
}
|
|
25
|
-
export const SendEvmTransactionWithEndUserAccountInput =
|
|
26
|
-
/*@__PURE__*/ Schema.Struct({
|
|
27
|
-
userId: Schema.String.pipe(T.PathParam()),
|
|
28
|
-
projectID: Schema.optional(Schema.String),
|
|
29
|
-
address: Schema.String,
|
|
30
|
-
network: Schema.Literals([
|
|
31
|
-
"base",
|
|
32
|
-
"base-sepolia",
|
|
33
|
-
"ethereum",
|
|
34
|
-
"ethereum-sepolia",
|
|
35
|
-
"avalanche",
|
|
36
|
-
"polygon",
|
|
37
|
-
"optimism",
|
|
38
|
-
"arbitrum",
|
|
39
|
-
"arbitrum-sepolia",
|
|
40
|
-
"world",
|
|
41
|
-
"world-sepolia",
|
|
42
|
-
]),
|
|
43
|
-
walletSecretId: Schema.optional(Schema.String),
|
|
44
|
-
transaction: Schema.String,
|
|
45
|
-
}).pipe(
|
|
46
|
-
T.Http({
|
|
47
|
-
method: "POST",
|
|
48
|
-
path: "/v2/embedded-wallet-api/end-users/{userId}/evm/send/transaction",
|
|
49
|
-
}),
|
|
50
|
-
) as unknown as Schema.Codec<SendEvmTransactionWithEndUserAccountInput>;
|
|
51
|
-
|
|
52
|
-
// Output Schema
|
|
53
|
-
export interface SendEvmTransactionWithEndUserAccountOutput {
|
|
54
|
-
transactionHash: string;
|
|
55
|
-
}
|
|
56
|
-
export const SendEvmTransactionWithEndUserAccountOutput =
|
|
57
|
-
/*@__PURE__*/ Schema.Struct({
|
|
58
|
-
transactionHash: Schema.String,
|
|
59
|
-
}) as unknown as Schema.Codec<SendEvmTransactionWithEndUserAccountOutput>;
|
|
60
|
-
|
|
61
|
-
// The operation
|
|
62
|
-
/**
|
|
63
|
-
* Send transaction via end user EVM account
|
|
64
|
-
*
|
|
65
|
-
* Signs a transaction with the given end user 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/).
|
|
66
|
-
* The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md).
|
|
67
|
-
* **Transaction fields and API behavior**
|
|
68
|
-
* - `to` *(Required)*: The address of the contract or account to send the transaction to.
|
|
69
|
-
* - `chainId` *(Ignored)*: The value of the `chainId` field in the transaction is ignored.
|
|
70
|
-
* The transaction will be sent to the network indicated by the `network` field in the request body.
|
|
71
|
-
* - `nonce` *(Optional)*: The nonce to use for the transaction. If not provided, the API will assign
|
|
72
|
-
* a nonce to the transaction based on the current state of the account.
|
|
73
|
-
* - `maxPriorityFeePerGas` *(Optional)*: The maximum priority fee per gas to use for the transaction.
|
|
74
|
-
* If not provided, the API will estimate a value based on current network conditions.
|
|
75
|
-
* - `maxFeePerGas` *(Optional)*: The maximum fee per gas to use for the transaction.
|
|
76
|
-
* If not provided, the API will estimate a value based on current network conditions.
|
|
77
|
-
* - `gasLimit` *(Optional)*: The gas limit to use for the transaction. If not provided, the API will estimate a value
|
|
78
|
-
* based on the `to` and `data` fields of the transaction.
|
|
79
|
-
* - `value` *(Optional)*: The amount of ETH, in wei, to send with the transaction.
|
|
80
|
-
* - `data` *(Optional)*: The data to send with the transaction; only used for contract calls.
|
|
81
|
-
* - `accessList` *(Optional)*: The access list to use for the transaction.
|
|
82
|
-
*
|
|
83
|
-
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
84
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
85
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
86
|
-
|
|
87
|
-
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
88
|
-
When included, duplicate requests with the same key will return identical responses.
|
|
89
|
-
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
90
|
-
|
|
91
|
-
* @param userId - The ID of the end user.
|
|
92
|
-
* @param X-Developer-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
93
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
94
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
95
|
-
|
|
96
|
-
* @param projectID - The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
97
|
-
*/
|
|
98
|
-
export const sendEvmTransactionWithEndUserAccount =
|
|
99
|
-
/*@__PURE__*/ API.make(() => ({
|
|
100
|
-
inputSchema: SendEvmTransactionWithEndUserAccountInput,
|
|
101
|
-
outputSchema: SendEvmTransactionWithEndUserAccountOutput,
|
|
102
|
-
}));
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface SendSolanaAssetWithEndUserAccountInput {
|
|
7
|
-
userId: string;
|
|
8
|
-
address: string;
|
|
9
|
-
asset: "usdc";
|
|
10
|
-
projectID?: string;
|
|
11
|
-
to: string;
|
|
12
|
-
amount: string;
|
|
13
|
-
network: "solana" | "solana-devnet";
|
|
14
|
-
createRecipientAta?: boolean;
|
|
15
|
-
walletSecretId?: string;
|
|
16
|
-
useCdpSponsor?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export const SendSolanaAssetWithEndUserAccountInput =
|
|
19
|
-
/*@__PURE__*/ Schema.Struct({
|
|
20
|
-
userId: Schema.String.pipe(T.PathParam()),
|
|
21
|
-
address: Schema.String.pipe(T.PathParam()),
|
|
22
|
-
asset: Schema.Literals(["usdc"]).pipe(T.PathParam()),
|
|
23
|
-
projectID: Schema.optional(Schema.String),
|
|
24
|
-
to: Schema.String,
|
|
25
|
-
amount: Schema.String,
|
|
26
|
-
network: Schema.Literals(["solana", "solana-devnet"]),
|
|
27
|
-
createRecipientAta: Schema.optional(Schema.Boolean),
|
|
28
|
-
walletSecretId: Schema.optional(Schema.String),
|
|
29
|
-
useCdpSponsor: Schema.optional(Schema.Boolean),
|
|
30
|
-
}).pipe(
|
|
31
|
-
T.Http({
|
|
32
|
-
method: "POST",
|
|
33
|
-
path: "/v2/embedded-wallet-api/end-users/{userId}/solana/{address}/send/{asset}",
|
|
34
|
-
}),
|
|
35
|
-
) as unknown as Schema.Codec<SendSolanaAssetWithEndUserAccountInput>;
|
|
36
|
-
|
|
37
|
-
// Output Schema
|
|
38
|
-
export interface SendSolanaAssetWithEndUserAccountOutput {
|
|
39
|
-
transactionSignature: string;
|
|
40
|
-
}
|
|
41
|
-
export const SendSolanaAssetWithEndUserAccountOutput =
|
|
42
|
-
/*@__PURE__*/ Schema.Struct({
|
|
43
|
-
transactionSignature: Schema.String,
|
|
44
|
-
}) as unknown as Schema.Codec<SendSolanaAssetWithEndUserAccountOutput>;
|
|
45
|
-
|
|
46
|
-
// The operation
|
|
47
|
-
/**
|
|
48
|
-
* Send USDC on Solana
|
|
49
|
-
*
|
|
50
|
-
* Sends USDC from an end user's Solana account to a recipient address on the Solana network. This endpoint simplifies USDC transfers by automatically handling mint resolution, Associated Token Account (ATA) creation, decimal conversion, and transaction encoding.
|
|
51
|
-
* The `amount` field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50").
|
|
52
|
-
* Use the optional `createRecipientAta` parameter to control whether the sender pays for creating the recipient's Associated Token Account if it doesn't exist.
|
|
53
|
-
*
|
|
54
|
-
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
55
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
56
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
57
|
-
|
|
58
|
-
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
59
|
-
When included, duplicate requests with the same key will return identical responses.
|
|
60
|
-
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
61
|
-
|
|
62
|
-
* @param X-Developer-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
63
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
64
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
65
|
-
|
|
66
|
-
* @param userId - The ID of the end user.
|
|
67
|
-
* @param address - The base58 encoded address of the Solana account to send USDC from.
|
|
68
|
-
* @param asset - The asset to send. Currently only "usdc" is supported.
|
|
69
|
-
* @param projectID - The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
70
|
-
*/
|
|
71
|
-
export const sendSolanaAssetWithEndUserAccount =
|
|
72
|
-
/*@__PURE__*/ API.make(() => ({
|
|
73
|
-
inputSchema: SendSolanaAssetWithEndUserAccountInput,
|
|
74
|
-
outputSchema: SendSolanaAssetWithEndUserAccountOutput,
|
|
75
|
-
}));
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface SendSolanaTransactionInput {
|
|
7
|
-
network: "solana" | "solana-devnet";
|
|
8
|
-
transaction: string;
|
|
9
|
-
useCdpSponsor?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export const SendSolanaTransactionInput =
|
|
12
|
-
/*@__PURE__*/ Schema.Struct({
|
|
13
|
-
network: Schema.Literals(["solana", "solana-devnet"]),
|
|
14
|
-
transaction: Schema.String,
|
|
15
|
-
useCdpSponsor: Schema.optional(Schema.Boolean),
|
|
16
|
-
}).pipe(
|
|
17
|
-
T.Http({ method: "POST", path: "/v2/solana/accounts/send/transaction" }),
|
|
18
|
-
) as unknown as Schema.Codec<SendSolanaTransactionInput>;
|
|
19
|
-
|
|
20
|
-
// Output Schema
|
|
21
|
-
export interface SendSolanaTransactionOutput {
|
|
22
|
-
transactionSignature: string;
|
|
23
|
-
}
|
|
24
|
-
export const SendSolanaTransactionOutput =
|
|
25
|
-
/*@__PURE__*/ Schema.Struct({
|
|
26
|
-
transactionSignature: Schema.String,
|
|
27
|
-
}) as unknown as Schema.Codec<SendSolanaTransactionOutput>;
|
|
28
|
-
|
|
29
|
-
// The operation
|
|
30
|
-
/**
|
|
31
|
-
* Send Solana transaction
|
|
32
|
-
*
|
|
33
|
-
* 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.
|
|
34
|
-
* 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.
|
|
35
|
-
* **Transaction types**
|
|
36
|
-
* The following transaction types are supported:
|
|
37
|
-
* * [Legacy transactions](https://solana.com/developers/guides/advanced/versions#current-transaction-versions)
|
|
38
|
-
* * [Versioned transactions](https://solana.com/developers/guides/advanced/versions)
|
|
39
|
-
* **Instruction Batching**
|
|
40
|
-
* 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.
|
|
41
|
-
* **Network Support**
|
|
42
|
-
* The following Solana networks are supported:
|
|
43
|
-
* * `solana` - Solana Mainnet
|
|
44
|
-
* * `solana-devnet` - Solana Devnet
|
|
45
|
-
* The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
46
|
-
*
|
|
47
|
-
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
48
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
49
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
50
|
-
|
|
51
|
-
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
52
|
-
When included, duplicate requests with the same key will return identical responses.
|
|
53
|
-
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
54
|
-
|
|
55
|
-
*/
|
|
56
|
-
export const sendSolanaTransaction = /*@__PURE__*/ API.make(() => ({
|
|
57
|
-
inputSchema: SendSolanaTransactionInput,
|
|
58
|
-
outputSchema: SendSolanaTransactionOutput,
|
|
59
|
-
}));
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface SendSolanaTransactionWithEndUserAccountInput {
|
|
7
|
-
userId: string;
|
|
8
|
-
projectID?: string;
|
|
9
|
-
address: string;
|
|
10
|
-
network: "solana" | "solana-devnet";
|
|
11
|
-
walletSecretId?: string;
|
|
12
|
-
transaction: string;
|
|
13
|
-
useCdpSponsor?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export const SendSolanaTransactionWithEndUserAccountInput =
|
|
16
|
-
/*@__PURE__*/ Schema.Struct({
|
|
17
|
-
userId: Schema.String.pipe(T.PathParam()),
|
|
18
|
-
projectID: Schema.optional(Schema.String),
|
|
19
|
-
address: Schema.String,
|
|
20
|
-
network: Schema.Literals(["solana", "solana-devnet"]),
|
|
21
|
-
walletSecretId: Schema.optional(Schema.String),
|
|
22
|
-
transaction: Schema.String,
|
|
23
|
-
useCdpSponsor: Schema.optional(Schema.Boolean),
|
|
24
|
-
}).pipe(
|
|
25
|
-
T.Http({
|
|
26
|
-
method: "POST",
|
|
27
|
-
path: "/v2/embedded-wallet-api/end-users/{userId}/solana/send/transaction",
|
|
28
|
-
}),
|
|
29
|
-
) as unknown as Schema.Codec<SendSolanaTransactionWithEndUserAccountInput>;
|
|
30
|
-
|
|
31
|
-
// Output Schema
|
|
32
|
-
export interface SendSolanaTransactionWithEndUserAccountOutput {
|
|
33
|
-
transactionSignature: string;
|
|
34
|
-
}
|
|
35
|
-
export const SendSolanaTransactionWithEndUserAccountOutput =
|
|
36
|
-
/*@__PURE__*/ Schema.Struct({
|
|
37
|
-
transactionSignature: Schema.String,
|
|
38
|
-
}) as unknown as Schema.Codec<SendSolanaTransactionWithEndUserAccountOutput>;
|
|
39
|
-
|
|
40
|
-
// The operation
|
|
41
|
-
/**
|
|
42
|
-
* Send transaction via end user Solana account
|
|
43
|
-
*
|
|
44
|
-
* Signs a transaction with the given end user Solana account and sends it to the indicated supported network.
|
|
45
|
-
* 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.
|
|
46
|
-
* The unsigned transaction should be serialized into a byte array and then encoded as base64.
|
|
47
|
-
* **Transaction types**
|
|
48
|
-
* The following transaction types are supported:
|
|
49
|
-
* * [Legacy transactions](https://solana.com/developers/guides/advanced/versions#current-transaction-versions)
|
|
50
|
-
* * [Versioned transactions](https://solana.com/developers/guides/advanced/versions)
|
|
51
|
-
* **Instruction Batching**
|
|
52
|
-
* 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.
|
|
53
|
-
* **Network Support**
|
|
54
|
-
* The following Solana networks are supported:
|
|
55
|
-
* * `solana` - Solana Mainnet
|
|
56
|
-
* * `solana-devnet` - Solana Devnet
|
|
57
|
-
* The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
58
|
-
*
|
|
59
|
-
* @param X-Wallet-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
60
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
61
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
62
|
-
|
|
63
|
-
* @param X-Idempotency-Key - An optional string request header for making requests safely retryable.
|
|
64
|
-
When included, duplicate requests with the same key will return identical responses.
|
|
65
|
-
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
66
|
-
|
|
67
|
-
* @param X-Developer-Auth - A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
68
|
-
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
|
|
69
|
-
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
70
|
-
|
|
71
|
-
* @param userId - The ID of the end user.
|
|
72
|
-
* @param projectID - The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
73
|
-
*/
|
|
74
|
-
export const sendSolanaTransactionWithEndUserAccount =
|
|
75
|
-
/*@__PURE__*/ API.make(() => ({
|
|
76
|
-
inputSchema: SendSolanaTransactionWithEndUserAccountInput,
|
|
77
|
-
outputSchema: SendSolanaTransactionWithEndUserAccountOutput,
|
|
78
|
-
}));
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface SendUserOperationInput {
|
|
7
|
-
address: string;
|
|
8
|
-
userOpHash: string;
|
|
9
|
-
signature: string;
|
|
10
|
-
}
|
|
11
|
-
export const SendUserOperationInput = /*@__PURE__*/ Schema.Struct({
|
|
12
|
-
address: Schema.String.pipe(T.PathParam()),
|
|
13
|
-
userOpHash: Schema.String.pipe(T.PathParam()),
|
|
14
|
-
signature: Schema.String,
|
|
15
|
-
}).pipe(
|
|
16
|
-
T.Http({
|
|
17
|
-
method: "POST",
|
|
18
|
-
path: "/v2/evm/smart-accounts/{address}/user-operations/{userOpHash}/send",
|
|
19
|
-
}),
|
|
20
|
-
) as unknown as Schema.Codec<SendUserOperationInput>;
|
|
21
|
-
|
|
22
|
-
// Output Schema
|
|
23
|
-
export interface SendUserOperationOutput {
|
|
24
|
-
network:
|
|
25
|
-
| "base-sepolia"
|
|
26
|
-
| "base"
|
|
27
|
-
| "arbitrum"
|
|
28
|
-
| "optimism"
|
|
29
|
-
| "zora"
|
|
30
|
-
| "polygon"
|
|
31
|
-
| "bnb"
|
|
32
|
-
| "avalanche"
|
|
33
|
-
| "ethereum"
|
|
34
|
-
| "ethereum-sepolia";
|
|
35
|
-
userOpHash: string;
|
|
36
|
-
calls: {
|
|
37
|
-
to: string;
|
|
38
|
-
value: string;
|
|
39
|
-
data: string;
|
|
40
|
-
overrideGasLimit?: string;
|
|
41
|
-
}[];
|
|
42
|
-
status:
|
|
43
|
-
| "pending"
|
|
44
|
-
| "signed"
|
|
45
|
-
| "broadcast"
|
|
46
|
-
| "complete"
|
|
47
|
-
| "dropped"
|
|
48
|
-
| "failed";
|
|
49
|
-
transactionHash?: string;
|
|
50
|
-
receipts?: {
|
|
51
|
-
revert?: { data: string; message: string };
|
|
52
|
-
transactionHash?: string;
|
|
53
|
-
blockHash?: string;
|
|
54
|
-
blockNumber?: number;
|
|
55
|
-
gasUsed?: string;
|
|
56
|
-
}[];
|
|
57
|
-
expiresAt?: string;
|
|
58
|
-
}
|
|
59
|
-
export const SendUserOperationOutput =
|
|
60
|
-
/*@__PURE__*/ Schema.Struct({
|
|
61
|
-
network: Schema.Literals([
|
|
62
|
-
"base-sepolia",
|
|
63
|
-
"base",
|
|
64
|
-
"arbitrum",
|
|
65
|
-
"optimism",
|
|
66
|
-
"zora",
|
|
67
|
-
"polygon",
|
|
68
|
-
"bnb",
|
|
69
|
-
"avalanche",
|
|
70
|
-
"ethereum",
|
|
71
|
-
"ethereum-sepolia",
|
|
72
|
-
]),
|
|
73
|
-
userOpHash: Schema.String,
|
|
74
|
-
calls: Schema.Array(
|
|
75
|
-
Schema.Struct({
|
|
76
|
-
to: Schema.String,
|
|
77
|
-
value: Schema.String,
|
|
78
|
-
data: Schema.String,
|
|
79
|
-
overrideGasLimit: Schema.optional(Schema.String),
|
|
80
|
-
}),
|
|
81
|
-
),
|
|
82
|
-
status: Schema.Literals([
|
|
83
|
-
"pending",
|
|
84
|
-
"signed",
|
|
85
|
-
"broadcast",
|
|
86
|
-
"complete",
|
|
87
|
-
"dropped",
|
|
88
|
-
"failed",
|
|
89
|
-
]),
|
|
90
|
-
transactionHash: Schema.optional(Schema.String),
|
|
91
|
-
receipts: Schema.optional(
|
|
92
|
-
Schema.Array(
|
|
93
|
-
Schema.Struct({
|
|
94
|
-
revert: Schema.optional(
|
|
95
|
-
Schema.Struct({
|
|
96
|
-
data: Schema.String,
|
|
97
|
-
message: Schema.String,
|
|
98
|
-
}),
|
|
99
|
-
),
|
|
100
|
-
transactionHash: Schema.optional(Schema.String),
|
|
101
|
-
blockHash: Schema.optional(Schema.String),
|
|
102
|
-
blockNumber: Schema.optional(Schema.Number),
|
|
103
|
-
gasUsed: Schema.optional(Schema.String),
|
|
104
|
-
}),
|
|
105
|
-
),
|
|
106
|
-
),
|
|
107
|
-
expiresAt: Schema.optional(Schema.String),
|
|
108
|
-
}) as unknown as Schema.Codec<SendUserOperationOutput>;
|
|
109
|
-
|
|
110
|
-
// The operation
|
|
111
|
-
/**
|
|
112
|
-
* Send user operation
|
|
113
|
-
*
|
|
114
|
-
* Sends a user operation with a signature.
|
|
115
|
-
* 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).
|
|
116
|
-
* 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)
|
|
117
|
-
* If using the CDP Paymaster, the user operation must be signed and sent within 2 minutes of being prepared.
|
|
118
|
-
*
|
|
119
|
-
* @param address - The address of the Smart Account to send the user operation from.
|
|
120
|
-
* @param userOpHash - The hash of the user operation to send.
|
|
121
|
-
*/
|
|
122
|
-
export const sendUserOperation = /*@__PURE__*/ API.make(() => ({
|
|
123
|
-
inputSchema: SendUserOperationInput,
|
|
124
|
-
outputSchema: SendUserOperationOutput,
|
|
125
|
-
}));
|