@coinbase/cdp-sdk 1.44.1 → 1.45.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 -0
- package/README.md +117 -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 +111 -45
- package/_cjs/accounts/evm/toEvmSmartAccount.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/analytics.js +10 -228
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/client/cdp.js +0 -6
- package/_cjs/client/cdp.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 +177 -106
- 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/generated/coinbaseDeveloperPlatformAPIs.schemas.js +137 -5
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.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/onramp/onramp.js +15 -1
- package/_cjs/openapi-client/generated/onramp/onramp.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/version.js +1 -1
- 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 +111 -45
- package/_esm/accounts/evm/toEvmSmartAccount.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/analytics.js +9 -227
- package/_esm/analytics.js.map +1 -1
- package/_esm/client/cdp.js +0 -6
- package/_esm/client/cdp.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 +177 -106
- 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/generated/coinbaseDeveloperPlatformAPIs.schemas.js +134 -3
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.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/onramp/onramp.js +13 -0
- package/_esm/openapi-client/generated/onramp/onramp.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/version.js +1 -1
- 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/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/analytics.d.ts +5 -38
- package/_types/analytics.d.ts.map +1 -1
- package/_types/client/cdp.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.map +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +436 -10
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +21 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts +8 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +4 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +2717 -601
- 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/version.d.ts +1 -1
- package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
- package/accounts/evm/toEvmServerAccount.ts +115 -67
- package/accounts/evm/toEvmSmartAccount.ts +100 -56
- package/accounts/solana/toSolanaAccount.ts +44 -24
- package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
- package/analytics.ts +8 -294
- package/client/cdp.ts +0 -7
- package/client/evm/evm.ts +517 -282
- package/client/evm/evm.types.ts +41 -0
- package/client/policies/policies.ts +41 -16
- package/client/solana/solana.ts +195 -141
- package/index.ts +5 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +580 -11
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +49 -0
- package/openapi-client/generated/onramp/onramp.ts +24 -0
- package/package.json +1 -1
- package/policies/evmSchema.ts +164 -0
- package/policies/solanaSchema.ts +130 -0
- package/policies/types.ts +14 -0
- package/version.ts +1 -1
package/_cjs/analytics.js
CHANGED
|
@@ -3,37 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.Analytics = void 0;
|
|
7
7
|
const md5_1 = __importDefault(require("md5"));
|
|
8
8
|
const errors_js_1 = require("./errors.js");
|
|
9
9
|
const errors_js_2 = require("./openapi-client/errors.js");
|
|
10
10
|
const version_js_1 = require("./version.js");
|
|
11
|
-
// Symbol to store the original method on wrapped functions
|
|
12
|
-
const ORIGINAL_METHOD = Symbol("originalMethod");
|
|
13
11
|
// This is a public client id for the analytics service
|
|
14
12
|
const publicClientId = "54f2ee2fb3d2b901a829940d70fbfc13";
|
|
15
13
|
exports.Analytics = {
|
|
16
14
|
identifier: "", // set in cdp.ts
|
|
17
|
-
wrapClassWithErrorTracking,
|
|
18
|
-
wrapObjectMethodsWithErrorTracking,
|
|
19
|
-
sendEvent,
|
|
20
|
-
trackAction,
|
|
21
|
-
};
|
|
22
|
-
/*
|
|
23
|
-
* Deprecated implementation - kept for test compatibility
|
|
24
|
-
* Shares the same identifier reference as Analytics
|
|
25
|
-
*/
|
|
26
|
-
exports.AnalyticsDeprecated = {
|
|
27
|
-
get identifier() {
|
|
28
|
-
return exports.Analytics.identifier;
|
|
29
|
-
},
|
|
30
|
-
set identifier(value) {
|
|
31
|
-
exports.Analytics.identifier = value;
|
|
32
|
-
},
|
|
33
|
-
wrapClassWithErrorTracking: wrapClassWithErrorTrackingDeprecated,
|
|
34
|
-
wrapObjectMethodsWithErrorTracking: wrapObjectMethodsWithErrorTrackingDeprecated,
|
|
35
15
|
sendEvent,
|
|
36
16
|
trackAction,
|
|
17
|
+
trackError,
|
|
37
18
|
};
|
|
38
19
|
/**
|
|
39
20
|
* Sends an analytics event to the default endpoint
|
|
@@ -108,217 +89,18 @@ function trackAction(params) {
|
|
|
108
89
|
});
|
|
109
90
|
}
|
|
110
91
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* @param method - The method to get the original version of.
|
|
114
|
-
* @returns The original unwrapped method, or the method itself if it's not wrapped.
|
|
115
|
-
*/
|
|
116
|
-
function getOriginalMethod(method) {
|
|
117
|
-
return (method[ORIGINAL_METHOD] || method);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Creates an interceptor function that prevents recursive calls by checking if the instance is already executing.
|
|
121
|
-
*
|
|
122
|
-
* @param executingInstances - A WeakSet tracking instances that are currently executing.
|
|
123
|
-
* @param fallbackMethod - The method to call if recursion is not detected.
|
|
124
|
-
* @returns A function that intercepts calls and prevents recursion.
|
|
125
|
-
*/
|
|
126
|
-
function createRecursiveInterceptor(executingInstances, fallbackMethod) {
|
|
127
|
-
return function (...callArgs) {
|
|
128
|
-
if (executingInstances.has(this)) {
|
|
129
|
-
return Promise.resolve(callArgs[0]);
|
|
130
|
-
}
|
|
131
|
-
return fallbackMethod.apply(this, callArgs);
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Handles an error that occurred in a method by sending an analytics event and rethrowing the error.
|
|
136
|
-
*
|
|
137
|
-
* @param error - The error that occurred.
|
|
138
|
-
* @param methodName - The name of the method where the error occurred.
|
|
139
|
-
*/
|
|
140
|
-
async function handleMethodError(error, methodName) {
|
|
141
|
-
if (!shouldTrackError(error)) {
|
|
142
|
-
throw error;
|
|
143
|
-
}
|
|
144
|
-
const { message, stack } = error;
|
|
145
|
-
sendEvent({
|
|
146
|
-
method: methodName,
|
|
147
|
-
message,
|
|
148
|
-
stack,
|
|
149
|
-
name: "error",
|
|
150
|
-
}).catch(() => {
|
|
151
|
-
// ignore error
|
|
152
|
-
});
|
|
153
|
-
throw error;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Creates a wrapper function that adds error tracking and recursion protection to a method.
|
|
157
|
-
*
|
|
158
|
-
* The recursion protection works by temporarily replacing the method with an interceptor
|
|
159
|
-
* during the synchronous phase of execution. Any recursive calls (e.g., a method calling
|
|
160
|
-
* itself via `this.method()` or `Class.prototype.method()`) happen synchronously and will
|
|
161
|
-
* hit the interceptor. After the synchronous phase completes (i.e., `originalMethod.apply()`
|
|
162
|
-
* returns a Promise), the method is immediately restored so that concurrent calls arriving
|
|
163
|
-
* after an `await` suspension go through the full wrapper instead of being intercepted.
|
|
164
|
-
*
|
|
165
|
-
* @param originalMethod - The original method to wrap.
|
|
166
|
-
* @param methodName - The name of the method being wrapped.
|
|
167
|
-
* @param executingInstances - A WeakSet tracking instances that are currently executing.
|
|
168
|
-
* @param setMethod - A function to set the method implementation.
|
|
169
|
-
* @param getMethod - A function to get the current method implementation.
|
|
170
|
-
* @returns A wrapped version of the method with error tracking and recursion protection.
|
|
171
|
-
*/
|
|
172
|
-
function createErrorTrackingWrapper(originalMethod, methodName, executingInstances, setMethod, getMethod) {
|
|
173
|
-
return async function (...args) {
|
|
174
|
-
const previousMethod = getMethod();
|
|
175
|
-
const recursiveInterceptor = createRecursiveInterceptor(executingInstances, previousMethod);
|
|
176
|
-
setMethod(recursiveInterceptor);
|
|
177
|
-
executingInstances.add(this);
|
|
178
|
-
try {
|
|
179
|
-
/*
|
|
180
|
-
* Start executing the original method. The synchronous portion runs immediately.
|
|
181
|
-
* Any recursive calls (e.g., this.method() or Class.prototype.method()) during
|
|
182
|
-
* this synchronous phase will hit the recursiveInterceptor.
|
|
183
|
-
*/
|
|
184
|
-
const resultPromise = originalMethod.apply(this, args);
|
|
185
|
-
/*
|
|
186
|
-
* Restore the method immediately after the synchronous phase completes.
|
|
187
|
-
* This ensures concurrent calls (arriving after an await suspension) go through
|
|
188
|
-
* the full wrapper chain instead of being short-circuited by the interceptor.
|
|
189
|
-
*/
|
|
190
|
-
setMethod(previousMethod);
|
|
191
|
-
executingInstances.delete(this);
|
|
192
|
-
return await resultPromise;
|
|
193
|
-
}
|
|
194
|
-
catch (error) {
|
|
195
|
-
setMethod(previousMethod);
|
|
196
|
-
executingInstances.delete(this);
|
|
197
|
-
return handleMethodError(error, methodName);
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Wraps all methods of a class with error tracking.
|
|
92
|
+
* Track an error that occurred in a method
|
|
203
93
|
*
|
|
204
|
-
* @param
|
|
94
|
+
* @param error - The error to track
|
|
95
|
+
* @param method - The method name where the error occurred
|
|
205
96
|
*/
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
97
|
+
function trackError(error, method) {
|
|
98
|
+
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true")
|
|
209
99
|
return;
|
|
210
|
-
|
|
211
|
-
const methods = Object.getOwnPropertyNames(ClassToWrap.prototype).filter(name => name !== "constructor" && typeof ClassToWrap.prototype[name] === "function");
|
|
212
|
-
for (const method of methods) {
|
|
213
|
-
const currentMethod = ClassToWrap.prototype[method];
|
|
214
|
-
const originalMethod = getOriginalMethod(currentMethod);
|
|
215
|
-
const executingInstances = new WeakSet();
|
|
216
|
-
const wrappedMethod = createErrorTrackingWrapper(originalMethod, method, executingInstances, newMethod => {
|
|
217
|
-
ClassToWrap.prototype[method] = newMethod;
|
|
218
|
-
}, () => ClassToWrap.prototype[method]);
|
|
219
|
-
wrappedMethod[ORIGINAL_METHOD] = originalMethod;
|
|
220
|
-
ClassToWrap.prototype[method] = wrappedMethod;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Wraps all methods of an object with error tracking.
|
|
225
|
-
*
|
|
226
|
-
* @param object - The object whose methods should be wrapped.
|
|
227
|
-
*/
|
|
228
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
229
|
-
function wrapObjectMethodsWithErrorTracking(object) {
|
|
230
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
100
|
+
if (!shouldTrackError(error))
|
|
231
101
|
return;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
for (const method of methods) {
|
|
235
|
-
const currentMethod = object[method];
|
|
236
|
-
const originalMethod = getOriginalMethod(currentMethod);
|
|
237
|
-
const executingInstances = new WeakSet();
|
|
238
|
-
const wrappedMethod = createErrorTrackingWrapper(originalMethod, method, executingInstances, newMethod => {
|
|
239
|
-
object[method] = newMethod;
|
|
240
|
-
}, () => object[method]);
|
|
241
|
-
wrappedMethod[ORIGINAL_METHOD] = originalMethod;
|
|
242
|
-
object[method] = wrappedMethod;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Wraps all methods of a class with error tracking.
|
|
247
|
-
*
|
|
248
|
-
* @deprecated This is the old implementation that has a bug with methods calling themselves via prototype.
|
|
249
|
-
* Use Analytics.wrapClassWithErrorTracking instead.
|
|
250
|
-
* Kept for test compatibility.
|
|
251
|
-
*
|
|
252
|
-
* @param ClassToWrap - The class whose prototype methods should be wrapped.
|
|
253
|
-
*/
|
|
254
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
255
|
-
function wrapClassWithErrorTrackingDeprecated(ClassToWrap) {
|
|
256
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
const methods = Object.getOwnPropertyNames(ClassToWrap.prototype).filter(name => name !== "constructor" && typeof ClassToWrap.prototype[name] === "function");
|
|
260
|
-
for (const method of methods) {
|
|
261
|
-
const originalMethod = ClassToWrap.prototype[method];
|
|
262
|
-
ClassToWrap.prototype[method] = async function (...args) {
|
|
263
|
-
try {
|
|
264
|
-
return await originalMethod.apply(this, args);
|
|
265
|
-
}
|
|
266
|
-
catch (error) {
|
|
267
|
-
if (!shouldTrackError(error)) {
|
|
268
|
-
throw error;
|
|
269
|
-
}
|
|
270
|
-
const { message, stack } = error;
|
|
271
|
-
sendEvent({
|
|
272
|
-
method,
|
|
273
|
-
message,
|
|
274
|
-
stack,
|
|
275
|
-
name: "error",
|
|
276
|
-
}).catch(() => {
|
|
277
|
-
// ignore error
|
|
278
|
-
});
|
|
279
|
-
throw error;
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Wraps all methods of an object with error tracking.
|
|
286
|
-
*
|
|
287
|
-
* @deprecated This is the old implementation that has a bug with methods calling themselves via object property.
|
|
288
|
-
* Use Analytics.wrapObjectMethodsWithErrorTracking instead.
|
|
289
|
-
* Kept for test compatibility.
|
|
290
|
-
*
|
|
291
|
-
* @param object - The object whose methods should be wrapped.
|
|
292
|
-
*/
|
|
293
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
294
|
-
function wrapObjectMethodsWithErrorTrackingDeprecated(object) {
|
|
295
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
const methods = Object.getOwnPropertyNames(object).filter(name => name !== "constructor" && typeof object[name] === "function");
|
|
299
|
-
for (const method of methods) {
|
|
300
|
-
const originalMethod = object[method];
|
|
301
|
-
object[method] = async function (...args) {
|
|
302
|
-
try {
|
|
303
|
-
return await originalMethod.apply(this, args);
|
|
304
|
-
}
|
|
305
|
-
catch (error) {
|
|
306
|
-
if (!shouldTrackError(error)) {
|
|
307
|
-
throw error;
|
|
308
|
-
}
|
|
309
|
-
const { message, stack } = error;
|
|
310
|
-
sendEvent({
|
|
311
|
-
method,
|
|
312
|
-
message,
|
|
313
|
-
stack,
|
|
314
|
-
name: "error",
|
|
315
|
-
}).catch(() => {
|
|
316
|
-
// ignore error
|
|
317
|
-
});
|
|
318
|
-
throw error;
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
}
|
|
102
|
+
const { message, stack } = error;
|
|
103
|
+
sendEvent({ method, message, stack, name: "error" }).catch(() => { });
|
|
322
104
|
}
|
|
323
105
|
/**
|
|
324
106
|
* Filters out non-errors and API errors
|
package/_cjs/analytics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../analytics.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AAEtB,2CAAuD;AACvD,0DAAoE;AACpE,6CAAuC;AAgDvC,
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../analytics.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AAEtB,2CAAuD;AACvD,0DAAoE;AACpE,6CAAuC;AAgDvC,uDAAuD;AACvD,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAE7C,QAAA,SAAS,GAAG;IACvB,UAAU,EAAE,EAAE,EAAE,gBAAgB;IAChC,SAAS;IACT,WAAW;IACX,UAAU;CACX,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,SAAS,CAAC,KAAgB;IACvC,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,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AAK,YAAY,oCAAwB,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,KAAK,YAAY,wBAAY,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,YAAY,oBAAQ,IAAI,KAAK,CAAC,SAAS,KAAK,kBAAkB,EAAE,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/_cjs/client/cdp.js
CHANGED
|
@@ -108,12 +108,6 @@ For more information, see: https://github.com/coinbase/cdp-sdk/blob/main/typescr
|
|
|
108
108
|
process.env.DISABLE_CDP_USAGE_TRACKING !== "true") {
|
|
109
109
|
analytics_js_1.Analytics.identifier = apiKeyId;
|
|
110
110
|
}
|
|
111
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING !== "true") {
|
|
112
|
-
analytics_js_1.Analytics.wrapClassWithErrorTracking(CdpClient);
|
|
113
|
-
analytics_js_1.Analytics.wrapClassWithErrorTracking(evm_js_1.EvmClient);
|
|
114
|
-
analytics_js_1.Analytics.wrapClassWithErrorTracking(solana_js_1.SolanaClient);
|
|
115
|
-
analytics_js_1.Analytics.wrapClassWithErrorTracking(policies_js_1.PoliciesClient);
|
|
116
|
-
}
|
|
117
111
|
this.evm = new evm_js_1.EvmClient();
|
|
118
112
|
this.solana = new solana_js_1.SolanaClient();
|
|
119
113
|
this.policies = new policies_js_1.PoliciesClient();
|
package/_cjs/client/cdp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../client/cdp.ts"],"names":[],"mappings":";;;AAAA,kDAA4C;AAC5C,yDAA8D;AAC9D,8CAAwC;AACxC,sDAAyD;AACzD,yCAAyC;AACzC,wDAAwD;AACxD,kDAAkD;AAelD;;GAEG;AACH,MAAa,SAAS;IACpB,4CAA4C;IACrC,GAAG,CAAY;IAEtB,+CAA+C;IACxC,MAA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