@coinbase/cdp-sdk 1.48.3 → 1.49.1
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/_cjs/client/end-user/endUser.js +47 -0
- package/_cjs/client/end-user/endUser.js.map +1 -1
- package/_cjs/client/end-user/toEndUserAccount.js +11 -0
- package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
- package/_cjs/index.js +5 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +52 -2
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/embedded-wallets/embedded-wallets.js +47 -2
- package/_cjs/openapi-client/generated/embedded-wallets/embedded-wallets.js.map +1 -1
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js +24 -2
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js +23 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js +45 -1
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_cjs/policies/evmSchema.js +65 -1
- package/_cjs/policies/evmSchema.js.map +1 -1
- package/_cjs/policies/solanaSchema.js +34 -1
- package/_cjs/policies/solanaSchema.js.map +1 -1
- package/_cjs/policies/types.js +3 -0
- package/_cjs/policies/types.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/client/end-user/endUser.js +47 -0
- package/_esm/client/end-user/endUser.js.map +1 -1
- package/_esm/client/end-user/toEndUserAccount.js +11 -0
- package/_esm/client/end-user/toEndUserAccount.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 +50 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/embedded-wallets/embedded-wallets.js +43 -1
- package/_esm/openapi-client/generated/embedded-wallets/embedded-wallets.js.map +1 -1
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js +22 -1
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/onramp/onramp.js +21 -0
- package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js +40 -0
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
- package/_esm/policies/evmSchema.js +64 -0
- package/_esm/policies/evmSchema.js.map +1 -1
- package/_esm/policies/solanaSchema.js +33 -0
- package/_esm/policies/solanaSchema.js.map +1 -1
- package/_esm/policies/types.js +5 -2
- package/_esm/policies/types.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/client/end-user/endUser.d.ts +35 -1
- package/_types/client/end-user/endUser.d.ts.map +1 -1
- package/_types/client/end-user/endUser.types.d.ts +68 -1
- package/_types/client/end-user/endUser.types.d.ts.map +1 -1
- package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
- package/_types/index.d.ts +3 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +474 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/embedded-wallets/embedded-wallets.d.ts +24 -2
- package/_types/openapi-client/generated/embedded-wallets/embedded-wallets.d.ts.map +1 -1
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +22 -2
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts +16 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +32 -1
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +5 -1
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +1448 -0
- package/_types/policies/evmSchema.d.ts.map +1 -1
- package/_types/policies/solanaSchema.d.ts +472 -0
- package/_types/policies/solanaSchema.d.ts.map +1 -1
- package/_types/policies/types.d.ts +7642 -4536
- package/_types/policies/types.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/client/end-user/endUser.ts +67 -0
- package/client/end-user/endUser.types.ts +83 -0
- package/client/end-user/toEndUserAccount.ts +27 -0
- package/index.ts +21 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +560 -1
- package/openapi-client/generated/embedded-wallets/embedded-wallets.ts +86 -0
- package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +31 -1
- package/openapi-client/generated/onramp/onramp.ts +31 -0
- package/openapi-client/generated/x402-facilitator/x402-facilitator.ts +84 -0
- package/package.json +1 -1
- package/policies/evmSchema.ts +82 -0
- package/policies/solanaSchema.ts +42 -0
- package/policies/types.ts +6 -0
- package/version.ts +1 -1
|
@@ -2203,10 +2203,91 @@ export interface SignEndUserSolMessageRule {
|
|
|
2203
2203
|
operation: SignEndUserSolMessageRuleOperation;
|
|
2204
2204
|
criteria: SignEndUserSolMessageCriteria;
|
|
2205
2205
|
}
|
|
2206
|
+
export type SendEndUserEvmAssetCriteriaItem = EvmNetworkCriterion | EvmDataCriterion | NetUSDChangeCriterion;
|
|
2207
|
+
/**
|
|
2208
|
+
* A schema for specifying criteria for the sendEndUserEvmAsset operation.
|
|
2209
|
+
*/
|
|
2210
|
+
export type SendEndUserEvmAssetCriteria = SendEndUserEvmAssetCriteriaItem[];
|
|
2211
|
+
/**
|
|
2212
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2213
|
+
*/
|
|
2214
|
+
export type SendEndUserEvmAssetRuleAction = (typeof SendEndUserEvmAssetRuleAction)[keyof typeof SendEndUserEvmAssetRuleAction];
|
|
2215
|
+
export declare const SendEndUserEvmAssetRuleAction: {
|
|
2216
|
+
readonly reject: "reject";
|
|
2217
|
+
readonly accept: "accept";
|
|
2218
|
+
};
|
|
2219
|
+
/**
|
|
2220
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2221
|
+
*/
|
|
2222
|
+
export type SendEndUserEvmAssetRuleOperation = (typeof SendEndUserEvmAssetRuleOperation)[keyof typeof SendEndUserEvmAssetRuleOperation];
|
|
2223
|
+
export declare const SendEndUserEvmAssetRuleOperation: {
|
|
2224
|
+
readonly sendEndUserEvmAsset: "sendEndUserEvmAsset";
|
|
2225
|
+
};
|
|
2226
|
+
export interface SendEndUserEvmAssetRule {
|
|
2227
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2228
|
+
action: SendEndUserEvmAssetRuleAction;
|
|
2229
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2230
|
+
operation: SendEndUserEvmAssetRuleOperation;
|
|
2231
|
+
criteria: SendEndUserEvmAssetCriteria;
|
|
2232
|
+
}
|
|
2233
|
+
export type SendEndUserSolAssetCriteriaItem = SplAddressCriterion | SplValueCriterion | SolDataCriterion | SolNetworkCriterion;
|
|
2234
|
+
/**
|
|
2235
|
+
* A schema for specifying criteria for the sendEndUserSolAsset operation.
|
|
2236
|
+
*/
|
|
2237
|
+
export type SendEndUserSolAssetCriteria = SendEndUserSolAssetCriteriaItem[];
|
|
2238
|
+
/**
|
|
2239
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2240
|
+
*/
|
|
2241
|
+
export type SendEndUserSolAssetRuleAction = (typeof SendEndUserSolAssetRuleAction)[keyof typeof SendEndUserSolAssetRuleAction];
|
|
2242
|
+
export declare const SendEndUserSolAssetRuleAction: {
|
|
2243
|
+
readonly reject: "reject";
|
|
2244
|
+
readonly accept: "accept";
|
|
2245
|
+
};
|
|
2246
|
+
/**
|
|
2247
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2248
|
+
*/
|
|
2249
|
+
export type SendEndUserSolAssetRuleOperation = (typeof SendEndUserSolAssetRuleOperation)[keyof typeof SendEndUserSolAssetRuleOperation];
|
|
2250
|
+
export declare const SendEndUserSolAssetRuleOperation: {
|
|
2251
|
+
readonly sendEndUserSolAsset: "sendEndUserSolAsset";
|
|
2252
|
+
};
|
|
2253
|
+
export interface SendEndUserSolAssetRule {
|
|
2254
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2255
|
+
action: SendEndUserSolAssetRuleAction;
|
|
2256
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2257
|
+
operation: SendEndUserSolAssetRuleOperation;
|
|
2258
|
+
criteria: SendEndUserSolAssetCriteria;
|
|
2259
|
+
}
|
|
2260
|
+
export type CreateEndUserEvmSwapCriteriaItem = EvmNetworkCriterion | EvmDataCriterion | NetUSDChangeCriterion;
|
|
2261
|
+
/**
|
|
2262
|
+
* A schema for specifying criteria for the createEndUserEvmSwap operation.
|
|
2263
|
+
*/
|
|
2264
|
+
export type CreateEndUserEvmSwapCriteria = CreateEndUserEvmSwapCriteriaItem[];
|
|
2265
|
+
/**
|
|
2266
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2267
|
+
*/
|
|
2268
|
+
export type CreateEndUserEvmSwapRuleAction = (typeof CreateEndUserEvmSwapRuleAction)[keyof typeof CreateEndUserEvmSwapRuleAction];
|
|
2269
|
+
export declare const CreateEndUserEvmSwapRuleAction: {
|
|
2270
|
+
readonly reject: "reject";
|
|
2271
|
+
readonly accept: "accept";
|
|
2272
|
+
};
|
|
2273
|
+
/**
|
|
2274
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2275
|
+
*/
|
|
2276
|
+
export type CreateEndUserEvmSwapRuleOperation = (typeof CreateEndUserEvmSwapRuleOperation)[keyof typeof CreateEndUserEvmSwapRuleOperation];
|
|
2277
|
+
export declare const CreateEndUserEvmSwapRuleOperation: {
|
|
2278
|
+
readonly createEndUserEvmSwap: "createEndUserEvmSwap";
|
|
2279
|
+
};
|
|
2280
|
+
export interface CreateEndUserEvmSwapRule {
|
|
2281
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2282
|
+
action: CreateEndUserEvmSwapRuleAction;
|
|
2283
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2284
|
+
operation: CreateEndUserEvmSwapRuleOperation;
|
|
2285
|
+
criteria: CreateEndUserEvmSwapCriteria;
|
|
2286
|
+
}
|
|
2206
2287
|
/**
|
|
2207
2288
|
* A rule that limits the behavior of an account.
|
|
2208
2289
|
*/
|
|
2209
|
-
export type Rule = SignEvmTransactionRule | SendEvmTransactionRule | SignEvmMessageRule | SignEvmTypedDataRule | SignSolTransactionRule | SendSolTransactionRule | SignSolMessageRule | SignEvmHashRule | PrepareUserOperationRule | SendUserOperationRule | SignEndUserEvmTransactionRule | SendEndUserEvmTransactionRule | SignEndUserEvmMessageRule | SignEndUserEvmTypedDataRule | SignEndUserEvmHashRule | SignEndUserSolTransactionRule | SendEndUserSolTransactionRule | SignEndUserSolMessageRule;
|
|
2290
|
+
export type Rule = SignEvmTransactionRule | SendEvmTransactionRule | SignEvmMessageRule | SignEvmTypedDataRule | SignSolTransactionRule | SendSolTransactionRule | SignSolMessageRule | SignEvmHashRule | PrepareUserOperationRule | SendUserOperationRule | SignEndUserEvmTransactionRule | SendEndUserEvmTransactionRule | SignEndUserEvmMessageRule | SignEndUserEvmTypedDataRule | SignEndUserEvmHashRule | SignEndUserSolTransactionRule | SendEndUserSolTransactionRule | SignEndUserSolMessageRule | SendEndUserEvmAssetRule | SendEndUserSolAssetRule | CreateEndUserEvmSwapRule;
|
|
2210
2291
|
/**
|
|
2211
2292
|
* The scope of the policy. Only one project-level policy can exist at any time.
|
|
2212
2293
|
*/
|
|
@@ -3147,6 +3228,11 @@ export declare const X402SupportedPaymentKindNetwork: {
|
|
|
3147
3228
|
readonly "eip155:137": "eip155:137";
|
|
3148
3229
|
readonly "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
3149
3230
|
readonly "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
|
3231
|
+
readonly avalanche: "avalanche";
|
|
3232
|
+
readonly arbitrum: "arbitrum";
|
|
3233
|
+
readonly "arbitrum-sepolia": "arbitrum-sepolia";
|
|
3234
|
+
readonly world: "world";
|
|
3235
|
+
readonly "world-sepolia": "world-sepolia";
|
|
3150
3236
|
};
|
|
3151
3237
|
/**
|
|
3152
3238
|
* The optional additional scheme-specific payment info.
|
|
@@ -3166,6 +3252,193 @@ export interface X402SupportedPaymentKind {
|
|
|
3166
3252
|
/** The optional additional scheme-specific payment info. */
|
|
3167
3253
|
extra?: X402SupportedPaymentKindExtra;
|
|
3168
3254
|
}
|
|
3255
|
+
/**
|
|
3256
|
+
* Quality metrics for a discovered x402 resource.
|
|
3257
|
+
*/
|
|
3258
|
+
export interface X402ResourceQuality {
|
|
3259
|
+
/** Total number of paid calls to a resource in the last 30 days. */
|
|
3260
|
+
l30DaysTotalCalls?: number;
|
|
3261
|
+
/** Number of unique payers to a resource in the last 30 days. */
|
|
3262
|
+
l30DaysUniquePayers?: number;
|
|
3263
|
+
/** Timestamp of the most recent paid call to a resource. */
|
|
3264
|
+
lastCalledAt?: string;
|
|
3265
|
+
}
|
|
3266
|
+
/**
|
|
3267
|
+
* Communication protocol (e.g., "http", "mcp").
|
|
3268
|
+
*/
|
|
3269
|
+
export type X402DiscoveryResourceType = (typeof X402DiscoveryResourceType)[keyof typeof X402DiscoveryResourceType];
|
|
3270
|
+
export declare const X402DiscoveryResourceType: {
|
|
3271
|
+
readonly http: "http";
|
|
3272
|
+
readonly mcp: "mcp";
|
|
3273
|
+
};
|
|
3274
|
+
/**
|
|
3275
|
+
* Map of x402 protocol extensions supported by the resource, keyed by extension name.
|
|
3276
|
+
*/
|
|
3277
|
+
export type X402DiscoveryResourceExtensions = {
|
|
3278
|
+
[key: string]: unknown;
|
|
3279
|
+
};
|
|
3280
|
+
/**
|
|
3281
|
+
* A single discovered x402 resource.
|
|
3282
|
+
*/
|
|
3283
|
+
export interface X402DiscoveryResource {
|
|
3284
|
+
/** The URL of the resource. */
|
|
3285
|
+
resource: string;
|
|
3286
|
+
/** A human-readable description of the resource. */
|
|
3287
|
+
description?: string;
|
|
3288
|
+
/** Communication protocol (e.g., "http", "mcp"). */
|
|
3289
|
+
type: X402DiscoveryResourceType;
|
|
3290
|
+
x402Version: X402Version;
|
|
3291
|
+
/** Timestamp of the last update. */
|
|
3292
|
+
lastUpdated?: string;
|
|
3293
|
+
/** Payment requirements accepted by the resource. */
|
|
3294
|
+
accepts?: X402PaymentRequirements[];
|
|
3295
|
+
/** Map of x402 protocol extensions supported by the resource, keyed by extension name. */
|
|
3296
|
+
extensions?: X402DiscoveryResourceExtensions;
|
|
3297
|
+
quality?: X402ResourceQuality;
|
|
3298
|
+
}
|
|
3299
|
+
/**
|
|
3300
|
+
* Pagination information for the response.
|
|
3301
|
+
*/
|
|
3302
|
+
export type X402DiscoveryResourcesResponsePagination = {
|
|
3303
|
+
/** The number of discovered x402 resources to return per page. */
|
|
3304
|
+
limit?: number;
|
|
3305
|
+
/** The offset of the first discovered x402 resource to return. */
|
|
3306
|
+
offset?: number;
|
|
3307
|
+
/** The total number of discovered x402 resources. */
|
|
3308
|
+
total?: number;
|
|
3309
|
+
};
|
|
3310
|
+
/**
|
|
3311
|
+
* Response containing discovered x402 resources.
|
|
3312
|
+
*/
|
|
3313
|
+
export interface X402DiscoveryResourcesResponse {
|
|
3314
|
+
x402Version: X402Version;
|
|
3315
|
+
/** List of discovered x402 resources. */
|
|
3316
|
+
items: X402DiscoveryResource[];
|
|
3317
|
+
/** Pagination information for the response. */
|
|
3318
|
+
pagination: X402DiscoveryResourcesResponsePagination;
|
|
3319
|
+
}
|
|
3320
|
+
/**
|
|
3321
|
+
* Pagination information for the response.
|
|
3322
|
+
*/
|
|
3323
|
+
export type X402DiscoveryMerchantResponsePagination = {
|
|
3324
|
+
/** The number of resources returned per page. */
|
|
3325
|
+
limit?: number;
|
|
3326
|
+
/** The offset of the first resource returned. */
|
|
3327
|
+
offset?: number;
|
|
3328
|
+
/** The total number of resources associated with the merchant's payTo address. */
|
|
3329
|
+
total?: number;
|
|
3330
|
+
};
|
|
3331
|
+
/**
|
|
3332
|
+
* Response containing x402 resources associated with a merchant payment address.
|
|
3333
|
+
*/
|
|
3334
|
+
export interface X402DiscoveryMerchantResponse {
|
|
3335
|
+
x402Version: X402Version;
|
|
3336
|
+
payTo: BlockchainAddress;
|
|
3337
|
+
/** List of discovered x402 resources associated with the merchant's payTo address. */
|
|
3338
|
+
resources: X402DiscoveryResource[];
|
|
3339
|
+
/** Pagination information for the response. */
|
|
3340
|
+
pagination: X402DiscoveryMerchantResponsePagination;
|
|
3341
|
+
}
|
|
3342
|
+
/**
|
|
3343
|
+
* The search method used to retrieve the results (e.g., "text" or "vector").
|
|
3344
|
+
*/
|
|
3345
|
+
export type X402SearchResourcesResponseSearchMethod = (typeof X402SearchResourcesResponseSearchMethod)[keyof typeof X402SearchResourcesResponseSearchMethod];
|
|
3346
|
+
export declare const X402SearchResourcesResponseSearchMethod: {
|
|
3347
|
+
readonly text: "text";
|
|
3348
|
+
readonly vector: "vector";
|
|
3349
|
+
};
|
|
3350
|
+
/**
|
|
3351
|
+
* Response from a search for x402 resources.
|
|
3352
|
+
*/
|
|
3353
|
+
export interface X402SearchResourcesResponse {
|
|
3354
|
+
/** List of x402 resources matching the search query and filters. */
|
|
3355
|
+
resources: X402DiscoveryResource[];
|
|
3356
|
+
/** Indicates whether the result set was truncated because there were more results than the requested limit. */
|
|
3357
|
+
partialResults: boolean;
|
|
3358
|
+
/** The search method used to retrieve the results (e.g., "text" or "vector"). */
|
|
3359
|
+
searchMethod?: X402SearchResourcesResponseSearchMethod;
|
|
3360
|
+
x402Version: X402Version;
|
|
3361
|
+
}
|
|
3362
|
+
/**
|
|
3363
|
+
* JSON-RPC version, must be "2.0".
|
|
3364
|
+
*/
|
|
3365
|
+
export type X402McpRequestJsonrpc = (typeof X402McpRequestJsonrpc)[keyof typeof X402McpRequestJsonrpc];
|
|
3366
|
+
export declare const X402McpRequestJsonrpc: {
|
|
3367
|
+
readonly "20": "2.0";
|
|
3368
|
+
};
|
|
3369
|
+
/**
|
|
3370
|
+
* Request identifier.
|
|
3371
|
+
*/
|
|
3372
|
+
export type X402McpRequestId = string | number;
|
|
3373
|
+
/**
|
|
3374
|
+
* Optional parameters for the method.
|
|
3375
|
+
*/
|
|
3376
|
+
export type X402McpRequestParams = {
|
|
3377
|
+
[key: string]: unknown;
|
|
3378
|
+
};
|
|
3379
|
+
/**
|
|
3380
|
+
* A JSON-RPC 2.0 request for the Model Context Protocol.
|
|
3381
|
+
*/
|
|
3382
|
+
export interface X402McpRequest {
|
|
3383
|
+
/** JSON-RPC version, must be "2.0". */
|
|
3384
|
+
jsonrpc: X402McpRequestJsonrpc;
|
|
3385
|
+
/** Request identifier. */
|
|
3386
|
+
id?: X402McpRequestId;
|
|
3387
|
+
/** The MCP method to invoke. */
|
|
3388
|
+
method: string;
|
|
3389
|
+
/** Optional parameters for the method. */
|
|
3390
|
+
params?: X402McpRequestParams;
|
|
3391
|
+
}
|
|
3392
|
+
/**
|
|
3393
|
+
* Additional error data.
|
|
3394
|
+
*/
|
|
3395
|
+
export type X402McpErrorData = {
|
|
3396
|
+
[key: string]: unknown;
|
|
3397
|
+
};
|
|
3398
|
+
/**
|
|
3399
|
+
* JSON-RPC 2.0 error object.
|
|
3400
|
+
*/
|
|
3401
|
+
export interface X402McpError {
|
|
3402
|
+
/** Error code. */
|
|
3403
|
+
code: number;
|
|
3404
|
+
/** Error message. */
|
|
3405
|
+
message: string;
|
|
3406
|
+
/** Additional error data. */
|
|
3407
|
+
data?: X402McpErrorData;
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* JSON-RPC version.
|
|
3411
|
+
*/
|
|
3412
|
+
export type X402McpResponseJsonrpc = (typeof X402McpResponseJsonrpc)[keyof typeof X402McpResponseJsonrpc];
|
|
3413
|
+
export declare const X402McpResponseJsonrpc: {
|
|
3414
|
+
readonly "20": "2.0";
|
|
3415
|
+
};
|
|
3416
|
+
/**
|
|
3417
|
+
* Request identifier (matches the request ID, null for notifications).
|
|
3418
|
+
* @nullable
|
|
3419
|
+
*/
|
|
3420
|
+
export type X402McpResponseId = string | number | null;
|
|
3421
|
+
/**
|
|
3422
|
+
* The result of the method call (present on success).
|
|
3423
|
+
*/
|
|
3424
|
+
export type X402McpResponseResult = {
|
|
3425
|
+
[key: string]: unknown;
|
|
3426
|
+
};
|
|
3427
|
+
/**
|
|
3428
|
+
* A JSON-RPC 2.0 response for the Model Context Protocol.
|
|
3429
|
+
*/
|
|
3430
|
+
export interface X402McpResponse {
|
|
3431
|
+
/** JSON-RPC version. */
|
|
3432
|
+
jsonrpc: X402McpResponseJsonrpc;
|
|
3433
|
+
/**
|
|
3434
|
+
* Request identifier (matches the request ID, null for notifications).
|
|
3435
|
+
* @nullable
|
|
3436
|
+
*/
|
|
3437
|
+
id?: X402McpResponseId;
|
|
3438
|
+
/** The result of the method call (present on success). */
|
|
3439
|
+
result?: X402McpResponseResult;
|
|
3440
|
+
error?: X402McpError;
|
|
3441
|
+
}
|
|
3169
3442
|
/**
|
|
3170
3443
|
* The type of payment method to be used to complete an onramp order.
|
|
3171
3444
|
*/
|
|
@@ -3339,6 +3612,51 @@ export interface OnrampUserLimit {
|
|
|
3339
3612
|
/** The remaining amount or count available. */
|
|
3340
3613
|
remaining: string;
|
|
3341
3614
|
}
|
|
3615
|
+
/**
|
|
3616
|
+
* Date of birth.
|
|
3617
|
+
*/
|
|
3618
|
+
export interface DateOfBirth {
|
|
3619
|
+
/**
|
|
3620
|
+
* Day of birth (01-31).
|
|
3621
|
+
* @minLength 2
|
|
3622
|
+
* @maxLength 2
|
|
3623
|
+
* @pattern ^[0-9]{2}$
|
|
3624
|
+
*/
|
|
3625
|
+
day?: string;
|
|
3626
|
+
/**
|
|
3627
|
+
* Month of birth (01-12).
|
|
3628
|
+
* @minLength 2
|
|
3629
|
+
* @maxLength 2
|
|
3630
|
+
* @pattern ^[0-9]{2}$
|
|
3631
|
+
*/
|
|
3632
|
+
month?: string;
|
|
3633
|
+
/**
|
|
3634
|
+
* Year of birth (four digits).
|
|
3635
|
+
* @minLength 4
|
|
3636
|
+
* @maxLength 4
|
|
3637
|
+
* @pattern ^[0-9]{4}$
|
|
3638
|
+
*/
|
|
3639
|
+
year?: string;
|
|
3640
|
+
}
|
|
3641
|
+
/**
|
|
3642
|
+
* Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`.
|
|
3643
|
+
*/
|
|
3644
|
+
export interface OnrampLimitUpgradeIdentityFields {
|
|
3645
|
+
/** Last 4 digits of the Social Security Number (no dashes or spaces). */
|
|
3646
|
+
ssnLast4?: string;
|
|
3647
|
+
/** Date of birth. */
|
|
3648
|
+
dateOfBirth?: DateOfBirth;
|
|
3649
|
+
}
|
|
3650
|
+
/**
|
|
3651
|
+
* Request to request a limits upgrade for a user.
|
|
3652
|
+
*/
|
|
3653
|
+
export interface OnrampLimitUpgradeRequest {
|
|
3654
|
+
/** The user identifier value. For `phone_number` type, this must be in E.164 format. */
|
|
3655
|
+
userId: string;
|
|
3656
|
+
userIdType: OnrampUserIdType;
|
|
3657
|
+
/** Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`. */
|
|
3658
|
+
fields: OnrampLimitUpgradeIdentityFields;
|
|
3659
|
+
}
|
|
3342
3660
|
/**
|
|
3343
3661
|
* Unauthorized.
|
|
3344
3662
|
*/
|
|
@@ -3551,6 +3869,29 @@ export type ValidateEndUserAccessTokenBody = {
|
|
|
3551
3869
|
/** The access token in JWT format to verify. */
|
|
3552
3870
|
accessToken: string;
|
|
3553
3871
|
};
|
|
3872
|
+
export type LookupEndUserParams = {
|
|
3873
|
+
/**
|
|
3874
|
+
* The email address to search for across all email-based authentication methods.
|
|
3875
|
+
*/
|
|
3876
|
+
email?: string;
|
|
3877
|
+
/**
|
|
3878
|
+
* The OAuth provider to search by. Must be provided together with oauthSubject.
|
|
3879
|
+
*/
|
|
3880
|
+
oauthProvider?: OAuth2ProviderType;
|
|
3881
|
+
/**
|
|
3882
|
+
* The OAuth subject (the `sub` claim from the provider's ID token). Must be provided together with oauthProvider.
|
|
3883
|
+
*/
|
|
3884
|
+
oauthSubject?: string;
|
|
3885
|
+
/**
|
|
3886
|
+
* The E.164-formatted phone number to search for. Must be URL-encoded when passed as a query parameter (e.g. `+14155552671` → `%2B14155552671`).
|
|
3887
|
+
* @pattern ^\+[1-9]\d{1,14}$
|
|
3888
|
+
*/
|
|
3889
|
+
phoneNumber?: string;
|
|
3890
|
+
};
|
|
3891
|
+
export type LookupEndUser200 = {
|
|
3892
|
+
/** The list of end users matching the lookup. */
|
|
3893
|
+
endUsers: EndUser[];
|
|
3894
|
+
};
|
|
3554
3895
|
export type AddEndUserEvmAccountBody = {
|
|
3555
3896
|
[key: string]: unknown;
|
|
3556
3897
|
};
|
|
@@ -3779,6 +4120,13 @@ export type GetDelegationForEndUser200 = {
|
|
|
3779
4120
|
/** The date until which the delegation is valid. */
|
|
3780
4121
|
expiresAt: string;
|
|
3781
4122
|
};
|
|
4123
|
+
export type RevokeDelegationForEndUserParams = {
|
|
4124
|
+
/**
|
|
4125
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
4126
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
4127
|
+
*/
|
|
4128
|
+
projectID?: ProjectIDOptionalParameter;
|
|
4129
|
+
};
|
|
3782
4130
|
export type RevokeDelegationForEndUserBody = {
|
|
3783
4131
|
/**
|
|
3784
4132
|
* When revoking with a wallet authentication scheme, the ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
@@ -3786,6 +4134,51 @@ export type RevokeDelegationForEndUserBody = {
|
|
|
3786
4134
|
*/
|
|
3787
4135
|
walletSecretId?: string;
|
|
3788
4136
|
};
|
|
4137
|
+
export type CreateDelegationForEndUserAccountParams = {
|
|
4138
|
+
/**
|
|
4139
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
4140
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
4141
|
+
*/
|
|
4142
|
+
projectID?: ProjectIDOptionalParameter;
|
|
4143
|
+
};
|
|
4144
|
+
export type CreateDelegationForEndUserAccountBody = {
|
|
4145
|
+
/** The date until which the delegation is valid. */
|
|
4146
|
+
expiresAt: string;
|
|
4147
|
+
/**
|
|
4148
|
+
* The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
4149
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
4150
|
+
*/
|
|
4151
|
+
walletSecretId: string;
|
|
4152
|
+
};
|
|
4153
|
+
export type CreateDelegationForEndUserAccount201 = {
|
|
4154
|
+
/** The date until which the delegation is valid. */
|
|
4155
|
+
expiresAt: string;
|
|
4156
|
+
};
|
|
4157
|
+
export type GetDelegationForEndUserAccountParams = {
|
|
4158
|
+
/**
|
|
4159
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
4160
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
4161
|
+
*/
|
|
4162
|
+
projectID?: ProjectIDOptionalParameter;
|
|
4163
|
+
};
|
|
4164
|
+
export type GetDelegationForEndUserAccount200 = {
|
|
4165
|
+
/** The date until which the delegation is valid. */
|
|
4166
|
+
expiresAt: string;
|
|
4167
|
+
};
|
|
4168
|
+
export type RevokeDelegationForEndUserAccountParams = {
|
|
4169
|
+
/**
|
|
4170
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
4171
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
4172
|
+
*/
|
|
4173
|
+
projectID?: ProjectIDOptionalParameter;
|
|
4174
|
+
};
|
|
4175
|
+
export type RevokeDelegationForEndUserAccountBody = {
|
|
4176
|
+
/**
|
|
4177
|
+
* When revoking with a wallet authentication scheme, the ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
4178
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
4179
|
+
*/
|
|
4180
|
+
walletSecretId?: string;
|
|
4181
|
+
};
|
|
3789
4182
|
export type CreateEvmEip7702DelegationWithEndUserAccountParams = {
|
|
3790
4183
|
/**
|
|
3791
4184
|
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
@@ -4545,6 +4938,86 @@ export type SettleX402PaymentBody = {
|
|
|
4545
4938
|
paymentPayload: X402PaymentPayload;
|
|
4546
4939
|
paymentRequirements: X402PaymentRequirements;
|
|
4547
4940
|
};
|
|
4941
|
+
export type ListX402DiscoveryResourcesParams = {
|
|
4942
|
+
/**
|
|
4943
|
+
* Filter by protocol type (e.g., "http", "mcp").
|
|
4944
|
+
Currently, the only supported protocol type is "http".
|
|
4945
|
+
*/
|
|
4946
|
+
type?: string;
|
|
4947
|
+
/**
|
|
4948
|
+
* The number of discovered x402 resources to return per page.
|
|
4949
|
+
*/
|
|
4950
|
+
limit?: number;
|
|
4951
|
+
/**
|
|
4952
|
+
* The offset of the first discovered x402 resource to return.
|
|
4953
|
+
*/
|
|
4954
|
+
offset?: number;
|
|
4955
|
+
};
|
|
4956
|
+
export type ListX402DiscoveryMerchantParams = {
|
|
4957
|
+
/**
|
|
4958
|
+
* The merchant's payment address to look up.
|
|
4959
|
+
This is the onchain address that payment requirements route funds to.
|
|
4960
|
+
*/
|
|
4961
|
+
payTo: BlockchainAddress;
|
|
4962
|
+
/**
|
|
4963
|
+
* The number of resources to return per page.
|
|
4964
|
+
*/
|
|
4965
|
+
limit?: number;
|
|
4966
|
+
/**
|
|
4967
|
+
* The offset of the first resource to return.
|
|
4968
|
+
*/
|
|
4969
|
+
offset?: number;
|
|
4970
|
+
};
|
|
4971
|
+
export type SearchX402ResourcesParams = {
|
|
4972
|
+
/**
|
|
4973
|
+
* Full-text or semantic search query to find matching resources.
|
|
4974
|
+
* @maxLength 400
|
|
4975
|
+
*/
|
|
4976
|
+
query?: string;
|
|
4977
|
+
/**
|
|
4978
|
+
* Filter results by network in CAIP-2 format (e.g., `eip155:8453`) or legacy name (e.g., `base`, `base-sepolia`, `solana`).
|
|
4979
|
+
Legacy names are normalized to their CAIP-2 equivalents before filtering.
|
|
4980
|
+
*/
|
|
4981
|
+
network?: string;
|
|
4982
|
+
/**
|
|
4983
|
+
* Filter results by asset address.
|
|
4984
|
+
For EVM networks, provide a 0x-prefixed EVM address. For Solana networks, provide a base58-encoded address.
|
|
4985
|
+
Matching is case-insensitive.
|
|
4986
|
+
*/
|
|
4987
|
+
asset?: string;
|
|
4988
|
+
/**
|
|
4989
|
+
* Filter results by payment scheme (e.g., `exact`).
|
|
4990
|
+
*/
|
|
4991
|
+
scheme?: string;
|
|
4992
|
+
/**
|
|
4993
|
+
* Filter results by the merchant's payment address.
|
|
4994
|
+
For EVM networks, provide a 0x-prefixed EVM address. For Solana networks, provide a base58-encoded address.
|
|
4995
|
+
*/
|
|
4996
|
+
payTo?: BlockchainAddress;
|
|
4997
|
+
/**
|
|
4998
|
+
* Filter results to resources whose URL contains this value (case-insensitive substring match against the resource URL).
|
|
4999
|
+
Useful for narrowing results to a specific domain, subdomain, or path segment. Combine with `query` to perform semantic search restricted to a URL subset.
|
|
5000
|
+
Tip: include enough of the URL to disambiguate (e.g. `api.example.com` rather than `example`) — a short substring may also match resources whose path contains the same string.
|
|
5001
|
+
* @minLength 3
|
|
5002
|
+
* @maxLength 2048
|
|
5003
|
+
*/
|
|
5004
|
+
urlSubstring?: string;
|
|
5005
|
+
/**
|
|
5006
|
+
* Filter results to resources with a USD price at or below this value.
|
|
5007
|
+
*/
|
|
5008
|
+
maxUsdPrice?: string;
|
|
5009
|
+
/**
|
|
5010
|
+
* Filter results to resources that support the specified protocol extensions. Can be specified multiple times to filter by multiple extensions.
|
|
5011
|
+
*/
|
|
5012
|
+
extensions?: string[];
|
|
5013
|
+
/**
|
|
5014
|
+
* Maximum number of resources to return. Must be a positive integer no greater than 20.
|
|
5015
|
+
Defaults to 20.
|
|
5016
|
+
* @minimum 1
|
|
5017
|
+
* @maximum 20
|
|
5018
|
+
*/
|
|
5019
|
+
limit?: number;
|
|
5020
|
+
};
|
|
4548
5021
|
export type CreateOnrampOrderBody = {
|
|
4549
5022
|
/** The timestamp of when the user acknowledged that by using Coinbase Onramp they are accepting the Coinbase Terms (https://www.coinbase.com/legal/guest-checkout/us), User Agreement (https://www.coinbase.com/legal/user_agreement), and Privacy Policy (https://www.coinbase.com/legal/privacy). */
|
|
4550
5023
|
agreementAcceptedAt: string;
|