@coinflowlabs/angular 1.8.0 → 1.9.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.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.2.17",
|
|
6
6
|
"@angular/core": "^19.2.17",
|
|
@@ -29,5 +29,6 @@
|
|
|
29
29
|
"types": "./types/coinflowlabs-angular.d.ts",
|
|
30
30
|
"default": "./fesm2022/coinflowlabs-angular.mjs"
|
|
31
31
|
}
|
|
32
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"type": "module"
|
|
33
34
|
}
|
|
@@ -2,6 +2,7 @@ import { PublicKey, Transaction, VersionedTransaction, Signer, Connection } from
|
|
|
2
2
|
import { Properties } from 'csstype';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { EventEmitter, ElementRef, OnDestroy, SimpleChanges, OnInit } from '@angular/core';
|
|
5
|
+
import * as _coinflowlabs_angular from '@coinflowlabs/angular';
|
|
5
6
|
import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
|
|
6
7
|
|
|
7
8
|
declare enum Currency {
|
|
@@ -670,7 +671,8 @@ interface MoneyTopUpCartItem {
|
|
|
670
671
|
|
|
671
672
|
declare enum WithdrawCategory {
|
|
672
673
|
USER = "user",
|
|
673
|
-
BUSINESS = "business"
|
|
674
|
+
BUSINESS = "business",
|
|
675
|
+
FIRST_PARTY = "firstParty"
|
|
674
676
|
}
|
|
675
677
|
declare enum WithdrawSpeed {
|
|
676
678
|
ASAP = "asap",
|
|
@@ -995,6 +997,19 @@ interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
995
997
|
destinationAuthKey?: string;
|
|
996
998
|
accountFundingTransaction?: AccountFundingTransaction;
|
|
997
999
|
}
|
|
1000
|
+
interface WithGeo {
|
|
1001
|
+
/**
|
|
1002
|
+
* End-user GPS coordinates for `BlockingRuleMethod.GEOLOCATION` enforcement.
|
|
1003
|
+
* Required only when the merchant has a geolocation rule configured. The
|
|
1004
|
+
* web build reads the browser Geolocation API directly; React Native hosts
|
|
1005
|
+
* must request the fix from the platform (e.g. `expo-location`,
|
|
1006
|
+
* `react-native-geolocation`) and forward the result here.
|
|
1007
|
+
*/
|
|
1008
|
+
userLocation?: {
|
|
1009
|
+
lat: number;
|
|
1010
|
+
lng: number;
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
998
1013
|
/**
|
|
999
1014
|
* Used for Account Funding Transactions
|
|
1000
1015
|
*/
|
|
@@ -1084,6 +1099,17 @@ interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
|
1084
1099
|
* Array of allowed withdrawal speeds. If not provided, all speeds are allowed.
|
|
1085
1100
|
*/
|
|
1086
1101
|
allowedWithdrawSpeeds?: WithdrawSpeed[];
|
|
1102
|
+
/**
|
|
1103
|
+
* End-user GPS coordinates for `BlockingRuleMethod.GEOLOCATION` enforcement.
|
|
1104
|
+
* Required only when the merchant has a geolocation rule configured. The
|
|
1105
|
+
* web build reads the browser Geolocation API directly; React Native hosts
|
|
1106
|
+
* must request the fix from the platform (e.g. `expo-location`,
|
|
1107
|
+
* `react-native-geolocation`) and forward the result here.
|
|
1108
|
+
*/
|
|
1109
|
+
userLocation?: {
|
|
1110
|
+
lat: number;
|
|
1111
|
+
lng: number;
|
|
1112
|
+
};
|
|
1087
1113
|
}
|
|
1088
1114
|
type WalletTypes = SolanaWallet | EthWallet | StellarWallet;
|
|
1089
1115
|
interface SolanaWalletProps {
|
|
@@ -1240,7 +1266,7 @@ interface DecentRedeem extends CommonEvmRedeem {
|
|
|
1240
1266
|
* 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.
|
|
1241
1267
|
*/
|
|
1242
1268
|
type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
|
|
1243
|
-
interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'customPayInFees' | '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'
|
|
1269
|
+
interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'customPayInFees' | '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 {
|
|
1244
1270
|
walletPubkey: string | null | undefined;
|
|
1245
1271
|
sessionKey?: string;
|
|
1246
1272
|
route: string;
|
|
@@ -1312,9 +1338,9 @@ declare class CoinflowUtils {
|
|
|
1312
1338
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
1313
1339
|
static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
|
|
1314
1340
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
1315
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, customPayInFees, 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, baseUrl, }: CoinflowIFrameProps & {
|
|
1341
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, customPayInFees, 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 & {
|
|
1316
1342
|
baseUrl?: string;
|
|
1317
|
-
}): string;
|
|
1343
|
+
} & WithGeo): string;
|
|
1318
1344
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
1319
1345
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
1320
1346
|
solana: T;
|
|
@@ -1489,11 +1515,16 @@ declare function doInitializeTokenExCardOnlyIframe(args: DoInitializeTokenExIfra
|
|
|
1489
1515
|
|
|
1490
1516
|
declare const DEVICE_ID_HEADER = "x-device-id";
|
|
1491
1517
|
declare const SESSION_ID_HEADER = "x-session-id";
|
|
1518
|
+
declare const REFERRER_HEADER = "x-coinflow-referrer";
|
|
1492
1519
|
type CoinflowProtectionHeadersType = {
|
|
1493
1520
|
[DEVICE_ID_HEADER]: string | null;
|
|
1494
1521
|
[SESSION_ID_HEADER]: string | null;
|
|
1495
1522
|
};
|
|
1496
1523
|
declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
|
|
1524
|
+
type CoinflowPurchaseHeadersType = CoinflowProtectionHeadersType & {
|
|
1525
|
+
[REFERRER_HEADER]: string | null;
|
|
1526
|
+
};
|
|
1527
|
+
declare function getCoinflowPurchaseHeaders(): CoinflowPurchaseHeadersType;
|
|
1497
1528
|
|
|
1498
1529
|
declare function initCoinflowProtection({ coinflowEnv, merchantId, }: {
|
|
1499
1530
|
coinflowEnv: CoinflowEnvs;
|
|
@@ -1561,7 +1592,7 @@ declare class CoinflowCardNumberInput implements OnDestroy {
|
|
|
1561
1592
|
reinitialize(): void;
|
|
1562
1593
|
ngOnInit(): void;
|
|
1563
1594
|
ngOnDestroy(): void;
|
|
1564
|
-
tokenize(): Promise<TokenizationResponse>;
|
|
1595
|
+
tokenize(): Promise<_coinflowlabs_angular.TokenizationResponse>;
|
|
1565
1596
|
protected readonly TokenExCardNumberIframeId = "tokenExCardNumber";
|
|
1566
1597
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowCardNumberInput, never>;
|
|
1567
1598
|
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowCardNumberInput, "lib-coinflow-card-number-input", never, { "args": { "alias": "args"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -1576,7 +1607,7 @@ declare class CoinflowCardNumberOnlyInput implements OnDestroy {
|
|
|
1576
1607
|
reinitialize(): void;
|
|
1577
1608
|
ngOnInit(): void;
|
|
1578
1609
|
ngOnDestroy(): void;
|
|
1579
|
-
tokenize(): Promise<TokenizationResponse>;
|
|
1610
|
+
tokenize(): Promise<_coinflowlabs_angular.TokenizationResponse>;
|
|
1580
1611
|
protected readonly TokenExCardNumberIframeId = "tokenExCardNumber";
|
|
1581
1612
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowCardNumberOnlyInput, never>;
|
|
1582
1613
|
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowCardNumberOnlyInput, "lib-coinflow-card-number-only-input", never, { "args": { "alias": "args"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -1599,7 +1630,7 @@ declare class CoinflowCvvOnlyInputComponent implements OnDestroy {
|
|
|
1599
1630
|
reinitialize(): void;
|
|
1600
1631
|
ngOnInit(): void;
|
|
1601
1632
|
ngOnDestroy(): void;
|
|
1602
|
-
tokenize(): Promise<TokenizationResponse>;
|
|
1633
|
+
tokenize(): Promise<_coinflowlabs_angular.TokenizationResponse>;
|
|
1603
1634
|
protected readonly TokenExCvvContainerID = "tokenExCardCvv";
|
|
1604
1635
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoinflowCvvOnlyInputComponent, never>;
|
|
1605
1636
|
static ɵcmp: i0.ɵɵComponentDeclaration<CoinflowCvvOnlyInputComponent, "lib-coinflow-cvv-only-input", never, { "args": { "alias": "args"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -1658,5 +1689,5 @@ type WithOnLoad = {
|
|
|
1658
1689
|
onLoad?: () => void | Promise<void>;
|
|
1659
1690
|
};
|
|
1660
1691
|
|
|
1661
|
-
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, RN_REDIRECT_MESSAGE_NAME, SESSION_ID_HEADER, SettlementType, ThreeDsChallengePreference, TokenExCardNumberIframeId, TokenExCvvContainerID, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, getCoinflowProtectionHeaders, getCurrencyDecimals, getCustomerName, getHandlers, getIframeConfig, getWalletPubkey, handleIFrameMessage, initCoinflowProtection, invertRate, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, paymentMethodLabels, productType, recordFrontendError, setTokenExScriptTag };
|
|
1662
|
-
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, CoinflowCommonPurchaseProps, CoinflowCommonWithdrawProps, CoinflowCvvOnlyInputProps, CoinflowEnvs, CoinflowEthHistoryProps, CoinflowEthPurchaseProps, CoinflowEthWithdrawProps, CoinflowEvmHistoryProps, CoinflowEvmPurchaseProps, CoinflowHistoryProps, CoinflowIFrameProps, CoinflowMonadHistoryProps, CoinflowMonadPurchaseProps, CoinflowMonadWithdrawProps, CoinflowPolygonHistoryProps, CoinflowPolygonPurchaseProps, CoinflowPolygonWithdrawProps, CoinflowProtectionHeadersType, 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, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };
|
|
1692
|
+
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 };
|
|
1693
|
+
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, CoinflowCommonPurchaseProps, CoinflowCommonWithdrawProps, CoinflowCvvOnlyInputProps, CoinflowEnvs, CoinflowEthHistoryProps, CoinflowEthPurchaseProps, CoinflowEthWithdrawProps, CoinflowEvmHistoryProps, CoinflowEvmPurchaseProps, CoinflowHistoryProps, CoinflowIFrameProps, 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 };
|