@coinbase/cdp-api-client 0.0.36 → 0.0.37

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.
@@ -52,9 +52,30 @@ export declare const AbiStateMutability: {
52
52
  readonly payable: "payable";
53
53
  };
54
54
 
55
+ export declare interface Account {
56
+ id: string;
57
+ name: string;
58
+ currency: string;
59
+ type: AccountType;
60
+ availableBalance: AccountAvailableBalance;
61
+ hold: AccountHold;
62
+ createdAt: string;
63
+ updatedAt: string;
64
+ }
65
+
66
+ export declare type AccountAvailableBalance = {
67
+ value: string;
68
+ currency: string;
69
+ };
70
+
71
+ export declare type AccountHold = {
72
+ value: string;
73
+ currency: string;
74
+ };
75
+
55
76
  export declare interface AccountSource {
56
77
  type: AccountSourceType;
57
- accountID: string;
78
+ accountId: string;
58
79
  }
59
80
 
60
81
  export declare type AccountSourceType = (typeof AccountSourceType)[keyof typeof AccountSourceType];
@@ -63,12 +84,37 @@ export declare const AccountSourceType: {
63
84
  readonly account: "account";
64
85
  };
65
86
 
87
+ export declare interface AccountTarget {
88
+ accountId: string;
89
+ }
90
+
66
91
  export declare interface AccountTokenAddressesResponse {
67
92
  accountAddress?: string;
68
93
  tokenAddresses?: string[];
69
94
  totalCount?: number;
70
95
  }
71
96
 
97
+ export declare type AccountType = (typeof AccountType)[keyof typeof AccountType];
98
+
99
+ export declare const AccountType: {
100
+ readonly crypto: "crypto";
101
+ readonly fiat: "fiat";
102
+ };
103
+
104
+ export declare interface AchDetails {
105
+ routingNumber: string;
106
+ accountNumber: string;
107
+ accountType?: AchDetailsAccountType;
108
+ name?: string;
109
+ }
110
+
111
+ export declare type AchDetailsAccountType = (typeof AchDetailsAccountType)[keyof typeof AchDetailsAccountType];
112
+
113
+ export declare const AchDetailsAccountType: {
114
+ readonly checking: "checking";
115
+ readonly savings: "savings";
116
+ };
117
+
72
118
  export declare interface AddressRisk {
73
119
  riskLevel?: AddressRiskRiskLevel;
74
120
  lastUpdated?: string;
@@ -190,7 +236,12 @@ export declare interface CoolPaymentMethod {
190
236
  limits?: Limit[];
191
237
  }
192
238
 
193
- export declare type CoolPaymentMethodType = string;
239
+ export declare type CoolPaymentMethodType = (typeof CoolPaymentMethodType)[keyof typeof CoolPaymentMethodType];
240
+
241
+ export declare const CoolPaymentMethodType: {
242
+ readonly ach: "ach";
243
+ readonly fedwire: "fedwire";
244
+ };
194
245
 
195
246
  export declare const createEndUserEvmAccount: (projectId: string, userId: string, createEndUserEvmAccountBody: CreateEndUserEvmAccountBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<EndUser>;
196
247
 
@@ -217,6 +268,32 @@ export declare type CreateEndUserSolanaAccountBody = {
217
268
 
218
269
  export declare type CreateEndUserSolanaAccountResult = NonNullable<Awaited<ReturnType<typeof createEndUserSolanaAccount>>>;
219
270
 
271
+ export declare type CreatePaymentMethodRequest = CreatePaymentMethodRequestAch | CreatePaymentMethodRequestFedwire;
272
+
273
+ export declare interface CreatePaymentMethodRequestAch {
274
+ type: CreatePaymentMethodRequestAchType;
275
+ currency: string;
276
+ ach: AchDetails;
277
+ }
278
+
279
+ export declare type CreatePaymentMethodRequestAchType = (typeof CreatePaymentMethodRequestAchType)[keyof typeof CreatePaymentMethodRequestAchType];
280
+
281
+ export declare const CreatePaymentMethodRequestAchType: {
282
+ readonly ach: "ach";
283
+ };
284
+
285
+ export declare interface CreatePaymentMethodRequestFedwire {
286
+ type: CreatePaymentMethodRequestFedwireType;
287
+ currency: string;
288
+ fedwire: FedwireDetails;
289
+ }
290
+
291
+ export declare type CreatePaymentMethodRequestFedwireType = (typeof CreatePaymentMethodRequestFedwireType)[keyof typeof CreatePaymentMethodRequestFedwireType];
292
+
293
+ export declare const CreatePaymentMethodRequestFedwireType: {
294
+ readonly fedwire: "fedwire";
295
+ };
296
+
220
297
  export declare interface CreateSpendPermissionRequest {
221
298
  walletSecretId: string;
222
299
  network: SpendPermissionNetwork;
@@ -261,19 +338,18 @@ export declare type CreateSwapQuoteResponseWrapper = CreateSwapQuoteResponse | S
261
338
  export declare type CreateTransfer = TransferQuoteDetails | CreateTransferQuote;
262
339
 
263
340
  export declare interface CreateTransferQuote {
264
- paymentDirection: PaymentDirection;
265
- requestedAmount: Amount;
266
- requestedAmountType: CreateTransferQuoteRequestedAmountType;
341
+ amount: Amount;
342
+ amountType?: CreateTransferQuoteAmountType;
267
343
  source: Source;
268
344
  target: Target;
269
345
  note?: string;
270
346
  }
271
347
 
272
- export declare type CreateTransferQuoteRequestedAmountType = (typeof CreateTransferQuoteRequestedAmountType)[keyof typeof CreateTransferQuoteRequestedAmountType];
348
+ export declare type CreateTransferQuoteAmountType = (typeof CreateTransferQuoteAmountType)[keyof typeof CreateTransferQuoteAmountType];
273
349
 
274
- export declare const CreateTransferQuoteRequestedAmountType: {
275
- readonly target_amount: "target_amount";
276
- readonly source_amount: "source_amount";
350
+ export declare const CreateTransferQuoteAmountType: {
351
+ readonly target: "target";
352
+ readonly source: "source";
277
353
  };
278
354
 
279
355
  export declare interface CryptoRail {
@@ -330,6 +406,11 @@ export declare interface EIP712Types {
330
406
  [key: string]: unknown;
331
407
  }
332
408
 
409
+ export declare interface EmailAddress {
410
+ email: string;
411
+ currency: string;
412
+ }
413
+
333
414
  export declare interface EmailAuthentication {
334
415
  type: EmailAuthenticationType;
335
416
  email: string;
@@ -347,6 +428,7 @@ export declare interface EndUser {
347
428
  evmAccounts: string[];
348
429
  evmSmartAccounts: string[];
349
430
  solanaAccounts: string[];
431
+ createdAt: string;
350
432
  }
351
433
 
352
434
  declare interface Error_2 {
@@ -662,6 +744,27 @@ export declare type ExportEndUserEvmAccountBody = {
662
744
 
663
745
  export declare type ExportEndUserEvmAccountResult = NonNullable<Awaited<ReturnType<typeof exportEndUserEvmAccount>>>;
664
746
 
747
+ export declare const exportEndUserSolanaAccount: (projectId: string, userId: string, exportEndUserSolanaAccountBody: ExportEndUserSolanaAccountBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<ExportEndUserSolanaAccount200>;
748
+
749
+ export declare type ExportEndUserSolanaAccount200 = {
750
+ encryptedPrivateKey: string;
751
+ };
752
+
753
+ export declare type ExportEndUserSolanaAccountBody = {
754
+ address: string;
755
+ exportEncryptionKey: string;
756
+ walletSecretId: string;
757
+ };
758
+
759
+ export declare type ExportEndUserSolanaAccountResult = NonNullable<Awaited<ReturnType<typeof exportEndUserSolanaAccount>>>;
760
+
761
+ export declare interface FedwireDetails {
762
+ accountNumber: string;
763
+ intermediaryBankId?: string;
764
+ beneficiaryBankId: string;
765
+ beneficiaryBankName?: string;
766
+ }
767
+
665
768
  export declare interface Fee {
666
769
  type: FeeType;
667
770
  amount: string;
@@ -680,6 +783,7 @@ export declare const FeeDetailsType: {
680
783
  readonly conversion: "conversion";
681
784
  readonly settlement: "settlement";
682
785
  readonly deposit: "deposit";
786
+ readonly wire_fee: "wire_fee";
683
787
  };
684
788
 
685
789
  export declare type FeeType = (typeof FeeType)[keyof typeof FeeType];
@@ -695,13 +799,13 @@ export declare type FromToken = string;
695
799
 
696
800
  export declare interface FundTransfer {
697
801
  id: string;
698
- direction: PaymentDirection;
699
802
  status: PaymentStatus;
700
- sourceDetails: Source;
701
- targetDetails: Target;
803
+ source: Source;
804
+ target: Target;
702
805
  sourceAmount: SourceAmount;
703
806
  targetAmount: TargetAmount;
704
807
  fees: FeeDetails[];
808
+ sourceDepositInstructions?: SourceDepositInstructions;
705
809
  createdAt: string;
706
810
  updatedAt: string;
707
811
  note?: string;
@@ -870,7 +974,6 @@ export declare interface Limit {
870
974
  total?: Amount;
871
975
  limitPeriod?: LimitPeriod;
872
976
  description?: string;
873
- usageResetInSeconds?: number;
874
977
  }
875
978
 
876
979
  export declare type LimitPeriod = (typeof LimitPeriod)[keyof typeof LimitPeriod];
@@ -883,6 +986,29 @@ export declare const LimitPeriod: {
883
986
  readonly biweekly: "biweekly";
884
987
  };
885
988
 
989
+ export declare const listEndUsers: (params?: ListEndUsersParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<ListEndUsers200>;
990
+
991
+ export declare type ListEndUsers200 = ListEndUsers200AllOf & ListResponse;
992
+
993
+ export declare type ListEndUsers200AllOf = {
994
+ endUsers: EndUser[];
995
+ };
996
+
997
+ export declare type ListEndUsersParams = {
998
+ pageSize?: number;
999
+ pageToken?: string;
1000
+ sort?: ListEndUsersSortItem[];
1001
+ };
1002
+
1003
+ export declare type ListEndUsersResult = NonNullable<Awaited<ReturnType<typeof listEndUsers>>>;
1004
+
1005
+ export declare type ListEndUsersSortItem = (typeof ListEndUsersSortItem)[keyof typeof ListEndUsersSortItem];
1006
+
1007
+ export declare const ListEndUsersSortItem: {
1008
+ readonly "createdAt=asc": "createdAt=asc";
1009
+ readonly "createdAt=desc": "createdAt=desc";
1010
+ };
1011
+
886
1012
  export declare type ListEvmTokenBalancesNetwork = (typeof ListEvmTokenBalancesNetwork)[keyof typeof ListEvmTokenBalancesNetwork];
887
1013
 
888
1014
  export declare const ListEvmTokenBalancesNetwork: {
@@ -980,11 +1106,6 @@ export declare const Network: {
980
1106
  readonly unichain: "unichain";
981
1107
  };
982
1108
 
983
- export declare interface OffchainAddress {
984
- email: string;
985
- currency: string;
986
- }
987
-
988
1109
  export declare interface OnchainAddress {
989
1110
  address: string;
990
1111
  network: Network;
@@ -1153,12 +1274,6 @@ export declare type PageSizeParameter = number;
1153
1274
 
1154
1275
  export declare type PageTokenParameter = string;
1155
1276
 
1156
- export declare type PaymentDirection = (typeof PaymentDirection)[keyof typeof PaymentDirection];
1157
-
1158
- export declare const PaymentDirection: {
1159
- readonly outbound: "outbound";
1160
- };
1161
-
1162
1277
  export declare interface PaymentMethod {
1163
1278
  id: string;
1164
1279
  type: PaymentMethodType;
@@ -1190,7 +1305,7 @@ export declare type PaymentMethodRequiredErrorResponse = Error_2;
1190
1305
 
1191
1306
  export declare interface PaymentMethodSource {
1192
1307
  type: PaymentMethodSourceType;
1193
- paymentMethodID: string;
1308
+ paymentMethodId: string;
1194
1309
  }
1195
1310
 
1196
1311
  export declare type PaymentMethodSourceType = (typeof PaymentMethodSourceType)[keyof typeof PaymentMethodSourceType];
@@ -1199,6 +1314,10 @@ export declare const PaymentMethodSourceType: {
1199
1314
  readonly payment_method: "payment_method";
1200
1315
  };
1201
1316
 
1317
+ export declare interface PaymentMethodTarget {
1318
+ paymentMethodId: string;
1319
+ }
1320
+
1202
1321
  export declare type PaymentMethodType = (typeof PaymentMethodType)[keyof typeof PaymentMethodType];
1203
1322
 
1204
1323
  export declare const PaymentMethodType: {
@@ -1217,6 +1336,7 @@ export declare type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentS
1217
1336
 
1218
1337
  export declare const PaymentStatus: {
1219
1338
  readonly pending: "pending";
1339
+ readonly awaiting_funds: "awaiting_funds";
1220
1340
  readonly in_progress: "in_progress";
1221
1341
  readonly completed: "completed";
1222
1342
  readonly failed: "failed";
@@ -1680,6 +1800,20 @@ export declare type SignSolanaHashWithEndUserAccountBody = {
1680
1800
 
1681
1801
  export declare type SignSolanaHashWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof signSolanaHashWithEndUserAccount>>>;
1682
1802
 
1803
+ export declare const signSolanaMessageWithEndUserAccount: (projectId: string, userId: string, signSolanaMessageWithEndUserAccountBody: SignSolanaMessageWithEndUserAccountBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<SignSolanaMessageWithEndUserAccount200>;
1804
+
1805
+ export declare type SignSolanaMessageWithEndUserAccount200 = {
1806
+ signature: string;
1807
+ };
1808
+
1809
+ export declare type SignSolanaMessageWithEndUserAccountBody = {
1810
+ address: string;
1811
+ message: string;
1812
+ walletSecretId: string;
1813
+ };
1814
+
1815
+ export declare type SignSolanaMessageWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof signSolanaMessageWithEndUserAccount>>>;
1816
+
1683
1817
  export declare const signSolanaTransactionWithEndUserAccount: (projectId: string, userId: string, signSolanaTransactionWithEndUserAccountBody: SignSolanaTransactionWithEndUserAccountBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<SignSolanaTransactionWithEndUserAccount200>;
1684
1818
 
1685
1819
  export declare type SignSolanaTransactionWithEndUserAccount200 = {
@@ -1910,6 +2044,30 @@ export declare interface SourceAmount {
1910
2044
  currency: string;
1911
2045
  }
1912
2046
 
2047
+ export declare interface SourceDepositInstructions {
2048
+ paymentMethodType: SourceDepositInstructionsPaymentMethodType;
2049
+ currency: SourceDepositInstructionsCurrency;
2050
+ accountName: string;
2051
+ accountAddress: string;
2052
+ accountNumber: string;
2053
+ routingNumber: string;
2054
+ bankName: string;
2055
+ bankAddress: string;
2056
+ bankCountryName: string;
2057
+ }
2058
+
2059
+ export declare type SourceDepositInstructionsCurrency = (typeof SourceDepositInstructionsCurrency)[keyof typeof SourceDepositInstructionsCurrency];
2060
+
2061
+ export declare const SourceDepositInstructionsCurrency: {
2062
+ readonly USD: "USD";
2063
+ };
2064
+
2065
+ export declare type SourceDepositInstructionsPaymentMethodType = (typeof SourceDepositInstructionsPaymentMethodType)[keyof typeof SourceDepositInstructionsPaymentMethodType];
2066
+
2067
+ export declare const SourceDepositInstructionsPaymentMethodType: {
2068
+ readonly fedwire: "fedwire";
2069
+ };
2070
+
1913
2071
  export declare type SourceType = (typeof SourceType)[keyof typeof SourceType];
1914
2072
 
1915
2073
  export declare const SourceType: {
@@ -1998,7 +2156,7 @@ export declare interface SwapUnavailableResponse {
1998
2156
 
1999
2157
  export declare type Taker = string;
2000
2158
 
2001
- export declare type Target = OnchainAddress | OffchainAddress;
2159
+ export declare type Target = OnchainAddress | EmailAddress | AccountTarget | PaymentMethodTarget;
2002
2160
 
2003
2161
  export declare interface TargetAmount {
2004
2162
  value: string;
@@ -2053,7 +2211,6 @@ export declare interface Transfer {
2053
2211
  export declare interface TransferQuote {
2054
2212
  id: string;
2055
2213
  paymentStatus: PaymentStatus;
2056
- paymentDirection: PaymentDirection;
2057
2214
  source: Source;
2058
2215
  target: Target;
2059
2216
  sourceAmount: SourceAmount;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-api-client",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",