@coinflowlabs/vue 1.7.0 → 1.8.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.
@@ -24,6 +24,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
24
24
  };
25
25
  redemptionCheck?: boolean;
26
26
  subtotal?: import('../lib/common').Subtotal;
27
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
27
28
  presentment?: import('../lib/common').Currency;
28
29
  onSuccess?: import('../lib/common').OnSuccessMethod;
29
30
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
@@ -60,6 +61,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
60
61
  wallet?: undefined;
61
62
  blockchain?: import('../lib/common').CoinflowBlockchain | undefined;
62
63
  subtotal?: import('../lib/common').Subtotal;
64
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
63
65
  presentment?: import('../lib/common').Currency;
64
66
  onSuccess?: import('../lib/common').OnSuccessMethod;
65
67
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
@@ -95,6 +97,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
95
97
  blockchain: "polygon";
96
98
  wallet: import('../lib/common').EthWallet;
97
99
  subtotal?: import('../lib/common').Subtotal;
100
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
98
101
  presentment?: import('../lib/common').Currency;
99
102
  onSuccess?: import('../lib/common').OnSuccessMethod;
100
103
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
@@ -130,6 +133,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
130
133
  blockchain: "eth";
131
134
  wallet: import('../lib/common').EthWallet;
132
135
  subtotal?: import('../lib/common').Subtotal;
136
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
133
137
  presentment?: import('../lib/common').Currency;
134
138
  onSuccess?: import('../lib/common').OnSuccessMethod;
135
139
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
@@ -165,6 +169,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
165
169
  blockchain: "base";
166
170
  wallet: import('../lib/common').EthWallet;
167
171
  subtotal?: import('../lib/common').Subtotal;
172
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
168
173
  presentment?: import('../lib/common').Currency;
169
174
  onSuccess?: import('../lib/common').OnSuccessMethod;
170
175
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
@@ -200,6 +205,43 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
200
205
  blockchain: "arbitrum";
201
206
  wallet: import('../lib/common').EthWallet;
202
207
  subtotal?: import('../lib/common').Subtotal;
208
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
209
+ presentment?: import('../lib/common').Currency;
210
+ onSuccess?: import('../lib/common').OnSuccessMethod;
211
+ onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
212
+ webhookInfo?: {
213
+ [key: string]: any;
214
+ };
215
+ email?: string;
216
+ chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
217
+ planCode?: string;
218
+ allowedPaymentMethods?: import('../lib/common').PaymentMethods[];
219
+ customerInfo?: import('../lib/common').CustomerInfo;
220
+ settlementType?: import('../lib/common').SettlementType;
221
+ authOnly?: boolean;
222
+ isZeroAuthorization?: boolean;
223
+ zeroAuthorizationConfig?: import('../lib/common').ZeroAuthorizationConfig;
224
+ partialUsdcChecked?: boolean;
225
+ deviceId?: string;
226
+ jwtToken?: string;
227
+ supportEmail?: string;
228
+ origins?: string[];
229
+ threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
230
+ destinationAuthKey?: string;
231
+ accountFundingTransaction?: import('../lib/common').AccountFundingTransaction;
232
+ merchantId: string;
233
+ env?: import('../lib/common').CoinflowEnvs;
234
+ loaderBackground?: string;
235
+ handleHeightChange?: (height: string) => void;
236
+ theme?: import('../lib/common').MerchantTheme;
237
+ } | {
238
+ walletPubkey: string | null | undefined;
239
+ route: string;
240
+ transaction: string | undefined;
241
+ wallet: import('../lib/common').StellarWallet;
242
+ blockchain: "stellar";
243
+ subtotal?: import('../lib/common').Subtotal;
244
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
203
245
  presentment?: import('../lib/common').Currency;
204
246
  onSuccess?: import('../lib/common').OnSuccessMethod;
205
247
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
@@ -235,6 +277,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
235
277
  blockchain: "monad";
236
278
  wallet: import('../lib/common').EthWallet;
237
279
  subtotal?: import('../lib/common').Subtotal;
280
+ customPayInFees?: import('../lib/common').PurchaseCustomPayInFee[];
238
281
  presentment?: import('../lib/common').Currency;
239
282
  onSuccess?: import('../lib/common').OnSuccessMethod;
240
283
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
@@ -19,7 +19,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
19
19
  bankAccountLinkRedirect?: string;
20
20
  additionalWallets?: {
21
21
  wallet: string;
22
- blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad";
22
+ blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad" | "stellar";
23
23
  }[];
24
24
  lockAmount?: boolean;
25
25
  transactionSigner?: string;
@@ -46,7 +46,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
46
46
  bankAccountLinkRedirect?: string;
47
47
  additionalWallets?: {
48
48
  wallet: string;
49
- blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad";
49
+ blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad" | "stellar";
50
50
  }[];
51
51
  lockAmount?: boolean;
52
52
  transactionSigner?: string;
@@ -73,7 +73,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
73
73
  bankAccountLinkRedirect?: string;
74
74
  additionalWallets?: {
75
75
  wallet: string;
76
- blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad";
76
+ blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad" | "stellar";
77
77
  }[];
78
78
  lockAmount?: boolean;
79
79
  transactionSigner?: string;
@@ -100,7 +100,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
100
100
  bankAccountLinkRedirect?: string;
101
101
  additionalWallets?: {
102
102
  wallet: string;
103
- blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad";
103
+ blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad" | "stellar";
104
104
  }[];
105
105
  lockAmount?: boolean;
106
106
  transactionSigner?: string;
@@ -127,7 +127,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
127
127
  bankAccountLinkRedirect?: string;
128
128
  additionalWallets?: {
129
129
  wallet: string;
130
- blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad";
130
+ blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad" | "stellar";
131
131
  }[];
132
132
  lockAmount?: boolean;
133
133
  transactionSigner?: string;
@@ -154,7 +154,33 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
154
154
  bankAccountLinkRedirect?: string;
155
155
  additionalWallets?: {
156
156
  wallet: string;
157
- blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad";
157
+ blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad" | "stellar";
158
+ }[];
159
+ lockAmount?: boolean;
160
+ transactionSigner?: string;
161
+ origins?: string[];
162
+ sessionKey?: string;
163
+ allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
164
+ merchantId: string;
165
+ env?: import('../lib/common').CoinflowEnvs;
166
+ loaderBackground?: string;
167
+ blockchain: "stellar";
168
+ handleHeightChange?: (height: string) => void;
169
+ theme?: import('../lib/common').MerchantTheme;
170
+ wallet: import('../lib/common').StellarWallet;
171
+ } | {
172
+ walletPubkey: string | null | undefined;
173
+ route: string;
174
+ transaction: undefined;
175
+ onSuccess?: import('../lib/common').OnSuccessMethod;
176
+ tokens?: string[];
177
+ lockDefaultToken?: boolean;
178
+ amount?: number;
179
+ email?: string;
180
+ bankAccountLinkRedirect?: string;
181
+ additionalWallets?: {
182
+ wallet: string;
183
+ blockchain: "solana" | "eth" | "polygon" | "base" | "arbitrum" | "monad" | "stellar";
158
184
  }[];
159
185
  lockAmount?: boolean;
160
186
  transactionSigner?: string;
@@ -26,6 +26,24 @@ export declare enum SettlementType {
26
26
  USDC = "USDC",
27
27
  Bank = "Bank"
28
28
  }
29
+ /**
30
+ * Configuration for a single custom pay-in fee line item.
31
+ * Use with customPayInFees prop on purchase flows.
32
+ */
33
+ export interface PurchaseCustomPayInFee {
34
+ lineItemLabel: string;
35
+ fee: {
36
+ isFixed: true;
37
+ percent: null;
38
+ currency: Currency;
39
+ cents: number;
40
+ } | {
41
+ isFixed: false;
42
+ percent: number;
43
+ currency: null;
44
+ cents: null;
45
+ };
46
+ }
29
47
  /**
30
48
  * Configuration for zero authorization flow - controls saved payment method visibility.
31
49
  */
@@ -104,7 +122,7 @@ export interface SplitNameCustomerInfo extends BaseCustomerInfo {
104
122
  }
105
123
  export type CustomerInfo = SplitNameCustomerInfo | NameCustomerInfo;
106
124
  /** Coinflow Types **/
107
- export type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'monad' | 'user';
125
+ export type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad' | 'user';
108
126
  export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
109
127
  export interface CoinflowTypes {
110
128
  merchantId: string;
@@ -162,6 +180,12 @@ export type EthWallet = {
162
180
  }>;
163
181
  signMessage: (message: string) => Promise<string>;
164
182
  };
183
+ export interface StellarWallet {
184
+ address: string | null;
185
+ sendTransaction: (base64Xdr: string) => Promise<string>;
186
+ signTransaction: (base64Xdr: string) => Promise<string>;
187
+ signMessage: (message: string) => Promise<string>;
188
+ }
165
189
  /** History **/
166
190
  export interface CoinflowSolanaHistoryProps extends CoinflowTypes {
167
191
  wallet: SolanaWallet;
@@ -188,10 +212,14 @@ export interface CoinflowBaseHistoryProps extends CoinflowEvmHistoryProps {
188
212
  export interface CoinflowArbitrumHistoryProps extends CoinflowEvmHistoryProps {
189
213
  blockchain: 'arbitrum';
190
214
  }
215
+ export interface CoinflowStellarHistoryProps extends CoinflowTypes {
216
+ wallet: StellarWallet;
217
+ blockchain: 'stellar';
218
+ }
191
219
  export interface CoinflowMonadHistoryProps extends CoinflowEvmHistoryProps {
192
220
  blockchain: 'monad';
193
221
  }
194
- export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowMonadHistoryProps | CoinflowSessionKeyHistoryProps;
222
+ export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowStellarHistoryProps | CoinflowMonadHistoryProps | CoinflowSessionKeyHistoryProps;
195
223
  type Bytes = ArrayLike<number>;
196
224
  type BytesLike = Bytes | string;
197
225
  /** Purchase **/
@@ -224,6 +252,11 @@ export declare enum PaymentMethods {
224
252
  export declare const paymentMethodLabels: Record<PaymentMethods, string>;
225
253
  export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
226
254
  subtotal?: Subtotal;
255
+ /**
256
+ * Custom pay-in fees to add to checkout. Each fee appears as a separate line item.
257
+ * These fees are added to the subtotal and displayed to the customer.
258
+ */
259
+ customPayInFees?: PurchaseCustomPayInFee[];
227
260
  presentment?: Currency;
228
261
  onSuccess?: OnSuccessMethod;
229
262
  onAuthDeclined?: OnAuthDeclinedMethod;
@@ -326,10 +359,15 @@ export interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
326
359
  export interface CoinflowArbitrumPurchaseProps extends CoinflowEvmPurchaseProps {
327
360
  blockchain: 'arbitrum';
328
361
  }
362
+ export interface CoinflowStellarPurchaseProps extends CoinflowCommonPurchaseProps {
363
+ wallet: StellarWallet;
364
+ transaction?: string;
365
+ blockchain: 'stellar';
366
+ }
329
367
  export interface CoinflowMonadPurchaseProps extends CoinflowEvmPurchaseProps {
330
368
  blockchain: 'monad';
331
369
  }
332
- export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps | CoinflowMonadPurchaseProps;
370
+ export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps | CoinflowStellarPurchaseProps | CoinflowMonadPurchaseProps;
333
371
  /** Withdraw **/
334
372
  export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
335
373
  onSuccess?: OnSuccessMethod;
@@ -340,7 +378,7 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
340
378
  bankAccountLinkRedirect?: string;
341
379
  additionalWallets?: {
342
380
  wallet: string;
343
- blockchain: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'monad';
381
+ blockchain: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'monad' | 'stellar';
344
382
  }[];
345
383
  lockAmount?: boolean;
346
384
  transactionSigner?: string;
@@ -362,7 +400,7 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
362
400
  */
363
401
  allowedWithdrawSpeeds?: WithdrawSpeed[];
364
402
  }
365
- export type WalletTypes = SolanaWallet | EthWallet;
403
+ export type WalletTypes = SolanaWallet | EthWallet | StellarWallet;
366
404
  export interface SolanaWalletProps {
367
405
  wallet: SolanaWallet;
368
406
  connection: Connection;
@@ -390,11 +428,16 @@ export interface ArbitrumWalletProps {
390
428
  blockchain: 'arbitrum';
391
429
  }
392
430
  export type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
431
+ export interface StellarWalletProps {
432
+ wallet: StellarWallet;
433
+ blockchain: 'stellar';
434
+ }
435
+ export type CoinflowStellarWithdrawProps = CoinflowCommonWithdrawProps & StellarWalletProps;
393
436
  export interface MonadWalletProps {
394
437
  blockchain: 'monad';
395
438
  }
396
439
  export type CoinflowMonadWithdrawProps = CoinflowEvmWithdrawProps & MonadWalletProps;
397
- export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps | CoinflowMonadWithdrawProps;
440
+ export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps | CoinflowStellarWithdrawProps | CoinflowMonadWithdrawProps;
398
441
  export interface CommonEvmRedeem {
399
442
  /**
400
443
  * Whether the UI should wait
@@ -508,7 +551,7 @@ export interface DecentRedeem extends CommonEvmRedeem {
508
551
  * 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.
509
552
  */
510
553
  export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
511
- export 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'> {
554
+ export 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'> {
512
555
  walletPubkey: string | null | undefined;
513
556
  sessionKey?: string;
514
557
  route: string;
@@ -7,7 +7,7 @@ export declare class CoinflowUtils {
7
7
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
8
8
  static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
9
9
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
10
- 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 & {
10
+ 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 & {
11
11
  baseUrl?: string;
12
12
  }): string;
13
13
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
@@ -17,6 +17,7 @@ export declare class CoinflowUtils {
17
17
  polygon: T;
18
18
  base: T;
19
19
  arbitrum: T;
20
+ stellar: T;
20
21
  monad: T;
21
22
  user: T;
22
23
  }): T;
@@ -186,6 +186,9 @@ export interface Cents {
186
186
  export interface CurrencyCents extends Cents {
187
187
  currency: Currency;
188
188
  }
189
+ export interface RemainingLimit extends CurrencyCents {
190
+ type: 'single transaction' | 'daily' | 'monthly';
191
+ }
189
192
  export interface TypedCurrencyCents<T extends Currency> extends Cents {
190
193
  currency: T;
191
194
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.7.0",
4
+ "version": "1.8.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",