@coinflowlabs/vue 1.15.0 → 1.17.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/dist/coinflow-vue.js +4239 -4149
- package/dist/coinflow-vue.umd.cjs +10 -10
- package/dist/components/CoinflowPurchase.vue.d.ts +10 -0
- package/dist/components/CoinflowWithdraw.vue.d.ts +1 -0
- package/dist/components/card-form/CoinflowCardFormV2.vue.d.ts +2 -0
- package/dist/lib/common/CoinflowLibMessageHandlers.d.ts +7 -1
- package/dist/lib/common/CoinflowPurchaseProtectionHeaders.d.ts +2 -0
- package/dist/lib/common/CoinflowTypes.d.ts +10 -6
- package/dist/lib/common/CoinflowUtils.d.ts +1 -1
- package/dist/lib/common/Forter.d.ts +10 -0
- package/dist/lib/common/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -49,6 +49,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
49
49
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
50
50
|
destinationAuthKey?: string;
|
|
51
51
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
52
|
+
depositAmounts?: number[];
|
|
52
53
|
merchantId: string;
|
|
53
54
|
env?: import('..').CoinflowEnvs;
|
|
54
55
|
loaderBackground?: string;
|
|
@@ -86,6 +87,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
86
87
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
87
88
|
destinationAuthKey?: string;
|
|
88
89
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
90
|
+
depositAmounts?: number[];
|
|
89
91
|
merchantId: string;
|
|
90
92
|
env?: import('..').CoinflowEnvs;
|
|
91
93
|
loaderBackground?: string;
|
|
@@ -123,6 +125,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
123
125
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
124
126
|
destinationAuthKey?: string;
|
|
125
127
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
128
|
+
depositAmounts?: number[];
|
|
126
129
|
merchantId: string;
|
|
127
130
|
env?: import('..').CoinflowEnvs;
|
|
128
131
|
loaderBackground?: string;
|
|
@@ -160,6 +163,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
160
163
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
161
164
|
destinationAuthKey?: string;
|
|
162
165
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
166
|
+
depositAmounts?: number[];
|
|
163
167
|
merchantId: string;
|
|
164
168
|
env?: import('..').CoinflowEnvs;
|
|
165
169
|
loaderBackground?: string;
|
|
@@ -197,6 +201,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
197
201
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
198
202
|
destinationAuthKey?: string;
|
|
199
203
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
204
|
+
depositAmounts?: number[];
|
|
200
205
|
merchantId: string;
|
|
201
206
|
env?: import('..').CoinflowEnvs;
|
|
202
207
|
loaderBackground?: string;
|
|
@@ -234,6 +239,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
234
239
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
235
240
|
destinationAuthKey?: string;
|
|
236
241
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
242
|
+
depositAmounts?: number[];
|
|
237
243
|
merchantId: string;
|
|
238
244
|
env?: import('..').CoinflowEnvs;
|
|
239
245
|
loaderBackground?: string;
|
|
@@ -271,6 +277,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
271
277
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
272
278
|
destinationAuthKey?: string;
|
|
273
279
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
280
|
+
depositAmounts?: number[];
|
|
274
281
|
merchantId: string;
|
|
275
282
|
env?: import('..').CoinflowEnvs;
|
|
276
283
|
loaderBackground?: string;
|
|
@@ -308,6 +315,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
308
315
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
309
316
|
destinationAuthKey?: string;
|
|
310
317
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
318
|
+
depositAmounts?: number[];
|
|
311
319
|
merchantId: string;
|
|
312
320
|
env?: import('..').CoinflowEnvs;
|
|
313
321
|
loaderBackground?: string;
|
|
@@ -345,6 +353,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
345
353
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
346
354
|
destinationAuthKey?: string;
|
|
347
355
|
accountFundingTransaction?: import('..').AccountFundingTransaction;
|
|
356
|
+
depositAmounts?: number[];
|
|
348
357
|
merchantId: string;
|
|
349
358
|
env?: import('..').CoinflowEnvs;
|
|
350
359
|
loaderBackground?: string;
|
|
@@ -358,6 +367,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
358
367
|
handleSendTransaction: (transaction: string) => Promise<string>;
|
|
359
368
|
handleSignMessage?: ((message: string) => Promise<string>) | undefined;
|
|
360
369
|
handleSignTransaction?: ((transaction: string) => Promise<string>) | undefined;
|
|
370
|
+
handleOverlay?: ((state: string) => void) | undefined;
|
|
361
371
|
};
|
|
362
372
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
363
373
|
args: {
|
|
@@ -262,6 +262,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
262
262
|
handleSendTransaction: (transaction: string) => Promise<string>;
|
|
263
263
|
handleSignMessage?: ((message: string) => Promise<string>) | undefined;
|
|
264
264
|
handleSignTransaction?: ((transaction: string) => Promise<string>) | undefined;
|
|
265
|
+
handleOverlay?: ((state: string) => void) | undefined;
|
|
265
266
|
};
|
|
266
267
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
267
268
|
args: {
|
|
@@ -4,6 +4,8 @@ export interface CardFormV2TokenResponse {
|
|
|
4
4
|
token: string;
|
|
5
5
|
expMonth?: string;
|
|
6
6
|
expYear?: string;
|
|
7
|
+
/** Forter device token captured in the card-form iframe; forward it as the `x-forter-token` header on your charge request so Forter can score the transaction. Absent if the Forter SDK has not loaded. */
|
|
8
|
+
forterToken?: string;
|
|
7
9
|
}
|
|
8
10
|
declare function tokenize(): Promise<CardFormV2TokenResponse>;
|
|
9
11
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -18,6 +18,11 @@ export interface IFrameMessageHandlers {
|
|
|
18
18
|
handleHeightChange?: (height: string) => void;
|
|
19
19
|
onSuccess: OnSuccessMethod | undefined;
|
|
20
20
|
onAuthDeclined: OnAuthDeclinedMethod | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Called when the iframe opens/closes an in-page overlay (e.g. the PayPal
|
|
23
|
+
* approval modal). `state` is 'open' or 'close'.
|
|
24
|
+
*/
|
|
25
|
+
handleOverlay?: (state: string) => void;
|
|
21
26
|
}
|
|
22
27
|
export declare enum IFrameMessageMethods {
|
|
23
28
|
SignMessage = "signMessage",
|
|
@@ -28,7 +33,8 @@ export declare enum IFrameMessageMethods {
|
|
|
28
33
|
AuthDeclined = "authDeclined",
|
|
29
34
|
Loaded = "loaded",
|
|
30
35
|
AccountLinked = "accountLinked",
|
|
31
|
-
Redirect = "redirect"
|
|
36
|
+
Redirect = "redirect",
|
|
37
|
+
Overlay = "overlay"
|
|
32
38
|
}
|
|
33
39
|
export declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
|
|
34
40
|
export declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare const DEVICE_ID_HEADER = "x-device-id";
|
|
2
2
|
export declare const SESSION_ID_HEADER = "x-session-id";
|
|
3
3
|
export declare const REFERRER_HEADER = "x-coinflow-referrer";
|
|
4
|
+
export declare const FORTER_TOKEN_HEADER = "x-forter-token";
|
|
4
5
|
export type CoinflowProtectionHeadersType = {
|
|
5
6
|
[DEVICE_ID_HEADER]: string | null;
|
|
6
7
|
[SESSION_ID_HEADER]: string | null;
|
|
8
|
+
[FORTER_TOKEN_HEADER]: string | null;
|
|
7
9
|
};
|
|
8
10
|
export declare function getCoinflowProtectionHeaders(): CoinflowProtectionHeadersType;
|
|
9
11
|
export type CoinflowPurchaseHeadersType = CoinflowProtectionHeadersType & {
|
|
@@ -267,7 +267,10 @@ export declare enum PaymentMethods {
|
|
|
267
267
|
crypto = "crypto",
|
|
268
268
|
wire = "wire",
|
|
269
269
|
cashApp = "cashApp",
|
|
270
|
-
|
|
270
|
+
apa = "apa",
|
|
271
|
+
paypal = "paypal",
|
|
272
|
+
venmo = "venmo",
|
|
273
|
+
interac = "interac"
|
|
271
274
|
}
|
|
272
275
|
export declare const paymentMethodLabels: Record<PaymentMethods, string>;
|
|
273
276
|
export interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'blockchain'> {
|
|
@@ -282,8 +285,6 @@ export interface CoinflowCommonPaymentIntentProps extends Omit<CoinflowTypes, 'b
|
|
|
282
285
|
/**
|
|
283
286
|
* The DeviceID gotten from the Coinflow SDK:
|
|
284
287
|
* https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
|
|
285
|
-
*
|
|
286
|
-
* nSureSDK.getDeviceId()
|
|
287
288
|
*/
|
|
288
289
|
deviceId?: string;
|
|
289
290
|
/**
|
|
@@ -344,8 +345,6 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
344
345
|
/**
|
|
345
346
|
* The DeviceID gotten from the Coinflow SDK:
|
|
346
347
|
* https://docs.coinflow.cash/guides/checkout/fraud-protection/chargeback-protection/implement-chargeback-protection#how-to-add-chargeback-protection
|
|
347
|
-
*
|
|
348
|
-
* nSureSDK.getDeviceId()
|
|
349
348
|
*/
|
|
350
349
|
deviceId?: string;
|
|
351
350
|
jwtToken?: string;
|
|
@@ -365,6 +364,11 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
365
364
|
threeDsChallengePreference?: ThreeDsChallengePreference;
|
|
366
365
|
destinationAuthKey?: string;
|
|
367
366
|
accountFundingTransaction?: AccountFundingTransaction;
|
|
367
|
+
/**
|
|
368
|
+
* Custom preset deposit amounts (in dollars) to display in the AmountSelector.
|
|
369
|
+
* Only the first 3 values are used. Defaults to [10, 25, 50] if not provided.
|
|
370
|
+
*/
|
|
371
|
+
depositAmounts?: number[];
|
|
368
372
|
}
|
|
369
373
|
export interface WithGeo {
|
|
370
374
|
/**
|
|
@@ -635,7 +639,7 @@ export interface DecentRedeem extends CommonEvmRedeem {
|
|
|
635
639
|
* 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.
|
|
636
640
|
*/
|
|
637
641
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
|
|
638
|
-
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 {
|
|
642
|
+
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' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'>, WithGeo {
|
|
639
643
|
walletPubkey: string | null | undefined;
|
|
640
644
|
sessionKey?: string;
|
|
641
645
|
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, 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 & {
|
|
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, depositAmounts, baseUrl, }: CoinflowIFrameProps & {
|
|
11
11
|
baseUrl?: string;
|
|
12
12
|
} & WithGeo): string;
|
|
13
13
|
static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getForterToken(): string | null;
|
|
2
|
+
export declare function captureForterToken({ timeoutMs, intervalMs, }?: {
|
|
3
|
+
timeoutMs?: number;
|
|
4
|
+
intervalMs?: number;
|
|
5
|
+
}): void;
|
|
6
|
+
export declare function awaitForterToken({ timeoutMs, intervalMs, }?: {
|
|
7
|
+
timeoutMs?: number;
|
|
8
|
+
intervalMs?: number;
|
|
9
|
+
}): Promise<string | null>;
|
|
10
|
+
export default getForterToken;
|
|
@@ -11,3 +11,4 @@ export * from './types/nftCartItem';
|
|
|
11
11
|
export * from './types/cryptoCartItem';
|
|
12
12
|
export * from './CoinflowPurchaseProtectionHeaders';
|
|
13
13
|
export * from './CoinflowProtectionInit';
|
|
14
|
+
export { default as getForterToken, captureForterToken, awaitForterToken, } from './Forter';
|