@coinflowlabs/vue 1.19.0 → 1.19.2
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 +14423 -15169
- package/dist/coinflow-vue.umd.cjs +20 -20
- package/dist/components/CoinflowPurchase.vue.d.ts +12 -9
- package/dist/components/CoinflowWithdraw.vue.d.ts +19 -0
- package/dist/lib/common/CoinflowLibMessageHandlers.d.ts +18 -2
- package/dist/lib/common/CoinflowTypes.d.ts +92 -7
- package/dist/lib/common/CoinflowUtils.d.ts +6 -1
- package/dist/lib/common/bankLinkCallback.d.ts +53 -0
- package/dist/lib/common/index.d.ts +1 -0
- package/dist/lib/common/types/Subtotal.d.ts +16 -1
- package/package.json +3 -5
|
@@ -47,7 +47,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
47
47
|
partialUsdcChecked?: boolean;
|
|
48
48
|
deviceId?: string;
|
|
49
49
|
jwtToken?: string;
|
|
50
|
-
supportEmail?: string;
|
|
51
50
|
origins?: string[];
|
|
52
51
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
53
52
|
destinationAuthKey?: string;
|
|
@@ -58,6 +57,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
58
57
|
loaderBackground?: string;
|
|
59
58
|
handleHeightChange?: (height: string) => void;
|
|
60
59
|
theme?: import('..').MerchantTheme;
|
|
60
|
+
supportEmail?: string;
|
|
61
61
|
} | {
|
|
62
62
|
walletPubkey: string | null | undefined;
|
|
63
63
|
route: string;
|
|
@@ -88,7 +88,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
88
88
|
partialUsdcChecked?: boolean;
|
|
89
89
|
deviceId?: string;
|
|
90
90
|
jwtToken?: string;
|
|
91
|
-
supportEmail?: string;
|
|
92
91
|
origins?: string[];
|
|
93
92
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
94
93
|
destinationAuthKey?: string;
|
|
@@ -99,6 +98,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
99
98
|
loaderBackground?: string;
|
|
100
99
|
handleHeightChange?: (height: string) => void;
|
|
101
100
|
theme?: import('..').MerchantTheme;
|
|
101
|
+
supportEmail?: string;
|
|
102
102
|
} | {
|
|
103
103
|
walletPubkey: string | null | undefined;
|
|
104
104
|
route: string;
|
|
@@ -129,7 +129,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
129
129
|
partialUsdcChecked?: boolean;
|
|
130
130
|
deviceId?: string;
|
|
131
131
|
jwtToken?: string;
|
|
132
|
-
supportEmail?: string;
|
|
133
132
|
origins?: string[];
|
|
134
133
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
135
134
|
destinationAuthKey?: string;
|
|
@@ -140,6 +139,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
140
139
|
loaderBackground?: string;
|
|
141
140
|
handleHeightChange?: (height: string) => void;
|
|
142
141
|
theme?: import('..').MerchantTheme;
|
|
142
|
+
supportEmail?: string;
|
|
143
143
|
} | {
|
|
144
144
|
walletPubkey: string | null | undefined;
|
|
145
145
|
route: string;
|
|
@@ -170,7 +170,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
170
170
|
partialUsdcChecked?: boolean;
|
|
171
171
|
deviceId?: string;
|
|
172
172
|
jwtToken?: string;
|
|
173
|
-
supportEmail?: string;
|
|
174
173
|
origins?: string[];
|
|
175
174
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
176
175
|
destinationAuthKey?: string;
|
|
@@ -181,6 +180,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
181
180
|
loaderBackground?: string;
|
|
182
181
|
handleHeightChange?: (height: string) => void;
|
|
183
182
|
theme?: import('..').MerchantTheme;
|
|
183
|
+
supportEmail?: string;
|
|
184
184
|
} | {
|
|
185
185
|
walletPubkey: string | null | undefined;
|
|
186
186
|
route: string;
|
|
@@ -211,7 +211,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
211
211
|
partialUsdcChecked?: boolean;
|
|
212
212
|
deviceId?: string;
|
|
213
213
|
jwtToken?: string;
|
|
214
|
-
supportEmail?: string;
|
|
215
214
|
origins?: string[];
|
|
216
215
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
217
216
|
destinationAuthKey?: string;
|
|
@@ -222,6 +221,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
222
221
|
loaderBackground?: string;
|
|
223
222
|
handleHeightChange?: (height: string) => void;
|
|
224
223
|
theme?: import('..').MerchantTheme;
|
|
224
|
+
supportEmail?: string;
|
|
225
225
|
} | {
|
|
226
226
|
walletPubkey: string | null | undefined;
|
|
227
227
|
route: string;
|
|
@@ -252,7 +252,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
252
252
|
partialUsdcChecked?: boolean;
|
|
253
253
|
deviceId?: string;
|
|
254
254
|
jwtToken?: string;
|
|
255
|
-
supportEmail?: string;
|
|
256
255
|
origins?: string[];
|
|
257
256
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
258
257
|
destinationAuthKey?: string;
|
|
@@ -263,6 +262,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
263
262
|
loaderBackground?: string;
|
|
264
263
|
handleHeightChange?: (height: string) => void;
|
|
265
264
|
theme?: import('..').MerchantTheme;
|
|
265
|
+
supportEmail?: string;
|
|
266
266
|
} | {
|
|
267
267
|
walletPubkey: string | null | undefined;
|
|
268
268
|
route: string;
|
|
@@ -293,7 +293,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
293
293
|
partialUsdcChecked?: boolean;
|
|
294
294
|
deviceId?: string;
|
|
295
295
|
jwtToken?: string;
|
|
296
|
-
supportEmail?: string;
|
|
297
296
|
origins?: string[];
|
|
298
297
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
299
298
|
destinationAuthKey?: string;
|
|
@@ -304,6 +303,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
304
303
|
loaderBackground?: string;
|
|
305
304
|
handleHeightChange?: (height: string) => void;
|
|
306
305
|
theme?: import('..').MerchantTheme;
|
|
306
|
+
supportEmail?: string;
|
|
307
307
|
} | {
|
|
308
308
|
walletPubkey: string | null | undefined;
|
|
309
309
|
route: string;
|
|
@@ -334,7 +334,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
334
334
|
partialUsdcChecked?: boolean;
|
|
335
335
|
deviceId?: string;
|
|
336
336
|
jwtToken?: string;
|
|
337
|
-
supportEmail?: string;
|
|
338
337
|
origins?: string[];
|
|
339
338
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
340
339
|
destinationAuthKey?: string;
|
|
@@ -345,6 +344,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
345
344
|
loaderBackground?: string;
|
|
346
345
|
handleHeightChange?: (height: string) => void;
|
|
347
346
|
theme?: import('..').MerchantTheme;
|
|
347
|
+
supportEmail?: string;
|
|
348
348
|
} | {
|
|
349
349
|
walletPubkey: string | null | undefined;
|
|
350
350
|
route: string;
|
|
@@ -375,7 +375,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
375
375
|
partialUsdcChecked?: boolean;
|
|
376
376
|
deviceId?: string;
|
|
377
377
|
jwtToken?: string;
|
|
378
|
-
supportEmail?: string;
|
|
379
378
|
origins?: string[];
|
|
380
379
|
threeDsChallengePreference?: import('..').ThreeDsChallengePreference;
|
|
381
380
|
destinationAuthKey?: string;
|
|
@@ -386,9 +385,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
386
385
|
loaderBackground?: string;
|
|
387
386
|
handleHeightChange?: (height: string) => void;
|
|
388
387
|
theme?: import('..').MerchantTheme;
|
|
388
|
+
supportEmail?: string;
|
|
389
389
|
};
|
|
390
390
|
messageHandlers(): {
|
|
391
391
|
handleHeightChange: ((height: string) => void) | undefined;
|
|
392
|
+
onAccountLinked?: import('..').OnAccountLinkedMethod | undefined;
|
|
393
|
+
onAccountNotLinked?: import('..').OnAccountNotLinkedMethod | undefined;
|
|
394
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod | undefined;
|
|
392
395
|
onSuccess: import('..').OnSuccessMethod | undefined;
|
|
393
396
|
onAuthDeclined: import('..').OnAuthDeclinedMethod | undefined;
|
|
394
397
|
onInputError?: import('..').OnInputErrorMethod | undefined;
|
|
@@ -12,6 +12,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
12
12
|
route: string;
|
|
13
13
|
transaction: undefined;
|
|
14
14
|
onSuccess?: import('..').OnSuccessMethod;
|
|
15
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
15
16
|
tokens?: string[];
|
|
16
17
|
lockDefaultToken?: boolean;
|
|
17
18
|
amount?: number;
|
|
@@ -37,6 +38,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
37
38
|
blockchain: "solana";
|
|
38
39
|
handleHeightChange?: (height: string) => void;
|
|
39
40
|
theme?: import('..').MerchantTheme;
|
|
41
|
+
supportEmail?: string;
|
|
40
42
|
wallet: import('..').SolanaWallet;
|
|
41
43
|
connection: import('@solana/web3.js').Connection;
|
|
42
44
|
ownerOverride?: string;
|
|
@@ -45,6 +47,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
45
47
|
route: string;
|
|
46
48
|
transaction: undefined;
|
|
47
49
|
onSuccess?: import('..').OnSuccessMethod;
|
|
50
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
48
51
|
tokens?: string[];
|
|
49
52
|
lockDefaultToken?: boolean;
|
|
50
53
|
amount?: number;
|
|
@@ -70,6 +73,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
70
73
|
blockchain: "eth";
|
|
71
74
|
handleHeightChange?: (height: string) => void;
|
|
72
75
|
theme?: import('..').MerchantTheme;
|
|
76
|
+
supportEmail?: string;
|
|
73
77
|
wallet: import('..').EthWallet;
|
|
74
78
|
usePermit?: boolean;
|
|
75
79
|
} | {
|
|
@@ -77,6 +81,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
77
81
|
route: string;
|
|
78
82
|
transaction: undefined;
|
|
79
83
|
onSuccess?: import('..').OnSuccessMethod;
|
|
84
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
80
85
|
tokens?: string[];
|
|
81
86
|
lockDefaultToken?: boolean;
|
|
82
87
|
amount?: number;
|
|
@@ -102,6 +107,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
102
107
|
blockchain: "polygon";
|
|
103
108
|
handleHeightChange?: (height: string) => void;
|
|
104
109
|
theme?: import('..').MerchantTheme;
|
|
110
|
+
supportEmail?: string;
|
|
105
111
|
wallet: import('..').EthWallet;
|
|
106
112
|
usePermit?: boolean;
|
|
107
113
|
} | {
|
|
@@ -109,6 +115,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
109
115
|
route: string;
|
|
110
116
|
transaction: undefined;
|
|
111
117
|
onSuccess?: import('..').OnSuccessMethod;
|
|
118
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
112
119
|
tokens?: string[];
|
|
113
120
|
lockDefaultToken?: boolean;
|
|
114
121
|
amount?: number;
|
|
@@ -134,6 +141,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
134
141
|
blockchain: "base";
|
|
135
142
|
handleHeightChange?: (height: string) => void;
|
|
136
143
|
theme?: import('..').MerchantTheme;
|
|
144
|
+
supportEmail?: string;
|
|
137
145
|
wallet: import('..').EthWallet;
|
|
138
146
|
usePermit?: boolean;
|
|
139
147
|
} | {
|
|
@@ -141,6 +149,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
141
149
|
route: string;
|
|
142
150
|
transaction: undefined;
|
|
143
151
|
onSuccess?: import('..').OnSuccessMethod;
|
|
152
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
144
153
|
tokens?: string[];
|
|
145
154
|
lockDefaultToken?: boolean;
|
|
146
155
|
amount?: number;
|
|
@@ -166,6 +175,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
166
175
|
blockchain: "arbitrum";
|
|
167
176
|
handleHeightChange?: (height: string) => void;
|
|
168
177
|
theme?: import('..').MerchantTheme;
|
|
178
|
+
supportEmail?: string;
|
|
169
179
|
wallet: import('..').EthWallet;
|
|
170
180
|
usePermit?: boolean;
|
|
171
181
|
} | {
|
|
@@ -173,6 +183,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
173
183
|
route: string;
|
|
174
184
|
transaction: undefined;
|
|
175
185
|
onSuccess?: import('..').OnSuccessMethod;
|
|
186
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
176
187
|
tokens?: string[];
|
|
177
188
|
lockDefaultToken?: boolean;
|
|
178
189
|
amount?: number;
|
|
@@ -198,12 +209,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
198
209
|
blockchain: "stellar";
|
|
199
210
|
handleHeightChange?: (height: string) => void;
|
|
200
211
|
theme?: import('..').MerchantTheme;
|
|
212
|
+
supportEmail?: string;
|
|
201
213
|
wallet: import('..').StellarWallet;
|
|
202
214
|
} | {
|
|
203
215
|
walletPubkey: string | null | undefined;
|
|
204
216
|
route: string;
|
|
205
217
|
transaction: undefined;
|
|
206
218
|
onSuccess?: import('..').OnSuccessMethod;
|
|
219
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
207
220
|
tokens?: string[];
|
|
208
221
|
lockDefaultToken?: boolean;
|
|
209
222
|
amount?: number;
|
|
@@ -229,6 +242,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
229
242
|
blockchain: "monad";
|
|
230
243
|
handleHeightChange?: (height: string) => void;
|
|
231
244
|
theme?: import('..').MerchantTheme;
|
|
245
|
+
supportEmail?: string;
|
|
232
246
|
wallet: import('..').EthWallet;
|
|
233
247
|
usePermit?: boolean;
|
|
234
248
|
} | {
|
|
@@ -236,6 +250,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
236
250
|
route: string;
|
|
237
251
|
transaction: undefined;
|
|
238
252
|
onSuccess?: import('..').OnSuccessMethod;
|
|
253
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod;
|
|
239
254
|
tokens?: string[];
|
|
240
255
|
lockDefaultToken?: boolean;
|
|
241
256
|
amount?: number;
|
|
@@ -261,11 +276,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
261
276
|
blockchain: "tempo";
|
|
262
277
|
handleHeightChange?: (height: string) => void;
|
|
263
278
|
theme?: import('..').MerchantTheme;
|
|
279
|
+
supportEmail?: string;
|
|
264
280
|
wallet: import('..').EthWallet;
|
|
265
281
|
usePermit?: boolean;
|
|
266
282
|
};
|
|
267
283
|
messageHandlers(): {
|
|
268
284
|
handleHeightChange: ((height: string) => void) | undefined;
|
|
285
|
+
onAccountLinked?: import('..').OnAccountLinkedMethod | undefined;
|
|
286
|
+
onAccountNotLinked?: import('..').OnAccountNotLinkedMethod | undefined;
|
|
287
|
+
onAccountLinkError?: import('..').OnAccountLinkErrorMethod | undefined;
|
|
269
288
|
onSuccess: import('..').OnSuccessMethod | undefined;
|
|
270
289
|
onAuthDeclined: import('..').OnAuthDeclinedMethod | undefined;
|
|
271
290
|
onInputError?: import('..').OnInputErrorMethod | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoinflowPurchaseProps, OnAuthDeclinedMethod, OnInputErrorMethod, OnInputValidMethod, OnSuccessMethod } from './CoinflowTypes';
|
|
1
|
+
import { CoinflowPurchaseProps, OnAccountLinkedMethod, OnAccountLinkErrorMethod, OnAccountNotLinkedMethod, OnAuthDeclinedMethod, OnInputErrorMethod, OnInputValidMethod, OnSuccessMethod } from './CoinflowTypes';
|
|
2
2
|
export type WalletCall = {
|
|
3
3
|
method: IFrameMessageMethods;
|
|
4
4
|
data: string;
|
|
@@ -20,6 +20,16 @@ export interface IFrameMessageHandlers {
|
|
|
20
20
|
onAuthDeclined: OnAuthDeclinedMethod | undefined;
|
|
21
21
|
onInputError?: OnInputErrorMethod | undefined;
|
|
22
22
|
onInputValid?: OnInputValidMethod | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Called when the customer finishes linking a payment or payout account in
|
|
25
|
+
* the iframe. For bank links the info carries the linked account tokens.
|
|
26
|
+
*/
|
|
27
|
+
onAccountLinked?: OnAccountLinkedMethod | undefined;
|
|
28
|
+
onAccountNotLinked?: OnAccountNotLinkedMethod | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Called when an account link attempt fails, with the error that caused it.
|
|
31
|
+
*/
|
|
32
|
+
onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
|
|
23
33
|
/**
|
|
24
34
|
* Called when the iframe opens/closes an in-page overlay (e.g. the PayPal
|
|
25
35
|
* approval modal). `state` is 'open' or 'close'.
|
|
@@ -37,11 +47,17 @@ export declare enum IFrameMessageMethods {
|
|
|
37
47
|
InputValid = "inputValid",
|
|
38
48
|
Loaded = "loaded",
|
|
39
49
|
AccountLinked = "accountLinked",
|
|
50
|
+
AccountNotLinked = "accountNotLinked",
|
|
51
|
+
AccountLinkError = "accountLinkError",
|
|
40
52
|
Redirect = "redirect",
|
|
41
53
|
Overlay = "overlay",
|
|
42
54
|
UpdateSubtotal = "updateSubtotal"
|
|
43
55
|
}
|
|
44
56
|
export declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
|
|
45
57
|
export declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
|
|
46
|
-
export declare function getHandlers(props: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain' | 'onSuccess' | 'onAuthDeclined' | 'onInputError' | 'onInputValid'>
|
|
58
|
+
export declare function getHandlers(props: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain' | 'onSuccess' | 'onAuthDeclined' | 'onInputError' | 'onInputValid'> & {
|
|
59
|
+
onAccountLinked?: OnAccountLinkedMethod | undefined;
|
|
60
|
+
onAccountNotLinked?: OnAccountNotLinkedMethod | undefined;
|
|
61
|
+
onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
|
|
62
|
+
}): Omit<IFrameMessageHandlers, 'handleHeightChange'>;
|
|
47
63
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BankLinkStatus } from './bankLinkCallback';
|
|
1
2
|
import { Connection, VersionedTransaction, PublicKey, Signer, Transaction } from '@solana/web3.js';
|
|
2
3
|
import { Currency, Subtotal } from './types/Subtotal';
|
|
3
4
|
import { GiftCardCartItem } from './types/giftCardCartItem';
|
|
@@ -26,7 +27,8 @@ export declare enum WithdrawSpeed {
|
|
|
26
27
|
PAYPAL = "paypal",
|
|
27
28
|
WIRE = "wire",
|
|
28
29
|
INTERAC = "interac",
|
|
29
|
-
SWIFT = "swift"
|
|
30
|
+
SWIFT = "swift",
|
|
31
|
+
CRYPTO = "crypto"
|
|
30
32
|
}
|
|
31
33
|
export declare enum SettlementType {
|
|
32
34
|
Credits = "Credits",
|
|
@@ -138,7 +140,7 @@ export interface SplitNameCustomerInfo extends BaseCustomerInfo {
|
|
|
138
140
|
export type CustomerInfo = SplitNameCustomerInfo | NameCustomerInfo;
|
|
139
141
|
/** Coinflow Types **/
|
|
140
142
|
export type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'stellar' | 'monad' | 'tempo' | 'user';
|
|
141
|
-
export type CoinflowEnvs = 'prod' | 'staging' | '
|
|
143
|
+
export type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
|
|
142
144
|
export interface CoinflowTypes {
|
|
143
145
|
merchantId: string;
|
|
144
146
|
env?: CoinflowEnvs;
|
|
@@ -146,6 +148,8 @@ export interface CoinflowTypes {
|
|
|
146
148
|
blockchain?: CoinflowBlockchain | undefined;
|
|
147
149
|
handleHeightChange?: (height: string) => void;
|
|
148
150
|
theme?: MerchantTheme;
|
|
151
|
+
/** Your company email address that the customer can contact. */
|
|
152
|
+
supportEmail?: string;
|
|
149
153
|
}
|
|
150
154
|
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
151
155
|
export type MergeWithOptionalDiff<A, B> = Pick<A, Extract<keyof A, keyof B>> & Pick<B, Extract<keyof B, keyof A>> & Partial<Omit<A, keyof B>> & Partial<Omit<B, keyof A>>;
|
|
@@ -163,6 +167,43 @@ export type AuthDeclinedWalletCallInfo = {
|
|
|
163
167
|
export type OnAuthDeclinedMethod = (args: AuthDeclinedWalletCallInfo) => void | Promise<void>;
|
|
164
168
|
export type OnInputErrorMethod = (args: InputErrorWalletCallInfo) => void | Promise<void>;
|
|
165
169
|
export type OnInputValidMethod = (args: InputValidWalletCallInfo) => void | Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Mirrors `LinkedAccountType` in `@coinflow/common`. Redeclared here because
|
|
172
|
+
* lib-common ships to merchants and cannot depend on the server package.
|
|
173
|
+
*/
|
|
174
|
+
export type AccountLinkedType = 'bank' | 'card' | 'iban' | 'pix' | 'eft' | 'venmo' | 'paypal' | 'wire' | 'interac';
|
|
175
|
+
export interface AccountLinkedInfo {
|
|
176
|
+
type: AccountLinkedType;
|
|
177
|
+
/**
|
|
178
|
+
* The linked bank account tokens, each usable as the `token` field on an ACH
|
|
179
|
+
* checkout request. Present only for bank links.
|
|
180
|
+
*/
|
|
181
|
+
tokens?: string[];
|
|
182
|
+
}
|
|
183
|
+
export type OnAccountLinkedMethod = (info: AccountLinkedInfo) => void;
|
|
184
|
+
/**
|
|
185
|
+
* Why a linking session ended without an account.
|
|
186
|
+
*
|
|
187
|
+
* Derived from the standalone link's `bankLinkStatus` so the two entry points
|
|
188
|
+
* cannot drift: a merchant who moves between them meets the same vocabulary.
|
|
189
|
+
*/
|
|
190
|
+
export type AccountNotLinkedReason = Exclude<BankLinkStatus, 'linked'>;
|
|
191
|
+
export interface AccountNotLinkedInfo {
|
|
192
|
+
type: AccountLinkedType;
|
|
193
|
+
/**
|
|
194
|
+
* `canceled` when the customer backed out, `failed` when the account could
|
|
195
|
+
* not be linked — for example because the account holder's name could not be
|
|
196
|
+
* verified.
|
|
197
|
+
*/
|
|
198
|
+
reason: AccountNotLinkedReason;
|
|
199
|
+
}
|
|
200
|
+
export type OnAccountNotLinkedMethod = (info: AccountNotLinkedInfo) => void;
|
|
201
|
+
export interface AccountLinkErrorInfo {
|
|
202
|
+
type: AccountLinkedType;
|
|
203
|
+
message: string;
|
|
204
|
+
status?: number;
|
|
205
|
+
}
|
|
206
|
+
export type OnAccountLinkErrorMethod = (info: AccountLinkErrorInfo) => void;
|
|
166
207
|
/** Wallets **/
|
|
167
208
|
export interface SolanaWallet {
|
|
168
209
|
publicKey: PublicKey | null;
|
|
@@ -381,10 +422,6 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
381
422
|
*/
|
|
382
423
|
deviceId?: string;
|
|
383
424
|
jwtToken?: string;
|
|
384
|
-
/**
|
|
385
|
-
* Your company email address that the customer can contact.
|
|
386
|
-
*/
|
|
387
|
-
supportEmail?: string;
|
|
388
425
|
/**
|
|
389
426
|
* If rendering the Coinflow component within multiple nested iframes, all ancestors in the chain must be provided as a comma-separated list.
|
|
390
427
|
*
|
|
@@ -446,6 +483,9 @@ export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps
|
|
|
446
483
|
nativeSolToConvert?: {
|
|
447
484
|
lamports: string | number;
|
|
448
485
|
};
|
|
486
|
+
/**
|
|
487
|
+
* @deprecated No longer has any effect. Credits payments are always captured once the credits are delivered.
|
|
488
|
+
*/
|
|
449
489
|
redemptionCheck?: boolean;
|
|
450
490
|
}
|
|
451
491
|
export interface CoinflowSessionKeyPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
@@ -484,6 +524,7 @@ export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessio
|
|
|
484
524
|
/** Withdraw **/
|
|
485
525
|
export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
486
526
|
onSuccess?: OnSuccessMethod;
|
|
527
|
+
onAccountLinkError?: OnAccountLinkErrorMethod;
|
|
487
528
|
tokens?: string[];
|
|
488
529
|
lockDefaultToken?: boolean;
|
|
489
530
|
amount?: number;
|
|
@@ -689,7 +730,36 @@ export interface DecentRedeem extends CommonEvmRedeem {
|
|
|
689
730
|
* 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.
|
|
690
731
|
*/
|
|
691
732
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
|
|
692
|
-
|
|
733
|
+
/**
|
|
734
|
+
* Props for the embeddable `CoinflowBankLink` component.
|
|
735
|
+
*
|
|
736
|
+
* **Web only.** React Native and other mobile integrations cannot embed this
|
|
737
|
+
* component; send the customer to the standalone bank link URL instead.
|
|
738
|
+
*/
|
|
739
|
+
export interface CoinflowBankLinkProps extends Pick<CoinflowTypes, 'merchantId' | 'env' | 'blockchain' | 'loaderBackground' | 'theme' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'email' | 'customerInfo'> {
|
|
740
|
+
/** The customer must be authenticated to link a bank account. */
|
|
741
|
+
sessionKey: string;
|
|
742
|
+
merchantCss?: string;
|
|
743
|
+
/**
|
|
744
|
+
* Called once Plaid linking completes, with the tokens of the newly linked
|
|
745
|
+
* bank accounts.
|
|
746
|
+
*/
|
|
747
|
+
onAccountLinked?: OnAccountLinkedMethod | undefined;
|
|
748
|
+
/**
|
|
749
|
+
* Called when the session ends without linking an account — the customer
|
|
750
|
+
* cancelled, or the account could not be linked. The component stays
|
|
751
|
+
* mounted and does not navigate, so this is where you close or reset your
|
|
752
|
+
* own UI.
|
|
753
|
+
*/
|
|
754
|
+
onAccountNotLinked?: OnAccountNotLinkedMethod | undefined;
|
|
755
|
+
/**
|
|
756
|
+
* Called when a link attempt fails, with the error that caused it. The
|
|
757
|
+
* component stays on the failure screen, so this is where you surface the
|
|
758
|
+
* reason or log it for support.
|
|
759
|
+
*/
|
|
760
|
+
onAccountLinkError?: OnAccountLinkErrorMethod | undefined;
|
|
761
|
+
}
|
|
762
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'useNativeSubtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig' | 'depositAmounts'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'amount' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'>, WithGeo {
|
|
693
763
|
walletPubkey: string | null | undefined;
|
|
694
764
|
sessionKey?: string;
|
|
695
765
|
route: string;
|
|
@@ -709,6 +779,21 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' |
|
|
|
709
779
|
* WebView for subtotal updates relayed through localStorage.
|
|
710
780
|
*/
|
|
711
781
|
bridgeId?: string;
|
|
782
|
+
/**
|
|
783
|
+
* Ends the bank-linking page on its own confirmation instead of continuing
|
|
784
|
+
* into Coinflow's checkout.
|
|
785
|
+
*
|
|
786
|
+
* Internal. `<CoinflowBankLink>` sets it, and so does `POST /checkout/link`'s
|
|
787
|
+
* bank-link sibling when no `callbackUrl` is given, so neither SDK nor API
|
|
788
|
+
* integrators ever pass it themselves. It exists because the page is shared
|
|
789
|
+
* with the in-checkout linking step, where continuing to checkout is right.
|
|
790
|
+
*
|
|
791
|
+
* A hand-built iframe URL that omits it drops the customer into a Coinflow
|
|
792
|
+
* purchase flow once they link, which is wrong inside a merchant's own
|
|
793
|
+
* checkout. Build the URL from the bank-link endpoint rather than by hand.
|
|
794
|
+
* The `accountLinked` message carries the tokens either way.
|
|
795
|
+
*/
|
|
796
|
+
bankLinkOnly?: boolean;
|
|
712
797
|
}
|
|
713
798
|
export interface CoinflowIntentsIFrameProps {
|
|
714
799
|
theme?: MerchantTheme;
|
|
@@ -6,8 +6,13 @@ export declare class CoinflowUtils {
|
|
|
6
6
|
getNSurePartnerId(merchantId: string): Promise<string | undefined>;
|
|
7
7
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
8
8
|
static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
|
|
9
|
+
static isCoinflowMessageOrigin({ url, fallbackUrl, env, }: {
|
|
10
|
+
url: string | null | undefined;
|
|
11
|
+
fallbackUrl: string | null | undefined;
|
|
12
|
+
env?: CoinflowEnvs;
|
|
13
|
+
}): boolean;
|
|
9
14
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
10
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, useNativeSubtotal, 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,
|
|
15
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, useNativeSubtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, amount, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, appReturnUrl, depositAmounts, ownerOverride, bridgeId, bankLinkOnly, baseUrl, }: CoinflowIFrameProps & {
|
|
11
16
|
baseUrl?: string;
|
|
12
17
|
} & WithGeo): string;
|
|
13
18
|
static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outcome of a standalone bank-link session, reported to the merchant's
|
|
3
|
+
* `callbackUrl` as the `bankLinkStatus` query parameter.
|
|
4
|
+
*
|
|
5
|
+
* The customer returns to the same `callbackUrl` whether they linked an
|
|
6
|
+
* account, backed out, or could not be verified, so arriving there is not by
|
|
7
|
+
* itself evidence of a link.
|
|
8
|
+
*/
|
|
9
|
+
export type BankLinkStatus = 'linked' | 'canceled' | 'failed';
|
|
10
|
+
export declare const BANK_LINK_STATUS_PARAM = "bankLinkStatus";
|
|
11
|
+
/**
|
|
12
|
+
* Query parameters a standalone bank-link session appends to the merchant's
|
|
13
|
+
* `callbackUrl`.
|
|
14
|
+
*
|
|
15
|
+
* The return leg carries no secret — only the outcome. The linked accounts and
|
|
16
|
+
* their tokens are read from Get Customer, which is authenticated, so a
|
|
17
|
+
* payment-instrument token never rides a merchant-supplied redirect. The same
|
|
18
|
+
* invariant lets the shared redirect validator allow native-app deep links
|
|
19
|
+
* without a whitelist, so nothing may be added here.
|
|
20
|
+
*/
|
|
21
|
+
export declare function bankLinkCallbackParams({ status, }: {
|
|
22
|
+
status: BankLinkStatus;
|
|
23
|
+
}): Record<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* What the hosted bank-linking page does once an account is linked.
|
|
26
|
+
*
|
|
27
|
+
* `emit` is the embedded SDK case: `<CoinflowBankLink>` lives inside the
|
|
28
|
+
* merchant's own checkout, so the page reports the tokens through the
|
|
29
|
+
* accountLinked message and stops. Navigating onward would drop the customer
|
|
30
|
+
* into Coinflow's checkout, which the merchant owns.
|
|
31
|
+
*/
|
|
32
|
+
export type BankLinkCompletion = 'emit' | 'redirect' | 'returnToApp' | 'returnToCheckout';
|
|
33
|
+
/**
|
|
34
|
+
* Picks the completion behaviour for a finished bank link.
|
|
35
|
+
*
|
|
36
|
+
* `bankLinkOnly` wins over everything: the page was opened purely to link an
|
|
37
|
+
* account, so there is nowhere to send the customer afterwards.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveBankLinkCompletion({ bankLinkOnly, hasCallbackRedirect, isReactNativeLink, }: {
|
|
40
|
+
bankLinkOnly: boolean;
|
|
41
|
+
hasCallbackRedirect: boolean;
|
|
42
|
+
isReactNativeLink: boolean;
|
|
43
|
+
}): BankLinkCompletion;
|
|
44
|
+
/**
|
|
45
|
+
* How long the embedded flow holds the page blank before revealing the linked
|
|
46
|
+
* state.
|
|
47
|
+
*
|
|
48
|
+
* A merchant who unmounts <CoinflowBankLink> on the accountLinked event should
|
|
49
|
+
* never flash Coinflow's confirmation at their user, and a merchant who leaves
|
|
50
|
+
* it mounted should not be left looking at nothing. Long enough to cover the
|
|
51
|
+
* message hop and unmount, short enough not to read as a hang.
|
|
52
|
+
*/
|
|
53
|
+
export declare const BANK_LINK_REVEAL_DELAY_MS = 500;
|
|
@@ -20,3 +20,4 @@ export * from './CoinflowPurchaseProtectionHeaders';
|
|
|
20
20
|
export * from './CoinflowProtectionInit';
|
|
21
21
|
export { default as getForterToken, captureForterToken, awaitForterToken, } from './Forter';
|
|
22
22
|
export * from './plaidLinkTokenCache';
|
|
23
|
+
export * from './bankLinkCallback';
|
|
@@ -186,6 +186,16 @@ export interface Cents {
|
|
|
186
186
|
export interface CurrencyCents extends Cents {
|
|
187
187
|
currency: Currency;
|
|
188
188
|
}
|
|
189
|
+
export interface LamportsAmount {
|
|
190
|
+
/**
|
|
191
|
+
* Amount of lamports. Must be a whole, non-negative number; as a string it may
|
|
192
|
+
* contain digits only (no sign, decimal point, or exponent).
|
|
193
|
+
* @isInt lamports must be an integer
|
|
194
|
+
* @minimum 0 lamports must be non-negative
|
|
195
|
+
* @pattern ^\d+$ lamports must be a non-negative integer
|
|
196
|
+
*/
|
|
197
|
+
lamports: string | number;
|
|
198
|
+
}
|
|
189
199
|
export interface RemainingLimit extends CurrencyCents {
|
|
190
200
|
type: 'single transaction' | 'daily' | 'monthly';
|
|
191
201
|
}
|
|
@@ -212,7 +222,12 @@ export interface TokenSubtotal {
|
|
|
212
222
|
*/
|
|
213
223
|
address: string;
|
|
214
224
|
/**
|
|
215
|
-
* Number of tokens
|
|
225
|
+
* Number of tokens, from 0 to 1,000,000,000,000 inclusive.
|
|
226
|
+
* String values must be a plain decimal with at most 12 integer digits and
|
|
227
|
+
* 18 fractional digits.
|
|
228
|
+
* @minimum 0 amount must be non-negative
|
|
229
|
+
* @maximum 1000000000000 amount must be at most 1000000000000
|
|
230
|
+
* @pattern ^\d{1,12}(\.\d{1,18})?$ amount must be a non-negative decimal
|
|
216
231
|
*/
|
|
217
232
|
amount: number | string;
|
|
218
233
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.19.
|
|
4
|
+
"version": "1.19.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -12,11 +12,9 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"import": "./dist/coinflow-vue.js",
|
|
15
|
-
"require": "./dist/coinflow-vue.umd.cjs"
|
|
16
|
-
"types": "./dist/index.d.ts"
|
|
15
|
+
"require": "./dist/coinflow-vue.umd.cjs"
|
|
17
16
|
}
|
|
18
17
|
},
|
|
19
|
-
"types": "./dist/index.d.ts",
|
|
20
18
|
"scripts": {
|
|
21
19
|
"clean": "rimraf dist src/lib",
|
|
22
20
|
"vue:dev": "vite",
|
|
@@ -44,7 +42,7 @@
|
|
|
44
42
|
"vue-tsc": "^3.1.4"
|
|
45
43
|
},
|
|
46
44
|
"dependencies": {
|
|
47
|
-
"@nsure-ai/web-client-sdk": "^1.1.
|
|
45
|
+
"@nsure-ai/web-client-sdk": "^1.1.100",
|
|
48
46
|
"lz-string": "^1.5.0"
|
|
49
47
|
},
|
|
50
48
|
"peerDependenciesMeta": {
|