@coinflowlabs/angular 1.9.0 → 1.10.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
|
@@ -2,8 +2,8 @@ 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';
|
|
6
5
|
import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
|
|
6
|
+
import * as _coinflowlabs_angular from '@coinflowlabs/angular';
|
|
7
7
|
|
|
8
8
|
declare enum Currency {
|
|
9
9
|
USD = "USD",
|
|
@@ -694,7 +694,7 @@ declare enum SettlementType {
|
|
|
694
694
|
}
|
|
695
695
|
/**
|
|
696
696
|
* Configuration for a single custom pay-in fee line item.
|
|
697
|
-
*
|
|
697
|
+
* Pass via the `customPayInFees` field on `/checkout/link` or `/checkout/jwt-token`.
|
|
698
698
|
*/
|
|
699
699
|
interface PurchaseCustomPayInFee {
|
|
700
700
|
lineItemLabel: string;
|
|
@@ -929,16 +929,48 @@ declare enum PaymentMethods {
|
|
|
929
929
|
credits = "credits",
|
|
930
930
|
crypto = "crypto",
|
|
931
931
|
wire = "wire",
|
|
932
|
-
cashApp = "cashApp"
|
|
932
|
+
cashApp = "cashApp",
|
|
933
|
+
rain = "rain"
|
|
933
934
|
}
|
|
934
935
|
declare const paymentMethodLabels: Record<PaymentMethods, string>;
|
|
935
|
-
interface
|
|
936
|
-
|
|
936
|
+
interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockchain'> {
|
|
937
|
+
paymentIntentId: string;
|
|
938
|
+
onSuccess?: OnSuccessMethod;
|
|
939
|
+
onAuthDeclined?: OnAuthDeclinedMethod;
|
|
937
940
|
/**
|
|
938
|
-
*
|
|
939
|
-
*
|
|
941
|
+
* If true, pre-checks the partial USDC payment checkbox when USDC balance is available.
|
|
942
|
+
* If false or undefined, maintains default behavior (unchecked).
|
|
940
943
|
*/
|
|
941
|
-
|
|
944
|
+
partialUsdcChecked?: boolean;
|
|
945
|
+
/**
|
|
946
|
+
* The DeviceID gotten from the Coinflow SDK:
|
|
947
|
+
* https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
|
|
948
|
+
*
|
|
949
|
+
* nSureSDK.getDeviceId()
|
|
950
|
+
*/
|
|
951
|
+
deviceId?: string;
|
|
952
|
+
/**
|
|
953
|
+
* If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
|
|
954
|
+
*
|
|
955
|
+
* Example:
|
|
956
|
+
* Primary origin that will be interacting with the Coinflow iFrame: foo.com
|
|
957
|
+
* Subsequent origins that will render foo.com: bar.com
|
|
958
|
+
* The origin array would then be: [https://foo.com,https://bar.com]
|
|
959
|
+
*/
|
|
960
|
+
origins?: string[];
|
|
961
|
+
/**
|
|
962
|
+
* End-user wallet used for wallet-authenticated payment-intent checkout flows.
|
|
963
|
+
*
|
|
964
|
+
* Required when the target payment intent type depends on a customer wallet
|
|
965
|
+
* (for example: EVM/Solana/Stellar transaction intents or credits/USDC signing flows).
|
|
966
|
+
*
|
|
967
|
+
* The wallet implementation must match the active blockchain.
|
|
968
|
+
*/
|
|
969
|
+
wallet?: WalletTypes;
|
|
970
|
+
blockchain?: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad';
|
|
971
|
+
}
|
|
972
|
+
interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
973
|
+
subtotal?: Subtotal;
|
|
942
974
|
presentment?: Currency;
|
|
943
975
|
onSuccess?: OnSuccessMethod;
|
|
944
976
|
sessionKey?: string;
|
|
@@ -1266,7 +1298,7 @@ interface DecentRedeem extends CommonEvmRedeem {
|
|
|
1266
1298
|
* 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.
|
|
1267
1299
|
*/
|
|
1268
1300
|
type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
|
|
1269
|
-
interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | '
|
|
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 {
|
|
1270
1302
|
walletPubkey: string | null | undefined;
|
|
1271
1303
|
sessionKey?: string;
|
|
1272
1304
|
route: string;
|
|
@@ -1281,6 +1313,22 @@ interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handle
|
|
|
1281
1313
|
usePermit?: boolean;
|
|
1282
1314
|
handleHeightChangeId: string | number;
|
|
1283
1315
|
}
|
|
1316
|
+
interface CoinflowIntentsIFrameProps {
|
|
1317
|
+
theme?: MerchantTheme;
|
|
1318
|
+
merchantCss?: string;
|
|
1319
|
+
color?: 'white' | 'black';
|
|
1320
|
+
intentId: string;
|
|
1321
|
+
route: string;
|
|
1322
|
+
routePrefix?: string;
|
|
1323
|
+
handleHeightChangeId: string | number;
|
|
1324
|
+
env?: CoinflowEnvs;
|
|
1325
|
+
loaderBackground?: string;
|
|
1326
|
+
handleHeightChange?: (height: string) => void;
|
|
1327
|
+
origins?: string[];
|
|
1328
|
+
deviceId?: string;
|
|
1329
|
+
walletPubkey?: string | undefined | null;
|
|
1330
|
+
blockchain?: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad';
|
|
1331
|
+
}
|
|
1284
1332
|
declare enum CardType {
|
|
1285
1333
|
VISA = "VISA",
|
|
1286
1334
|
MASTERCARD = "MSTR",
|
|
@@ -1338,9 +1386,12 @@ declare class CoinflowUtils {
|
|
|
1338
1386
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
1339
1387
|
static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
|
|
1340
1388
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
1341
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal,
|
|
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 & {
|
|
1342
1390
|
baseUrl?: string;
|
|
1343
1391
|
} & WithGeo): string;
|
|
1392
|
+
static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
|
|
1393
|
+
baseUrl?: string;
|
|
1394
|
+
}): string;
|
|
1344
1395
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
1345
1396
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
1346
1397
|
solana: T;
|
|
@@ -1649,14 +1700,16 @@ interface CardFormTokenResponse {
|
|
|
1649
1700
|
expMonth?: string;
|
|
1650
1701
|
expYear?: string;
|
|
1651
1702
|
}
|
|
1652
|
-
declare class CoinflowCardForm implements OnInit
|
|
1703
|
+
declare class CoinflowCardForm implements OnInit {
|
|
1704
|
+
private sanitizer;
|
|
1653
1705
|
args: CardFormArgs;
|
|
1654
1706
|
iframeRef: ElementRef<HTMLIFrameElement>;
|
|
1655
|
-
url
|
|
1707
|
+
url?: SafeResourceUrl;
|
|
1656
1708
|
loaded: boolean;
|
|
1657
|
-
|
|
1709
|
+
iframeHeight: number | null;
|
|
1710
|
+
constructor(sanitizer: DomSanitizer);
|
|
1658
1711
|
ngOnInit(): void;
|
|
1659
|
-
|
|
1712
|
+
onMessage(event: MessageEvent): void;
|
|
1660
1713
|
private buildUrl;
|
|
1661
1714
|
private handleMessage;
|
|
1662
1715
|
tokenize(): Promise<CardFormTokenResponse>;
|
|
@@ -1690,4 +1743,4 @@ type WithOnLoad = {
|
|
|
1690
1743
|
};
|
|
1691
1744
|
|
|
1692
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 };
|
|
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 };
|
|
1746
|
+
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 };
|