@coinbase/cdp-sdk 1.46.0 → 1.47.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 +12 -0
- package/README.md +50 -0
- package/_cjs/actions/solana/sendTransaction.js +3 -0
- package/_cjs/actions/solana/sendTransaction.js.map +1 -1
- package/_cjs/actions/webhooks/createWebhookSubscription.js +48 -0
- package/_cjs/actions/webhooks/createWebhookSubscription.js.map +1 -0
- package/_cjs/actions/webhooks/index.js +6 -0
- package/_cjs/actions/webhooks/index.js.map +1 -0
- package/_cjs/client/cdp.js +4 -0
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/solana/solana.js +2 -0
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/client/webhooks/webhooks.js +58 -0
- package/_cjs/client/webhooks/webhooks.js.map +1 -0
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +39 -43
- 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 +33 -1
- package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.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/sql-api/sql-api.js +12 -1
- package/_cjs/openapi-client/generated/sql-api/sql-api.js.map +1 -1
- package/_cjs/openapi-client/generated/webhooks/webhooks.js +28 -1
- package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/actions/solana/sendTransaction.js +3 -0
- package/_esm/actions/solana/sendTransaction.js.map +1 -1
- package/_esm/actions/webhooks/createWebhookSubscription.js +45 -0
- package/_esm/actions/webhooks/createWebhookSubscription.js.map +1 -0
- package/_esm/actions/webhooks/index.js +2 -0
- package/_esm/actions/webhooks/index.js.map +1 -0
- package/_esm/client/cdp.js +4 -0
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/solana/solana.js +2 -0
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/client/webhooks/webhooks.js +54 -0
- package/_esm/client/webhooks/webhooks.js.map +1 -0
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +36 -40
- 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 +32 -0
- package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.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/sql-api/sql-api.js +10 -0
- package/_esm/openapi-client/generated/sql-api/sql-api.js.map +1 -1
- package/_esm/openapi-client/generated/webhooks/webhooks.js +26 -0
- package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/actions/solana/sendTransaction.d.ts +2 -0
- package/_types/actions/solana/sendTransaction.d.ts.map +1 -1
- package/_types/actions/webhooks/createWebhookSubscription.d.ts +68 -0
- package/_types/actions/webhooks/createWebhookSubscription.d.ts.map +1 -0
- package/_types/actions/webhooks/index.d.ts +2 -0
- package/_types/actions/webhooks/index.d.ts.map +1 -0
- package/_types/client/cdp.d.ts +3 -0
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/solana/solana.d.ts +2 -0
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/client/solana/solana.types.d.ts +2 -0
- package/_types/client/solana/solana.types.d.ts.map +1 -1
- package/_types/client/webhooks/webhooks.d.ts +41 -0
- package/_types/client/webhooks/webhooks.d.ts.map +1 -0
- package/_types/index.d.ts +1 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +255 -452
- 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 +150 -1
- package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +2 -2
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts +10 -1
- package/_types/openapi-client/generated/sql-api/sql-api.d.ts.map +1 -1
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts +26 -1
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +46 -16
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/actions/solana/sendTransaction.ts +3 -0
- package/actions/webhooks/createWebhookSubscription.ts +104 -0
- package/actions/webhooks/index.ts +6 -0
- package/client/cdp.ts +5 -0
- package/client/solana/solana.ts +2 -0
- package/client/solana/solana.types.ts +2 -0
- package/client/webhooks/webhooks.ts +61 -0
- package/index.ts +6 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +293 -505
- package/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.ts +154 -26
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +3 -3
- package/openapi-client/generated/sql-api/sql-api.ts +19 -0
- package/openapi-client/generated/webhooks/webhooks.ts +38 -0
- package/package.json +2 -2
- package/version.ts +1 -1
|
@@ -7,36 +7,164 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type {
|
|
9
9
|
BlockchainAddress,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
EIP712Message,
|
|
11
|
+
EvmCall,
|
|
12
|
+
EvmEip7702DelegationNetwork,
|
|
12
13
|
EvmUserOperation,
|
|
13
|
-
|
|
14
|
+
EvmUserOperationNetwork,
|
|
14
15
|
RevokeSpendPermissionRequest,
|
|
15
|
-
SendEvmAssetWithEndUserAccount200,
|
|
16
|
-
SendEvmAssetWithEndUserAccountBody,
|
|
17
|
-
SendEvmTransactionWithEndUserAccount200,
|
|
18
|
-
SendEvmTransactionWithEndUserAccountBody,
|
|
19
|
-
SendSolanaAssetWithEndUserAccount200,
|
|
20
|
-
SendSolanaAssetWithEndUserAccountBody,
|
|
21
|
-
SendSolanaTransactionWithEndUserAccount200,
|
|
22
|
-
SendSolanaTransactionWithEndUserAccountBody,
|
|
23
|
-
SendUserOperationWithEndUserAccountBody,
|
|
24
|
-
SignEvmHashWithEndUserAccount200,
|
|
25
|
-
SignEvmHashWithEndUserAccountBody,
|
|
26
|
-
SignEvmMessageWithEndUserAccount200,
|
|
27
|
-
SignEvmMessageWithEndUserAccountBody,
|
|
28
|
-
SignEvmTransactionWithEndUserAccount200,
|
|
29
|
-
SignEvmTransactionWithEndUserAccountBody,
|
|
30
|
-
SignEvmTypedDataWithEndUserAccount200,
|
|
31
|
-
SignEvmTypedDataWithEndUserAccountBody,
|
|
32
|
-
SignSolanaHashWithEndUserAccount200,
|
|
33
|
-
SignSolanaHashWithEndUserAccountBody,
|
|
34
|
-
SignSolanaMessageWithEndUserAccount200,
|
|
35
|
-
SignSolanaMessageWithEndUserAccountBody,
|
|
36
|
-
SignSolanaTransactionWithEndUserAccount200,
|
|
37
|
-
SignSolanaTransactionWithEndUserAccountBody,
|
|
38
16
|
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
39
17
|
|
|
18
|
+
// These types were removed from the shared schemas when the embedded-wallet-api
|
|
19
|
+
// paths were temporarily pulled from the public spec. Defined inline until restored.
|
|
20
|
+
type Url = string;
|
|
21
|
+
|
|
22
|
+
export type SignEvmHashWithEndUserAccountBody = {
|
|
23
|
+
hash: string;
|
|
24
|
+
address: string;
|
|
25
|
+
walletSecretId?: string;
|
|
26
|
+
};
|
|
27
|
+
export type SignEvmHashWithEndUserAccount200 = { signature: string };
|
|
28
|
+
|
|
29
|
+
export type SignEvmTransactionWithEndUserAccountBody = {
|
|
30
|
+
address: string;
|
|
31
|
+
transaction: string;
|
|
32
|
+
walletSecretId?: string;
|
|
33
|
+
};
|
|
34
|
+
export type SignEvmTransactionWithEndUserAccount200 = { signedTransaction: string };
|
|
35
|
+
|
|
36
|
+
export type SendEvmTransactionWithEndUserAccountBodyNetwork =
|
|
37
|
+
(typeof SendEvmTransactionWithEndUserAccountBodyNetwork)[keyof typeof SendEvmTransactionWithEndUserAccountBodyNetwork];
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
39
|
+
export const SendEvmTransactionWithEndUserAccountBodyNetwork = {
|
|
40
|
+
base: "base",
|
|
41
|
+
"base-sepolia": "base-sepolia",
|
|
42
|
+
ethereum: "ethereum",
|
|
43
|
+
"ethereum-sepolia": "ethereum-sepolia",
|
|
44
|
+
avalanche: "avalanche",
|
|
45
|
+
polygon: "polygon",
|
|
46
|
+
optimism: "optimism",
|
|
47
|
+
arbitrum: "arbitrum",
|
|
48
|
+
} as const;
|
|
49
|
+
export type SendEvmTransactionWithEndUserAccountBody = {
|
|
50
|
+
address: string;
|
|
51
|
+
network: SendEvmTransactionWithEndUserAccountBodyNetwork;
|
|
52
|
+
transaction: string;
|
|
53
|
+
walletSecretId?: string;
|
|
54
|
+
};
|
|
55
|
+
export type SendEvmTransactionWithEndUserAccount200 = { transactionHash: string };
|
|
56
|
+
|
|
57
|
+
export type SendEvmAssetWithEndUserAccountBodyNetwork =
|
|
58
|
+
(typeof SendEvmAssetWithEndUserAccountBodyNetwork)[keyof typeof SendEvmAssetWithEndUserAccountBodyNetwork];
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
60
|
+
export const SendEvmAssetWithEndUserAccountBodyNetwork = {
|
|
61
|
+
base: "base",
|
|
62
|
+
"base-sepolia": "base-sepolia",
|
|
63
|
+
ethereum: "ethereum",
|
|
64
|
+
"ethereum-sepolia": "ethereum-sepolia",
|
|
65
|
+
avalanche: "avalanche",
|
|
66
|
+
polygon: "polygon",
|
|
67
|
+
optimism: "optimism",
|
|
68
|
+
arbitrum: "arbitrum",
|
|
69
|
+
} as const;
|
|
70
|
+
export type SendEvmAssetWithEndUserAccountBody = {
|
|
71
|
+
to: BlockchainAddress;
|
|
72
|
+
amount: string;
|
|
73
|
+
network: SendEvmAssetWithEndUserAccountBodyNetwork;
|
|
74
|
+
useCdpPaymaster?: boolean;
|
|
75
|
+
paymasterUrl?: Url;
|
|
76
|
+
walletSecretId?: string;
|
|
77
|
+
};
|
|
78
|
+
export type SendEvmAssetWithEndUserAccount200 = {
|
|
79
|
+
transactionHash?: string | null;
|
|
80
|
+
userOpHash?: string | null;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type SignEvmMessageWithEndUserAccountBody = {
|
|
84
|
+
address: string;
|
|
85
|
+
message: string;
|
|
86
|
+
walletSecretId?: string;
|
|
87
|
+
};
|
|
88
|
+
export type SignEvmMessageWithEndUserAccount200 = { signature: string };
|
|
89
|
+
|
|
90
|
+
export type SignEvmTypedDataWithEndUserAccountBody = {
|
|
91
|
+
address: string;
|
|
92
|
+
typedData: EIP712Message;
|
|
93
|
+
walletSecretId?: string;
|
|
94
|
+
};
|
|
95
|
+
export type SignEvmTypedDataWithEndUserAccount200 = { signature: string };
|
|
96
|
+
|
|
97
|
+
export type RevokeDelegationForEndUserBody = { walletSecretId?: string };
|
|
98
|
+
|
|
99
|
+
export type CreateEvmEip7702DelegationWithEndUserAccountBody = {
|
|
100
|
+
address: string;
|
|
101
|
+
network: EvmEip7702DelegationNetwork;
|
|
102
|
+
enableSpendPermissions?: boolean;
|
|
103
|
+
walletSecretId?: string;
|
|
104
|
+
};
|
|
105
|
+
export type CreateEvmEip7702DelegationWithEndUserAccount201 = { delegationOperationId: string };
|
|
106
|
+
|
|
107
|
+
export type SendUserOperationWithEndUserAccountBody = {
|
|
108
|
+
network: EvmUserOperationNetwork;
|
|
109
|
+
calls: EvmCall[];
|
|
110
|
+
useCdpPaymaster: boolean;
|
|
111
|
+
paymasterUrl?: Url;
|
|
112
|
+
walletSecretId?: string;
|
|
113
|
+
dataSuffix?: string;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export type SignSolanaHashWithEndUserAccountBody = {
|
|
117
|
+
hash: string;
|
|
118
|
+
address: string;
|
|
119
|
+
walletSecretId?: string;
|
|
120
|
+
};
|
|
121
|
+
export type SignSolanaHashWithEndUserAccount200 = { signature: string };
|
|
122
|
+
|
|
123
|
+
export type SignSolanaMessageWithEndUserAccountBody = {
|
|
124
|
+
address: string;
|
|
125
|
+
message: string;
|
|
126
|
+
walletSecretId?: string;
|
|
127
|
+
};
|
|
128
|
+
export type SignSolanaMessageWithEndUserAccount200 = { signature: string };
|
|
129
|
+
|
|
130
|
+
export type SignSolanaTransactionWithEndUserAccountBody = {
|
|
131
|
+
address: string;
|
|
132
|
+
transaction: string;
|
|
133
|
+
walletSecretId?: string;
|
|
134
|
+
};
|
|
135
|
+
export type SignSolanaTransactionWithEndUserAccount200 = { signedTransaction: string };
|
|
136
|
+
|
|
137
|
+
export type SendSolanaTransactionWithEndUserAccountBodyNetwork =
|
|
138
|
+
(typeof SendSolanaTransactionWithEndUserAccountBodyNetwork)[keyof typeof SendSolanaTransactionWithEndUserAccountBodyNetwork];
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
140
|
+
export const SendSolanaTransactionWithEndUserAccountBodyNetwork = {
|
|
141
|
+
solana: "solana",
|
|
142
|
+
"solana-devnet": "solana-devnet",
|
|
143
|
+
} as const;
|
|
144
|
+
export type SendSolanaTransactionWithEndUserAccountBody = {
|
|
145
|
+
address: string;
|
|
146
|
+
network: SendSolanaTransactionWithEndUserAccountBodyNetwork;
|
|
147
|
+
transaction: string;
|
|
148
|
+
walletSecretId?: string;
|
|
149
|
+
};
|
|
150
|
+
export type SendSolanaTransactionWithEndUserAccount200 = { transactionSignature: string };
|
|
151
|
+
|
|
152
|
+
export type SendSolanaAssetWithEndUserAccountBodyNetwork =
|
|
153
|
+
(typeof SendSolanaAssetWithEndUserAccountBodyNetwork)[keyof typeof SendSolanaAssetWithEndUserAccountBodyNetwork];
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
155
|
+
export const SendSolanaAssetWithEndUserAccountBodyNetwork = {
|
|
156
|
+
solana: "solana",
|
|
157
|
+
"solana-devnet": "solana-devnet",
|
|
158
|
+
} as const;
|
|
159
|
+
export type SendSolanaAssetWithEndUserAccountBody = {
|
|
160
|
+
to: BlockchainAddress;
|
|
161
|
+
amount: string;
|
|
162
|
+
network: SendSolanaAssetWithEndUserAccountBodyNetwork;
|
|
163
|
+
createRecipientAta?: boolean;
|
|
164
|
+
walletSecretId?: string;
|
|
165
|
+
};
|
|
166
|
+
export type SendSolanaAssetWithEndUserAccount200 = { transactionSignature: string };
|
|
167
|
+
|
|
40
168
|
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
41
169
|
|
|
42
170
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
@@ -9,7 +9,6 @@ import type {
|
|
|
9
9
|
CreateEvmSmartAccountBody,
|
|
10
10
|
CreateSpendPermissionRequest,
|
|
11
11
|
EvmSmartAccount,
|
|
12
|
-
EvmSpendPermissionsRevokeSpendPermissionRequest,
|
|
13
12
|
EvmUserOperation,
|
|
14
13
|
ListEvmSmartAccounts200,
|
|
15
14
|
ListEvmSmartAccountsParams,
|
|
@@ -17,6 +16,7 @@ import type {
|
|
|
17
16
|
ListSpendPermissionsParams,
|
|
18
17
|
PrepareAndSendUserOperationBody,
|
|
19
18
|
PrepareUserOperationBody,
|
|
19
|
+
RevokeSpendPermissionRequest,
|
|
20
20
|
SendUserOperationBody,
|
|
21
21
|
UpdateEvmSmartAccountBody,
|
|
22
22
|
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
@@ -216,7 +216,7 @@ export const listSpendPermissions = (
|
|
|
216
216
|
*/
|
|
217
217
|
export const revokeSpendPermission = (
|
|
218
218
|
address: string,
|
|
219
|
-
|
|
219
|
+
revokeSpendPermissionRequest: RevokeSpendPermissionRequest,
|
|
220
220
|
options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
|
|
221
221
|
) => {
|
|
222
222
|
return cdpApiClient<EvmUserOperation>(
|
|
@@ -224,7 +224,7 @@ export const revokeSpendPermission = (
|
|
|
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: revokeSpendPermissionRequest,
|
|
228
228
|
},
|
|
229
229
|
options,
|
|
230
230
|
);
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
* OpenAPI spec version: 2.0.0
|
|
7
7
|
*/
|
|
8
8
|
import type {
|
|
9
|
+
GetSQLSchemaParams,
|
|
9
10
|
OnchainDataQuery,
|
|
10
11
|
OnchainDataResult,
|
|
12
|
+
OnchainDataSchemaResponse,
|
|
11
13
|
} from "../coinbaseDeveloperPlatformAPIs.schemas.js";
|
|
12
14
|
|
|
13
15
|
import { cdpApiClient } from "../../cdpApiClient.js";
|
|
@@ -88,5 +90,22 @@ LLMs interact well with ANTLR4 grammar. You can feed the grammar directly into t
|
|
|
88
90
|
export const getSQLGrammar = (options?: SecondParameter<typeof cdpApiClient<string>>) => {
|
|
89
91
|
return cdpApiClient<string>({ url: `/v2/data/query/grammar`, method: "GET" }, options);
|
|
90
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* Retrieve the schema information for the available tables in the SQL API's indexed data.
|
|
95
|
+
|
|
96
|
+
This includes table names, column definitions, data types, and indexed fields.
|
|
97
|
+
|
|
98
|
+
* @summary Get schemas details
|
|
99
|
+
*/
|
|
100
|
+
export const getSQLSchema = (
|
|
101
|
+
params?: GetSQLSchemaParams,
|
|
102
|
+
options?: SecondParameter<typeof cdpApiClient<OnchainDataSchemaResponse>>,
|
|
103
|
+
) => {
|
|
104
|
+
return cdpApiClient<OnchainDataSchemaResponse>(
|
|
105
|
+
{ url: `/v2/data/query/schema`, method: "GET", params },
|
|
106
|
+
options,
|
|
107
|
+
);
|
|
108
|
+
};
|
|
91
109
|
export type RunSQLQueryResult = NonNullable<Awaited<ReturnType<typeof runSQLQuery>>>;
|
|
92
110
|
export type GetSQLGrammarResult = NonNullable<Awaited<ReturnType<typeof getSQLGrammar>>>;
|
|
111
|
+
export type GetSQLSchemaResult = NonNullable<Awaited<ReturnType<typeof getSQLSchema>>>;
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* OpenAPI spec version: 2.0.0
|
|
7
7
|
*/
|
|
8
8
|
import type {
|
|
9
|
+
ListWebhookSubscriptionEventsParams,
|
|
9
10
|
ListWebhookSubscriptionsParams,
|
|
11
|
+
WebhookEventListResponse,
|
|
10
12
|
WebhookSubscriptionListResponse,
|
|
11
13
|
WebhookSubscriptionRequest,
|
|
12
14
|
WebhookSubscriptionResponse,
|
|
@@ -59,6 +61,8 @@ export const listWebhookSubscriptions = (
|
|
|
59
61
|
- `payments.transfers.processing`
|
|
60
62
|
- `payments.transfers.completed`
|
|
61
63
|
- `payments.transfers.failed`
|
|
64
|
+
- `payments.transfers.travel_rule_incomplete`
|
|
65
|
+
- `payments.transfers.travel_rule_completed`
|
|
62
66
|
- **No labels required** - enable the transfers webhook to monitor status transitions
|
|
63
67
|
|
|
64
68
|
**Wallet Events** - Wallet activity notifications:
|
|
@@ -175,6 +179,37 @@ export const deleteWebhookSubscription = (
|
|
|
175
179
|
options,
|
|
176
180
|
);
|
|
177
181
|
};
|
|
182
|
+
/**
|
|
183
|
+
* Retrieve webhook event delivery attempts for a specific subscription.
|
|
184
|
+
Returns event deliveries in descending order by creation time (newest first),
|
|
185
|
+
including delivery status, retry count, and response details.
|
|
186
|
+
|
|
187
|
+
### Use Cases
|
|
188
|
+
- Debug webhook delivery failures and inspect response codes
|
|
189
|
+
- Monitor delivery status and retry counts
|
|
190
|
+
- Audit event delivery history for a subscription
|
|
191
|
+
- Verify that expected events were sent to webhook URLs
|
|
192
|
+
|
|
193
|
+
### Filtering
|
|
194
|
+
Use optional query parameters to narrow results:
|
|
195
|
+
- `eventId` — find a specific event by ID
|
|
196
|
+
- `minCreatedAt` / `maxCreatedAt` — filter by time range
|
|
197
|
+
- `eventTypeNames` — filter by event type (comma-separated)
|
|
198
|
+
|
|
199
|
+
**Note:** Results are limited to the 50 most recent events (newest first). No pagination is supported.
|
|
200
|
+
|
|
201
|
+
* @summary List webhook subscription events
|
|
202
|
+
*/
|
|
203
|
+
export const listWebhookSubscriptionEvents = (
|
|
204
|
+
subscriptionId: string,
|
|
205
|
+
params?: ListWebhookSubscriptionEventsParams,
|
|
206
|
+
options?: SecondParameter<typeof cdpApiClient<WebhookEventListResponse>>,
|
|
207
|
+
) => {
|
|
208
|
+
return cdpApiClient<WebhookEventListResponse>(
|
|
209
|
+
{ url: `/v2/data/webhooks/subscriptions/${subscriptionId}/events`, method: "GET", params },
|
|
210
|
+
options,
|
|
211
|
+
);
|
|
212
|
+
};
|
|
178
213
|
export type ListWebhookSubscriptionsResult = NonNullable<
|
|
179
214
|
Awaited<ReturnType<typeof listWebhookSubscriptions>>
|
|
180
215
|
>;
|
|
@@ -190,3 +225,6 @@ export type UpdateWebhookSubscriptionResult = NonNullable<
|
|
|
190
225
|
export type DeleteWebhookSubscriptionResult = NonNullable<
|
|
191
226
|
Awaited<ReturnType<typeof deleteWebhookSubscription>>
|
|
192
227
|
>;
|
|
228
|
+
export type ListWebhookSubscriptionEventsResult = NonNullable<
|
|
229
|
+
Awaited<ReturnType<typeof listWebhookSubscriptionEvents>>
|
|
230
|
+
>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.0",
|
|
4
4
|
"description": "SDK for interacting with the Coinbase Developer Platform Wallet API",
|
|
5
5
|
"main": "./_cjs/index.js",
|
|
6
6
|
"module": "./_esm/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@solana-program/token": "^0.9.0",
|
|
23
23
|
"@solana/kit": "^5.5.1",
|
|
24
24
|
"abitype": "1.0.6",
|
|
25
|
-
"axios": "
|
|
25
|
+
"axios": "1.13.6",
|
|
26
26
|
"axios-retry": "^4.5.0",
|
|
27
27
|
"jose": "^6.2.0",
|
|
28
28
|
"md5": "^2.3.0",
|
package/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "1.
|
|
1
|
+
export const version = "1.47.0";
|