@coinbase/cdp-sdk 1.44.0 → 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 +20 -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 -229
- 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 +139 -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 -228
- 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 +136 -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 +482 -187
- 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 -304
- 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 +624 -190
- 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,218 +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
|
-
* Executes a method with recursion protection by tracking executing instances.
|
|
136
|
-
*
|
|
137
|
-
* @param executingInstances - A WeakSet tracking instances that are currently executing.
|
|
138
|
-
* @param originalMethod - The original method to execute.
|
|
139
|
-
* @param context - The context (this) to bind the method to.
|
|
140
|
-
* @param args - The arguments to pass to the method.
|
|
141
|
-
* @returns The result of executing the original method.
|
|
142
|
-
*/
|
|
143
|
-
async function executeWithRecursionProtection(executingInstances, originalMethod, context, args) {
|
|
144
|
-
if (executingInstances.has(context)) {
|
|
145
|
-
return args[0];
|
|
146
|
-
}
|
|
147
|
-
executingInstances.add(context);
|
|
148
|
-
try {
|
|
149
|
-
return await originalMethod.apply(context, args);
|
|
150
|
-
}
|
|
151
|
-
finally {
|
|
152
|
-
executingInstances.delete(context);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Handles an error that occurred in a method by sending an analytics event and rethrowing the error.
|
|
157
|
-
*
|
|
158
|
-
* @param error - The error that occurred.
|
|
159
|
-
* @param methodName - The name of the method where the error occurred.
|
|
160
|
-
*/
|
|
161
|
-
async function handleMethodError(error, methodName) {
|
|
162
|
-
if (!shouldTrackError(error)) {
|
|
163
|
-
throw error;
|
|
164
|
-
}
|
|
165
|
-
const { message, stack } = error;
|
|
166
|
-
sendEvent({
|
|
167
|
-
method: methodName,
|
|
168
|
-
message,
|
|
169
|
-
stack,
|
|
170
|
-
name: "error",
|
|
171
|
-
}).catch(() => {
|
|
172
|
-
// ignore error
|
|
173
|
-
});
|
|
174
|
-
throw error;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Creates a wrapper function that adds error tracking and recursion protection to a method.
|
|
92
|
+
* Track an error that occurred in a method
|
|
178
93
|
*
|
|
179
|
-
* @param
|
|
180
|
-
* @param
|
|
181
|
-
* @param executingInstances - A WeakSet tracking instances that are currently executing.
|
|
182
|
-
* @param setMethod - A function to set the method implementation.
|
|
183
|
-
* @param getMethod - A function to get the current method implementation.
|
|
184
|
-
* @returns A wrapped version of the method with error tracking and recursion protection.
|
|
94
|
+
* @param error - The error to track
|
|
95
|
+
* @param method - The method name where the error occurred
|
|
185
96
|
*/
|
|
186
|
-
function
|
|
187
|
-
|
|
188
|
-
const previousMethod = getMethod();
|
|
189
|
-
const recursiveInterceptor = createRecursiveInterceptor(executingInstances, previousMethod);
|
|
190
|
-
setMethod(recursiveInterceptor);
|
|
191
|
-
try {
|
|
192
|
-
const result = await executeWithRecursionProtection(executingInstances, originalMethod, this, args);
|
|
193
|
-
setMethod(previousMethod);
|
|
194
|
-
return result;
|
|
195
|
-
}
|
|
196
|
-
catch (error) {
|
|
197
|
-
setMethod(previousMethod);
|
|
198
|
-
return handleMethodError(error, methodName);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Wraps all methods of a class with error tracking.
|
|
204
|
-
*
|
|
205
|
-
* @param ClassToWrap - The class whose prototype methods should be wrapped.
|
|
206
|
-
*/
|
|
207
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
208
|
-
function wrapClassWithErrorTracking(ClassToWrap) {
|
|
209
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
const methods = Object.getOwnPropertyNames(ClassToWrap.prototype).filter(name => name !== "constructor" && typeof ClassToWrap.prototype[name] === "function");
|
|
213
|
-
for (const method of methods) {
|
|
214
|
-
const currentMethod = ClassToWrap.prototype[method];
|
|
215
|
-
const originalMethod = getOriginalMethod(currentMethod);
|
|
216
|
-
const executingInstances = new WeakSet();
|
|
217
|
-
const wrappedMethod = createErrorTrackingWrapper(originalMethod, method, executingInstances, newMethod => {
|
|
218
|
-
ClassToWrap.prototype[method] = newMethod;
|
|
219
|
-
}, () => ClassToWrap.prototype[method]);
|
|
220
|
-
wrappedMethod[ORIGINAL_METHOD] = originalMethod;
|
|
221
|
-
ClassToWrap.prototype[method] = wrappedMethod;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Wraps all methods of an object with error tracking.
|
|
226
|
-
*
|
|
227
|
-
* @param object - The object whose methods should be wrapped.
|
|
228
|
-
*/
|
|
229
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
230
|
-
function wrapObjectMethodsWithErrorTracking(object) {
|
|
231
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
const methods = Object.getOwnPropertyNames(object).filter(name => name !== "constructor" && typeof object[name] === "function");
|
|
235
|
-
for (const method of methods) {
|
|
236
|
-
const currentMethod = object[method];
|
|
237
|
-
const originalMethod = getOriginalMethod(currentMethod);
|
|
238
|
-
const executingInstances = new WeakSet();
|
|
239
|
-
const wrappedMethod = createErrorTrackingWrapper(originalMethod, method, executingInstances, newMethod => {
|
|
240
|
-
object[method] = newMethod;
|
|
241
|
-
}, () => object[method]);
|
|
242
|
-
wrappedMethod[ORIGINAL_METHOD] = originalMethod;
|
|
243
|
-
object[method] = wrappedMethod;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Wraps all methods of a class with error tracking.
|
|
248
|
-
*
|
|
249
|
-
* @deprecated This is the old implementation that has a bug with methods calling themselves via prototype.
|
|
250
|
-
* Use Analytics.wrapClassWithErrorTracking instead.
|
|
251
|
-
* Kept for test compatibility.
|
|
252
|
-
*
|
|
253
|
-
* @param ClassToWrap - The class whose prototype methods should be wrapped.
|
|
254
|
-
*/
|
|
255
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
256
|
-
function wrapClassWithErrorTrackingDeprecated(ClassToWrap) {
|
|
257
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
97
|
+
function trackError(error, method) {
|
|
98
|
+
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true")
|
|
258
99
|
return;
|
|
259
|
-
|
|
260
|
-
const methods = Object.getOwnPropertyNames(ClassToWrap.prototype).filter(name => name !== "constructor" && typeof ClassToWrap.prototype[name] === "function");
|
|
261
|
-
for (const method of methods) {
|
|
262
|
-
const originalMethod = ClassToWrap.prototype[method];
|
|
263
|
-
ClassToWrap.prototype[method] = async function (...args) {
|
|
264
|
-
try {
|
|
265
|
-
return await originalMethod.apply(this, args);
|
|
266
|
-
}
|
|
267
|
-
catch (error) {
|
|
268
|
-
if (!shouldTrackError(error)) {
|
|
269
|
-
throw error;
|
|
270
|
-
}
|
|
271
|
-
const { message, stack } = error;
|
|
272
|
-
sendEvent({
|
|
273
|
-
method,
|
|
274
|
-
message,
|
|
275
|
-
stack,
|
|
276
|
-
name: "error",
|
|
277
|
-
}).catch(() => {
|
|
278
|
-
// ignore error
|
|
279
|
-
});
|
|
280
|
-
throw error;
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* Wraps all methods of an object with error tracking.
|
|
287
|
-
*
|
|
288
|
-
* @deprecated This is the old implementation that has a bug with methods calling themselves via object property.
|
|
289
|
-
* Use Analytics.wrapObjectMethodsWithErrorTracking instead.
|
|
290
|
-
* Kept for test compatibility.
|
|
291
|
-
*
|
|
292
|
-
* @param object - The object whose methods should be wrapped.
|
|
293
|
-
*/
|
|
294
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
295
|
-
function wrapObjectMethodsWithErrorTrackingDeprecated(object) {
|
|
296
|
-
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
100
|
+
if (!shouldTrackError(error))
|
|
297
101
|
return;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
for (const method of methods) {
|
|
301
|
-
const originalMethod = object[method];
|
|
302
|
-
object[method] = async function (...args) {
|
|
303
|
-
try {
|
|
304
|
-
return await originalMethod.apply(this, args);
|
|
305
|
-
}
|
|
306
|
-
catch (error) {
|
|
307
|
-
if (!shouldTrackError(error)) {
|
|
308
|
-
throw error;
|
|
309
|
-
}
|
|
310
|
-
const { message, stack } = error;
|
|
311
|
-
sendEvent({
|
|
312
|
-
method,
|
|
313
|
-
message,
|
|
314
|
-
stack,
|
|
315
|
-
name: "error",
|
|
316
|
-
}).catch(() => {
|
|
317
|
-
// ignore error
|
|
318
|
-
});
|
|
319
|
-
throw error;
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
}
|
|
102
|
+
const { message, stack } = error;
|
|
103
|
+
sendEvent({ method, message, stack, name: "error" }).catch(() => { });
|
|
323
104
|
}
|
|
324
105
|
/**
|
|
325
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,CAAC,GAAG,CAAC,2BAA2B,KAAK,MAAM,EAAE,CAAC;QACjF,OAAO;IACT,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,0BAA0B,K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,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,MAAM,CAAe;IAE5B,iDAAiD;IAC1C,QAAQ,CAAiB;IAEhC,iDAAiD;IAC1C,OAAO,CAAmB;IAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,YAAY,UAA4B,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