@coinbase/cdp-api-client 0.0.80 → 0.0.82

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.
@@ -361,6 +361,18 @@ export declare const CreateDepositDestinationRequestType: {
361
361
  readonly crypto: "crypto";
362
362
  };
363
363
 
364
+ export declare const createEndUserApplePayOnrampOrder: (projectId: string, userId: string, createEndUserApplePayOnrampOrderRequest: CreateEndUserApplePayOnrampOrderRequest, options?: SecondParameter<typeof cdpApiClient>) => Promise<EndUserApplePayOnrampOrderCreateResponse>;
365
+
366
+ export declare interface CreateEndUserApplePayOnrampOrderRequest {
367
+ agreementAcceptedAt: string;
368
+ destination: EndUserOnrampDestinationInput;
369
+ payment: EndUserOnrampPaymentInput;
370
+ purchase: EndUserOnrampPurchaseInput;
371
+ isSandbox?: boolean;
372
+ }
373
+
374
+ export declare type CreateEndUserApplePayOnrampOrderResult = NonNullable<Awaited<ReturnType<typeof createEndUserApplePayOnrampOrder>>>;
375
+
364
376
  export declare const createEndUserEvmAccount: (projectId: string, userId: string, createEndUserEvmAccountBody: CreateEndUserEvmAccountBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<EndUser>;
365
377
 
366
378
  export declare type CreateEndUserEvmAccountBody = {
@@ -412,6 +424,10 @@ export declare const CreatePaymentMethodRequestFedwireType: {
412
424
  readonly fedwire: "fedwire";
413
425
  };
414
426
 
427
+ export declare interface CreateProjectConfigRequest {
428
+ name?: string;
429
+ }
430
+
415
431
  export declare type CreateReportDestinationRequest = CreateReportDestinationRequestAllOf & CreateReportDestinationRequestAllOfThreeOneOf;
416
432
 
417
433
  export declare type CreateReportDestinationRequestAllOf = {
@@ -675,6 +691,11 @@ export declare interface EndUser {
675
691
  lastAuthenticatedAt?: string;
676
692
  }
677
693
 
694
+ export declare interface EndUserApplePayOnrampOrderCreateResponse {
695
+ order: EndUserOnrampOrder;
696
+ paymentLink: EndUserOnrampPaymentLink;
697
+ }
698
+
678
699
  export declare interface EndUserEvmAccount {
679
700
  address: string;
680
701
  createdAt: string;
@@ -686,6 +707,78 @@ export declare interface EndUserEvmSmartAccount {
686
707
  createdAt: string;
687
708
  }
688
709
 
710
+ export declare interface EndUserOnrampDestination {
711
+ address: BlockchainAddress;
712
+ network: Network;
713
+ }
714
+
715
+ export declare interface EndUserOnrampDestinationInput {
716
+ address: BlockchainAddress;
717
+ network: Network;
718
+ }
719
+
720
+ export declare interface EndUserOnrampFee {
721
+ type: EndUserOnrampFeeType;
722
+ amount: string;
723
+ currency: Asset;
724
+ }
725
+
726
+ export declare type EndUserOnrampFeeType = (typeof EndUserOnrampFeeType)[keyof typeof EndUserOnrampFeeType];
727
+
728
+ export declare const EndUserOnrampFeeType: {
729
+ readonly FEE_TYPE_NETWORK: "FEE_TYPE_NETWORK";
730
+ readonly FEE_TYPE_EXCHANGE: "FEE_TYPE_EXCHANGE";
731
+ };
732
+
733
+ export declare interface EndUserOnrampOrder {
734
+ orderId: string;
735
+ payment: EndUserOnrampPayment;
736
+ purchase: EndUserOnrampPurchase;
737
+ fees: EndUserOnrampFee[];
738
+ exchangeRate: string;
739
+ destination: EndUserOnrampDestination;
740
+ status: EndUserOnrampOrderStatus;
741
+ txHash?: string;
742
+ createdAt: string;
743
+ updatedAt: string;
744
+ userId: string;
745
+ isSandbox?: boolean;
746
+ }
747
+
748
+ export declare type EndUserOnrampOrderStatus = (typeof EndUserOnrampOrderStatus)[keyof typeof EndUserOnrampOrderStatus];
749
+
750
+ export declare const EndUserOnrampOrderStatus: {
751
+ readonly ONRAMP_ORDER_STATUS_PENDING_AUTH: "ONRAMP_ORDER_STATUS_PENDING_AUTH";
752
+ readonly ONRAMP_ORDER_STATUS_PENDING_PAYMENT: "ONRAMP_ORDER_STATUS_PENDING_PAYMENT";
753
+ readonly ONRAMP_ORDER_STATUS_PROCESSING: "ONRAMP_ORDER_STATUS_PROCESSING";
754
+ readonly ONRAMP_ORDER_STATUS_COMPLETED: "ONRAMP_ORDER_STATUS_COMPLETED";
755
+ readonly ONRAMP_ORDER_STATUS_FAILED: "ONRAMP_ORDER_STATUS_FAILED";
756
+ };
757
+
758
+ export declare interface EndUserOnrampPayment {
759
+ total: string;
760
+ subtotal: string;
761
+ currency: Asset;
762
+ }
763
+
764
+ export declare interface EndUserOnrampPaymentInput {
765
+ currency: Asset;
766
+ }
767
+
768
+ export declare interface EndUserOnrampPaymentLink {
769
+ url: Url;
770
+ }
771
+
772
+ export declare interface EndUserOnrampPurchase {
773
+ amount: string;
774
+ currency: Asset;
775
+ }
776
+
777
+ export declare interface EndUserOnrampPurchaseInput {
778
+ amount: string;
779
+ currency: Asset;
780
+ }
781
+
689
782
  export declare interface EndUserSolanaAccount {
690
783
  address: string;
691
784
  createdAt: string;
@@ -748,9 +841,22 @@ export declare const ErrorType: {
748
841
  readonly recipient_allowlist_violation: "recipient_allowlist_violation";
749
842
  readonly recipient_allowlist_pending: "recipient_allowlist_pending";
750
843
  readonly travel_rules_recipient_violation: "travel_rules_recipient_violation";
751
- readonly transfer_amount_out_of_bounds: "transfer_amount_out_of_bounds";
752
- readonly transfer_recipient_address_invalid: "transfer_recipient_address_invalid";
753
- readonly transfer_quote_expired: "transfer_quote_expired";
844
+ readonly source_account_invalid: "source_account_invalid";
845
+ readonly target_account_invalid: "target_account_invalid";
846
+ readonly source_account_not_found: "source_account_not_found";
847
+ readonly target_account_not_found: "target_account_not_found";
848
+ readonly source_asset_not_supported: "source_asset_not_supported";
849
+ readonly target_asset_not_supported: "target_asset_not_supported";
850
+ readonly target_email_invalid: "target_email_invalid";
851
+ readonly target_onchain_address_invalid: "target_onchain_address_invalid";
852
+ readonly transfer_amount_invalid: "transfer_amount_invalid";
853
+ readonly transfer_asset_not_supported: "transfer_asset_not_supported";
854
+ readonly insufficient_balance: "insufficient_balance";
855
+ readonly metadata_too_many_entries: "metadata_too_many_entries";
856
+ readonly metadata_key_too_long: "metadata_key_too_long";
857
+ readonly metadata_value_too_long: "metadata_value_too_long";
858
+ readonly travel_rules_field_missing: "travel_rules_field_missing";
859
+ readonly asset_mismatch: "asset_mismatch";
754
860
  readonly mfa_already_enrolled: "mfa_already_enrolled";
755
861
  readonly mfa_invalid_code: "mfa_invalid_code";
756
862
  readonly mfa_flow_expired: "mfa_flow_expired";
@@ -1086,6 +1192,10 @@ export declare const getMfaConfig: (projectId: string, options?: SecondParameter
1086
1192
 
1087
1193
  export declare type GetMfaConfigResult = NonNullable<Awaited<ReturnType<typeof getMfaConfig>>>;
1088
1194
 
1195
+ export declare const getProjectConfig: (projectId: string, options?: SecondParameter<typeof cdpApiClient>) => Promise<ProjectConfig>;
1196
+
1197
+ export declare type GetProjectConfigResult = NonNullable<Awaited<ReturnType<typeof getProjectConfig>>>;
1198
+
1089
1199
  export declare type GetSwapPriceResponse = CommonSwapResponse & GetSwapPriceResponseAllOf;
1090
1200
 
1091
1201
  export declare type GetSwapPriceResponseAllOf = {
@@ -1392,6 +1502,8 @@ export declare type LimitUsed = {
1392
1502
  export declare interface LinkableAccount {
1393
1503
  accountId: AccountId;
1394
1504
  type: AccountType;
1505
+ name: string;
1506
+ status?: Status;
1395
1507
  }
1396
1508
 
1397
1509
  export declare interface LinkableEntity {
@@ -1666,6 +1778,13 @@ export declare interface OnchainDataTableSchema {
1666
1778
  columns?: OnchainDataColumnSchema[];
1667
1779
  }
1668
1780
 
1781
+ export declare type OnrampLimitType = (typeof OnrampLimitType)[keyof typeof OnrampLimitType];
1782
+
1783
+ export declare const OnrampLimitType: {
1784
+ readonly weekly_spending: "weekly_spending";
1785
+ readonly lifetime_transactions: "lifetime_transactions";
1786
+ };
1787
+
1669
1788
  export declare interface OnrampOrder {
1670
1789
  orderId: string;
1671
1790
  paymentTotal: string;
@@ -1751,6 +1870,24 @@ export declare interface OnrampSession {
1751
1870
  onrampUrl: Url;
1752
1871
  }
1753
1872
 
1873
+ export declare interface OnrampUserId {
1874
+ type: OnrampUserIdType;
1875
+ value: string;
1876
+ }
1877
+
1878
+ export declare type OnrampUserIdType = (typeof OnrampUserIdType)[keyof typeof OnrampUserIdType];
1879
+
1880
+ export declare const OnrampUserIdType: {
1881
+ readonly phone_number: "phone_number";
1882
+ };
1883
+
1884
+ export declare interface OnrampUserLimit {
1885
+ limitType: OnrampLimitType;
1886
+ currency?: string;
1887
+ limit: string;
1888
+ used: string;
1889
+ }
1890
+
1754
1891
  export declare type Owner = string;
1755
1892
 
1756
1893
  export declare type PageSizeParameter = number;
@@ -1916,6 +2053,13 @@ export declare interface Project {
1916
2053
  deletedAt?: string | null;
1917
2054
  }
1918
2055
 
2056
+ export declare interface ProjectConfig {
2057
+ projectId: string;
2058
+ name?: string;
2059
+ createdAt: string;
2060
+ updatedAt: string;
2061
+ }
2062
+
1919
2063
  export declare type ProjectId = string;
1920
2064
 
1921
2065
  export declare type RateLimitExceededResponse = Error_2;
@@ -2867,6 +3011,14 @@ export declare interface SSHKeyPair {
2867
3011
  createdAt: string;
2868
3012
  }
2869
3013
 
3014
+ export declare type Status = (typeof Status)[keyof typeof Status];
3015
+
3016
+ export declare const Status: {
3017
+ readonly unlinked: "unlinked";
3018
+ readonly pending: "pending";
3019
+ readonly linked: "linked";
3020
+ };
3021
+
2870
3022
  export declare const submitMfaEnrollment: (projectId: string, userId: string, mfaMethod: "totp" | "sms", submitMfaEnrollmentBody: SubmitMfaEnrollmentBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<SubmitMfaEnrollment200>;
2871
3023
 
2872
3024
  export declare type SubmitMfaEnrollment200 = {
@@ -2996,8 +3148,14 @@ export declare const TransferColumn: {
2996
3148
 
2997
3149
  export declare interface TransferDetails {
2998
3150
  depositDestination?: DepositDestinationReference;
3151
+ onchainTransactions?: TransferDetailsOnchainTransactionsItem[];
2999
3152
  }
3000
3153
 
3154
+ export declare type TransferDetailsOnchainTransactionsItem = {
3155
+ transactionHash: string;
3156
+ network: Network;
3157
+ };
3158
+
3001
3159
  export declare interface TransferEvent {
3002
3160
  eventType: TransferEventEventType;
3003
3161
  eventId: string;
@@ -3012,7 +3170,6 @@ export declare const TransferEventEventType: {
3012
3170
  readonly paymentstransfersprocessing: "payments.transfers.processing";
3013
3171
  readonly paymentstransferscompleted: "payments.transfers.completed";
3014
3172
  readonly paymentstransfersfailed: "payments.transfers.failed";
3015
- readonly paymentstransfersexpired: "payments.transfers.expired";
3016
3173
  };
3017
3174
 
3018
3175
  export declare type TransferExchangeRate = {
@@ -3096,7 +3253,6 @@ export declare const TransferStatus: {
3096
3253
  readonly processing: "processing";
3097
3254
  readonly completed: "completed";
3098
3255
  readonly failed: "failed";
3099
- readonly expired: "expired";
3100
3256
  };
3101
3257
 
3102
3258
  export declare type TransferTarget = TransfersAccount | PaymentMethod | OnchainAddress | EmailAddress;
@@ -3198,6 +3354,10 @@ export declare interface UpdateMfaConfigRequest {
3198
3354
  requireVerificationOnLogin?: boolean;
3199
3355
  }
3200
3356
 
3357
+ export declare interface UpdateProjectConfigRequest {
3358
+ name?: string;
3359
+ }
3360
+
3201
3361
  export declare type UpdateReportDestinationRequest = UpdateReportDestinationRequestAllOf & UpdateReportDestinationRequestAllOfTwo;
3202
3362
 
3203
3363
  export declare type UpdateReportDestinationRequestAllOf = {
@@ -3311,25 +3471,14 @@ export declare type WebhookSubscriptionListResponseAllOf = {
3311
3471
  subscriptions: WebhookSubscriptionResponse[];
3312
3472
  };
3313
3473
 
3314
- export declare type WebhookSubscriptionRequest = (unknown & {
3315
- description?: Description;
3316
- eventTypes?: string[];
3317
- isEnabled?: boolean;
3318
- target?: WebhookTarget;
3319
- metadata?: Metadata;
3320
- labelKey?: string;
3321
- labelValue?: string;
3322
- labels?: WebhookSubscriptionRequestLabels;
3323
- }) | (unknown & {
3474
+ export declare interface WebhookSubscriptionRequest {
3324
3475
  description?: Description;
3325
- eventTypes?: string[];
3326
- isEnabled?: boolean;
3327
- target?: WebhookTarget;
3476
+ eventTypes: string[];
3477
+ isEnabled: boolean;
3478
+ target: WebhookTarget;
3328
3479
  metadata?: Metadata;
3329
- labelKey?: string;
3330
- labelValue?: string;
3331
3480
  labels?: WebhookSubscriptionRequestLabels;
3332
- });
3481
+ }
3333
3482
 
3334
3483
  export declare type WebhookSubscriptionRequestLabels = {
3335
3484
  [key: string]: string;
@@ -3344,8 +3493,6 @@ export declare interface WebhookSubscriptionResponse {
3344
3493
  secret: string;
3345
3494
  subscriptionId: string;
3346
3495
  target: WebhookTarget;
3347
- labelKey?: string;
3348
- labelValue?: string;
3349
3496
  labels?: WebhookSubscriptionResponseLabels;
3350
3497
  }
3351
3498
 
@@ -3359,25 +3506,14 @@ export declare type WebhookSubscriptionResponseMetadataAllOf = {
3359
3506
  secret?: string;
3360
3507
  };
3361
3508
 
3362
- export declare type WebhookSubscriptionUpdateRequest = (unknown & {
3509
+ export declare interface WebhookSubscriptionUpdateRequest {
3363
3510
  description?: Description;
3364
- eventTypes?: string[];
3365
- isEnabled?: boolean;
3366
- target?: WebhookTarget;
3367
- metadata?: Metadata;
3368
- labels?: WebhookSubscriptionUpdateRequestLabels;
3369
- labelKey?: string;
3370
- labelValue?: string;
3371
- }) | (unknown & {
3372
- description?: Description;
3373
- eventTypes?: string[];
3374
- isEnabled?: boolean;
3375
- target?: WebhookTarget;
3511
+ eventTypes: string[];
3512
+ isEnabled: boolean;
3513
+ target: WebhookTarget;
3376
3514
  metadata?: Metadata;
3377
3515
  labels?: WebhookSubscriptionUpdateRequestLabels;
3378
- labelKey?: string;
3379
- labelValue?: string;
3380
- });
3516
+ }
3381
3517
 
3382
3518
  export declare type WebhookSubscriptionUpdateRequestLabels = {
3383
3519
  [key: string]: string;
@@ -3494,6 +3630,7 @@ export declare const X402SettleErrorReason: {
3494
3630
  readonly settle_exact_failed_onchain: "settle_exact_failed_onchain";
3495
3631
  readonly settle_exact_svm_block_height_exceeded: "settle_exact_svm_block_height_exceeded";
3496
3632
  readonly settle_exact_svm_transaction_confirmation_timed_out: "settle_exact_svm_transaction_confirmation_timed_out";
3633
+ readonly unknown_error: "unknown_error";
3497
3634
  };
3498
3635
 
3499
3636
  export declare type X402SettleErrorResponse = X402SettlePaymentRejection;
@@ -3501,6 +3638,7 @@ export declare type X402SettleErrorResponse = X402SettlePaymentRejection;
3501
3638
  export declare interface X402SettlePaymentRejection {
3502
3639
  success: boolean;
3503
3640
  errorReason: X402SettleErrorReason;
3641
+ errorMessage?: string;
3504
3642
  payer?: string;
3505
3643
  transaction?: string;
3506
3644
  network?: string;
@@ -3509,6 +3647,7 @@ export declare interface X402SettlePaymentRejection {
3509
3647
  export declare type X402SettleResponseResponse = {
3510
3648
  success: boolean;
3511
3649
  errorReason?: X402SettleErrorReason;
3650
+ errorMessage?: string;
3512
3651
  payer: string;
3513
3652
  transaction: string;
3514
3653
  network: string;
@@ -3689,17 +3828,20 @@ export declare const X402VerifyInvalidReason: {
3689
3828
  readonly invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata: "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata";
3690
3829
  readonly invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts: "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts";
3691
3830
  readonly invalid_exact_svm_payload_transaction_fee_payer_transferring_funds: "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds";
3831
+ readonly unknown_error: "unknown_error";
3692
3832
  };
3693
3833
 
3694
3834
  export declare interface X402VerifyPaymentRejection {
3695
3835
  isValid: boolean;
3696
3836
  invalidReason: X402VerifyInvalidReason;
3837
+ invalidMessage?: string;
3697
3838
  payer?: string;
3698
3839
  }
3699
3840
 
3700
3841
  export declare type X402VerifyResponseResponse = {
3701
3842
  isValid: boolean;
3702
3843
  invalidReason?: X402VerifyInvalidReason;
3844
+ invalidMessage?: string;
3703
3845
  payer: string;
3704
3846
  };
3705
3847
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-api-client",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",