@coinbase/cdp-sdk 1.44.1 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +117 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js +27 -0
- package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +127 -55
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +111 -45
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +49 -19
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js +37 -0
- package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_cjs/analytics.js +10 -228
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/client/cdp.js +0 -6
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/evm/evm.js +482 -227
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/client/policies/policies.js +41 -11
- package/_cjs/client/policies/policies.js.map +1 -1
- package/_cjs/client/solana/solana.js +177 -106
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/index.js +3 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +137 -5
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +30 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js +15 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_cjs/policies/evmSchema.js +127 -1
- package/_cjs/policies/evmSchema.js.map +1 -1
- package/_cjs/policies/solanaSchema.js +102 -1
- package/_cjs/policies/solanaSchema.js.map +1 -1
- package/_cjs/policies/types.js +7 -0
- package/_cjs/policies/types.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/toEvmDelegatedAccount.js +24 -0
- package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
- package/_esm/accounts/evm/toEvmServerAccount.js +127 -55
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +111 -45
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +49 -19
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js +34 -0
- package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
- package/_esm/analytics.js +9 -227
- package/_esm/analytics.js.map +1 -1
- package/_esm/client/cdp.js +0 -6
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/evm/evm.js +482 -227
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/client/policies/policies.js +41 -11
- package/_esm/client/policies/policies.js.map +1 -1
- package/_esm/client/solana/solana.js +177 -106
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/index.js +1 -0
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +134 -3
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +27 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/onramp/onramp.js +13 -0
- package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
- package/_esm/policies/evmSchema.js +126 -0
- package/_esm/policies/evmSchema.js.map +1 -1
- package/_esm/policies/solanaSchema.js +101 -0
- package/_esm/policies/solanaSchema.js.map +1 -1
- package/_esm/policies/types.js +9 -2
- package/_esm/policies/types.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts +13 -0
- package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -0
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts +32 -0
- package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -0
- package/_types/analytics.d.ts +5 -38
- package/_types/analytics.d.ts.map +1 -1
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +54 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +29 -2
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/policies/policies.d.ts.map +1 -1
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +436 -10
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +21 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts +8 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +4 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +2717 -601
- package/_types/policies/evmSchema.d.ts.map +1 -1
- package/_types/policies/solanaSchema.d.ts +1411 -47
- package/_types/policies/solanaSchema.d.ts.map +1 -1
- package/_types/policies/types.d.ts +8427 -2942
- package/_types/policies/types.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
- package/accounts/evm/toEvmServerAccount.ts +115 -67
- package/accounts/evm/toEvmSmartAccount.ts +100 -56
- package/accounts/solana/toSolanaAccount.ts +44 -24
- package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
- package/analytics.ts +8 -294
- package/client/cdp.ts +0 -7
- package/client/evm/evm.ts +517 -282
- package/client/evm/evm.types.ts +41 -0
- package/client/policies/policies.ts +41 -16
- package/client/solana/solana.ts +195 -141
- package/index.ts +5 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +580 -11
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +49 -0
- package/openapi-client/generated/onramp/onramp.ts +24 -0
- package/package.json +1 -1
- package/policies/evmSchema.ts +164 -0
- package/policies/solanaSchema.ts +130 -0
- package/policies/types.ts +14 -0
- package/version.ts +1 -1
|
@@ -66,6 +66,7 @@ export declare const OAuth2ProviderType: {
|
|
|
66
66
|
readonly google: "google";
|
|
67
67
|
readonly apple: "apple";
|
|
68
68
|
readonly x: "x";
|
|
69
|
+
readonly telegram: "telegram";
|
|
69
70
|
};
|
|
70
71
|
/**
|
|
71
72
|
* Information about an end user who authenticates using a third-party provider.
|
|
@@ -81,10 +82,28 @@ export interface OAuth2Authentication {
|
|
|
81
82
|
/** The username of the end user if available from third-party OAuth2 provider's token exchange. */
|
|
82
83
|
username?: string;
|
|
83
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Information about an end user who authenticates using Telegram.
|
|
87
|
+
*/
|
|
88
|
+
export interface TelegramAuthentication {
|
|
89
|
+
type: OAuth2ProviderType;
|
|
90
|
+
/** The Telegram ID for the end user. */
|
|
91
|
+
id: number;
|
|
92
|
+
/** The Telegram user's first name. */
|
|
93
|
+
firstName?: string;
|
|
94
|
+
/** The Telegram user's last name. */
|
|
95
|
+
lastName?: string;
|
|
96
|
+
/** The Telegram user's profile picture. */
|
|
97
|
+
photoUrl?: string;
|
|
98
|
+
/** The Telegram user's last login as a Unix timestamp. */
|
|
99
|
+
authDate: number;
|
|
100
|
+
/** The Telegram user's username. */
|
|
101
|
+
username?: string;
|
|
102
|
+
}
|
|
84
103
|
/**
|
|
85
104
|
* Information about how the end user is authenticated.
|
|
86
105
|
*/
|
|
87
|
-
export type AuthenticationMethod = EmailAuthentication | SmsAuthentication | DeveloperJWTAuthentication | OAuth2Authentication;
|
|
106
|
+
export type AuthenticationMethod = EmailAuthentication | SmsAuthentication | DeveloperJWTAuthentication | OAuth2Authentication | TelegramAuthentication;
|
|
88
107
|
/**
|
|
89
108
|
* The list of valid authentication methods linked to the end user.
|
|
90
109
|
*/
|
|
@@ -199,6 +218,7 @@ export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
|
|
|
199
218
|
export declare const ErrorType: {
|
|
200
219
|
readonly already_exists: "already_exists";
|
|
201
220
|
readonly bad_gateway: "bad_gateway";
|
|
221
|
+
readonly client_closed_request: "client_closed_request";
|
|
202
222
|
readonly faucet_limit_exceeded: "faucet_limit_exceeded";
|
|
203
223
|
readonly forbidden: "forbidden";
|
|
204
224
|
readonly idempotency_error: "idempotency_error";
|
|
@@ -209,6 +229,8 @@ export declare const ErrorType: {
|
|
|
209
229
|
readonly malformed_transaction: "malformed_transaction";
|
|
210
230
|
readonly not_found: "not_found";
|
|
211
231
|
readonly payment_method_required: "payment_method_required";
|
|
232
|
+
readonly payment_required: "payment_required";
|
|
233
|
+
readonly settlement_failed: "settlement_failed";
|
|
212
234
|
readonly rate_limit_exceeded: "rate_limit_exceeded";
|
|
213
235
|
readonly request_canceled: "request_canceled";
|
|
214
236
|
readonly service_unavailable: "service_unavailable";
|
|
@@ -227,14 +249,31 @@ export declare const ErrorType: {
|
|
|
227
249
|
readonly recipient_allowlist_violation: "recipient_allowlist_violation";
|
|
228
250
|
readonly recipient_allowlist_pending: "recipient_allowlist_pending";
|
|
229
251
|
readonly travel_rules_recipient_violation: "travel_rules_recipient_violation";
|
|
230
|
-
readonly
|
|
231
|
-
readonly
|
|
232
|
-
readonly
|
|
252
|
+
readonly source_account_invalid: "source_account_invalid";
|
|
253
|
+
readonly target_account_invalid: "target_account_invalid";
|
|
254
|
+
readonly source_account_not_found: "source_account_not_found";
|
|
255
|
+
readonly target_account_not_found: "target_account_not_found";
|
|
256
|
+
readonly source_asset_not_supported: "source_asset_not_supported";
|
|
257
|
+
readonly target_asset_not_supported: "target_asset_not_supported";
|
|
258
|
+
readonly target_email_invalid: "target_email_invalid";
|
|
259
|
+
readonly target_onchain_address_invalid: "target_onchain_address_invalid";
|
|
260
|
+
readonly transfer_amount_invalid: "transfer_amount_invalid";
|
|
261
|
+
readonly transfer_asset_not_supported: "transfer_asset_not_supported";
|
|
262
|
+
readonly insufficient_balance: "insufficient_balance";
|
|
263
|
+
readonly metadata_too_many_entries: "metadata_too_many_entries";
|
|
264
|
+
readonly metadata_key_too_long: "metadata_key_too_long";
|
|
265
|
+
readonly metadata_value_too_long: "metadata_value_too_long";
|
|
266
|
+
readonly travel_rules_field_missing: "travel_rules_field_missing";
|
|
267
|
+
readonly asset_mismatch: "asset_mismatch";
|
|
233
268
|
readonly mfa_already_enrolled: "mfa_already_enrolled";
|
|
234
269
|
readonly mfa_invalid_code: "mfa_invalid_code";
|
|
235
270
|
readonly mfa_flow_expired: "mfa_flow_expired";
|
|
236
271
|
readonly mfa_required: "mfa_required";
|
|
237
272
|
readonly mfa_not_enrolled: "mfa_not_enrolled";
|
|
273
|
+
readonly order_quote_expired: "order_quote_expired";
|
|
274
|
+
readonly order_already_filled: "order_already_filled";
|
|
275
|
+
readonly order_already_canceled: "order_already_canceled";
|
|
276
|
+
readonly account_not_ready: "account_not_ready";
|
|
238
277
|
};
|
|
239
278
|
/**
|
|
240
279
|
* A valid HTTP or HTTPS URL.
|
|
@@ -321,6 +360,52 @@ export interface EIP712Message {
|
|
|
321
360
|
/** The message to sign. The structure of this message must match the `primaryType` struct in the `types` object. */
|
|
322
361
|
message: EIP712MessageMessage;
|
|
323
362
|
}
|
|
363
|
+
/**
|
|
364
|
+
* The network for the EIP-7702 delegation.
|
|
365
|
+
*/
|
|
366
|
+
export type EvmEip7702DelegationNetwork = (typeof EvmEip7702DelegationNetwork)[keyof typeof EvmEip7702DelegationNetwork];
|
|
367
|
+
export declare const EvmEip7702DelegationNetwork: {
|
|
368
|
+
readonly "base-sepolia": "base-sepolia";
|
|
369
|
+
readonly base: "base";
|
|
370
|
+
readonly arbitrum: "arbitrum";
|
|
371
|
+
readonly optimism: "optimism";
|
|
372
|
+
readonly polygon: "polygon";
|
|
373
|
+
readonly ethereum: "ethereum";
|
|
374
|
+
readonly "ethereum-sepolia": "ethereum-sepolia";
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* The current status of the delegation operation.
|
|
378
|
+
UNSPECIFIED means the status has not been set. PENDING means the operation has been created but not yet submitted. SUBMITTED means the operation has been submitted to the network. COMPLETED means the operation has completed successfully. FAILED means the operation has failed.
|
|
379
|
+
*/
|
|
380
|
+
export type EvmEip7702DelegationOperationStatus = (typeof EvmEip7702DelegationOperationStatus)[keyof typeof EvmEip7702DelegationOperationStatus];
|
|
381
|
+
export declare const EvmEip7702DelegationOperationStatus: {
|
|
382
|
+
readonly UNSPECIFIED: "UNSPECIFIED";
|
|
383
|
+
readonly PENDING: "PENDING";
|
|
384
|
+
readonly SUBMITTED: "SUBMITTED";
|
|
385
|
+
readonly COMPLETED: "COMPLETED";
|
|
386
|
+
readonly FAILED: "FAILED";
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* The status of an EIP-7702 delegation operation.
|
|
390
|
+
*/
|
|
391
|
+
export interface EvmEip7702DelegationOperation {
|
|
392
|
+
/** The unique identifier for the delegation operation. */
|
|
393
|
+
delegationOperationId: string;
|
|
394
|
+
/** The current status of the delegation operation.
|
|
395
|
+
UNSPECIFIED means the status has not been set. PENDING means the operation has been created but not yet submitted. SUBMITTED means the operation has been submitted to the network. COMPLETED means the operation has completed successfully. FAILED means the operation has failed. */
|
|
396
|
+
status: EvmEip7702DelegationOperationStatus;
|
|
397
|
+
/**
|
|
398
|
+
* The hash of the delegation transaction, if available. Present once the transaction has been submitted to the network.
|
|
399
|
+
* @pattern ^0x[0-9a-fA-F]{64}$
|
|
400
|
+
*/
|
|
401
|
+
transactionHash?: string;
|
|
402
|
+
network: EvmEip7702DelegationNetwork;
|
|
403
|
+
/**
|
|
404
|
+
* The address the account has delegated to, if any. Only present when the account has an active delegation.
|
|
405
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
406
|
+
*/
|
|
407
|
+
delegateAddress?: string;
|
|
408
|
+
}
|
|
324
409
|
export interface EvmSmartAccount {
|
|
325
410
|
/**
|
|
326
411
|
* The 0x-prefixed, checksum address of the Smart Account.
|
|
@@ -545,6 +630,7 @@ export declare const EvmSwapsNetwork: {
|
|
|
545
630
|
readonly ethereum: "ethereum";
|
|
546
631
|
readonly arbitrum: "arbitrum";
|
|
547
632
|
readonly optimism: "optimism";
|
|
633
|
+
readonly polygon: "polygon";
|
|
548
634
|
};
|
|
549
635
|
/**
|
|
550
636
|
* The 0x-prefixed contract address of the token to receive.
|
|
@@ -864,6 +950,7 @@ export interface EthValueCriterion {
|
|
|
864
950
|
type: EthValueCriterionType;
|
|
865
951
|
/**
|
|
866
952
|
* The amount of ETH, in wei, that the transaction's `value` field should be compared to.
|
|
953
|
+
* @maxLength 78
|
|
867
954
|
* @pattern ^[0-9]+$
|
|
868
955
|
*/
|
|
869
956
|
ethValue: string;
|
|
@@ -1870,10 +1957,197 @@ export interface SendUserOperationRule {
|
|
|
1870
1957
|
operation: SendUserOperationRuleOperation;
|
|
1871
1958
|
criteria: SendUserOperationCriteria;
|
|
1872
1959
|
}
|
|
1960
|
+
export type SignEndUserEvmTransactionCriteriaItem = EthValueCriterion | EvmAddressCriterion | EvmDataCriterion | NetUSDChangeCriterion;
|
|
1961
|
+
/**
|
|
1962
|
+
* A schema for specifying criteria for the signEndUserEvmTransaction operation.
|
|
1963
|
+
*/
|
|
1964
|
+
export type SignEndUserEvmTransactionCriteria = SignEndUserEvmTransactionCriteriaItem[];
|
|
1965
|
+
/**
|
|
1966
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
1967
|
+
*/
|
|
1968
|
+
export type SignEndUserEvmTransactionRuleAction = (typeof SignEndUserEvmTransactionRuleAction)[keyof typeof SignEndUserEvmTransactionRuleAction];
|
|
1969
|
+
export declare const SignEndUserEvmTransactionRuleAction: {
|
|
1970
|
+
readonly reject: "reject";
|
|
1971
|
+
readonly accept: "accept";
|
|
1972
|
+
};
|
|
1973
|
+
/**
|
|
1974
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
1975
|
+
*/
|
|
1976
|
+
export type SignEndUserEvmTransactionRuleOperation = (typeof SignEndUserEvmTransactionRuleOperation)[keyof typeof SignEndUserEvmTransactionRuleOperation];
|
|
1977
|
+
export declare const SignEndUserEvmTransactionRuleOperation: {
|
|
1978
|
+
readonly signEndUserEvmTransaction: "signEndUserEvmTransaction";
|
|
1979
|
+
};
|
|
1980
|
+
export interface SignEndUserEvmTransactionRule {
|
|
1981
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
1982
|
+
action: SignEndUserEvmTransactionRuleAction;
|
|
1983
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
1984
|
+
operation: SignEndUserEvmTransactionRuleOperation;
|
|
1985
|
+
criteria: SignEndUserEvmTransactionCriteria;
|
|
1986
|
+
}
|
|
1987
|
+
export type SendEndUserEvmTransactionCriteriaItem = EthValueCriterion | EvmAddressCriterion | EvmNetworkCriterion | EvmDataCriterion | NetUSDChangeCriterion;
|
|
1988
|
+
/**
|
|
1989
|
+
* A schema for specifying criteria for the sendEndUserEvmTransaction operation.
|
|
1990
|
+
*/
|
|
1991
|
+
export type SendEndUserEvmTransactionCriteria = SendEndUserEvmTransactionCriteriaItem[];
|
|
1992
|
+
/**
|
|
1993
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
1994
|
+
*/
|
|
1995
|
+
export type SendEndUserEvmTransactionRuleAction = (typeof SendEndUserEvmTransactionRuleAction)[keyof typeof SendEndUserEvmTransactionRuleAction];
|
|
1996
|
+
export declare const SendEndUserEvmTransactionRuleAction: {
|
|
1997
|
+
readonly reject: "reject";
|
|
1998
|
+
readonly accept: "accept";
|
|
1999
|
+
};
|
|
2000
|
+
/**
|
|
2001
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2002
|
+
*/
|
|
2003
|
+
export type SendEndUserEvmTransactionRuleOperation = (typeof SendEndUserEvmTransactionRuleOperation)[keyof typeof SendEndUserEvmTransactionRuleOperation];
|
|
2004
|
+
export declare const SendEndUserEvmTransactionRuleOperation: {
|
|
2005
|
+
readonly sendEndUserEvmTransaction: "sendEndUserEvmTransaction";
|
|
2006
|
+
};
|
|
2007
|
+
export interface SendEndUserEvmTransactionRule {
|
|
2008
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2009
|
+
action: SendEndUserEvmTransactionRuleAction;
|
|
2010
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2011
|
+
operation: SendEndUserEvmTransactionRuleOperation;
|
|
2012
|
+
criteria: SendEndUserEvmTransactionCriteria;
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
* A schema for specifying criteria for the signEndUserEvmMessage operation.
|
|
2016
|
+
*/
|
|
2017
|
+
export type SignEndUserEvmMessageCriteria = EvmMessageCriterion[];
|
|
2018
|
+
/**
|
|
2019
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2020
|
+
*/
|
|
2021
|
+
export type SignEndUserEvmMessageRuleAction = (typeof SignEndUserEvmMessageRuleAction)[keyof typeof SignEndUserEvmMessageRuleAction];
|
|
2022
|
+
export declare const SignEndUserEvmMessageRuleAction: {
|
|
2023
|
+
readonly reject: "reject";
|
|
2024
|
+
readonly accept: "accept";
|
|
2025
|
+
};
|
|
2026
|
+
/**
|
|
2027
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2028
|
+
*/
|
|
2029
|
+
export type SignEndUserEvmMessageRuleOperation = (typeof SignEndUserEvmMessageRuleOperation)[keyof typeof SignEndUserEvmMessageRuleOperation];
|
|
2030
|
+
export declare const SignEndUserEvmMessageRuleOperation: {
|
|
2031
|
+
readonly signEndUserEvmMessage: "signEndUserEvmMessage";
|
|
2032
|
+
};
|
|
2033
|
+
export interface SignEndUserEvmMessageRule {
|
|
2034
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2035
|
+
action: SignEndUserEvmMessageRuleAction;
|
|
2036
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2037
|
+
operation: SignEndUserEvmMessageRuleOperation;
|
|
2038
|
+
criteria: SignEndUserEvmMessageCriteria;
|
|
2039
|
+
}
|
|
2040
|
+
export type SignEndUserEvmTypedDataCriteriaItem = SignEvmTypedDataFieldCriterion | SignEvmTypedDataVerifyingContractCriterion;
|
|
2041
|
+
/**
|
|
2042
|
+
* A schema for specifying criteria for the signEndUserEvmTypedData operation.
|
|
2043
|
+
*/
|
|
2044
|
+
export type SignEndUserEvmTypedDataCriteria = SignEndUserEvmTypedDataCriteriaItem[];
|
|
2045
|
+
/**
|
|
2046
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2047
|
+
*/
|
|
2048
|
+
export type SignEndUserEvmTypedDataRuleAction = (typeof SignEndUserEvmTypedDataRuleAction)[keyof typeof SignEndUserEvmTypedDataRuleAction];
|
|
2049
|
+
export declare const SignEndUserEvmTypedDataRuleAction: {
|
|
2050
|
+
readonly reject: "reject";
|
|
2051
|
+
readonly accept: "accept";
|
|
2052
|
+
};
|
|
2053
|
+
/**
|
|
2054
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2055
|
+
*/
|
|
2056
|
+
export type SignEndUserEvmTypedDataRuleOperation = (typeof SignEndUserEvmTypedDataRuleOperation)[keyof typeof SignEndUserEvmTypedDataRuleOperation];
|
|
2057
|
+
export declare const SignEndUserEvmTypedDataRuleOperation: {
|
|
2058
|
+
readonly signEndUserEvmTypedData: "signEndUserEvmTypedData";
|
|
2059
|
+
};
|
|
2060
|
+
export interface SignEndUserEvmTypedDataRule {
|
|
2061
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2062
|
+
action: SignEndUserEvmTypedDataRuleAction;
|
|
2063
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2064
|
+
operation: SignEndUserEvmTypedDataRuleOperation;
|
|
2065
|
+
criteria: SignEndUserEvmTypedDataCriteria;
|
|
2066
|
+
}
|
|
2067
|
+
export type SignEndUserSolTransactionCriteriaItem = SolAddressCriterion | SolValueCriterion | SplAddressCriterion | SplValueCriterion | MintAddressCriterion | SolDataCriterion | ProgramIdCriterion;
|
|
2068
|
+
/**
|
|
2069
|
+
* A schema for specifying criteria for the signEndUserSolTransaction operation.
|
|
2070
|
+
*/
|
|
2071
|
+
export type SignEndUserSolTransactionCriteria = SignEndUserSolTransactionCriteriaItem[];
|
|
2072
|
+
/**
|
|
2073
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2074
|
+
*/
|
|
2075
|
+
export type SignEndUserSolTransactionRuleAction = (typeof SignEndUserSolTransactionRuleAction)[keyof typeof SignEndUserSolTransactionRuleAction];
|
|
2076
|
+
export declare const SignEndUserSolTransactionRuleAction: {
|
|
2077
|
+
readonly reject: "reject";
|
|
2078
|
+
readonly accept: "accept";
|
|
2079
|
+
};
|
|
2080
|
+
/**
|
|
2081
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2082
|
+
*/
|
|
2083
|
+
export type SignEndUserSolTransactionRuleOperation = (typeof SignEndUserSolTransactionRuleOperation)[keyof typeof SignEndUserSolTransactionRuleOperation];
|
|
2084
|
+
export declare const SignEndUserSolTransactionRuleOperation: {
|
|
2085
|
+
readonly signEndUserSolTransaction: "signEndUserSolTransaction";
|
|
2086
|
+
};
|
|
2087
|
+
export interface SignEndUserSolTransactionRule {
|
|
2088
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2089
|
+
action: SignEndUserSolTransactionRuleAction;
|
|
2090
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2091
|
+
operation: SignEndUserSolTransactionRuleOperation;
|
|
2092
|
+
criteria: SignEndUserSolTransactionCriteria;
|
|
2093
|
+
}
|
|
2094
|
+
export type SendEndUserSolTransactionCriteriaItem = SolAddressCriterion | SolValueCriterion | SplAddressCriterion | SplValueCriterion | MintAddressCriterion | SolDataCriterion | ProgramIdCriterion | SolNetworkCriterion;
|
|
2095
|
+
/**
|
|
2096
|
+
* A schema for specifying criteria for the sendEndUserSolTransaction operation.
|
|
2097
|
+
*/
|
|
2098
|
+
export type SendEndUserSolTransactionCriteria = SendEndUserSolTransactionCriteriaItem[];
|
|
2099
|
+
/**
|
|
2100
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2101
|
+
*/
|
|
2102
|
+
export type SendEndUserSolTransactionRuleAction = (typeof SendEndUserSolTransactionRuleAction)[keyof typeof SendEndUserSolTransactionRuleAction];
|
|
2103
|
+
export declare const SendEndUserSolTransactionRuleAction: {
|
|
2104
|
+
readonly reject: "reject";
|
|
2105
|
+
readonly accept: "accept";
|
|
2106
|
+
};
|
|
2107
|
+
/**
|
|
2108
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2109
|
+
*/
|
|
2110
|
+
export type SendEndUserSolTransactionRuleOperation = (typeof SendEndUserSolTransactionRuleOperation)[keyof typeof SendEndUserSolTransactionRuleOperation];
|
|
2111
|
+
export declare const SendEndUserSolTransactionRuleOperation: {
|
|
2112
|
+
readonly sendEndUserSolTransaction: "sendEndUserSolTransaction";
|
|
2113
|
+
};
|
|
2114
|
+
export interface SendEndUserSolTransactionRule {
|
|
2115
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2116
|
+
action: SendEndUserSolTransactionRuleAction;
|
|
2117
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2118
|
+
operation: SendEndUserSolTransactionRuleOperation;
|
|
2119
|
+
criteria: SendEndUserSolTransactionCriteria;
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* A schema for specifying criteria for the signEndUserSolMessage operation.
|
|
2123
|
+
*/
|
|
2124
|
+
export type SignEndUserSolMessageCriteria = SolMessageCriterion[];
|
|
2125
|
+
/**
|
|
2126
|
+
* Whether matching the rule will cause the request to be rejected or accepted.
|
|
2127
|
+
*/
|
|
2128
|
+
export type SignEndUserSolMessageRuleAction = (typeof SignEndUserSolMessageRuleAction)[keyof typeof SignEndUserSolMessageRuleAction];
|
|
2129
|
+
export declare const SignEndUserSolMessageRuleAction: {
|
|
2130
|
+
readonly reject: "reject";
|
|
2131
|
+
readonly accept: "accept";
|
|
2132
|
+
};
|
|
2133
|
+
/**
|
|
2134
|
+
* The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
|
|
2135
|
+
*/
|
|
2136
|
+
export type SignEndUserSolMessageRuleOperation = (typeof SignEndUserSolMessageRuleOperation)[keyof typeof SignEndUserSolMessageRuleOperation];
|
|
2137
|
+
export declare const SignEndUserSolMessageRuleOperation: {
|
|
2138
|
+
readonly signEndUserSolMessage: "signEndUserSolMessage";
|
|
2139
|
+
};
|
|
2140
|
+
export interface SignEndUserSolMessageRule {
|
|
2141
|
+
/** Whether matching the rule will cause the request to be rejected or accepted. */
|
|
2142
|
+
action: SignEndUserSolMessageRuleAction;
|
|
2143
|
+
/** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
|
|
2144
|
+
operation: SignEndUserSolMessageRuleOperation;
|
|
2145
|
+
criteria: SignEndUserSolMessageCriteria;
|
|
2146
|
+
}
|
|
1873
2147
|
/**
|
|
1874
2148
|
* A rule that limits the behavior of an account.
|
|
1875
2149
|
*/
|
|
1876
|
-
export type Rule = SignEvmTransactionRule | SendEvmTransactionRule | SignEvmMessageRule | SignEvmTypedDataRule | SignSolTransactionRule | SendSolTransactionRule | SignSolMessageRule | SignEvmHashRule | PrepareUserOperationRule | SendUserOperationRule;
|
|
2150
|
+
export type Rule = SignEvmTransactionRule | SendEvmTransactionRule | SignEvmMessageRule | SignEvmTypedDataRule | SignSolTransactionRule | SendSolTransactionRule | SignSolMessageRule | SignEvmHashRule | PrepareUserOperationRule | SendUserOperationRule | SignEndUserEvmTransactionRule | SendEndUserEvmTransactionRule | SignEndUserEvmMessageRule | SignEndUserEvmTypedDataRule | SignEndUserSolTransactionRule | SendEndUserSolTransactionRule | SignEndUserSolMessageRule;
|
|
1877
2151
|
/**
|
|
1878
2152
|
* The scope of the policy. Only one project-level policy can exist at any time.
|
|
1879
2153
|
*/
|
|
@@ -2269,18 +2543,91 @@ export type X402ExactEvmPayloadAuthorization = {
|
|
|
2269
2543
|
validAfter: string;
|
|
2270
2544
|
/** The unix timestamp before which the payment is valid. */
|
|
2271
2545
|
validBefore: string;
|
|
2272
|
-
/**
|
|
2546
|
+
/**
|
|
2547
|
+
* The hex-encoded nonce of the payment (bytes32).
|
|
2548
|
+
* @pattern ^0x[0-9a-fA-F]{64}$
|
|
2549
|
+
*/
|
|
2273
2550
|
nonce: string;
|
|
2274
2551
|
};
|
|
2275
2552
|
/**
|
|
2276
2553
|
* 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).
|
|
2277
2554
|
*/
|
|
2278
2555
|
export interface X402ExactEvmPayload {
|
|
2279
|
-
/**
|
|
2556
|
+
/**
|
|
2557
|
+
* The EIP-712 hex-encoded signature of the ERC-3009 authorization message. Smart account signatures may be longer than 65 bytes.
|
|
2558
|
+
* @pattern ^0x[0-9a-fA-F]{130,}$
|
|
2559
|
+
*/
|
|
2280
2560
|
signature: string;
|
|
2281
2561
|
/** The authorization data for the ERC-3009 authorization message. */
|
|
2282
2562
|
authorization: X402ExactEvmPayloadAuthorization;
|
|
2283
2563
|
}
|
|
2564
|
+
/**
|
|
2565
|
+
* The token permissions for the transfer.
|
|
2566
|
+
*/
|
|
2567
|
+
export type X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted = {
|
|
2568
|
+
/**
|
|
2569
|
+
* The 0x-prefixed, checksum EVM address of the token to transfer.
|
|
2570
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
2571
|
+
*/
|
|
2572
|
+
token: string;
|
|
2573
|
+
/** The amount to transfer in atomic units. */
|
|
2574
|
+
amount: string;
|
|
2575
|
+
};
|
|
2576
|
+
/**
|
|
2577
|
+
* The witness data containing payment details.
|
|
2578
|
+
*/
|
|
2579
|
+
export type X402ExactEvmPermit2PayloadPermit2AuthorizationWitness = {
|
|
2580
|
+
/**
|
|
2581
|
+
* The 0x-prefixed, checksum EVM address of the recipient.
|
|
2582
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
2583
|
+
*/
|
|
2584
|
+
to: string;
|
|
2585
|
+
/** The unix timestamp after which the payment is valid. */
|
|
2586
|
+
validAfter: string;
|
|
2587
|
+
/**
|
|
2588
|
+
* Optional hex-encoded extra data.
|
|
2589
|
+
* @pattern ^0x[0-9a-fA-F]*$
|
|
2590
|
+
*/
|
|
2591
|
+
extra?: string;
|
|
2592
|
+
};
|
|
2593
|
+
/**
|
|
2594
|
+
* The authorization data for the Permit2 PermitWitnessTransferFrom message.
|
|
2595
|
+
*/
|
|
2596
|
+
export type X402ExactEvmPermit2PayloadPermit2Authorization = {
|
|
2597
|
+
/**
|
|
2598
|
+
* The 0x-prefixed, checksum EVM address of the sender of the payment.
|
|
2599
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
2600
|
+
*/
|
|
2601
|
+
from: string;
|
|
2602
|
+
/** The token permissions for the transfer. */
|
|
2603
|
+
permitted: X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted;
|
|
2604
|
+
/**
|
|
2605
|
+
* The 0x-prefixed, checksum EVM address of the spender (x402 Permit2 proxy contract).
|
|
2606
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
2607
|
+
*/
|
|
2608
|
+
spender: string;
|
|
2609
|
+
/**
|
|
2610
|
+
* The Permit2 nonce as a decimal string (uint256).
|
|
2611
|
+
* @pattern ^[0-9]+$
|
|
2612
|
+
*/
|
|
2613
|
+
nonce: string;
|
|
2614
|
+
/** The unix timestamp before which the permit is valid. */
|
|
2615
|
+
deadline: string;
|
|
2616
|
+
/** The witness data containing payment details. */
|
|
2617
|
+
witness: X402ExactEvmPermit2PayloadPermit2AuthorizationWitness;
|
|
2618
|
+
};
|
|
2619
|
+
/**
|
|
2620
|
+
* The x402 protocol exact scheme payload for EVM networks using Permit2. Permit2 is a universal token approval mechanism that works with any ERC-20 token, unlike ERC-3009 which requires token-level support.
|
|
2621
|
+
*/
|
|
2622
|
+
export interface X402ExactEvmPermit2Payload {
|
|
2623
|
+
/**
|
|
2624
|
+
* The EIP-712 hex-encoded signature of the Permit2 PermitWitnessTransferFrom message. Smart account signatures may be longer than 65 bytes.
|
|
2625
|
+
* @pattern ^0x[0-9a-fA-F]{130,}$
|
|
2626
|
+
*/
|
|
2627
|
+
signature: string;
|
|
2628
|
+
/** The authorization data for the Permit2 PermitWitnessTransferFrom message. */
|
|
2629
|
+
permit2Authorization: X402ExactEvmPermit2PayloadPermit2Authorization;
|
|
2630
|
+
}
|
|
2284
2631
|
/**
|
|
2285
2632
|
* The x402 protocol exact scheme payload for Solana networks. For more details, please see [Solana Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md).
|
|
2286
2633
|
*/
|
|
@@ -2304,11 +2651,12 @@ export declare const X402V1PaymentPayloadNetwork: {
|
|
|
2304
2651
|
readonly base: "base";
|
|
2305
2652
|
readonly "solana-devnet": "solana-devnet";
|
|
2306
2653
|
readonly solana: "solana";
|
|
2654
|
+
readonly polygon: "polygon";
|
|
2307
2655
|
};
|
|
2308
2656
|
/**
|
|
2309
2657
|
* The payload of the payment depending on the x402Version, scheme, and network.
|
|
2310
2658
|
*/
|
|
2311
|
-
export type X402V1PaymentPayloadPayload = X402ExactEvmPayload | X402ExactSolanaPayload;
|
|
2659
|
+
export type X402V1PaymentPayloadPayload = X402ExactEvmPayload | X402ExactEvmPermit2Payload | X402ExactSolanaPayload;
|
|
2312
2660
|
/**
|
|
2313
2661
|
* The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
|
|
2314
2662
|
*/
|
|
@@ -2381,7 +2729,7 @@ export interface X402ResourceInfo {
|
|
|
2381
2729
|
/**
|
|
2382
2730
|
* The payload of the payment depending on the x402Version, scheme, and network.
|
|
2383
2731
|
*/
|
|
2384
|
-
export type X402V2PaymentPayloadPayload = X402ExactEvmPayload | X402ExactSolanaPayload;
|
|
2732
|
+
export type X402V2PaymentPayloadPayload = X402ExactEvmPayload | X402ExactEvmPermit2Payload | X402ExactSolanaPayload;
|
|
2385
2733
|
/**
|
|
2386
2734
|
* Optional protocol extensions.
|
|
2387
2735
|
*/
|
|
@@ -2402,6 +2750,7 @@ export interface X402V2PaymentPayload {
|
|
|
2402
2750
|
}
|
|
2403
2751
|
/**
|
|
2404
2752
|
* The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
|
|
2753
|
+
For EVM networks, smart account signatures can be longer than 65 bytes.
|
|
2405
2754
|
*/
|
|
2406
2755
|
export type X402PaymentPayload = X402V1PaymentPayload | X402V2PaymentPayload;
|
|
2407
2756
|
/**
|
|
@@ -2420,6 +2769,7 @@ export declare const X402V1PaymentRequirementsNetwork: {
|
|
|
2420
2769
|
readonly base: "base";
|
|
2421
2770
|
readonly "solana-devnet": "solana-devnet";
|
|
2422
2771
|
readonly solana: "solana";
|
|
2772
|
+
readonly polygon: "polygon";
|
|
2423
2773
|
};
|
|
2424
2774
|
/**
|
|
2425
2775
|
* The optional JSON schema describing the resource output.
|
|
@@ -2498,6 +2848,13 @@ export declare const X402VerifyInvalidReason: {
|
|
|
2498
2848
|
readonly invalid_exact_evm_payload_authorization_to_address_kyt: "invalid_exact_evm_payload_authorization_to_address_kyt";
|
|
2499
2849
|
readonly invalid_exact_evm_payload_signature: "invalid_exact_evm_payload_signature";
|
|
2500
2850
|
readonly invalid_exact_evm_payload_signature_address: "invalid_exact_evm_payload_signature_address";
|
|
2851
|
+
readonly invalid_exact_evm_permit2_payload_allowance_required: "invalid_exact_evm_permit2_payload_allowance_required";
|
|
2852
|
+
readonly invalid_exact_evm_permit2_payload_signature: "invalid_exact_evm_permit2_payload_signature";
|
|
2853
|
+
readonly invalid_exact_evm_permit2_payload_deadline: "invalid_exact_evm_permit2_payload_deadline";
|
|
2854
|
+
readonly invalid_exact_evm_permit2_payload_valid_after: "invalid_exact_evm_permit2_payload_valid_after";
|
|
2855
|
+
readonly invalid_exact_evm_permit2_payload_spender: "invalid_exact_evm_permit2_payload_spender";
|
|
2856
|
+
readonly invalid_exact_evm_permit2_payload_recipient: "invalid_exact_evm_permit2_payload_recipient";
|
|
2857
|
+
readonly invalid_exact_evm_permit2_payload_amount: "invalid_exact_evm_permit2_payload_amount";
|
|
2501
2858
|
readonly invalid_exact_svm_payload_transaction: "invalid_exact_svm_payload_transaction";
|
|
2502
2859
|
readonly invalid_exact_svm_payload_transaction_amount_mismatch: "invalid_exact_svm_payload_transaction_amount_mismatch";
|
|
2503
2860
|
readonly invalid_exact_svm_payload_transaction_create_ata_instruction: "invalid_exact_svm_payload_transaction_create_ata_instruction";
|
|
@@ -2559,6 +2916,13 @@ export declare const X402SettleErrorReason: {
|
|
|
2559
2916
|
readonly invalid_exact_evm_payload_authorization_to_address_kyt: "invalid_exact_evm_payload_authorization_to_address_kyt";
|
|
2560
2917
|
readonly invalid_exact_evm_payload_signature: "invalid_exact_evm_payload_signature";
|
|
2561
2918
|
readonly invalid_exact_evm_payload_signature_address: "invalid_exact_evm_payload_signature_address";
|
|
2919
|
+
readonly invalid_exact_evm_permit2_payload_allowance_required: "invalid_exact_evm_permit2_payload_allowance_required";
|
|
2920
|
+
readonly invalid_exact_evm_permit2_payload_signature: "invalid_exact_evm_permit2_payload_signature";
|
|
2921
|
+
readonly invalid_exact_evm_permit2_payload_deadline: "invalid_exact_evm_permit2_payload_deadline";
|
|
2922
|
+
readonly invalid_exact_evm_permit2_payload_valid_after: "invalid_exact_evm_permit2_payload_valid_after";
|
|
2923
|
+
readonly invalid_exact_evm_permit2_payload_spender: "invalid_exact_evm_permit2_payload_spender";
|
|
2924
|
+
readonly invalid_exact_evm_permit2_payload_recipient: "invalid_exact_evm_permit2_payload_recipient";
|
|
2925
|
+
readonly invalid_exact_evm_permit2_payload_amount: "invalid_exact_evm_permit2_payload_amount";
|
|
2562
2926
|
readonly invalid_exact_svm_payload_transaction: "invalid_exact_svm_payload_transaction";
|
|
2563
2927
|
readonly invalid_exact_svm_payload_transaction_amount_mismatch: "invalid_exact_svm_payload_transaction_amount_mismatch";
|
|
2564
2928
|
readonly invalid_exact_svm_payload_transaction_create_ata_instruction: "invalid_exact_svm_payload_transaction_create_ata_instruction";
|
|
@@ -2630,8 +2994,10 @@ export declare const X402SupportedPaymentKindNetwork: {
|
|
|
2630
2994
|
readonly base: "base";
|
|
2631
2995
|
readonly "solana-devnet": "solana-devnet";
|
|
2632
2996
|
readonly solana: "solana";
|
|
2997
|
+
readonly polygon: "polygon";
|
|
2633
2998
|
readonly "eip155:8453": "eip155:8453";
|
|
2634
2999
|
readonly "eip155:84532": "eip155:84532";
|
|
3000
|
+
readonly "eip155:137": "eip155:137";
|
|
2635
3001
|
readonly "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
2636
3002
|
readonly "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
|
2637
3003
|
};
|
|
@@ -2665,6 +3031,7 @@ export type BlockchainAddress = string;
|
|
|
2665
3031
|
export type OnrampOrderPaymentMethodTypeId = (typeof OnrampOrderPaymentMethodTypeId)[keyof typeof OnrampOrderPaymentMethodTypeId];
|
|
2666
3032
|
export declare const OnrampOrderPaymentMethodTypeId: {
|
|
2667
3033
|
readonly GUEST_CHECKOUT_APPLE_PAY: "GUEST_CHECKOUT_APPLE_PAY";
|
|
3034
|
+
readonly GUEST_CHECKOUT_GOOGLE_PAY: "GUEST_CHECKOUT_GOOGLE_PAY";
|
|
2668
3035
|
};
|
|
2669
3036
|
/**
|
|
2670
3037
|
* The type of fee.
|
|
@@ -2795,6 +3162,42 @@ export interface OnrampQuote {
|
|
|
2795
3162
|
/** The exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat. */
|
|
2796
3163
|
exchangeRate: string;
|
|
2797
3164
|
}
|
|
3165
|
+
/**
|
|
3166
|
+
* The type of user identifier:
|
|
3167
|
+
- `phone_number`: A phone number in E.164 format associated with an onramp user.
|
|
3168
|
+
|
|
3169
|
+
*/
|
|
3170
|
+
export type OnrampUserIdType = (typeof OnrampUserIdType)[keyof typeof OnrampUserIdType];
|
|
3171
|
+
export declare const OnrampUserIdType: {
|
|
3172
|
+
readonly phone_number: "phone_number";
|
|
3173
|
+
};
|
|
3174
|
+
/**
|
|
3175
|
+
* The type of limit:
|
|
3176
|
+
- `weekly_spending`: Rolling 7-day spending limit. The limit applies to the sum of all completed transactions
|
|
3177
|
+
within a sliding 168-hour (7-day) window. As time passes, older transactions naturally expire from the window.
|
|
3178
|
+
$500 is the default limit.
|
|
3179
|
+
- `lifetime_transactions`: All-time transaction count limit. Tracks the total number of completed transactions
|
|
3180
|
+
across the user's entire history with no time-based expiration. Once the limit is reached, no further
|
|
3181
|
+
transactions are allowed. 15 is the default limit.
|
|
3182
|
+
|
|
3183
|
+
*/
|
|
3184
|
+
export type OnrampLimitType = (typeof OnrampLimitType)[keyof typeof OnrampLimitType];
|
|
3185
|
+
export declare const OnrampLimitType: {
|
|
3186
|
+
readonly weekly_spending: "weekly_spending";
|
|
3187
|
+
readonly lifetime_transactions: "lifetime_transactions";
|
|
3188
|
+
};
|
|
3189
|
+
/**
|
|
3190
|
+
* A single limit with remaining capacity.
|
|
3191
|
+
*/
|
|
3192
|
+
export interface OnrampUserLimit {
|
|
3193
|
+
limitType: OnrampLimitType;
|
|
3194
|
+
/** The currency of the limit amounts. Only present for spending limits, not for count-based limits. */
|
|
3195
|
+
currency?: string;
|
|
3196
|
+
/** The maximum limit value. */
|
|
3197
|
+
limit: string;
|
|
3198
|
+
/** The remaining amount or count available. */
|
|
3199
|
+
remaining: string;
|
|
3200
|
+
}
|
|
2798
3201
|
/**
|
|
2799
3202
|
* Unauthorized.
|
|
2800
3203
|
*/
|
|
@@ -2827,6 +3230,10 @@ export type AlreadyExistsErrorResponse = Error;
|
|
|
2827
3230
|
* The underlying SQL string is invalid.
|
|
2828
3231
|
*/
|
|
2829
3232
|
export type InvalidSQLQueryErrorResponse = Error;
|
|
3233
|
+
/**
|
|
3234
|
+
* The client closed the connection before the server could send a response.
|
|
3235
|
+
*/
|
|
3236
|
+
export type ClientClosedRequestErrorResponse = Error;
|
|
2830
3237
|
/**
|
|
2831
3238
|
* The request timed out.
|
|
2832
3239
|
*/
|
|
@@ -2906,7 +3313,7 @@ section of our Authentication docs for more details on how to generate your Wall
|
|
|
2906
3313
|
*/
|
|
2907
3314
|
export type XWalletAuthParameter = string;
|
|
2908
3315
|
/**
|
|
2909
|
-
* An optional
|
|
3316
|
+
* An optional string request header for making requests safely retryable.
|
|
2910
3317
|
When included, duplicate requests with the same key will return identical responses.
|
|
2911
3318
|
Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
|
|
2912
3319
|
|
|
@@ -3115,6 +3522,15 @@ export type SignEvmTypedData200 = {
|
|
|
3115
3522
|
/** The signature of the typed data, as a 0x-prefixed hex string. */
|
|
3116
3523
|
signature: string;
|
|
3117
3524
|
};
|
|
3525
|
+
export type CreateEvmEip7702DelegationBody = {
|
|
3526
|
+
network: EvmEip7702DelegationNetwork;
|
|
3527
|
+
/** Whether to configure spend permissions for the upgraded, delegated account. When enabled, the account can grant permissions for third parties to spend on its behalf. */
|
|
3528
|
+
enableSpendPermissions?: boolean;
|
|
3529
|
+
};
|
|
3530
|
+
export type CreateEvmEip7702Delegation201 = {
|
|
3531
|
+
/** The unique identifier for the delegation operation. Use this to poll the operation status. */
|
|
3532
|
+
delegationOperationId: string;
|
|
3533
|
+
};
|
|
3118
3534
|
export type ListEvmSmartAccountsParams = {
|
|
3119
3535
|
/**
|
|
3120
3536
|
* The number of resources to return per page.
|
|
@@ -3630,4 +4046,14 @@ export type CreateOnrampSession201 = {
|
|
|
3630
4046
|
session: OnrampSession;
|
|
3631
4047
|
quote?: OnrampQuote;
|
|
3632
4048
|
};
|
|
4049
|
+
export type GetOnrampUserLimitsBody = {
|
|
4050
|
+
paymentMethodType: OnrampOrderPaymentMethodTypeId;
|
|
4051
|
+
/** The user identifier value. For `phone_number` type, this must be in E.164 format. */
|
|
4052
|
+
userId: string;
|
|
4053
|
+
userIdType: OnrampUserIdType;
|
|
4054
|
+
};
|
|
4055
|
+
export type GetOnrampUserLimits200 = {
|
|
4056
|
+
/** The list of limits applicable to the user. */
|
|
4057
|
+
limits: OnrampUserLimit[];
|
|
4058
|
+
};
|
|
3633
4059
|
//# sourceMappingURL=coinbaseDeveloperPlatformAPIs.schemas.d.ts.map
|