@lydianpay/sdk-web 2.0.3 → 2.1.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.
@@ -170,6 +170,7 @@ export type GetSessionResponse = {
170
170
  customFeePercentagePerNetwork?: AmountPerNetwork;
171
171
  customFeeFiatPerNetwork?: AmountPerNetwork;
172
172
  customFeeCryptoPerNetwork?: AmountPerNetworkPerAsset;
173
+ markupPercentage?: number;
173
174
  cryptoFXRates?: AmountPerAsset;
174
175
  cryptoFXRateExpiration?: string;
175
176
  fxRate?: number;
@@ -187,6 +188,7 @@ export type CalculatedTotals = {
187
188
  baseAmountCrypto: number;
188
189
  merchantCustomFeeCrypto: number;
189
190
  additionalCustomerFeeCrypto: number;
191
+ markupCrypto: number;
190
192
  totalAmountCrypto: number;
191
193
  };
192
194
  export type CreateTransactionResponse = {
@@ -42,6 +42,7 @@ export declare class Checkout extends HTMLElement {
42
42
  private btnWalletSummaryRow;
43
43
  private btnAssetWalletSummaryRow;
44
44
  private assetSelectTotalAmount;
45
+ private assetMarkupNotice;
45
46
  private paymentHeader;
46
47
  private merchantLogoHeader;
47
48
  private changePaymentMethodRow;
@@ -59,6 +60,8 @@ export declare class Checkout extends HTMLElement {
59
60
  private displayAssetTotal;
60
61
  private displayQrSubtotal;
61
62
  private displayQrNetworkFee;
63
+ private displayQrMarkup;
64
+ private qrMarkupRow;
62
65
  private displayWalletAddress;
63
66
  private qrNetworkLogo;
64
67
  private qrNetworkName;
@@ -0,0 +1,5 @@
1
+ import { GetSessionResponse } from '../types';
2
+ type MarkupSource = Pick<GetSessionResponse, 'markupPercentage' | 'amount' | 'fxRate' | 'cryptoFXRates' | 'calculatedCryptoTotals'>;
3
+ export declare function getSessionMarkupPercentage(session: MarkupSource | undefined): number | null;
4
+ export declare function formatMarkupPercentage(markupPercentage: number): string;
5
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/sdk-web",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "description": "Drop-in crypto payment checkout for the web — a <lydian-checkout> web component and window.Lydian API across 20+ chains and major stablecoins.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -76,7 +76,7 @@
76
76
  "vitest": "^3.0.0"
77
77
  },
78
78
  "dependencies": {
79
- "@lydianpay/lydianconnect": "^1.2.0",
79
+ "@lydianpay/lydianconnect": "^1.3.0",
80
80
  "@lydianpay/lydianconnect-catalog": "^1.3.1",
81
81
  "@solana/qr-code-styling": "^1.6.0",
82
82
  "dompurify": "^3.4.12",