@coinflowlabs/angular 2.0.1-0 → 3.0.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": "2.0.1-0",
3
+ "version": "3.0.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.17",
6
6
  "@angular/core": "^19.2.17",
@@ -1585,12 +1585,16 @@ interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockcha
1585
1585
  }
1586
1586
  interface CoinflowCommonPurchaseProps extends CoinflowTypes {
1587
1587
  subtotal?: Subtotal;
1588
+ /** @hidden */
1589
+ checkoutVersion?: 'v2' | 'v3';
1588
1590
  /**
1589
1591
  * When true, the Apple Pay button skips the totals (fee quote) fetch and
1590
1592
  * charges exactly the `subtotal` passed to the component.
1591
1593
  */
1592
1594
  useNativeSubtotal?: boolean;
1593
1595
  presentment?: Currency;
1596
+ /** @hidden */
1597
+ inlineCryptoCheckout?: boolean;
1594
1598
  onSuccess?: OnSuccessMethod;
1595
1599
  sessionKey?: string;
1596
1600
  onAuthDeclined?: OnAuthDeclinedMethod;
@@ -1886,9 +1890,7 @@ interface SafeMintRedeem extends NormalRedeem {
1886
1890
  nftContract?: string;
1887
1891
  }
1888
1892
  /**
1889
- * (EVM only) If your contract returns the NFT ID, then utilize this object.
1890
- *
1891
- * The contract mints the NFT to msg.sender (which is the Coinflow contract), the Coinflow contract picks up the returned NFT ID, and fwd's the NFT to the end user's wallet.
1893
+ * @deprecated No longer supported: requests with `type: 'returned'` are rejected with a 400. Use {@link SafeMintRedeem}, {@link KnownTokenIdRedeem} or {@link NormalRedeem} instead.
1892
1894
  */
1893
1895
  interface ReturnedTokenIdRedeem extends NormalRedeem {
1894
1896
  type: 'returned';
@@ -1968,7 +1970,7 @@ interface CoinflowBankLinkProps extends Pick<CoinflowTypes, 'merchantId' | 'env'
1968
1970
  */
1969
1971
  onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
1970
1972
  }
1971
- interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'useNativeSubtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'allowedPaymentMethods' | 'allowedCardFunding' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'amount' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'>, WithGeo {
1973
+ interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'useNativeSubtotal' | 'presentment' | 'inlineCryptoCheckout' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'allowedPaymentMethods' | 'allowedCardFunding' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'amount' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'>, WithGeo {
1972
1974
  walletPubkey: string | null | undefined;
1973
1975
  sessionKey?: string;
1974
1976
  route: string;
@@ -2068,6 +2070,10 @@ interface RecipientAftInfo {
2068
2070
  documentReference?: string;
2069
2071
  }
2070
2072
  declare const RN_REDIRECT_MESSAGE_NAME = "rnredirect";
2073
+ declare enum RedirectFlow {
2074
+ Venmo = "venmo",
2075
+ Plaid = "plaid"
2076
+ }
2071
2077
 
2072
2078
  declare class CoinflowUtils {
2073
2079
  env: CoinflowEnvs;
@@ -2082,12 +2088,13 @@ declare class CoinflowUtils {
2082
2088
  env?: CoinflowEnvs;
2083
2089
  }): boolean;
2084
2090
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
2085
- 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, allowedCardFunding, accountFundingTransaction, partialUsdcChecked, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, appReturnUrl, depositAmounts, ownerOverride, bridgeId, bankLinkOnly, baseUrl, }: CoinflowIFrameProps & {
2091
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, useNativeSubtotal, presentment, inlineCryptoCheckout, 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, allowedCardFunding, accountFundingTransaction, partialUsdcChecked, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, appReturnUrl, depositAmounts, ownerOverride, bridgeId, bankLinkOnly, baseUrl, }: CoinflowIFrameProps & {
2086
2092
  baseUrl?: string;
2087
2093
  } & WithGeo): string;
2088
2094
  static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
2089
2095
  baseUrl?: string;
2090
2096
  }): string;
2097
+ static getPurchaseRoute({ merchantId, checkoutVersion, }: Pick<CoinflowPurchaseProps, 'merchantId' | 'checkoutVersion'>): Pick<CoinflowIFrameProps, 'route' | 'routePrefix'>;
2091
2098
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
2092
2099
  static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
2093
2100
  solana: T;
@@ -2145,9 +2152,9 @@ interface IFrameMessageHandlers {
2145
2152
  onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
2146
2153
  /**
2147
2154
  * Called when the iframe opens/closes an in-page overlay (e.g. the PayPal
2148
- * approval modal). `state` is 'open' or 'close'.
2155
+ * approval modal).
2149
2156
  */
2150
- handleOverlay?: (state: string) => void;
2157
+ handleOverlay?: (state: OverlayState) => void;
2151
2158
  }
2152
2159
  declare enum IFrameMessageMethods {
2153
2160
  SignMessage = "signMessage",
@@ -2166,6 +2173,13 @@ declare enum IFrameMessageMethods {
2166
2173
  Overlay = "overlay",
2167
2174
  UpdateSubtotal = "updateSubtotal"
2168
2175
  }
2176
+ declare enum HostMessageMethods {
2177
+ OverlayOffset = "overlayOffset"
2178
+ }
2179
+ declare enum OverlayState {
2180
+ Open = "open",
2181
+ Close = "close"
2182
+ }
2169
2183
  declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
2170
2184
  declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
2171
2185
  declare function getHandlers(props: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain' | 'onSuccess' | 'onAuthDeclined' | 'onInputError' | 'onInputValid'> & {
@@ -2612,5 +2626,5 @@ type WithOnLoad = {
2612
2626
  onLoad?: () => void | Promise<void>;
2613
2627
  };
2614
2628
 
2615
- 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, COMPACT_SKELETON_HEIGHT_PX, CardFunding, CardType, ChargebackProtectionAccountType, CoinflowApplePayButtonComponent, CoinflowCardForm, CoinflowCardFormV2, CoinflowFraudProtectionHeader, 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, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, awaitForterToken, bankLinkCallbackParams, buildCardEntryGridCss, buildCardEntryLayout, buildSkeletonCss, canReuseLinkToken, captureForterToken, getCardFieldInputEvents, getCardFieldValidationError, getCoinflowProtectionHeaders, getCoinflowPurchaseHeaders, getCurrencyDecimals, getCustomerName, getForterToken, getHandlers, getSkeletonColors, getSkeletonGridClass, getSkeletonGridTemplate, getWalletPubkey, guessSkeletonHeightPx, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, parseCachedLinkToken, paymentMethodLabels, productType, recordFrontendError, resolveBankLinkCompletion, serializeCachedLinkToken, shouldStackSkeleton };
2629
+ 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, COMPACT_SKELETON_HEIGHT_PX, CardFunding, CardType, ChargebackProtectionAccountType, CoinflowApplePayButtonComponent, CoinflowCardForm, CoinflowCardFormV2, CoinflowFraudProtectionHeader, CoinflowGooglePayButtonComponent, CoinflowIFrameComponent, CoinflowPurchaseComponent, CoinflowPurchaseHistoryComponent, CoinflowPurchaseProtectionComponent, CoinflowUtils, CoinflowWithdrawComponent, CoinflowWithdrawHistoryComponent, Currency, CurrencyToISO4217, DEVICE_ID_HEADER, EventBus, FORTER_TOKEN_HEADER, HostMessageMethods, IFrameMessageMethods, INLINE_SKELETON_HEIGHT_PX, MerchantStyle, OverlayState, PaymentMethods, REFERRER_HEADER, RN_REDIRECT_MESSAGE_NAME, RedirectFlow, SESSION_ID_HEADER, SKELETON_BOX_STYLE, SKELETON_FADE_MS, SKELETON_LAYOUTS, SKELETON_PULSE_ANIMATION_NAME, SKELETON_ROOT_PADDING_PX, SettlementType, ThreeDsChallengePreference, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, awaitForterToken, bankLinkCallbackParams, buildCardEntryGridCss, buildCardEntryLayout, buildSkeletonCss, canReuseLinkToken, captureForterToken, getCardFieldInputEvents, getCardFieldValidationError, getCoinflowProtectionHeaders, getCoinflowPurchaseHeaders, getCurrencyDecimals, getCustomerName, getForterToken, getHandlers, getSkeletonColors, getSkeletonGridClass, getSkeletonGridTemplate, getWalletPubkey, guessSkeletonHeightPx, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, parseCachedLinkToken, paymentMethodLabels, productType, recordFrontendError, resolveBankLinkCompletion, serializeCachedLinkToken, shouldStackSkeleton };
2616
2630
  export type { AccountFundingTransaction, AccountLinkErrorInfo, AccountLinkedInfo, AccountLinkedType, AccountNotLinkedInfo, AccountNotLinkedReason, AnyObject, ArbitrumWalletProps, AuthDeclinedWalletCallInfo, BankLinkCompletion, BankLinkStatus, BankingCurrency, BaseWalletProps, CachedLinkToken, CardEntryConfig, CardEntryDivider, CardEntryInputName, CardEntryLayout, CardFieldInputEvent, CardFormArgs, CardFormTokenResponse, CardFormVariant, Cart, CartClassOmitted, CartItem, CartItemClassOmitted, Cents, ChargebackProtectionData, ChargebackProtectionItem, CoinflowArbitrumHistoryProps, CoinflowArbitrumPurchaseProps, CoinflowArbitrumWithdrawProps, CoinflowBankLinkProps, CoinflowBaseHistoryProps, CoinflowBasePurchaseProps, CoinflowBaseWithdrawProps, CoinflowBlockchain, CoinflowCommonPaymentIntentProps, CoinflowCommonPurchaseProps, CoinflowCommonWithdrawProps, CoinflowEnvs, CoinflowEthHistoryProps, CoinflowEthPurchaseProps, CoinflowEthWithdrawProps, CoinflowEvmHistoryProps, CoinflowEvmPurchaseProps, CoinflowFraudProtectionTokens, CoinflowHistoryProps, CoinflowIFrameProps, CoinflowIntentsIFrameProps, CoinflowMonadHistoryProps, CoinflowMonadPurchaseProps, CoinflowMonadWithdrawProps, CoinflowPolygonHistoryProps, CoinflowPolygonPurchaseProps, CoinflowPolygonWithdrawProps, CoinflowProtectionHeadersType, CoinflowPurchaseHeadersType, CoinflowPurchaseProps, CoinflowSessionKeyHistoryProps, CoinflowSessionKeyPurchaseProps, CoinflowSolanaHistoryProps, CoinflowSolanaPurchaseProps, CoinflowSolanaWithdrawProps, CoinflowTempoHistoryProps, CoinflowTempoPurchaseProps, CoinflowTempoWithdrawProps, CoinflowTypes, CoinflowWithdrawProps, CommonEvmRedeem, CryptoCartItem, CurrencyCents, CustomerInfo, DecentRedeem, EthWallet, EthWalletProps, EventBusCallback, EvmTransactionData, ExchangeRate, FlightTicketCartItem, FlightUpgradeCartItem, FullName, GiftCardCartItem, IFrameMessageHandlers, InputErrorWalletCallInfo, InputValidWalletCallInfo, KnownTokenIdRedeem, L2L3Data, L2L3Item, L2L3Level2, L2L3Level3, L2L3Tax, 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, Subtotal, TempoWalletProps, TokenRedeem, TokenSubtotal, TravelCartItem, TravelFirstFlight, TravelLodging, TravelLodgingHotel, TravelTrip, TypedCurrencyCents, WalletCall, WalletTypes, WithGeo, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };