@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,243 @@
|
|
|
1
|
+
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* Signs an arbitrary 32 byte hash with the end user's given EVM account.
|
|
4
|
+
* @summary Sign a hash with end user EVM account
|
|
5
|
+
*/
|
|
6
|
+
export const signEvmHashWithEndUserAccount = (projectId, userId, signEvmHashWithEndUserAccountBody, options) => {
|
|
7
|
+
return cdpApiClient({
|
|
8
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign`,
|
|
9
|
+
method: "POST",
|
|
10
|
+
headers: { "Content-Type": "application/json" },
|
|
11
|
+
data: signEvmHashWithEndUserAccountBody,
|
|
12
|
+
}, options);
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Signs a transaction with the given end user EVM account.
|
|
16
|
+
The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
|
|
17
|
+
|
|
18
|
+
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.
|
|
19
|
+
* @summary Sign a transaction with end user EVM account
|
|
20
|
+
*/
|
|
21
|
+
export const signEvmTransactionWithEndUserAccount = (projectId, userId, signEvmTransactionWithEndUserAccountBody, options) => {
|
|
22
|
+
return cdpApiClient({
|
|
23
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign/transaction`,
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers: { "Content-Type": "application/json" },
|
|
26
|
+
data: signEvmTransactionWithEndUserAccountBody,
|
|
27
|
+
}, options);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 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/).
|
|
31
|
+
|
|
32
|
+
The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
**Transaction fields and API behavior**
|
|
36
|
+
|
|
37
|
+
- `to` *(Required)*: The address of the contract or account to send the transaction to.
|
|
38
|
+
- `chainId` *(Ignored)*: The value of the `chainId` field in the transaction is ignored.
|
|
39
|
+
The transaction will be sent to the network indicated by the `network` field in the request body.
|
|
40
|
+
|
|
41
|
+
- `nonce` *(Optional)*: The nonce to use for the transaction. If not provided, the API will assign
|
|
42
|
+
a nonce to the transaction based on the current state of the account.
|
|
43
|
+
|
|
44
|
+
- `maxPriorityFeePerGas` *(Optional)*: The maximum priority fee per gas to use for the transaction.
|
|
45
|
+
If not provided, the API will estimate a value based on current network conditions.
|
|
46
|
+
|
|
47
|
+
- `maxFeePerGas` *(Optional)*: The maximum fee per gas to use for the transaction.
|
|
48
|
+
If not provided, the API will estimate a value based on current network conditions.
|
|
49
|
+
|
|
50
|
+
- `gasLimit` *(Optional)*: The gas limit to use for the transaction. If not provided, the API will estimate a value
|
|
51
|
+
based on the `to` and `data` fields of the transaction.
|
|
52
|
+
|
|
53
|
+
- `value` *(Optional)*: The amount of ETH, in wei, to send with the transaction.
|
|
54
|
+
- `data` *(Optional)*: The data to send with the transaction; only used for contract calls.
|
|
55
|
+
- `accessList` *(Optional)*: The access list to use for the transaction.
|
|
56
|
+
* @summary Send a transaction with end user EVM account
|
|
57
|
+
*/
|
|
58
|
+
export const sendEvmTransactionWithEndUserAccount = (projectId, userId, sendEvmTransactionWithEndUserAccountBody, options) => {
|
|
59
|
+
return cdpApiClient({
|
|
60
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/send/transaction`,
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: { "Content-Type": "application/json" },
|
|
63
|
+
data: sendEvmTransactionWithEndUserAccountBody,
|
|
64
|
+
}, options);
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* 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.
|
|
68
|
+
The `amount` field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50").
|
|
69
|
+
* @summary Send USDC on EVM
|
|
70
|
+
*/
|
|
71
|
+
export const sendEvmAssetWithEndUserAccount = (projectId, userId, address, asset, sendEvmAssetWithEndUserAccountBody, options) => {
|
|
72
|
+
return cdpApiClient({
|
|
73
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/${address}/send/${asset}`,
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: { "Content-Type": "application/json" },
|
|
76
|
+
data: sendEvmAssetWithEndUserAccountBody,
|
|
77
|
+
}, options);
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Signs an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message with the given end user EVM account.
|
|
81
|
+
|
|
82
|
+
Per the specification, the message in the request body is prepended with `0x19 <0x45 (E)> <thereum Signed Message:\n" + len(message)>` before being signed.
|
|
83
|
+
* @summary Sign an EIP-191 message with end user EVM account
|
|
84
|
+
*/
|
|
85
|
+
export const signEvmMessageWithEndUserAccount = (projectId, userId, signEvmMessageWithEndUserAccountBody, options) => {
|
|
86
|
+
return cdpApiClient({
|
|
87
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign/message`,
|
|
88
|
+
method: "POST",
|
|
89
|
+
headers: { "Content-Type": "application/json" },
|
|
90
|
+
data: signEvmMessageWithEndUserAccountBody,
|
|
91
|
+
}, options);
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Signs [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data with the given end user EVM account.
|
|
95
|
+
* @summary Sign EIP-712 typed data with end user EVM account
|
|
96
|
+
*/
|
|
97
|
+
export const signEvmTypedDataWithEndUserAccount = (projectId, userId, signEvmTypedDataWithEndUserAccountBody, options) => {
|
|
98
|
+
return cdpApiClient({
|
|
99
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/sign/typed-data`,
|
|
100
|
+
method: "POST",
|
|
101
|
+
headers: { "Content-Type": "application/json" },
|
|
102
|
+
data: signEvmTypedDataWithEndUserAccountBody,
|
|
103
|
+
}, options);
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* 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.
|
|
107
|
+
* @summary Revoke delegation for end user
|
|
108
|
+
*/
|
|
109
|
+
export const revokeDelegationForEndUser = (projectId, userId, revokeDelegationForEndUserBody, options) => {
|
|
110
|
+
return cdpApiClient({
|
|
111
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/delegation`,
|
|
112
|
+
method: "DELETE",
|
|
113
|
+
headers: { "Content-Type": "application/json" },
|
|
114
|
+
data: revokeDelegationForEndUserBody,
|
|
115
|
+
}, options);
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Creates an EIP-7702 delegation for an end user's EVM EOA account, upgrading it with smart account capabilities.
|
|
119
|
+
|
|
120
|
+
This endpoint:
|
|
121
|
+
- Retrieves delegation artifacts from onchain
|
|
122
|
+
- Signs the EIP-7702 authorization for delegation
|
|
123
|
+
- Assembles and submits a Type 4 transaction
|
|
124
|
+
- Creates an associated smart account object
|
|
125
|
+
|
|
126
|
+
The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.
|
|
127
|
+
* @summary Create EIP-7702 delegation for end user EVM account
|
|
128
|
+
*/
|
|
129
|
+
export const createEvmEip7702DelegationWithEndUserAccount = (projectId, userId, createEvmEip7702DelegationWithEndUserAccountBody, options) => {
|
|
130
|
+
return cdpApiClient({
|
|
131
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/eip7702/delegation`,
|
|
132
|
+
method: "POST",
|
|
133
|
+
headers: { "Content-Type": "application/json" },
|
|
134
|
+
data: createEvmEip7702DelegationWithEndUserAccountBody,
|
|
135
|
+
}, options);
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Prepares, signs, and sends a user operation for an end user's Smart Account.
|
|
139
|
+
* @summary Send a user operation for end user Smart Account
|
|
140
|
+
*/
|
|
141
|
+
export const sendUserOperationWithEndUserAccount = (projectId, userId, address, sendUserOperationWithEndUserAccountBody, options) => {
|
|
142
|
+
return cdpApiClient({
|
|
143
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/smart-accounts/${address}/send`,
|
|
144
|
+
method: "POST",
|
|
145
|
+
headers: { "Content-Type": "application/json" },
|
|
146
|
+
data: sendUserOperationWithEndUserAccountBody,
|
|
147
|
+
}, options);
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Revokes an existing spend permission.
|
|
151
|
+
* @summary Revoke a spend permission
|
|
152
|
+
*/
|
|
153
|
+
export const revokeSpendPermissionWithEndUserAccount = (projectId, userId, address, revokeSpendPermissionRequest, options) => {
|
|
154
|
+
return cdpApiClient({
|
|
155
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/evm/smart-accounts/${address}/spend-permissions/revoke`,
|
|
156
|
+
method: "POST",
|
|
157
|
+
headers: { "Content-Type": "application/json" },
|
|
158
|
+
data: revokeSpendPermissionRequest,
|
|
159
|
+
}, options);
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Signs an arbitrary 32 byte hash with the end user's given Solana account.
|
|
163
|
+
* @summary Sign a hash with end user Solana account
|
|
164
|
+
*/
|
|
165
|
+
export const signSolanaHashWithEndUserAccount = (projectId, userId, signSolanaHashWithEndUserAccountBody, options) => {
|
|
166
|
+
return cdpApiClient({
|
|
167
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/sign`,
|
|
168
|
+
method: "POST",
|
|
169
|
+
headers: { "Content-Type": "application/json" },
|
|
170
|
+
data: signSolanaHashWithEndUserAccountBody,
|
|
171
|
+
}, options);
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Signs an arbitrary Base64 encoded message with the given Solana account.
|
|
175
|
+
**WARNING:** Never sign a message that you didn't generate as it may put your funds at risk.
|
|
176
|
+
* @summary Sign a Base64 encoded message
|
|
177
|
+
*/
|
|
178
|
+
export const signSolanaMessageWithEndUserAccount = (projectId, userId, signSolanaMessageWithEndUserAccountBody, options) => {
|
|
179
|
+
return cdpApiClient({
|
|
180
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/sign/message`,
|
|
181
|
+
method: "POST",
|
|
182
|
+
headers: { "Content-Type": "application/json" },
|
|
183
|
+
data: signSolanaMessageWithEndUserAccountBody,
|
|
184
|
+
}, options);
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Signs a transaction with the given end user Solana account.
|
|
188
|
+
The unsigned transaction should be serialized into a byte array and then encoded as base64.
|
|
189
|
+
**Transaction types**
|
|
190
|
+
The following transaction types are supported:
|
|
191
|
+
* [Legacy transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html)
|
|
192
|
+
* [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html)
|
|
193
|
+
The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
194
|
+
* @summary Sign a transaction with end user Solana account
|
|
195
|
+
*/
|
|
196
|
+
export const signSolanaTransactionWithEndUserAccount = (projectId, userId, signSolanaTransactionWithEndUserAccountBody, options) => {
|
|
197
|
+
return cdpApiClient({
|
|
198
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/sign/transaction`,
|
|
199
|
+
method: "POST",
|
|
200
|
+
headers: { "Content-Type": "application/json" },
|
|
201
|
+
data: signSolanaTransactionWithEndUserAccountBody,
|
|
202
|
+
}, options);
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Signs a transaction with the given end user Solana account and sends it to the indicated supported network.
|
|
206
|
+
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.
|
|
207
|
+
The unsigned transaction should be serialized into a byte array and then encoded as base64.
|
|
208
|
+
**Transaction types**
|
|
209
|
+
The following transaction types are supported:
|
|
210
|
+
* [Legacy transactions](https://solana.com/developers/guides/advanced/versions#current-transaction-versions)
|
|
211
|
+
* [Versioned transactions](https://solana.com/developers/guides/advanced/versions)
|
|
212
|
+
**Instruction Batching**
|
|
213
|
+
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.
|
|
214
|
+
**Network Support**
|
|
215
|
+
The following Solana networks are supported:
|
|
216
|
+
* `solana` - Solana Mainnet
|
|
217
|
+
* `solana-devnet` - Solana Devnet
|
|
218
|
+
The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
|
|
219
|
+
* @summary Send a transaction with end user Solana account
|
|
220
|
+
*/
|
|
221
|
+
export const sendSolanaTransactionWithEndUserAccount = (projectId, userId, sendSolanaTransactionWithEndUserAccountBody, options) => {
|
|
222
|
+
return cdpApiClient({
|
|
223
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/send/transaction`,
|
|
224
|
+
method: "POST",
|
|
225
|
+
headers: { "Content-Type": "application/json" },
|
|
226
|
+
data: sendSolanaTransactionWithEndUserAccountBody,
|
|
227
|
+
}, options);
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* 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.
|
|
231
|
+
The `amount` field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50").
|
|
232
|
+
Use the optional `createRecipientAta` parameter to control whether the sender pays for creating the recipient's Associated Token Account if it doesn't exist.
|
|
233
|
+
* @summary Send USDC on Solana
|
|
234
|
+
*/
|
|
235
|
+
export const sendSolanaAssetWithEndUserAccount = (projectId, userId, address, asset, sendSolanaAssetWithEndUserAccountBody, options) => {
|
|
236
|
+
return cdpApiClient({
|
|
237
|
+
url: `/v2/embedded-wallet-api/projects/${projectId}/end-users/${userId}/solana/${address}/send/${asset}`,
|
|
238
|
+
method: "POST",
|
|
239
|
+
headers: { "Content-Type": "application/json" },
|
|
240
|
+
data: sendSolanaAssetWithEndUserAccountBody,
|
|
241
|
+
}, options);
|
|
242
|
+
};
|
|
243
|
+
//# sourceMappingURL=embedded-wallets-core-functionality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedded-wallets-core-functionality.js","sourceRoot":"","sources":["../../../../openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.ts"],"names":[],"mappings":"AAuCA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,SAAiB,EACjB,MAAc,EACd,iCAAoE,EACpE,OAAgF,EAChF,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,oCAAoC,SAAS,cAAc,MAAM,WAAW;QACjF,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,iCAAiC;KACxC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAClD,SAAiB,EACjB,MAAc,EACd,wCAAkF,EAClF,OAAuF,EACvF,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,oCAAoC,SAAS,cAAc,MAAM,uBAAuB;QAC7F,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,wCAAwC;KAC/C,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAClD,SAAiB,EACjB,MAAc,EACd,wCAAkF,EAClF,OAAuF,EACvF,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,oCAAoC,SAAS,cAAc,MAAM,uBAAuB;QAC7F,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,wCAAwC;KAC/C,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,SAAiB,EACjB,MAA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AAE;QAC/C,IAAI,EAAE,2CAA2C;KAClD,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,SAAiB,EACjB,MAAc,EACd,OAA0B,EAC1B,KAAa,EACb,qCAA4E,EAC5E,OAAoF,EACpF,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,oCAAoC,SAAS,cAAc,MAAM,WAAW,OAAO,SAAS,KAAK,EAAE;QACxG,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,qCAAqC;KAC5C,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"end-user-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/end-user-accounts/end-user-accounts.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,iBAAoC,EACpC,
|
|
1
|
+
{"version":3,"file":"end-user-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/end-user-accounts/end-user-accounts.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,iBAAoC,EACpC,OAAuD,EACvD,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,eAAe;QACpB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,iBAAiB;KACxB,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,MAA2B,EAC3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AE,6BAA6B;KACpC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,MAAc,EACd,2BAAyD,EACzD,OAA0E,EAC1E,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,iBAAiB,MAAM,SAAS;QACrC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,2BAA2B;KAClC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,iBAAoC,EACpC,OAAuD,EACvD,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,sBAAsB;QAC3B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,iBAAiB;KACxB,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -135,6 +135,33 @@ export const signEvmTypedData = (address, eIP712Message, options) => {
|
|
|
135
135
|
data: eIP712Message,
|
|
136
136
|
}, options);
|
|
137
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* Creates an EIP-7702 delegation for an EVM EOA account, upgrading it with smart account capabilities.
|
|
140
|
+
|
|
141
|
+
This endpoint:
|
|
142
|
+
- Retrieves delegation artifacts from onchain
|
|
143
|
+
- Signs the EIP-7702 authorization for delegation
|
|
144
|
+
- Assembles and submits a Type 4 transaction
|
|
145
|
+
- Creates an associated smart account object
|
|
146
|
+
|
|
147
|
+
The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.
|
|
148
|
+
* @summary Create EIP-7702 delegation
|
|
149
|
+
*/
|
|
150
|
+
export const createEvmEip7702Delegation = (address, createEvmEip7702DelegationBody, options) => {
|
|
151
|
+
return cdpApiClient({
|
|
152
|
+
url: `/v2/evm/accounts/${address}/eip7702/delegation`,
|
|
153
|
+
method: "POST",
|
|
154
|
+
headers: { "Content-Type": "application/json" },
|
|
155
|
+
data: createEvmEip7702DelegationBody,
|
|
156
|
+
}, options);
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Returns the EIP-7702 delegation operation. Use the delegationOperationId returned by the Create EIP-7702 delegation endpoint to poll for operation completion.
|
|
160
|
+
* @summary Get EIP-7702 delegation operation for an operationID
|
|
161
|
+
*/
|
|
162
|
+
export const getEvmEip7702DelegationOperationById = (delegationOperationId, options) => {
|
|
163
|
+
return cdpApiClient({ url: `/v2/evm/eip7702/delegation-operations/${delegationOperationId}`, method: "GET" }, options);
|
|
164
|
+
};
|
|
138
165
|
/**
|
|
139
166
|
* Import an existing EVM account into the developer's CDP Project. This API should be called from the [CDP SDK](https://github.com/coinbase/cdp-sdk) to ensure that the associated private key is properly encrypted.
|
|
140
167
|
* @summary Import an EVM account
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-accounts/evm-accounts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evm-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-accounts/evm-accounts.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,MAA8B,EAC9B,OAAkE,EAClE,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAClD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,oBAA2C,EAC3C,OAA0D,EAC1D,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,kB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CACpC,IAAY,EACZ,0BAAsD,EACtD,OAAyE,EACzE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,mCAAmC,IAAI,EAAE;QAC9C,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,0BAA0B;KACjC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -114,12 +114,12 @@ export const listSpendPermissions = (address, params, options) => {
|
|
|
114
114
|
* Revokes an existing spend permission.
|
|
115
115
|
* @summary Revoke a spend permission
|
|
116
116
|
*/
|
|
117
|
-
export const revokeSpendPermission = (address,
|
|
117
|
+
export const revokeSpendPermission = (address, evmSpendPermissionsRevokeSpendPermissionRequest, options) => {
|
|
118
118
|
return cdpApiClient({
|
|
119
119
|
url: `/v2/evm/smart-accounts/${address}/spend-permissions/revoke`,
|
|
120
120
|
method: "POST",
|
|
121
121
|
headers: { "Content-Type": "application/json" },
|
|
122
|
-
data:
|
|
122
|
+
data: evmSpendPermissionsRevokeSpendPermissionRequest,
|
|
123
123
|
}, options);
|
|
124
124
|
};
|
|
125
125
|
//# sourceMappingURL=evm-smart-accounts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm-smart-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,MAAmC,EACnC,
|
|
1
|
+
{"version":3,"file":"evm-smart-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CA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B,GAAG,CACnC,OAAe,EACf,4BAA0D,EAC1D,OAAgE,EAChE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,0BAA0B,OAAO,oBAAoB;QAC1D,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,4BAA4B;KACnC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAe,EACf,MAAmC,EACnC,OAAuE,EACvE,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,0BAA0B,OAAO,yBAAyB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAC1F,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAAe,EACf,+CAAgG,EAChG,OAAgE,EAChE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,0BAA0B,OAAO,2BAA2B;QACjE,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,+CAA+C;KACtD,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm-swaps.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-swaps/evm-swaps.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,MAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"evm-swaps.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-swaps/evm-swaps.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,MAA6B,EAC7B,OAA2E,EAC3E,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EACrD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,sBAA8C,EAC9C,OAA8E,EAC9E,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,eAAe;QACpB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,sBAAsB;KAC7B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm-token-balances.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-token-balances/evm-token-balances.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAoC,EACpC,OAAe,EACf,MAAmC,EACnC,
|
|
1
|
+
{"version":3,"file":"evm-token-balances.js","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-token-balances/evm-token-balances.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAoC,EACpC,OAAe,EACf,MAAmC,EACnC,OAAuE,EACvE,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,0BAA0B,OAAO,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAC9E,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -28,16 +28,17 @@ export const requestEvmFaucet = (requestEvmFaucetBody, options) => {
|
|
|
28
28
|
/**
|
|
29
29
|
* Request funds from the CDP Faucet on Solana devnet.
|
|
30
30
|
|
|
31
|
-
Faucets are available for SOL.
|
|
31
|
+
Faucets are available for SOL, USDC, and CBTUSD.
|
|
32
32
|
|
|
33
33
|
To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
34
34
|
These limits are applied at both the CDP Project level and the blockchain address level.
|
|
35
35
|
A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
|
|
36
36
|
|
|
37
|
-
| Token
|
|
38
|
-
|
|
39
|
-
| SOL
|
|
40
|
-
| USDC
|
|
37
|
+
| Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
|
|
38
|
+
|:-----: |:-------------------------:|:--------------------------------:|
|
|
39
|
+
| SOL | 0.00125 SOL | 0.0125 SOL |
|
|
40
|
+
| USDC | 1 USDC | 10 USDC |
|
|
41
|
+
| CBTUSD | 1 CBTUSD | 10 CBTUSD |
|
|
41
42
|
|
|
42
43
|
* @summary Request funds on Solana devnet
|
|
43
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faucets.js","sourceRoot":"","sources":["../../../../openapi-client/generated/faucets/faucets.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,oBAA0C,EAC1C,
|
|
1
|
+
{"version":3,"file":"faucets.js","sourceRoot":"","sources":["../../../../openapi-client/generated/faucets/faucets.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,oBAA0C,EAC1C,OAAmE,EACnE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,gBAAgB;QACrB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,oBAAoB;KAC3B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,uBAAgD,EAChD,OAAsE,EACtE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,mBAAmB;QACxB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,uBAAuB;KAC9B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onchain-data.js","sourceRoot":"","sources":["../../../../openapi-client/generated/onchain-data/onchain-data.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAgC,EAChC,OAAe,EACf,
|
|
1
|
+
{"version":3,"file":"onchain-data.js","sourceRoot":"","sources":["../../../../openapi-client/generated/onchain-data/onchain-data.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAgC,EAChC,OAAe,EACf,OAA6E,EAC7E,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,OAAO,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5E,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAAoC,EACpC,OAAe,EACf,MAAoC,EACpC,OAAwE,EACxE,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,+BAA+B,OAAO,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EACnF,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -51,4 +51,17 @@ export const createOnrampSession = (createOnrampSessionBody, options) => {
|
|
|
51
51
|
data: createOnrampSessionBody,
|
|
52
52
|
}, options);
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Returns the transaction limits for an onramp user based on their payment method and user identifier. Use this API to show users their remaining purchase capacity before initiating an onramp transaction.
|
|
56
|
+
Currently supports `GUEST_CHECKOUT_APPLE_PAY` payment method with phone number identification. The phone number must have been previously verified via OTP.
|
|
57
|
+
* @summary Get onramp user limits
|
|
58
|
+
*/
|
|
59
|
+
export const getOnrampUserLimits = (getOnrampUserLimitsBody, options) => {
|
|
60
|
+
return cdpApiClient({
|
|
61
|
+
url: `/v2/onramp/limits`,
|
|
62
|
+
method: "POST",
|
|
63
|
+
headers: { "Content-Type": "application/json" },
|
|
64
|
+
data: getOnrampUserLimitsBody,
|
|
65
|
+
}, options);
|
|
66
|
+
};
|
|
54
67
|
//# sourceMappingURL=onramp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onramp.js","sourceRoot":"","sources":["../../../../openapi-client/generated/onramp/onramp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onramp.js","sourceRoot":"","sources":["../../../../openapi-client/generated/onramp/onramp.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,qBAA4C,EAC5C,OAAoE,EACpE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,mBAAmB;QACxB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,qBAAqB;KAC5B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAe,EACf,OAAqE,EACrE,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,qBAAqB,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EACtD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,uBAAgD,EAChD,OAAsE,EACtE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,qBAAqB;QAC1B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,uBAAuB;KAC9B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,uBAAgD,EAChD,OAAsE,EACtE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,mBAAmB;QACxB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,uBAAuB;KAC9B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy-engine.js","sourceRoot":"","sources":["../../../../openapi-client/generated/policy-engine/policy-engine.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,MAA2B,EAC3B,
|
|
1
|
+
{"version":3,"file":"policy-engine.js","sourceRoot":"","sources":["../../../../openapi-client/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ACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,gBAAgB;KACvB,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/solana-accounts/solana-accounts.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,MAAiC,EACjC,
|
|
1
|
+
{"version":3,"file":"solana-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/solana-accounts/solana-accounts.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,MAAiC,EACjC,OAAqE,EACrE,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EACrD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,uBAAiD,EACjD,OAA6D,EAC7D,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,qBAAqB;QAC1B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,uBAAuB;KAC9B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,OAAe,EACf,OAA6D,EAC7D,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,uBAAuB,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EACxD,O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3,"file":"solana-token-balances.js","sourceRoot":"","sources":["../../../../openapi-client/generated/solana-token-balances/solana-token-balances.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,OAAuC,EACvC,OAAe,EACf,MAAsC,EACtC,
|
|
1
|
+
{"version":3,"file":"solana-token-balances.js","sourceRoot":"","sources":["../../../../openapi-client/generated/solana-token-balances/solana-token-balances.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,OAAuC,EACvC,OAAe,EACf,MAAsC,EACtC,OAA0E,EAC1E,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,6BAA6B,OAAO,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EACjF,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* Run a read-only SQL query against indexed blockchain data including transactions, events, and decoded logs.
|
|
4
|
+
|
|
5
|
+
This endpoint provides direct SQL access to comprehensive blockchain data across supported networks.
|
|
6
|
+
|
|
7
|
+
Queries are executed against optimized data structures for high-performance analytics.
|
|
8
|
+
|
|
9
|
+
### Allowed Queries
|
|
10
|
+
|
|
11
|
+
- Standard SQL syntax (CoinbaSeQL dialect, based on ClickHouse dialect)
|
|
12
|
+
- Read-only queries (SELECT statements)
|
|
13
|
+
- No DDL or DML operations
|
|
14
|
+
- Query that follow limits (defined below)
|
|
15
|
+
|
|
16
|
+
### Supported Tables
|
|
17
|
+
|
|
18
|
+
- `<network>.events` - Base mainnet decoded event logs with parameters, event signature, topics, and more.
|
|
19
|
+
- `<network>.transactions` - Base mainnet transaction data including hash, block number, gas usage.
|
|
20
|
+
- `<network>.blocks` - Base mainnet block information.
|
|
21
|
+
- `<network>.encoded_logs` - Encoded log data of event logs that aren't able to be decoded by our event decoder (ex: log0 opcode).
|
|
22
|
+
- `<network>.decoded_user_operations` - Decoded user operations data including hash, block number, gas usage, builder codes, entrypoint version, and more.
|
|
23
|
+
- `<network>.transaction_attributions` - Information about the attributions of a transaction to a builder and associated builder codes.
|
|
24
|
+
|
|
25
|
+
### Supported Networks
|
|
26
|
+
|
|
27
|
+
- Base Mainnet: `base`
|
|
28
|
+
- Base Sepolia: `base_sepolia`
|
|
29
|
+
|
|
30
|
+
So for example, valid tables are: `base.events`, `base_sepolia.events`, `base.transactions`, etc.
|
|
31
|
+
|
|
32
|
+
### Query Limits
|
|
33
|
+
|
|
34
|
+
- Maximum result set: 50,000 rows
|
|
35
|
+
- Maximum query length: 10,000 characters
|
|
36
|
+
- Maximum on-disk data to read: 100GB
|
|
37
|
+
- Maximum memory usage: 15GB
|
|
38
|
+
- Query timeout: 30 seconds
|
|
39
|
+
- Maximum JOINs: 12
|
|
40
|
+
|
|
41
|
+
### Query Caching
|
|
42
|
+
|
|
43
|
+
By default, each query result is returned from cache so long as the result is from an identical query and less than 750ms old. This freshness tolerance can be modified upwards, to a maximum of 900000ms (i.e. 900s, 15m).
|
|
44
|
+
This can be helpful for users who wish to reduce expensive calls to the SQL API by reusing cached results.
|
|
45
|
+
|
|
46
|
+
* @summary Run SQL Query
|
|
47
|
+
*/
|
|
48
|
+
export const runSQLQuery = (onchainDataQuery, options) => {
|
|
49
|
+
return cdpApiClient({
|
|
50
|
+
url: `/v2/data/query/run`,
|
|
51
|
+
method: "POST",
|
|
52
|
+
headers: { "Content-Type": "application/json" },
|
|
53
|
+
data: onchainDataQuery,
|
|
54
|
+
}, options);
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Retrieve the SQL grammar for the SQL API.
|
|
58
|
+
|
|
59
|
+
The SQL queries that are supported by the SQL API are defined in ANTLR4 grammar which is evaluated by server before executing the query. This ensures the safety and soundness of the SQL query before execution.
|
|
60
|
+
|
|
61
|
+
This endpoint returns the ANTLR4 grammar that is used to evaluate the SQL queries so that developers can understand the SQL API and build SQL queries with high confidence and correctness.
|
|
62
|
+
|
|
63
|
+
LLMs interact well with ANTLR4 grammar. You can feed the grammar directly into the LLMs to help generate SQL queries.
|
|
64
|
+
|
|
65
|
+
* @summary Get SQL grammar
|
|
66
|
+
*/
|
|
67
|
+
export const getSQLGrammar = (options) => {
|
|
68
|
+
return cdpApiClient({ url: `/v2/data/query/grammar`, method: "GET" }, options);
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=sql-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-api.js","sourceRoot":"","sources":["../../../../openapi-client/generated/sql-api/sql-api.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,gBAAkC,EAClC,OAAiE,EACjE,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,oBAAoB;QACzB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,gBAAgB;KACvB,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAsD,EAAE,EAAE;IACtF,OAAO,YAAY,CAAS,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;AACzF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../openapi-client/generated/webhooks/webhooks.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,MAAuC,EACvC,
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../openapi-client/generated/webhooks/webhooks.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,MAAuC,EACvC,OAA+E,EAC/E,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,iCAAiC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EACjE,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,0BAAsD,EACtD,OAA2E,EAC3E,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,iCAAiC;QACtC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,0BAA0B;KACjC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,cAAsB,EACtB,OAA2E,EAC3E,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,mCAAmC,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC3E,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,cAAsB,EACtB,gCAAkE,EAClE,OAA2E,EAC3E,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,mCAAmC,cAAc,EAAE;QACxD,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,gCAAgC;KACvC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,cAAsB,EACtB,OAAoD,EACpD,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,mCAAmC,cAAc,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAC9E,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x402-facilitator.js","sourceRoot":"","sources":["../../../../openapi-client/generated/x402-facilitator/x402-facilitator.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,qBAA4C,EAC5C,
|
|
1
|
+
{"version":3,"file":"x402-facilitator.js","sourceRoot":"","sources":["../../../../openapi-client/generated/x402-facilitator/x402-facilitator.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,qBAA4C,EAC5C,OAA0E,EAC1E,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,iBAAiB;QACtB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,qBAAqB;KAC5B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,qBAA4C,EAC5C,OAA0E,EAC1E,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,iBAAiB;QACtB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,qBAAqB;KAC5B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,OAAyF,EACzF,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5C,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -10,9 +10,10 @@ export * from "./generated/policy-engine/policy-engine.js";
|
|
|
10
10
|
export * from "./generated/onramp/onramp.js";
|
|
11
11
|
export * from "./generated/onchain-data/onchain-data.js";
|
|
12
12
|
export * from "./generated/end-user-accounts/end-user-accounts.js";
|
|
13
|
+
export * from "./generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js";
|
|
13
14
|
export * from "./generated/x402-facilitator/x402-facilitator.js";
|
|
14
|
-
export * from "./generated/sql-api-alpha/sql-api-alpha.js";
|
|
15
15
|
import { configure } from "./cdpApiClient.js";
|
|
16
|
+
import * as embeddedWallets from "./generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js";
|
|
16
17
|
import * as endUserAccounts from "./generated/end-user-accounts/end-user-accounts.js";
|
|
17
18
|
import * as evm from "./generated/evm-accounts/evm-accounts.js";
|
|
18
19
|
import * as evmSmartAccounts from "./generated/evm-smart-accounts/evm-smart-accounts.js";
|
|
@@ -36,6 +37,7 @@ export const CdpOpenApiClient = {
|
|
|
36
37
|
...onchainData,
|
|
37
38
|
...policies,
|
|
38
39
|
...endUserAccounts,
|
|
40
|
+
...embeddedWallets,
|
|
39
41
|
configure,
|
|
40
42
|
};
|
|
41
43
|
export const OpenApiEvmMethods = {
|
|
@@ -52,4 +54,5 @@ export const OpenApiSolanaMethods = {
|
|
|
52
54
|
export const OpenApiPoliciesMethods = {
|
|
53
55
|
...policies,
|
|
54
56
|
};
|
|
57
|
+
export * from "./generated/sql-api/sql-api.js";
|
|
55
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../openapi-client/index.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC;AACrE,cAAc,0CAA0C,CAAC;AACzD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oCAAoC,CAAC;AACnD,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4DAA4D,CAAC;AAC3E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../openapi-client/index.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC;AACrE,cAAc,0CAA0C,CAAC;AACzD,cAAc,sDAAsD,CAAC;AACrE,cAAc,oCAAoC,CAAC;AACnD,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4DAA4D,CAAC;AAC3E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,wFAAwF,CAAC;AACvG,cAAc,kDAAkD,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,eAAe,MAAM,wFAAwF,CAAC;AAC1H,OAAO,KAAK,eAAe,MAAM,oDAAoD,CAAC;AACtF,OAAO,KAAK,GAAG,MAAM,0CAA0C,CAAC;AAChE,O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