@coinbase/cdp-sdk 1.45.0 → 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 +14 -2
- package/README.md +47 -43
- package/_cjs/accounts/evm/eip6492.js +49 -0
- package/_cjs/accounts/evm/eip6492.js.map +1 -0
- package/_cjs/accounts/evm/toEvmSmartAccount.js +6 -2
- 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/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/auth/utils/http.js +1 -0
- package/_cjs/auth/utils/http.js.map +1 -1
- package/_cjs/client/cdp.js +4 -1
- 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/solana/solana.js +39 -13
- package/_cjs/client/solana/solana.js.map +1 -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 +52 -15
- 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.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.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/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/toEvmSmartAccount.js +6 -2
- 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/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/auth/utils/http.js +1 -0
- package/_esm/auth/utils/http.js.map +1 -1
- package/_esm/client/cdp.js +4 -1
- 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/solana/solana.js +39 -13
- package/_esm/client/solana/solana.js.map +1 -1
- 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 +49 -12
- 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.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.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/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/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/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/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.types.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 +1 -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 +487 -119
- 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 +16 -16
- 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 +5 -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 +19 -3
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +26 -78
- package/_types/policies/evmSchema.d.ts.map +1 -1
- 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/toEvmSmartAccount.ts +17 -4
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +44 -5
- package/accounts/evm/types.ts +8 -3
- package/actions/solana/transfer.ts +3 -3
- package/actions/solana/types.ts +79 -29
- package/actions/solana/utils.ts +13 -11
- package/auth/utils/http.ts +1 -0
- package/client/cdp.ts +6 -1
- 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.types.ts +4 -2
- package/client/solana/solana.ts +39 -13
- package/index.ts +31 -1
- package/openapi-client/cdpApiClient.ts +34 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +566 -152
- 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 +19 -16
- 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 +5 -5
- 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/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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
CreateEvmSmartAccountBody,
|
|
10
10
|
CreateSpendPermissionRequest,
|
|
11
11
|
EvmSmartAccount,
|
|
12
|
+
EvmSpendPermissionsRevokeSpendPermissionRequest,
|
|
12
13
|
EvmUserOperation,
|
|
13
14
|
ListEvmSmartAccounts200,
|
|
14
15
|
ListEvmSmartAccountsParams,
|
|
@@ -16,7 +17,6 @@ import type {
|
|
|
16
17
|
ListSpendPermissionsParams,
|
|
17
18
|
PrepareAndSendUserOperationBody,
|
|
18
19
|
PrepareUserOperationBody,
|
|
19
|
-
RevokeSpendPermissionRequest,
|
|
20
20
|
SendUserOperationBody,
|
|
21
21
|
UpdateEvmSmartAccountBody,
|
|
22
22
|
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
@@ -32,7 +32,7 @@ The response is paginated, and by default, returns 20 accounts per page.
|
|
|
32
32
|
*/
|
|
33
33
|
export const listEvmSmartAccounts = (
|
|
34
34
|
params?: ListEvmSmartAccountsParams,
|
|
35
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
35
|
+
options?: SecondParameter<typeof cdpApiClient<ListEvmSmartAccounts200>>,
|
|
36
36
|
) => {
|
|
37
37
|
return cdpApiClient<ListEvmSmartAccounts200>(
|
|
38
38
|
{ url: `/v2/evm/smart-accounts`, method: "GET", params },
|
|
@@ -45,7 +45,7 @@ export const listEvmSmartAccounts = (
|
|
|
45
45
|
*/
|
|
46
46
|
export const createEvmSmartAccount = (
|
|
47
47
|
createEvmSmartAccountBody: CreateEvmSmartAccountBody,
|
|
48
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
48
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
49
49
|
) => {
|
|
50
50
|
return cdpApiClient<EvmSmartAccount>(
|
|
51
51
|
{
|
|
@@ -63,7 +63,7 @@ export const createEvmSmartAccount = (
|
|
|
63
63
|
*/
|
|
64
64
|
export const getEvmSmartAccountByName = (
|
|
65
65
|
name: string,
|
|
66
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
66
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
67
67
|
) => {
|
|
68
68
|
return cdpApiClient<EvmSmartAccount>(
|
|
69
69
|
{ url: `/v2/evm/smart-accounts/by-name/${name}`, method: "GET" },
|
|
@@ -76,7 +76,7 @@ export const getEvmSmartAccountByName = (
|
|
|
76
76
|
*/
|
|
77
77
|
export const getEvmSmartAccount = (
|
|
78
78
|
address: string,
|
|
79
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
79
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
80
80
|
) => {
|
|
81
81
|
return cdpApiClient<EvmSmartAccount>(
|
|
82
82
|
{ url: `/v2/evm/smart-accounts/${address}`, method: "GET" },
|
|
@@ -90,7 +90,7 @@ export const getEvmSmartAccount = (
|
|
|
90
90
|
export const updateEvmSmartAccount = (
|
|
91
91
|
address: string,
|
|
92
92
|
updateEvmSmartAccountBody: UpdateEvmSmartAccountBody,
|
|
93
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
93
|
+
options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
|
|
94
94
|
) => {
|
|
95
95
|
return cdpApiClient<EvmSmartAccount>(
|
|
96
96
|
{
|
|
@@ -109,7 +109,7 @@ export const updateEvmSmartAccount = (
|
|
|
109
109
|
export const prepareUserOperation = (
|
|
110
110
|
address: string,
|
|
111
111
|
prepareUserOperationBody: PrepareUserOperationBody,
|
|
112
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
112
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
113
113
|
) => {
|
|
114
114
|
return cdpApiClient<EvmUserOperation>(
|
|
115
115
|
{
|
|
@@ -128,7 +128,7 @@ export const prepareUserOperation = (
|
|
|
128
128
|
export const prepareAndSendUserOperation = (
|
|
129
129
|
address: string,
|
|
130
130
|
prepareAndSendUserOperationBody: PrepareAndSendUserOperationBody,
|
|
131
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
131
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
132
132
|
) => {
|
|
133
133
|
return cdpApiClient<EvmUserOperation>(
|
|
134
134
|
{
|
|
@@ -147,7 +147,7 @@ export const prepareAndSendUserOperation = (
|
|
|
147
147
|
export const getUserOperation = (
|
|
148
148
|
address: string,
|
|
149
149
|
userOpHash: string,
|
|
150
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
150
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
151
151
|
) => {
|
|
152
152
|
return cdpApiClient<EvmUserOperation>(
|
|
153
153
|
{ url: `/v2/evm/smart-accounts/${address}/user-operations/${userOpHash}`, method: "GET" },
|
|
@@ -165,7 +165,7 @@ export const sendUserOperation = (
|
|
|
165
165
|
address: string,
|
|
166
166
|
userOpHash: string,
|
|
167
167
|
sendUserOperationBody: SendUserOperationBody,
|
|
168
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
168
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
169
169
|
) => {
|
|
170
170
|
return cdpApiClient<EvmUserOperation>(
|
|
171
171
|
{
|
|
@@ -184,7 +184,7 @@ export const sendUserOperation = (
|
|
|
184
184
|
export const createSpendPermission = (
|
|
185
185
|
address: string,
|
|
186
186
|
createSpendPermissionRequest: CreateSpendPermissionRequest,
|
|
187
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
187
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
188
188
|
) => {
|
|
189
189
|
return cdpApiClient<EvmUserOperation>(
|
|
190
190
|
{
|
|
@@ -203,7 +203,7 @@ export const createSpendPermission = (
|
|
|
203
203
|
export const listSpendPermissions = (
|
|
204
204
|
address: string,
|
|
205
205
|
params?: ListSpendPermissionsParams,
|
|
206
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
206
|
+
options?: SecondParameter<typeof cdpApiClient<ListSpendPermissions200>>,
|
|
207
207
|
) => {
|
|
208
208
|
return cdpApiClient<ListSpendPermissions200>(
|
|
209
209
|
{ url: `/v2/evm/smart-accounts/${address}/spend-permissions/list`, method: "GET", params },
|
|
@@ -216,15 +216,15 @@ export const listSpendPermissions = (
|
|
|
216
216
|
*/
|
|
217
217
|
export const revokeSpendPermission = (
|
|
218
218
|
address: string,
|
|
219
|
-
|
|
220
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
219
|
+
evmSpendPermissionsRevokeSpendPermissionRequest: EvmSpendPermissionsRevokeSpendPermissionRequest,
|
|
220
|
+
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
221
221
|
) => {
|
|
222
222
|
return cdpApiClient<EvmUserOperation>(
|
|
223
223
|
{
|
|
224
224
|
url: `/v2/evm/smart-accounts/${address}/spend-permissions/revoke`,
|
|
225
225
|
method: "POST",
|
|
226
226
|
headers: { "Content-Type": "application/json" },
|
|
227
|
-
data:
|
|
227
|
+
data: evmSpendPermissionsRevokeSpendPermissionRequest,
|
|
228
228
|
},
|
|
229
229
|
options,
|
|
230
230
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -22,7 +22,7 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
|
22
22
|
*/
|
|
23
23
|
export const getEvmSwapPrice = (
|
|
24
24
|
params: GetEvmSwapPriceParams,
|
|
25
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
25
|
+
options?: SecondParameter<typeof cdpApiClient<GetSwapPriceResponseWrapper>>,
|
|
26
26
|
) => {
|
|
27
27
|
return cdpApiClient<GetSwapPriceResponseWrapper>(
|
|
28
28
|
{ url: `/v2/evm/swaps/quote`, method: "GET", params },
|
|
@@ -35,7 +35,7 @@ export const getEvmSwapPrice = (
|
|
|
35
35
|
*/
|
|
36
36
|
export const createEvmSwapQuote = (
|
|
37
37
|
createEvmSwapQuoteBody: CreateEvmSwapQuoteBody,
|
|
38
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
38
|
+
options?: SecondParameter<typeof cdpApiClient<CreateSwapQuoteResponseWrapper>>,
|
|
39
39
|
) => {
|
|
40
40
|
return cdpApiClient<CreateSwapQuoteResponseWrapper>(
|
|
41
41
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -24,7 +24,7 @@ export const listEvmTokenBalances = (
|
|
|
24
24
|
network: ListEvmTokenBalancesNetwork,
|
|
25
25
|
address: string,
|
|
26
26
|
params?: ListEvmTokenBalancesParams,
|
|
27
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
27
|
+
options?: SecondParameter<typeof cdpApiClient<ListEvmTokenBalances200>>,
|
|
28
28
|
) => {
|
|
29
29
|
return cdpApiClient<ListEvmTokenBalances200>(
|
|
30
30
|
{ url: `/v2/evm/token-balances/${network}/${address}`, method: "GET", params },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -36,7 +36,7 @@ A single blockchain address cannot exceed the specified limits, even if multiple
|
|
|
36
36
|
*/
|
|
37
37
|
export const requestEvmFaucet = (
|
|
38
38
|
requestEvmFaucetBody: RequestEvmFaucetBody,
|
|
39
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
39
|
+
options?: SecondParameter<typeof cdpApiClient<RequestEvmFaucet200>>,
|
|
40
40
|
) => {
|
|
41
41
|
return cdpApiClient<RequestEvmFaucet200>(
|
|
42
42
|
{
|
|
@@ -51,22 +51,23 @@ export const requestEvmFaucet = (
|
|
|
51
51
|
/**
|
|
52
52
|
* Request funds from the CDP Faucet on Solana devnet.
|
|
53
53
|
|
|
54
|
-
Faucets are available for SOL.
|
|
54
|
+
Faucets are available for SOL, USDC, and CBTUSD.
|
|
55
55
|
|
|
56
56
|
To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
|
|
57
57
|
These limits are applied at both the CDP Project level and the blockchain address level.
|
|
58
58
|
A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
|
|
59
59
|
|
|
60
|
-
| Token
|
|
61
|
-
|
|
62
|
-
| SOL
|
|
63
|
-
| USDC
|
|
60
|
+
| Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
|
|
61
|
+
|:-----: |:-------------------------:|:--------------------------------:|
|
|
62
|
+
| SOL | 0.00125 SOL | 0.0125 SOL |
|
|
63
|
+
| USDC | 1 USDC | 10 USDC |
|
|
64
|
+
| CBTUSD | 1 CBTUSD | 10 CBTUSD |
|
|
64
65
|
|
|
65
66
|
* @summary Request funds on Solana devnet
|
|
66
67
|
*/
|
|
67
68
|
export const requestSolanaFaucet = (
|
|
68
69
|
requestSolanaFaucetBody: RequestSolanaFaucetBody,
|
|
69
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
70
|
+
options?: SecondParameter<typeof cdpApiClient<RequestSolanaFaucet200>>,
|
|
70
71
|
) => {
|
|
71
72
|
return cdpApiClient<RequestSolanaFaucet200>(
|
|
72
73
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -25,7 +25,7 @@ Analyzes transaction history to discover token interactions.
|
|
|
25
25
|
export const listTokensForAccount = (
|
|
26
26
|
network: "base" | "base-sepolia",
|
|
27
27
|
address: string,
|
|
28
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
28
|
+
options?: SecondParameter<typeof cdpApiClient<AccountTokenAddressesResponse>>,
|
|
29
29
|
) => {
|
|
30
30
|
return cdpApiClient<AccountTokenAddressesResponse>(
|
|
31
31
|
{ url: `/v2/data/evm/token-ownership/${network}/${address}`, method: "GET" },
|
|
@@ -42,7 +42,7 @@ export const listDataTokenBalances = (
|
|
|
42
42
|
network: ListEvmTokenBalancesNetwork,
|
|
43
43
|
address: string,
|
|
44
44
|
params?: ListDataTokenBalancesParams,
|
|
45
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
45
|
+
options?: SecondParameter<typeof cdpApiClient<ListDataTokenBalances200>>,
|
|
46
46
|
) => {
|
|
47
47
|
return cdpApiClient<ListDataTokenBalances200>(
|
|
48
48
|
{ url: `/v2/data/evm/token-balances/${network}/${address}`, method: "GET", params },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -29,7 +29,7 @@ For detailed integration instructions and to get access to this API, refer to th
|
|
|
29
29
|
*/
|
|
30
30
|
export const createOnrampOrder = (
|
|
31
31
|
createOnrampOrderBody: CreateOnrampOrderBody,
|
|
32
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
32
|
+
options?: SecondParameter<typeof cdpApiClient<CreateOnrampOrder201>>,
|
|
33
33
|
) => {
|
|
34
34
|
return cdpApiClient<CreateOnrampOrder201>(
|
|
35
35
|
{
|
|
@@ -47,7 +47,7 @@ export const createOnrampOrder = (
|
|
|
47
47
|
*/
|
|
48
48
|
export const getOnrampOrderById = (
|
|
49
49
|
orderId: string,
|
|
50
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
50
|
+
options?: SecondParameter<typeof cdpApiClient<GetOnrampOrderById200>>,
|
|
51
51
|
) => {
|
|
52
52
|
return cdpApiClient<GetOnrampOrderById200>(
|
|
53
53
|
{ url: `/v2/onramp/orders/${orderId}`, method: "GET" },
|
|
@@ -77,7 +77,7 @@ export const getOnrampOrderById = (
|
|
|
77
77
|
*/
|
|
78
78
|
export const createOnrampSession = (
|
|
79
79
|
createOnrampSessionBody: CreateOnrampSessionBody,
|
|
80
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
80
|
+
options?: SecondParameter<typeof cdpApiClient<CreateOnrampSession201>>,
|
|
81
81
|
) => {
|
|
82
82
|
return cdpApiClient<CreateOnrampSession201>(
|
|
83
83
|
{
|
|
@@ -96,7 +96,7 @@ Currently supports `GUEST_CHECKOUT_APPLE_PAY` payment method with phone number i
|
|
|
96
96
|
*/
|
|
97
97
|
export const getOnrampUserLimits = (
|
|
98
98
|
getOnrampUserLimitsBody: GetOnrampUserLimitsBody,
|
|
99
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
99
|
+
options?: SecondParameter<typeof cdpApiClient<GetOnrampUserLimits200>>,
|
|
100
100
|
) => {
|
|
101
101
|
return cdpApiClient<GetOnrampUserLimits200>(
|
|
102
102
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -24,7 +24,7 @@ The response is paginated, and by default, returns 20 policies per page.
|
|
|
24
24
|
*/
|
|
25
25
|
export const listPolicies = (
|
|
26
26
|
params?: ListPoliciesParams,
|
|
27
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
27
|
+
options?: SecondParameter<typeof cdpApiClient<ListPolicies200>>,
|
|
28
28
|
) => {
|
|
29
29
|
return cdpApiClient<ListPolicies200>(
|
|
30
30
|
{ url: `/v2/policy-engine/policies`, method: "GET", params },
|
|
@@ -37,7 +37,7 @@ export const listPolicies = (
|
|
|
37
37
|
*/
|
|
38
38
|
export const createPolicy = (
|
|
39
39
|
createPolicyBody: CreatePolicyBody,
|
|
40
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
40
|
+
options?: SecondParameter<typeof cdpApiClient<Policy>>,
|
|
41
41
|
) => {
|
|
42
42
|
return cdpApiClient<Policy>(
|
|
43
43
|
{
|
|
@@ -53,7 +53,10 @@ export const createPolicy = (
|
|
|
53
53
|
* Get a policy by its ID.
|
|
54
54
|
* @summary Get a policy by ID
|
|
55
55
|
*/
|
|
56
|
-
export const getPolicyById = (
|
|
56
|
+
export const getPolicyById = (
|
|
57
|
+
policyId: string,
|
|
58
|
+
options?: SecondParameter<typeof cdpApiClient<Policy>>,
|
|
59
|
+
) => {
|
|
57
60
|
return cdpApiClient<Policy>(
|
|
58
61
|
{ url: `/v2/policy-engine/policies/${policyId}`, method: "GET" },
|
|
59
62
|
options,
|
|
@@ -63,7 +66,10 @@ export const getPolicyById = (policyId: string, options?: SecondParameter<typeof
|
|
|
63
66
|
* Delete a policy by its ID. This will have the effect of removing the policy from all accounts that are currently using it.
|
|
64
67
|
* @summary Delete a policy
|
|
65
68
|
*/
|
|
66
|
-
export const deletePolicy = (
|
|
69
|
+
export const deletePolicy = (
|
|
70
|
+
policyId: string,
|
|
71
|
+
options?: SecondParameter<typeof cdpApiClient<void>>,
|
|
72
|
+
) => {
|
|
67
73
|
return cdpApiClient<void>(
|
|
68
74
|
{ url: `/v2/policy-engine/policies/${policyId}`, method: "DELETE" },
|
|
69
75
|
options,
|
|
@@ -76,7 +82,7 @@ export const deletePolicy = (policyId: string, options?: SecondParameter<typeof
|
|
|
76
82
|
export const updatePolicy = (
|
|
77
83
|
policyId: string,
|
|
78
84
|
updatePolicyBody: UpdatePolicyBody,
|
|
79
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
85
|
+
options?: SecondParameter<typeof cdpApiClient<Policy>>,
|
|
80
86
|
) => {
|
|
81
87
|
return cdpApiClient<Policy>(
|
|
82
88
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -37,7 +37,7 @@ If a name is provided, the response will contain only the account with that name
|
|
|
37
37
|
*/
|
|
38
38
|
export const listSolanaAccounts = (
|
|
39
39
|
params?: ListSolanaAccountsParams,
|
|
40
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
40
|
+
options?: SecondParameter<typeof cdpApiClient<ListSolanaAccounts200>>,
|
|
41
41
|
) => {
|
|
42
42
|
return cdpApiClient<ListSolanaAccounts200>(
|
|
43
43
|
{ url: `/v2/solana/accounts`, method: "GET", params },
|
|
@@ -50,7 +50,7 @@ export const listSolanaAccounts = (
|
|
|
50
50
|
*/
|
|
51
51
|
export const createSolanaAccount = (
|
|
52
52
|
createSolanaAccountBody?: CreateSolanaAccountBody,
|
|
53
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
53
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
54
54
|
) => {
|
|
55
55
|
return cdpApiClient<SolanaAccount>(
|
|
56
56
|
{
|
|
@@ -68,7 +68,7 @@ export const createSolanaAccount = (
|
|
|
68
68
|
*/
|
|
69
69
|
export const getSolanaAccount = (
|
|
70
70
|
address: string,
|
|
71
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
71
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
72
72
|
) => {
|
|
73
73
|
return cdpApiClient<SolanaAccount>(
|
|
74
74
|
{ url: `/v2/solana/accounts/${address}`, method: "GET" },
|
|
@@ -82,7 +82,7 @@ export const getSolanaAccount = (
|
|
|
82
82
|
export const updateSolanaAccount = (
|
|
83
83
|
address: string,
|
|
84
84
|
updateSolanaAccountBody: UpdateSolanaAccountBody,
|
|
85
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
85
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
86
86
|
) => {
|
|
87
87
|
return cdpApiClient<SolanaAccount>(
|
|
88
88
|
{
|
|
@@ -100,7 +100,7 @@ export const updateSolanaAccount = (
|
|
|
100
100
|
*/
|
|
101
101
|
export const getSolanaAccountByName = (
|
|
102
102
|
name: string,
|
|
103
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
103
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
104
104
|
) => {
|
|
105
105
|
return cdpApiClient<SolanaAccount>(
|
|
106
106
|
{ url: `/v2/solana/accounts/by-name/${name}`, method: "GET" },
|
|
@@ -113,7 +113,7 @@ export const getSolanaAccountByName = (
|
|
|
113
113
|
*/
|
|
114
114
|
export const importSolanaAccount = (
|
|
115
115
|
importSolanaAccountBody: ImportSolanaAccountBody,
|
|
116
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
116
|
+
options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
|
|
117
117
|
) => {
|
|
118
118
|
return cdpApiClient<SolanaAccount>(
|
|
119
119
|
{
|
|
@@ -132,7 +132,7 @@ export const importSolanaAccount = (
|
|
|
132
132
|
export const exportSolanaAccount = (
|
|
133
133
|
address: string,
|
|
134
134
|
exportSolanaAccountBody: ExportSolanaAccountBody,
|
|
135
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
135
|
+
options?: SecondParameter<typeof cdpApiClient<ExportSolanaAccount200>>,
|
|
136
136
|
) => {
|
|
137
137
|
return cdpApiClient<ExportSolanaAccount200>(
|
|
138
138
|
{
|
|
@@ -151,7 +151,7 @@ export const exportSolanaAccount = (
|
|
|
151
151
|
export const exportSolanaAccountByName = (
|
|
152
152
|
name: string,
|
|
153
153
|
exportSolanaAccountByNameBody: ExportSolanaAccountByNameBody,
|
|
154
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
154
|
+
options?: SecondParameter<typeof cdpApiClient<ExportSolanaAccountByName200>>,
|
|
155
155
|
) => {
|
|
156
156
|
return cdpApiClient<ExportSolanaAccountByName200>(
|
|
157
157
|
{
|
|
@@ -179,7 +179,7 @@ The developer is responsible for ensuring that the unsigned transaction is valid
|
|
|
179
179
|
export const signSolanaTransaction = (
|
|
180
180
|
address: string,
|
|
181
181
|
signSolanaTransactionBody: SignSolanaTransactionBody,
|
|
182
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
182
|
+
options?: SecondParameter<typeof cdpApiClient<SignSolanaTransaction200>>,
|
|
183
183
|
) => {
|
|
184
184
|
return cdpApiClient<SignSolanaTransaction200>(
|
|
185
185
|
{
|
|
@@ -200,7 +200,7 @@ export const signSolanaTransaction = (
|
|
|
200
200
|
export const signSolanaMessage = (
|
|
201
201
|
address: string,
|
|
202
202
|
signSolanaMessageBody: SignSolanaMessageBody,
|
|
203
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
203
|
+
options?: SecondParameter<typeof cdpApiClient<SignSolanaMessage200>>,
|
|
204
204
|
) => {
|
|
205
205
|
return cdpApiClient<SignSolanaMessage200>(
|
|
206
206
|
{
|
|
@@ -238,7 +238,7 @@ The developer is responsible for ensuring that the unsigned transaction is valid
|
|
|
238
238
|
*/
|
|
239
239
|
export const sendSolanaTransaction = (
|
|
240
240
|
sendSolanaTransactionBody: SendSolanaTransactionBody,
|
|
241
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
241
|
+
options?: SecondParameter<typeof cdpApiClient<SendSolanaTransaction200>>,
|
|
242
242
|
) => {
|
|
243
243
|
return cdpApiClient<SendSolanaTransaction200>(
|
|
244
244
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -25,7 +25,7 @@ export const listSolanaTokenBalances = (
|
|
|
25
25
|
network: ListSolanaTokenBalancesNetwork,
|
|
26
26
|
address: string,
|
|
27
27
|
params?: ListSolanaTokenBalancesParams,
|
|
28
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
28
|
+
options?: SecondParameter<typeof cdpApiClient<ListSolanaTokenBalances200>>,
|
|
29
29
|
) => {
|
|
30
30
|
return cdpApiClient<ListSolanaTokenBalances200>(
|
|
31
31
|
{ url: `/v2/solana/token-balances/${network}/${address}`, method: "GET", params },
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Coinbase Developer Platform APIs
|
|
5
|
+
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
6
|
+
* OpenAPI spec version: 2.0.0
|
|
7
|
+
*/
|
|
8
|
+
import type {
|
|
9
|
+
OnchainDataQuery,
|
|
10
|
+
OnchainDataResult,
|
|
11
|
+
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
12
|
+
|
|
13
|
+
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
14
|
+
|
|
15
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Run a read-only SQL query against indexed blockchain data including transactions, events, and decoded logs.
|
|
19
|
+
|
|
20
|
+
This endpoint provides direct SQL access to comprehensive blockchain data across supported networks.
|
|
21
|
+
|
|
22
|
+
Queries are executed against optimized data structures for high-performance analytics.
|
|
23
|
+
|
|
24
|
+
### Allowed Queries
|
|
25
|
+
|
|
26
|
+
- Standard SQL syntax (CoinbaSeQL dialect, based on ClickHouse dialect)
|
|
27
|
+
- Read-only queries (SELECT statements)
|
|
28
|
+
- No DDL or DML operations
|
|
29
|
+
- Query that follow limits (defined below)
|
|
30
|
+
|
|
31
|
+
### Supported Tables
|
|
32
|
+
|
|
33
|
+
- `<network>.events` - Base mainnet decoded event logs with parameters, event signature, topics, and more.
|
|
34
|
+
- `<network>.transactions` - Base mainnet transaction data including hash, block number, gas usage.
|
|
35
|
+
- `<network>.blocks` - Base mainnet block information.
|
|
36
|
+
- `<network>.encoded_logs` - Encoded log data of event logs that aren't able to be decoded by our event decoder (ex: log0 opcode).
|
|
37
|
+
- `<network>.decoded_user_operations` - Decoded user operations data including hash, block number, gas usage, builder codes, entrypoint version, and more.
|
|
38
|
+
- `<network>.transaction_attributions` - Information about the attributions of a transaction to a builder and associated builder codes.
|
|
39
|
+
|
|
40
|
+
### Supported Networks
|
|
41
|
+
|
|
42
|
+
- Base Mainnet: `base`
|
|
43
|
+
- Base Sepolia: `base_sepolia`
|
|
44
|
+
|
|
45
|
+
So for example, valid tables are: `base.events`, `base_sepolia.events`, `base.transactions`, etc.
|
|
46
|
+
|
|
47
|
+
### Query Limits
|
|
48
|
+
|
|
49
|
+
- Maximum result set: 50,000 rows
|
|
50
|
+
- Maximum query length: 10,000 characters
|
|
51
|
+
- Maximum on-disk data to read: 100GB
|
|
52
|
+
- Maximum memory usage: 15GB
|
|
53
|
+
- Query timeout: 30 seconds
|
|
54
|
+
- Maximum JOINs: 12
|
|
55
|
+
|
|
56
|
+
### Query Caching
|
|
57
|
+
|
|
58
|
+
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).
|
|
59
|
+
This can be helpful for users who wish to reduce expensive calls to the SQL API by reusing cached results.
|
|
60
|
+
|
|
61
|
+
* @summary Run SQL Query
|
|
62
|
+
*/
|
|
63
|
+
export const runSQLQuery = (
|
|
64
|
+
onchainDataQuery: OnchainDataQuery,
|
|
65
|
+
options?: SecondParameter<typeof cdpApiClient<OnchainDataResult>>,
|
|
66
|
+
) => {
|
|
67
|
+
return cdpApiClient<OnchainDataResult>(
|
|
68
|
+
{
|
|
69
|
+
url: `/v2/data/query/run`,
|
|
70
|
+
method: "POST",
|
|
71
|
+
headers: { "Content-Type": "application/json" },
|
|
72
|
+
data: onchainDataQuery,
|
|
73
|
+
},
|
|
74
|
+
options,
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Retrieve the SQL grammar for the SQL API.
|
|
79
|
+
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
LLMs interact well with ANTLR4 grammar. You can feed the grammar directly into the LLMs to help generate SQL queries.
|
|
85
|
+
|
|
86
|
+
* @summary Get SQL grammar
|
|
87
|
+
*/
|
|
88
|
+
export const getSQLGrammar = (options?: SecondParameter<typeof cdpApiClient<string>>) => {
|
|
89
|
+
return cdpApiClient<string>({ url: `/v2/data/query/grammar`, method: "GET" }, options);
|
|
90
|
+
};
|
|
91
|
+
export type RunSQLQueryResult = NonNullable<Awaited<ReturnType<typeof runSQLQuery>>>;
|
|
92
|
+
export type GetSQLGrammarResult = NonNullable<Awaited<ReturnType<typeof getSQLGrammar>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -31,7 +31,7 @@ in descending order by creation time.
|
|
|
31
31
|
*/
|
|
32
32
|
export const listWebhookSubscriptions = (
|
|
33
33
|
params?: ListWebhookSubscriptionsParams,
|
|
34
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
34
|
+
options?: SecondParameter<typeof cdpApiClient<WebhookSubscriptionListResponse>>,
|
|
35
35
|
) => {
|
|
36
36
|
return cdpApiClient<WebhookSubscriptionListResponse>(
|
|
37
37
|
{ url: `/v2/data/webhooks/subscriptions`, method: "GET", params },
|
|
@@ -94,7 +94,7 @@ For `onchain.activity.detected` events, use `labels` for precise filtering with
|
|
|
94
94
|
*/
|
|
95
95
|
export const createWebhookSubscription = (
|
|
96
96
|
webhookSubscriptionRequest: WebhookSubscriptionRequest,
|
|
97
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
97
|
+
options?: SecondParameter<typeof cdpApiClient<WebhookSubscriptionResponse>>,
|
|
98
98
|
) => {
|
|
99
99
|
return cdpApiClient<WebhookSubscriptionResponse>(
|
|
100
100
|
{
|
|
@@ -120,7 +120,7 @@ configuration, status, creation timestamp, and webhook signature secret.
|
|
|
120
120
|
*/
|
|
121
121
|
export const getWebhookSubscription = (
|
|
122
122
|
subscriptionId: string,
|
|
123
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
123
|
+
options?: SecondParameter<typeof cdpApiClient<WebhookSubscriptionResponse>>,
|
|
124
124
|
) => {
|
|
125
125
|
return cdpApiClient<WebhookSubscriptionResponse>(
|
|
126
126
|
{ url: `/v2/data/webhooks/subscriptions/${subscriptionId}`, method: "GET" },
|
|
@@ -143,7 +143,7 @@ All required fields must be provided, even if they are not being changed.
|
|
|
143
143
|
export const updateWebhookSubscription = (
|
|
144
144
|
subscriptionId: string,
|
|
145
145
|
webhookSubscriptionUpdateRequest: WebhookSubscriptionUpdateRequest,
|
|
146
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
146
|
+
options?: SecondParameter<typeof cdpApiClient<WebhookSubscriptionResponse>>,
|
|
147
147
|
) => {
|
|
148
148
|
return cdpApiClient<WebhookSubscriptionResponse>(
|
|
149
149
|
{
|
|
@@ -168,7 +168,7 @@ This action cannot be undone.
|
|
|
168
168
|
*/
|
|
169
169
|
export const deleteWebhookSubscription = (
|
|
170
170
|
subscriptionId: string,
|
|
171
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
171
|
+
options?: SecondParameter<typeof cdpApiClient<void>>,
|
|
172
172
|
) => {
|
|
173
173
|
return cdpApiClient<void>(
|
|
174
174
|
{ url: `/v2/data/webhooks/subscriptions/${subscriptionId}`, method: "DELETE" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval v7.
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Coinbase Developer Platform APIs
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
@@ -23,7 +23,7 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
|
23
23
|
*/
|
|
24
24
|
export const verifyX402Payment = (
|
|
25
25
|
verifyX402PaymentBody: VerifyX402PaymentBody,
|
|
26
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
26
|
+
options?: SecondParameter<typeof cdpApiClient<X402VerifyResponseResponse>>,
|
|
27
27
|
) => {
|
|
28
28
|
return cdpApiClient<X402VerifyResponseResponse>(
|
|
29
29
|
{
|
|
@@ -41,7 +41,7 @@ export const verifyX402Payment = (
|
|
|
41
41
|
*/
|
|
42
42
|
export const settleX402Payment = (
|
|
43
43
|
settleX402PaymentBody: SettleX402PaymentBody,
|
|
44
|
-
options?: SecondParameter<typeof cdpApiClient
|
|
44
|
+
options?: SecondParameter<typeof cdpApiClient<X402SettleResponseResponse>>,
|
|
45
45
|
) => {
|
|
46
46
|
return cdpApiClient<X402SettleResponseResponse>(
|
|
47
47
|
{
|
|
@@ -57,7 +57,9 @@ export const settleX402Payment = (
|
|
|
57
57
|
* Get the supported x402 protocol payment schemes and networks that the facilitator is able to verify and settle payments for.
|
|
58
58
|
* @summary Get supported payment schemes and networks
|
|
59
59
|
*/
|
|
60
|
-
export const supportedX402PaymentKinds = (
|
|
60
|
+
export const supportedX402PaymentKinds = (
|
|
61
|
+
options?: SecondParameter<typeof cdpApiClient<X402SupportedPaymentKindsResponseResponse>>,
|
|
62
|
+
) => {
|
|
61
63
|
return cdpApiClient<X402SupportedPaymentKindsResponseResponse>(
|
|
62
64
|
{ url: `/v2/x402/supported`, method: "GET" },
|
|
63
65
|
options,
|