@coinflowlabs/angular 1.10.0 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinflowlabs/angular",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.17",
6
6
  "@angular/core": "^19.2.17",
@@ -744,6 +744,7 @@ declare enum MerchantStyle {
744
744
  type MerchantTheme = {
745
745
  primary?: string;
746
746
  background?: string;
747
+ cardBackground?: string;
747
748
  backgroundAccent?: string;
748
749
  backgroundAccent2?: string;
749
750
  textColor?: string;
@@ -757,6 +758,7 @@ type MerchantTheme = {
757
758
  cardNumberPlaceholder?: string;
758
759
  cvvPlaceholder?: string;
759
760
  expirationPlaceholder?: string;
761
+ placeholderColor?: string;
760
762
  showCardIcon?: boolean;
761
763
  };
762
764
  interface BaseCustomerInfo {
@@ -930,7 +932,10 @@ declare enum PaymentMethods {
930
932
  crypto = "crypto",
931
933
  wire = "wire",
932
934
  cashApp = "cashApp",
933
- rain = "rain"
935
+ apa = "apa",
936
+ paypal = "paypal",
937
+ venmo = "venmo",
938
+ interac = "interac"
934
939
  }
935
940
  declare const paymentMethodLabels: Record<PaymentMethods, string>;
936
941
  interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockchain'> {
@@ -945,8 +950,6 @@ interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockcha
945
950
  /**
946
951
  * The DeviceID gotten from the Coinflow SDK:
947
952
  * https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
948
- *
949
- * nSureSDK.getDeviceId()
950
953
  */
951
954
  deviceId?: string;
952
955
  /**
@@ -1007,8 +1010,6 @@ interface CoinflowCommonPurchaseProps extends CoinflowTypes {
1007
1010
  /**
1008
1011
  * The DeviceID gotten from the Coinflow SDK:
1009
1012
  * https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
1010
- *
1011
- * nSureSDK.getDeviceId()
1012
1013
  */
1013
1014
  deviceId?: string;
1014
1015
  jwtToken?: string;
@@ -1028,6 +1029,11 @@ interface CoinflowCommonPurchaseProps extends CoinflowTypes {
1028
1029
  threeDsChallengePreference?: ThreeDsChallengePreference;
1029
1030
  destinationAuthKey?: string;
1030
1031
  accountFundingTransaction?: AccountFundingTransaction;
1032
+ /**
1033
+ * Custom preset deposit amounts (in dollars) to display in the AmountSelector.
1034
+ * Only the first 3 values are used. Defaults to [10, 25, 50] if not provided.
1035
+ */
1036
+ depositAmounts?: number[];
1031
1037
  }
1032
1038
  interface WithGeo {
1033
1039
  /**
@@ -1298,7 +1304,7 @@ interface DecentRedeem extends CommonEvmRedeem {
1298
1304
  * Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.
1299
1305
  */
1300
1306
  type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
1301
- interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
1307
+ interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
1302
1308
  walletPubkey: string | null | undefined;
1303
1309
  sessionKey?: string;
1304
1310
  route: string;
@@ -1386,7 +1392,7 @@ declare class CoinflowUtils {
1386
1392
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
1387
1393
  static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
1388
1394
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
1389
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, baseUrl, }: CoinflowIFrameProps & {
1395
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, depositAmounts, baseUrl, }: CoinflowIFrameProps & {
1390
1396
  baseUrl?: string;
1391
1397
  } & WithGeo): string;
1392
1398
  static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
@@ -1436,6 +1442,11 @@ interface IFrameMessageHandlers {
1436
1442
  handleHeightChange?: (height: string) => void;
1437
1443
  onSuccess: OnSuccessMethod | undefined;
1438
1444
  onAuthDeclined: OnAuthDeclinedMethod | undefined;
1445
+ /**
1446
+ * Called when the iframe opens/closes an in-page overlay (e.g. the PayPal
1447
+ * approval modal). `state` is 'open' or 'close'.
1448
+ */
1449
+ handleOverlay?: (state: string) => void;
1439
1450
  }
1440
1451
  declare enum IFrameMessageMethods {
1441
1452
  SignMessage = "signMessage",
@@ -1446,7 +1457,8 @@ declare enum IFrameMessageMethods {
1446
1457
  AuthDeclined = "authDeclined",
1447
1458
  Loaded = "loaded",
1448
1459
  AccountLinked = "accountLinked",
1449
- Redirect = "redirect"
1460
+ Redirect = "redirect",
1461
+ Overlay = "overlay"
1450
1462
  }
1451
1463
  declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
1452
1464
  declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
@@ -1567,9 +1579,11 @@ declare function doInitializeTokenExCardOnlyIframe(args: DoInitializeTokenExIfra
1567
1579
  declare const DEVICE_ID_HEADER = "x-device-id";
1568
1580
  declare const SESSION_ID_HEADER = "x-session-id";
1569
1581
  declare const REFERRER_HEADER = "x-coinflow-referrer";
1582
+ declare const FORTER_TOKEN_HEADER = "x-forter-token";
1570
1583
  type CoinflowProtectionHeadersType = {
1571
1584
  [DEVICE_ID_HEADER]: string | null;
1572
1585
  [SESSION_ID_HEADER]: string | null;
1586
+ [FORTER_TOKEN_HEADER]: string | null;
1573
1587
  };
1574
1588
  declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
1575
1589
  type CoinflowPurchaseHeadersType = CoinflowProtectionHeadersType & {
@@ -1582,6 +1596,16 @@ declare function initCoinflowProtection({ coinflowEnv, merchantId, }: {
1582
1596
  merchantId: string;
1583
1597
  }): Promise<void>;
1584
1598
 
1599
+ declare function getForterToken(): string | null;
1600
+ declare function captureForterToken({ timeoutMs, intervalMs, }?: {
1601
+ timeoutMs?: number;
1602
+ intervalMs?: number;
1603
+ }): void;
1604
+ declare function awaitForterToken({ timeoutMs, intervalMs, }?: {
1605
+ timeoutMs?: number;
1606
+ intervalMs?: number;
1607
+ }): Promise<string | null>;
1608
+
1585
1609
  declare class CoinflowIFrameComponent {
1586
1610
  private sanitizer;
1587
1611
  iframeProps: CoinflowIFrameProps;
@@ -1742,5 +1766,5 @@ type WithOnLoad = {
1742
1766
  onLoad?: () => void | Promise<void>;
1743
1767
  };
1744
1768
 
1745
- export { BankingCurrencies, CARD_TYPE_MAPPING, CardType, ChargebackProtectionAccountType, CoinflowApplePayButtonComponent, CoinflowCardForm, CoinflowCardFormV2, CoinflowCardNumberInput, CoinflowCardNumberOnlyInput, CoinflowCvvInputComponent, CoinflowCvvOnlyInputComponent, CoinflowGooglePayButtonComponent, CoinflowIFrameComponent, CoinflowPurchaseComponent, CoinflowPurchaseHistoryComponent, CoinflowPurchaseProtectionComponent, CoinflowUtils, CoinflowWithdrawComponent, CoinflowWithdrawHistoryComponent, Currency, CurrencyToISO4217, DEVICE_ID_HEADER, EventBus, IFrameMessageMethods, MerchantStyle, PaymentMethods, REFERRER_HEADER, RN_REDIRECT_MESSAGE_NAME, SESSION_ID_HEADER, SettlementType, ThreeDsChallengePreference, TokenExCardNumberIframeId, TokenExCvvContainerID, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, getCoinflowProtectionHeaders, getCoinflowPurchaseHeaders, getCurrencyDecimals, getCustomerName, getHandlers, getIframeConfig, getWalletPubkey, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, paymentMethodLabels, productType, recordFrontendError, setTokenExScriptTag };
1769
+ export { BankingCurrencies, CARD_TYPE_MAPPING, CardType, ChargebackProtectionAccountType, CoinflowApplePayButtonComponent, CoinflowCardForm, CoinflowCardFormV2, CoinflowCardNumberInput, CoinflowCardNumberOnlyInput, CoinflowCvvInputComponent, CoinflowCvvOnlyInputComponent, CoinflowGooglePayButtonComponent, CoinflowIFrameComponent, CoinflowPurchaseComponent, CoinflowPurchaseHistoryComponent, CoinflowPurchaseProtectionComponent, CoinflowUtils, CoinflowWithdrawComponent, CoinflowWithdrawHistoryComponent, Currency, CurrencyToISO4217, DEVICE_ID_HEADER, EventBus, FORTER_TOKEN_HEADER, IFrameMessageMethods, MerchantStyle, PaymentMethods, REFERRER_HEADER, RN_REDIRECT_MESSAGE_NAME, SESSION_ID_HEADER, SettlementType, ThreeDsChallengePreference, TokenExCardNumberIframeId, TokenExCvvContainerID, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, awaitForterToken, captureForterToken, doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, getCoinflowProtectionHeaders, getCoinflowPurchaseHeaders, getCurrencyDecimals, getCustomerName, getForterToken, getHandlers, getIframeConfig, getWalletPubkey, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, paymentMethodLabels, productType, recordFrontendError, setTokenExScriptTag };
1746
1770
  export type { AccountFundingTransaction, AnyObject, ArbitrumWalletProps, AuthDeclinedWalletCallInfo, BankingCurrency, BaseWalletProps, CardFormArgs, CardFormInputStyles, CardFormTokenResponse, Cart, CartClassOmitted, CartItem, CartItemClassOmitted, Cents, ChargebackProtectionData, ChargebackProtectionItem, CoinflowArbitrumHistoryProps, CoinflowArbitrumPurchaseProps, CoinflowArbitrumWithdrawProps, CoinflowBaseHistoryProps, CoinflowBasePurchaseProps, CoinflowBaseWithdrawProps, CoinflowBlockchain, CoinflowCardNumberInputProps, CoinflowCardTokenResponse, CoinflowCommonPaymentIntentProps, CoinflowCommonPurchaseProps, CoinflowCommonWithdrawProps, CoinflowCvvOnlyInputProps, CoinflowEnvs, CoinflowEthHistoryProps, CoinflowEthPurchaseProps, CoinflowEthWithdrawProps, CoinflowEvmHistoryProps, CoinflowEvmPurchaseProps, CoinflowHistoryProps, CoinflowIFrameProps, CoinflowIntentsIFrameProps, CoinflowMonadHistoryProps, CoinflowMonadPurchaseProps, CoinflowMonadWithdrawProps, CoinflowPolygonHistoryProps, CoinflowPolygonPurchaseProps, CoinflowPolygonWithdrawProps, CoinflowProtectionHeadersType, CoinflowPurchaseHeadersType, CoinflowPurchaseProps, CoinflowSessionKeyHistoryProps, CoinflowSessionKeyPurchaseProps, CoinflowSolanaHistoryProps, CoinflowSolanaPurchaseProps, CoinflowSolanaWithdrawProps, CoinflowStellarHistoryProps, CoinflowStellarPurchaseProps, CoinflowStellarWithdrawProps, CoinflowTempoHistoryProps, CoinflowTempoPurchaseProps, CoinflowTempoWithdrawProps, CoinflowTypes, CoinflowWithdrawProps, CommonDoInitializeTokenExIframeArgs, CommonEvmRedeem, CryptoCartItem, CurrencyCents, CustomerInfo, DecentRedeem, DoInitializeCvvOnlyTokenExIframeArgs, DoInitializeTokenExIframeArgs, EthWallet, EthWalletProps, EventBusCallback, EvmTransactionData, ExchangeRate, FullName, GetIFrameConfigArgs, GiftCardCartItem, IFrameMessageHandlers, KnownTokenIdRedeem, MerchantIdOrCheckoutJwt, MerchantTheme, MergeWithOptionalDiff, MonadWalletProps, NameCustomerInfo, NftCartItemClassOmitted, NormalRedeem, OnAuthDeclinedMethod, OnSuccessMethod, PartialBy, PolygonWalletProps, PurchaseCustomPayInFee, RecipientAftInfo, RemainingLimit, ReturnedTokenIdRedeem, SafeMintRedeem, SolanaWallet, SolanaWalletProps, SplitNameCustomerInfo, StellarWallet, StellarWalletProps, Subtotal, TempoWalletProps, TokenExIFrameConfiguration, TokenExIframe, TokenRedeem, TokenSubtotal, TokenizationResponse, TypedCurrencyCents, VersionDetail, WalletCall, WalletTypes, WithGeo, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };