@coinflowlabs/vue 0.2.8 → 0.3.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/README.md +4 -0
- package/dist/coinflow-vue.js +2322 -2280
- package/dist/coinflow-vue.umd.cjs +6 -6
- package/dist/components/CoinflowPurchase.vue.d.ts +28 -0
- package/dist/lib/common/CoinflowLibMessageHandlers.d.ts +2 -2
- package/dist/lib/common/CoinflowTypes.d.ts +9 -3
- package/dist/lib/common/CoinflowUtils.d.ts +2 -1
- package/package.json +5 -5
|
@@ -43,6 +43,34 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
43
43
|
loaderBackground?: string;
|
|
44
44
|
handleHeightChange?: (height: string) => void;
|
|
45
45
|
theme?: import('../lib/common').MerchantTheme;
|
|
46
|
+
} | {
|
|
47
|
+
walletPubkey: string | null | undefined;
|
|
48
|
+
route: string;
|
|
49
|
+
transaction: string | undefined;
|
|
50
|
+
sessionKey: string;
|
|
51
|
+
wallet?: undefined;
|
|
52
|
+
blockchain?: import('../lib/common').CoinflowBlockchain | undefined;
|
|
53
|
+
amount?: number | string;
|
|
54
|
+
onSuccess?: import('../lib/common').OnSuccessMethod;
|
|
55
|
+
webhookInfo?: object;
|
|
56
|
+
email?: string;
|
|
57
|
+
chargebackProtectionData?: import('../lib/common').ChargebackProtectionData;
|
|
58
|
+
planCode?: string;
|
|
59
|
+
disableApplePay?: boolean;
|
|
60
|
+
disableGooglePay?: boolean;
|
|
61
|
+
customerInfo?: import('../lib/common').CustomerInfo;
|
|
62
|
+
settlementType?: import('../lib/common').SettlementType;
|
|
63
|
+
authOnly?: boolean;
|
|
64
|
+
deviceId?: string;
|
|
65
|
+
jwtToken?: string;
|
|
66
|
+
supportEmail?: string;
|
|
67
|
+
origins?: string[];
|
|
68
|
+
threeDsChallengePreference?: import('../lib/common').ThreeDsChallengePreference;
|
|
69
|
+
merchantId: string;
|
|
70
|
+
env?: import('../lib/common').CoinflowEnvs;
|
|
71
|
+
loaderBackground?: string;
|
|
72
|
+
handleHeightChange?: (height: string) => void;
|
|
73
|
+
theme?: import('../lib/common').MerchantTheme;
|
|
46
74
|
} | {
|
|
47
75
|
walletPubkey: string | null | undefined;
|
|
48
76
|
route: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoinflowPurchaseProps, OnSuccessMethod } from './CoinflowTypes';
|
|
1
|
+
import { CoinflowPurchaseProps, CoinflowSessionKeyPurchaseProps, OnSuccessMethod } from './CoinflowTypes';
|
|
2
2
|
export type WalletCall = {
|
|
3
3
|
method: IFrameMessageMethods;
|
|
4
4
|
data: string;
|
|
@@ -26,7 +26,7 @@ declare enum IFrameMessageMethods {
|
|
|
26
26
|
Success = "success",
|
|
27
27
|
Load = "load"
|
|
28
28
|
}
|
|
29
|
-
export declare function getWalletPubkey(
|
|
29
|
+
export declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet'> | Pick<CoinflowSessionKeyPurchaseProps, 'sessionKey'>): string | null | undefined;
|
|
30
30
|
export declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers): Promise<string> | void;
|
|
31
31
|
export declare function getHandlers(props: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain' | 'onSuccess'>): Omit<IFrameMessageHandlers, 'handleHeightChange'>;
|
|
32
32
|
export {};
|
|
@@ -34,13 +34,13 @@ export interface CustomerInfo {
|
|
|
34
34
|
lng?: string;
|
|
35
35
|
}
|
|
36
36
|
/** Coinflow Types **/
|
|
37
|
-
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base' | 'arbitrum';
|
|
37
|
+
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'user';
|
|
38
38
|
export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
|
|
39
39
|
export interface CoinflowTypes {
|
|
40
40
|
merchantId: string;
|
|
41
41
|
env?: CoinflowEnvs;
|
|
42
42
|
loaderBackground?: string;
|
|
43
|
-
blockchain
|
|
43
|
+
blockchain?: CoinflowBlockchain | undefined;
|
|
44
44
|
handleHeightChange?: (height: string) => void;
|
|
45
45
|
theme?: MerchantTheme;
|
|
46
46
|
}
|
|
@@ -199,6 +199,11 @@ export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps
|
|
|
199
199
|
lamports: string | number;
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
+
export interface CoinflowSessionKeyPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
203
|
+
sessionKey: string;
|
|
204
|
+
wallet?: undefined;
|
|
205
|
+
blockchain?: CoinflowBlockchain | undefined;
|
|
206
|
+
}
|
|
202
207
|
export interface CoinflowNearPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
203
208
|
wallet: NearWallet;
|
|
204
209
|
blockchain: 'near';
|
|
@@ -222,7 +227,7 @@ export interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
|
|
|
222
227
|
export interface CoinflowArbitrumPurchaseProps extends CoinflowEvmPurchaseProps {
|
|
223
228
|
blockchain: 'arbitrum';
|
|
224
229
|
}
|
|
225
|
-
export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
|
|
230
|
+
export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
|
|
226
231
|
/** Withdraw **/
|
|
227
232
|
export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
228
233
|
onSuccess?: OnSuccessMethod;
|
|
@@ -313,6 +318,7 @@ export interface TokenRedeem extends CommonEvmRedeem {
|
|
|
313
318
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
|
|
314
319
|
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
|
|
315
320
|
walletPubkey: string | null | undefined;
|
|
321
|
+
sessionKey?: string;
|
|
316
322
|
route: string;
|
|
317
323
|
routePrefix?: string;
|
|
318
324
|
transaction?: 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, threeDsChallengePreference, supportEmail, }: CoinflowIFrameProps): string;
|
|
12
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, 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, supportEmail, }: CoinflowIFrameProps): string;
|
|
13
13
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
14
14
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
15
15
|
solana: T;
|
|
@@ -18,6 +18,7 @@ export declare class CoinflowUtils {
|
|
|
18
18
|
polygon: T;
|
|
19
19
|
base: T;
|
|
20
20
|
arbitrum: T;
|
|
21
|
+
user: T;
|
|
21
22
|
}): T;
|
|
22
23
|
static getWalletFromUserId({ userId, merchantId, env, }: {
|
|
23
24
|
userId: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/bs58": "^4.0.4",
|
|
35
35
|
"@rushstack/eslint-patch": "^1.10.4",
|
|
36
|
-
"@types/node": "^22.7.
|
|
36
|
+
"@types/node": "^22.7.7",
|
|
37
37
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
38
38
|
"@vue/eslint-config-prettier": "^10.0.0",
|
|
39
39
|
"@vue/eslint-config-typescript": "^13.0.0",
|
|
40
40
|
"copyfiles": "^2.4.1",
|
|
41
41
|
"eslint": "^8.57.1",
|
|
42
|
-
"eslint-plugin-vue": "^9.29.
|
|
42
|
+
"eslint-plugin-vue": "^9.29.1",
|
|
43
43
|
"prettier": "^3.3.3",
|
|
44
44
|
"typescript": "^5.5.4",
|
|
45
|
-
"vite": "^5.4.
|
|
46
|
-
"vite-plugin-dts": "^4.2.
|
|
45
|
+
"vite": "^5.4.9",
|
|
46
|
+
"vite-plugin-dts": "^4.2.4",
|
|
47
47
|
"vitepress": "^1.4.1",
|
|
48
48
|
"vue": "^3.5.11",
|
|
49
49
|
"vue-tsc": "^2.1.6"
|