@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.
- package/dist/coinflow-vue.js +5500 -5451
- package/dist/coinflow-vue.umd.cjs +11 -11
- package/dist/components/CoinflowPurchase.vue.d.ts +139 -148
- package/dist/components/CoinflowWithdraw.vue.d.ts +76 -44
- package/dist/components/card-form/useCardformIframe.d.ts +2 -2
- package/dist/index.d.ts +13 -13
- package/dist/lib/common/CoinflowProtectionInit.native.d.ts +1 -0
- package/dist/lib/common/CoinflowPurchaseProtectionHeaders.d.ts +5 -0
- package/dist/lib/common/CoinflowTypes.d.ts +82 -9
- package/dist/lib/common/CoinflowUtils.d.ts +5 -2
- package/dist/testing/CardFormV2Test.vue.d.ts +41 -0
- package/dist/testing/SavedCardFormTest.vue.d.ts +4 -4
- package/package.json +1 -2
|
@@ -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('
|
|
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('
|
|
28
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
29
|
+
userLocation?: {
|
|
30
|
+
lat: number;
|
|
31
|
+
lng: number;
|
|
32
|
+
};
|
|
29
33
|
merchantId: string;
|
|
30
|
-
env?: import('
|
|
34
|
+
env?: import('..').CoinflowEnvs;
|
|
31
35
|
loaderBackground?: string;
|
|
32
36
|
blockchain: "solana";
|
|
33
37
|
handleHeightChange?: (height: string) => void;
|
|
34
|
-
theme?: import('
|
|
35
|
-
wallet: import('
|
|
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('
|
|
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('
|
|
59
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
60
|
+
userLocation?: {
|
|
61
|
+
lat: number;
|
|
62
|
+
lng: number;
|
|
63
|
+
};
|
|
56
64
|
merchantId: string;
|
|
57
|
-
env?: import('
|
|
65
|
+
env?: import('..').CoinflowEnvs;
|
|
58
66
|
loaderBackground?: string;
|
|
59
67
|
blockchain: "eth";
|
|
60
68
|
handleHeightChange?: (height: string) => void;
|
|
61
|
-
theme?: import('
|
|
62
|
-
wallet: import('
|
|
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('
|
|
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('
|
|
90
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
91
|
+
userLocation?: {
|
|
92
|
+
lat: number;
|
|
93
|
+
lng: number;
|
|
94
|
+
};
|
|
83
95
|
merchantId: string;
|
|
84
|
-
env?: import('
|
|
96
|
+
env?: import('..').CoinflowEnvs;
|
|
85
97
|
loaderBackground?: string;
|
|
86
98
|
blockchain: "polygon";
|
|
87
99
|
handleHeightChange?: (height: string) => void;
|
|
88
|
-
theme?: import('
|
|
89
|
-
wallet: import('
|
|
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('
|
|
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('
|
|
121
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
122
|
+
userLocation?: {
|
|
123
|
+
lat: number;
|
|
124
|
+
lng: number;
|
|
125
|
+
};
|
|
110
126
|
merchantId: string;
|
|
111
|
-
env?: import('
|
|
127
|
+
env?: import('..').CoinflowEnvs;
|
|
112
128
|
loaderBackground?: string;
|
|
113
129
|
blockchain: "base";
|
|
114
130
|
handleHeightChange?: (height: string) => void;
|
|
115
|
-
theme?: import('
|
|
116
|
-
wallet: import('
|
|
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('
|
|
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('
|
|
152
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
153
|
+
userLocation?: {
|
|
154
|
+
lat: number;
|
|
155
|
+
lng: number;
|
|
156
|
+
};
|
|
137
157
|
merchantId: string;
|
|
138
|
-
env?: import('
|
|
158
|
+
env?: import('..').CoinflowEnvs;
|
|
139
159
|
loaderBackground?: string;
|
|
140
160
|
blockchain: "arbitrum";
|
|
141
161
|
handleHeightChange?: (height: string) => void;
|
|
142
|
-
theme?: import('
|
|
143
|
-
wallet: import('
|
|
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('
|
|
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('
|
|
183
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
184
|
+
userLocation?: {
|
|
185
|
+
lat: number;
|
|
186
|
+
lng: number;
|
|
187
|
+
};
|
|
164
188
|
merchantId: string;
|
|
165
|
-
env?: import('
|
|
189
|
+
env?: import('..').CoinflowEnvs;
|
|
166
190
|
loaderBackground?: string;
|
|
167
191
|
blockchain: "stellar";
|
|
168
192
|
handleHeightChange?: (height: string) => void;
|
|
169
|
-
theme?: import('
|
|
170
|
-
wallet: import('
|
|
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('
|
|
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('
|
|
213
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
214
|
+
userLocation?: {
|
|
215
|
+
lat: number;
|
|
216
|
+
lng: number;
|
|
217
|
+
};
|
|
190
218
|
merchantId: string;
|
|
191
|
-
env?: import('
|
|
219
|
+
env?: import('..').CoinflowEnvs;
|
|
192
220
|
loaderBackground?: string;
|
|
193
221
|
blockchain: "monad";
|
|
194
222
|
handleHeightChange?: (height: string) => void;
|
|
195
|
-
theme?: import('
|
|
196
|
-
wallet: import('
|
|
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('
|
|
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('
|
|
244
|
+
allowedWithdrawSpeeds?: import('..').WithdrawSpeed[];
|
|
245
|
+
userLocation?: {
|
|
246
|
+
lat: number;
|
|
247
|
+
lng: number;
|
|
248
|
+
};
|
|
217
249
|
merchantId: string;
|
|
218
|
-
env?: import('
|
|
250
|
+
env?: import('..').CoinflowEnvs;
|
|
219
251
|
loaderBackground?: string;
|
|
220
252
|
blockchain: "tempo";
|
|
221
253
|
handleHeightChange?: (height: string) => void;
|
|
222
|
-
theme?: import('
|
|
223
|
-
wallet: import('
|
|
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('
|
|
229
|
-
onAuthDeclined: import('
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
18
|
-
theme?: import('
|
|
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('
|
|
32
|
-
theme?: import('
|
|
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('
|
|
45
|
+
type: import('vue').PropType<import('.').CoinflowCardNumberInputProps & import('.').MerchantIdOrCheckoutJwt>;
|
|
46
46
|
required: true;
|
|
47
47
|
};
|
|
48
48
|
}>, {
|
|
49
|
-
getToken: () => Promise<import('
|
|
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('
|
|
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('
|
|
61
|
+
type: import('vue').PropType<import('.').CoinflowCvvOnlyInputProps & import('.').MerchantIdOrCheckoutJwt>;
|
|
62
62
|
required: true;
|
|
63
63
|
};
|
|
64
64
|
}>, {
|
|
65
|
-
getToken: () => Promise<import('
|
|
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('
|
|
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('
|
|
75
|
+
type: import('vue').PropType<import('.').CoinflowCardNumberInputProps & import('.').MerchantIdOrCheckoutJwt>;
|
|
76
76
|
required: true;
|
|
77
77
|
};
|
|
78
78
|
}>, {
|
|
79
|
-
getToken: () => Promise<import('
|
|
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('
|
|
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
|
-
*
|
|
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
|
|
270
|
-
|
|
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
|
-
*
|
|
273
|
-
*
|
|
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
|
-
|
|
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' | '
|
|
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,
|
|
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('
|
|
4
|
+
type: import('vue').PropType<import('..').CoinflowCvvOnlyInputProps & import('..').MerchantIdOrCheckoutJwt>;
|
|
5
5
|
required: true;
|
|
6
6
|
};
|
|
7
7
|
}>> & Readonly<{}>, {
|
|
8
|
-
getToken: () => Promise<import('
|
|
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('
|
|
18
|
+
type: import('vue').PropType<import('..').CoinflowCvvOnlyInputProps & import('..').MerchantIdOrCheckoutJwt>;
|
|
19
19
|
required: true;
|
|
20
20
|
};
|
|
21
21
|
}>> & Readonly<{}>, {
|
|
22
|
-
getToken: () => Promise<import('
|
|
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.
|
|
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",
|