@coinflowlabs/vue 1.13.0 → 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.
- package/dist/coinflow-vue.js +5467 -5434
- package/dist/coinflow-vue.umd.cjs +11 -11
- package/dist/components/CoinflowPurchase.vue.d.ts +0 -9
- package/dist/lib/common/CoinflowTypes.d.ts +56 -8
- package/dist/lib/common/CoinflowUtils.d.ts +5 -2
- package/dist/testing/CardFormV2Test.vue.d.ts +41 -0
- package/package.json +1 -1
|
@@ -24,7 +24,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
24
24
|
};
|
|
25
25
|
redemptionCheck?: boolean;
|
|
26
26
|
subtotal?: import('..').Subtotal;
|
|
27
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
28
27
|
presentment?: import('..').Currency;
|
|
29
28
|
onSuccess?: import('..').OnSuccessMethod;
|
|
30
29
|
sessionKey?: string;
|
|
@@ -63,7 +62,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
63
62
|
wallet?: undefined;
|
|
64
63
|
blockchain?: import('..').CoinflowBlockchain | undefined;
|
|
65
64
|
subtotal?: import('..').Subtotal;
|
|
66
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
67
65
|
presentment?: import('..').Currency;
|
|
68
66
|
onSuccess?: import('..').OnSuccessMethod;
|
|
69
67
|
onAuthDeclined?: import('..').OnAuthDeclinedMethod;
|
|
@@ -100,7 +98,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
100
98
|
blockchain: "polygon";
|
|
101
99
|
wallet: import('..').EthWallet;
|
|
102
100
|
subtotal?: import('..').Subtotal;
|
|
103
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
104
101
|
presentment?: import('..').Currency;
|
|
105
102
|
onSuccess?: import('..').OnSuccessMethod;
|
|
106
103
|
sessionKey?: string;
|
|
@@ -138,7 +135,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
138
135
|
blockchain: "eth";
|
|
139
136
|
wallet: import('..').EthWallet;
|
|
140
137
|
subtotal?: import('..').Subtotal;
|
|
141
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
142
138
|
presentment?: import('..').Currency;
|
|
143
139
|
onSuccess?: import('..').OnSuccessMethod;
|
|
144
140
|
sessionKey?: string;
|
|
@@ -176,7 +172,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
176
172
|
blockchain: "base";
|
|
177
173
|
wallet: import('..').EthWallet;
|
|
178
174
|
subtotal?: import('..').Subtotal;
|
|
179
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
180
175
|
presentment?: import('..').Currency;
|
|
181
176
|
onSuccess?: import('..').OnSuccessMethod;
|
|
182
177
|
sessionKey?: string;
|
|
@@ -214,7 +209,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
214
209
|
blockchain: "arbitrum";
|
|
215
210
|
wallet: import('..').EthWallet;
|
|
216
211
|
subtotal?: import('..').Subtotal;
|
|
217
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
218
212
|
presentment?: import('..').Currency;
|
|
219
213
|
onSuccess?: import('..').OnSuccessMethod;
|
|
220
214
|
sessionKey?: string;
|
|
@@ -252,7 +246,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
252
246
|
wallet: import('..').StellarWallet;
|
|
253
247
|
blockchain: "stellar";
|
|
254
248
|
subtotal?: import('..').Subtotal;
|
|
255
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
256
249
|
presentment?: import('..').Currency;
|
|
257
250
|
onSuccess?: import('..').OnSuccessMethod;
|
|
258
251
|
sessionKey?: string;
|
|
@@ -290,7 +283,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
290
283
|
blockchain: "monad";
|
|
291
284
|
wallet: import('..').EthWallet;
|
|
292
285
|
subtotal?: import('..').Subtotal;
|
|
293
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
294
286
|
presentment?: import('..').Currency;
|
|
295
287
|
onSuccess?: import('..').OnSuccessMethod;
|
|
296
288
|
sessionKey?: string;
|
|
@@ -328,7 +320,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
328
320
|
blockchain: "tempo";
|
|
329
321
|
wallet: import('..').EthWallet;
|
|
330
322
|
subtotal?: import('..').Subtotal;
|
|
331
|
-
customPayInFees?: import('..').PurchaseCustomPayInFee[];
|
|
332
323
|
presentment?: import('..').Currency;
|
|
333
324
|
onSuccess?: import('..').OnSuccessMethod;
|
|
334
325
|
sessionKey?: string;
|
|
@@ -29,7 +29,7 @@ export declare enum SettlementType {
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Configuration for a single custom pay-in fee line item.
|
|
32
|
-
*
|
|
32
|
+
* Pass via the `customPayInFees` field on `/checkout/link` or `/checkout/jwt-token`.
|
|
33
33
|
*/
|
|
34
34
|
export interface PurchaseCustomPayInFee {
|
|
35
35
|
lineItemLabel: string;
|
|
@@ -264,16 +264,48 @@ export declare enum PaymentMethods {
|
|
|
264
264
|
credits = "credits",
|
|
265
265
|
crypto = "crypto",
|
|
266
266
|
wire = "wire",
|
|
267
|
-
cashApp = "cashApp"
|
|
267
|
+
cashApp = "cashApp",
|
|
268
|
+
rain = "rain"
|
|
268
269
|
}
|
|
269
270
|
export declare const paymentMethodLabels: Record<PaymentMethods, string>;
|
|
270
|
-
export interface
|
|
271
|
-
|
|
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[];
|
|
272
296
|
/**
|
|
273
|
-
*
|
|
274
|
-
*
|
|
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.
|
|
275
303
|
*/
|
|
276
|
-
|
|
304
|
+
wallet?: WalletTypes;
|
|
305
|
+
blockchain?: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad';
|
|
306
|
+
}
|
|
307
|
+
export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
308
|
+
subtotal?: Subtotal;
|
|
277
309
|
presentment?: Currency;
|
|
278
310
|
onSuccess?: OnSuccessMethod;
|
|
279
311
|
sessionKey?: string;
|
|
@@ -601,7 +633,7 @@ export interface DecentRedeem extends CommonEvmRedeem {
|
|
|
601
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.
|
|
602
634
|
*/
|
|
603
635
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
|
|
604
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | '
|
|
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 {
|
|
605
637
|
walletPubkey: string | null | undefined;
|
|
606
638
|
sessionKey?: string;
|
|
607
639
|
route: string;
|
|
@@ -616,6 +648,22 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' |
|
|
|
616
648
|
usePermit?: boolean;
|
|
617
649
|
handleHeightChangeId: string | number;
|
|
618
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
|
+
}
|
|
619
667
|
export declare enum CardType {
|
|
620
668
|
VISA = "VISA",
|
|
621
669
|
MASTERCARD = "MSTR",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps, CustomerInfo, WithGeo } 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,9 +7,12 @@ 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,
|
|
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
11
|
baseUrl?: string;
|
|
12
12
|
} & WithGeo): string;
|
|
13
|
+
static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
}): string;
|
|
13
16
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
14
17
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
15
18
|
solana: T;
|
|
@@ -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;
|