@coinflowlabs/vue 1.12.1 → 1.14.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.
@@ -11,7 +11,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
11
11
  walletPubkey: string | null | undefined;
12
12
  route: string;
13
13
  transaction: undefined;
14
- onSuccess?: import('../lib/common').OnSuccessMethod;
14
+ onSuccess?: import('..').OnSuccessMethod;
15
15
  tokens?: string[];
16
16
  lockDefaultToken?: boolean;
17
17
  amount?: number;
@@ -25,20 +25,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
25
25
  transactionSigner?: string;
26
26
  origins?: string[];
27
27
  sessionKey?: string;
28
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
28
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
29
+ userLocation?: {
30
+ lat: number;
31
+ lng: number;
32
+ };
29
33
  merchantId: string;
30
- env?: import('../lib/common').CoinflowEnvs;
34
+ env?: import('..').CoinflowEnvs;
31
35
  loaderBackground?: string;
32
36
  blockchain: "solana";
33
37
  handleHeightChange?: (height: string) => void;
34
- theme?: import('../lib/common').MerchantTheme;
35
- wallet: import('../lib/common').SolanaWallet;
38
+ theme?: import('..').MerchantTheme;
39
+ wallet: import('..').SolanaWallet;
36
40
  connection: import('@solana/web3.js').Connection;
37
41
  } | {
38
42
  walletPubkey: string | null | undefined;
39
43
  route: string;
40
44
  transaction: undefined;
41
- onSuccess?: import('../lib/common').OnSuccessMethod;
45
+ onSuccess?: import('..').OnSuccessMethod;
42
46
  tokens?: string[];
43
47
  lockDefaultToken?: boolean;
44
48
  amount?: number;
@@ -52,20 +56,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
52
56
  transactionSigner?: string;
53
57
  origins?: string[];
54
58
  sessionKey?: string;
55
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
59
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
60
+ userLocation?: {
61
+ lat: number;
62
+ lng: number;
63
+ };
56
64
  merchantId: string;
57
- env?: import('../lib/common').CoinflowEnvs;
65
+ env?: import('..').CoinflowEnvs;
58
66
  loaderBackground?: string;
59
67
  blockchain: "eth";
60
68
  handleHeightChange?: (height: string) => void;
61
- theme?: import('../lib/common').MerchantTheme;
62
- wallet: import('../lib/common').EthWallet;
69
+ theme?: import('..').MerchantTheme;
70
+ wallet: import('..').EthWallet;
63
71
  usePermit?: boolean;
64
72
  } | {
65
73
  walletPubkey: string | null | undefined;
66
74
  route: string;
67
75
  transaction: undefined;
68
- onSuccess?: import('../lib/common').OnSuccessMethod;
76
+ onSuccess?: import('..').OnSuccessMethod;
69
77
  tokens?: string[];
70
78
  lockDefaultToken?: boolean;
71
79
  amount?: number;
@@ -79,20 +87,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
79
87
  transactionSigner?: string;
80
88
  origins?: string[];
81
89
  sessionKey?: string;
82
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
90
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
91
+ userLocation?: {
92
+ lat: number;
93
+ lng: number;
94
+ };
83
95
  merchantId: string;
84
- env?: import('../lib/common').CoinflowEnvs;
96
+ env?: import('..').CoinflowEnvs;
85
97
  loaderBackground?: string;
86
98
  blockchain: "polygon";
87
99
  handleHeightChange?: (height: string) => void;
88
- theme?: import('../lib/common').MerchantTheme;
89
- wallet: import('../lib/common').EthWallet;
100
+ theme?: import('..').MerchantTheme;
101
+ wallet: import('..').EthWallet;
90
102
  usePermit?: boolean;
91
103
  } | {
92
104
  walletPubkey: string | null | undefined;
93
105
  route: string;
94
106
  transaction: undefined;
95
- onSuccess?: import('../lib/common').OnSuccessMethod;
107
+ onSuccess?: import('..').OnSuccessMethod;
96
108
  tokens?: string[];
97
109
  lockDefaultToken?: boolean;
98
110
  amount?: number;
@@ -106,20 +118,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
106
118
  transactionSigner?: string;
107
119
  origins?: string[];
108
120
  sessionKey?: string;
109
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
121
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
122
+ userLocation?: {
123
+ lat: number;
124
+ lng: number;
125
+ };
110
126
  merchantId: string;
111
- env?: import('../lib/common').CoinflowEnvs;
127
+ env?: import('..').CoinflowEnvs;
112
128
  loaderBackground?: string;
113
129
  blockchain: "base";
114
130
  handleHeightChange?: (height: string) => void;
115
- theme?: import('../lib/common').MerchantTheme;
116
- wallet: import('../lib/common').EthWallet;
131
+ theme?: import('..').MerchantTheme;
132
+ wallet: import('..').EthWallet;
117
133
  usePermit?: boolean;
118
134
  } | {
119
135
  walletPubkey: string | null | undefined;
120
136
  route: string;
121
137
  transaction: undefined;
122
- onSuccess?: import('../lib/common').OnSuccessMethod;
138
+ onSuccess?: import('..').OnSuccessMethod;
123
139
  tokens?: string[];
124
140
  lockDefaultToken?: boolean;
125
141
  amount?: number;
@@ -133,20 +149,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
133
149
  transactionSigner?: string;
134
150
  origins?: string[];
135
151
  sessionKey?: string;
136
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
152
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
153
+ userLocation?: {
154
+ lat: number;
155
+ lng: number;
156
+ };
137
157
  merchantId: string;
138
- env?: import('../lib/common').CoinflowEnvs;
158
+ env?: import('..').CoinflowEnvs;
139
159
  loaderBackground?: string;
140
160
  blockchain: "arbitrum";
141
161
  handleHeightChange?: (height: string) => void;
142
- theme?: import('../lib/common').MerchantTheme;
143
- wallet: import('../lib/common').EthWallet;
162
+ theme?: import('..').MerchantTheme;
163
+ wallet: import('..').EthWallet;
144
164
  usePermit?: boolean;
145
165
  } | {
146
166
  walletPubkey: string | null | undefined;
147
167
  route: string;
148
168
  transaction: undefined;
149
- onSuccess?: import('../lib/common').OnSuccessMethod;
169
+ onSuccess?: import('..').OnSuccessMethod;
150
170
  tokens?: string[];
151
171
  lockDefaultToken?: boolean;
152
172
  amount?: number;
@@ -160,19 +180,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
160
180
  transactionSigner?: string;
161
181
  origins?: string[];
162
182
  sessionKey?: string;
163
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
183
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
184
+ userLocation?: {
185
+ lat: number;
186
+ lng: number;
187
+ };
164
188
  merchantId: string;
165
- env?: import('../lib/common').CoinflowEnvs;
189
+ env?: import('..').CoinflowEnvs;
166
190
  loaderBackground?: string;
167
191
  blockchain: "stellar";
168
192
  handleHeightChange?: (height: string) => void;
169
- theme?: import('../lib/common').MerchantTheme;
170
- wallet: import('../lib/common').StellarWallet;
193
+ theme?: import('..').MerchantTheme;
194
+ wallet: import('..').StellarWallet;
171
195
  } | {
172
196
  walletPubkey: string | null | undefined;
173
197
  route: string;
174
198
  transaction: undefined;
175
- onSuccess?: import('../lib/common').OnSuccessMethod;
199
+ onSuccess?: import('..').OnSuccessMethod;
176
200
  tokens?: string[];
177
201
  lockDefaultToken?: boolean;
178
202
  amount?: number;
@@ -186,20 +210,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
186
210
  transactionSigner?: string;
187
211
  origins?: string[];
188
212
  sessionKey?: string;
189
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
213
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
214
+ userLocation?: {
215
+ lat: number;
216
+ lng: number;
217
+ };
190
218
  merchantId: string;
191
- env?: import('../lib/common').CoinflowEnvs;
219
+ env?: import('..').CoinflowEnvs;
192
220
  loaderBackground?: string;
193
221
  blockchain: "monad";
194
222
  handleHeightChange?: (height: string) => void;
195
- theme?: import('../lib/common').MerchantTheme;
196
- wallet: import('../lib/common').EthWallet;
223
+ theme?: import('..').MerchantTheme;
224
+ wallet: import('..').EthWallet;
197
225
  usePermit?: boolean;
198
226
  } | {
199
227
  walletPubkey: string | null | undefined;
200
228
  route: string;
201
229
  transaction: undefined;
202
- onSuccess?: import('../lib/common').OnSuccessMethod;
230
+ onSuccess?: import('..').OnSuccessMethod;
203
231
  tokens?: string[];
204
232
  lockDefaultToken?: boolean;
205
233
  amount?: number;
@@ -213,20 +241,24 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
213
241
  transactionSigner?: string;
214
242
  origins?: string[];
215
243
  sessionKey?: string;
216
- allowedWithdrawSpeeds?: import('../lib/common').WithdrawSpeed[];
244
+ allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
245
+ userLocation?: {
246
+ lat: number;
247
+ lng: number;
248
+ };
217
249
  merchantId: string;
218
- env?: import('../lib/common').CoinflowEnvs;
250
+ env?: import('..').CoinflowEnvs;
219
251
  loaderBackground?: string;
220
252
  blockchain: "tempo";
221
253
  handleHeightChange?: (height: string) => void;
222
- theme?: import('../lib/common').MerchantTheme;
223
- wallet: import('../lib/common').EthWallet;
254
+ theme?: import('..').MerchantTheme;
255
+ wallet: import('..').EthWallet;
224
256
  usePermit?: boolean;
225
257
  };
226
258
  messageHandlers(): {
227
259
  handleHeightChange: ((height: string) => void) | undefined;
228
- onSuccess: import('../lib/common').OnSuccessMethod | undefined;
229
- onAuthDeclined: import('../lib/common').OnAuthDeclinedMethod | undefined;
260
+ onSuccess: import('..').OnSuccessMethod | undefined;
261
+ onAuthDeclined: import('..').OnAuthDeclinedMethod | undefined;
230
262
  handleSendTransaction: (transaction: string) => Promise<string>;
231
263
  handleSignMessage?: ((message: string) => Promise<string>) | undefined;
232
264
  handleSignTransaction?: ((transaction: string) => Promise<string>) | undefined;
@@ -239,7 +271,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
239
271
  }>> & Readonly<{}>, {}, {}, {
240
272
  CoinflowIFrame: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
241
273
  args: {
242
- type: PropType<import('../lib/common').CoinflowIFrameProps & import('../lib/common').IFrameMessageHandlers>;
274
+ type: PropType<import('..').CoinflowIFrameProps & import('..').IFrameMessageHandlers>;
243
275
  required: true;
244
276
  };
245
277
  }>, {}, {}, {
@@ -259,7 +291,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
259
291
  }): true;
260
292
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
261
293
  args: {
262
- type: PropType<import('../lib/common').CoinflowIFrameProps & import('../lib/common').IFrameMessageHandlers>;
294
+ type: PropType<import('..').CoinflowIFrameProps & import('..').IFrameMessageHandlers>;
263
295
  required: true;
264
296
  };
265
297
  }>> & Readonly<{
@@ -3,7 +3,7 @@ declare const useCardFormIframe: (props: {
3
3
  env: CoinflowEnvs;
4
4
  } & MerchantIdOrCheckoutJwt) => {
5
5
  tokenExIframe: import('vue').Ref<{
6
- tokenize: () => Promise<import('../../lib/common').TokenizationResponse>;
6
+ tokenize: () => Promise<import('../..').TokenizationResponse>;
7
7
  load: () => void;
8
8
  on: (event: string, callback: (data?: any) => void) => void;
9
9
  validate: () => void;
@@ -20,7 +20,7 @@ declare const useCardFormIframe: (props: {
20
20
  validateConfig: () => void;
21
21
  setFraudServicesRequestDetails: (data: string) => void;
22
22
  } | undefined, TokenExIframe | {
23
- tokenize: () => Promise<import('../../lib/common').TokenizationResponse>;
23
+ tokenize: () => Promise<import('../..').TokenizationResponse>;
24
24
  load: () => void;
25
25
  on: (event: string, callback: (data?: any) => void) => void;
26
26
  validate: () => void;
package/dist/index.d.ts CHANGED
@@ -14,8 +14,8 @@ declare const CoinflowCardForm: import('vue').DefineComponent<import('vue').Extr
14
14
  args: {
15
15
  type: import('vue').PropType<{
16
16
  merchantId: string;
17
- env?: import('./lib/common').CoinflowEnvs;
18
- theme?: import('./lib/common').MerchantTheme;
17
+ env?: import('.').CoinflowEnvs;
18
+ theme?: import('.').MerchantTheme;
19
19
  variant: "card-form" | "card-number-form" | "cvv-form";
20
20
  token?: string;
21
21
  onLoad?: () => void;
@@ -28,8 +28,8 @@ declare const CoinflowCardForm: import('vue').DefineComponent<import('vue').Extr
28
28
  args: {
29
29
  type: import('vue').PropType<{
30
30
  merchantId: string;
31
- env?: import('./lib/common').CoinflowEnvs;
32
- theme?: import('./lib/common').MerchantTheme;
31
+ env?: import('.').CoinflowEnvs;
32
+ theme?: import('.').MerchantTheme;
33
33
  variant: "card-form" | "card-number-form" | "cvv-form";
34
34
  token?: string;
35
35
  onLoad?: () => void;
@@ -42,14 +42,14 @@ declare const CoinflowCardForm: import('vue').DefineComponent<import('vue').Extr
42
42
  /** @deprecated Use CoinflowCardForm instead */
43
43
  declare const CoinflowLegacyCardNumberInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
44
44
  args: {
45
- type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
45
+ type: import('vue').PropType<import('.').CoinflowCardNumberInputProps & import('.').MerchantIdOrCheckoutJwt>;
46
46
  required: true;
47
47
  };
48
48
  }>, {
49
- getToken: () => Promise<import('./lib/common').CoinflowCardTokenResponse>;
49
+ getToken: () => Promise<import('.').CoinflowCardTokenResponse>;
50
50
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
51
51
  args: {
52
- type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
52
+ type: import('vue').PropType<import('.').CoinflowCardNumberInputProps & import('.').MerchantIdOrCheckoutJwt>;
53
53
  required: true;
54
54
  };
55
55
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -58,28 +58,28 @@ declare const CoinflowLegacyCvvInput: import('vue').DefineComponent<{}, {}, {},
58
58
  /** @deprecated Use CoinflowCardForm instead */
59
59
  declare const CoinflowLegacyCvvOnlyInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
60
60
  args: {
61
- type: import('vue').PropType<import('./lib/common').CoinflowCvvOnlyInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
61
+ type: import('vue').PropType<import('.').CoinflowCvvOnlyInputProps & import('.').MerchantIdOrCheckoutJwt>;
62
62
  required: true;
63
63
  };
64
64
  }>, {
65
- getToken: () => Promise<import('./lib/common').CoinflowCardTokenResponse>;
65
+ getToken: () => Promise<import('.').CoinflowCardTokenResponse>;
66
66
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
67
67
  args: {
68
- type: import('vue').PropType<import('./lib/common').CoinflowCvvOnlyInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
68
+ type: import('vue').PropType<import('.').CoinflowCvvOnlyInputProps & import('.').MerchantIdOrCheckoutJwt>;
69
69
  required: true;
70
70
  };
71
71
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
72
72
  /** @deprecated Use CoinflowCardForm instead */
73
73
  declare const CoinflowLegacyCardNumberOnlyInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
74
74
  args: {
75
- type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
75
+ type: import('vue').PropType<import('.').CoinflowCardNumberInputProps & import('.').MerchantIdOrCheckoutJwt>;
76
76
  required: true;
77
77
  };
78
78
  }>, {
79
- getToken: () => Promise<import('./lib/common').CoinflowCardTokenResponse>;
79
+ getToken: () => Promise<import('.').CoinflowCardTokenResponse>;
80
80
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
81
81
  args: {
82
- type: import('vue').PropType<import('./lib/common').CoinflowCardNumberInputProps & import('./lib/common').MerchantIdOrCheckoutJwt>;
82
+ type: import('vue').PropType<import('.').CoinflowCardNumberInputProps & import('.').MerchantIdOrCheckoutJwt>;
83
83
  required: true;
84
84
  };
85
85
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -0,0 +1 @@
1
+ export declare function initCoinflowProtection(): Promise<void>;
@@ -1,7 +1,12 @@
1
1
  export declare const DEVICE_ID_HEADER = "x-device-id";
2
2
  export declare const SESSION_ID_HEADER = "x-session-id";
3
+ export declare const REFERRER_HEADER = "x-coinflow-referrer";
3
4
  export type CoinflowProtectionHeadersType = {
4
5
  [DEVICE_ID_HEADER]: string | null;
5
6
  [SESSION_ID_HEADER]: string | null;
6
7
  };
7
8
  export declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
9
+ export type CoinflowPurchaseHeadersType = CoinflowProtectionHeadersType & {
10
+ [REFERRER_HEADER]: string | null;
11
+ };
12
+ export declare function getCoinflowPurchaseHeaders(): CoinflowPurchaseHeadersType;
@@ -6,7 +6,8 @@ import { CryptoCartItem } from './types/cryptoCartItem';
6
6
  import { MoneyTopUpCartItem } from './types/moneyTopUpCartItem';
7
7
  export declare enum WithdrawCategory {
8
8
  USER = "user",
9
- BUSINESS = "business"
9
+ BUSINESS = "business",
10
+ FIRST_PARTY = "firstParty"
10
11
  }
11
12
  export declare enum WithdrawSpeed {
12
13
  ASAP = "asap",
@@ -28,7 +29,7 @@ export declare enum SettlementType {
28
29
  }
29
30
  /**
30
31
  * Configuration for a single custom pay-in fee line item.
31
- * Use with customPayInFees prop on purchase flows.
32
+ * Pass via the `customPayInFees` field on `/checkout/link` or `/checkout/jwt-token`.
32
33
  */
33
34
  export interface PurchaseCustomPayInFee {
34
35
  lineItemLabel: string;
@@ -263,16 +264,48 @@ export declare enum PaymentMethods {
263
264
  credits = "credits",
264
265
  crypto = "crypto",
265
266
  wire = "wire",
266
- cashApp = "cashApp"
267
+ cashApp = "cashApp",
268
+ rain = "rain"
267
269
  }
268
270
  export declare const paymentMethodLabels: Record<PaymentMethods, string>;
269
- export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
270
- subtotal?: Subtotal;
271
+ export interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockchain'> {
272
+ paymentIntentId: string;
273
+ onSuccess?: OnSuccessMethod;
274
+ onAuthDeclined?: OnAuthDeclinedMethod;
275
+ /**
276
+ * If true, pre-checks the partial USDC payment checkbox when USDC balance is available.
277
+ * If false or undefined, maintains default behavior (unchecked).
278
+ */
279
+ partialUsdcChecked?: boolean;
280
+ /**
281
+ * The DeviceID gotten from the Coinflow SDK:
282
+ * https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
283
+ *
284
+ * nSureSDK.getDeviceId()
285
+ */
286
+ deviceId?: string;
287
+ /**
288
+ * If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
289
+ *
290
+ * Example:
291
+ * Primary origin that will be interacting with the Coinflow iFrame: foo.com
292
+ * Subsequent origins that will render foo.com: bar.com
293
+ * The origin array would then be: [https://foo.com,https://bar.com]
294
+ */
295
+ origins?: string[];
271
296
  /**
272
- * Custom pay-in fees to add to checkout. Each fee appears as a separate line item.
273
- * These fees are added to the subtotal and displayed to the customer.
297
+ * End-user wallet used for wallet-authenticated payment-intent checkout flows.
298
+ *
299
+ * Required when the target payment intent type depends on a customer wallet
300
+ * (for example: EVM/Solana/Stellar transaction intents or credits/USDC signing flows).
301
+ *
302
+ * The wallet implementation must match the active blockchain.
274
303
  */
275
- customPayInFees?: PurchaseCustomPayInFee[];
304
+ wallet?: WalletTypes;
305
+ blockchain?: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad';
306
+ }
307
+ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
308
+ subtotal?: Subtotal;
276
309
  presentment?: Currency;
277
310
  onSuccess?: OnSuccessMethod;
278
311
  sessionKey?: string;
@@ -331,6 +364,19 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
331
364
  destinationAuthKey?: string;
332
365
  accountFundingTransaction?: AccountFundingTransaction;
333
366
  }
367
+ export interface WithGeo {
368
+ /**
369
+ * End-user GPS coordinates for `BlockingRuleMethod.GEOLOCATION` enforcement.
370
+ * Required only when the merchant has a geolocation rule configured. The
371
+ * web build reads the browser Geolocation API directly; React Native hosts
372
+ * must request the fix from the platform (e.g. `expo-location`,
373
+ * `react-native-geolocation`) and forward the result here.
374
+ */
375
+ userLocation?: {
376
+ lat: number;
377
+ lng: number;
378
+ };
379
+ }
334
380
  /**
335
381
  * Used for Account Funding Transactions
336
382
  */
@@ -420,6 +466,17 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
420
466
  * Array of allowed withdrawal speeds. If not provided, all speeds are allowed.
421
467
  */
422
468
  allowedWithdrawSpeeds?: WithdrawSpeed[];
469
+ /**
470
+ * End-user GPS coordinates for `BlockingRuleMethod.GEOLOCATION` enforcement.
471
+ * Required only when the merchant has a geolocation rule configured. The
472
+ * web build reads the browser Geolocation API directly; React Native hosts
473
+ * must request the fix from the platform (e.g. `expo-location`,
474
+ * `react-native-geolocation`) and forward the result here.
475
+ */
476
+ userLocation?: {
477
+ lat: number;
478
+ lng: number;
479
+ };
423
480
  }
424
481
  export type WalletTypes = SolanaWallet | EthWallet | StellarWallet;
425
482
  export interface SolanaWalletProps {
@@ -576,7 +633,7 @@ export interface DecentRedeem extends CommonEvmRedeem {
576
633
  * 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.
577
634
  */
578
635
  export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
579
- export 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'> {
636
+ export 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 {
580
637
  walletPubkey: string | null | undefined;
581
638
  sessionKey?: string;
582
639
  route: string;
@@ -591,6 +648,22 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' |
591
648
  usePermit?: boolean;
592
649
  handleHeightChangeId: string | number;
593
650
  }
651
+ export interface CoinflowIntentsIFrameProps {
652
+ theme?: MerchantTheme;
653
+ merchantCss?: string;
654
+ color?: 'white' | 'black';
655
+ intentId: string;
656
+ route: string;
657
+ routePrefix?: string;
658
+ handleHeightChangeId: string | number;
659
+ env?: CoinflowEnvs;
660
+ loaderBackground?: string;
661
+ handleHeightChange?: (height: string) => void;
662
+ origins?: string[];
663
+ deviceId?: string;
664
+ walletPubkey?: string | undefined | null;
665
+ blockchain?: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad';
666
+ }
594
667
  export declare enum CardType {
595
668
  VISA = "VISA",
596
669
  MASTERCARD = "MSTR",
@@ -1,4 +1,4 @@
1
- import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps, CustomerInfo } from './CoinflowTypes';
1
+ import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowIntentsIFrameProps, CoinflowPurchaseProps, CustomerInfo, WithGeo } from './CoinflowTypes';
2
2
  export declare class CoinflowUtils {
3
3
  env: CoinflowEnvs;
4
4
  url: string;
@@ -7,7 +7,10 @@ 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, 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 & {
10
+ 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 & {
11
+ baseUrl?: string;
12
+ } & WithGeo): string;
13
+ static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
11
14
  baseUrl?: string;
12
15
  }): string;
13
16
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
@@ -0,0 +1,41 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
2
+ cardForm: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
3
+ args: {
4
+ type: import('vue').PropType<{
5
+ merchantId: string;
6
+ env?: import('..').CoinflowEnvs;
7
+ theme?: import('..').MerchantTheme;
8
+ variant: "card-form" | "card-number-form" | "cvv-form";
9
+ token?: string;
10
+ onLoad?: () => void;
11
+ }>;
12
+ required: true;
13
+ };
14
+ }>> & Readonly<{}>, {
15
+ tokenize: () => Promise<import('../components/card-form/CoinflowCardFormV2.vue').CardFormV2TokenResponse>;
16
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
17
+ iframeRef: HTMLIFrameElement;
18
+ }, HTMLIFrameElement, import('vue').ComponentProvideOptions, {
19
+ P: {};
20
+ B: {};
21
+ D: {};
22
+ C: {};
23
+ M: {};
24
+ Defaults: {};
25
+ }, Readonly<import('vue').ExtractPropTypes<{
26
+ args: {
27
+ type: import('vue').PropType<{
28
+ merchantId: string;
29
+ env?: import('..').CoinflowEnvs;
30
+ theme?: import('..').MerchantTheme;
31
+ variant: "card-form" | "card-number-form" | "cvv-form";
32
+ token?: string;
33
+ onLoad?: () => void;
34
+ }>;
35
+ required: true;
36
+ };
37
+ }>> & Readonly<{}>, {
38
+ tokenize: () => Promise<import('../components/card-form/CoinflowCardFormV2.vue').CardFormV2TokenResponse>;
39
+ }, {}, {}, {}, {}> | null;
40
+ }, HTMLDivElement>;
41
+ export default _default;
@@ -1,11 +1,11 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
2
2
  cvvOnlyInput: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
3
3
  args: {
4
- type: import('vue').PropType<import('../lib/common').CoinflowCvvOnlyInputProps & import('../lib/common').MerchantIdOrCheckoutJwt>;
4
+ type: import('vue').PropType<import('..').CoinflowCvvOnlyInputProps & import('..').MerchantIdOrCheckoutJwt>;
5
5
  required: true;
6
6
  };
7
7
  }>> & Readonly<{}>, {
8
- getToken: () => Promise<import('../lib/common').CoinflowCardTokenResponse>;
8
+ getToken: () => Promise<import('..').CoinflowCardTokenResponse>;
9
9
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
10
10
  P: {};
11
11
  B: {};
@@ -15,11 +15,11 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
15
15
  Defaults: {};
16
16
  }, Readonly<import('vue').ExtractPropTypes<{
17
17
  args: {
18
- type: import('vue').PropType<import('../lib/common').CoinflowCvvOnlyInputProps & import('../lib/common').MerchantIdOrCheckoutJwt>;
18
+ type: import('vue').PropType<import('..').CoinflowCvvOnlyInputProps & import('..').MerchantIdOrCheckoutJwt>;
19
19
  required: true;
20
20
  };
21
21
  }>> & Readonly<{}>, {
22
- getToken: () => Promise<import('../lib/common').CoinflowCardTokenResponse>;
22
+ getToken: () => Promise<import('..').CoinflowCardTokenResponse>;
23
23
  }, {}, {}, {}, {}> | null;
24
24
  }, HTMLDivElement>;
25
25
  export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.12.1",
4
+ "version": "1.14.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -36,7 +36,6 @@
36
36
  "@vitejs/plugin-vue": "^6.0.1",
37
37
  "copyfiles": "^2.4.1",
38
38
  "csstype": "^3.2.2",
39
- "prettier": "^3.6.2",
40
39
  "typescript": "^5.6.3",
41
40
  "vite": "^7.2.7",
42
41
  "vite-plugin-dts": "^4.5.4",