@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
|
@@ -2776,6 +2776,130 @@ export interface SignEndUserSolMessageRule {
|
|
|
2776
2776
|
criteria: SignEndUserSolMessageCriteria;
|
|
2777
2777
|
}
|
|
2778
2778
|
|
|
2779
|
+
export type SendEndUserEvmAssetCriteriaItem =
|
|
2780
|
+
| EvmNetworkCriterion
|
|
2781
|
+
| EvmDataCriterion
|
|
2782
|
+
| NetUSDChangeCriterion;
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* A schema for specifying criteria for the sendEndUserEvmAsset operation.
|
|
2786
|
+
*/
|
|
2787
|
+
export type SendEndUserEvmAssetCriteria = SendEndUserEvmAssetCriteriaItem[];
|
|
2788
|
+
|
|
2789
|
+
/**
|
|
2790
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2791
|
+
*/
|
|
2792
|
+
export type SendEndUserEvmAssetRuleAction =
|
|
2793
|
+
(typeof SendEndUserEvmAssetRuleAction)[keyof typeof SendEndUserEvmAssetRuleAction];
|
|
2794
|
+
|
|
2795
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2796
|
+
export const SendEndUserEvmAssetRuleAction = {
|
|
2797
|
+
reject: "reject",
|
|
2798
|
+
accept: "accept",
|
|
2799
|
+
} as const;
|
|
2800
|
+
|
|
2801
|
+
/**
|
|
2802
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2803
|
+
*/
|
|
2804
|
+
export type SendEndUserEvmAssetRuleOperation =
|
|
2805
|
+
(typeof SendEndUserEvmAssetRuleOperation)[keyof typeof SendEndUserEvmAssetRuleOperation];
|
|
2806
|
+
|
|
2807
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2808
|
+
export const SendEndUserEvmAssetRuleOperation = {
|
|
2809
|
+
sendEndUserEvmAsset: "sendEndUserEvmAsset",
|
|
2810
|
+
} as const;
|
|
2811
|
+
|
|
2812
|
+
export interface SendEndUserEvmAssetRule {
|
|
2813
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2814
|
+
action: SendEndUserEvmAssetRuleAction;
|
|
2815
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2816
|
+
operation: SendEndUserEvmAssetRuleOperation;
|
|
2817
|
+
criteria: SendEndUserEvmAssetCriteria;
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
export type SendEndUserSolAssetCriteriaItem =
|
|
2821
|
+
| SplAddressCriterion
|
|
2822
|
+
| SplValueCriterion
|
|
2823
|
+
| SolDataCriterion
|
|
2824
|
+
| SolNetworkCriterion;
|
|
2825
|
+
|
|
2826
|
+
/**
|
|
2827
|
+
* A schema for specifying criteria for the sendEndUserSolAsset operation.
|
|
2828
|
+
*/
|
|
2829
|
+
export type SendEndUserSolAssetCriteria = SendEndUserSolAssetCriteriaItem[];
|
|
2830
|
+
|
|
2831
|
+
/**
|
|
2832
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2833
|
+
*/
|
|
2834
|
+
export type SendEndUserSolAssetRuleAction =
|
|
2835
|
+
(typeof SendEndUserSolAssetRuleAction)[keyof typeof SendEndUserSolAssetRuleAction];
|
|
2836
|
+
|
|
2837
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2838
|
+
export const SendEndUserSolAssetRuleAction = {
|
|
2839
|
+
reject: "reject",
|
|
2840
|
+
accept: "accept",
|
|
2841
|
+
} as const;
|
|
2842
|
+
|
|
2843
|
+
/**
|
|
2844
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2845
|
+
*/
|
|
2846
|
+
export type SendEndUserSolAssetRuleOperation =
|
|
2847
|
+
(typeof SendEndUserSolAssetRuleOperation)[keyof typeof SendEndUserSolAssetRuleOperation];
|
|
2848
|
+
|
|
2849
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2850
|
+
export const SendEndUserSolAssetRuleOperation = {
|
|
2851
|
+
sendEndUserSolAsset: "sendEndUserSolAsset",
|
|
2852
|
+
} as const;
|
|
2853
|
+
|
|
2854
|
+
export interface SendEndUserSolAssetRule {
|
|
2855
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2856
|
+
action: SendEndUserSolAssetRuleAction;
|
|
2857
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2858
|
+
operation: SendEndUserSolAssetRuleOperation;
|
|
2859
|
+
criteria: SendEndUserSolAssetCriteria;
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
export type CreateEndUserEvmSwapCriteriaItem =
|
|
2863
|
+
| EvmNetworkCriterion
|
|
2864
|
+
| EvmDataCriterion
|
|
2865
|
+
| NetUSDChangeCriterion;
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* A schema for specifying criteria for the createEndUserEvmSwap operation.
|
|
2869
|
+
*/
|
|
2870
|
+
export type CreateEndUserEvmSwapCriteria = CreateEndUserEvmSwapCriteriaItem[];
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2874
|
+
*/
|
|
2875
|
+
export type CreateEndUserEvmSwapRuleAction =
|
|
2876
|
+
(typeof CreateEndUserEvmSwapRuleAction)[keyof typeof CreateEndUserEvmSwapRuleAction];
|
|
2877
|
+
|
|
2878
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2879
|
+
export const CreateEndUserEvmSwapRuleAction = {
|
|
2880
|
+
reject: "reject",
|
|
2881
|
+
accept: "accept",
|
|
2882
|
+
} as const;
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2886
|
+
*/
|
|
2887
|
+
export type CreateEndUserEvmSwapRuleOperation =
|
|
2888
|
+
(typeof CreateEndUserEvmSwapRuleOperation)[keyof typeof CreateEndUserEvmSwapRuleOperation];
|
|
2889
|
+
|
|
2890
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2891
|
+
export const CreateEndUserEvmSwapRuleOperation = {
|
|
2892
|
+
createEndUserEvmSwap: "createEndUserEvmSwap",
|
|
2893
|
+
} as const;
|
|
2894
|
+
|
|
2895
|
+
export interface CreateEndUserEvmSwapRule {
|
|
2896
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2897
|
+
action: CreateEndUserEvmSwapRuleAction;
|
|
2898
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2899
|
+
operation: CreateEndUserEvmSwapRuleOperation;
|
|
2900
|
+
criteria: CreateEndUserEvmSwapCriteria;
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2779
2903
|
/**
|
|
2780
2904
|
* A rule that limits the behavior of an account.
|
|
2781
2905
|
*/
|
|
@@ -2797,7 +2921,10 @@ export type Rule =
|
|
|
2797
2921
|
| SignEndUserEvmHashRule
|
|
2798
2922
|
| SignEndUserSolTransactionRule
|
|
2799
2923
|
| SendEndUserSolTransactionRule
|
|
2800
|
-
| SignEndUserSolMessageRule
|
|
2924
|
+
| SignEndUserSolMessageRule
|
|
2925
|
+
| SendEndUserEvmAssetRule
|
|
2926
|
+
| SendEndUserSolAssetRule
|
|
2927
|
+
| CreateEndUserEvmSwapRule;
|
|
2801
2928
|
|
|
2802
2929
|
/**
|
|
2803
2930
|
* The scope of the policy. Only one project-level policy can exist at any time.
|
|
@@ -3890,6 +4017,11 @@ export const X402SupportedPaymentKindNetwork = {
|
|
|
3890
4017
|
"eip155:137": "eip155:137",
|
|
3891
4018
|
"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
3892
4019
|
"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
|
|
4020
|
+
avalanche: "avalanche",
|
|
4021
|
+
arbitrum: "arbitrum",
|
|
4022
|
+
"arbitrum-sepolia": "arbitrum-sepolia",
|
|
4023
|
+
world: "world",
|
|
4024
|
+
"world-sepolia": "world-sepolia",
|
|
3893
4025
|
} as const;
|
|
3894
4026
|
|
|
3895
4027
|
/**
|
|
@@ -3910,6 +4042,217 @@ export interface X402SupportedPaymentKind {
|
|
|
3910
4042
|
extra?: X402SupportedPaymentKindExtra;
|
|
3911
4043
|
}
|
|
3912
4044
|
|
|
4045
|
+
/**
|
|
4046
|
+
* Quality metrics for a discovered x402 resource.
|
|
4047
|
+
*/
|
|
4048
|
+
export interface X402ResourceQuality {
|
|
4049
|
+
/** Total number of paid calls to a resource in the last 30 days. */
|
|
4050
|
+
l30DaysTotalCalls?: number;
|
|
4051
|
+
/** Number of unique payers to a resource in the last 30 days. */
|
|
4052
|
+
l30DaysUniquePayers?: number;
|
|
4053
|
+
/** Timestamp of the most recent paid call to a resource. */
|
|
4054
|
+
lastCalledAt?: string;
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* Communication protocol (e.g., "http", "mcp").
|
|
4059
|
+
*/
|
|
4060
|
+
export type X402DiscoveryResourceType =
|
|
4061
|
+
(typeof X402DiscoveryResourceType)[keyof typeof X402DiscoveryResourceType];
|
|
4062
|
+
|
|
4063
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
4064
|
+
export const X402DiscoveryResourceType = {
|
|
4065
|
+
http: "http",
|
|
4066
|
+
mcp: "mcp",
|
|
4067
|
+
} as const;
|
|
4068
|
+
|
|
4069
|
+
/**
|
|
4070
|
+
* Map of x402 protocol extensions supported by the resource, keyed by extension name.
|
|
4071
|
+
*/
|
|
4072
|
+
export type X402DiscoveryResourceExtensions = { [key: string]: unknown };
|
|
4073
|
+
|
|
4074
|
+
/**
|
|
4075
|
+
* A single discovered x402 resource.
|
|
4076
|
+
*/
|
|
4077
|
+
export interface X402DiscoveryResource {
|
|
4078
|
+
/** The URL of the resource. */
|
|
4079
|
+
resource: string;
|
|
4080
|
+
/** A human-readable description of the resource. */
|
|
4081
|
+
description?: string;
|
|
4082
|
+
/** Communication protocol (e.g., "http", "mcp"). */
|
|
4083
|
+
type: X402DiscoveryResourceType;
|
|
4084
|
+
x402Version: X402Version;
|
|
4085
|
+
/** Timestamp of the last update. */
|
|
4086
|
+
lastUpdated?: string;
|
|
4087
|
+
/** Payment requirements accepted by the resource. */
|
|
4088
|
+
accepts?: X402PaymentRequirements[];
|
|
4089
|
+
/** Map of x402 protocol extensions supported by the resource, keyed by extension name. */
|
|
4090
|
+
extensions?: X402DiscoveryResourceExtensions;
|
|
4091
|
+
quality?: X402ResourceQuality;
|
|
4092
|
+
}
|
|
4093
|
+
|
|
4094
|
+
/**
|
|
4095
|
+
* Pagination information for the response.
|
|
4096
|
+
*/
|
|
4097
|
+
export type X402DiscoveryResourcesResponsePagination = {
|
|
4098
|
+
/** The number of discovered x402 resources to return per page. */
|
|
4099
|
+
limit?: number;
|
|
4100
|
+
/** The offset of the first discovered x402 resource to return. */
|
|
4101
|
+
offset?: number;
|
|
4102
|
+
/** The total number of discovered x402 resources. */
|
|
4103
|
+
total?: number;
|
|
4104
|
+
};
|
|
4105
|
+
|
|
4106
|
+
/**
|
|
4107
|
+
* Response containing discovered x402 resources.
|
|
4108
|
+
*/
|
|
4109
|
+
export interface X402DiscoveryResourcesResponse {
|
|
4110
|
+
x402Version: X402Version;
|
|
4111
|
+
/** List of discovered x402 resources. */
|
|
4112
|
+
items: X402DiscoveryResource[];
|
|
4113
|
+
/** Pagination information for the response. */
|
|
4114
|
+
pagination: X402DiscoveryResourcesResponsePagination;
|
|
4115
|
+
}
|
|
4116
|
+
|
|
4117
|
+
/**
|
|
4118
|
+
* Pagination information for the response.
|
|
4119
|
+
*/
|
|
4120
|
+
export type X402DiscoveryMerchantResponsePagination = {
|
|
4121
|
+
/** The number of resources returned per page. */
|
|
4122
|
+
limit?: number;
|
|
4123
|
+
/** The offset of the first resource returned. */
|
|
4124
|
+
offset?: number;
|
|
4125
|
+
/** The total number of resources associated with the merchant's payTo address. */
|
|
4126
|
+
total?: number;
|
|
4127
|
+
};
|
|
4128
|
+
|
|
4129
|
+
/**
|
|
4130
|
+
* Response containing x402 resources associated with a merchant payment address.
|
|
4131
|
+
*/
|
|
4132
|
+
export interface X402DiscoveryMerchantResponse {
|
|
4133
|
+
x402Version: X402Version;
|
|
4134
|
+
payTo: BlockchainAddress;
|
|
4135
|
+
/** List of discovered x402 resources associated with the merchant's payTo address. */
|
|
4136
|
+
resources: X402DiscoveryResource[];
|
|
4137
|
+
/** Pagination information for the response. */
|
|
4138
|
+
pagination: X402DiscoveryMerchantResponsePagination;
|
|
4139
|
+
}
|
|
4140
|
+
|
|
4141
|
+
/**
|
|
4142
|
+
* The search method used to retrieve the results (e.g., "text" or "vector").
|
|
4143
|
+
*/
|
|
4144
|
+
export type X402SearchResourcesResponseSearchMethod =
|
|
4145
|
+
(typeof X402SearchResourcesResponseSearchMethod)[keyof typeof X402SearchResourcesResponseSearchMethod];
|
|
4146
|
+
|
|
4147
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
4148
|
+
export const X402SearchResourcesResponseSearchMethod = {
|
|
4149
|
+
text: "text",
|
|
4150
|
+
vector: "vector",
|
|
4151
|
+
} as const;
|
|
4152
|
+
|
|
4153
|
+
/**
|
|
4154
|
+
* Response from a search for x402 resources.
|
|
4155
|
+
*/
|
|
4156
|
+
export interface X402SearchResourcesResponse {
|
|
4157
|
+
/** List of x402 resources matching the search query and filters. */
|
|
4158
|
+
resources: X402DiscoveryResource[];
|
|
4159
|
+
/** Indicates whether the result set was truncated because there were more results than the requested limit. */
|
|
4160
|
+
partialResults: boolean;
|
|
4161
|
+
/** The search method used to retrieve the results (e.g., "text" or "vector"). */
|
|
4162
|
+
searchMethod?: X402SearchResourcesResponseSearchMethod;
|
|
4163
|
+
x402Version: X402Version;
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
/**
|
|
4167
|
+
* JSON-RPC version, must be "2.0".
|
|
4168
|
+
*/
|
|
4169
|
+
export type X402McpRequestJsonrpc =
|
|
4170
|
+
(typeof X402McpRequestJsonrpc)[keyof typeof X402McpRequestJsonrpc];
|
|
4171
|
+
|
|
4172
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
4173
|
+
export const X402McpRequestJsonrpc = {
|
|
4174
|
+
"20": "2.0",
|
|
4175
|
+
} as const;
|
|
4176
|
+
|
|
4177
|
+
/**
|
|
4178
|
+
* Request identifier.
|
|
4179
|
+
*/
|
|
4180
|
+
export type X402McpRequestId = string | number;
|
|
4181
|
+
|
|
4182
|
+
/**
|
|
4183
|
+
* Optional parameters for the method.
|
|
4184
|
+
*/
|
|
4185
|
+
export type X402McpRequestParams = { [key: string]: unknown };
|
|
4186
|
+
|
|
4187
|
+
/**
|
|
4188
|
+
* A JSON-RPC 2.0 request for the Model Context Protocol.
|
|
4189
|
+
*/
|
|
4190
|
+
export interface X402McpRequest {
|
|
4191
|
+
/** JSON-RPC version, must be "2.0". */
|
|
4192
|
+
jsonrpc: X402McpRequestJsonrpc;
|
|
4193
|
+
/** Request identifier. */
|
|
4194
|
+
id?: X402McpRequestId;
|
|
4195
|
+
/** The MCP method to invoke. */
|
|
4196
|
+
method: string;
|
|
4197
|
+
/** Optional parameters for the method. */
|
|
4198
|
+
params?: X402McpRequestParams;
|
|
4199
|
+
}
|
|
4200
|
+
|
|
4201
|
+
/**
|
|
4202
|
+
* Additional error data.
|
|
4203
|
+
*/
|
|
4204
|
+
export type X402McpErrorData = { [key: string]: unknown };
|
|
4205
|
+
|
|
4206
|
+
/**
|
|
4207
|
+
* JSON-RPC 2.0 error object.
|
|
4208
|
+
*/
|
|
4209
|
+
export interface X402McpError {
|
|
4210
|
+
/** Error code. */
|
|
4211
|
+
code: number;
|
|
4212
|
+
/** Error message. */
|
|
4213
|
+
message: string;
|
|
4214
|
+
/** Additional error data. */
|
|
4215
|
+
data?: X402McpErrorData;
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
/**
|
|
4219
|
+
* JSON-RPC version.
|
|
4220
|
+
*/
|
|
4221
|
+
export type X402McpResponseJsonrpc =
|
|
4222
|
+
(typeof X402McpResponseJsonrpc)[keyof typeof X402McpResponseJsonrpc];
|
|
4223
|
+
|
|
4224
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
4225
|
+
export const X402McpResponseJsonrpc = {
|
|
4226
|
+
"20": "2.0",
|
|
4227
|
+
} as const;
|
|
4228
|
+
|
|
4229
|
+
/**
|
|
4230
|
+
* Request identifier (matches the request ID, null for notifications).
|
|
4231
|
+
* @nullable
|
|
4232
|
+
*/
|
|
4233
|
+
export type X402McpResponseId = string | number | null;
|
|
4234
|
+
|
|
4235
|
+
/**
|
|
4236
|
+
* The result of the method call (present on success).
|
|
4237
|
+
*/
|
|
4238
|
+
export type X402McpResponseResult = { [key: string]: unknown };
|
|
4239
|
+
|
|
4240
|
+
/**
|
|
4241
|
+
* A JSON-RPC 2.0 response for the Model Context Protocol.
|
|
4242
|
+
*/
|
|
4243
|
+
export interface X402McpResponse {
|
|
4244
|
+
/** JSON-RPC version. */
|
|
4245
|
+
jsonrpc: X402McpResponseJsonrpc;
|
|
4246
|
+
/**
|
|
4247
|
+
* Request identifier (matches the request ID, null for notifications).
|
|
4248
|
+
* @nullable
|
|
4249
|
+
*/
|
|
4250
|
+
id?: X402McpResponseId;
|
|
4251
|
+
/** The result of the method call (present on success). */
|
|
4252
|
+
result?: X402McpResponseResult;
|
|
4253
|
+
error?: X402McpError;
|
|
4254
|
+
}
|
|
4255
|
+
|
|
3913
4256
|
/**
|
|
3914
4257
|
* The type of payment method to be used to complete an onramp order.
|
|
3915
4258
|
*/
|
|
@@ -4114,6 +4457,54 @@ export interface OnrampUserLimit {
|
|
|
4114
4457
|
remaining: string;
|
|
4115
4458
|
}
|
|
4116
4459
|
|
|
4460
|
+
/**
|
|
4461
|
+
* Date of birth.
|
|
4462
|
+
*/
|
|
4463
|
+
export interface DateOfBirth {
|
|
4464
|
+
/**
|
|
4465
|
+
* Day of birth (01-31).
|
|
4466
|
+
* @minLength 2
|
|
4467
|
+
* @maxLength 2
|
|
4468
|
+
* @pattern ^[0-9]{2}$
|
|
4469
|
+
*/
|
|
4470
|
+
day?: string;
|
|
4471
|
+
/**
|
|
4472
|
+
* Month of birth (01-12).
|
|
4473
|
+
* @minLength 2
|
|
4474
|
+
* @maxLength 2
|
|
4475
|
+
* @pattern ^[0-9]{2}$
|
|
4476
|
+
*/
|
|
4477
|
+
month?: string;
|
|
4478
|
+
/**
|
|
4479
|
+
* Year of birth (four digits).
|
|
4480
|
+
* @minLength 4
|
|
4481
|
+
* @maxLength 4
|
|
4482
|
+
* @pattern ^[0-9]{4}$
|
|
4483
|
+
*/
|
|
4484
|
+
year?: string;
|
|
4485
|
+
}
|
|
4486
|
+
|
|
4487
|
+
/**
|
|
4488
|
+
* Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`.
|
|
4489
|
+
*/
|
|
4490
|
+
export interface OnrampLimitUpgradeIdentityFields {
|
|
4491
|
+
/** Last 4 digits of the Social Security Number (no dashes or spaces). */
|
|
4492
|
+
ssnLast4?: string;
|
|
4493
|
+
/** Date of birth. */
|
|
4494
|
+
dateOfBirth?: DateOfBirth;
|
|
4495
|
+
}
|
|
4496
|
+
|
|
4497
|
+
/**
|
|
4498
|
+
* Request to request a limits upgrade for a user.
|
|
4499
|
+
*/
|
|
4500
|
+
export interface OnrampLimitUpgradeRequest {
|
|
4501
|
+
/** The user identifier value. For `phone_number` type, this must be in E.164 format. */
|
|
4502
|
+
userId: string;
|
|
4503
|
+
userIdType: OnrampUserIdType;
|
|
4504
|
+
/** Populate the properties that correspond to the `fields` array from the user's `OnrampLimitUpgradeOption`. */
|
|
4505
|
+
fields: OnrampLimitUpgradeIdentityFields;
|
|
4506
|
+
}
|
|
4507
|
+
|
|
4117
4508
|
/**
|
|
4118
4509
|
* Unauthorized.
|
|
4119
4510
|
*/
|
|
@@ -4358,6 +4749,31 @@ export type ValidateEndUserAccessTokenBody = {
|
|
|
4358
4749
|
accessToken: string;
|
|
4359
4750
|
};
|
|
4360
4751
|
|
|
4752
|
+
export type LookupEndUserParams = {
|
|
4753
|
+
/**
|
|
4754
|
+
* The email address to search for across all email-based authentication methods.
|
|
4755
|
+
*/
|
|
4756
|
+
email?: string;
|
|
4757
|
+
/**
|
|
4758
|
+
* The OAuth provider to search by. Must be provided together with oauthSubject.
|
|
4759
|
+
*/
|
|
4760
|
+
oauthProvider?: OAuth2ProviderType;
|
|
4761
|
+
/**
|
|
4762
|
+
* The OAuth subject (the `sub` claim from the provider's ID token). Must be provided together with oauthProvider.
|
|
4763
|
+
*/
|
|
4764
|
+
oauthSubject?: string;
|
|
4765
|
+
/**
|
|
4766
|
+
* The E.164-formatted phone number to search for. Must be URL-encoded when passed as a query parameter (e.g. `+14155552671` → `%2B14155552671`).
|
|
4767
|
+
* @pattern ^\+[1-9]\d{1,14}$
|
|
4768
|
+
*/
|
|
4769
|
+
phoneNumber?: string;
|
|
4770
|
+
};
|
|
4771
|
+
|
|
4772
|
+
export type LookupEndUser200 = {
|
|
4773
|
+
/** The list of end users matching the lookup. */
|
|
4774
|
+
endUsers: EndUser[];
|
|
4775
|
+
};
|
|
4776
|
+
|
|
4361
4777
|
export type AddEndUserEvmAccountBody = { [key: string]: unknown };
|
|
4362
4778
|
|
|
4363
4779
|
export type AddEndUserEvmAccount201 = {
|
|
@@ -4618,6 +5034,14 @@ export type GetDelegationForEndUser200 = {
|
|
|
4618
5034
|
expiresAt: string;
|
|
4619
5035
|
};
|
|
4620
5036
|
|
|
5037
|
+
export type RevokeDelegationForEndUserParams = {
|
|
5038
|
+
/**
|
|
5039
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
5040
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
5041
|
+
*/
|
|
5042
|
+
projectID?: ProjectIDOptionalParameter;
|
|
5043
|
+
};
|
|
5044
|
+
|
|
4621
5045
|
export type RevokeDelegationForEndUserBody = {
|
|
4622
5046
|
/**
|
|
4623
5047
|
* When revoking with a wallet authentication scheme, the ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
@@ -4626,6 +5050,58 @@ export type RevokeDelegationForEndUserBody = {
|
|
|
4626
5050
|
walletSecretId?: string;
|
|
4627
5051
|
};
|
|
4628
5052
|
|
|
5053
|
+
export type CreateDelegationForEndUserAccountParams = {
|
|
5054
|
+
/**
|
|
5055
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
5056
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
5057
|
+
*/
|
|
5058
|
+
projectID?: ProjectIDOptionalParameter;
|
|
5059
|
+
};
|
|
5060
|
+
|
|
5061
|
+
export type CreateDelegationForEndUserAccountBody = {
|
|
5062
|
+
/** The date until which the delegation is valid. */
|
|
5063
|
+
expiresAt: string;
|
|
5064
|
+
/**
|
|
5065
|
+
* The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
5066
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
5067
|
+
*/
|
|
5068
|
+
walletSecretId: string;
|
|
5069
|
+
};
|
|
5070
|
+
|
|
5071
|
+
export type CreateDelegationForEndUserAccount201 = {
|
|
5072
|
+
/** The date until which the delegation is valid. */
|
|
5073
|
+
expiresAt: string;
|
|
5074
|
+
};
|
|
5075
|
+
|
|
5076
|
+
export type GetDelegationForEndUserAccountParams = {
|
|
5077
|
+
/**
|
|
5078
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
5079
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
5080
|
+
*/
|
|
5081
|
+
projectID?: ProjectIDOptionalParameter;
|
|
5082
|
+
};
|
|
5083
|
+
|
|
5084
|
+
export type GetDelegationForEndUserAccount200 = {
|
|
5085
|
+
/** The date until which the delegation is valid. */
|
|
5086
|
+
expiresAt: string;
|
|
5087
|
+
};
|
|
5088
|
+
|
|
5089
|
+
export type RevokeDelegationForEndUserAccountParams = {
|
|
5090
|
+
/**
|
|
5091
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
5092
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
5093
|
+
*/
|
|
5094
|
+
projectID?: ProjectIDOptionalParameter;
|
|
5095
|
+
};
|
|
5096
|
+
|
|
5097
|
+
export type RevokeDelegationForEndUserAccountBody = {
|
|
5098
|
+
/**
|
|
5099
|
+
* When revoking with a wallet authentication scheme, the ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
5100
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
5101
|
+
*/
|
|
5102
|
+
walletSecretId?: string;
|
|
5103
|
+
};
|
|
5104
|
+
|
|
4629
5105
|
export type CreateEvmEip7702DelegationWithEndUserAccountParams = {
|
|
4630
5106
|
/**
|
|
4631
5107
|
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
@@ -5513,6 +5989,89 @@ export type SettleX402PaymentBody = {
|
|
|
5513
5989
|
paymentRequirements: X402PaymentRequirements;
|
|
5514
5990
|
};
|
|
5515
5991
|
|
|
5992
|
+
export type ListX402DiscoveryResourcesParams = {
|
|
5993
|
+
/**
|
|
5994
|
+
* Filter by protocol type (e.g., "http", "mcp").
|
|
5995
|
+
Currently, the only supported protocol type is "http".
|
|
5996
|
+
*/
|
|
5997
|
+
type?: string;
|
|
5998
|
+
/**
|
|
5999
|
+
* The number of discovered x402 resources to return per page.
|
|
6000
|
+
*/
|
|
6001
|
+
limit?: number;
|
|
6002
|
+
/**
|
|
6003
|
+
* The offset of the first discovered x402 resource to return.
|
|
6004
|
+
*/
|
|
6005
|
+
offset?: number;
|
|
6006
|
+
};
|
|
6007
|
+
|
|
6008
|
+
export type ListX402DiscoveryMerchantParams = {
|
|
6009
|
+
/**
|
|
6010
|
+
* The merchant's payment address to look up.
|
|
6011
|
+
This is the onchain address that payment requirements route funds to.
|
|
6012
|
+
*/
|
|
6013
|
+
payTo: BlockchainAddress;
|
|
6014
|
+
/**
|
|
6015
|
+
* The number of resources to return per page.
|
|
6016
|
+
*/
|
|
6017
|
+
limit?: number;
|
|
6018
|
+
/**
|
|
6019
|
+
* The offset of the first resource to return.
|
|
6020
|
+
*/
|
|
6021
|
+
offset?: number;
|
|
6022
|
+
};
|
|
6023
|
+
|
|
6024
|
+
export type SearchX402ResourcesParams = {
|
|
6025
|
+
/**
|
|
6026
|
+
* Full-text or semantic search query to find matching resources.
|
|
6027
|
+
* @maxLength 400
|
|
6028
|
+
*/
|
|
6029
|
+
query?: string;
|
|
6030
|
+
/**
|
|
6031
|
+
* Filter results by network in CAIP-2 format (e.g., `eip155:8453`) or legacy name (e.g., `base`, `base-sepolia`, `solana`).
|
|
6032
|
+
Legacy names are normalized to their CAIP-2 equivalents before filtering.
|
|
6033
|
+
*/
|
|
6034
|
+
network?: string;
|
|
6035
|
+
/**
|
|
6036
|
+
* Filter results by asset address.
|
|
6037
|
+
For EVM networks, provide a 0x-prefixed EVM address. For Solana networks, provide a base58-encoded address.
|
|
6038
|
+
Matching is case-insensitive.
|
|
6039
|
+
*/
|
|
6040
|
+
asset?: string;
|
|
6041
|
+
/**
|
|
6042
|
+
* Filter results by payment scheme (e.g., `exact`).
|
|
6043
|
+
*/
|
|
6044
|
+
scheme?: string;
|
|
6045
|
+
/**
|
|
6046
|
+
* Filter results by the merchant's payment address.
|
|
6047
|
+
For EVM networks, provide a 0x-prefixed EVM address. For Solana networks, provide a base58-encoded address.
|
|
6048
|
+
*/
|
|
6049
|
+
payTo?: BlockchainAddress;
|
|
6050
|
+
/**
|
|
6051
|
+
* Filter results to resources whose URL contains this value (case-insensitive substring match against the resource URL).
|
|
6052
|
+
Useful for narrowing results to a specific domain, subdomain, or path segment. Combine with `query` to perform semantic search restricted to a URL subset.
|
|
6053
|
+
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.
|
|
6054
|
+
* @minLength 3
|
|
6055
|
+
* @maxLength 2048
|
|
6056
|
+
*/
|
|
6057
|
+
urlSubstring?: string;
|
|
6058
|
+
/**
|
|
6059
|
+
* Filter results to resources with a USD price at or below this value.
|
|
6060
|
+
*/
|
|
6061
|
+
maxUsdPrice?: string;
|
|
6062
|
+
/**
|
|
6063
|
+
* Filter results to resources that support the specified protocol extensions. Can be specified multiple times to filter by multiple extensions.
|
|
6064
|
+
*/
|
|
6065
|
+
extensions?: string[];
|
|
6066
|
+
/**
|
|
6067
|
+
* Maximum number of resources to return. Must be a positive integer no greater than 20.
|
|
6068
|
+
Defaults to 20.
|
|
6069
|
+
* @minimum 1
|
|
6070
|
+
* @maximum 20
|
|
6071
|
+
*/
|
|
6072
|
+
limit?: number;
|
|
6073
|
+
};
|
|
6074
|
+
|
|
5516
6075
|
export type CreateOnrampOrderBody = {
|
|
5517
6076
|
/** 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). */
|
|
5518
6077
|
agreementAcceptedAt: string;
|