@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/README.md
CHANGED
|
@@ -4,6 +4,11 @@ This library was generated with [Angular CLI](https://github.com/angular/angular
|
|
|
4
4
|
|
|
5
5
|
# Changelog
|
|
6
6
|
|
|
7
|
+
## 3.0.0
|
|
8
|
+
|
|
9
|
+
- **Breaking:** Remove Stellar support: `blockchain: 'stellar'` and the `StellarWallet`, `CoinflowStellarPurchaseProps` and `CoinflowStellarHistoryProps` types. Coinflow no longer processes Stellar payments.
|
|
10
|
+
- Deprecate the `type: 'returned'` EVM redeem. The API now rejects it; use `SafeMintRedeem`, `KnownTokenIdRedeem` or `NormalRedeem`.
|
|
11
|
+
|
|
7
12
|
## 2.0.0
|
|
8
13
|
|
|
9
14
|
- **Breaking:** Removed the deprecated legacy card form components: `CoinflowCardNumberInput` (`lib-coinflow-card-number-input`), `CoinflowCardNumberOnlyInput` (`lib-coinflow-card-number-only-input`), `CoinflowCvvInputComponent` (`lib-coinflow-cvv-input`) and `CoinflowCvvOnlyInputComponent` (`lib-coinflow-cvv-only-input`). Use `CoinflowCardFormV2` instead.
|
|
@@ -115,6 +115,11 @@ var CardType;
|
|
|
115
115
|
CardType["DISCOVER"] = "DISC";
|
|
116
116
|
})(CardType || (CardType = {}));
|
|
117
117
|
const RN_REDIRECT_MESSAGE_NAME = 'rnredirect'; // DO NOT CHANGE
|
|
118
|
+
var RedirectFlow;
|
|
119
|
+
(function (RedirectFlow) {
|
|
120
|
+
RedirectFlow["Venmo"] = "venmo";
|
|
121
|
+
RedirectFlow["Plaid"] = "plaid";
|
|
122
|
+
})(RedirectFlow || (RedirectFlow = {}));
|
|
118
123
|
|
|
119
124
|
// This works in angular, but not react
|
|
120
125
|
// let web3: typeof import('@solana/web3.js') | undefined;
|
|
@@ -589,7 +594,7 @@ class CoinflowUtils {
|
|
|
589
594
|
return 'http://localhost:5000';
|
|
590
595
|
return `https://api-${env}.coinflow.cash`;
|
|
591
596
|
}
|
|
592
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, useNativeSubtotal, presentment, transaction, blockchain = 'solana', 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, }) {
|
|
597
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, useNativeSubtotal, presentment, inlineCryptoCheckout, transaction, blockchain = 'solana', 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, }) {
|
|
593
598
|
const prefix = routePrefix
|
|
594
599
|
? `/${routePrefix}/${blockchain}`
|
|
595
600
|
: `/${blockchain}`;
|
|
@@ -624,6 +629,8 @@ class CoinflowUtils {
|
|
|
624
629
|
url.searchParams.append('bridgeId', bridgeId);
|
|
625
630
|
if (presentment)
|
|
626
631
|
url.searchParams.append('presentment', presentment);
|
|
632
|
+
if (inlineCryptoCheckout !== undefined)
|
|
633
|
+
url.searchParams.append('inlineCryptoCheckout', String(inlineCryptoCheckout));
|
|
627
634
|
if (webhookInfo) {
|
|
628
635
|
url.searchParams.append('webhookInfo', LZString.compressToEncodedURIComponent(JSON.stringify(webhookInfo)));
|
|
629
636
|
}
|
|
@@ -759,6 +766,11 @@ class CoinflowUtils {
|
|
|
759
766
|
}
|
|
760
767
|
return url.toString();
|
|
761
768
|
}
|
|
769
|
+
static getPurchaseRoute({ merchantId, checkoutVersion, }) {
|
|
770
|
+
if (checkoutVersion === 'v3')
|
|
771
|
+
return { route: `/purchase/${merchantId}`, routePrefix: 'v3' };
|
|
772
|
+
return { route: `/purchase-v2/${merchantId}` };
|
|
773
|
+
}
|
|
762
774
|
static getTransaction(props) {
|
|
763
775
|
if (!props.blockchain)
|
|
764
776
|
return undefined;
|
|
@@ -892,6 +904,15 @@ var IFrameMessageMethods;
|
|
|
892
904
|
IFrameMessageMethods["Overlay"] = "overlay";
|
|
893
905
|
IFrameMessageMethods["UpdateSubtotal"] = "updateSubtotal";
|
|
894
906
|
})(IFrameMessageMethods || (IFrameMessageMethods = {}));
|
|
907
|
+
var HostMessageMethods;
|
|
908
|
+
(function (HostMessageMethods) {
|
|
909
|
+
HostMessageMethods["OverlayOffset"] = "overlayOffset";
|
|
910
|
+
})(HostMessageMethods || (HostMessageMethods = {}));
|
|
911
|
+
var OverlayState;
|
|
912
|
+
(function (OverlayState) {
|
|
913
|
+
OverlayState["Open"] = "open";
|
|
914
|
+
OverlayState["Close"] = "close";
|
|
915
|
+
})(OverlayState || (OverlayState = {}));
|
|
895
916
|
function getWalletPubkey(input) {
|
|
896
917
|
let wallet;
|
|
897
918
|
if ('signer' in input &&
|
|
@@ -2079,7 +2100,7 @@ class CoinflowPurchaseComponent {
|
|
|
2079
2100
|
this.iframeProps = {
|
|
2080
2101
|
...this.purchaseProps,
|
|
2081
2102
|
walletPubkey,
|
|
2082
|
-
|
|
2103
|
+
...CoinflowUtils.getPurchaseRoute(this.purchaseProps),
|
|
2083
2104
|
transaction: CoinflowUtils.getTransaction(this.purchaseProps),
|
|
2084
2105
|
handleHeightChangeId,
|
|
2085
2106
|
};
|
|
@@ -2847,5 +2868,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2847
2868
|
* Generated bundle index. Do not edit.
|
|
2848
2869
|
*/
|
|
2849
2870
|
|
|
2850
|
-
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, recordFrontendError, resolveBankLinkCompletion, serializeCachedLinkToken, shouldStackSkeleton };
|
|
2871
|
+
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, recordFrontendError, resolveBankLinkCompletion, serializeCachedLinkToken, shouldStackSkeleton };
|
|
2851
2872
|
//# sourceMappingURL=coinflowlabs-angular.mjs.map
|