@coinbase/cdp-sdk 1.44.1 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -2
- package/README.md +164 -43
- package/_cjs/accounts/evm/eip6492.js +49 -0
- package/_cjs/accounts/evm/eip6492.js.map +1 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js +27 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +127 -55
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +115 -45
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +49 -19
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js +37 -0
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_cjs/actions/solana/transfer.js.map +1 -1
- package/_cjs/actions/solana/utils.js +9 -9
- package/_cjs/actions/solana/utils.js.map +1 -1
- package/_cjs/analytics.js +10 -228
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/auth/utils/http.js +1 -0
- package/_cjs/auth/utils/http.js.map +1 -1
- package/_cjs/client/cdp.js +4 -7
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/end-user/endUser.js +385 -4
- package/_cjs/client/end-user/endUser.js.map +1 -1
- package/_cjs/client/end-user/toEndUserAccount.js +201 -23
- package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
- package/_cjs/client/evm/evm.js +482 -227
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/client/policies/policies.js +41 -11
- package/_cjs/client/policies/policies.js.map +1 -1
- package/_cjs/client/solana/solana.js +215 -118
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/index.js +3 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/cdpApiClient.js +32 -0
- package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +178 -9
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +261 -0
- package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +30 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_cjs/openapi-client/generated/faucets/faucets.js +6 -5
- package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_cjs/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js +15 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
- package/_cjs/openapi-client/generated/sql-api/sql-api.js +75 -0
- package/_cjs/openapi-client/generated/sql-api/sql-api.js.map +1 -0
- package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_cjs/openapi-client/index.js +4 -1
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/policies/evmSchema.js +127 -1
- package/_cjs/policies/evmSchema.js.map +1 -1
- package/_cjs/policies/solanaSchema.js +102 -1
- package/_cjs/policies/solanaSchema.js.map +1 -1
- package/_cjs/policies/types.js +7 -0
- package/_cjs/policies/types.js.map +1 -1
- package/_cjs/utils/export.js +6 -5
- package/_cjs/utils/export.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/eip6492.js +46 -0
- package/_esm/accounts/evm/eip6492.js.map +1 -0
- package/_esm/accounts/evm/toEvmDelegatedAccount.js +24 -0
- package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_esm/accounts/evm/toEvmServerAccount.js +127 -55
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +115 -45
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +49 -19
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js +34 -0
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_esm/actions/solana/transfer.js.map +1 -1
- package/_esm/actions/solana/utils.js +9 -9
- package/_esm/actions/solana/utils.js.map +1 -1
- package/_esm/analytics.js +9 -227
- package/_esm/analytics.js.map +1 -1
- package/_esm/auth/utils/http.js +1 -0
- package/_esm/auth/utils/http.js.map +1 -1
- package/_esm/client/cdp.js +4 -7
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/end-user/endUser.js +385 -4
- package/_esm/client/end-user/endUser.js.map +1 -1
- package/_esm/client/end-user/toEndUserAccount.js +201 -23
- package/_esm/client/end-user/toEndUserAccount.js.map +1 -1
- package/_esm/client/evm/evm.js +482 -227
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/client/policies/policies.js +41 -11
- package/_esm/client/policies/policies.js.map +1 -1
- package/_esm/client/solana/solana.js +215 -118
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/index.js +1 -0
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/cdpApiClient.js +32 -0
- package/_esm/openapi-client/cdpApiClient.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +175 -7
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +243 -0
- package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +27 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_esm/openapi-client/generated/faucets/faucets.js +6 -5
- package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_esm/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
- package/_esm/openapi-client/generated/onramp/onramp.js +13 -0
- package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
- package/_esm/openapi-client/generated/sql-api/sql-api.js +70 -0
- package/_esm/openapi-client/generated/sql-api/sql-api.js.map +1 -0
- package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_esm/openapi-client/index.js +4 -1
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/policies/evmSchema.js +126 -0
- package/_esm/policies/evmSchema.js.map +1 -1
- package/_esm/policies/solanaSchema.js +101 -0
- package/_esm/policies/solanaSchema.js.map +1 -1
- package/_esm/policies/types.js +9 -2
- package/_esm/policies/types.js.map +1 -1
- package/_esm/utils/export.js +6 -5
- package/_esm/utils/export.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/eip6492.d.ts +17 -0
- package/_types/accounts/evm/eip6492.d.ts.map +1 -0
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts +13 -0
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -0
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts +4 -4
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/types.d.ts +3 -2
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts +32 -0
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -0
- package/_types/actions/solana/transfer.d.ts +3 -4
- package/_types/actions/solana/transfer.d.ts.map +1 -1
- package/_types/actions/solana/types.d.ts +79 -29
- package/_types/actions/solana/types.d.ts.map +1 -1
- package/_types/actions/solana/utils.d.ts +10 -9
- package/_types/actions/solana/utils.d.ts.map +1 -1
- package/_types/analytics.d.ts +5 -38
- package/_types/analytics.d.ts.map +1 -1
- package/_types/auth/utils/http.d.ts.map +1 -1
- package/_types/client/cdp.d.ts +4 -0
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/end-user/endUser.d.ts +272 -1
- package/_types/client/end-user/endUser.d.ts.map +1 -1
- package/_types/client/end-user/endUser.types.d.ts +491 -1
- package/_types/client/end-user/endUser.types.d.ts.map +1 -1
- package/_types/client/end-user/toEndUserAccount.d.ts +4 -1
- package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +54 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +29 -2
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/policies/policies.d.ts.map +1 -1
- package/_types/client/solana/solana.d.ts +38 -12
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/index.d.ts +3 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +884 -90
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts +163 -0
- package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts.map +1 -0
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +9 -9
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +35 -15
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +14 -14
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts +3 -3
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +2 -2
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -1
- package/_types/openapi-client/generated/faucets/faucets.d.ts +9 -8
- package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -1
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts +3 -3
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts.map +1 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts +12 -5
- package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +6 -6
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +12 -12
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts +2 -2
- package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts.map +1 -1
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts +73 -0
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts.map +1 -0
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts +6 -6
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -1
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +4 -4
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +23 -3
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +3128 -1064
- package/_types/policies/evmSchema.d.ts.map +1 -1
- package/_types/policies/solanaSchema.d.ts +1411 -47
- package/_types/policies/solanaSchema.d.ts.map +1 -1
- package/_types/policies/types.d.ts +8427 -2942
- package/_types/policies/types.d.ts.map +1 -1
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/utils/export.d.ts +1 -1
- package/_types/utils/export.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/eip6492.ts +60 -0
- package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
- package/accounts/evm/toEvmServerAccount.ts +115 -67
- package/accounts/evm/toEvmSmartAccount.ts +114 -57
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +44 -5
- package/accounts/evm/types.ts +8 -3
- package/accounts/solana/toSolanaAccount.ts +44 -24
- package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
- package/actions/solana/transfer.ts +3 -3
- package/actions/solana/types.ts +79 -29
- package/actions/solana/utils.ts +13 -11
- package/analytics.ts +8 -294
- package/auth/utils/http.ts +1 -0
- package/client/cdp.ts +6 -8
- package/client/end-user/endUser.ts +513 -4
- package/client/end-user/endUser.types.ts +598 -0
- package/client/end-user/toEndUserAccount.ts +330 -26
- package/client/evm/evm.ts +517 -282
- package/client/evm/evm.types.ts +45 -2
- package/client/policies/policies.ts +41 -16
- package/client/solana/solana.ts +233 -153
- package/index.ts +36 -1
- package/openapi-client/cdpApiClient.ts +34 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +1155 -172
- package/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.ts +455 -0
- package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +12 -9
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +66 -14
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +16 -16
- package/openapi-client/generated/evm-swaps/evm-swaps.ts +3 -3
- package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +2 -2
- package/openapi-client/generated/faucets/faucets.ts +9 -8
- package/openapi-client/generated/onchain-data/onchain-data.ts +3 -3
- package/openapi-client/generated/onramp/onramp.ts +28 -4
- package/openapi-client/generated/policy-engine/policy-engine.ts +12 -6
- package/openapi-client/generated/solana-accounts/solana-accounts.ts +12 -12
- package/openapi-client/generated/solana-token-balances/solana-token-balances.ts +2 -2
- package/openapi-client/generated/sql-api/sql-api.ts +92 -0
- package/openapi-client/generated/webhooks/webhooks.ts +6 -6
- package/openapi-client/generated/x402-facilitator/x402-facilitator.ts +6 -4
- package/openapi-client/index.ts +4 -1
- package/package.json +7 -8
- package/policies/evmSchema.ts +164 -0
- package/policies/solanaSchema.ts +130 -0
- package/policies/types.ts +14 -0
- package/types/contract.ts +2 -4
- package/utils/export.ts +6 -5
- package/version.ts +1 -1
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -55
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -50
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +0 -53
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +0 -1
- package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +0 -72
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Coinbase Developer Platform APIs
|
|
5
|
+
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
6
|
+
* OpenAPI spec version: 2.0.0
|
|
7
|
+
*/
|
|
8
|
+
import type {
|
|
9
|
+
BlockchainAddress,
|
|
10
|
+
CreateEvmEip7702DelegationWithEndUserAccount201,
|
|
11
|
+
CreateEvmEip7702DelegationWithEndUserAccountBody,
|
|
12
|
+
EvmUserOperation,
|
|
13
|
+
RevokeDelegationForEndUserBody,
|
|
14
|
+
RevokeSpendPermissionRequest,
|
|
15
|
+
SendEvmAssetWithEndUserAccount200,
|
|
16
|
+
SendEvmAssetWithEndUserAccountBody,
|
|
17
|
+
SendEvmTransactionWithEndUserAccount200,
|
|
18
|
+
SendEvmTransactionWithEndUserAccountBody,
|
|
19
|
+
SendSolanaAssetWithEndUserAccount200,
|
|
20
|
+
SendSolanaAssetWithEndUserAccountBody,
|
|
21
|
+
SendSolanaTransactionWithEndUserAccount200,
|
|
22
|
+
SendSolanaTransactionWithEndUserAccountBody,
|
|
23
|
+
SendUserOperationWithEndUserAccountBody,
|
|
24
|
+
SignEvmHashWithEndUserAccount200,
|
|
25
|
+
SignEvmHashWithEndUserAccountBody,
|
|
26
|
+
SignEvmMessageWithEndUserAccount200,
|
|
27
|
+
SignEvmMessageWithEndUserAccountBody,
|
|
28
|
+
SignEvmTransactionWithEndUserAccount200,
|
|
29
|
+
SignEvmTransactionWithEndUserAccountBody,
|
|
30
|
+
SignEvmTypedDataWithEndUserAccount200,
|
|
31
|
+
SignEvmTypedDataWithEndUserAccountBody,
|
|
32
|
+
SignSolanaHashWithEndUserAccount200,
|
|
33
|
+
SignSolanaHashWithEndUserAccountBody,
|
|
34
|
+
SignSolanaMessageWithEndUserAccount200,
|
|
35
|
+
SignSolanaMessageWithEndUserAccountBody,
|
|
36
|
+
SignSolanaTransactionWithEndUserAccount200,
|
|
37
|
+
SignSolanaTransactionWithEndUserAccountBody,
|
|
38
|
+
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
39
|
+
|
|
40
|
+
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
41
|
+
|
|
42
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Signs an arbitrary 32 byte hash with the end user's given EVM account.
|
|
46
|
+
* @summary Sign a hash with end user EVM account
|
|
47
|
+
*/
|
|
48
|
+
export const signEvmHashWithEndUserAccount = (
|
|
49
|
+
projectId: string,
|
|
50
|
+
userId: string,
|
|
51
|
+
signEvmHashWithEndUserAccountBody: SignEvmHashWithEndUserAccountBody,
|
|
52
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmHashWithEndUserAccount200>>,
|
|
53
|
+
) => {
|
|
54
|
+
return cdpApiClient<SignEvmHashWithEndUserAccount200>(
|
|
55
|
+
{
|
|
56
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign`,
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers: { "Content-Type": "application/json" },
|
|
59
|
+
data: signEvmHashWithEndUserAccountBody,
|
|
60
|
+
},
|
|
61
|
+
options,
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Signs a transaction with the given end user EVM account.
|
|
66
|
+
The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
|
|
67
|
+
|
|
68
|
+
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.
|
|
69
|
+
* @summary Sign a transaction with end user EVM account
|
|
70
|
+
*/
|
|
71
|
+
export const signEvmTransactionWithEndUserAccount = (
|
|
72
|
+
projectId: string,
|
|
73
|
+
userId: string,
|
|
74
|
+
signEvmTransactionWithEndUserAccountBody: SignEvmTransactionWithEndUserAccountBody,
|
|
75
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmTransactionWithEndUserAccount200>>,
|
|
76
|
+
) => {
|
|
77
|
+
return cdpApiClient<SignEvmTransactionWithEndUserAccount200>(
|
|
78
|
+
{
|
|
79
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign/transaction`,
|
|
80
|
+
method: "POST",
|
|
81
|
+
headers: { "Content-Type": "application/json" },
|
|
82
|
+
data: signEvmTransactionWithEndUserAccountBody,
|
|
83
|
+
},
|
|
84
|
+
options,
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 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/).
|
|
89
|
+
|
|
90
|
+
The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md).
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
**Transaction fields and API behavior**
|
|
94
|
+
|
|
95
|
+
- `to` *(Required)*: The address of the contract or account to send the transaction to.
|
|
96
|
+
- `chainId` *(Ignored)*: The value of the `chainId` field in the transaction is ignored.
|
|
97
|
+
The transaction will be sent to the network indicated by the `network` field in the request body.
|
|
98
|
+
|
|
99
|
+
- `nonce` *(Optional)*: The nonce to use for the transaction. If not provided, the API will assign
|
|
100
|
+
a nonce to the transaction based on the current state of the account.
|
|
101
|
+
|
|
102
|
+
- `maxPriorityFeePerGas` *(Optional)*: The maximum priority fee per gas to use for the transaction.
|
|
103
|
+
If not provided, the API will estimate a value based on current network conditions.
|
|
104
|
+
|
|
105
|
+
- `maxFeePerGas` *(Optional)*: The maximum fee per gas to use for the transaction.
|
|
106
|
+
If not provided, the API will estimate a value based on current network conditions.
|
|
107
|
+
|
|
108
|
+
- `gasLimit` *(Optional)*: The gas limit to use for the transaction. If not provided, the API will estimate a value
|
|
109
|
+
based on the `to` and `data` fields of the transaction.
|
|
110
|
+
|
|
111
|
+
- `value` *(Optional)*: The amount of ETH, in wei, to send with the transaction.
|
|
112
|
+
- `data` *(Optional)*: The data to send with the transaction; only used for contract calls.
|
|
113
|
+
- `accessList` *(Optional)*: The access list to use for the transaction.
|
|
114
|
+
* @summary Send a transaction with end user EVM account
|
|
115
|
+
*/
|
|
116
|
+
export const sendEvmTransactionWithEndUserAccount = (
|
|
117
|
+
projectId: string,
|
|
118
|
+
userId: string,
|
|
119
|
+
sendEvmTransactionWithEndUserAccountBody: SendEvmTransactionWithEndUserAccountBody,
|
|
120
|
+
options?: SecondParameter<typeof cdpApiClient<SendEvmTransactionWithEndUserAccount200>>,
|
|
121
|
+
) => {
|
|
122
|
+
return cdpApiClient<SendEvmTransactionWithEndUserAccount200>(
|
|
123
|
+
{
|
|
124
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/send/transaction`,
|
|
125
|
+
method: "POST",
|
|
126
|
+
headers: { "Content-Type": "application/json" },
|
|
127
|
+
data: sendEvmTransactionWithEndUserAccountBody,
|
|
128
|
+
},
|
|
129
|
+
options,
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* 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.
|
|
134
|
+
The `amount` field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50").
|
|
135
|
+
* @summary Send USDC on EVM
|
|
136
|
+
*/
|
|
137
|
+
export const sendEvmAssetWithEndUserAccount = (
|
|
138
|
+
projectId: string,
|
|
139
|
+
userId: string,
|
|
140
|
+
address: BlockchainAddress,
|
|
141
|
+
asset: "usdc",
|
|
142
|
+
sendEvmAssetWithEndUserAccountBody: SendEvmAssetWithEndUserAccountBody,
|
|
143
|
+
options?: SecondParameter<typeof cdpApiClient<SendEvmAssetWithEndUserAccount200>>,
|
|
144
|
+
) => {
|
|
145
|
+
return cdpApiClient<SendEvmAssetWithEndUserAccount200>(
|
|
146
|
+
{
|
|
147
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/${address}/send/${asset}`,
|
|
148
|
+
method: "POST",
|
|
149
|
+
headers: { "Content-Type": "application/json" },
|
|
150
|
+
data: sendEvmAssetWithEndUserAccountBody,
|
|
151
|
+
},
|
|
152
|
+
options,
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Signs an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message with the given end user EVM account.
|
|
157
|
+
|
|
158
|
+
Per the specification, the message in the request body is prepended with `0x19 <0x45 (E)> <thereum Signed Message:\n" + len(message)>` before being signed.
|
|
159
|
+
* @summary Sign an EIP-191 message with end user EVM account
|
|
160
|
+
*/
|
|
161
|
+
export const signEvmMessageWithEndUserAccount = (
|
|
162
|
+
projectId: string,
|
|
163
|
+
userId: string,
|
|
164
|
+
signEvmMessageWithEndUserAccountBody: SignEvmMessageWithEndUserAccountBody,
|
|
165
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmMessageWithEndUserAccount200>>,
|
|
166
|
+
) => {
|
|
167
|
+
return cdpApiClient<SignEvmMessageWithEndUserAccount200>(
|
|
168
|
+
{
|
|
169
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign/message`,
|
|
170
|
+
method: "POST",
|
|
171
|
+
headers: { "Content-Type": "application/json" },
|
|
172
|
+
data: signEvmMessageWithEndUserAccountBody,
|
|
173
|
+
},
|
|
174
|
+
options,
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Signs [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data with the given end user EVM account.
|
|
179
|
+
* @summary Sign EIP-712 typed data with end user EVM account
|
|
180
|
+
*/
|
|
181
|
+
export const signEvmTypedDataWithEndUserAccount = (
|
|
182
|
+
projectId: string,
|
|
183
|
+
userId: string,
|
|
184
|
+
signEvmTypedDataWithEndUserAccountBody: SignEvmTypedDataWithEndUserAccountBody,
|
|
185
|
+
options?: SecondParameter<typeof cdpApiClient<SignEvmTypedDataWithEndUserAccount200>>,
|
|
186
|
+
) => {
|
|
187
|
+
return cdpApiClient<SignEvmTypedDataWithEndUserAccount200>(
|
|
188
|
+
{
|
|
189
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign/typed-data`,
|
|
190
|
+
method: "POST",
|
|
191
|
+
headers: { "Content-Type": "application/json" },
|
|
192
|
+
data: signEvmTypedDataWithEndUserAccountBody,
|
|
193
|
+
},
|
|
194
|
+
options,
|
|
195
|
+
);
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Revokes all active delegations for the specified end user. This operation can be performed by the end user themselves or by a developer using their API key.
|
|
199
|
+
* @summary Revoke delegation for end user
|
|
200
|
+
*/
|
|
201
|
+
export const revokeDelegationForEndUser = (
|
|
202
|
+
projectId: string,
|
|
203
|
+
userId: string,
|
|
204
|
+
revokeDelegationForEndUserBody: RevokeDelegationForEndUserBody,
|
|
205
|
+
options?: SecondParameter<typeof cdpApiClient<void>>,
|
|
206
|
+
) => {
|
|
207
|
+
return cdpApiClient<void>(
|
|
208
|
+
{
|
|
209
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/delegation`,
|
|
210
|
+
method: "DELETE",
|
|
211
|
+
headers: { "Content-Type": "application/json" },
|
|
212
|
+
data: revokeDelegationForEndUserBody,
|
|
213
|
+
},
|
|
214
|
+
options,
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Creates an EIP-7702 delegation for an end user's EVM EOA account, upgrading it with smart account capabilities.
|
|
219
|
+
|
|
220
|
+
This endpoint:
|
|
221
|
+
- Retrieves delegation artifacts from onchain
|
|
222
|
+
- Signs the EIP-7702 authorization for delegation
|
|
223
|
+
- Assembles and submits a Type 4 transaction
|
|
224
|
+
- Creates an associated smart account object
|
|
225
|
+
|
|
226
|
+
The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.
|
|
227
|
+
* @summary Create EIP-7702 delegation for end user EVM account
|
|
228
|
+
*/
|
|
229
|
+
export const createEvmEip7702DelegationWithEndUserAccount = (
|
|
230
|
+
projectId: string,
|
|
231
|
+
userId: string,
|
|
232
|
+
createEvmEip7702DelegationWithEndUserAccountBody: CreateEvmEip7702DelegationWithEndUserAccountBody,
|
|
233
|
+
options?: SecondParameter<typeof cdpApiClient<CreateEvmEip7702DelegationWithEndUserAccount201>>,
|
|
234
|
+
) => {
|
|
235
|
+
return cdpApiClient<CreateEvmEip7702DelegationWithEndUserAccount201>(
|
|
236
|
+
{
|
|
237
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/eip7702/delegation`,
|
|
238
|
+
method: "POST",
|
|
239
|
+
headers: { "Content-Type": "application/json" },
|
|
240
|
+
data: createEvmEip7702DelegationWithEndUserAccountBody,
|
|
241
|
+
},
|
|
242
|
+
options,
|
|
243
|
+
);
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Prepares, signs, and sends a user operation for an end user's Smart Account.
|
|
247
|
+
* @summary Send a user operation for end user Smart Account
|
|
248
|
+
*/
|
|
249
|
+
export const sendUserOperationWithEndUserAccount = (
|
|
250
|
+
projectId: string,
|
|
251
|
+
userId: string,
|
|
252
|
+
address: string,
|
|
253
|
+
sendUserOperationWithEndUserAccountBody: SendUserOperationWithEndUserAccountBody,
|
|
254
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
255
|
+
) => {
|
|
256
|
+
return cdpApiClient<EvmUserOperation>(
|
|
257
|
+
{
|
|
258
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/smart-accounts/${address}/send`,
|
|
259
|
+
method: "POST",
|
|
260
|
+
headers: { "Content-Type": "application/json" },
|
|
261
|
+
data: sendUserOperationWithEndUserAccountBody,
|
|
262
|
+
},
|
|
263
|
+
options,
|
|
264
|
+
);
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Revokes an existing spend permission.
|
|
268
|
+
* @summary Revoke a spend permission
|
|
269
|
+
*/
|
|
270
|
+
export const revokeSpendPermissionWithEndUserAccount = (
|
|
271
|
+
projectId: string,
|
|
272
|
+
userId: string,
|
|
273
|
+
address: string,
|
|
274
|
+
revokeSpendPermissionRequest: RevokeSpendPermissionRequest,
|
|
275
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
276
|
+
) => {
|
|
277
|
+
return cdpApiClient<EvmUserOperation>(
|
|
278
|
+
{
|
|
279
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/smart-accounts/${address}/spend-permissions/revoke`,
|
|
280
|
+
method: "POST",
|
|
281
|
+
headers: { "Content-Type": "application/json" },
|
|
282
|
+
data: revokeSpendPermissionRequest,
|
|
283
|
+
},
|
|
284
|
+
options,
|
|
285
|
+
);
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Signs an arbitrary 32 byte hash with the end user's given Solana account.
|
|
289
|
+
* @summary Sign a hash with end user Solana account
|
|
290
|
+
*/
|
|
291
|
+
export const signSolanaHashWithEndUserAccount = (
|
|
292
|
+
projectId: string,
|
|
293
|
+
userId: string,
|
|
294
|
+
signSolanaHashWithEndUserAccountBody: SignSolanaHashWithEndUserAccountBody,
|
|
295
|
+
options?: SecondParameter<typeof cdpApiClient<SignSolanaHashWithEndUserAccount200>>,
|
|
296
|
+
) => {
|
|
297
|
+
return cdpApiClient<SignSolanaHashWithEndUserAccount200>(
|
|
298
|
+
{
|
|
299
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/sign`,
|
|
300
|
+
method: "POST",
|
|
301
|
+
headers: { "Content-Type": "application/json" },
|
|
302
|
+
data: signSolanaHashWithEndUserAccountBody,
|
|
303
|
+
},
|
|
304
|
+
options,
|
|
305
|
+
);
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Signs an arbitrary Base64 encoded message with the given Solana account.
|
|
309
|
+
**WARNING:** Never sign a message that you didn't generate as it may put your funds at risk.
|
|
310
|
+
* @summary Sign a Base64 encoded message
|
|
311
|
+
*/
|
|
312
|
+
export const signSolanaMessageWithEndUserAccount = (
|
|
313
|
+
projectId: string,
|
|
314
|
+
userId: string,
|
|
315
|
+
signSolanaMessageWithEndUserAccountBody: SignSolanaMessageWithEndUserAccountBody,
|
|
316
|
+
options?: SecondParameter<typeof cdpApiClient<SignSolanaMessageWithEndUserAccount200>>,
|
|
317
|
+
) => {
|
|
318
|
+
return cdpApiClient<SignSolanaMessageWithEndUserAccount200>(
|
|
319
|
+
{
|
|
320
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/sign/message`,
|
|
321
|
+
method: "POST",
|
|
322
|
+
headers: { "Content-Type": "application/json" },
|
|
323
|
+
data: signSolanaMessageWithEndUserAccountBody,
|
|
324
|
+
},
|
|
325
|
+
options,
|
|
326
|
+
);
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Signs a transaction with the given end user Solana account.
|
|
330
|
+
The unsigned transaction should be serialized into a byte array and then encoded as base64.
|
|
331
|
+
**Transaction types**
|
|
332
|
+
The following transaction types are supported:
|
|
333
|
+
* [Legacy transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html)
|
|
334
|
+
* [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html)
|
|
335
|
+
The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
336
|
+
* @summary Sign a transaction with end user Solana account
|
|
337
|
+
*/
|
|
338
|
+
export const signSolanaTransactionWithEndUserAccount = (
|
|
339
|
+
projectId: string,
|
|
340
|
+
userId: string,
|
|
341
|
+
signSolanaTransactionWithEndUserAccountBody: SignSolanaTransactionWithEndUserAccountBody,
|
|
342
|
+
options?: SecondParameter<typeof cdpApiClient<SignSolanaTransactionWithEndUserAccount200>>,
|
|
343
|
+
) => {
|
|
344
|
+
return cdpApiClient<SignSolanaTransactionWithEndUserAccount200>(
|
|
345
|
+
{
|
|
346
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/sign/transaction`,
|
|
347
|
+
method: "POST",
|
|
348
|
+
headers: { "Content-Type": "application/json" },
|
|
349
|
+
data: signSolanaTransactionWithEndUserAccountBody,
|
|
350
|
+
},
|
|
351
|
+
options,
|
|
352
|
+
);
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* Signs a transaction with the given end user Solana account and sends it to the indicated supported network.
|
|
356
|
+
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.
|
|
357
|
+
The unsigned transaction should be serialized into a byte array and then encoded as base64.
|
|
358
|
+
**Transaction types**
|
|
359
|
+
The following transaction types are supported:
|
|
360
|
+
* [Legacy transactions](https://solana.com/developers/guides/advanced/versions#current-transaction-versions)
|
|
361
|
+
* [Versioned transactions](https://solana.com/developers/guides/advanced/versions)
|
|
362
|
+
**Instruction Batching**
|
|
363
|
+
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.
|
|
364
|
+
**Network Support**
|
|
365
|
+
The following Solana networks are supported:
|
|
366
|
+
* `solana` - Solana Mainnet
|
|
367
|
+
* `solana-devnet` - Solana Devnet
|
|
368
|
+
The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
369
|
+
* @summary Send a transaction with end user Solana account
|
|
370
|
+
*/
|
|
371
|
+
export const sendSolanaTransactionWithEndUserAccount = (
|
|
372
|
+
projectId: string,
|
|
373
|
+
userId: string,
|
|
374
|
+
sendSolanaTransactionWithEndUserAccountBody: SendSolanaTransactionWithEndUserAccountBody,
|
|
375
|
+
options?: SecondParameter<typeof cdpApiClient<SendSolanaTransactionWithEndUserAccount200>>,
|
|
376
|
+
) => {
|
|
377
|
+
return cdpApiClient<SendSolanaTransactionWithEndUserAccount200>(
|
|
378
|
+
{
|
|
379
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/send/transaction`,
|
|
380
|
+
method: "POST",
|
|
381
|
+
headers: { "Content-Type": "application/json" },
|
|
382
|
+
data: sendSolanaTransactionWithEndUserAccountBody,
|
|
383
|
+
},
|
|
384
|
+
options,
|
|
385
|
+
);
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* 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.
|
|
389
|
+
The `amount` field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50").
|
|
390
|
+
Use the optional `createRecipientAta` parameter to control whether the sender pays for creating the recipient's Associated Token Account if it doesn't exist.
|
|
391
|
+
* @summary Send USDC on Solana
|
|
392
|
+
*/
|
|
393
|
+
export const sendSolanaAssetWithEndUserAccount = (
|
|
394
|
+
projectId: string,
|
|
395
|
+
userId: string,
|
|
396
|
+
address: BlockchainAddress,
|
|
397
|
+
asset: "usdc",
|
|
398
|
+
sendSolanaAssetWithEndUserAccountBody: SendSolanaAssetWithEndUserAccountBody,
|
|
399
|
+
options?: SecondParameter<typeof cdpApiClient<SendSolanaAssetWithEndUserAccount200>>,
|
|
400
|
+
) => {
|
|
401
|
+
return cdpApiClient<SendSolanaAssetWithEndUserAccount200>(
|
|
402
|
+
{
|
|
403
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/${address}/send/${asset}`,
|
|
404
|
+
method: "POST",
|
|
405
|
+
headers: { "Content-Type": "application/json" },
|
|
406
|
+
data: sendSolanaAssetWithEndUserAccountBody,
|
|
407
|
+
},
|
|
408
|
+
options,
|
|
409
|
+
);
|
|
410
|
+
};
|
|
411
|
+
export type SignEvmHashWithEndUserAccountResult = NonNullable<
|
|
412
|
+
Awaited<ReturnType<typeof signEvmHashWithEndUserAccount>>
|
|
413
|
+
>;
|
|
414
|
+
export type SignEvmTransactionWithEndUserAccountResult = NonNullable<
|
|
415
|
+
Awaited<ReturnType<typeof signEvmTransactionWithEndUserAccount>>
|
|
416
|
+
>;
|
|
417
|
+
export type SendEvmTransactionWithEndUserAccountResult = NonNullable<
|
|
418
|
+
Awaited<ReturnType<typeof sendEvmTransactionWithEndUserAccount>>
|
|
419
|
+
>;
|
|
420
|
+
export type SendEvmAssetWithEndUserAccountResult = NonNullable<
|
|
421
|
+
Awaited<ReturnType<typeof sendEvmAssetWithEndUserAccount>>
|
|
422
|
+
>;
|
|
423
|
+
export type SignEvmMessageWithEndUserAccountResult = NonNullable<
|
|
424
|
+
Awaited<ReturnType<typeof signEvmMessageWithEndUserAccount>>
|
|
425
|
+
>;
|
|
426
|
+
export type SignEvmTypedDataWithEndUserAccountResult = NonNullable<
|
|
427
|
+
Awaited<ReturnType<typeof signEvmTypedDataWithEndUserAccount>>
|
|
428
|
+
>;
|
|
429
|
+
export type RevokeDelegationForEndUserResult = NonNullable<
|
|
430
|
+
Awaited<ReturnType<typeof revokeDelegationForEndUser>>
|
|
431
|
+
>;
|
|
432
|
+
export type CreateEvmEip7702DelegationWithEndUserAccountResult = NonNullable<
|
|
433
|
+
Awaited<ReturnType<typeof createEvmEip7702DelegationWithEndUserAccount>>
|
|
434
|
+
>;
|
|
435
|
+
export type SendUserOperationWithEndUserAccountResult = NonNullable<
|
|
436
|
+
Awaited<ReturnType<typeof sendUserOperationWithEndUserAccount>>
|
|
437
|
+
>;
|
|
438
|
+
export type RevokeSpendPermissionWithEndUserAccountResult = NonNullable<
|
|
439
|
+
Awaited<ReturnType<typeof revokeSpendPermissionWithEndUserAccount>>
|
|
440
|
+
>;
|
|
441
|
+
export type SignSolanaHashWithEndUserAccountResult = NonNullable<
|
|
442
|
+
Awaited<ReturnType<typeof signSolanaHashWithEndUserAccount>>
|
|
443
|
+
>;
|
|
444
|
+
export type SignSolanaMessageWithEndUserAccountResult = NonNullable<
|
|
445
|
+
Awaited<ReturnType<typeof signSolanaMessageWithEndUserAccount>>
|
|
446
|
+
>;
|
|
447
|
+
export type SignSolanaTransactionWithEndUserAccountResult = NonNullable<
|
|
448
|
+
Awaited<ReturnType<typeof signSolanaTransactionWithEndUserAccount>>
|
|
449
|
+
>;
|
|
450
|
+
export type SendSolanaTransactionWithEndUserAccountResult = NonNullable<
|
|
451
|
+
Awaited<ReturnType<typeof sendSolanaTransactionWithEndUserAccount>>
|
|
452
|
+
>;
|
|
453
|
+
export type SendSolanaAssetWithEndUserAccountResult = NonNullable<
|
|
454
|
+
Awaited<ReturnType<typeof sendSolanaAssetWithEndUserAccount>>
|
|
455
|
+
>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -31,7 +31,7 @@ This API is intended to be used by the developer's own backend, and is authentic
|
|
|
31
31
|
*/
|
|
32
32
|
export const createEndUser = (
|
|
33
33
|
createEndUserBody: CreateEndUserBody,
|
|
34
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
34
|
+
options?: SecondParameter<typeof cdpApiClient<EndUser>>,
|
|
35
35
|
) => {
|
|
36
36
|
return cdpApiClient<EndUser>(
|
|
37
37
|
{
|
|
@@ -50,7 +50,7 @@ By default, the response is sorted by creation date in ascending order and pagin
|
|
|
50
50
|
*/
|
|
51
51
|
export const listEndUsers = (
|
|
52
52
|
params?: ListEndUsersParams,
|
|
53
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
53
|
+
options?: SecondParameter<typeof cdpApiClient<ListEndUsers200>>,
|
|
54
54
|
) => {
|
|
55
55
|
return cdpApiClient<ListEndUsers200>({ url: `/v2/end-users`, method: "GET", params }, options);
|
|
56
56
|
};
|
|
@@ -62,7 +62,7 @@ This API is intended to be used by the developer's own backend, and is authentic
|
|
|
62
62
|
*/
|
|
63
63
|
export const validateEndUserAccessToken = (
|
|
64
64
|
validateEndUserAccessTokenBody: ValidateEndUserAccessTokenBody,
|
|
65
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
65
|
+
options?: SecondParameter<typeof cdpApiClient<EndUser>>,
|
|
66
66
|
) => {
|
|
67
67
|
return cdpApiClient<EndUser>(
|
|
68
68
|
{
|
|
@@ -80,7 +80,10 @@ export const validateEndUserAccessToken = (
|
|
|
80
80
|
This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
|
|
81
81
|
* @summary Get an end user
|
|
82
82
|
*/
|
|
83
|
-
export const getEndUser = (
|
|
83
|
+
export const getEndUser = (
|
|
84
|
+
userId: string,
|
|
85
|
+
options?: SecondParameter<typeof cdpApiClient<EndUser>>,
|
|
86
|
+
) => {
|
|
84
87
|
return cdpApiClient<EndUser>({ url: `/v2/end-users/${userId}`, method: "GET" }, options);
|
|
85
88
|
};
|
|
86
89
|
/**
|
|
@@ -91,7 +94,7 @@ This API is intended to be used by the developer's own backend, and is authentic
|
|
|
91
94
|
export const addEndUserEvmAccount = (
|
|
92
95
|
userId: string,
|
|
93
96
|
addEndUserEvmAccountBody?: AddEndUserEvmAccountBody,
|
|
94
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
97
|
+
options?: SecondParameter<typeof cdpApiClient<AddEndUserEvmAccount201>>,
|
|
95
98
|
) => {
|
|
96
99
|
return cdpApiClient<AddEndUserEvmAccount201>(
|
|
97
100
|
{
|
|
@@ -111,7 +114,7 @@ This API is intended to be used by the developer's own backend, and is authentic
|
|
|
111
114
|
export const addEndUserEvmSmartAccount = (
|
|
112
115
|
userId: string,
|
|
113
116
|
addEndUserEvmSmartAccountBody?: AddEndUserEvmSmartAccountBody,
|
|
114
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
117
|
+
options?: SecondParameter<typeof cdpApiClient<AddEndUserEvmSmartAccount201>>,
|
|
115
118
|
) => {
|
|
116
119
|
return cdpApiClient<AddEndUserEvmSmartAccount201>(
|
|
117
120
|
{
|
|
@@ -131,7 +134,7 @@ This API is intended to be used by the developer's own backend, and is authentic
|
|
|
131
134
|
export const addEndUserSolanaAccount = (
|
|
132
135
|
userId: string,
|
|
133
136
|
addEndUserSolanaAccountBody?: AddEndUserSolanaAccountBody,
|
|
134
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
137
|
+
options?: SecondParameter<typeof cdpApiClient<AddEndUserSolanaAccount201>>,
|
|
135
138
|
) => {
|
|
136
139
|
return cdpApiClient<AddEndUserSolanaAccount201>(
|
|
137
140
|
{
|
|
@@ -151,7 +154,7 @@ This endpoint allows developers to import existing keys for their end users, sup
|
|
|
151
154
|
*/
|
|
152
155
|
export const importEndUser = (
|
|
153
156
|
importEndUserBody: ImportEndUserBody,
|
|
154
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
157
|
+
options?: SecondParameter<typeof cdpApiClient<EndUser>>,
|
|
155
158
|
) => {
|
|
156
159
|
return cdpApiClient<EndUser>(
|
|
157
160
|
{
|