@coinflowlabs/angular 1.15.0 → 1.15.2

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.15.0",
3
+ "version": "1.15.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.17",
6
6
  "@angular/core": "^19.2.17",
@@ -11,6 +11,7 @@
11
11
  "tweetnacl": "^1.0.3"
12
12
  },
13
13
  "dependencies": {
14
+ "@nsure-ai/web-client-sdk": "^1.1.100",
14
15
  "tslib": "^2.8.1"
15
16
  },
16
17
  "peerDependenciesMeta": {
@@ -283,7 +283,12 @@ interface TokenSubtotal {
283
283
  */
284
284
  address: string;
285
285
  /**
286
- * Number of tokens
286
+ * Number of tokens, from 0 to 1,000,000,000,000 inclusive.
287
+ * String values must be a plain decimal with at most 12 integer digits and
288
+ * 18 fractional digits.
289
+ * @minimum 0 amount must be non-negative
290
+ * @maximum 1000000000000 amount must be at most 1000000000000
291
+ * @pattern ^\d{1,12}(\.\d{1,18})?$ amount must be a non-negative decimal
287
292
  */
288
293
  amount: number | string;
289
294
  /**
@@ -1350,7 +1355,7 @@ interface SplitNameCustomerInfo extends BaseCustomerInfo {
1350
1355
  type CustomerInfo = SplitNameCustomerInfo | NameCustomerInfo;
1351
1356
  /** Coinflow Types **/
1352
1357
  type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad' | 'tempo' | 'user';
1353
- type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
1358
+ type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
1354
1359
  interface CoinflowTypes {
1355
1360
  merchantId: string;
1356
1361
  env?: CoinflowEnvs;
@@ -1408,6 +1413,12 @@ interface AccountNotLinkedInfo {
1408
1413
  reason: AccountNotLinkedReason;
1409
1414
  }
1410
1415
  type OnAccountNotLinkedMethod = (info: AccountNotLinkedInfo) => void;
1416
+ interface AccountLinkErrorInfo {
1417
+ type: AccountLinkedType;
1418
+ message: string;
1419
+ status?: number;
1420
+ }
1421
+ type OnAccountLinkErrorMethod = (info: AccountLinkErrorInfo) => void;
1411
1422
  /** Wallets **/
1412
1423
  interface SolanaWallet {
1413
1424
  publicKey: PublicKey | null;
@@ -1687,6 +1698,9 @@ interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
1687
1698
  nativeSolToConvert?: {
1688
1699
  lamports: string | number;
1689
1700
  };
1701
+ /**
1702
+ * @deprecated No longer has any effect. Credits payments are always captured once the credits are delivered.
1703
+ */
1690
1704
  redemptionCheck?: boolean;
1691
1705
  }
1692
1706
  interface CoinflowSessionKeyPurchaseProps extends CoinflowCommonPurchaseProps {
@@ -1725,6 +1739,7 @@ type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPur
1725
1739
  /** Withdraw **/
1726
1740
  interface CoinflowCommonWithdrawProps extends CoinflowTypes {
1727
1741
  onSuccess?: OnSuccessMethod;
1742
+ onAccountLinkError?: OnAccountLinkErrorMethod;
1728
1743
  tokens?: string[];
1729
1744
  lockDefaultToken?: boolean;
1730
1745
  amount?: number;
@@ -1952,8 +1967,14 @@ interface CoinflowBankLinkProps extends Pick<CoinflowTypes, 'merchantId' | 'env'
1952
1967
  * own UI.
1953
1968
  */
1954
1969
  onAccountNotLinked?: OnAccountNotLinkedMethod | undefined;
1970
+ /**
1971
+ * Called when a link attempt fails, with the error that caused it. The
1972
+ * component stays on the failure screen, so this is where you surface the
1973
+ * reason or log it for support.
1974
+ */
1975
+ onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
1955
1976
  }
1956
- interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'useNativeSubtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'amount' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
1977
+ interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'useNativeSubtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'amount' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'>, WithGeo {
1957
1978
  walletPubkey: string | null | undefined;
1958
1979
  sessionKey?: string;
1959
1980
  route: string;
@@ -2067,7 +2088,7 @@ declare class CoinflowUtils {
2067
2088
  env?: CoinflowEnvs;
2068
2089
  }): boolean;
2069
2090
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
2070
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, useNativeSubtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, amount, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, appReturnUrl, depositAmounts, ownerOverride, bridgeId, bankLinkOnly, baseUrl, }: CoinflowIFrameProps & {
2091
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, useNativeSubtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, amount, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, appReturnUrl, depositAmounts, ownerOverride, bridgeId, bankLinkOnly, baseUrl, }: CoinflowIFrameProps & {
2071
2092
  baseUrl?: string;
2072
2093
  } & WithGeo): string;
2073
2094
  static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
@@ -2125,6 +2146,10 @@ interface IFrameMessageHandlers {
2125
2146
  */
2126
2147
  onAccountLinked?: OnAccountLinkedMethod | undefined;
2127
2148
  onAccountNotLinked?: OnAccountNotLinkedMethod | undefined;
2149
+ /**
2150
+ * Called when an account link attempt fails, with the error that caused it.
2151
+ */
2152
+ onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
2128
2153
  /**
2129
2154
  * Called when the iframe opens/closes an in-page overlay (e.g. the PayPal
2130
2155
  * approval modal). `state` is 'open' or 'close'.
@@ -2143,6 +2168,7 @@ declare enum IFrameMessageMethods {
2143
2168
  Loaded = "loaded",
2144
2169
  AccountLinked = "accountLinked",
2145
2170
  AccountNotLinked = "accountNotLinked",
2171
+ AccountLinkError = "accountLinkError",
2146
2172
  Redirect = "redirect",
2147
2173
  Overlay = "overlay",
2148
2174
  UpdateSubtotal = "updateSubtotal"
@@ -2152,6 +2178,7 @@ declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessage
2152
2178
  declare function getHandlers(props: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain' | 'onSuccess' | 'onAuthDeclined' | 'onInputError' | 'onInputValid'> & {
2153
2179
  onAccountLinked?: OnAccountLinkedMethod | undefined;
2154
2180
  onAccountNotLinked?: OnAccountNotLinkedMethod | undefined;
2181
+ onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
2155
2182
  }): Omit<IFrameMessageHandlers, 'handleHeightChange'>;
2156
2183
 
2157
2184
  type EventBusCallback = (event: Event) => void;
@@ -2654,4 +2681,4 @@ type WithOnLoad = {
2654
2681
  };
2655
2682
 
2656
2683
  export { BANK_LINK_REVEAL_DELAY_MS, BANK_LINK_STATUS_PARAM, BankingCurrencies, CARD_ENTRY_BORDER_PX, CARD_ENTRY_DIVIDER_PX, CARD_ENTRY_MARGIN_PX, CARD_ENTRY_MIN_WIDTHS, CARD_ENTRY_ROW_HEIGHT, CARD_ENTRY_ROW_HEIGHT_PX, CARD_ENTRY_SLOT_GAP_PX, CARD_FIELD_ERROR_MESSAGES, CARD_TYPE_MAPPING, COMPACT_SKELETON_HEIGHT_PX, 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, INLINE_SKELETON_HEIGHT_PX, MerchantStyle, PaymentMethods, REFERRER_HEADER, RN_REDIRECT_MESSAGE_NAME, SESSION_ID_HEADER, SKELETON_BOX_STYLE, SKELETON_FADE_MS, SKELETON_LAYOUTS, SKELETON_PULSE_ANIMATION_NAME, SKELETON_ROOT_PADDING_PX, SettlementType, ThreeDsChallengePreference, TokenExCardNumberIframeId, TokenExCvvContainerID, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, awaitForterToken, bankLinkCallbackParams, buildCardEntryGridCss, buildCardEntryLayout, buildSkeletonCss, canReuseLinkToken, captureForterToken, doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, getCardFieldInputEvents, getCardFieldValidationError, getCoinflowProtectionHeaders, getCoinflowPurchaseHeaders, getCurrencyDecimals, getCustomerName, getForterToken, getHandlers, getIframeConfig, getSkeletonColors, getSkeletonGridClass, getSkeletonGridTemplate, getWalletPubkey, guessSkeletonHeightPx, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, parseCachedLinkToken, paymentMethodLabels, productType, recordFrontendError, resolveBankLinkCompletion, serializeCachedLinkToken, setTokenExScriptTag, shouldStackSkeleton };
2657
- export type { AccountFundingTransaction, AccountLinkedInfo, AccountLinkedType, AccountNotLinkedInfo, AccountNotLinkedReason, AnyObject, ArbitrumWalletProps, AuthDeclinedWalletCallInfo, BankLinkCompletion, BankLinkStatus, BankingCurrency, BaseWalletProps, CachedLinkToken, CardEntryConfig, CardEntryDivider, CardEntryInputName, CardEntryLayout, CardFieldInputEvent, CardFormArgs, CardFormInputStyles, CardFormTokenResponse, CardFormVariant, Cart, CartClassOmitted, CartItem, CartItemClassOmitted, Cents, ChargebackProtectionData, ChargebackProtectionItem, CoinflowArbitrumHistoryProps, CoinflowArbitrumPurchaseProps, CoinflowArbitrumWithdrawProps, CoinflowBankLinkProps, 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, FlightTicketCartItem, FlightUpgradeCartItem, FullName, GetIFrameConfigArgs, GiftCardCartItem, IFrameMessageHandlers, InputErrorWalletCallInfo, InputValidWalletCallInfo, KnownTokenIdRedeem, LamportsAmount, LodgingCartItem, MerchantIdOrCheckoutJwt, MerchantTheme, MergeWithOptionalDiff, MonadWalletProps, NameCustomerInfo, NftCartItemClassOmitted, NormalRedeem, OnAccountLinkedMethod, OnAccountNotLinkedMethod, OnAuthDeclinedMethod, OnInputErrorMethod, OnInputValidMethod, OnSuccessMethod, PartialBy, PolygonWalletProps, PurchaseCustomPayInFee, RecipientAftInfo, RemainingLimit, ReturnedTokenIdRedeem, SafeMintRedeem, SkeletonColors, SkeletonLayout, SolanaWallet, SolanaWalletProps, SplitNameCustomerInfo, StellarWallet, StellarWalletProps, Subtotal, TempoWalletProps, TokenExIFrameConfiguration, TokenExIframe, TokenRedeem, TokenSubtotal, TokenizationResponse, TravelCartItem, TravelFirstFlight, TravelLodging, TravelLodgingHotel, TravelTrip, TypedCurrencyCents, VersionDetail, WalletCall, WalletTypes, WithGeo, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };
2684
+ export type { AccountFundingTransaction, AccountLinkErrorInfo, AccountLinkedInfo, AccountLinkedType, AccountNotLinkedInfo, AccountNotLinkedReason, AnyObject, ArbitrumWalletProps, AuthDeclinedWalletCallInfo, BankLinkCompletion, BankLinkStatus, BankingCurrency, BaseWalletProps, CachedLinkToken, CardEntryConfig, CardEntryDivider, CardEntryInputName, CardEntryLayout, CardFieldInputEvent, CardFormArgs, CardFormInputStyles, CardFormTokenResponse, CardFormVariant, Cart, CartClassOmitted, CartItem, CartItemClassOmitted, Cents, ChargebackProtectionData, ChargebackProtectionItem, CoinflowArbitrumHistoryProps, CoinflowArbitrumPurchaseProps, CoinflowArbitrumWithdrawProps, CoinflowBankLinkProps, 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, FlightTicketCartItem, FlightUpgradeCartItem, FullName, GetIFrameConfigArgs, GiftCardCartItem, IFrameMessageHandlers, InputErrorWalletCallInfo, InputValidWalletCallInfo, KnownTokenIdRedeem, LamportsAmount, LodgingCartItem, MerchantIdOrCheckoutJwt, MerchantTheme, MergeWithOptionalDiff, MonadWalletProps, NameCustomerInfo, NftCartItemClassOmitted, NormalRedeem, OnAccountLinkErrorMethod, OnAccountLinkedMethod, OnAccountNotLinkedMethod, OnAuthDeclinedMethod, OnInputErrorMethod, OnInputValidMethod, OnSuccessMethod, PartialBy, PolygonWalletProps, PurchaseCustomPayInFee, RecipientAftInfo, RemainingLimit, ReturnedTokenIdRedeem, SafeMintRedeem, SkeletonColors, SkeletonLayout, SolanaWallet, SolanaWalletProps, SplitNameCustomerInfo, StellarWallet, StellarWalletProps, Subtotal, TempoWalletProps, TokenExIFrameConfiguration, TokenExIframe, TokenRedeem, TokenSubtotal, TokenizationResponse, TravelCartItem, TravelFirstFlight, TravelLodging, TravelLodgingHotel, TravelTrip, TypedCurrencyCents, VersionDetail, WalletCall, WalletTypes, WithGeo, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };