@coinflowlabs/angular 1.5.0 → 1.6.1

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.5.0",
3
+ "version": "1.6.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.17",
6
6
  "@angular/core": "^19.2.17",
@@ -192,6 +192,9 @@ interface Cents {
192
192
  interface CurrencyCents extends Cents {
193
193
  currency: Currency;
194
194
  }
195
+ interface RemainingLimit extends CurrencyCents {
196
+ type: 'single transaction' | 'daily' | 'monthly';
197
+ }
195
198
  interface TypedCurrencyCents<T extends Currency> extends Cents {
196
199
  currency: T;
197
200
  }
@@ -677,6 +680,24 @@ declare enum SettlementType {
677
680
  USDC = "USDC",
678
681
  Bank = "Bank"
679
682
  }
683
+ /**
684
+ * Configuration for a single custom pay-in fee line item.
685
+ * Use with customPayInFees prop on purchase flows.
686
+ */
687
+ interface PurchaseCustomPayInFee {
688
+ lineItemLabel: string;
689
+ fee: {
690
+ isFixed: true;
691
+ percent: null;
692
+ currency: Currency;
693
+ cents: number;
694
+ } | {
695
+ isFixed: false;
696
+ percent: number;
697
+ currency: null;
698
+ cents: null;
699
+ };
700
+ }
680
701
  /**
681
702
  * Configuration for zero authorization flow - controls saved payment method visibility.
682
703
  */
@@ -755,7 +776,7 @@ interface SplitNameCustomerInfo extends BaseCustomerInfo {
755
776
  }
756
777
  type CustomerInfo = SplitNameCustomerInfo | NameCustomerInfo;
757
778
  /** Coinflow Types **/
758
- type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'monad' | 'user';
779
+ type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad' | 'user';
759
780
  type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
760
781
  interface CoinflowTypes {
761
782
  merchantId: string;
@@ -813,6 +834,12 @@ type EthWallet = {
813
834
  }>;
814
835
  signMessage: (message: string) => Promise<string>;
815
836
  };
837
+ interface StellarWallet {
838
+ address: string | null;
839
+ sendTransaction: (base64Xdr: string) => Promise<string>;
840
+ signTransaction: (base64Xdr: string) => Promise<string>;
841
+ signMessage: (message: string) => Promise<string>;
842
+ }
816
843
  /** History **/
817
844
  interface CoinflowSolanaHistoryProps extends CoinflowTypes {
818
845
  wallet: SolanaWallet;
@@ -839,10 +866,14 @@ interface CoinflowBaseHistoryProps extends CoinflowEvmHistoryProps {
839
866
  interface CoinflowArbitrumHistoryProps extends CoinflowEvmHistoryProps {
840
867
  blockchain: 'arbitrum';
841
868
  }
869
+ interface CoinflowStellarHistoryProps extends CoinflowTypes {
870
+ wallet: StellarWallet;
871
+ blockchain: 'stellar';
872
+ }
842
873
  interface CoinflowMonadHistoryProps extends CoinflowEvmHistoryProps {
843
874
  blockchain: 'monad';
844
875
  }
845
- type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowMonadHistoryProps | CoinflowSessionKeyHistoryProps;
876
+ type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowStellarHistoryProps | CoinflowMonadHistoryProps | CoinflowSessionKeyHistoryProps;
846
877
  type Bytes = ArrayLike<number>;
847
878
  type BytesLike = Bytes | string;
848
879
  /** Purchase **/
@@ -875,6 +906,11 @@ declare enum PaymentMethods {
875
906
  declare const paymentMethodLabels: Record<PaymentMethods, string>;
876
907
  interface CoinflowCommonPurchaseProps extends CoinflowTypes {
877
908
  subtotal?: Subtotal;
909
+ /**
910
+ * Custom pay-in fees to add to checkout. Each fee appears as a separate line item.
911
+ * These fees are added to the subtotal and displayed to the customer.
912
+ */
913
+ customPayInFees?: PurchaseCustomPayInFee[];
878
914
  presentment?: Currency;
879
915
  onSuccess?: OnSuccessMethod;
880
916
  onAuthDeclined?: OnAuthDeclinedMethod;
@@ -977,10 +1013,15 @@ interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
977
1013
  interface CoinflowArbitrumPurchaseProps extends CoinflowEvmPurchaseProps {
978
1014
  blockchain: 'arbitrum';
979
1015
  }
1016
+ interface CoinflowStellarPurchaseProps extends CoinflowCommonPurchaseProps {
1017
+ wallet: StellarWallet;
1018
+ transaction?: string;
1019
+ blockchain: 'stellar';
1020
+ }
980
1021
  interface CoinflowMonadPurchaseProps extends CoinflowEvmPurchaseProps {
981
1022
  blockchain: 'monad';
982
1023
  }
983
- type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps | CoinflowMonadPurchaseProps;
1024
+ type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps | CoinflowStellarPurchaseProps | CoinflowMonadPurchaseProps;
984
1025
  /** Withdraw **/
985
1026
  interface CoinflowCommonWithdrawProps extends CoinflowTypes {
986
1027
  onSuccess?: OnSuccessMethod;
@@ -991,7 +1032,7 @@ interface CoinflowCommonWithdrawProps extends CoinflowTypes {
991
1032
  bankAccountLinkRedirect?: string;
992
1033
  additionalWallets?: {
993
1034
  wallet: string;
994
- blockchain: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'monad';
1035
+ blockchain: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'monad' | 'stellar';
995
1036
  }[];
996
1037
  lockAmount?: boolean;
997
1038
  transactionSigner?: string;
@@ -1013,7 +1054,7 @@ interface CoinflowCommonWithdrawProps extends CoinflowTypes {
1013
1054
  */
1014
1055
  allowedWithdrawSpeeds?: WithdrawSpeed[];
1015
1056
  }
1016
- type WalletTypes = SolanaWallet | EthWallet;
1057
+ type WalletTypes = SolanaWallet | EthWallet | StellarWallet;
1017
1058
  interface SolanaWalletProps {
1018
1059
  wallet: SolanaWallet;
1019
1060
  connection: Connection;
@@ -1041,11 +1082,16 @@ interface ArbitrumWalletProps {
1041
1082
  blockchain: 'arbitrum';
1042
1083
  }
1043
1084
  type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
1085
+ interface StellarWalletProps {
1086
+ wallet: StellarWallet;
1087
+ blockchain: 'stellar';
1088
+ }
1089
+ type CoinflowStellarWithdrawProps = CoinflowCommonWithdrawProps & StellarWalletProps;
1044
1090
  interface MonadWalletProps {
1045
1091
  blockchain: 'monad';
1046
1092
  }
1047
1093
  type CoinflowMonadWithdrawProps = CoinflowEvmWithdrawProps & MonadWalletProps;
1048
- type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps | CoinflowMonadWithdrawProps;
1094
+ type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps | CoinflowStellarWithdrawProps | CoinflowMonadWithdrawProps;
1049
1095
  interface CommonEvmRedeem {
1050
1096
  /**
1051
1097
  * Whether the UI should wait
@@ -1159,7 +1205,7 @@ interface DecentRedeem extends CommonEvmRedeem {
1159
1205
  * 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.
1160
1206
  */
1161
1207
  type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
1162
- interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | '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'> {
1208
+ interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | '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'> {
1163
1209
  walletPubkey: string | null | undefined;
1164
1210
  sessionKey?: string;
1165
1211
  route: string;
@@ -1231,7 +1277,7 @@ declare class CoinflowUtils {
1231
1277
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
1232
1278
  static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
1233
1279
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
1234
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, 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 & {
1280
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, customPayInFees, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, 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 & {
1235
1281
  baseUrl?: string;
1236
1282
  }): string;
1237
1283
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
@@ -1241,6 +1287,7 @@ declare class CoinflowUtils {
1241
1287
  polygon: T;
1242
1288
  base: T;
1243
1289
  arbitrum: T;
1290
+ stellar: T;
1244
1291
  monad: T;
1245
1292
  user: T;
1246
1293
  }): T;
@@ -1526,4 +1573,4 @@ type WithOnLoad = {
1526
1573
  };
1527
1574
 
1528
1575
  export { BankingCurrencies, CARD_TYPE_MAPPING, CardType, CoinflowApplePayButtonComponent, CoinflowCardNumberInput, CoinflowCardNumberOnlyInput, CoinflowCvvInputComponent, CoinflowCvvOnlyInputComponent, CoinflowGooglePayButtonComponent, CoinflowIFrameComponent, CoinflowPurchaseComponent, CoinflowPurchaseHistoryComponent, CoinflowPurchaseProtectionComponent, CoinflowUtils, CoinflowWithdrawComponent, CoinflowWithdrawHistoryComponent, Currency, CurrencyToISO4217, EventBus, IFrameMessageMethods, MerchantStyle, PaymentMethods, RN_REDIRECT_MESSAGE_NAME, SettlementType, ThreeDsChallengePreference, TokenExCardNumberIframeId, TokenExCvvContainerID, WithdrawCategory, WithdrawCurrencies, WithdrawSpeed, doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, getCurrencyDecimals, getCustomerName, getHandlers, getIframeConfig, getWalletPubkey, handleIFrameMessage, isBankingCurrency, isTypedCurrencyCents, isWithdrawCurrency, isZeroAuthSavedPaymentMethods, isZeroAuthVerifyCard, nftCartItem, paymentMethodLabels, productType, setTokenExScriptTag };
1529
- export type { AccountFundingTransaction, AnyObject, ArbitrumWalletProps, AuthDeclinedWalletCallInfo, BankingCurrency, BaseWalletProps, CardFormInputStyles, 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, CoinflowPurchaseProps, CoinflowSessionKeyHistoryProps, CoinflowSessionKeyPurchaseProps, CoinflowSolanaHistoryProps, CoinflowSolanaPurchaseProps, CoinflowSolanaWithdrawProps, CoinflowTypes, CoinflowWithdrawProps, CommonDoInitializeTokenExIframeArgs, CommonEvmRedeem, CryptoCartItem, CurrencyCents, CustomerInfo, DecentRedeem, DoInitializeCvvOnlyTokenExIframeArgs, DoInitializeTokenExIframeArgs, EthWallet, EthWalletProps, EventBusCallback, EvmTransactionData, FullName, GetIFrameConfigArgs, GiftCardCartItem, IFrameMessageHandlers, KnownTokenIdRedeem, MerchantIdOrCheckoutJwt, MerchantTheme, MergeWithOptionalDiff, MonadWalletProps, NameCustomerInfo, NftCartItemClassOmitted, NormalRedeem, OnAuthDeclinedMethod, OnSuccessMethod, PartialBy, PolygonWalletProps, RecipientAftInfo, ReturnedTokenIdRedeem, SafeMintRedeem, SolanaWallet, SolanaWalletProps, SplitNameCustomerInfo, Subtotal, TokenExIFrameConfiguration, TokenExIframe, TokenRedeem, TokenSubtotal, TokenizationResponse, TypedCurrencyCents, VersionDetail, WalletCall, WalletTypes, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };
1576
+ export type { AccountFundingTransaction, AnyObject, ArbitrumWalletProps, AuthDeclinedWalletCallInfo, BankingCurrency, BaseWalletProps, CardFormInputStyles, 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, CoinflowPurchaseProps, CoinflowSessionKeyHistoryProps, CoinflowSessionKeyPurchaseProps, CoinflowSolanaHistoryProps, CoinflowSolanaPurchaseProps, CoinflowSolanaWithdrawProps, CoinflowStellarHistoryProps, CoinflowStellarPurchaseProps, CoinflowStellarWithdrawProps, CoinflowTypes, CoinflowWithdrawProps, CommonDoInitializeTokenExIframeArgs, CommonEvmRedeem, CryptoCartItem, CurrencyCents, CustomerInfo, DecentRedeem, DoInitializeCvvOnlyTokenExIframeArgs, DoInitializeTokenExIframeArgs, EthWallet, EthWalletProps, EventBusCallback, EvmTransactionData, 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, TokenExIFrameConfiguration, TokenExIframe, TokenRedeem, TokenSubtotal, TokenizationResponse, TypedCurrencyCents, VersionDetail, WalletCall, WalletTypes, WithOnLoad, WithdrawCurrency, ZeroAuthSavedPaymentMethods, ZeroAuthVerifyCard, ZeroAuthorizationConfig };