@coinbase/cdp-sdk 1.33.0 → 1.34.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/README.md +19 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +1 -1
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +2 -2
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +2 -2
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_cjs/actions/evm/listSpendPermissions.js +19 -1
- package/_cjs/actions/evm/listSpendPermissions.js.map +1 -1
- package/_cjs/actions/evm/spend-permissions/resolveSpendPermission.js +64 -0
- package/_cjs/actions/evm/spend-permissions/resolveSpendPermission.js.map +1 -0
- package/_cjs/client/cdp.js +4 -0
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/end-user/endUser.js +28 -0
- package/_cjs/client/end-user/endUser.js.map +1 -0
- package/_cjs/client/end-user/endUser.types.js +3 -0
- package/_cjs/client/end-user/endUser.types.js.map +1 -0
- package/_cjs/client/evm/evm.js +12 -11
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +121 -2
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js +20 -0
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -0
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.msw.js +61 -0
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.msw.js.map +1 -0
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +79 -20
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js +1 -2
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_cjs/openapi-client/generated/index.msw.js +3 -0
- package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/onchain-data/onchain-data.js +63 -0
- package/_cjs/openapi-client/generated/onchain-data/onchain-data.js.map +1 -0
- package/_cjs/openapi-client/generated/onchain-data/onchain-data.msw.js +139 -0
- package/_cjs/openapi-client/generated/onchain-data/onchain-data.msw.js.map +1 -0
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +48 -4
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js +39 -0
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -0
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js +84 -0
- package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js.map +1 -0
- package/_cjs/openapi-client/index.js +5 -0
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/spend-permissions/utils.js +26 -0
- package/_cjs/spend-permissions/utils.js.map +1 -0
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +2 -2
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +2 -2
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_esm/actions/evm/listSpendPermissions.js +19 -1
- package/_esm/actions/evm/listSpendPermissions.js.map +1 -1
- package/_esm/actions/evm/spend-permissions/resolveSpendPermission.js +61 -0
- package/_esm/actions/evm/spend-permissions/resolveSpendPermission.js.map +1 -0
- package/_esm/client/cdp.js +4 -0
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/end-user/endUser.js +24 -0
- package/_esm/client/end-user/endUser.js.map +1 -0
- package/_esm/client/end-user/endUser.types.js +2 -0
- package/_esm/client/end-user/endUser.types.js.map +1 -0
- package/_esm/client/evm/evm.js +13 -12
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +119 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js +16 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.msw.js +52 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.msw.js.map +1 -0
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +79 -20
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js +1 -2
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
- package/_esm/openapi-client/generated/index.msw.js +3 -0
- package/_esm/openapi-client/generated/index.msw.js.map +1 -1
- package/_esm/openapi-client/generated/onchain-data/onchain-data.js +57 -0
- package/_esm/openapi-client/generated/onchain-data/onchain-data.js.map +1 -0
- package/_esm/openapi-client/generated/onchain-data/onchain-data.msw.js +129 -0
- package/_esm/openapi-client/generated/onchain-data/onchain-data.msw.js.map +1 -0
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +48 -4
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js +33 -0
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -0
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js +74 -0
- package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js.map +1 -0
- package/_esm/openapi-client/index.js +5 -0
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/spend-permissions/utils.js +23 -0
- package/_esm/spend-permissions/utils.js.map +1 -0
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/types.d.ts +5 -5
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/actions/evm/listSpendPermissions.d.ts +10 -2
- package/_types/actions/evm/listSpendPermissions.d.ts.map +1 -1
- package/_types/actions/evm/spend-permissions/resolveSpendPermission.d.ts +12 -0
- package/_types/actions/evm/spend-permissions/resolveSpendPermission.d.ts.map +1 -0
- package/_types/actions/evm/spend-permissions/types.d.ts +3 -2
- package/_types/actions/evm/spend-permissions/types.d.ts.map +1 -1
- package/_types/actions/evm/types.d.ts +4 -8
- package/_types/actions/evm/types.d.ts.map +1 -1
- package/_types/auth/utils/jwt.d.ts +1 -1
- package/_types/client/cdp.d.ts +3 -0
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/end-user/endUser.d.ts +16 -0
- package/_types/client/end-user/endUser.d.ts.map +1 -0
- package/_types/client/end-user/endUser.types.d.ts +10 -0
- package/_types/client/end-user/endUser.types.d.ts.map +1 -0
- package/_types/client/evm/evm.d.ts +3 -2
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +7 -44
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/index.d.ts +2 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +520 -39
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +20 -0
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -0
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.msw.d.ts +9 -0
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.msw.d.ts.map +1 -0
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +1 -2
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -1
- package/_types/openapi-client/generated/index.msw.d.ts +3 -0
- package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts +59 -0
- package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts.map +1 -0
- package/_types/openapi-client/generated/onchain-data/onchain-data.msw.d.ts +10 -0
- package/_types/openapi-client/generated/onchain-data/onchain-data.msw.d.ts.map +1 -0
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +30 -0
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -0
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.msw.d.ts +10 -0
- package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.msw.d.ts.map +1 -0
- package/_types/openapi-client/index.d.ts +4 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/spend-permissions/types.d.ts +40 -5
- package/_types/spend-permissions/types.d.ts.map +1 -1
- package/_types/spend-permissions/utils.d.ts +12 -0
- package/_types/spend-permissions/utils.d.ts.map +1 -0
- package/_types/version.d.ts +1 -1
- package/accounts/evm/toEvmServerAccount.ts +1 -3
- package/accounts/evm/toEvmSmartAccount.ts +1 -1
- package/accounts/evm/toNetworkScopedEvmServerAccount.ts +4 -4
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +4 -4
- package/accounts/evm/types.ts +5 -5
- package/actions/evm/listSpendPermissions.ts +42 -3
- package/actions/evm/spend-permissions/resolveSpendPermission.ts +85 -0
- package/actions/evm/spend-permissions/types.ts +3 -2
- package/actions/evm/types.ts +4 -12
- package/auth/utils/jwt.ts +1 -1
- package/client/cdp.ts +5 -0
- package/client/end-user/endUser.ts +27 -0
- package/client/end-user/endUser.types.ts +9 -0
- package/client/evm/evm.ts +25 -16
- package/client/evm/evm.types.ts +6 -48
- package/index.ts +2 -1
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +614 -40
- package/openapi-client/generated/end-user-accounts/end-user-accounts.msw.ts +95 -0
- package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +39 -0
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.ts +79 -20
- package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +1 -2
- package/openapi-client/generated/index.msw.ts +3 -0
- package/openapi-client/generated/onchain-data/onchain-data.msw.ts +185 -0
- package/openapi-client/generated/onchain-data/onchain-data.ts +103 -0
- package/openapi-client/generated/policy-engine/policy-engine.msw.ts +48 -4
- package/openapi-client/generated/x402-facilitator/x402-facilitator.msw.ts +136 -0
- package/openapi-client/generated/x402-facilitator/x402-facilitator.ts +70 -0
- package/openapi-client/index.ts +5 -0
- package/package.json +1 -1
- package/spend-permissions/types.ts +46 -16
- package/spend-permissions/utils.ts +35 -0
- package/version.ts +1 -1
|
@@ -5,29 +5,83 @@
|
|
|
5
5
|
* The Coinbase Developer Platform APIs - leading the world's transition onchain.
|
|
6
6
|
* OpenAPI spec version: 2.0.0
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The type of authentication information.
|
|
10
|
+
*/
|
|
11
|
+
export type EmailAuthenticationType = (typeof EmailAuthenticationType)[keyof typeof EmailAuthenticationType];
|
|
12
|
+
export declare const EmailAuthenticationType: {
|
|
13
|
+
readonly email: "email";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Information about an end user who authenticates using a one-time password sent to their email address.
|
|
17
|
+
*/
|
|
18
|
+
export interface EmailAuthentication {
|
|
19
|
+
/** The type of authentication information. */
|
|
20
|
+
type: EmailAuthenticationType;
|
|
21
|
+
/** The email address of the end user. */
|
|
22
|
+
email: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The type of authentication information.
|
|
26
|
+
*/
|
|
27
|
+
export type SmsAuthenticationType = (typeof SmsAuthenticationType)[keyof typeof SmsAuthenticationType];
|
|
28
|
+
export declare const SmsAuthenticationType: {
|
|
29
|
+
readonly sms: "sms";
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Information about an end user who authenticates using a one-time password sent to their phone number via SMS.
|
|
33
|
+
*/
|
|
34
|
+
export interface SmsAuthentication {
|
|
35
|
+
/** The type of authentication information. */
|
|
36
|
+
type: SmsAuthenticationType;
|
|
9
37
|
/**
|
|
10
|
-
* The
|
|
11
|
-
* @pattern
|
|
38
|
+
* The phone number of the end user in E.164 format.
|
|
39
|
+
* @pattern ^\+[1-9]\d{1,14}$
|
|
12
40
|
*/
|
|
13
|
-
|
|
41
|
+
phoneNumber: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The type of authentication information.
|
|
45
|
+
*/
|
|
46
|
+
export type DeveloperJWTAuthenticationType = (typeof DeveloperJWTAuthenticationType)[keyof typeof DeveloperJWTAuthenticationType];
|
|
47
|
+
export declare const DeveloperJWTAuthenticationType: {
|
|
48
|
+
readonly jwt: "jwt";
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Information about an end user who authenticates using a JWT issued by the developer.
|
|
52
|
+
*/
|
|
53
|
+
export interface DeveloperJWTAuthentication {
|
|
54
|
+
/** The type of authentication information. */
|
|
55
|
+
type: DeveloperJWTAuthenticationType;
|
|
56
|
+
/** The key ID of the JWK used to sign the JWT. */
|
|
57
|
+
kid: string;
|
|
58
|
+
/** The unique identifier for the end user that is captured in the `sub` claim of the JWT. */
|
|
59
|
+
sub: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Information about how the end user is authenticated.
|
|
63
|
+
*/
|
|
64
|
+
export type AuthenticationMethod = EmailAuthentication | SmsAuthentication | DeveloperJWTAuthentication;
|
|
65
|
+
/**
|
|
66
|
+
* The list of valid authentication methods linked to the end user.
|
|
67
|
+
*/
|
|
68
|
+
export type AuthenticationMethods = AuthenticationMethod[];
|
|
69
|
+
/**
|
|
70
|
+
* Information about the end user.
|
|
71
|
+
*/
|
|
72
|
+
export interface EndUser {
|
|
14
73
|
/**
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
Account names are guaranteed to be unique across all EVM accounts in the developer's CDP Project.
|
|
18
|
-
* @pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
74
|
+
* A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.
|
|
75
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
19
76
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export interface ListResponse {
|
|
29
|
-
/** The token for the next page of items, if any. */
|
|
30
|
-
nextPageToken?: string;
|
|
77
|
+
userId: string;
|
|
78
|
+
authenticationMethods: AuthenticationMethods;
|
|
79
|
+
/** The list of EVM accounts associated with the end user. Currently, only one EVM account is supported per end user. */
|
|
80
|
+
evmAccounts: string[];
|
|
81
|
+
/** The list of EVM smart accounts associated with the end user. Currently, only one EVM smart account is supported per end user. */
|
|
82
|
+
evmSmartAccounts: string[];
|
|
83
|
+
/** The list of Solana accounts associated with the end user. Currently, only one Solana account is supported per end user. */
|
|
84
|
+
solanaAccounts: string[];
|
|
31
85
|
}
|
|
32
86
|
/**
|
|
33
87
|
* The code that indicates the type of error that occurred. These error codes can be used to determine how to handle the error.
|
|
@@ -41,6 +95,7 @@ export declare const ErrorType: {
|
|
|
41
95
|
readonly idempotency_error: "idempotency_error";
|
|
42
96
|
readonly internal_server_error: "internal_server_error";
|
|
43
97
|
readonly invalid_request: "invalid_request";
|
|
98
|
+
readonly invalid_sql_query: "invalid_sql_query";
|
|
44
99
|
readonly invalid_signature: "invalid_signature";
|
|
45
100
|
readonly malformed_transaction: "malformed_transaction";
|
|
46
101
|
readonly not_found: "not_found";
|
|
@@ -72,6 +127,30 @@ export interface Error {
|
|
|
72
127
|
/** A link to the corresponding error documentation. */
|
|
73
128
|
errorLink?: string;
|
|
74
129
|
}
|
|
130
|
+
export interface EvmAccount {
|
|
131
|
+
/**
|
|
132
|
+
* The 0x-prefixed, checksum EVM address.
|
|
133
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
134
|
+
*/
|
|
135
|
+
address: string;
|
|
136
|
+
/**
|
|
137
|
+
* An optional name for the account.
|
|
138
|
+
Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
|
|
139
|
+
Account names are guaranteed to be unique across all EVM accounts in the developer's CDP Project.
|
|
140
|
+
* @pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
141
|
+
*/
|
|
142
|
+
name?: string;
|
|
143
|
+
/** The list of policy IDs that apply to the account. This will include both the project-level policy and the account-level policy, if one exists. */
|
|
144
|
+
policies?: string[];
|
|
145
|
+
/** The UTC ISO 8601 timestamp at which the account was created. */
|
|
146
|
+
createdAt?: string;
|
|
147
|
+
/** The UTC ISO 8601 timestamp at which the account was last updated. */
|
|
148
|
+
updatedAt?: string;
|
|
149
|
+
}
|
|
150
|
+
export interface ListResponse {
|
|
151
|
+
/** The token for the next page of items, if any. */
|
|
152
|
+
nextPageToken?: string;
|
|
153
|
+
}
|
|
75
154
|
/**
|
|
76
155
|
* The domain of the EIP-712 typed data.
|
|
77
156
|
*/
|
|
@@ -187,6 +266,20 @@ export interface UserOperationReceiptRevert {
|
|
|
187
266
|
*/
|
|
188
267
|
export interface UserOperationReceipt {
|
|
189
268
|
revert?: UserOperationReceiptRevert;
|
|
269
|
+
/**
|
|
270
|
+
* The hash of this transaction as 0x-prefixed string.
|
|
271
|
+
* @pattern ^0x[a-fA-F0-9]{64}$
|
|
272
|
+
*/
|
|
273
|
+
transactionHash?: string;
|
|
274
|
+
/**
|
|
275
|
+
* The block hash of the block including the transaction as 0x-prefixed string.
|
|
276
|
+
* @pattern ^0x[0-9a-fA-F]{64}$|^$
|
|
277
|
+
*/
|
|
278
|
+
blockHash?: string;
|
|
279
|
+
/** The block height (number) of the block including the transaction. */
|
|
280
|
+
blockNumber?: number;
|
|
281
|
+
/** The gas used for landing this user operation. */
|
|
282
|
+
gasUsed?: string;
|
|
190
283
|
}
|
|
191
284
|
/**
|
|
192
285
|
* The status of the user operation.
|
|
@@ -219,21 +312,29 @@ export interface EvmUserOperation {
|
|
|
219
312
|
/** The list of receipts associated with the user operation. */
|
|
220
313
|
receipts?: UserOperationReceipt[];
|
|
221
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* The network the spend permission is on.
|
|
317
|
+
*/
|
|
318
|
+
export type SpendPermissionNetwork = (typeof SpendPermissionNetwork)[keyof typeof SpendPermissionNetwork];
|
|
319
|
+
export declare const SpendPermissionNetwork: {
|
|
320
|
+
readonly base: "base";
|
|
321
|
+
readonly "base-sepolia": "base-sepolia";
|
|
322
|
+
readonly ethereum: "ethereum";
|
|
323
|
+
readonly "ethereum-sepolia": "ethereum-sepolia";
|
|
324
|
+
readonly optimism: "optimism";
|
|
325
|
+
readonly arbitrum: "arbitrum";
|
|
326
|
+
readonly avalanche: "avalanche";
|
|
327
|
+
readonly polygon: "polygon";
|
|
328
|
+
};
|
|
222
329
|
export interface CreateSpendPermissionRequest {
|
|
223
|
-
|
|
224
|
-
network: string;
|
|
330
|
+
network: SpendPermissionNetwork;
|
|
225
331
|
/**
|
|
226
|
-
*
|
|
227
|
-
* @pattern ^0x[a-fA-F0-9]{40}$
|
|
228
|
-
*/
|
|
229
|
-
account: string;
|
|
230
|
-
/**
|
|
231
|
-
* Entity that can spend account's tokens.
|
|
332
|
+
* Entity that can spend account's tokens. Can be either a Smart Account or an EOA.
|
|
232
333
|
* @pattern ^0x[a-fA-F0-9]{40}$
|
|
233
334
|
*/
|
|
234
335
|
spender: string;
|
|
235
336
|
/**
|
|
236
|
-
*
|
|
337
|
+
* ERC-7528 native token address (e.g. "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" for native ETH), or an ERC-20 contract address.
|
|
237
338
|
* @pattern ^0x[a-fA-F0-9]{40}$
|
|
238
339
|
*/
|
|
239
340
|
token: string;
|
|
@@ -274,30 +375,29 @@ export interface SpendPermission {
|
|
|
274
375
|
/** Maximum allowed value to spend, in atomic units for the specified token, within each period. */
|
|
275
376
|
allowance: string;
|
|
276
377
|
/** Time duration for resetting used allowance on a recurring basis (seconds). */
|
|
277
|
-
period
|
|
378
|
+
period: string;
|
|
278
379
|
/** The start time for this spend permission, in Unix seconds. */
|
|
279
|
-
start
|
|
380
|
+
start: string;
|
|
280
381
|
/** The expiration time for this spend permission, in Unix seconds. */
|
|
281
|
-
end
|
|
382
|
+
end: string;
|
|
282
383
|
/** An arbitrary salt to differentiate unique spend permissions with otherwise identical data. */
|
|
283
|
-
salt
|
|
384
|
+
salt: string;
|
|
284
385
|
/** Arbitrary data to include in the permission. */
|
|
285
|
-
extraData
|
|
386
|
+
extraData: string;
|
|
286
387
|
}
|
|
287
388
|
export interface SpendPermissionResponseObject {
|
|
288
|
-
permission
|
|
389
|
+
permission: SpendPermission;
|
|
289
390
|
/** Unique hash identifier for this permission. */
|
|
290
|
-
permissionHash
|
|
391
|
+
permissionHash: string;
|
|
291
392
|
/** Whether this permission has been revoked. */
|
|
292
|
-
revoked
|
|
393
|
+
revoked: boolean;
|
|
293
394
|
/** The UTC ISO 8601 timestamp when the permission was revoked (if applicable). */
|
|
294
395
|
revokedAt?: string;
|
|
295
396
|
/** The UTC ISO 8601 timestamp when the permission was created. */
|
|
296
|
-
createdAt
|
|
397
|
+
createdAt: string;
|
|
297
398
|
}
|
|
298
399
|
export interface RevokeSpendPermissionRequest {
|
|
299
|
-
|
|
300
|
-
network: string;
|
|
400
|
+
network: SpendPermissionNetwork;
|
|
301
401
|
/** The hash of the spend permission to revoke. */
|
|
302
402
|
permissionHash: string;
|
|
303
403
|
/** The paymaster URL of the spend permission. */
|
|
@@ -890,6 +990,14 @@ export type EvmNetworkCriterionNetworksItem = (typeof EvmNetworkCriterionNetwork
|
|
|
890
990
|
export declare const EvmNetworkCriterionNetworksItem: {
|
|
891
991
|
readonly "base-sepolia": "base-sepolia";
|
|
892
992
|
readonly base: "base";
|
|
993
|
+
readonly ethereum: "ethereum";
|
|
994
|
+
readonly "ethereum-sepolia": "ethereum-sepolia";
|
|
995
|
+
readonly avalanche: "avalanche";
|
|
996
|
+
readonly polygon: "polygon";
|
|
997
|
+
readonly optimism: "optimism";
|
|
998
|
+
readonly arbitrum: "arbitrum";
|
|
999
|
+
readonly zora: "zora";
|
|
1000
|
+
readonly bnb: "bnb";
|
|
893
1001
|
};
|
|
894
1002
|
/**
|
|
895
1003
|
* The operator to use for the comparison. The transaction's intended `network` will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.
|
|
@@ -1486,6 +1594,298 @@ export interface SolanaTokenBalance {
|
|
|
1486
1594
|
amount: SolanaTokenAmount;
|
|
1487
1595
|
token: SolanaToken;
|
|
1488
1596
|
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Request to execute a SQL query against indexed blockchain data.
|
|
1599
|
+
*/
|
|
1600
|
+
export interface OnchainDataQuery {
|
|
1601
|
+
/**
|
|
1602
|
+
* SQL query to execute against the indexed blockchain data.
|
|
1603
|
+
* @minLength 1
|
|
1604
|
+
* @maxLength 10000
|
|
1605
|
+
*/
|
|
1606
|
+
sql: string;
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* Row data with column names as keys.
|
|
1610
|
+
*/
|
|
1611
|
+
export type OnchainDataResultResultItem = {
|
|
1612
|
+
[key: string]: unknown;
|
|
1613
|
+
};
|
|
1614
|
+
/**
|
|
1615
|
+
* Column data type (ClickHouse types).
|
|
1616
|
+
*/
|
|
1617
|
+
export type OnchainDataResultSchemaColumnsItemType = (typeof OnchainDataResultSchemaColumnsItemType)[keyof typeof OnchainDataResultSchemaColumnsItemType];
|
|
1618
|
+
export declare const OnchainDataResultSchemaColumnsItemType: {
|
|
1619
|
+
readonly String: "String";
|
|
1620
|
+
readonly UInt8: "UInt8";
|
|
1621
|
+
readonly UInt16: "UInt16";
|
|
1622
|
+
readonly UInt32: "UInt32";
|
|
1623
|
+
readonly UInt64: "UInt64";
|
|
1624
|
+
readonly UInt128: "UInt128";
|
|
1625
|
+
readonly UInt256: "UInt256";
|
|
1626
|
+
readonly Int8: "Int8";
|
|
1627
|
+
readonly Int16: "Int16";
|
|
1628
|
+
readonly Int32: "Int32";
|
|
1629
|
+
readonly Int64: "Int64";
|
|
1630
|
+
readonly Int128: "Int128";
|
|
1631
|
+
readonly Int256: "Int256";
|
|
1632
|
+
readonly Float32: "Float32";
|
|
1633
|
+
readonly Float64: "Float64";
|
|
1634
|
+
readonly Bool: "Bool";
|
|
1635
|
+
readonly Date: "Date";
|
|
1636
|
+
readonly DateTime: "DateTime";
|
|
1637
|
+
readonly DateTime64: "DateTime64";
|
|
1638
|
+
readonly UUID: "UUID";
|
|
1639
|
+
};
|
|
1640
|
+
export type OnchainDataResultSchemaColumnsItem = {
|
|
1641
|
+
/** Column name. */
|
|
1642
|
+
name?: string;
|
|
1643
|
+
/** Column data type (ClickHouse types). */
|
|
1644
|
+
type?: OnchainDataResultSchemaColumnsItemType;
|
|
1645
|
+
};
|
|
1646
|
+
/**
|
|
1647
|
+
* Schema information for the query result. This is a derived schema from the query result, so types may not match the underlying table.
|
|
1648
|
+
|
|
1649
|
+
*/
|
|
1650
|
+
export type OnchainDataResultSchema = {
|
|
1651
|
+
/** Column definitions. */
|
|
1652
|
+
columns?: OnchainDataResultSchemaColumnsItem[];
|
|
1653
|
+
};
|
|
1654
|
+
/**
|
|
1655
|
+
* Metadata about query execution.
|
|
1656
|
+
*/
|
|
1657
|
+
export type OnchainDataResultMetadata = {
|
|
1658
|
+
/** Whether the result was served from cache. */
|
|
1659
|
+
cached?: boolean;
|
|
1660
|
+
/** Query execution time in milliseconds. */
|
|
1661
|
+
executionTimeMs?: number;
|
|
1662
|
+
/** Number of rows returned. */
|
|
1663
|
+
rowCount?: number;
|
|
1664
|
+
};
|
|
1665
|
+
/**
|
|
1666
|
+
* Result of executing a SQL query.
|
|
1667
|
+
*/
|
|
1668
|
+
export interface OnchainDataResult {
|
|
1669
|
+
/** Query result as an array of objects representing rows. */
|
|
1670
|
+
result?: OnchainDataResultResultItem[];
|
|
1671
|
+
/** Schema information for the query result. This is a derived schema from the query result, so types may not match the underlying table.
|
|
1672
|
+
*/
|
|
1673
|
+
schema?: OnchainDataResultSchema;
|
|
1674
|
+
/** Metadata about query execution. */
|
|
1675
|
+
metadata?: OnchainDataResultMetadata;
|
|
1676
|
+
}
|
|
1677
|
+
/**
|
|
1678
|
+
* Response containing token addresses that an account has received.
|
|
1679
|
+
*/
|
|
1680
|
+
export interface AccountTokenAddressesResponse {
|
|
1681
|
+
/** The account address that was queried. */
|
|
1682
|
+
accountAddress?: string;
|
|
1683
|
+
/** List of token contract addresses that the account has received. */
|
|
1684
|
+
tokenAddresses?: string[];
|
|
1685
|
+
/**
|
|
1686
|
+
* Total number of unique token addresses discovered.
|
|
1687
|
+
* @minimum 0
|
|
1688
|
+
*/
|
|
1689
|
+
totalCount?: number;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* The version of the x402 protocol.
|
|
1693
|
+
*/
|
|
1694
|
+
export type X402Version = (typeof X402Version)[keyof typeof X402Version];
|
|
1695
|
+
export declare const X402Version: {
|
|
1696
|
+
readonly NUMBER_1: 1;
|
|
1697
|
+
};
|
|
1698
|
+
/**
|
|
1699
|
+
* The authorization data for the ERC-3009 authorization message.
|
|
1700
|
+
*/
|
|
1701
|
+
export type X402ExactEvmPayloadAuthorization = {
|
|
1702
|
+
/**
|
|
1703
|
+
* The 0x-prefixed, checksum EVM address of the sender of the payment.
|
|
1704
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
1705
|
+
*/
|
|
1706
|
+
from: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* The 0x-prefixed, checksum EVM address of the recipient of the payment.
|
|
1709
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
1710
|
+
*/
|
|
1711
|
+
to: string;
|
|
1712
|
+
/** The value of the payment, in atomic units of the payment asset. */
|
|
1713
|
+
value: string;
|
|
1714
|
+
/** The unix timestamp after which the payment is valid. */
|
|
1715
|
+
validAfter: string;
|
|
1716
|
+
/** The unix timestamp before which the payment is valid. */
|
|
1717
|
+
validBefore: string;
|
|
1718
|
+
/** The hex-encoded nonce of the payment. */
|
|
1719
|
+
nonce: string;
|
|
1720
|
+
};
|
|
1721
|
+
/**
|
|
1722
|
+
* The x402 protocol exact scheme payload for EVM networks. The scheme is implemented using ERC-3009. For more details, please see [EVM Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md).
|
|
1723
|
+
*/
|
|
1724
|
+
export interface X402ExactEvmPayload {
|
|
1725
|
+
/** The EIP-712 hex-encoded signature of the ERC-3009 authorization message. */
|
|
1726
|
+
signature: string;
|
|
1727
|
+
/** The authorization data for the ERC-3009 authorization message. */
|
|
1728
|
+
authorization: X402ExactEvmPayloadAuthorization;
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
|
|
1732
|
+
*/
|
|
1733
|
+
export type X402PaymentPayloadScheme = (typeof X402PaymentPayloadScheme)[keyof typeof X402PaymentPayloadScheme];
|
|
1734
|
+
export declare const X402PaymentPayloadScheme: {
|
|
1735
|
+
readonly exact: "exact";
|
|
1736
|
+
};
|
|
1737
|
+
/**
|
|
1738
|
+
* The network of the blockchain to send payment on.
|
|
1739
|
+
*/
|
|
1740
|
+
export type X402PaymentPayloadNetwork = (typeof X402PaymentPayloadNetwork)[keyof typeof X402PaymentPayloadNetwork];
|
|
1741
|
+
export declare const X402PaymentPayloadNetwork: {
|
|
1742
|
+
readonly "base-sepolia": "base-sepolia";
|
|
1743
|
+
readonly base: "base";
|
|
1744
|
+
};
|
|
1745
|
+
/**
|
|
1746
|
+
* The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
|
|
1747
|
+
*/
|
|
1748
|
+
export interface X402PaymentPayload {
|
|
1749
|
+
x402Version: X402Version;
|
|
1750
|
+
/** The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`. */
|
|
1751
|
+
scheme: X402PaymentPayloadScheme;
|
|
1752
|
+
/** The network of the blockchain to send payment on. */
|
|
1753
|
+
network: X402PaymentPayloadNetwork;
|
|
1754
|
+
/** The payload of the payment depending on the x402Version, scheme, and network. */
|
|
1755
|
+
payload: X402ExactEvmPayload;
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
|
|
1759
|
+
*/
|
|
1760
|
+
export type X402PaymentRequirementsScheme = (typeof X402PaymentRequirementsScheme)[keyof typeof X402PaymentRequirementsScheme];
|
|
1761
|
+
export declare const X402PaymentRequirementsScheme: {
|
|
1762
|
+
readonly exact: "exact";
|
|
1763
|
+
};
|
|
1764
|
+
/**
|
|
1765
|
+
* The network of the blockchain to send payment on.
|
|
1766
|
+
*/
|
|
1767
|
+
export type X402PaymentRequirementsNetwork = (typeof X402PaymentRequirementsNetwork)[keyof typeof X402PaymentRequirementsNetwork];
|
|
1768
|
+
export declare const X402PaymentRequirementsNetwork: {
|
|
1769
|
+
readonly "base-sepolia": "base-sepolia";
|
|
1770
|
+
readonly base: "base";
|
|
1771
|
+
};
|
|
1772
|
+
/**
|
|
1773
|
+
* The optional JSON schema describing the resource output.
|
|
1774
|
+
*/
|
|
1775
|
+
export type X402PaymentRequirementsOutputSchema = {
|
|
1776
|
+
[key: string]: unknown;
|
|
1777
|
+
};
|
|
1778
|
+
/**
|
|
1779
|
+
* The optional additional scheme-specific payment info.
|
|
1780
|
+
*/
|
|
1781
|
+
export type X402PaymentRequirementsExtra = {
|
|
1782
|
+
[key: string]: unknown;
|
|
1783
|
+
};
|
|
1784
|
+
/**
|
|
1785
|
+
* The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
|
|
1786
|
+
*/
|
|
1787
|
+
export interface X402PaymentRequirements {
|
|
1788
|
+
/** The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`. */
|
|
1789
|
+
scheme: X402PaymentRequirementsScheme;
|
|
1790
|
+
/** The network of the blockchain to send payment on. */
|
|
1791
|
+
network: X402PaymentRequirementsNetwork;
|
|
1792
|
+
/** The maximum amount required to pay for the resource in atomic units of the payment asset. */
|
|
1793
|
+
maxAmountRequired: string;
|
|
1794
|
+
/** The URL of the resource to pay for. */
|
|
1795
|
+
resource: string;
|
|
1796
|
+
/** The description of the resource. */
|
|
1797
|
+
description: string;
|
|
1798
|
+
/** The MIME type of the resource response. */
|
|
1799
|
+
mimeType: string;
|
|
1800
|
+
/** The optional JSON schema describing the resource output. */
|
|
1801
|
+
outputSchema?: X402PaymentRequirementsOutputSchema;
|
|
1802
|
+
/**
|
|
1803
|
+
* The destination to pay value to.
|
|
1804
|
+
|
|
1805
|
+
For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
|
|
1806
|
+
|
|
1807
|
+
For Solana-based networks, payTo will be a base58-encoded Solana address.
|
|
1808
|
+
* @pattern ^0x[a-fA-F0-9]{40}|[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
1809
|
+
*/
|
|
1810
|
+
payTo: string;
|
|
1811
|
+
/** The maximum time in seconds for the resource server to respond. */
|
|
1812
|
+
maxTimeoutSeconds: number;
|
|
1813
|
+
/**
|
|
1814
|
+
* The asset to pay with.
|
|
1815
|
+
|
|
1816
|
+
For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
|
|
1817
|
+
|
|
1818
|
+
For Solana-based networks, the asset will be a base58-encoded Solana address.
|
|
1819
|
+
* @pattern ^0x[a-fA-F0-9]{40}|[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
1820
|
+
*/
|
|
1821
|
+
asset: string;
|
|
1822
|
+
/** The optional additional scheme-specific payment info. */
|
|
1823
|
+
extra?: X402PaymentRequirementsExtra;
|
|
1824
|
+
}
|
|
1825
|
+
/**
|
|
1826
|
+
* The reason the payment is invalid on the x402 protocol.
|
|
1827
|
+
*/
|
|
1828
|
+
export type X402VerifyInvalidReason = (typeof X402VerifyInvalidReason)[keyof typeof X402VerifyInvalidReason];
|
|
1829
|
+
export declare const X402VerifyInvalidReason: {
|
|
1830
|
+
readonly insufficient_funds: "insufficient_funds";
|
|
1831
|
+
readonly invalid_scheme: "invalid_scheme";
|
|
1832
|
+
readonly invalid_network: "invalid_network";
|
|
1833
|
+
readonly invalid_x402_version: "invalid_x402_version";
|
|
1834
|
+
readonly invalid_payment_requirements: "invalid_payment_requirements";
|
|
1835
|
+
readonly invalid_payload: "invalid_payload";
|
|
1836
|
+
readonly invalid_exact_evm_payload_authorization_value: "invalid_exact_evm_payload_authorization_value";
|
|
1837
|
+
readonly invalid_exact_evm_payload_authorization_valid_after: "invalid_exact_evm_payload_authorization_valid_after";
|
|
1838
|
+
readonly invalid_exact_evm_payload_authorization_valid_before: "invalid_exact_evm_payload_authorization_valid_before";
|
|
1839
|
+
readonly invalid_exact_evm_payload_authorization_typed_data_message: "invalid_exact_evm_payload_authorization_typed_data_message";
|
|
1840
|
+
readonly invalid_exact_evm_payload_authorization_from_address_kyt: "invalid_exact_evm_payload_authorization_from_address_kyt";
|
|
1841
|
+
readonly invalid_exact_evm_payload_authorization_to_address_kyt: "invalid_exact_evm_payload_authorization_to_address_kyt";
|
|
1842
|
+
readonly invalid_exact_evm_payload_signature: "invalid_exact_evm_payload_signature";
|
|
1843
|
+
readonly invalid_exact_evm_payload_signature_address: "invalid_exact_evm_payload_signature_address";
|
|
1844
|
+
};
|
|
1845
|
+
/**
|
|
1846
|
+
* The reason the payment settlement errored on the x402 protocol.
|
|
1847
|
+
*/
|
|
1848
|
+
export type X402SettleErrorReason = (typeof X402SettleErrorReason)[keyof typeof X402SettleErrorReason];
|
|
1849
|
+
export declare const X402SettleErrorReason: {
|
|
1850
|
+
readonly insufficient_funds: "insufficient_funds";
|
|
1851
|
+
readonly invalid_scheme: "invalid_scheme";
|
|
1852
|
+
readonly invalid_network: "invalid_network";
|
|
1853
|
+
readonly invalid_x402_version: "invalid_x402_version";
|
|
1854
|
+
readonly invalid_payment_requirements: "invalid_payment_requirements";
|
|
1855
|
+
readonly invalid_payload: "invalid_payload";
|
|
1856
|
+
readonly invalid_exact_evm_payload_authorization_value: "invalid_exact_evm_payload_authorization_value";
|
|
1857
|
+
readonly invalid_exact_evm_payload_authorization_valid_after: "invalid_exact_evm_payload_authorization_valid_after";
|
|
1858
|
+
readonly invalid_exact_evm_payload_authorization_valid_before: "invalid_exact_evm_payload_authorization_valid_before";
|
|
1859
|
+
readonly invalid_exact_evm_payload_authorization_typed_data_message: "invalid_exact_evm_payload_authorization_typed_data_message";
|
|
1860
|
+
readonly invalid_exact_evm_payload_authorization_from_address_kyt: "invalid_exact_evm_payload_authorization_from_address_kyt";
|
|
1861
|
+
readonly invalid_exact_evm_payload_authorization_to_address_kyt: "invalid_exact_evm_payload_authorization_to_address_kyt";
|
|
1862
|
+
readonly invalid_exact_evm_payload_signature_address: "invalid_exact_evm_payload_signature_address";
|
|
1863
|
+
};
|
|
1864
|
+
/**
|
|
1865
|
+
* The scheme of the payment protocol.
|
|
1866
|
+
*/
|
|
1867
|
+
export type X402SupportedPaymentKindScheme = (typeof X402SupportedPaymentKindScheme)[keyof typeof X402SupportedPaymentKindScheme];
|
|
1868
|
+
export declare const X402SupportedPaymentKindScheme: {
|
|
1869
|
+
readonly exact: "exact";
|
|
1870
|
+
};
|
|
1871
|
+
/**
|
|
1872
|
+
* The network of the blockchain.
|
|
1873
|
+
*/
|
|
1874
|
+
export type X402SupportedPaymentKindNetwork = (typeof X402SupportedPaymentKindNetwork)[keyof typeof X402SupportedPaymentKindNetwork];
|
|
1875
|
+
export declare const X402SupportedPaymentKindNetwork: {
|
|
1876
|
+
readonly "base-sepolia": "base-sepolia";
|
|
1877
|
+
readonly base: "base";
|
|
1878
|
+
};
|
|
1879
|
+
/**
|
|
1880
|
+
* The supported payment kind for the x402 protocol. A kind is comprised of a scheme and a network, which together uniquely identify a way to move money on the x402 protocol. For more details, please see [x402 Schemes](https://github.com/coinbase/x402?tab=readme-ov-file#schemes).
|
|
1881
|
+
*/
|
|
1882
|
+
export interface X402SupportedPaymentKind {
|
|
1883
|
+
x402Version: X402Version;
|
|
1884
|
+
/** The scheme of the payment protocol. */
|
|
1885
|
+
scheme: X402SupportedPaymentKindScheme;
|
|
1886
|
+
/** The network of the blockchain. */
|
|
1887
|
+
network: X402SupportedPaymentKindNetwork;
|
|
1888
|
+
}
|
|
1489
1889
|
/**
|
|
1490
1890
|
* The action of the payment method.
|
|
1491
1891
|
*/
|
|
@@ -1797,10 +2197,59 @@ export type IdempotencyErrorResponse = Error;
|
|
|
1797
2197
|
* The resource already exists.
|
|
1798
2198
|
*/
|
|
1799
2199
|
export type AlreadyExistsErrorResponse = Error;
|
|
2200
|
+
/**
|
|
2201
|
+
* The underlying SQL string is invalid.
|
|
2202
|
+
*/
|
|
2203
|
+
export type InvalidSQLQueryErrorResponse = Error;
|
|
1800
2204
|
/**
|
|
1801
2205
|
* Unauthorized.
|
|
1802
2206
|
*/
|
|
1803
2207
|
export type UnauthorizedErrorResponse = Error;
|
|
2208
|
+
/**
|
|
2209
|
+
* The request timed out.
|
|
2210
|
+
*/
|
|
2211
|
+
export type TimedOutErrorResponse = Error;
|
|
2212
|
+
export type X402VerifyResponseResponse = {
|
|
2213
|
+
/** Indicates whether the payment is valid. */
|
|
2214
|
+
isValid: boolean;
|
|
2215
|
+
invalidReason?: X402VerifyInvalidReason;
|
|
2216
|
+
/**
|
|
2217
|
+
* The onchain address of the client that is paying for the resource.
|
|
2218
|
+
|
|
2219
|
+
For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
|
|
2220
|
+
|
|
2221
|
+
For Solana-based networks, the payer will be a base58-encoded Solana address.
|
|
2222
|
+
* @pattern ^0x[a-fA-F0-9]{40}|[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
2223
|
+
*/
|
|
2224
|
+
payer: string;
|
|
2225
|
+
};
|
|
2226
|
+
export type X402SettleResponseResponse = {
|
|
2227
|
+
/** Indicates whether the payment settlement is successful. */
|
|
2228
|
+
success: boolean;
|
|
2229
|
+
errorReason?: X402SettleErrorReason;
|
|
2230
|
+
/**
|
|
2231
|
+
* The onchain address of the client that is paying for the resource.
|
|
2232
|
+
|
|
2233
|
+
For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
|
|
2234
|
+
|
|
2235
|
+
For Solana-based networks, the payer will be a base58-encoded Solana address.
|
|
2236
|
+
* @pattern ^0x[a-fA-F0-9]{40}|[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
2237
|
+
*/
|
|
2238
|
+
payer: string;
|
|
2239
|
+
/**
|
|
2240
|
+
* The transaction of the settlement.
|
|
2241
|
+
For EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.
|
|
2242
|
+
For Solana-based networks, the transaction will be a base58-encoded Solana signature.
|
|
2243
|
+
* @pattern ^0x[a-fA-F0-9]{40}|[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$
|
|
2244
|
+
*/
|
|
2245
|
+
transaction: string;
|
|
2246
|
+
/** The network where the settlement occurred. */
|
|
2247
|
+
network: string;
|
|
2248
|
+
};
|
|
2249
|
+
export type X402SupportedPaymentKindsResponseResponse = {
|
|
2250
|
+
/** The list of supported payment kinds. */
|
|
2251
|
+
kinds: X402SupportedPaymentKind[];
|
|
2252
|
+
};
|
|
1804
2253
|
/**
|
|
1805
2254
|
* Rate limit exceeded.
|
|
1806
2255
|
*/
|
|
@@ -1819,6 +2268,13 @@ Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/i
|
|
|
1819
2268
|
|
|
1820
2269
|
*/
|
|
1821
2270
|
export type IdempotencyKeyParameter = string;
|
|
2271
|
+
/**
|
|
2272
|
+
* The request body for a developer to verify an end user's access token.
|
|
2273
|
+
*/
|
|
2274
|
+
export type ValidateEndUserAccessTokenBody = {
|
|
2275
|
+
/** The access token in JWT format to verify. */
|
|
2276
|
+
accessToken: string;
|
|
2277
|
+
};
|
|
1822
2278
|
export type ListEvmAccountsParams = {
|
|
1823
2279
|
/**
|
|
1824
2280
|
* The number of accounts to return per page.
|
|
@@ -2299,6 +2755,31 @@ export type ListSolanaTokenBalances200AllOf = {
|
|
|
2299
2755
|
balances: SolanaTokenBalance[];
|
|
2300
2756
|
};
|
|
2301
2757
|
export type ListSolanaTokenBalances200 = ListSolanaTokenBalances200AllOf & ListResponse;
|
|
2758
|
+
export type ListDataTokenBalancesParams = {
|
|
2759
|
+
/**
|
|
2760
|
+
* The number of balances to return per page.
|
|
2761
|
+
*/
|
|
2762
|
+
pageSize?: number;
|
|
2763
|
+
/**
|
|
2764
|
+
* The token for the next page of balances. Will be empty if there are no more balances to fetch.
|
|
2765
|
+
*/
|
|
2766
|
+
pageToken?: string;
|
|
2767
|
+
};
|
|
2768
|
+
export type ListDataTokenBalances200AllOf = {
|
|
2769
|
+
/** The list of EVM token balances. */
|
|
2770
|
+
balances: TokenBalance[];
|
|
2771
|
+
};
|
|
2772
|
+
export type ListDataTokenBalances200 = ListDataTokenBalances200AllOf & ListResponse;
|
|
2773
|
+
export type VerifyX402PaymentBody = {
|
|
2774
|
+
x402Version: X402Version;
|
|
2775
|
+
paymentPayload: X402PaymentPayload;
|
|
2776
|
+
paymentRequirements: X402PaymentRequirements;
|
|
2777
|
+
};
|
|
2778
|
+
export type SettleX402PaymentBody = {
|
|
2779
|
+
x402Version: X402Version;
|
|
2780
|
+
paymentPayload: X402PaymentPayload;
|
|
2781
|
+
paymentRequirements: X402PaymentRequirements;
|
|
2782
|
+
};
|
|
2302
2783
|
export type GetCryptoRailsParams = {
|
|
2303
2784
|
/**
|
|
2304
2785
|
* Comma separated list of networks to filter the rails by.
|