@coinflowlabs/vue 0.2.4 → 0.2.6
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/README.md +10 -2
- package/dist/App.vue.d.ts +2 -0
- package/dist/coinflow-vue.js +7495 -6971
- package/dist/coinflow-vue.umd.cjs +12 -12
- package/dist/components/CoinflowIframe.vue.d.ts +6 -6
- package/dist/components/CoinflowPurchase.vue.d.ts +117 -113
- package/dist/components/CoinflowPurchaseProtection.vue.d.ts +5 -9
- package/dist/components/CoinflowWithdraw.vue.d.ts +90 -91
- package/dist/components/card-form/CoinflowCardNumberInput.vue.d.ts +7 -36
- package/dist/components/card-form/CoinflowCardNumberOnlyInput.vue.d.ts +7 -36
- package/dist/components/card-form/CoinflowCvvInput.vue.d.ts +2 -4
- package/dist/components/card-form/CoinflowCvvOnlyInput.vue.d.ts +17 -0
- package/dist/components/card-form/useCardformIframe.d.ts +9 -10
- package/dist/components/mobile-wallet/CoinflowApplePayButton.vue.d.ts +7 -226
- package/dist/components/mobile-wallet/CoinflowGooglePayButton.vue.d.ts +7 -226
- package/dist/components/mobile-wallet/MobileWalletButton.vue.d.ts +5 -200
- package/dist/index.d.ts +11 -11
- package/dist/lib/common/CoinflowTypes.d.ts +13 -3
- package/dist/lib/common/CoinflowUtils.d.ts +7 -2
- package/dist/lib/common/SolanaPeerDeps.d.ts +1 -1
- package/dist/lib/common/card-form/TokenEx.d.ts +50 -2
- package/dist/lib/common/card-form/tokenexHelpers.d.ts +17 -32
- package/dist/lib/common/index.d.ts +0 -1
- package/dist/main.d.ts +1 -0
- package/dist/testing/CardFormTest.vue.d.ts +2 -0
- package/dist/testing/MobileWalletButtonTest.vue.d.ts +2 -0
- package/dist/testing/PurchaseTest.vue.d.ts +2 -0
- package/dist/testing/SavedCardFormTest.vue.d.ts +2 -0
- package/dist/testing/WithdrawTest.vue.d.ts +2 -0
- package/package.json +18 -14
- package/dist/lib/common/card-form/cardFormTypes.d.ts +0 -47
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare const _sfc_main: import("vue").DefineComponent<{
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { CoinflowPurchaseProps } from '../../lib/common';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{
|
|
5
4
|
args: {
|
|
6
5
|
type: PropType<CoinflowPurchaseProps & {
|
|
7
6
|
color: "white" | "black";
|
|
@@ -12,201 +11,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
12
11
|
type: StringConstructor;
|
|
13
12
|
required: true;
|
|
14
13
|
};
|
|
15
|
-
}, {
|
|
16
|
-
onSuccess: import("../../lib/common").OnSuccessMethod | undefined;
|
|
17
|
-
iframeProps: () => {
|
|
18
|
-
walletPubkey: string | null | undefined;
|
|
19
|
-
transaction: undefined;
|
|
20
|
-
routePrefix: string;
|
|
21
|
-
route: string;
|
|
22
|
-
wallet: import("../../lib/common").SolanaWallet;
|
|
23
|
-
partialSigners?: import("@solana/web3.js").Signer[] | undefined;
|
|
24
|
-
debugTx?: boolean | undefined;
|
|
25
|
-
connection: import("@solana/web3.js").Connection;
|
|
26
|
-
blockchain: "solana";
|
|
27
|
-
token?: string | import("@solana/web3.js").PublicKey | undefined;
|
|
28
|
-
rent?: {
|
|
29
|
-
lamports: string | number;
|
|
30
|
-
} | undefined;
|
|
31
|
-
nativeSolToConvert?: {
|
|
32
|
-
lamports: string | number;
|
|
33
|
-
} | undefined;
|
|
34
|
-
amount?: string | number | undefined;
|
|
35
|
-
onSuccess?: import("../../lib/common").OnSuccessMethod | undefined;
|
|
36
|
-
webhookInfo?: object | undefined;
|
|
37
|
-
email?: string | undefined;
|
|
38
|
-
chargebackProtectionData?: import("../../lib/common").ChargebackProtectionData | undefined;
|
|
39
|
-
planCode?: string | undefined;
|
|
40
|
-
disableApplePay?: boolean | undefined;
|
|
41
|
-
disableGooglePay?: boolean | undefined;
|
|
42
|
-
customerInfo?: import("../../lib/common").CustomerInfo | undefined;
|
|
43
|
-
settlementType?: import("../../lib/common").SettlementType | undefined;
|
|
44
|
-
authOnly?: boolean | undefined;
|
|
45
|
-
deviceId?: string | undefined;
|
|
46
|
-
jwtToken?: string | undefined;
|
|
47
|
-
origins?: string[] | undefined;
|
|
48
|
-
merchantId: string;
|
|
49
|
-
env?: import("../../lib/common").CoinflowEnvs | undefined;
|
|
50
|
-
loaderBackground?: string | undefined;
|
|
51
|
-
handleHeightChange?: ((height: string) => void) | undefined;
|
|
52
|
-
theme?: import("../../lib/common").MerchantTheme | undefined;
|
|
53
|
-
color: "white" | "black";
|
|
54
|
-
} | {
|
|
55
|
-
walletPubkey: string | null | undefined;
|
|
56
|
-
transaction: undefined;
|
|
57
|
-
routePrefix: string;
|
|
58
|
-
route: string;
|
|
59
|
-
wallet: import("../../lib/common").NearWallet;
|
|
60
|
-
blockchain: "near";
|
|
61
|
-
action?: import("../../lib/common").NearFtTransferCallAction | undefined;
|
|
62
|
-
nearDeposit?: string | undefined;
|
|
63
|
-
amount?: string | number | undefined;
|
|
64
|
-
onSuccess?: import("../../lib/common").OnSuccessMethod | undefined;
|
|
65
|
-
webhookInfo?: object | undefined;
|
|
66
|
-
email?: string | undefined;
|
|
67
|
-
chargebackProtectionData?: import("../../lib/common").ChargebackProtectionData | undefined;
|
|
68
|
-
planCode?: string | undefined;
|
|
69
|
-
disableApplePay?: boolean | undefined;
|
|
70
|
-
disableGooglePay?: boolean | undefined;
|
|
71
|
-
customerInfo?: import("../../lib/common").CustomerInfo | undefined;
|
|
72
|
-
settlementType?: import("../../lib/common").SettlementType | undefined;
|
|
73
|
-
authOnly?: boolean | undefined;
|
|
74
|
-
deviceId?: string | undefined;
|
|
75
|
-
jwtToken?: string | undefined;
|
|
76
|
-
origins?: string[] | undefined;
|
|
77
|
-
merchantId: string;
|
|
78
|
-
env?: import("../../lib/common").CoinflowEnvs | undefined;
|
|
79
|
-
loaderBackground?: string | undefined;
|
|
80
|
-
handleHeightChange?: ((height: string) => void) | undefined;
|
|
81
|
-
theme?: import("../../lib/common").MerchantTheme | undefined;
|
|
82
|
-
color: "white" | "black";
|
|
83
|
-
} | {
|
|
84
|
-
walletPubkey: string | null | undefined;
|
|
85
|
-
transaction: undefined;
|
|
86
|
-
routePrefix: string;
|
|
87
|
-
route: string;
|
|
88
|
-
blockchain: "polygon";
|
|
89
|
-
token?: string | undefined;
|
|
90
|
-
wallet: import("../../lib/common").EthWallet;
|
|
91
|
-
amount?: string | number | undefined;
|
|
92
|
-
onSuccess?: import("../../lib/common").OnSuccessMethod | undefined;
|
|
93
|
-
webhookInfo?: object | undefined;
|
|
94
|
-
email?: string | undefined;
|
|
95
|
-
chargebackProtectionData?: import("../../lib/common").ChargebackProtectionData | undefined;
|
|
96
|
-
planCode?: string | undefined;
|
|
97
|
-
disableApplePay?: boolean | undefined;
|
|
98
|
-
disableGooglePay?: boolean | undefined;
|
|
99
|
-
customerInfo?: import("../../lib/common").CustomerInfo | undefined;
|
|
100
|
-
settlementType?: import("../../lib/common").SettlementType | undefined;
|
|
101
|
-
authOnly?: boolean | undefined;
|
|
102
|
-
deviceId?: string | undefined;
|
|
103
|
-
jwtToken?: string | undefined;
|
|
104
|
-
origins?: string[] | undefined;
|
|
105
|
-
merchantId: string;
|
|
106
|
-
env?: import("../../lib/common").CoinflowEnvs | undefined;
|
|
107
|
-
loaderBackground?: string | undefined;
|
|
108
|
-
handleHeightChange?: ((height: string) => void) | undefined;
|
|
109
|
-
theme?: import("../../lib/common").MerchantTheme | undefined;
|
|
110
|
-
color: "white" | "black";
|
|
111
|
-
} | {
|
|
112
|
-
walletPubkey: string | null | undefined;
|
|
113
|
-
transaction: undefined;
|
|
114
|
-
routePrefix: string;
|
|
115
|
-
route: string;
|
|
116
|
-
blockchain: "eth";
|
|
117
|
-
token?: string | undefined;
|
|
118
|
-
wallet: import("../../lib/common").EthWallet;
|
|
119
|
-
amount?: string | number | undefined;
|
|
120
|
-
onSuccess?: import("../../lib/common").OnSuccessMethod | undefined;
|
|
121
|
-
webhookInfo?: object | undefined;
|
|
122
|
-
email?: string | undefined;
|
|
123
|
-
chargebackProtectionData?: import("../../lib/common").ChargebackProtectionData | undefined;
|
|
124
|
-
planCode?: string | undefined;
|
|
125
|
-
disableApplePay?: boolean | undefined;
|
|
126
|
-
disableGooglePay?: boolean | undefined;
|
|
127
|
-
customerInfo?: import("../../lib/common").CustomerInfo | undefined;
|
|
128
|
-
settlementType?: import("../../lib/common").SettlementType | undefined;
|
|
129
|
-
authOnly?: boolean | undefined;
|
|
130
|
-
deviceId?: string | undefined;
|
|
131
|
-
jwtToken?: string | undefined;
|
|
132
|
-
origins?: string[] | undefined;
|
|
133
|
-
merchantId: string;
|
|
134
|
-
env?: import("../../lib/common").CoinflowEnvs | undefined;
|
|
135
|
-
loaderBackground?: string | undefined;
|
|
136
|
-
handleHeightChange?: ((height: string) => void) | undefined;
|
|
137
|
-
theme?: import("../../lib/common").MerchantTheme | undefined;
|
|
138
|
-
color: "white" | "black";
|
|
139
|
-
} | {
|
|
140
|
-
walletPubkey: string | null | undefined;
|
|
141
|
-
transaction: undefined;
|
|
142
|
-
routePrefix: string;
|
|
143
|
-
route: string;
|
|
144
|
-
blockchain: "base";
|
|
145
|
-
token?: string | undefined;
|
|
146
|
-
wallet: import("../../lib/common").EthWallet;
|
|
147
|
-
amount?: string | number | undefined;
|
|
148
|
-
onSuccess?: import("../../lib/common").OnSuccessMethod | undefined;
|
|
149
|
-
webhookInfo?: object | undefined;
|
|
150
|
-
email?: string | undefined;
|
|
151
|
-
chargebackProtectionData?: import("../../lib/common").ChargebackProtectionData | undefined;
|
|
152
|
-
planCode?: string | undefined;
|
|
153
|
-
disableApplePay?: boolean | undefined;
|
|
154
|
-
disableGooglePay?: boolean | undefined;
|
|
155
|
-
customerInfo?: import("../../lib/common").CustomerInfo | undefined;
|
|
156
|
-
settlementType?: import("../../lib/common").SettlementType | undefined;
|
|
157
|
-
authOnly?: boolean | undefined;
|
|
158
|
-
deviceId?: string | undefined;
|
|
159
|
-
jwtToken?: string | undefined;
|
|
160
|
-
origins?: string[] | undefined;
|
|
161
|
-
merchantId: string;
|
|
162
|
-
env?: import("../../lib/common").CoinflowEnvs | undefined;
|
|
163
|
-
loaderBackground?: string | undefined;
|
|
164
|
-
handleHeightChange?: ((height: string) => void) | undefined;
|
|
165
|
-
theme?: import("../../lib/common").MerchantTheme | undefined;
|
|
166
|
-
color: "white" | "black";
|
|
167
|
-
};
|
|
168
|
-
messageHandlers: () => {
|
|
169
|
-
handleHeightChange: ((height: string) => void) | undefined;
|
|
170
|
-
onSuccess: import("../../lib/common").OnSuccessMethod | undefined;
|
|
171
|
-
handleSendTransaction: (transaction: string) => Promise<string>;
|
|
172
|
-
handleSignMessage?: ((message: string) => Promise<string>) | undefined;
|
|
173
|
-
handleSignTransaction?: ((transaction: string) => Promise<string>) | undefined;
|
|
174
|
-
};
|
|
175
|
-
handleMessage: ({ data }: {
|
|
176
|
-
data: string;
|
|
177
|
-
}) => void;
|
|
178
|
-
CoinflowIFrame: import("vue").DefineComponent<{
|
|
179
|
-
args: {
|
|
180
|
-
type: PropType<import("../../lib/common").CoinflowIFrameProps & import("../../lib/common").IFrameMessageHandlers>;
|
|
181
|
-
required: true;
|
|
182
|
-
};
|
|
183
|
-
}, unknown, unknown, {
|
|
184
|
-
url(): string;
|
|
185
|
-
}, {
|
|
186
|
-
sendMessage(message: string): void;
|
|
187
|
-
handleIframeMessages({ data, origin }: {
|
|
188
|
-
data: string;
|
|
189
|
-
origin: string;
|
|
190
|
-
}): void;
|
|
191
|
-
listenForMessage(isResponseValid: (response: string) => boolean): Promise<string>;
|
|
192
|
-
sendAndReceiveMessage(message: string, isResponseValid: (response: string) => boolean): Promise<string>;
|
|
193
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
194
|
-
onMessage({ data, origin }: {
|
|
195
|
-
data: string;
|
|
196
|
-
origin: string;
|
|
197
|
-
}): true;
|
|
198
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
199
|
-
args: {
|
|
200
|
-
type: PropType<import("../../lib/common").CoinflowIFrameProps & import("../../lib/common").IFrameMessageHandlers>;
|
|
201
|
-
required: true;
|
|
202
|
-
};
|
|
203
|
-
}>> & {
|
|
204
|
-
onOnMessage?: ((args_0: {
|
|
205
|
-
data: string;
|
|
206
|
-
origin: string;
|
|
207
|
-
}) => any) | undefined;
|
|
208
|
-
}, {}, {}>;
|
|
209
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
210
15
|
args: {
|
|
211
16
|
type: PropType<CoinflowPurchaseProps & {
|
|
212
17
|
color: "white" | "black";
|
|
@@ -218,4 +23,4 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
218
23
|
required: true;
|
|
219
24
|
};
|
|
220
25
|
}>>, {}, {}>;
|
|
221
|
-
export default
|
|
26
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import CoinflowIframe from
|
|
2
|
-
import CoinflowWithdraw from
|
|
3
|
-
import CoinflowPurchase from
|
|
4
|
-
import CoinflowCardNumberInput from
|
|
5
|
-
import CoinflowCvvInput from
|
|
6
|
-
import CoinflowCvvOnlyInput from
|
|
7
|
-
import CoinflowPurchaseProtection from './components/CoinflowPurchaseProtection.vue';
|
|
8
|
-
import CoinflowCardNumberOnlyInput from './components/card-form/CoinflowCardNumberOnlyInput.vue';
|
|
9
|
-
import CoinflowApplePayButton from
|
|
10
|
-
import CoinflowGooglePayButton from
|
|
1
|
+
import { default as CoinflowIframe } from './components/CoinflowIframe.vue';
|
|
2
|
+
import { default as CoinflowWithdraw } from './components/CoinflowWithdraw.vue';
|
|
3
|
+
import { default as CoinflowPurchase } from './components/CoinflowPurchase.vue';
|
|
4
|
+
import { default as CoinflowCardNumberInput } from './components/card-form/CoinflowCardNumberInput.vue';
|
|
5
|
+
import { default as CoinflowCvvInput } from './components/card-form/CoinflowCvvInput.vue';
|
|
6
|
+
import { default as CoinflowCvvOnlyInput } from './components/card-form/CoinflowCvvOnlyInput.vue';
|
|
7
|
+
import { default as CoinflowPurchaseProtection } from './components/CoinflowPurchaseProtection.vue';
|
|
8
|
+
import { default as CoinflowCardNumberOnlyInput } from './components/card-form/CoinflowCardNumberOnlyInput.vue';
|
|
9
|
+
import { default as CoinflowApplePayButton } from './components/mobile-wallet/CoinflowApplePayButton.vue';
|
|
10
|
+
import { default as CoinflowGooglePayButton } from './components/mobile-wallet/CoinflowGooglePayButton.vue';
|
|
11
11
|
export * from './lib/common';
|
|
12
|
-
export { CoinflowIframe, CoinflowWithdraw, CoinflowCvvInput, CoinflowCardNumberInput, CoinflowPurchase, CoinflowPurchaseProtection, CoinflowCvvOnlyInput, CoinflowCardNumberOnlyInput, CoinflowApplePayButton, CoinflowGooglePayButton };
|
|
12
|
+
export { CoinflowIframe, CoinflowWithdraw, CoinflowCvvInput, CoinflowCardNumberInput, CoinflowPurchase, CoinflowPurchaseProtection, CoinflowCvvOnlyInput, CoinflowCardNumberOnlyInput, CoinflowApplePayButton, CoinflowGooglePayButton, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Connection, VersionedTransaction, PublicKey, Signer, Transaction } from '@solana/web3.js';
|
|
2
2
|
export declare enum SettlementType {
|
|
3
3
|
Credits = "Credits",
|
|
4
4
|
USDC = "USDC",
|
|
@@ -147,6 +147,11 @@ export interface ChargebackProtectionItem {
|
|
|
147
147
|
*/
|
|
148
148
|
rawProductData?: RawProductData;
|
|
149
149
|
}
|
|
150
|
+
export declare enum ThreeDsChallengePreference {
|
|
151
|
+
NoPreference = "NoPreference",
|
|
152
|
+
Frictionless = "Frictionless",
|
|
153
|
+
Challenge = "Challenge"
|
|
154
|
+
}
|
|
150
155
|
export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
151
156
|
amount?: number | string;
|
|
152
157
|
onSuccess?: OnSuccessMethod;
|
|
@@ -170,6 +175,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
170
175
|
* The origin array would then be: [https://foo.com,https://bar.com]
|
|
171
176
|
*/
|
|
172
177
|
origins?: string[];
|
|
178
|
+
threeDsChallengePreference?: ThreeDsChallengePreference;
|
|
173
179
|
}
|
|
174
180
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
175
181
|
wallet: SolanaWallet;
|
|
@@ -287,8 +293,12 @@ export interface ReservoirRedeem extends CommonEvmRedeem {
|
|
|
287
293
|
items: ReservoirItems;
|
|
288
294
|
taker?: string;
|
|
289
295
|
}
|
|
290
|
-
export
|
|
291
|
-
|
|
296
|
+
export interface TokenRedeem extends CommonEvmRedeem {
|
|
297
|
+
type: 'token';
|
|
298
|
+
destination: string;
|
|
299
|
+
}
|
|
300
|
+
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
|
|
301
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
|
|
292
302
|
walletPubkey: string | null | undefined;
|
|
293
303
|
route: string;
|
|
294
304
|
routePrefix?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps } from './CoinflowTypes';
|
|
1
|
+
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps, SolanaWallet } from './CoinflowTypes';
|
|
2
2
|
export declare class CoinflowUtils {
|
|
3
3
|
env: CoinflowEnvs;
|
|
4
4
|
url: string;
|
|
@@ -9,7 +9,7 @@ export declare class CoinflowUtils {
|
|
|
9
9
|
}>;
|
|
10
10
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
11
11
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
12
|
-
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChange, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, }: CoinflowIFrameProps): string;
|
|
12
|
+
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChange, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, }: CoinflowIFrameProps): string;
|
|
13
13
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
14
14
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
15
15
|
solana: T;
|
|
@@ -18,4 +18,9 @@ export declare class CoinflowUtils {
|
|
|
18
18
|
polygon: T;
|
|
19
19
|
base: T;
|
|
20
20
|
}): T;
|
|
21
|
+
static getWalletFromEmail({ email, merchantId, env, }: {
|
|
22
|
+
email: string;
|
|
23
|
+
merchantId: string;
|
|
24
|
+
env: CoinflowEnvs;
|
|
25
|
+
}): Promise<SolanaWallet>;
|
|
21
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { default as base58Imported } from 'bs58';
|
|
1
2
|
import * as SolanaWeb3Js from '@solana/web3.js';
|
|
2
|
-
import base58Imported from 'bs58';
|
|
3
3
|
declare const web3: typeof SolanaWeb3Js | undefined;
|
|
4
4
|
declare const base58: typeof base58Imported | undefined;
|
|
5
5
|
export { web3, base58 };
|
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
import { CardType, CoinflowEnvs } from '../CoinflowTypes';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
export declare const TokenExCardNumberIframeId = "tokenExCardNumber";
|
|
4
|
+
export declare const TokenExCvvContainerID = "tokenExCardCvv";
|
|
5
|
+
export interface TokenExIframe extends ReturnType<typeof TokenEx.Iframe> {
|
|
6
|
+
tokenize: () => Promise<TokenizationResponse>;
|
|
7
|
+
}
|
|
8
|
+
export declare const CARD_TYPE_MAPPING: Record<CardType, string>;
|
|
9
|
+
export interface TokenExIFrameConfiguration {
|
|
10
|
+
origin: string;
|
|
11
|
+
timestamp: string;
|
|
12
|
+
tokenExID: string;
|
|
13
|
+
tokenScheme: string;
|
|
14
|
+
authenticationKey: string;
|
|
15
|
+
pci: true;
|
|
16
|
+
token?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CardFormInputStyles {
|
|
19
|
+
base: CSSProperties | string;
|
|
20
|
+
placeholder?: CSSProperties | string;
|
|
21
|
+
focus?: CSSProperties | string;
|
|
22
|
+
error?: CSSProperties | string;
|
|
23
|
+
}
|
|
24
|
+
export type CoinflowCardTokenResponse = {
|
|
25
|
+
token: string;
|
|
26
|
+
};
|
|
27
|
+
export interface CoinflowCardNumberInputProps {
|
|
28
|
+
env: CoinflowEnvs;
|
|
29
|
+
css: CardFormInputStyles & {
|
|
30
|
+
cvv: CardFormInputStyles;
|
|
31
|
+
};
|
|
32
|
+
debug?: boolean;
|
|
33
|
+
origins?: string[];
|
|
34
|
+
font?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface CoinflowCvvOnlyInputProps {
|
|
37
|
+
token: string;
|
|
38
|
+
cardType: CardType;
|
|
39
|
+
env: CoinflowEnvs;
|
|
40
|
+
css: CardFormInputStyles & {
|
|
41
|
+
cvv: CardFormInputStyles;
|
|
42
|
+
};
|
|
43
|
+
debug?: boolean;
|
|
44
|
+
origins?: string[];
|
|
45
|
+
font?: string;
|
|
46
|
+
}
|
|
1
47
|
export interface TokenizationResponse {
|
|
2
48
|
cardType: string;
|
|
3
49
|
cvvIncluded: true;
|
|
@@ -32,8 +78,8 @@ declare global {
|
|
|
32
78
|
returnWhash?: boolean;
|
|
33
79
|
enforceLuhnCompliance?: boolean;
|
|
34
80
|
use3DS?: boolean;
|
|
35
|
-
|
|
36
|
-
|
|
81
|
+
enableValidateOnKeyUp?: boolean;
|
|
82
|
+
enableValidateOnCvvKeyUp?: boolean;
|
|
37
83
|
expiresInSeconds?: number;
|
|
38
84
|
useExtendedBIN?: boolean;
|
|
39
85
|
inlineIframeJavaScript?: boolean;
|
|
@@ -76,9 +122,11 @@ declare global {
|
|
|
76
122
|
base: string;
|
|
77
123
|
focus: string;
|
|
78
124
|
error: string;
|
|
125
|
+
placeholder: string;
|
|
79
126
|
cvv: {
|
|
80
127
|
base: string;
|
|
81
128
|
focus: string;
|
|
129
|
+
placeholder: string;
|
|
82
130
|
error: string;
|
|
83
131
|
};
|
|
84
132
|
};
|
|
@@ -1,43 +1,28 @@
|
|
|
1
|
+
import { TokenExIframe, TokenExIFrameConfiguration } from './TokenEx';
|
|
1
2
|
import { CardType, CoinflowEnvs } from '../CoinflowTypes';
|
|
2
|
-
|
|
3
|
-
export declare function getIframeConfig({ token, origins, env, }: {
|
|
4
|
-
token?: string;
|
|
5
|
-
origins: string[] | undefined;
|
|
6
|
-
env: CoinflowEnvs;
|
|
7
|
-
}): Promise<TokenExIFrameConfiguration>;
|
|
8
|
-
export declare function setTokenExScriptTag({ env, setTokenExScriptLoaded, }: {
|
|
9
|
-
env: CoinflowEnvs;
|
|
10
|
-
setTokenExScriptLoaded: (b: boolean) => void;
|
|
11
|
-
}): void;
|
|
12
|
-
export declare function doInitializeCvvOnlyTokenExIframe({ token, cardType, css, debug, fontFamily, origins, tokenExScriptLoaded, env, setCachedToken, setLoaded, }: {
|
|
13
|
-
token: string;
|
|
14
|
-
cardType: CardType;
|
|
3
|
+
export interface DoInitializeTokenExIframeArgs {
|
|
15
4
|
css: string;
|
|
16
5
|
debug?: boolean;
|
|
17
|
-
|
|
6
|
+
font?: string;
|
|
18
7
|
origins: string[] | undefined;
|
|
19
8
|
tokenExScriptLoaded: boolean;
|
|
20
9
|
env: CoinflowEnvs;
|
|
21
10
|
setCachedToken: (s: string | undefined) => void;
|
|
22
11
|
setLoaded: (b: boolean) => void;
|
|
23
|
-
}
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
12
|
+
}
|
|
13
|
+
export interface DoInitializeCvvOnlyTokenExIframeArgs extends DoInitializeTokenExIframeArgs {
|
|
14
|
+
token: string;
|
|
15
|
+
cardType: CardType;
|
|
16
|
+
}
|
|
17
|
+
export declare function getIframeConfig({ token, origins, env, }: {
|
|
18
|
+
token?: string;
|
|
28
19
|
origins: string[] | undefined;
|
|
29
|
-
tokenExScriptLoaded: boolean;
|
|
30
20
|
env: CoinflowEnvs;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}): Promise<TokenExIframe | undefined>;
|
|
34
|
-
export declare function doInitializeTokenExCardOnlyIframe({ css, debug, fontFamily, origins, tokenExScriptLoaded, env, setCachedToken, setLoaded, }: {
|
|
35
|
-
css: string;
|
|
36
|
-
debug?: boolean;
|
|
37
|
-
fontFamily?: string;
|
|
38
|
-
origins: string[] | undefined;
|
|
39
|
-
tokenExScriptLoaded: boolean;
|
|
21
|
+
}): Promise<TokenExIFrameConfiguration>;
|
|
22
|
+
export declare function setTokenExScriptTag({ env, setTokenExScriptLoaded, }: {
|
|
40
23
|
env: CoinflowEnvs;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
24
|
+
setTokenExScriptLoaded: (b: boolean) => void;
|
|
25
|
+
}): void;
|
|
26
|
+
export declare function doInitializeCvvOnlyTokenExIframe(args: DoInitializeCvvOnlyTokenExIframeArgs): Promise<TokenExIframe | undefined>;
|
|
27
|
+
export declare function doInitializeTokenExIframe(args: DoInitializeTokenExIframeArgs): Promise<TokenExIframe | undefined>;
|
|
28
|
+
export declare function doInitializeTokenExCardOnlyIframe(args: DoInitializeTokenExIframeArgs): Promise<TokenExIframe | undefined>;
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -27,25 +27,26 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"vue": "~3.4.30",
|
|
29
29
|
"@solana/web3.js": ">=1.54.0",
|
|
30
|
-
"bs58": "^4.0.1"
|
|
30
|
+
"bs58": "^4.0.1",
|
|
31
|
+
"tweetnacl": "^1.0.3"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@types/bs58": "^4.0.4",
|
|
34
|
-
"@rushstack/eslint-patch": "^1.
|
|
35
|
-
"@types/node": "^
|
|
36
|
-
"@vitejs/plugin-vue": "^
|
|
35
|
+
"@rushstack/eslint-patch": "^1.10.4",
|
|
36
|
+
"@types/node": "^22.5.0",
|
|
37
|
+
"@vitejs/plugin-vue": "^5.1.2",
|
|
37
38
|
"@vue/eslint-config-prettier": "^7.0.0",
|
|
38
|
-
"@vue/eslint-config-typescript": "^
|
|
39
|
+
"@vue/eslint-config-typescript": "^13.0.0",
|
|
39
40
|
"copyfiles": "^2.4.1",
|
|
40
41
|
"eslint": "^8.31.0",
|
|
41
|
-
"eslint-plugin-vue": "^9.
|
|
42
|
-
"prettier": "^
|
|
43
|
-
"typescript": "^
|
|
44
|
-
"vite": "^4.
|
|
45
|
-
"vite-plugin-dts": "^
|
|
46
|
-
"vitepress": "^1.
|
|
47
|
-
"vue": "^3.
|
|
48
|
-
"vue-tsc": "^
|
|
42
|
+
"eslint-plugin-vue": "^9.27.0",
|
|
43
|
+
"prettier": "^3.3.3",
|
|
44
|
+
"typescript": "^5.5.4",
|
|
45
|
+
"vite": "^5.4.2",
|
|
46
|
+
"vite-plugin-dts": "^4.0.3",
|
|
47
|
+
"vitepress": "^1.3.4",
|
|
48
|
+
"vue": "^3.4.38",
|
|
49
|
+
"vue-tsc": "^2.0.29"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
52
|
"lz-string": "^1.5.0"
|
|
@@ -56,6 +57,9 @@
|
|
|
56
57
|
},
|
|
57
58
|
"bs58": {
|
|
58
59
|
"optional": true
|
|
60
|
+
},
|
|
61
|
+
"tweetnacl": {
|
|
62
|
+
"optional": true
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { TokenizationResponse } from './TokenEx';
|
|
3
|
-
import { CardType, CoinflowEnvs } from '../CoinflowTypes';
|
|
4
|
-
export declare const TokenExCardNumberIframeId = "tokenExCardNumber";
|
|
5
|
-
export declare const TokenExCvvContainerID = "tokenExCardCvv";
|
|
6
|
-
export interface TokenExIframe extends ReturnType<typeof TokenEx.Iframe> {
|
|
7
|
-
tokenize: () => Promise<TokenizationResponse>;
|
|
8
|
-
}
|
|
9
|
-
export declare const CARD_TYPE_MAPPING: Record<CardType, string>;
|
|
10
|
-
export interface TokenExIFrameConfiguration {
|
|
11
|
-
origin: string;
|
|
12
|
-
timestamp: string;
|
|
13
|
-
tokenExID: string;
|
|
14
|
-
tokenScheme: string;
|
|
15
|
-
authenticationKey: string;
|
|
16
|
-
pci: true;
|
|
17
|
-
token?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface CardFormInputStyles {
|
|
20
|
-
base: CSSProperties | string;
|
|
21
|
-
placeholder?: CSSProperties | string;
|
|
22
|
-
focus?: CSSProperties | string;
|
|
23
|
-
error?: CSSProperties | string;
|
|
24
|
-
}
|
|
25
|
-
export type CoinflowCardTokenResponse = {
|
|
26
|
-
token: string;
|
|
27
|
-
};
|
|
28
|
-
export interface CoinflowCardNumberInputProps {
|
|
29
|
-
env: CoinflowEnvs;
|
|
30
|
-
css: CardFormInputStyles & {
|
|
31
|
-
cvv: CardFormInputStyles;
|
|
32
|
-
};
|
|
33
|
-
debug?: boolean;
|
|
34
|
-
origins?: string[];
|
|
35
|
-
font?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface CoinflowCvvOnlyInputProps {
|
|
38
|
-
token: string;
|
|
39
|
-
cardType: CardType;
|
|
40
|
-
env: CoinflowEnvs;
|
|
41
|
-
css: CardFormInputStyles & {
|
|
42
|
-
cvv: CardFormInputStyles;
|
|
43
|
-
};
|
|
44
|
-
debug?: boolean;
|
|
45
|
-
origins?: string[];
|
|
46
|
-
font?: string;
|
|
47
|
-
}
|