@coinflowlabs/vue 1.0.7 → 1.1.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.
@@ -23,6 +23,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
23
23
  lamports: string | number;
24
24
  };
25
25
  subtotal?: import('../lib/common').Subtotal;
26
+ presentment?: import('../lib/common').Currency;
26
27
  onSuccess?: import('../lib/common').OnSuccessMethod;
27
28
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
28
29
  webhookInfo?: {
@@ -54,6 +55,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
54
55
  wallet?: undefined;
55
56
  blockchain?: import('../lib/common').CoinflowBlockchain | undefined;
56
57
  subtotal?: import('../lib/common').Subtotal;
58
+ presentment?: import('../lib/common').Currency;
57
59
  onSuccess?: import('../lib/common').OnSuccessMethod;
58
60
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
59
61
  webhookInfo?: {
@@ -86,6 +88,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
86
88
  action?: import('../lib/common').NearFtTransferCallAction;
87
89
  nearDeposit?: string;
88
90
  subtotal?: import('../lib/common').Subtotal;
91
+ presentment?: import('../lib/common').Currency;
89
92
  onSuccess?: import('../lib/common').OnSuccessMethod;
90
93
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
91
94
  webhookInfo?: {
@@ -116,6 +119,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
116
119
  blockchain: "polygon";
117
120
  wallet: import('../lib/common').EthWallet;
118
121
  subtotal?: import('../lib/common').Subtotal;
122
+ presentment?: import('../lib/common').Currency;
119
123
  onSuccess?: import('../lib/common').OnSuccessMethod;
120
124
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
121
125
  webhookInfo?: {
@@ -146,6 +150,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
146
150
  blockchain: "eth";
147
151
  wallet: import('../lib/common').EthWallet;
148
152
  subtotal?: import('../lib/common').Subtotal;
153
+ presentment?: import('../lib/common').Currency;
149
154
  onSuccess?: import('../lib/common').OnSuccessMethod;
150
155
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
151
156
  webhookInfo?: {
@@ -176,6 +181,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
176
181
  blockchain: "base";
177
182
  wallet: import('../lib/common').EthWallet;
178
183
  subtotal?: import('../lib/common').Subtotal;
184
+ presentment?: import('../lib/common').Currency;
179
185
  onSuccess?: import('../lib/common').OnSuccessMethod;
180
186
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
181
187
  webhookInfo?: {
@@ -206,6 +212,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
206
212
  blockchain: "arbitrum";
207
213
  wallet: import('../lib/common').EthWallet;
208
214
  subtotal?: import('../lib/common').Subtotal;
215
+ presentment?: import('../lib/common').Currency;
209
216
  onSuccess?: import('../lib/common').OnSuccessMethod;
210
217
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
211
218
  webhookInfo?: {
@@ -19,14 +19,15 @@ export interface IFrameMessageHandlers {
19
19
  onSuccess: OnSuccessMethod | undefined;
20
20
  onAuthDeclined: OnAuthDeclinedMethod | undefined;
21
21
  }
22
- declare enum IFrameMessageMethods {
22
+ export declare enum IFrameMessageMethods {
23
23
  SignMessage = "signMessage",
24
24
  SignTransaction = "signTransaction",
25
25
  SendTransaction = "sendTransaction",
26
26
  HeightChange = "heightChange",
27
27
  Success = "success",
28
28
  AuthDeclined = "authDeclined",
29
- Loaded = "loaded"
29
+ Loaded = "loaded",
30
+ AccountLinked = "accountLinked"
30
31
  }
31
32
  export declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
32
33
  export declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
@@ -1,5 +1,5 @@
1
1
  import { Connection, VersionedTransaction, PublicKey, Signer, Transaction } from '@solana/web3.js';
2
- import { Subtotal } from './Subtotal';
2
+ import { Currency, Subtotal } from './Subtotal';
3
3
  export declare enum SettlementType {
4
4
  Credits = "Credits",
5
5
  USDC = "USDC",
@@ -208,6 +208,7 @@ export declare enum PaymentMethods {
208
208
  }
209
209
  export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
210
210
  subtotal?: Subtotal;
211
+ presentment?: Currency;
211
212
  onSuccess?: OnSuccessMethod;
212
213
  onAuthDeclined?: OnAuthDeclinedMethod;
213
214
  webhookInfo?: {
@@ -388,7 +389,7 @@ export interface TokenRedeem extends CommonEvmRedeem {
388
389
  destination: string;
389
390
  }
390
391
  export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
391
- export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'> {
392
+ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'> {
392
393
  walletPubkey: string | null | undefined;
393
394
  sessionKey?: string;
394
395
  route: string;
@@ -6,7 +6,7 @@ export declare class CoinflowUtils {
6
6
  getNSurePartnerId(merchantId: string): Promise<string | undefined>;
7
7
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
8
8
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
9
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, }: CoinflowIFrameProps): string;
9
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, }: CoinflowIFrameProps): string;
10
10
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
11
11
  static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
12
12
  solana: T;
@@ -1,9 +1,58 @@
1
1
  export declare enum Currency {
2
- USD = "USD",
3
- EUR = "EUR",
4
- GBP = "GBP",
5
- BRL = "BRL"
2
+ USD = "USD",// Dollar - USA
3
+ EUR = "EUR",// Euro - European Union
4
+ GBP = "GBP",// Pound - United Kingdom
5
+ BRL = "BRL",// Real - Brazil
6
+ ARS = "ARS",// Peso - Argentina
7
+ BHD = "BHD",// Dinar - Bahrain
8
+ BWP = "BWP",// Pula - Botswana
9
+ BND = "BND",// Dollar - Brunei
10
+ BGN = "BGN",// Lev - Bulgaria
11
+ CLP = "CLP",// Peso - Chile
12
+ HRK = "HRK",// Kuna - Croatia
13
+ DJF = "DJF",// Djibouti Franc - Djibouti
14
+ DOP = "DOP",// Peso - Dominican Republic
15
+ EGP = "EGP",// Pounds - Egypt
16
+ GEL = "GEL",// Lari - Georgia
17
+ HUF = "HUF",// Forint - Hungary
18
+ ISK = "ISK",// Krona - Iceland
19
+ INR = "INR",// Rupees - India
20
+ ILS = "ILS",// New Shekel - Israel
21
+ JMD = "JMD",// Dollar - Jamaica
22
+ JOD = "JOD",// Dinar - Jordan
23
+ KZT = "KZT",// Tenge - Kazakhstan
24
+ KWD = "KWD",// Dinar - Kuwait
25
+ KGS = "KGS",// Som - Kyrgyzstan
26
+ LVL = "LVL",// Lat - Latvia
27
+ LTL = "LTL",// Litai - Lithuania
28
+ MWK = "MWK",// Kwacha - Malawi
29
+ MYR = "MYR",// Ringgit - Malaysia
30
+ MUR = "MUR",// Rupee - Mauritius
31
+ MXN = "MXN",// Peso - Mexico
32
+ MAD = "MAD",// Dirham - Morocco
33
+ NAD = "NAD",// Dollar - Namibia
34
+ NZD = "NZD",// Dollars - New Zealand
35
+ PEN = "PEN",// Nuevo Sol - Peru
36
+ PHP = "PHP",// Peso - Philippines
37
+ PLN = "PLN",// Zloty - Poland
38
+ RON = "RON",// Leu - Romania
39
+ SAR = "SAR",// Riyal - Saudi Arabia
40
+ SGD = "SGD",// Dollar - Singapore
41
+ LKR = "LKR",// Rupee - Sri Lanka
42
+ TWD = "TWD",// New Dollar - Taiwan
43
+ TZS = "TZS",// Shilling - Tanzania
44
+ THB = "THB",// Baht - Thailand
45
+ TRY = "TRY",// New Lira - Turkey
46
+ UAH = "UAH"
6
47
  }
48
+ export type WithdrawCurrency = Currency.USD | Currency.EUR | Currency.GBP | Currency.BRL;
49
+ export declare const WithdrawCurrencies: {
50
+ readonly USD: Currency.USD;
51
+ readonly EUR: Currency.EUR;
52
+ readonly GBP: Currency.GBP;
53
+ readonly BRL: Currency.BRL;
54
+ };
55
+ export declare function isWithdrawCurrency(currency: Currency): currency is WithdrawCurrency;
7
56
  export interface Cents {
8
57
  /**
9
58
  * @isInt Cents must be an integer
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.0.7",
4
+ "version": "1.1.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -32,8 +32,8 @@
32
32
  "devDependencies": {
33
33
  "@types/bs58": "^4.0.4",
34
34
  "@rushstack/eslint-patch": "^1.11.0",
35
- "@types/node": "^22.13.10",
36
- "@vitejs/plugin-vue": "^5.2.2",
35
+ "@types/node": "^22.13.12",
36
+ "@vitejs/plugin-vue": "^5.2.3",
37
37
  "@vue/eslint-config-prettier": "^10.2.0",
38
38
  "@vue/eslint-config-typescript": "^14.5.0",
39
39
  "copyfiles": "^2.4.1",
@@ -41,7 +41,7 @@
41
41
  "eslint-plugin-vue": "^10.0.0",
42
42
  "prettier": "^3.5.3",
43
43
  "typescript": "^5.6.3",
44
- "vite": "^6.2.2",
44
+ "vite": "^6.2.3",
45
45
  "vite-plugin-dts": "^4.4.0",
46
46
  "vitepress": "^1.6.3",
47
47
  "vue": "^3.5.13",