@coinbase/cdp-api-client 0.0.126 → 0.0.127
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/dist/esm/index.js +137 -134
- package/dist/esm/index11.js +1 -1
- package/dist/esm/index13.js +38 -7
- package/dist/esm/index15.js +67 -358
- package/dist/esm/index16.js +34 -852
- package/dist/esm/index17.js +14 -38
- package/dist/esm/index18.js +8 -2
- package/dist/esm/index19.js +2 -70
- package/dist/esm/index20.js +355 -29
- package/dist/esm/index21.js +852 -14
- package/dist/esm/index22.js +2 -2
- package/dist/esm/index23.js +2 -2
- package/dist/esm/index24.js +2 -2
- package/dist/esm/index3.js +1 -1
- package/dist/esm/index4.js +1 -1
- package/dist/esm/index5.js +82 -67
- package/dist/esm/index8.js +104 -84
- package/dist/esm/index9.js +15 -15
- package/dist/types/index.d.ts +118 -30
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -687,7 +687,7 @@ export declare interface CreateEndUserApplePayOnrampOrderRequest {
|
|
|
687
687
|
export declare type CreateEndUserApplePayOnrampOrderResult = NonNullable<Awaited<ReturnType<typeof createEndUserApplePayOnrampOrder>>>;
|
|
688
688
|
|
|
689
689
|
/**
|
|
690
|
-
* Creates a Bitcoin HD (Hierarchical Deterministic) account for an end user at the given address type and network. Returns the end user with
|
|
690
|
+
* Creates a Bitcoin HD (Hierarchical Deterministic) account for an end user at the given address type and network. Returns the end user with Bitcoin extended public keys (`xpub`) populated, used to derive child addresses. For a restricted scoped token without effective `user#read`, only the newly created account is included. End users can have up to 10 Bitcoin accounts, each identified by its `xpubHash`; multiple accounts may share the same address type and network.
|
|
691
691
|
* @summary Create end user Bitcoin HD (Hierarchical Deterministic) account
|
|
692
692
|
*/
|
|
693
693
|
export declare const createEndUserBtcAccount: (userId: string, createEndUserBtcAccountBody: CreateEndUserBtcAccountBody, params?: CreateEndUserBtcAccountParams, options?: SecondParameter<typeof cdpApiClient<EndUser>>) => Promise<EndUser>;
|
|
@@ -999,19 +999,19 @@ export declare type CreateEvmEip7702DelegationWithEndUserAccountParams = {
|
|
|
999
999
|
export declare type CreateEvmEip7702DelegationWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof createEvmEip7702DelegationWithEndUserAccount>>>;
|
|
1000
1000
|
|
|
1001
1001
|
/**
|
|
1002
|
-
* Issues a one-time challenge for the iOS App Attest device-key **registration** step. The partner app passes the challenge to `DCAppAttestService.attestKey(keyId, clientDataHash: SHA256(challenge))` and submits the resulting attestation to [Register Onramp iOS Attestation](#operation/registerOnrampIosAttestation).
|
|
1002
|
+
* Issues a one-time challenge for the iOS App Attest device-key **registration** step. Authenticate with a CDP API key. Call this from the partner backend and pass the challenge to the mobile app; do not embed the API key in the client. The project is identified by the API key JWT. The partner app then passes the challenge to `DCAppAttestService.attestKey(keyId, clientDataHash: SHA256(challenge))` and submits the resulting attestation to [Register Onramp iOS Attestation](#operation/registerOnrampIosAttestation).
|
|
1003
1003
|
|
|
1004
1004
|
This is distinct from [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge), which issues the per-transaction session challenge. Registration is a one-time, per-device-install operation; iOS-only (Android validates Play Integrity inline per request and has no registration step).
|
|
1005
1005
|
* @summary Create an onramp iOS attestation challenge
|
|
1006
1006
|
*/
|
|
1007
|
-
export declare const createOnrampIosAttestationChallenge: (
|
|
1007
|
+
export declare const createOnrampIosAttestationChallenge: (options?: SecondParameter_2<typeof cdpApiClient<IosAttestationChallenge>>) => Promise<IosAttestationChallenge>;
|
|
1008
1008
|
|
|
1009
1009
|
export declare type CreateOnrampIosAttestationChallengeResult = NonNullable<Awaited<ReturnType<typeof createOnrampIosAttestationChallenge>>>;
|
|
1010
1010
|
|
|
1011
1011
|
/**
|
|
1012
|
-
* Issues a challenge for initiating an onramp flow from a partner mobile app.
|
|
1012
|
+
* Issues a challenge for initiating an onramp flow from a partner mobile app. Authenticate this request from the partner backend with a CDP API key; do not embed the API key in the mobile client. The project is identified by the API key JWT.
|
|
1013
1013
|
|
|
1014
|
-
|
|
1014
|
+
Pass the challenge to the mobile app. The app signs it using platform attestation (iOS App Attest or Android Play Integrity) and submits it to the [Create Onramp Mobile Session](#operation/createOnrampMobileSession) endpoint without CDP API key authentication to obtain a ready-to-use onramp URL. The `redirectUrl` is required so the Coinbase app knows where to return the user after completing or dismissing the transaction.
|
|
1015
1015
|
* @summary Create an onramp mobile challenge
|
|
1016
1016
|
*/
|
|
1017
1017
|
export declare const createOnrampMobileChallenge: (createOnrampMobileChallengeBody: CreateOnrampMobileChallengeBody, options?: SecondParameter_2<typeof cdpApiClient<OnrampMobileChallenge>>) => Promise<OnrampMobileChallenge>;
|
|
@@ -1019,7 +1019,7 @@ export declare const createOnrampMobileChallenge: (createOnrampMobileChallengeBo
|
|
|
1019
1019
|
export declare type CreateOnrampMobileChallengeBody = OnrampSessionRequest & CreateOnrampMobileChallengeBodyAllOf & Required<Pick<OnrampSessionRequest & CreateOnrampMobileChallengeBodyAllOf, "redirectUrl">>;
|
|
1020
1020
|
|
|
1021
1021
|
export declare type CreateOnrampMobileChallengeBodyAllOf = {
|
|
1022
|
-
|
|
1022
|
+
[key: string]: unknown;
|
|
1023
1023
|
};
|
|
1024
1024
|
|
|
1025
1025
|
export declare type CreateOnrampMobileChallengeResult = NonNullable<Awaited<ReturnType<typeof createOnrampMobileChallenge>>>;
|
|
@@ -1304,6 +1304,16 @@ export declare interface EndUser {
|
|
|
1304
1304
|
lastAuthenticatedAt?: string;
|
|
1305
1305
|
}
|
|
1306
1306
|
|
|
1307
|
+
/**
|
|
1308
|
+
* The key material to export from an end user EVM or Solana account. `private_key` exports the account private key. `mnemonic` exports the BIP-39 entropy for the account's 24-word recovery phrase and is available only for accounts created from a mnemonic. Omitted requests export the private key.
|
|
1309
|
+
*/
|
|
1310
|
+
export declare type EndUserAccountExportFormat = (typeof EndUserAccountExportFormat)[keyof typeof EndUserAccountExportFormat];
|
|
1311
|
+
|
|
1312
|
+
export declare const EndUserAccountExportFormat: {
|
|
1313
|
+
readonly private_key: "private_key";
|
|
1314
|
+
readonly mnemonic: "mnemonic";
|
|
1315
|
+
};
|
|
1316
|
+
|
|
1307
1317
|
/**
|
|
1308
1318
|
* The response body for creating an onramp order.
|
|
1309
1319
|
*/
|
|
@@ -1329,6 +1339,16 @@ export declare interface EndUserBtcAccount {
|
|
|
1329
1339
|
xpubHash: string;
|
|
1330
1340
|
/** The date and time when the account was created, in ISO 8601 format. */
|
|
1331
1341
|
createdAt: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* The date and time when the account's master seed was first exported, in ISO 8601 format. This is set on the first export and preserved on subsequent exports; it is not updated on re-export.
|
|
1344
|
+
* @nullable
|
|
1345
|
+
*/
|
|
1346
|
+
exportedAt?: string | null;
|
|
1347
|
+
/**
|
|
1348
|
+
* The date and time when the account's key was ejected (marked for deletion), in ISO 8601 format. Populated when the account has been ejected. The account record remains queryable after this timestamp is set; it reflects when ejection was requested, not when the key material is purged.
|
|
1349
|
+
* @nullable
|
|
1350
|
+
*/
|
|
1351
|
+
ejectedAt?: string | null;
|
|
1332
1352
|
}
|
|
1333
1353
|
|
|
1334
1354
|
/**
|
|
@@ -1583,18 +1603,23 @@ export declare const ErrorType: {
|
|
|
1583
1603
|
readonly faucet_limit_exceeded: "faucet_limit_exceeded";
|
|
1584
1604
|
readonly forbidden: "forbidden";
|
|
1585
1605
|
readonly idempotency_error: "idempotency_error";
|
|
1606
|
+
readonly incompatible_event_types: "incompatible_event_types";
|
|
1586
1607
|
readonly internal_server_error: "internal_server_error";
|
|
1587
1608
|
readonly invalid_request: "invalid_request";
|
|
1609
|
+
readonly invalid_webhook_headers: "invalid_webhook_headers";
|
|
1610
|
+
readonly invalid_webhook_url: "invalid_webhook_url";
|
|
1588
1611
|
readonly invalid_sql_query: "invalid_sql_query";
|
|
1589
1612
|
readonly invalid_signature: "invalid_signature";
|
|
1590
1613
|
readonly malformed_transaction: "malformed_transaction";
|
|
1591
1614
|
readonly not_found: "not_found";
|
|
1615
|
+
readonly operation_in_progress: "operation_in_progress";
|
|
1592
1616
|
readonly payment_method_required: "payment_method_required";
|
|
1593
1617
|
readonly payment_required: "payment_required";
|
|
1594
1618
|
readonly settlement_failed: "settlement_failed";
|
|
1595
1619
|
readonly rate_limit_exceeded: "rate_limit_exceeded";
|
|
1596
1620
|
readonly request_canceled: "request_canceled";
|
|
1597
1621
|
readonly service_unavailable: "service_unavailable";
|
|
1622
|
+
readonly subscription_limit_exceeded: "subscription_limit_exceeded";
|
|
1598
1623
|
readonly timed_out: "timed_out";
|
|
1599
1624
|
readonly unauthorized: "unauthorized";
|
|
1600
1625
|
readonly unsupported_tos_language: "unsupported_tos_language";
|
|
@@ -1666,6 +1691,12 @@ export declare const ErrorType: {
|
|
|
1666
1691
|
readonly daily_amount_limit_exceeded: "daily_amount_limit_exceeded";
|
|
1667
1692
|
readonly stale_attestation: "stale_attestation";
|
|
1668
1693
|
readonly moderation_rejected: "moderation_rejected";
|
|
1694
|
+
readonly mandate_action_pending: "mandate_action_pending";
|
|
1695
|
+
readonly mandate_policy_violation: "mandate_policy_violation";
|
|
1696
|
+
readonly mandate_expired: "mandate_expired";
|
|
1697
|
+
readonly mandate_canceled: "mandate_canceled";
|
|
1698
|
+
readonly mandate_revoked: "mandate_revoked";
|
|
1699
|
+
readonly mandate_invalid_status: "mandate_invalid_status";
|
|
1669
1700
|
};
|
|
1670
1701
|
|
|
1671
1702
|
export declare interface EvmCall {
|
|
@@ -1847,14 +1878,16 @@ export declare type ExportEndUserBtcAccountParams = {
|
|
|
1847
1878
|
export declare type ExportEndUserBtcAccountResult = NonNullable<Awaited<ReturnType<typeof exportEndUserBtcAccount>>>;
|
|
1848
1879
|
|
|
1849
1880
|
/**
|
|
1850
|
-
* Export an existing end user EVM account's private key. It is important to store the
|
|
1881
|
+
* Export an existing end user EVM account's private key or, for accounts created from a mnemonic, the entropy for its recovery phrase. It is important to store the exported key material in a secure place after it's exported.
|
|
1851
1882
|
* @summary Export end user EVM account
|
|
1852
1883
|
*/
|
|
1853
1884
|
export declare const exportEndUserEvmAccount: (userId: string, exportEndUserEvmAccountBody: ExportEndUserEvmAccountBody, params?: ExportEndUserEvmAccountParams, options?: SecondParameter<typeof cdpApiClient<ExportEndUserEvmAccount200>>) => Promise<ExportEndUserEvmAccount200>;
|
|
1854
1885
|
|
|
1855
1886
|
export declare type ExportEndUserEvmAccount200 = {
|
|
1856
|
-
/** The base64-encoded, encrypted private key of the EVM account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request. */
|
|
1857
|
-
encryptedPrivateKey
|
|
1887
|
+
/** The base64-encoded, encrypted private key of the EVM account which is a 32 byte raw private key. The private key is encrypted in transport using the `exportEncryptionKey` in the request. Returned when `exportFormat` is `private_key` or omitted. */
|
|
1888
|
+
encryptedPrivateKey?: string;
|
|
1889
|
+
/** The base64-encoded, encrypted 32-byte BIP-39 entropy for the account's 24-word recovery phrase. The entropy is encrypted in transport using the `exportEncryptionKey` in the request. Returned when `exportFormat` is `mnemonic`. */
|
|
1890
|
+
encryptedEntropy?: string;
|
|
1858
1891
|
};
|
|
1859
1892
|
|
|
1860
1893
|
export declare type ExportEndUserEvmAccountBody = {
|
|
@@ -1863,8 +1896,9 @@ export declare type ExportEndUserEvmAccountBody = {
|
|
|
1863
1896
|
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
1864
1897
|
*/
|
|
1865
1898
|
address: string;
|
|
1866
|
-
/** The base64-encoded, public part of the RSA key in DER format used to encrypt the
|
|
1899
|
+
/** The base64-encoded, public part of the RSA key in DER format used to encrypt the exported key material. */
|
|
1867
1900
|
exportEncryptionKey: string;
|
|
1901
|
+
exportFormat?: EndUserAccountExportFormat;
|
|
1868
1902
|
/**
|
|
1869
1903
|
* The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
1870
1904
|
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
@@ -1872,7 +1906,7 @@ export declare type ExportEndUserEvmAccountBody = {
|
|
|
1872
1906
|
walletSecretId: string;
|
|
1873
1907
|
/** The origin of the parent site that opened the secure iframe. This origin will be validated against the project's configured allowed origins. Must be a valid origin in the format <scheme>://<host>(:<port>) (e.g., https://example.com, http://localhost:3000). */
|
|
1874
1908
|
parentOrigin?: Url;
|
|
1875
|
-
/** If true, the account is ejected after the
|
|
1909
|
+
/** If true, the account is ejected after the key material is exported. Ejection immediately blocks all signing and sending operations on this account. The key material can still be re-exported during the server-controlled grace period. Setting eject to false or omitting it does not cancel ejection, and re-exporting does not extend or reset the grace period. After the grace period (TTL), the key material is permanently deleted from Coinbase systems. This action is irreversible. Ejection is an opt-in feature. To enable it, reach out to us on Discord. */
|
|
1876
1910
|
eject?: boolean;
|
|
1877
1911
|
};
|
|
1878
1912
|
|
|
@@ -1887,14 +1921,16 @@ export declare type ExportEndUserEvmAccountParams = {
|
|
|
1887
1921
|
export declare type ExportEndUserEvmAccountResult = NonNullable<Awaited<ReturnType<typeof exportEndUserEvmAccount>>>;
|
|
1888
1922
|
|
|
1889
1923
|
/**
|
|
1890
|
-
* Export an existing Solana account's private key. It is important to store the
|
|
1924
|
+
* Export an existing Solana account's private key or, for accounts created from a mnemonic, the entropy for its recovery phrase. It is important to store the exported key material in a secure place after it's exported.
|
|
1891
1925
|
* @summary Export end user Solana account
|
|
1892
1926
|
*/
|
|
1893
1927
|
export declare const exportEndUserSolanaAccount: (userId: string, exportEndUserSolanaAccountBody: ExportEndUserSolanaAccountBody, params?: ExportEndUserSolanaAccountParams, options?: SecondParameter<typeof cdpApiClient<ExportEndUserSolanaAccount200>>) => Promise<ExportEndUserSolanaAccount200>;
|
|
1894
1928
|
|
|
1895
1929
|
export declare type ExportEndUserSolanaAccount200 = {
|
|
1896
|
-
/** The base64-encoded, encrypted private key of the Solana account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request. */
|
|
1897
|
-
encryptedPrivateKey
|
|
1930
|
+
/** The base64-encoded, encrypted private key of the Solana account which is a 32 byte raw private key. The private key is encrypted in transport using the `exportEncryptionKey` in the request. Returned when `exportFormat` is `private_key` or omitted. */
|
|
1931
|
+
encryptedPrivateKey?: string;
|
|
1932
|
+
/** The base64-encoded, encrypted 32-byte BIP-39 entropy for the account's 24-word recovery phrase. The entropy is encrypted in transport using the `exportEncryptionKey` in the request. Returned when `exportFormat` is `mnemonic`. */
|
|
1933
|
+
encryptedEntropy?: string;
|
|
1898
1934
|
};
|
|
1899
1935
|
|
|
1900
1936
|
export declare type ExportEndUserSolanaAccountBody = {
|
|
@@ -1903,8 +1939,9 @@ export declare type ExportEndUserSolanaAccountBody = {
|
|
|
1903
1939
|
* @pattern ^[1-9A-HJ-NP-Za-km-z]{32,44}$
|
|
1904
1940
|
*/
|
|
1905
1941
|
address: string;
|
|
1906
|
-
/** The base64-encoded, public part of the RSA key in DER format used to encrypt the
|
|
1942
|
+
/** The base64-encoded, public part of the RSA key in DER format used to encrypt the exported key material. */
|
|
1907
1943
|
exportEncryptionKey: string;
|
|
1944
|
+
exportFormat?: EndUserAccountExportFormat;
|
|
1908
1945
|
/**
|
|
1909
1946
|
* The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
1910
1947
|
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
@@ -1912,7 +1949,7 @@ export declare type ExportEndUserSolanaAccountBody = {
|
|
|
1912
1949
|
walletSecretId: string;
|
|
1913
1950
|
/** The origin of the parent site that opened the secure iframe. This origin will be validated against the project's configured allowed origins. Must be a valid origin in the format <scheme>://<host>(:<port>) (e.g., https://example.com, http://localhost:3000). */
|
|
1914
1951
|
parentOrigin?: Url;
|
|
1915
|
-
/** If true, the account is ejected after the
|
|
1952
|
+
/** If true, the account is ejected after the key material is exported. Ejection immediately blocks all signing and sending operations on this account. The key material can still be re-exported during the server-controlled grace period. Setting eject to false or omitting it does not cancel ejection, and re-exporting does not extend or reset the grace period. After the grace period (TTL), the key material is permanently deleted from Coinbase systems. This action is irreversible. Ejection is an opt-in feature. To enable it, reach out to us on Discord. */
|
|
1916
1953
|
eject?: boolean;
|
|
1917
1954
|
};
|
|
1918
1955
|
|
|
@@ -1926,6 +1963,11 @@ export declare type ExportEndUserSolanaAccountParams = {
|
|
|
1926
1963
|
|
|
1927
1964
|
export declare type ExportEndUserSolanaAccountResult = NonNullable<Awaited<ReturnType<typeof exportEndUserSolanaAccount>>>;
|
|
1928
1965
|
|
|
1966
|
+
/**
|
|
1967
|
+
* User forbidden from performing the action.
|
|
1968
|
+
*/
|
|
1969
|
+
export declare type ForbiddenErrorResponse = Error_2;
|
|
1970
|
+
|
|
1929
1971
|
/**
|
|
1930
1972
|
* Generates a cryptographically secure random challenge for iOS App Attest attestation. The challenge is a one-time use 32-byte value that must be included in the subsequent attestation registration request. Challenges expire after 5 minutes.
|
|
1931
1973
|
|
|
@@ -2736,7 +2778,7 @@ export declare interface IosAttestationRegistrationResponse {
|
|
|
2736
2778
|
keyId: string;
|
|
2737
2779
|
/** The mobile platform that was attested (iOS only). */
|
|
2738
2780
|
platform: IosAttestationRegistrationResponsePlatform;
|
|
2739
|
-
/** The application
|
|
2781
|
+
/** The verified Apple application identifier in `teamID.bundleID` format. This is not a CDP project ID. */
|
|
2740
2782
|
appId: string;
|
|
2741
2783
|
/** Timestamp when the attestation was performed. */
|
|
2742
2784
|
attestedAt: string;
|
|
@@ -2918,7 +2960,7 @@ export declare type ListSpendPermissionsWithEndUserAccountParams = {
|
|
|
2918
2960
|
export declare type ListSpendPermissionsWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof listSpendPermissionsWithEndUserAccount>>>;
|
|
2919
2961
|
|
|
2920
2962
|
/**
|
|
2921
|
-
* Logs out the end user using the attached refresh token.
|
|
2963
|
+
* Logs out the end user using the attached refresh token. When the refresh token belongs to the root grant, logout revokes its session and all scoped grants created from it. Once revocation takes effect, neither the root nor its scoped grants can use their access tokens or refresh tokens. Logging out with a scoped refresh token revokes only that scoped grant; the root and other scoped grants remain valid.
|
|
2922
2964
|
* @summary Log out end user
|
|
2923
2965
|
*/
|
|
2924
2966
|
export declare const logOutEndUser: (projectId: ProjectId, logOutEndUserBody?: LogOutEndUserBody, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
|
|
@@ -3672,10 +3714,10 @@ export declare type RegisterAttestationResult = NonNullable<Awaited<ReturnType<t
|
|
|
3672
3714
|
|
|
3673
3715
|
The Apple App Attest `keyId` is supplied only in the request body (`ios.keyId`). Do not put `keyId` in the URL — App Attest key IDs are standard base64 and frequently contain `/`, which breaks path routing at the edge.
|
|
3674
3716
|
|
|
3675
|
-
Idempotency is provided by `ios.keyId` itself: the server upserts the device public key on `(app, keyId)`, so repeating registration for the same key replaces the stored public key rather than creating a duplicate. This endpoint does not accept `X-Idempotency-Key` — `ios.keyId` is the natural idempotency key for the registration resource. The challenge remains single-use and is claimed on first receipt.
|
|
3717
|
+
Idempotency is provided by `ios.keyId` itself: the server upserts the device public key on `(app, keyId)`, so repeating registration for the same key replaces the stored public key rather than creating a duplicate. This endpoint does not accept `X-Idempotency-Key` — `ios.keyId` is the natural idempotency key for the registration resource. The challenge remains single-use and is claimed on first receipt. The challenge identifies the project; the device does not supply a CDP project ID.
|
|
3676
3718
|
* @summary Register a device key for iOS App Attest
|
|
3677
3719
|
*/
|
|
3678
|
-
export declare const registerOnrampIosAttestation: (
|
|
3720
|
+
export declare const registerOnrampIosAttestation: (iosAttestationRegistrationRequest: IosAttestationRegistrationRequest, options?: SecondParameter_2<typeof cdpApiClient<IosAttestationRegistrationResponse>>) => Promise<IosAttestationRegistrationResponse>;
|
|
3679
3721
|
|
|
3680
3722
|
export declare type RegisterOnrampIosAttestationResult = NonNullable<Awaited<ReturnType<typeof registerOnrampIosAttestation>>>;
|
|
3681
3723
|
|
|
@@ -3766,23 +3808,42 @@ export declare type RegisterTemporaryWalletSecretResult = NonNullable<Awaited<Re
|
|
|
3766
3808
|
* Revokes all active delegations for the specified end user. This operation can be performed by the end user themselves or by a developer using their API key.
|
|
3767
3809
|
* @summary Revoke delegation for end user
|
|
3768
3810
|
*/
|
|
3769
|
-
export declare const revokeDelegationForEndUser: (userId: string,
|
|
3811
|
+
export declare const revokeDelegationForEndUser: (userId: string, revokeDelegationRequest: RevokeDelegationRequest, params?: RevokeDelegationForEndUserParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
|
|
3770
3812
|
|
|
3771
3813
|
/**
|
|
3772
3814
|
* Revokes the active account-scoped delegation for the specified end user account. Other account-scoped delegations for the same user are unaffected. This operation can be performed by the end user themselves or by a developer using their API key.
|
|
3773
3815
|
When the address corresponds to an EVM Smart Account, this revokes the delegation for the Smart Account's owner EOA.
|
|
3774
3816
|
* @summary Revoke account-scoped delegation for end user
|
|
3775
3817
|
*/
|
|
3776
|
-
export declare const revokeDelegationForEndUserAccount: (userId: string, address: BlockchainAddress,
|
|
3818
|
+
export declare const revokeDelegationForEndUserAccount: (userId: string, address: BlockchainAddress, revokeDelegationRequest: RevokeDelegationRequest, params?: RevokeDelegationForEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
|
|
3777
3819
|
|
|
3778
|
-
|
|
3820
|
+
/**
|
|
3821
|
+
* > **Deprecation Notice:** Prefer
|
|
3822
|
+
> [Revoke account-scoped delegation for end user](#operation/revokeDelegationForEndUserAccount)
|
|
3823
|
+
> (`POST /v2/embedded-wallet-api/end-users/{userId}/address/{address}/delegation/revoke`),
|
|
3824
|
+
> which takes the same request body. This `DELETE` path will be removed on **2026-10-22**.
|
|
3825
|
+
|
|
3826
|
+
Revokes the active account-scoped delegation for the specified end user account.
|
|
3827
|
+
Other account-scoped delegations for the same user are unaffected. This operation
|
|
3828
|
+
can be performed by the end user themselves or by a developer using their API key.
|
|
3829
|
+
|
|
3830
|
+
When the address corresponds to an EVM Smart Account, this revokes the delegation for the
|
|
3831
|
+
Smart Account's owner EOA.
|
|
3832
|
+
* @deprecated
|
|
3833
|
+
* @summary Revoke account-scoped delegation for end user (deprecated)
|
|
3834
|
+
*/
|
|
3835
|
+
export declare const revokeDelegationForEndUserAccountDeprecated: (userId: string, address: BlockchainAddress, revokeDelegationRequest: RevokeDelegationRequest, params?: RevokeDelegationForEndUserAccountDeprecatedParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
|
|
3836
|
+
|
|
3837
|
+
export declare type RevokeDelegationForEndUserAccountDeprecatedParams = {
|
|
3779
3838
|
/**
|
|
3780
|
-
*
|
|
3781
|
-
* @pattern ^[
|
|
3839
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
3840
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
3782
3841
|
*/
|
|
3783
|
-
|
|
3842
|
+
projectID?: ProjectIDOptionalParameter;
|
|
3784
3843
|
};
|
|
3785
3844
|
|
|
3845
|
+
export declare type RevokeDelegationForEndUserAccountDeprecatedResult = NonNullable<Awaited<ReturnType<typeof revokeDelegationForEndUserAccountDeprecated>>>;
|
|
3846
|
+
|
|
3786
3847
|
export declare type RevokeDelegationForEndUserAccountParams = {
|
|
3787
3848
|
/**
|
|
3788
3849
|
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
@@ -3793,14 +3854,30 @@ export declare type RevokeDelegationForEndUserAccountParams = {
|
|
|
3793
3854
|
|
|
3794
3855
|
export declare type RevokeDelegationForEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof revokeDelegationForEndUserAccount>>>;
|
|
3795
3856
|
|
|
3796
|
-
|
|
3857
|
+
/**
|
|
3858
|
+
* > **Deprecation Notice:** Prefer
|
|
3859
|
+
> [Revoke delegation for end user](#operation/revokeDelegationForEndUser)
|
|
3860
|
+
> (`POST /v2/embedded-wallet-api/end-users/{userId}/delegation/revoke`), which takes the
|
|
3861
|
+
> same request body. This `DELETE` path will be removed on **2026-10-22**.
|
|
3862
|
+
|
|
3863
|
+
Revokes all active delegations for the specified end user. This operation
|
|
3864
|
+
can be performed by the end user themselves or by a developer using their
|
|
3865
|
+
API key.
|
|
3866
|
+
* @deprecated
|
|
3867
|
+
* @summary Revoke delegation for end user (deprecated)
|
|
3868
|
+
*/
|
|
3869
|
+
export declare const revokeDelegationForEndUserDeprecated: (userId: string, revokeDelegationRequest: RevokeDelegationRequest, params?: RevokeDelegationForEndUserDeprecatedParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
|
|
3870
|
+
|
|
3871
|
+
export declare type RevokeDelegationForEndUserDeprecatedParams = {
|
|
3797
3872
|
/**
|
|
3798
|
-
*
|
|
3799
|
-
* @pattern ^[
|
|
3873
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
3874
|
+
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
|
|
3800
3875
|
*/
|
|
3801
|
-
|
|
3876
|
+
projectID?: ProjectIDOptionalParameter;
|
|
3802
3877
|
};
|
|
3803
3878
|
|
|
3879
|
+
export declare type RevokeDelegationForEndUserDeprecatedResult = NonNullable<Awaited<ReturnType<typeof revokeDelegationForEndUserDeprecated>>>;
|
|
3880
|
+
|
|
3804
3881
|
export declare type RevokeDelegationForEndUserParams = {
|
|
3805
3882
|
/**
|
|
3806
3883
|
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
@@ -3811,6 +3888,17 @@ export declare type RevokeDelegationForEndUserParams = {
|
|
|
3811
3888
|
|
|
3812
3889
|
export declare type RevokeDelegationForEndUserResult = NonNullable<Awaited<ReturnType<typeof revokeDelegationForEndUser>>>;
|
|
3813
3890
|
|
|
3891
|
+
/**
|
|
3892
|
+
* The request body for revoking a user-scoped or account-scoped delegation.
|
|
3893
|
+
*/
|
|
3894
|
+
export declare interface RevokeDelegationRequest {
|
|
3895
|
+
/**
|
|
3896
|
+
* When revoking with a wallet authentication scheme, the ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
3897
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
3898
|
+
*/
|
|
3899
|
+
walletSecretId?: string;
|
|
3900
|
+
}
|
|
3901
|
+
|
|
3814
3902
|
/**
|
|
3815
3903
|
* Request parameters for revoking a Spend Permission.
|
|
3816
3904
|
*/
|