@coinflowlabs/vue 0.2.5 → 0.2.7

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.
@@ -36,6 +36,7 @@ declare const _default: import('vue').DefineComponent<{
36
36
  deviceId?: string;
37
37
  jwtToken?: string;
38
38
  origins?: string[];
39
+ threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
39
40
  merchantId: string;
40
41
  env?: import('../lib/common').CoinflowEnvs;
41
42
  loaderBackground?: string;
@@ -63,6 +64,7 @@ declare const _default: import('vue').DefineComponent<{
63
64
  deviceId?: string;
64
65
  jwtToken?: string;
65
66
  origins?: string[];
67
+ threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
66
68
  merchantId: string;
67
69
  env?: import('../lib/common').CoinflowEnvs;
68
70
  loaderBackground?: string;
@@ -89,6 +91,7 @@ declare const _default: import('vue').DefineComponent<{
89
91
  deviceId?: string;
90
92
  jwtToken?: string;
91
93
  origins?: string[];
94
+ threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
92
95
  merchantId: string;
93
96
  env?: import('../lib/common').CoinflowEnvs;
94
97
  loaderBackground?: string;
@@ -115,6 +118,7 @@ declare const _default: import('vue').DefineComponent<{
115
118
  deviceId?: string;
116
119
  jwtToken?: string;
117
120
  origins?: string[];
121
+ threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
118
122
  merchantId: string;
119
123
  env?: import('../lib/common').CoinflowEnvs;
120
124
  loaderBackground?: string;
@@ -141,6 +145,34 @@ declare const _default: import('vue').DefineComponent<{
141
145
  deviceId?: string;
142
146
  jwtToken?: string;
143
147
  origins?: string[];
148
+ threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
149
+ merchantId: string;
150
+ env?: import('../lib/common').CoinflowEnvs;
151
+ loaderBackground?: string;
152
+ handleHeightChange?: (height: string) => void;
153
+ theme?: import('../lib/common').MerchantTheme;
154
+ } | {
155
+ walletPubkey: string | null | undefined;
156
+ route: string;
157
+ transaction: string | undefined;
158
+ blockchain: "arbitrum";
159
+ token?: string;
160
+ wallet: import('../lib/common').EthWallet;
161
+ amount?: number | string;
162
+ onSuccess?: import('../lib/common').OnSuccessMethod;
163
+ webhookInfo?: object;
164
+ email?: string;
165
+ chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
166
+ planCode?: string;
167
+ disableApplePay?: boolean;
168
+ disableGooglePay?: boolean;
169
+ customerInfo?: import('../lib/common').CustomerInfo;
170
+ settlementType?: import('../lib/common').SettlementType;
171
+ authOnly?: boolean;
172
+ deviceId?: string;
173
+ jwtToken?: string;
174
+ origins?: string[];
175
+ threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
144
176
  merchantId: string;
145
177
  env?: import('../lib/common').CoinflowEnvs;
146
178
  loaderBackground?: string;
@@ -21,7 +21,7 @@ declare const _default: import('vue').DefineComponent<{
21
21
  bankAccountLinkRedirect?: string;
22
22
  additionalWallets?: {
23
23
  wallet: string;
24
- blockchain: "solana" | "eth" | "near" | "polygon";
24
+ blockchain: "solana" | "eth" | "near" | "polygon" | "base" | "arbitrum";
25
25
  }[];
26
26
  lockAmount?: boolean;
27
27
  transactionSigner?: string;
@@ -45,7 +45,7 @@ declare const _default: import('vue').DefineComponent<{
45
45
  bankAccountLinkRedirect?: string;
46
46
  additionalWallets?: {
47
47
  wallet: string;
48
- blockchain: "solana" | "eth" | "near" | "polygon";
48
+ blockchain: "solana" | "eth" | "near" | "polygon" | "base" | "arbitrum";
49
49
  }[];
50
50
  lockAmount?: boolean;
51
51
  transactionSigner?: string;
@@ -70,7 +70,7 @@ declare const _default: import('vue').DefineComponent<{
70
70
  bankAccountLinkRedirect?: string;
71
71
  additionalWallets?: {
72
72
  wallet: string;
73
- blockchain: "solana" | "eth" | "near" | "polygon";
73
+ blockchain: "solana" | "eth" | "near" | "polygon" | "base" | "arbitrum";
74
74
  }[];
75
75
  lockAmount?: boolean;
76
76
  transactionSigner?: string;
@@ -95,7 +95,7 @@ declare const _default: import('vue').DefineComponent<{
95
95
  bankAccountLinkRedirect?: string;
96
96
  additionalWallets?: {
97
97
  wallet: string;
98
- blockchain: "solana" | "eth" | "near" | "polygon";
98
+ blockchain: "solana" | "eth" | "near" | "polygon" | "base" | "arbitrum";
99
99
  }[];
100
100
  lockAmount?: boolean;
101
101
  transactionSigner?: string;
@@ -120,7 +120,32 @@ declare const _default: import('vue').DefineComponent<{
120
120
  bankAccountLinkRedirect?: string;
121
121
  additionalWallets?: {
122
122
  wallet: string;
123
- blockchain: "solana" | "eth" | "near" | "polygon";
123
+ blockchain: "solana" | "eth" | "near" | "polygon" | "base" | "arbitrum";
124
+ }[];
125
+ lockAmount?: boolean;
126
+ transactionSigner?: string;
127
+ origins?: string[];
128
+ merchantId: string;
129
+ env?: import('../lib/common').CoinflowEnvs;
130
+ loaderBackground?: string;
131
+ handleHeightChange?: (height: string) => void;
132
+ theme?: import('../lib/common').MerchantTheme;
133
+ } | {
134
+ walletPubkey: string | null | undefined;
135
+ route: string;
136
+ transaction: undefined;
137
+ blockchain: "arbitrum";
138
+ wallet: import('../lib/common').EthWallet;
139
+ usePermit?: boolean;
140
+ onSuccess?: import('../lib/common').OnSuccessMethod;
141
+ tokens?: string[];
142
+ lockDefaultToken?: boolean;
143
+ amount?: number;
144
+ email?: string;
145
+ bankAccountLinkRedirect?: string;
146
+ additionalWallets?: {
147
+ wallet: string;
148
+ blockchain: "solana" | "eth" | "near" | "polygon" | "base" | "arbitrum";
124
149
  }[];
125
150
  lockAmount?: boolean;
126
151
  transactionSigner?: string;
@@ -0,0 +1,12 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ color: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
+ color: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ }>>, {}, {}>;
12
+ export default _default;
@@ -0,0 +1,12 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ color: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
+ color: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ }>>, {}, {}>;
12
+ export default _default;
@@ -1,6 +1,14 @@
1
1
  import { PropType } from 'vue';
2
2
  import { CoinflowPurchaseProps } from '../../lib/common';
3
- declare const _default: import('vue').DefineComponent<{
3
+ declare function __VLS_template(): {
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ attrs: Partial<{}>;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<{
4
12
  args: {
5
13
  type: PropType<CoinflowPurchaseProps & {
6
14
  color: "white" | "black";
@@ -11,6 +19,14 @@ declare const _default: import('vue').DefineComponent<{
11
19
  type: StringConstructor;
12
20
  required: true;
13
21
  };
22
+ overlayDisplayOverride: {
23
+ type: StringConstructor;
24
+ required: false;
25
+ };
26
+ alignItems: {
27
+ type: StringConstructor;
28
+ required: false;
29
+ };
14
30
  }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
31
  args: {
16
32
  type: PropType<CoinflowPurchaseProps & {
@@ -22,5 +38,19 @@ declare const _default: import('vue').DefineComponent<{
22
38
  type: StringConstructor;
23
39
  required: true;
24
40
  };
41
+ overlayDisplayOverride: {
42
+ type: StringConstructor;
43
+ required: false;
44
+ };
45
+ alignItems: {
46
+ type: StringConstructor;
47
+ required: false;
48
+ };
25
49
  }>>, {}, {}>;
50
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
51
  export default _default;
52
+ type __VLS_WithTemplateSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
package/dist/index.d.ts CHANGED
@@ -3,9 +3,10 @@ import { default as CoinflowWithdraw } from './components/CoinflowWithdraw.vue';
3
3
  import { default as CoinflowPurchase } from './components/CoinflowPurchase.vue';
4
4
  import { default as CoinflowCardNumberInput } from './components/card-form/CoinflowCardNumberInput.vue';
5
5
  import { default as CoinflowCvvInput } from './components/card-form/CoinflowCvvInput.vue';
6
+ import { default as CoinflowCvvOnlyInput } from './components/card-form/CoinflowCvvOnlyInput.vue';
6
7
  import { default as CoinflowPurchaseProtection } from './components/CoinflowPurchaseProtection.vue';
7
8
  import { default as CoinflowCardNumberOnlyInput } from './components/card-form/CoinflowCardNumberOnlyInput.vue';
8
9
  import { default as CoinflowApplePayButton } from './components/mobile-wallet/CoinflowApplePayButton.vue';
9
10
  import { default as CoinflowGooglePayButton } from './components/mobile-wallet/CoinflowGooglePayButton.vue';
10
11
  export * from './lib/common';
11
- export { CoinflowIframe, CoinflowWithdraw, CoinflowCvvInput, CoinflowCardNumberInput, CoinflowPurchase, CoinflowPurchaseProtection, CoinflowCvvOnlyInput, CoinflowCardNumberOnlyInput, CoinflowApplePayButton, CoinflowGooglePayButton };
12
+ export { CoinflowIframe, CoinflowWithdraw, CoinflowCvvInput, CoinflowCardNumberInput, CoinflowPurchase, CoinflowPurchaseProtection, CoinflowCvvOnlyInput, CoinflowCardNumberOnlyInput, CoinflowApplePayButton, CoinflowGooglePayButton, };
@@ -34,7 +34,7 @@ export interface CustomerInfo {
34
34
  lng?: string;
35
35
  }
36
36
  /** Coinflow Types **/
37
- export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base';
37
+ export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base' | 'arbitrum';
38
38
  export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
39
39
  export interface CoinflowTypes {
40
40
  merchantId: string;
@@ -113,7 +113,10 @@ export interface CoinflowPolygonHistoryProps extends CoinflowEvmHistoryProps {
113
113
  export interface CoinflowBaseHistoryProps extends CoinflowEvmHistoryProps {
114
114
  blockchain: 'base';
115
115
  }
116
- export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps;
116
+ export interface CoinflowArbitrumHistoryProps extends CoinflowEvmHistoryProps {
117
+ blockchain: 'arbitrum';
118
+ }
119
+ export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps;
117
120
  /** Transactions **/
118
121
  export type NearFtTransferCallAction = {
119
122
  methodName: 'ft_transfer_call';
@@ -147,6 +150,11 @@ export interface ChargebackProtectionItem {
147
150
  */
148
151
  rawProductData?: RawProductData;
149
152
  }
153
+ export declare enum ThreeDsChallengePreference {
154
+ NoPreference = "NoPreference",
155
+ Frictionless = "Frictionless",
156
+ Challenge = "Challenge"
157
+ }
150
158
  export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
151
159
  amount?: number | string;
152
160
  onSuccess?: OnSuccessMethod;
@@ -170,6 +178,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
170
178
  * The origin array would then be: [https://foo.com,https://bar.com]
171
179
  */
172
180
  origins?: string[];
181
+ threeDsChallengePreference?: ThreeDsChallengePreference;
173
182
  }
174
183
  export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
175
184
  wallet: SolanaWallet;
@@ -206,7 +215,10 @@ export interface CoinflowEthPurchaseProps extends CoinflowEvmPurchaseProps {
206
215
  export interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
207
216
  blockchain: 'base';
208
217
  }
209
- export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps;
218
+ export interface CoinflowArbitrumPurchaseProps extends CoinflowEvmPurchaseProps {
219
+ blockchain: 'arbitrum';
220
+ }
221
+ export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
210
222
  /** Withdraw **/
211
223
  export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
212
224
  onSuccess?: OnSuccessMethod;
@@ -217,7 +229,7 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
217
229
  bankAccountLinkRedirect?: string;
218
230
  additionalWallets?: {
219
231
  wallet: string;
220
- blockchain: 'solana' | 'eth' | 'near' | 'polygon';
232
+ blockchain: 'solana' | 'eth' | 'near' | 'polygon' | 'base' | 'arbitrum';
221
233
  }[];
222
234
  lockAmount?: boolean;
223
235
  transactionSigner?: string;
@@ -254,7 +266,10 @@ export interface CoinflowPolygonWithdrawProps extends CoinflowEvmWithdrawProps {
254
266
  export interface CoinflowBaseWithdrawProps extends CoinflowEvmWithdrawProps {
255
267
  blockchain: 'base';
256
268
  }
257
- export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps;
269
+ export interface CoinflowArbitrumWithdrawProps extends CoinflowEvmWithdrawProps {
270
+ blockchain: 'arbitrum';
271
+ }
272
+ export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps;
258
273
  export interface CommonEvmRedeem {
259
274
  waitForHash?: boolean;
260
275
  }
@@ -292,7 +307,7 @@ export interface TokenRedeem extends CommonEvmRedeem {
292
307
  destination: string;
293
308
  }
294
309
  export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
295
- export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
310
+ 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'> {
296
311
  walletPubkey: string | null | undefined;
297
312
  route: string;
298
313
  routePrefix?: 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;
@@ -17,7 +17,13 @@ export declare class CoinflowUtils {
17
17
  eth: T;
18
18
  polygon: T;
19
19
  base: T;
20
+ arbitrum: T;
20
21
  }): T;
22
+ static getWalletFromUserId({ userId, merchantId, env, }: {
23
+ userId: string;
24
+ merchantId: string;
25
+ env: CoinflowEnvs;
26
+ }): Promise<SolanaWallet>;
21
27
  static getWalletFromEmail({ email, merchantId, env, }: {
22
28
  email: string;
23
29
  merchantId: string;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "0.2.5",
4
+ "version": "0.2.7",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -33,20 +33,20 @@
33
33
  "devDependencies": {
34
34
  "@types/bs58": "^4.0.4",
35
35
  "@rushstack/eslint-patch": "^1.10.4",
36
- "@types/node": "^22.2.0",
37
- "@vitejs/plugin-vue": "^5.1.2",
36
+ "@types/node": "^22.5.5",
37
+ "@vitejs/plugin-vue": "^5.1.4",
38
38
  "@vue/eslint-config-prettier": "^7.0.0",
39
39
  "@vue/eslint-config-typescript": "^13.0.0",
40
40
  "copyfiles": "^2.4.1",
41
- "eslint": "^8.31.0",
42
- "eslint-plugin-vue": "^9.27.0",
41
+ "eslint": "^8.57.1",
42
+ "eslint-plugin-vue": "^9.28.0",
43
43
  "prettier": "^3.3.3",
44
44
  "typescript": "^5.5.4",
45
- "vite": "^5.4.0",
46
- "vite-plugin-dts": "^4.0.2",
47
- "vitepress": "^1.3.2",
48
- "vue": "^3.4.37",
49
- "vue-tsc": "^2.0.29"
45
+ "vite": "^5.4.7",
46
+ "vite-plugin-dts": "^4.2.1",
47
+ "vitepress": "^1.3.4",
48
+ "vue": "^3.4.38",
49
+ "vue-tsc": "^2.1.6"
50
50
  },
51
51
  "dependencies": {
52
52
  "lz-string": "^1.5.0"