@coinbase/cdp-api-client 0.0.102 → 0.0.104
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 +77 -74
- package/dist/esm/index10.js +1 -1
- package/dist/esm/index12.js +38 -7
- package/dist/esm/index14.js +67 -366
- package/dist/esm/index15.js +34 -826
- package/dist/esm/index16.js +14 -38
- package/dist/esm/index17.js +8 -2
- package/dist/esm/index18.js +2 -70
- package/dist/esm/index19.js +364 -30
- package/dist/esm/index20.js +826 -14
- package/dist/esm/index21.js +2 -2
- package/dist/esm/index22.js +2 -2
- package/dist/esm/index23.js +2 -2
- package/dist/esm/index3.js +1 -1
- package/dist/esm/index4.js +1 -1
- package/dist/esm/index6.js +88 -60
- package/dist/esm/index7.js +69 -55
- package/dist/types/index.d.ts +77 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -214,6 +214,38 @@ export declare type CreateDelegationForEndUser201 = {
|
|
|
214
214
|
expiresAt: string;
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Creates an account-scoped delegation that allows a developer to sign on behalf of an end user for a single blockchain account (identified by its address) for the specified duration. The end user must be authenticated to authorize this delegation.
|
|
219
|
+
Multiple account-scoped delegations may exist concurrently for a single end user (one per canonical account address). Account-scoped and user-scoped delegations cannot coexist for the same user.
|
|
220
|
+
When the address corresponds to an EVM Smart Account, the delegation is scoped to the Smart Account's owner EOA rather than the Smart Account address itself. This means `/address/{smartAccountAddress}/delegation` and `/address/{ownerEoaAddress}/delegation` resolve to the same delegation, and the 409 `account_scoped_delegation_active` error may be returned when creating via either address if one already exists for the canonical owner.
|
|
221
|
+
* @summary Create account-scoped delegation for an end user account
|
|
222
|
+
*/
|
|
223
|
+
export declare const createDelegationForEndUserAccount: (userId: string, address: BlockchainAddress, createDelegationForEndUserAccountBody: CreateDelegationForEndUserAccountBody, params?: CreateDelegationForEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<CreateDelegationForEndUserAccount201>;
|
|
224
|
+
|
|
225
|
+
export declare type CreateDelegationForEndUserAccount201 = {
|
|
226
|
+
/** The date until which the delegation is valid. */
|
|
227
|
+
expiresAt: string;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export declare type CreateDelegationForEndUserAccountBody = {
|
|
231
|
+
/** The date until which the delegation is valid. */
|
|
232
|
+
expiresAt: string;
|
|
233
|
+
/**
|
|
234
|
+
* The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
235
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
236
|
+
*/
|
|
237
|
+
walletSecretId: string;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export declare type CreateDelegationForEndUserAccountParams = {
|
|
241
|
+
/**
|
|
242
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
243
|
+
*/
|
|
244
|
+
projectID?: ProjectIDOptionalParameter;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
export declare type CreateDelegationForEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof createDelegationForEndUserAccount>>>;
|
|
248
|
+
|
|
217
249
|
export declare type CreateDelegationForEndUserBody = {
|
|
218
250
|
/** The date until which the delegation is valid. */
|
|
219
251
|
expiresAt: string;
|
|
@@ -1228,6 +1260,27 @@ export declare type GetDelegationForEndUser200 = {
|
|
|
1228
1260
|
expiresAt: string;
|
|
1229
1261
|
};
|
|
1230
1262
|
|
|
1263
|
+
/**
|
|
1264
|
+
* Returns the active account-scoped delegation for the specified end user account, if one exists. Useful for showing delegation status in a UI.
|
|
1265
|
+
When the address corresponds to an EVM Smart Account, this returns the delegation for the Smart Account's owner EOA.
|
|
1266
|
+
* @summary Get account-scoped delegation for an end user account
|
|
1267
|
+
*/
|
|
1268
|
+
export declare const getDelegationForEndUserAccount: (userId: string, address: BlockchainAddress, params?: GetDelegationForEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<GetDelegationForEndUserAccount200>;
|
|
1269
|
+
|
|
1270
|
+
export declare type GetDelegationForEndUserAccount200 = {
|
|
1271
|
+
/** The date until which the delegation is valid. */
|
|
1272
|
+
expiresAt: string;
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
export declare type GetDelegationForEndUserAccountParams = {
|
|
1276
|
+
/**
|
|
1277
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
1278
|
+
*/
|
|
1279
|
+
projectID?: ProjectIDOptionalParameter;
|
|
1280
|
+
};
|
|
1281
|
+
|
|
1282
|
+
export declare type GetDelegationForEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof getDelegationForEndUserAccount>>>;
|
|
1283
|
+
|
|
1231
1284
|
export declare type GetDelegationForEndUserParams = {
|
|
1232
1285
|
/**
|
|
1233
1286
|
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
@@ -2305,6 +2358,30 @@ export declare type RegisterTemporaryWalletSecretResult = NonNullable<Awaited<Re
|
|
|
2305
2358
|
*/
|
|
2306
2359
|
export declare const revokeDelegationForEndUser: (userId: string, revokeDelegationForEndUserBody: RevokeDelegationForEndUserBody, params?: RevokeDelegationForEndUserParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<void>;
|
|
2307
2360
|
|
|
2361
|
+
/**
|
|
2362
|
+
* 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.
|
|
2363
|
+
When the address corresponds to an EVM Smart Account, this revokes the delegation for the Smart Account's owner EOA.
|
|
2364
|
+
* @summary Revoke account-scoped delegation for an end user account
|
|
2365
|
+
*/
|
|
2366
|
+
export declare const revokeDelegationForEndUserAccount: (userId: string, address: BlockchainAddress, revokeDelegationForEndUserAccountBody: RevokeDelegationForEndUserAccountBody, params?: RevokeDelegationForEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<void>;
|
|
2367
|
+
|
|
2368
|
+
export declare type RevokeDelegationForEndUserAccountBody = {
|
|
2369
|
+
/**
|
|
2370
|
+
* When revoking with a wallet authentication scheme, the ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|
|
2371
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
2372
|
+
*/
|
|
2373
|
+
walletSecretId?: string;
|
|
2374
|
+
};
|
|
2375
|
+
|
|
2376
|
+
export declare type RevokeDelegationForEndUserAccountParams = {
|
|
2377
|
+
/**
|
|
2378
|
+
* The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
|
|
2379
|
+
*/
|
|
2380
|
+
projectID?: ProjectIDOptionalParameter;
|
|
2381
|
+
};
|
|
2382
|
+
|
|
2383
|
+
export declare type RevokeDelegationForEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof revokeDelegationForEndUserAccount>>>;
|
|
2384
|
+
|
|
2308
2385
|
export declare type RevokeDelegationForEndUserBody = {
|
|
2309
2386
|
/**
|
|
2310
2387
|
* When revoking with a wallet authentication scheme, the ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
|