dutchman-bridge 1.1.0 → 1.2.0

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/sdk.gen.d.ts CHANGED
@@ -189,7 +189,7 @@ export declare class GlobalSend extends HeyApiClient {
189
189
  }
190
190
  export declare class Ramp extends HeyApiClient {
191
191
  /**
192
- * Price a buy (fiat -> USDT) against the customer's fiat balance
192
+ * Price a buy (fiat -> stablecoin) against the customer's fiat balance
193
193
  */
194
194
  buyQuote<ThrowOnError extends boolean = false>(options: Options<RampBuyQuoteData, ThrowOnError>): RequestResult<RampBuyQuoteResponses, unknown, ThrowOnError>;
195
195
  /**
@@ -197,21 +197,21 @@ export declare class Ramp extends HeyApiClient {
197
197
  */
198
198
  buy<ThrowOnError extends boolean = false>(options: Options<RampBuyData, ThrowOnError>): RequestResult<RampBuyResponses, unknown, ThrowOnError>;
199
199
  /**
200
- * Networks the customer can deposit USDT on
200
+ * Networks the customer can deposit stablecoins on
201
201
  */
202
202
  sellNetworks<ThrowOnError extends boolean = false>(options: Options<RampSellNetworksData, ThrowOnError>): RequestResult<RampSellNetworksResponses, unknown, ThrowOnError>;
203
203
  /**
204
- * Live all-in USDT rates in the customer's local fiat, for previewing a conversion
204
+ * Live all-in stablecoin rates in the customer's local fiat, for previewing a conversion
205
205
  *
206
- * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?amount (USDT) to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
206
+ * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?asset to price a specific stablecoin (default RAMP_DEFAULT_ASSET) and ?amount to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
207
207
  */
208
208
  rate<ThrowOnError extends boolean = false>(options: Options<RampRateData, ThrowOnError>): RequestResult<RampRateResponses, unknown, ThrowOnError>;
209
209
  /**
210
- * Price a sell (USDT -> fiat) against the customer's USDT balance
210
+ * Price a sell (stablecoin -> fiat) against the customer's balance
211
211
  */
212
212
  sellQuote<ThrowOnError extends boolean = false>(options: Options<RampSellQuoteData, ThrowOnError>): RequestResult<RampSellQuoteResponses, unknown, ThrowOnError>;
213
213
  /**
214
- * Execute a sell from the customer's USDT balance
214
+ * Execute a sell from the customer's stablecoin balance
215
215
  */
216
216
  sell<ThrowOnError extends boolean = false>(options: Options<RampSellData, ThrowOnError>): RequestResult<RampSellResponses, unknown, ThrowOnError>;
217
217
  }
package/dist/sdk.gen.js CHANGED
@@ -444,7 +444,7 @@ class GlobalSend extends HeyApiClient {
444
444
  exports.GlobalSend = GlobalSend;
445
445
  class Ramp extends HeyApiClient {
446
446
  /**
447
- * Price a buy (fiat -> USDT) against the customer's fiat balance
447
+ * Price a buy (fiat -> stablecoin) against the customer's fiat balance
448
448
  */
449
449
  buyQuote(options) {
450
450
  return (options.client ?? this.client).post({
@@ -472,7 +472,7 @@ class Ramp extends HeyApiClient {
472
472
  });
473
473
  }
474
474
  /**
475
- * Networks the customer can deposit USDT on
475
+ * Networks the customer can deposit stablecoins on
476
476
  */
477
477
  sellNetworks(options) {
478
478
  return (options.client ?? this.client).get({
@@ -482,9 +482,9 @@ class Ramp extends HeyApiClient {
482
482
  });
483
483
  }
484
484
  /**
485
- * Live all-in USDT rates in the customer's local fiat, for previewing a conversion
485
+ * Live all-in stablecoin rates in the customer's local fiat, for previewing a conversion
486
486
  *
487
- * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?amount (USDT) to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
487
+ * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?asset to price a specific stablecoin (default RAMP_DEFAULT_ASSET) and ?amount to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
488
488
  */
489
489
  rate(options) {
490
490
  return (options.client ?? this.client).get({
@@ -494,7 +494,7 @@ class Ramp extends HeyApiClient {
494
494
  });
495
495
  }
496
496
  /**
497
- * Price a sell (USDT -> fiat) against the customer's USDT balance
497
+ * Price a sell (stablecoin -> fiat) against the customer's balance
498
498
  */
499
499
  sellQuote(options) {
500
500
  return (options.client ?? this.client).post({
@@ -508,7 +508,7 @@ class Ramp extends HeyApiClient {
508
508
  });
509
509
  }
510
510
  /**
511
- * Execute a sell from the customer's USDT balance
511
+ * Execute a sell from the customer's stablecoin balance
512
512
  */
513
513
  sell(options) {
514
514
  return (options.client ?? this.client).post({
@@ -636,7 +636,13 @@ export type PartnerRampQuoteDto = {
636
636
  };
637
637
  export type GetQuoteDto = {
638
638
  amount: number;
639
+ /**
640
+ * On a sell, the stablecoin being sold; on a buy, the fiat being spent. Any stablecoin the service credits can be ramped wherever the exchange quotes the pair.
641
+ */
639
642
  sourceCurrency: string;
643
+ /**
644
+ * On a sell, the fiat received; on a buy, the stablecoin bought. Must be the customer's own local fiat on the fiat side.
645
+ */
640
646
  destinationCurrency: string;
641
647
  type: 'sell' | 'buy';
642
648
  /**
@@ -652,8 +658,18 @@ export type GetQuoteDto = {
652
658
  };
653
659
  export type PartnerBuyResultDto = {
654
660
  reference: string;
661
+ asset: 'USDT' | 'USDC' | 'CNGN';
655
662
  fiatCurrency: string;
656
663
  fiatSpent: number;
664
+ /**
665
+ * Units of `asset` now on the balance.
666
+ */
667
+ assetCredited: number;
668
+ /**
669
+ * Same number as `assetCredited`, kept for clients written when USDT was the only rampable asset. Read `assetCredited` with `asset`.
670
+ *
671
+ * @deprecated
672
+ */
657
673
  usdtCredited: number;
658
674
  };
659
675
  export type CustomerSellDto = {
@@ -674,32 +690,52 @@ export type PartnerNetworkDto = {
674
690
  evm: boolean;
675
691
  };
676
692
  export type PartnerRateDto = {
693
+ /**
694
+ * The stablecoin these rates price — echoes the ?asset asked for.
695
+ */
696
+ asset: 'USDT' | 'USDC' | 'CNGN';
677
697
  fiatCurrency: string;
678
698
  /**
679
- * Fiat paid per USDT when buying. All-in: spread applied, and buys carry no fees.
699
+ * Fiat paid per unit of `asset` when buying. All-in: spread applied, and buys carry no fees.
680
700
  */
681
701
  buyRate: number;
682
702
  /**
683
- * Fiat received per USDT when selling. All-in: spread applied, plus the fixed exchange fee when ?amount was given, so amount * sellRate is exactly what the customer receives. The withdrawal fee is separate; see GET .../withdraw/quote.
703
+ * Fiat received per unit of `asset` when selling. All-in: spread applied, plus the fixed exchange fee when ?amount was given, so amount * sellRate is exactly what the customer receives. The withdrawal fee is separate; see GET .../withdraw/quote.
684
704
  */
685
705
  sellRate: number;
686
706
  /**
687
- * USDT amount sellRate was priced for; null when ?amount was omitted, in which case the fixed exchange fee is not in sellRate.
707
+ * Amount of `asset` sellRate was priced for; null when ?amount was omitted, in which case the fixed exchange fee is not in sellRate.
688
708
  */
689
709
  amount: number | null;
690
710
  /**
691
- * Fixed sell-side exchange fee, USDT. In sellRate only when ?amount was given.
711
+ * Fixed sell-side exchange fee, in units of `asset`. In sellRate only when ?amount was given.
712
+ */
713
+ exchangeFeeAsset: number;
714
+ /**
715
+ * Same number as `exchangeFeeAsset`. See PartnerBuyResultDto.
716
+ *
717
+ * @deprecated
692
718
  */
693
719
  exchangeFeeUsdt: number;
694
720
  };
695
721
  export type PartnerSellResultDto = {
696
722
  reference: string;
697
- usdtSold: number;
723
+ asset: 'USDT' | 'USDC' | 'CNGN';
724
+ /**
725
+ * Units of `asset` sold.
726
+ */
727
+ assetSold: number;
698
728
  fiatCurrency: string;
699
729
  /**
700
730
  * Now on the customer's fiat balance; withdraw it with POST .../withdraw.
701
731
  */
702
732
  fiatCredited: number;
733
+ /**
734
+ * Same number as `assetSold`. See PartnerBuyResultDto.
735
+ *
736
+ * @deprecated
737
+ */
738
+ usdtSold: number;
703
739
  };
704
740
  export type PartnerBankDto = {
705
741
  code: string;
@@ -1533,9 +1569,13 @@ export type RampRateData = {
1533
1569
  */
1534
1570
  network?: 'ethereum' | 'polygon' | 'arbitrum' | 'base' | 'arc' | 'bsc' | 'optimism' | 'tron';
1535
1571
  /**
1536
- * USDT amount to price the sell rate for. When given, the fixed exchange fee is spread over it, so amount * sellRate is exactly what the customer receives. Omit for a per-unit rate that carries the spread only.
1572
+ * Amount of `asset` to price the sell rate for. When given, the fixed exchange fee is spread over it, so amount * sellRate is exactly what the customer receives. Omit for a per-unit rate that carries the spread only.
1537
1573
  */
1538
1574
  amount?: number;
1575
+ /**
1576
+ * Stablecoin to price against the customer's local fiat. Defaults to RAMP_DEFAULT_ASSET when omitted, so older clients keep working. The response echoes the asset it priced.
1577
+ */
1578
+ asset?: 'USDT' | 'USDC' | 'CNGN';
1539
1579
  };
1540
1580
  url: '/api/v1/partner/v1/customers/{customerId}/rate';
1541
1581
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dutchman-bridge",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "TypeScript SDK for the Dutchman Bridge Partner API, generated from its OpenAPI specification.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
package/src/sdk.gen.ts CHANGED
@@ -491,7 +491,7 @@ export class GlobalSend extends HeyApiClient {
491
491
 
492
492
  export class Ramp extends HeyApiClient {
493
493
  /**
494
- * Price a buy (fiat -> USDT) against the customer's fiat balance
494
+ * Price a buy (fiat -> stablecoin) against the customer's fiat balance
495
495
  */
496
496
  public buyQuote<ThrowOnError extends boolean = false>(options: Options<RampBuyQuoteData, ThrowOnError>): RequestResult<RampBuyQuoteResponses, unknown, ThrowOnError> {
497
497
  return (options.client ?? this.client).post<RampBuyQuoteResponses, unknown, ThrowOnError>({
@@ -521,7 +521,7 @@ export class Ramp extends HeyApiClient {
521
521
  }
522
522
 
523
523
  /**
524
- * Networks the customer can deposit USDT on
524
+ * Networks the customer can deposit stablecoins on
525
525
  */
526
526
  public sellNetworks<ThrowOnError extends boolean = false>(options: Options<RampSellNetworksData, ThrowOnError>): RequestResult<RampSellNetworksResponses, unknown, ThrowOnError> {
527
527
  return (options.client ?? this.client).get<RampSellNetworksResponses, unknown, ThrowOnError>({
@@ -532,9 +532,9 @@ export class Ramp extends HeyApiClient {
532
532
  }
533
533
 
534
534
  /**
535
- * Live all-in USDT rates in the customer's local fiat, for previewing a conversion
535
+ * Live all-in stablecoin rates in the customer's local fiat, for previewing a conversion
536
536
  *
537
- * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?amount (USDT) to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
537
+ * Rates include our spread and every fee, so amount * rate is what the customer pays or receives. Pass ?asset to price a specific stablecoin (default RAMP_DEFAULT_ASSET) and ?amount to fold the fixed exchange fee into sellRate for that amount. Does not lock a rate -- checkout still goes through the quote routes.
538
538
  */
539
539
  public rate<ThrowOnError extends boolean = false>(options: Options<RampRateData, ThrowOnError>): RequestResult<RampRateResponses, unknown, ThrowOnError> {
540
540
  return (options.client ?? this.client).get<RampRateResponses, unknown, ThrowOnError>({
@@ -545,7 +545,7 @@ export class Ramp extends HeyApiClient {
545
545
  }
546
546
 
547
547
  /**
548
- * Price a sell (USDT -> fiat) against the customer's USDT balance
548
+ * Price a sell (stablecoin -> fiat) against the customer's balance
549
549
  */
550
550
  public sellQuote<ThrowOnError extends boolean = false>(options: Options<RampSellQuoteData, ThrowOnError>): RequestResult<RampSellQuoteResponses, unknown, ThrowOnError> {
551
551
  return (options.client ?? this.client).post<RampSellQuoteResponses, unknown, ThrowOnError>({
@@ -560,7 +560,7 @@ export class Ramp extends HeyApiClient {
560
560
  }
561
561
 
562
562
  /**
563
- * Execute a sell from the customer's USDT balance
563
+ * Execute a sell from the customer's stablecoin balance
564
564
  */
565
565
  public sell<ThrowOnError extends boolean = false>(options: Options<RampSellData, ThrowOnError>): RequestResult<RampSellResponses, unknown, ThrowOnError> {
566
566
  return (options.client ?? this.client).post<RampSellResponses, unknown, ThrowOnError>({
package/src/types.gen.ts CHANGED
@@ -688,7 +688,13 @@ export type PartnerRampQuoteDto = {
688
688
 
689
689
  export type GetQuoteDto = {
690
690
  amount: number;
691
+ /**
692
+ * On a sell, the stablecoin being sold; on a buy, the fiat being spent. Any stablecoin the service credits can be ramped wherever the exchange quotes the pair.
693
+ */
691
694
  sourceCurrency: string;
695
+ /**
696
+ * On a sell, the fiat received; on a buy, the stablecoin bought. Must be the customer's own local fiat on the fiat side.
697
+ */
692
698
  destinationCurrency: string;
693
699
  type: 'sell' | 'buy';
694
700
  /**
@@ -705,8 +711,18 @@ export type GetQuoteDto = {
705
711
 
706
712
  export type PartnerBuyResultDto = {
707
713
  reference: string;
714
+ asset: 'USDT' | 'USDC' | 'CNGN';
708
715
  fiatCurrency: string;
709
716
  fiatSpent: number;
717
+ /**
718
+ * Units of `asset` now on the balance.
719
+ */
720
+ assetCredited: number;
721
+ /**
722
+ * Same number as `assetCredited`, kept for clients written when USDT was the only rampable asset. Read `assetCredited` with `asset`.
723
+ *
724
+ * @deprecated
725
+ */
710
726
  usdtCredited: number;
711
727
  };
712
728
 
@@ -730,33 +746,53 @@ export type PartnerNetworkDto = {
730
746
  };
731
747
 
732
748
  export type PartnerRateDto = {
749
+ /**
750
+ * The stablecoin these rates price — echoes the ?asset asked for.
751
+ */
752
+ asset: 'USDT' | 'USDC' | 'CNGN';
733
753
  fiatCurrency: string;
734
754
  /**
735
- * Fiat paid per USDT when buying. All-in: spread applied, and buys carry no fees.
755
+ * Fiat paid per unit of `asset` when buying. All-in: spread applied, and buys carry no fees.
736
756
  */
737
757
  buyRate: number;
738
758
  /**
739
- * Fiat received per USDT when selling. All-in: spread applied, plus the fixed exchange fee when ?amount was given, so amount * sellRate is exactly what the customer receives. The withdrawal fee is separate; see GET .../withdraw/quote.
759
+ * Fiat received per unit of `asset` when selling. All-in: spread applied, plus the fixed exchange fee when ?amount was given, so amount * sellRate is exactly what the customer receives. The withdrawal fee is separate; see GET .../withdraw/quote.
740
760
  */
741
761
  sellRate: number;
742
762
  /**
743
- * USDT amount sellRate was priced for; null when ?amount was omitted, in which case the fixed exchange fee is not in sellRate.
763
+ * Amount of `asset` sellRate was priced for; null when ?amount was omitted, in which case the fixed exchange fee is not in sellRate.
744
764
  */
745
765
  amount: number | null;
746
766
  /**
747
- * Fixed sell-side exchange fee, USDT. In sellRate only when ?amount was given.
767
+ * Fixed sell-side exchange fee, in units of `asset`. In sellRate only when ?amount was given.
768
+ */
769
+ exchangeFeeAsset: number;
770
+ /**
771
+ * Same number as `exchangeFeeAsset`. See PartnerBuyResultDto.
772
+ *
773
+ * @deprecated
748
774
  */
749
775
  exchangeFeeUsdt: number;
750
776
  };
751
777
 
752
778
  export type PartnerSellResultDto = {
753
779
  reference: string;
754
- usdtSold: number;
780
+ asset: 'USDT' | 'USDC' | 'CNGN';
781
+ /**
782
+ * Units of `asset` sold.
783
+ */
784
+ assetSold: number;
755
785
  fiatCurrency: string;
756
786
  /**
757
787
  * Now on the customer's fiat balance; withdraw it with POST .../withdraw.
758
788
  */
759
789
  fiatCredited: number;
790
+ /**
791
+ * Same number as `assetSold`. See PartnerBuyResultDto.
792
+ *
793
+ * @deprecated
794
+ */
795
+ usdtSold: number;
760
796
  };
761
797
 
762
798
  export type PartnerBankDto = {
@@ -1702,9 +1738,13 @@ export type RampRateData = {
1702
1738
  */
1703
1739
  network?: 'ethereum' | 'polygon' | 'arbitrum' | 'base' | 'arc' | 'bsc' | 'optimism' | 'tron';
1704
1740
  /**
1705
- * USDT amount to price the sell rate for. When given, the fixed exchange fee is spread over it, so amount * sellRate is exactly what the customer receives. Omit for a per-unit rate that carries the spread only.
1741
+ * Amount of `asset` to price the sell rate for. When given, the fixed exchange fee is spread over it, so amount * sellRate is exactly what the customer receives. Omit for a per-unit rate that carries the spread only.
1706
1742
  */
1707
1743
  amount?: number;
1744
+ /**
1745
+ * Stablecoin to price against the customer's local fiat. Defaults to RAMP_DEFAULT_ASSET when omitted, so older clients keep working. The response echoes the asset it priced.
1746
+ */
1747
+ asset?: 'USDT' | 'USDC' | 'CNGN';
1708
1748
  };
1709
1749
  url: '/api/v1/partner/v1/customers/{customerId}/rate';
1710
1750
  };