@coinbase/cdp-api-client 0.0.118 → 0.0.119

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.
@@ -1,4 +1,4 @@
1
- var r = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- r as __module
3
+ r as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var r = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ e as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var r = { exports: {} };
2
2
  export {
3
- e as __module
3
+ r as __module
4
4
  };
@@ -1,2 +1,2 @@
1
- import { __require as r } from "./index12.js";
1
+ import { __require as r } from "./index17.js";
2
2
  r();
@@ -1,4 +1,4 @@
1
- const o = "0.0.118";
1
+ const o = "0.0.119";
2
2
  export {
3
3
  o as VERSION
4
4
  };
@@ -142,11 +142,11 @@ const e = {
142
142
  avalanche: "avalanche",
143
143
  ethereum: "ethereum",
144
144
  "ethereum-sepolia": "ethereum-sepolia"
145
- }, b = {
145
+ }, f = {
146
146
  approved: "approved",
147
147
  pending: "pending",
148
148
  rejected: "rejected"
149
- }, f = {
149
+ }, b = {
150
150
  "base-sepolia": "base-sepolia",
151
151
  base: "base",
152
152
  arbitrum: "arbitrum",
@@ -154,13 +154,13 @@ const e = {
154
154
  polygon: "polygon",
155
155
  ethereum: "ethereum",
156
156
  "ethereum-sepolia": "ethereum-sepolia"
157
- }, g = {
157
+ }, v = {
158
158
  UNSPECIFIED: "UNSPECIFIED",
159
159
  PENDING: "PENDING",
160
160
  SUBMITTED: "SUBMITTED",
161
161
  COMPLETED: "COMPLETED",
162
162
  FAILED: "FAILED"
163
- }, v = {
163
+ }, g = {
164
164
  pending: "pending",
165
165
  signed: "signed",
166
166
  broadcast: "broadcast",
@@ -235,10 +235,10 @@ const e = {
235
235
  "arbitrum-sepolia": "arbitrum-sepolia",
236
236
  world: "world",
237
237
  "world-sepolia": "world-sepolia"
238
- }, U = {
238
+ }, D = {
239
239
  solana: "solana",
240
240
  "solana-devnet": "solana-devnet"
241
- }, D = {
241
+ }, U = {
242
242
  solana: "solana",
243
243
  "solana-devnet": "solana-devnet"
244
244
  }, q = {
@@ -247,11 +247,6 @@ const e = {
247
247
  bitcoin: "bitcoin",
248
248
  "bitcoin-testnet": "bitcoin-testnet"
249
249
  }, M = {
250
- segwit: "segwit"
251
- }, k = {
252
- bitcoin: "bitcoin",
253
- "bitcoin-testnet": "bitcoin-testnet"
254
- }, B = {
255
250
  NUMBER_0: 0,
256
251
  NUMBER_1: 1
257
252
  };
@@ -266,11 +261,11 @@ export {
266
261
  A as EndUserOnrampFeeType,
267
262
  S as EndUserOnrampOrderStatus,
268
263
  t as ErrorType,
269
- f as EvmEip7702DelegationNetwork,
270
- g as EvmEip7702DelegationOperationStatus,
264
+ b as EvmEip7702DelegationNetwork,
265
+ v as EvmEip7702DelegationOperationStatus,
271
266
  h as EvmSwapsNetwork,
272
267
  y as EvmUserOperationNetwork,
273
- v as EvmUserOperationStatus,
268
+ g as EvmUserOperationStatus,
274
269
  _ as InitiateEmailAuthenticationNextStepType,
275
270
  o as InitiateEmailAuthenticationRequestType,
276
271
  r as InitiateSiweAuthenticationRequestType,
@@ -282,15 +277,13 @@ export {
282
277
  w as MfaMethod,
283
278
  T as Network,
284
279
  e as OAuth2ProviderType,
285
- b as OtpEmailLogoModerationStatus,
280
+ f as OtpEmailLogoModerationStatus,
286
281
  O as RefreshAccessTokenBodyGrantType,
287
282
  P as SendEvmAssetWithEndUserAccountBodyNetwork,
288
283
  x as SendEvmTransactionWithEndUserAccountBodyNetwork,
289
- D as SendSolanaAssetWithEndUserAccountBodyNetwork,
290
- U as SendSolanaTransactionWithEndUserAccountBodyNetwork,
291
- M as SignBtcHashWithEndUserAccountBodyAddressType,
292
- B as SignBtcHashWithEndUserAccountBodyChange,
293
- k as SignBtcHashWithEndUserAccountBodyNetwork,
284
+ U as SendSolanaAssetWithEndUserAccountBodyNetwork,
285
+ D as SendSolanaTransactionWithEndUserAccountBodyNetwork,
286
+ M as SignBtcHashWithEndUserAccountBodyChange,
294
287
  p as SiweAuthenticationType,
295
288
  l as SmsAuthenticationType,
296
289
  E as SpendPermissionNetwork
@@ -323,7 +323,7 @@ export declare interface CreateEndUserApplePayOnrampOrderRequest {
323
323
  export declare type CreateEndUserApplePayOnrampOrderResult = NonNullable<Awaited<ReturnType<typeof createEndUserApplePayOnrampOrder>>>;
324
324
 
325
325
  /**
326
- * Creates a Bitcoin HD (Hierarchical Deterministic) account for an end user at the given address type and network. Returns the full end user resource including the extended public key (xpub) which can be used to derive child addresses for UTXO discovery. An end user can have one Bitcoin account per address type and network combination.
326
+ * Creates a Bitcoin HD (Hierarchical Deterministic) account for an end user at the given address type and network. Returns the end user with every Bitcoin account's extended public key (`xpub`) populated, used to derive child addresses. End users can have up to 10 Bitcoin accounts, each identified by its `xpubHash`; multiple accounts may share the same address type and network.
327
327
  * @summary Create end user Bitcoin HD (Hierarchical Deterministic) account
328
328
  */
329
329
  export declare const createEndUserBtcAccount: (userId: string, createEndUserBtcAccountBody: CreateEndUserBtcAccountBody, params?: CreateEndUserBtcAccountParams, options?: SecondParameter<typeof cdpApiClient<EndUser>>) => Promise<EndUser>;
@@ -850,7 +850,7 @@ export declare interface EndUser {
850
850
  solanaAccounts: string[];
851
851
  /** The list of Solana accounts associated with the end user. End users can have up to 10 Solana accounts. */
852
852
  solanaAccountObjects: EndUserSolanaAccount[];
853
- /** The list of Bitcoin HD (Hierarchical Deterministic) accounts associated with the end user. An end user can have one Bitcoin account per address type and network combination. */
853
+ /** The list of Bitcoin HD (Hierarchical Deterministic) accounts associated with the end user. End users can have up to 10 Bitcoin accounts. Each account's `xpub` may be omitted; whether it is returned depends on the operation that produced this end user (see the `xpub` field). */
854
854
  btcAccountObjects?: EndUserBtcAccount[];
855
855
  /** The date and time when the end user was created, in ISO 8601 format. */
856
856
  createdAt: string;
@@ -867,15 +867,20 @@ export declare interface EndUserApplePayOnrampOrderCreateResponse {
867
867
  }
868
868
 
869
869
  /**
870
- * Information about a Bitcoin HD (Hierarchical Deterministic) account associated with an end user. Unlike EVM and Solana accounts, there is no single address field — the extended public key (xpub) replaces it, enabling derivation of unlimited child addresses for UTXO discovery.
870
+ * Information about a Bitcoin HD (Hierarchical Deterministic) account associated with an end user. Unlike EVM and Solana accounts, there is no single address: the account is identified by `xpubHash`, and the extended public key (xpub), when present, derives child addresses for UTXO discovery.
871
871
  */
872
872
  export declare interface EndUserBtcAccount {
873
873
  /** The Bitcoin address type and derivation path standard used for this account. */
874
874
  addressType: EndUserBtcAccountAddressType;
875
875
  /** The Bitcoin network this account is associated with. */
876
876
  network: EndUserBtcAccountNetwork;
877
- /** The BIP-32 extended public key (xpub) at the account derivation path, base58check encoded. Use this to derive child addresses for UTXO scanning. */
878
- extendedPublicKey: string;
877
+ /** The BIP-32 extended public key (xpub) at the account derivation path, base58check encoded, used to derive child addresses. Present only when the response includes it explicitly (the `createEndUserBtcAccount` response, or `getAuthenticatedEndUser` with `includeBtcXpubs=true`); otherwise omitted. */
878
+ xpub?: string;
879
+ /**
880
+ * The lowercase hex-encoded SHA-256 of the UTF-8 bytes of the `xpub` string (the base58check-encoded form exactly as returned, not the decoded key bytes). Used as a stable identifier to select the proper account during signing. This is intentionally not the BIP-32 key fingerprint: hashing the full string form avoids the fingerprint's 4-byte collision risk and yields an identifier that can be recomputed consistently without decoding the key.
881
+ * @pattern ^[0-9a-f]{64}$
882
+ */
883
+ xpubHash: string;
879
884
  /** The date and time when the account was created, in ISO 8601 format. */
880
885
  createdAt: string;
881
886
  }
@@ -1443,6 +1448,10 @@ export declare type GetAuthenticatedEndUserParams = {
1443
1448
  * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
1444
1449
  */
1445
1450
  projectID?: ProjectIDOptionalParameter;
1451
+ /**
1452
+ * When `true`, each Bitcoin account in `btcAccountObjects` includes its raw `xpub`. When `false` (the default), only `xpubHash` is returned.
1453
+ */
1454
+ includeBtcXpubs?: boolean;
1446
1455
  };
1447
1456
 
1448
1457
  export declare type GetAuthenticatedEndUserResult = NonNullable<Awaited<ReturnType<typeof getAuthenticatedEndUser>>>;
@@ -3118,10 +3127,6 @@ export declare type SignBtcHashWithEndUserAccountBody = {
3118
3127
  * @pattern ^[a-zA-Z0-9-]{1,100}$
3119
3128
  */
3120
3129
  walletSecretId: string;
3121
- /** The Bitcoin address type of the account to sign with. */
3122
- addressType: SignBtcHashWithEndUserAccountBodyAddressType;
3123
- /** The Bitcoin network of the account to sign with. */
3124
- network: SignBtcHashWithEndUserAccountBodyNetwork;
3125
3130
  /** The BIP-32 change level index. 0 for external (receive) addresses, 1 for internal (change) addresses, as defined by BIP-44. */
3126
3131
  change: SignBtcHashWithEndUserAccountBodyChange;
3127
3132
  /**
@@ -3135,15 +3140,11 @@ export declare type SignBtcHashWithEndUserAccountBody = {
3135
3140
  * @pattern ^[0-9a-fA-F]{64}$
3136
3141
  */
3137
3142
  hash: string;
3138
- };
3139
-
3140
- /**
3141
- * The Bitcoin address type of the account to sign with.
3142
- */
3143
- export declare type SignBtcHashWithEndUserAccountBodyAddressType = (typeof SignBtcHashWithEndUserAccountBodyAddressType)[keyof typeof SignBtcHashWithEndUserAccountBodyAddressType];
3144
-
3145
- export declare const SignBtcHashWithEndUserAccountBodyAddressType: {
3146
- readonly segwit: "segwit";
3143
+ /**
3144
+ * The lowercase hex-encoded SHA-256 of the UTF-8 bytes of the `xpub` string (the base58check-encoded form exactly as returned, not the decoded key bytes). Selects which of the end user's Bitcoin accounts signs. Use the `xpubHash` returned with the account when it is created or retrieved.
3145
+ * @pattern ^[0-9a-f]{64}$
3146
+ */
3147
+ xpubHash: string;
3147
3148
  };
3148
3149
 
3149
3150
  /**
@@ -3156,16 +3157,6 @@ export declare const SignBtcHashWithEndUserAccountBodyChange: {
3156
3157
  readonly NUMBER_1: 1;
3157
3158
  };
3158
3159
 
3159
- /**
3160
- * The Bitcoin network of the account to sign with.
3161
- */
3162
- export declare type SignBtcHashWithEndUserAccountBodyNetwork = (typeof SignBtcHashWithEndUserAccountBodyNetwork)[keyof typeof SignBtcHashWithEndUserAccountBodyNetwork];
3163
-
3164
- export declare const SignBtcHashWithEndUserAccountBodyNetwork: {
3165
- readonly bitcoin: "bitcoin";
3166
- readonly "bitcoin-testnet": "bitcoin-testnet";
3167
- };
3168
-
3169
3160
  export declare type SignBtcHashWithEndUserAccountParams = {
3170
3161
  /**
3171
3162
  * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-api-client",
3
- "version": "0.0.118",
3
+ "version": "0.0.119",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",