@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
|
@@ -14,6 +14,33 @@ import {
|
|
|
14
14
|
type AddEndUserEvmSmartAccountResult,
|
|
15
15
|
type AddEndUserSolanaAccountOptions,
|
|
16
16
|
type AddEndUserSolanaAccountResult,
|
|
17
|
+
type RevokeDelegationForEndUserOptions,
|
|
18
|
+
type SignEvmHashOptions,
|
|
19
|
+
type SignEvmHashResult,
|
|
20
|
+
type SignEvmTransactionOptions,
|
|
21
|
+
type SignEvmTransactionResult,
|
|
22
|
+
type SignEvmMessageOptions,
|
|
23
|
+
type SignEvmMessageResult,
|
|
24
|
+
type SignEvmTypedDataOptions,
|
|
25
|
+
type SignEvmTypedDataResult,
|
|
26
|
+
type SendEvmTransactionOptions,
|
|
27
|
+
type SendEvmTransactionResult,
|
|
28
|
+
type SendEvmAssetOptions,
|
|
29
|
+
type SendEvmAssetResult,
|
|
30
|
+
type SendUserOperationOptions,
|
|
31
|
+
type SendUserOperationResult,
|
|
32
|
+
type CreateEvmEip7702DelegationOptions,
|
|
33
|
+
type CreateEvmEip7702DelegationForEndUserResult,
|
|
34
|
+
type SignSolanaHashOptions,
|
|
35
|
+
type SignSolanaHashResult,
|
|
36
|
+
type SignSolanaMessageOptions,
|
|
37
|
+
type SignSolanaMessageResult,
|
|
38
|
+
type SignSolanaTransactionOptions,
|
|
39
|
+
type SignSolanaTransactionResult,
|
|
40
|
+
type SendSolanaTransactionOptions,
|
|
41
|
+
type SendSolanaTransactionResult,
|
|
42
|
+
type SendSolanaAssetOptions,
|
|
43
|
+
type SendSolanaAssetResult,
|
|
17
44
|
type EndUserAccount,
|
|
18
45
|
} from "./endUser.types.js";
|
|
19
46
|
import { toEndUserAccount } from "./toEndUserAccount.js";
|
|
@@ -26,6 +53,17 @@ import { CdpOpenApiClient, type ListEndUsers200 } from "../../openapi-client/ind
|
|
|
26
53
|
* The CDP end user client.
|
|
27
54
|
*/
|
|
28
55
|
export class CDPEndUserClient {
|
|
56
|
+
private projectId?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new CDPEndUserClient.
|
|
60
|
+
*
|
|
61
|
+
* @param projectId - The CDP project ID. Required for delegation operations (signing, sending).
|
|
62
|
+
*/
|
|
63
|
+
constructor(projectId?: string) {
|
|
64
|
+
this.projectId = projectId;
|
|
65
|
+
}
|
|
66
|
+
|
|
29
67
|
/**
|
|
30
68
|
* Creates an end user. An end user is an entity that can own CDP EVM accounts,
|
|
31
69
|
* EVM smart accounts, and/or Solana accounts.
|
|
@@ -66,7 +104,7 @@ export class CDPEndUserClient {
|
|
|
66
104
|
userId,
|
|
67
105
|
});
|
|
68
106
|
|
|
69
|
-
return toEndUserAccount(CdpOpenApiClient, { endUser });
|
|
107
|
+
return toEndUserAccount(CdpOpenApiClient, { endUser, projectId: this.projectId });
|
|
70
108
|
}
|
|
71
109
|
|
|
72
110
|
/**
|
|
@@ -139,7 +177,7 @@ export class CDPEndUserClient {
|
|
|
139
177
|
|
|
140
178
|
const endUser = await CdpOpenApiClient.getEndUser(userId);
|
|
141
179
|
|
|
142
|
-
return toEndUserAccount(CdpOpenApiClient, { endUser });
|
|
180
|
+
return toEndUserAccount(CdpOpenApiClient, { endUser, projectId: this.projectId });
|
|
143
181
|
}
|
|
144
182
|
|
|
145
183
|
/**
|
|
@@ -235,6 +273,461 @@ export class CDPEndUserClient {
|
|
|
235
273
|
return CdpOpenApiClient.addEndUserSolanaAccount(userId, {});
|
|
236
274
|
}
|
|
237
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Revokes all active delegations for the specified end user.
|
|
278
|
+
* This operation can be performed by the end user themselves or by a developer using their API key.
|
|
279
|
+
*
|
|
280
|
+
* @param options - The options for revoking the delegation.
|
|
281
|
+
*
|
|
282
|
+
* @returns A promise that resolves when the delegation has been revoked.
|
|
283
|
+
*
|
|
284
|
+
* @example **Revoke all delegations for an end user**
|
|
285
|
+
* ```ts
|
|
286
|
+
* await cdp.endUser.revokeDelegationForEndUser({
|
|
287
|
+
* userId: "user-123"
|
|
288
|
+
* });
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
async revokeDelegationForEndUser(options: RevokeDelegationForEndUserOptions): Promise<void> {
|
|
292
|
+
Analytics.trackAction({
|
|
293
|
+
action: "revoke_delegation_for_end_user",
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
const { userId } = options;
|
|
297
|
+
|
|
298
|
+
await CdpOpenApiClient.revokeDelegationForEndUser(this.requireProjectId(), userId, {});
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// ─── Delegated EVM Sign Methods ───
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Signs an EVM hash on behalf of an end user using a delegation.
|
|
305
|
+
* The end user must have previously created a delegation granting signing permissions.
|
|
306
|
+
*
|
|
307
|
+
* @param options - The options for signing an EVM hash.
|
|
308
|
+
*
|
|
309
|
+
* @returns A promise that resolves to the signature.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```ts
|
|
313
|
+
* const result = await cdp.endUser.signEvmHash({
|
|
314
|
+
* userId: "user-123",
|
|
315
|
+
* hash: "0xabcdef...",
|
|
316
|
+
* address: "0x1234..."
|
|
317
|
+
* });
|
|
318
|
+
* console.log(result.signature);
|
|
319
|
+
* ```
|
|
320
|
+
*/
|
|
321
|
+
async signEvmHash(options: SignEvmHashOptions): Promise<SignEvmHashResult> {
|
|
322
|
+
Analytics.trackAction({ action: "end_user_sign_evm_hash" });
|
|
323
|
+
|
|
324
|
+
return CdpOpenApiClient.signEvmHashWithEndUserAccount(this.requireProjectId(), options.userId, {
|
|
325
|
+
hash: options.hash,
|
|
326
|
+
address: options.address,
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Signs an EVM transaction on behalf of an end user using a delegation.
|
|
332
|
+
*
|
|
333
|
+
* @param options - The options for signing an EVM transaction.
|
|
334
|
+
*
|
|
335
|
+
* @returns A promise that resolves to the signed transaction.
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* ```ts
|
|
339
|
+
* const result = await cdp.endUser.signEvmTransaction({
|
|
340
|
+
* userId: "user-123",
|
|
341
|
+
* address: "0x1234...",
|
|
342
|
+
* transaction: "0x02..."
|
|
343
|
+
* });
|
|
344
|
+
* console.log(result.signedTransaction);
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
async signEvmTransaction(options: SignEvmTransactionOptions): Promise<SignEvmTransactionResult> {
|
|
348
|
+
Analytics.trackAction({ action: "end_user_sign_evm_transaction" });
|
|
349
|
+
|
|
350
|
+
return CdpOpenApiClient.signEvmTransactionWithEndUserAccount(
|
|
351
|
+
this.requireProjectId(),
|
|
352
|
+
options.userId,
|
|
353
|
+
{
|
|
354
|
+
address: options.address,
|
|
355
|
+
transaction: options.transaction,
|
|
356
|
+
},
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Signs an EVM message (EIP-191) on behalf of an end user using a delegation.
|
|
362
|
+
*
|
|
363
|
+
* @param options - The options for signing an EVM message.
|
|
364
|
+
*
|
|
365
|
+
* @returns A promise that resolves to the signature.
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* ```ts
|
|
369
|
+
* const result = await cdp.endUser.signEvmMessage({
|
|
370
|
+
* userId: "user-123",
|
|
371
|
+
* address: "0x1234...",
|
|
372
|
+
* message: "Hello, World!"
|
|
373
|
+
* });
|
|
374
|
+
* console.log(result.signature);
|
|
375
|
+
* ```
|
|
376
|
+
*/
|
|
377
|
+
async signEvmMessage(options: SignEvmMessageOptions): Promise<SignEvmMessageResult> {
|
|
378
|
+
Analytics.trackAction({ action: "end_user_sign_evm_message" });
|
|
379
|
+
|
|
380
|
+
return CdpOpenApiClient.signEvmMessageWithEndUserAccount(
|
|
381
|
+
this.requireProjectId(),
|
|
382
|
+
options.userId,
|
|
383
|
+
{
|
|
384
|
+
address: options.address,
|
|
385
|
+
message: options.message,
|
|
386
|
+
},
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Signs EVM EIP-712 typed data on behalf of an end user using a delegation.
|
|
392
|
+
*
|
|
393
|
+
* @param options - The options for signing EVM typed data.
|
|
394
|
+
*
|
|
395
|
+
* @returns A promise that resolves to the signature.
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* ```ts
|
|
399
|
+
* const result = await cdp.endUser.signEvmTypedData({
|
|
400
|
+
* userId: "user-123",
|
|
401
|
+
* address: "0x1234...",
|
|
402
|
+
* typedData: { domain: {}, types: {}, primaryType: "...", message: {} }
|
|
403
|
+
* });
|
|
404
|
+
* console.log(result.signature);
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
407
|
+
async signEvmTypedData(options: SignEvmTypedDataOptions): Promise<SignEvmTypedDataResult> {
|
|
408
|
+
Analytics.trackAction({ action: "end_user_sign_evm_typed_data" });
|
|
409
|
+
|
|
410
|
+
return CdpOpenApiClient.signEvmTypedDataWithEndUserAccount(
|
|
411
|
+
this.requireProjectId(),
|
|
412
|
+
options.userId,
|
|
413
|
+
{
|
|
414
|
+
address: options.address,
|
|
415
|
+
typedData: options.typedData,
|
|
416
|
+
},
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// ─── Delegated EVM Send Methods ───
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Sends an EVM transaction on behalf of an end user using a delegation.
|
|
424
|
+
*
|
|
425
|
+
* @param options - The options for sending an EVM transaction.
|
|
426
|
+
*
|
|
427
|
+
* @returns A promise that resolves to the transaction hash.
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* ```ts
|
|
431
|
+
* const result = await cdp.endUser.sendEvmTransaction({
|
|
432
|
+
* userId: "user-123",
|
|
433
|
+
* address: "0x1234...",
|
|
434
|
+
* transaction: "0x02...",
|
|
435
|
+
* network: "base-sepolia"
|
|
436
|
+
* });
|
|
437
|
+
* console.log(result.transactionHash);
|
|
438
|
+
* ```
|
|
439
|
+
*/
|
|
440
|
+
async sendEvmTransaction(options: SendEvmTransactionOptions): Promise<SendEvmTransactionResult> {
|
|
441
|
+
Analytics.trackAction({ action: "end_user_send_evm_transaction" });
|
|
442
|
+
|
|
443
|
+
return CdpOpenApiClient.sendEvmTransactionWithEndUserAccount(
|
|
444
|
+
this.requireProjectId(),
|
|
445
|
+
options.userId,
|
|
446
|
+
{
|
|
447
|
+
address: options.address,
|
|
448
|
+
transaction: options.transaction,
|
|
449
|
+
network: options.network,
|
|
450
|
+
},
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Sends an EVM asset (e.g. USDC) on behalf of an end user using a delegation.
|
|
456
|
+
*
|
|
457
|
+
* @param options - The options for sending an EVM asset.
|
|
458
|
+
*
|
|
459
|
+
* @returns A promise that resolves to the transaction result.
|
|
460
|
+
*
|
|
461
|
+
* @example
|
|
462
|
+
* ```ts
|
|
463
|
+
* const result = await cdp.endUser.sendEvmAsset({
|
|
464
|
+
* userId: "user-123",
|
|
465
|
+
* address: "0x1234...",
|
|
466
|
+
* to: "0xabcd...",
|
|
467
|
+
* amount: "1000000",
|
|
468
|
+
* network: "base-sepolia"
|
|
469
|
+
* });
|
|
470
|
+
* console.log(result.transactionHash);
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
async sendEvmAsset(options: SendEvmAssetOptions): Promise<SendEvmAssetResult> {
|
|
474
|
+
Analytics.trackAction({ action: "end_user_send_evm_asset" });
|
|
475
|
+
|
|
476
|
+
const asset = options.asset ?? "usdc";
|
|
477
|
+
|
|
478
|
+
return CdpOpenApiClient.sendEvmAssetWithEndUserAccount(
|
|
479
|
+
this.requireProjectId(),
|
|
480
|
+
options.userId,
|
|
481
|
+
options.address,
|
|
482
|
+
asset,
|
|
483
|
+
{
|
|
484
|
+
to: options.to,
|
|
485
|
+
amount: options.amount,
|
|
486
|
+
network: options.network,
|
|
487
|
+
useCdpPaymaster: options.useCdpPaymaster,
|
|
488
|
+
paymasterUrl: options.paymasterUrl,
|
|
489
|
+
},
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Sends a user operation on behalf of an end user using a delegation.
|
|
495
|
+
*
|
|
496
|
+
* @param options - The options for sending a user operation.
|
|
497
|
+
*
|
|
498
|
+
* @returns A promise that resolves to the user operation result.
|
|
499
|
+
*
|
|
500
|
+
* @example
|
|
501
|
+
* ```ts
|
|
502
|
+
* const result = await cdp.endUser.sendUserOperation({
|
|
503
|
+
* userId: "user-123",
|
|
504
|
+
* address: "0x1234...",
|
|
505
|
+
* network: "base-sepolia",
|
|
506
|
+
* calls: [{ to: "0xabcd...", value: "0", data: "0x" }],
|
|
507
|
+
* useCdpPaymaster: true
|
|
508
|
+
* });
|
|
509
|
+
* ```
|
|
510
|
+
*/
|
|
511
|
+
async sendUserOperation(options: SendUserOperationOptions): Promise<SendUserOperationResult> {
|
|
512
|
+
Analytics.trackAction({ action: "end_user_send_user_operation" });
|
|
513
|
+
|
|
514
|
+
return CdpOpenApiClient.sendUserOperationWithEndUserAccount(
|
|
515
|
+
this.requireProjectId(),
|
|
516
|
+
options.userId,
|
|
517
|
+
options.address,
|
|
518
|
+
{
|
|
519
|
+
network: options.network,
|
|
520
|
+
calls: options.calls,
|
|
521
|
+
useCdpPaymaster: options.useCdpPaymaster,
|
|
522
|
+
paymasterUrl: options.paymasterUrl,
|
|
523
|
+
dataSuffix: options.dataSuffix,
|
|
524
|
+
},
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// ─── Delegated EVM EIP-7702 Delegation Method ───
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Creates an EVM EIP-7702 delegation on behalf of an end user.
|
|
532
|
+
*
|
|
533
|
+
* @param options - The options for creating an EIP-7702 delegation.
|
|
534
|
+
*
|
|
535
|
+
* @returns A promise that resolves to the delegation operation ID.
|
|
536
|
+
*
|
|
537
|
+
* @example
|
|
538
|
+
* ```ts
|
|
539
|
+
* const result = await cdp.endUser.createEvmEip7702Delegation({
|
|
540
|
+
* userId: "user-123",
|
|
541
|
+
* address: "0x1234...",
|
|
542
|
+
* network: "base-sepolia"
|
|
543
|
+
* });
|
|
544
|
+
* console.log(result.delegationOperationId);
|
|
545
|
+
* ```
|
|
546
|
+
*/
|
|
547
|
+
async createEvmEip7702Delegation(
|
|
548
|
+
options: CreateEvmEip7702DelegationOptions,
|
|
549
|
+
): Promise<CreateEvmEip7702DelegationForEndUserResult> {
|
|
550
|
+
Analytics.trackAction({ action: "end_user_create_evm_eip7702_delegation" });
|
|
551
|
+
|
|
552
|
+
return CdpOpenApiClient.createEvmEip7702DelegationWithEndUserAccount(
|
|
553
|
+
this.requireProjectId(),
|
|
554
|
+
options.userId,
|
|
555
|
+
{
|
|
556
|
+
address: options.address,
|
|
557
|
+
network: options.network,
|
|
558
|
+
enableSpendPermissions: options.enableSpendPermissions,
|
|
559
|
+
},
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// ─── Delegated Solana Sign Methods ───
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Signs a Solana hash on behalf of an end user using a delegation.
|
|
567
|
+
*
|
|
568
|
+
* @param options - The options for signing a Solana hash.
|
|
569
|
+
*
|
|
570
|
+
* @returns A promise that resolves to the signature.
|
|
571
|
+
*
|
|
572
|
+
* @example
|
|
573
|
+
* ```ts
|
|
574
|
+
* const result = await cdp.endUser.signSolanaHash({
|
|
575
|
+
* userId: "user-123",
|
|
576
|
+
* hash: "base64hash...",
|
|
577
|
+
* address: "So1ana..."
|
|
578
|
+
* });
|
|
579
|
+
* console.log(result.signature);
|
|
580
|
+
* ```
|
|
581
|
+
*/
|
|
582
|
+
async signSolanaHash(options: SignSolanaHashOptions): Promise<SignSolanaHashResult> {
|
|
583
|
+
Analytics.trackAction({ action: "end_user_sign_solana_hash" });
|
|
584
|
+
|
|
585
|
+
return CdpOpenApiClient.signSolanaHashWithEndUserAccount(
|
|
586
|
+
this.requireProjectId(),
|
|
587
|
+
options.userId,
|
|
588
|
+
{
|
|
589
|
+
hash: options.hash,
|
|
590
|
+
address: options.address,
|
|
591
|
+
},
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Signs a Solana message on behalf of an end user using a delegation.
|
|
597
|
+
*
|
|
598
|
+
* @param options - The options for signing a Solana message.
|
|
599
|
+
*
|
|
600
|
+
* @returns A promise that resolves to the signature.
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```ts
|
|
604
|
+
* const result = await cdp.endUser.signSolanaMessage({
|
|
605
|
+
* userId: "user-123",
|
|
606
|
+
* address: "So1ana...",
|
|
607
|
+
* message: "base64message..."
|
|
608
|
+
* });
|
|
609
|
+
* console.log(result.signature);
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
612
|
+
async signSolanaMessage(options: SignSolanaMessageOptions): Promise<SignSolanaMessageResult> {
|
|
613
|
+
Analytics.trackAction({ action: "end_user_sign_solana_message" });
|
|
614
|
+
|
|
615
|
+
return CdpOpenApiClient.signSolanaMessageWithEndUserAccount(
|
|
616
|
+
this.requireProjectId(),
|
|
617
|
+
options.userId,
|
|
618
|
+
{
|
|
619
|
+
address: options.address,
|
|
620
|
+
message: options.message,
|
|
621
|
+
},
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Signs a Solana transaction on behalf of an end user using a delegation.
|
|
627
|
+
*
|
|
628
|
+
* @param options - The options for signing a Solana transaction.
|
|
629
|
+
*
|
|
630
|
+
* @returns A promise that resolves to the signed transaction.
|
|
631
|
+
*
|
|
632
|
+
* @example
|
|
633
|
+
* ```ts
|
|
634
|
+
* const result = await cdp.endUser.signSolanaTransaction({
|
|
635
|
+
* userId: "user-123",
|
|
636
|
+
* address: "So1ana...",
|
|
637
|
+
* transaction: "base64tx..."
|
|
638
|
+
* });
|
|
639
|
+
* console.log(result.signedTransaction);
|
|
640
|
+
* ```
|
|
641
|
+
*/
|
|
642
|
+
async signSolanaTransaction(
|
|
643
|
+
options: SignSolanaTransactionOptions,
|
|
644
|
+
): Promise<SignSolanaTransactionResult> {
|
|
645
|
+
Analytics.trackAction({ action: "end_user_sign_solana_transaction" });
|
|
646
|
+
|
|
647
|
+
return CdpOpenApiClient.signSolanaTransactionWithEndUserAccount(
|
|
648
|
+
this.requireProjectId(),
|
|
649
|
+
options.userId,
|
|
650
|
+
{
|
|
651
|
+
address: options.address,
|
|
652
|
+
transaction: options.transaction,
|
|
653
|
+
},
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// ─── Delegated Solana Send Methods ───
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Sends a Solana transaction on behalf of an end user using a delegation.
|
|
661
|
+
*
|
|
662
|
+
* @param options - The options for sending a Solana transaction.
|
|
663
|
+
*
|
|
664
|
+
* @returns A promise that resolves to the transaction signature.
|
|
665
|
+
*
|
|
666
|
+
* @example
|
|
667
|
+
* ```ts
|
|
668
|
+
* const result = await cdp.endUser.sendSolanaTransaction({
|
|
669
|
+
* userId: "user-123",
|
|
670
|
+
* address: "So1ana...",
|
|
671
|
+
* transaction: "base64tx...",
|
|
672
|
+
* network: "solana-devnet"
|
|
673
|
+
* });
|
|
674
|
+
* console.log(result.transactionSignature);
|
|
675
|
+
* ```
|
|
676
|
+
*/
|
|
677
|
+
async sendSolanaTransaction(
|
|
678
|
+
options: SendSolanaTransactionOptions,
|
|
679
|
+
): Promise<SendSolanaTransactionResult> {
|
|
680
|
+
Analytics.trackAction({ action: "end_user_send_solana_transaction" });
|
|
681
|
+
|
|
682
|
+
return CdpOpenApiClient.sendSolanaTransactionWithEndUserAccount(
|
|
683
|
+
this.requireProjectId(),
|
|
684
|
+
options.userId,
|
|
685
|
+
{
|
|
686
|
+
address: options.address,
|
|
687
|
+
transaction: options.transaction,
|
|
688
|
+
network: options.network,
|
|
689
|
+
},
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Sends a Solana asset (e.g. USDC) on behalf of an end user using a delegation.
|
|
695
|
+
*
|
|
696
|
+
* @param options - The options for sending a Solana asset.
|
|
697
|
+
*
|
|
698
|
+
* @returns A promise that resolves to the transaction signature.
|
|
699
|
+
*
|
|
700
|
+
* @example
|
|
701
|
+
* ```ts
|
|
702
|
+
* const result = await cdp.endUser.sendSolanaAsset({
|
|
703
|
+
* userId: "user-123",
|
|
704
|
+
* address: "So1ana...",
|
|
705
|
+
* to: "Recipi...",
|
|
706
|
+
* amount: "1000000",
|
|
707
|
+
* network: "solana-devnet"
|
|
708
|
+
* });
|
|
709
|
+
* console.log(result.transactionSignature);
|
|
710
|
+
* ```
|
|
711
|
+
*/
|
|
712
|
+
async sendSolanaAsset(options: SendSolanaAssetOptions): Promise<SendSolanaAssetResult> {
|
|
713
|
+
Analytics.trackAction({ action: "end_user_send_solana_asset" });
|
|
714
|
+
|
|
715
|
+
const asset = options.asset ?? "usdc";
|
|
716
|
+
|
|
717
|
+
return CdpOpenApiClient.sendSolanaAssetWithEndUserAccount(
|
|
718
|
+
this.requireProjectId(),
|
|
719
|
+
options.userId,
|
|
720
|
+
options.address,
|
|
721
|
+
asset,
|
|
722
|
+
{
|
|
723
|
+
to: options.to,
|
|
724
|
+
amount: options.amount,
|
|
725
|
+
network: options.network,
|
|
726
|
+
createRecipientAta: options.createRecipientAta,
|
|
727
|
+
},
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
|
|
238
731
|
/**
|
|
239
732
|
* Validates an end user's access token. Throws an error if the access token is invalid.
|
|
240
733
|
*
|
|
@@ -253,7 +746,7 @@ export class CDPEndUserClient {
|
|
|
253
746
|
accessToken,
|
|
254
747
|
});
|
|
255
748
|
|
|
256
|
-
return toEndUserAccount(CdpOpenApiClient, { endUser });
|
|
749
|
+
return toEndUserAccount(CdpOpenApiClient, { endUser, projectId: this.projectId });
|
|
257
750
|
}
|
|
258
751
|
|
|
259
752
|
/**
|
|
@@ -342,6 +835,22 @@ export class CDPEndUserClient {
|
|
|
342
835
|
keyType: options.keyType,
|
|
343
836
|
});
|
|
344
837
|
|
|
345
|
-
return toEndUserAccount(CdpOpenApiClient, { endUser });
|
|
838
|
+
return toEndUserAccount(CdpOpenApiClient, { endUser, projectId: this.projectId });
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Returns the configured project ID or throws if not configured.
|
|
843
|
+
*
|
|
844
|
+
* @returns The project ID.
|
|
845
|
+
*/
|
|
846
|
+
private requireProjectId(): string {
|
|
847
|
+
if (!this.projectId) {
|
|
848
|
+
throw new UserInputValidationError(
|
|
849
|
+
"Missing required project ID for delegation operation. " +
|
|
850
|
+
"Set the CDP_PROJECT_ID environment variable or pass projectId to the CdpClient constructor.",
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
return this.projectId;
|
|
346
855
|
}
|
|
347
856
|
}
|