@coinflowlabs/react 3.1.3 → 3.1.5
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 +11 -0
- package/build/cjs/CoinflowTypes.d.ts +6 -1
- package/build/cjs/CoinflowUtils.d.ts +3 -2
- package/build/cjs/CoinflowUtils.js +19 -6
- package/build/cjs/CoinflowUtils.js.map +1 -1
- package/build/esm/CoinflowTypes.d.ts +6 -1
- package/build/esm/CoinflowUtils.d.ts +3 -2
- package/build/esm/CoinflowUtils.js +19 -6
- package/build/esm/CoinflowUtils.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ Props:
|
|
|
16
16
|
* `env` (optional): This defaults to `prod`
|
|
17
17
|
- For testing set to `staging`
|
|
18
18
|
* `onSuccess` (optional): function to run when the withdrawal process is successful
|
|
19
|
+
* `lockAmount` (optional): Whether to let the user select the amount to withdraw or to disable the input
|
|
19
20
|
|
|
20
21
|
## Purchase Usage
|
|
21
22
|
```
|
|
@@ -37,6 +38,8 @@ Props:
|
|
|
37
38
|
* `partialSigners` (optional): Keypairs of Partial Signers to sign the transaction with, this is necessary when initializing new accounts as the new account Keypair must sign the transaction.
|
|
38
39
|
* `debugTx` (optional): Setting this to `true` will sign the transaction with the wallet, and send the transaction with no preflight checks allowing for easier debug of any issues.
|
|
39
40
|
* `token` (optional): The token to use for the purchase. Defaults to USDC. Currently only supported for the Solana Blockchain.
|
|
41
|
+
* `planCode` (optional): When a subscription is being purchased, the code of the subscription plan.
|
|
42
|
+
* `settlementType` (optional): The settlement method to use for the proceeds of a purchase. (Credits, USDC, or Bank)
|
|
40
43
|
|
|
41
44
|
## Utils
|
|
42
45
|
|
|
@@ -46,6 +49,14 @@ Props:
|
|
|
46
49
|
|
|
47
50
|
# Changelog
|
|
48
51
|
|
|
52
|
+
## 3.1.5
|
|
53
|
+
|
|
54
|
+
- Settlement type param for settlement control
|
|
55
|
+
|
|
56
|
+
## 3.1.4
|
|
57
|
+
|
|
58
|
+
- Customer info param for added reporting capabilities
|
|
59
|
+
|
|
49
60
|
## 3.1.2
|
|
50
61
|
|
|
51
62
|
- Added disableGooglePay and disableApplePay props to CoinflowPurchase
|
|
@@ -3,6 +3,7 @@ import type { Connection, VersionedTransaction } from '@solana/web3.js';
|
|
|
3
3
|
import { PublicKey, Signer, Transaction } from '@solana/web3.js';
|
|
4
4
|
import { WalletContextState } from '@solana/wallet-adapter-react';
|
|
5
5
|
import { Wallet } from '@near-wallet-selector/core';
|
|
6
|
+
import { CustomerInfo, SettlementType } from '@coinflow/common';
|
|
6
7
|
/** Coinflow Types **/
|
|
7
8
|
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon';
|
|
8
9
|
export type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
|
|
@@ -68,7 +69,7 @@ export interface CoinflowPolygonHistoryProps extends CoinflowEvmHistoryProps {
|
|
|
68
69
|
blockchain: 'polygon';
|
|
69
70
|
}
|
|
70
71
|
export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps;
|
|
71
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets'> {
|
|
72
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets'> {
|
|
72
73
|
walletPubkey: string;
|
|
73
74
|
IFrameRef: React.RefObject<HTMLIFrameElement>;
|
|
74
75
|
route: string;
|
|
@@ -88,6 +89,8 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>,
|
|
|
88
89
|
planCode?: string;
|
|
89
90
|
disableApplePay?: boolean;
|
|
90
91
|
disableGooglePay?: boolean;
|
|
92
|
+
settlementType?: SettlementType;
|
|
93
|
+
lockAmount?: boolean;
|
|
91
94
|
}
|
|
92
95
|
/** Transactions **/
|
|
93
96
|
export type NearFtTransferCallAction = {
|
|
@@ -132,6 +135,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
132
135
|
planCode?: string;
|
|
133
136
|
disableApplePay?: boolean;
|
|
134
137
|
disableGooglePay?: boolean;
|
|
138
|
+
customerInfo?: CustomerInfo;
|
|
135
139
|
}
|
|
136
140
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
137
141
|
wallet: SolanaWallet;
|
|
@@ -177,6 +181,7 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
|
177
181
|
blockchain: 'solana' | 'eth' | 'near' | 'polygon';
|
|
178
182
|
}[];
|
|
179
183
|
supportsVersionedTransactions?: boolean;
|
|
184
|
+
lockAmount?: boolean;
|
|
180
185
|
}
|
|
181
186
|
export interface CoinflowSolanaWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
182
187
|
wallet: SolanaWallet;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
2
|
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, SolanaWallet } from './CoinflowTypes';
|
|
3
|
+
import { Cents } from '@coinflow/common';
|
|
3
4
|
export declare class CoinflowUtils {
|
|
4
5
|
env: CoinflowEnvs;
|
|
5
6
|
url: string;
|
|
6
7
|
constructor(env?: CoinflowEnvs);
|
|
7
8
|
getNSurePartnerId(merchantId: string): Promise<string | undefined>;
|
|
8
|
-
getCreditBalance(publicKey: string, blockchain: 'solana' | 'near'): Promise<
|
|
9
|
+
getCreditBalance(publicKey: string, merchantId: string, blockchain: 'solana' | 'near'): Promise<Cents>;
|
|
9
10
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
10
11
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
11
|
-
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, supportsVersionedTransactions, webhookInfo, email, loaderBackground, handleHeightChange, useSocket, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, }: CoinflowIFrameProps): string;
|
|
12
|
+
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, supportsVersionedTransactions, webhookInfo, email, loaderBackground, handleHeightChange, useSocket, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, }: CoinflowIFrameProps): string;
|
|
12
13
|
static serializeSolanaTransaction(transaction: Transaction | VersionedTransaction | undefined): string | undefined;
|
|
13
14
|
static solanaWalletSupportsVersionedTransactions(wallet: SolanaWallet): boolean;
|
|
14
15
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
@@ -26,18 +26,24 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
CoinflowUtils.prototype.getCreditBalance = function (publicKey, blockchain) {
|
|
29
|
+
CoinflowUtils.prototype.getCreditBalance = function (publicKey, merchantId, blockchain) {
|
|
30
30
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
31
|
-
var response,
|
|
31
|
+
var response, credits;
|
|
32
32
|
return tslib_1.__generator(this, function (_a) {
|
|
33
33
|
switch (_a.label) {
|
|
34
|
-
case 0: return [4 /*yield*/, fetch(this.url + "/
|
|
34
|
+
case 0: return [4 /*yield*/, fetch(this.url + "/api/customer/balances/".concat(merchantId), {
|
|
35
|
+
method: 'GET',
|
|
36
|
+
headers: {
|
|
37
|
+
'x-coinflow-auth-wallet': publicKey,
|
|
38
|
+
'x-coinflow-auth-blockchain': blockchain,
|
|
39
|
+
},
|
|
40
|
+
})];
|
|
35
41
|
case 1:
|
|
36
42
|
response = _a.sent();
|
|
37
43
|
return [4 /*yield*/, response.json()];
|
|
38
44
|
case 2:
|
|
39
|
-
|
|
40
|
-
return [2 /*return*/,
|
|
45
|
+
credits = (_a.sent()).credits;
|
|
46
|
+
return [2 /*return*/, credits];
|
|
41
47
|
}
|
|
42
48
|
});
|
|
43
49
|
});
|
|
@@ -58,7 +64,7 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
58
64
|
};
|
|
59
65
|
CoinflowUtils.getCoinflowUrl = function (_a) {
|
|
60
66
|
var _b;
|
|
61
|
-
var walletPubkey = _a.walletPubkey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain, supportsVersionedTransactions = _a.supportsVersionedTransactions, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange, useSocket = _a.useSocket, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, nearDeposit = _a.nearDeposit, chargebackProtectionData = _a.chargebackProtectionData, merchantCss = _a.merchantCss, color = _a.color, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, token = _a.token, tokens = _a.tokens, planCode = _a.planCode, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay;
|
|
67
|
+
var walletPubkey = _a.walletPubkey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain, supportsVersionedTransactions = _a.supportsVersionedTransactions, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange, useSocket = _a.useSocket, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, nearDeposit = _a.nearDeposit, chargebackProtectionData = _a.chargebackProtectionData, merchantCss = _a.merchantCss, color = _a.color, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, token = _a.token, tokens = _a.tokens, planCode = _a.planCode, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, settlementType = _a.settlementType, lockAmount = _a.lockAmount;
|
|
62
68
|
var prefix = routePrefix
|
|
63
69
|
? "/".concat(routePrefix, "/").concat(blockchain)
|
|
64
70
|
: "/".concat(blockchain);
|
|
@@ -76,6 +82,9 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
76
82
|
if (webhookInfo) {
|
|
77
83
|
url.searchParams.append('webhookInfo', Buffer.from(JSON.stringify(webhookInfo)).toString('base64'));
|
|
78
84
|
}
|
|
85
|
+
if (customerInfo) {
|
|
86
|
+
url.searchParams.append('customerInfo', Buffer.from(JSON.stringify(customerInfo)).toString('base64'));
|
|
87
|
+
}
|
|
79
88
|
if (email) {
|
|
80
89
|
url.searchParams.append('email', email);
|
|
81
90
|
}
|
|
@@ -123,6 +132,10 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
123
132
|
url.searchParams.append('disableApplePay', 'true');
|
|
124
133
|
if (disableGooglePay)
|
|
125
134
|
url.searchParams.append('disableGooglePay', 'true');
|
|
135
|
+
if (settlementType)
|
|
136
|
+
url.searchParams.append('settlementType', settlementType);
|
|
137
|
+
if (lockAmount)
|
|
138
|
+
url.searchParams.append('lockAmount', 'true');
|
|
126
139
|
return url.toString();
|
|
127
140
|
};
|
|
128
141
|
CoinflowUtils.serializeSolanaTransaction = function (transaction) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";;;;AACA,sDAA0B;
|
|
1
|
+
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],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,0CAAE,OAAO,0CAAE,4BAA4B,0CAAE,GAAG,CAAC,CAAC,CAAC,CAAA,CAAC;IACxE,CAAC;IAEM,0BAAY,GAAnB,UACE,UAA8B,EAC9B,IAA+C;QAE/C,QAAQ,UAAU,EAAE,CAAC;YACnB,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,MAAM,CAAC;YACrB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,IAAI,CAAC;YACnB,KAAK,SAAS;gBACZ,OAAO,IAAI,CAAC,OAAO,CAAC;YACtB,KAAK,KAAK;gBACR,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS;oBACxB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBAClE,OAAO,IAAI,CAAC,GAAG,CAAC;YAClB;gBACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAhOD,IAgOC;AAhOY,sCAAa"}
|
|
@@ -3,6 +3,7 @@ import type { Connection, VersionedTransaction } from '@solana/web3.js';
|
|
|
3
3
|
import { PublicKey, Signer, Transaction } from '@solana/web3.js';
|
|
4
4
|
import { WalletContextState } from '@solana/wallet-adapter-react';
|
|
5
5
|
import { Wallet } from '@near-wallet-selector/core';
|
|
6
|
+
import { CustomerInfo, SettlementType } from '@coinflow/common';
|
|
6
7
|
/** Coinflow Types **/
|
|
7
8
|
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon';
|
|
8
9
|
export type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
|
|
@@ -68,7 +69,7 @@ export interface CoinflowPolygonHistoryProps extends CoinflowEvmHistoryProps {
|
|
|
68
69
|
blockchain: 'polygon';
|
|
69
70
|
}
|
|
70
71
|
export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps;
|
|
71
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets'> {
|
|
72
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets'> {
|
|
72
73
|
walletPubkey: string;
|
|
73
74
|
IFrameRef: React.RefObject<HTMLIFrameElement>;
|
|
74
75
|
route: string;
|
|
@@ -88,6 +89,8 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>,
|
|
|
88
89
|
planCode?: string;
|
|
89
90
|
disableApplePay?: boolean;
|
|
90
91
|
disableGooglePay?: boolean;
|
|
92
|
+
settlementType?: SettlementType;
|
|
93
|
+
lockAmount?: boolean;
|
|
91
94
|
}
|
|
92
95
|
/** Transactions **/
|
|
93
96
|
export type NearFtTransferCallAction = {
|
|
@@ -132,6 +135,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
132
135
|
planCode?: string;
|
|
133
136
|
disableApplePay?: boolean;
|
|
134
137
|
disableGooglePay?: boolean;
|
|
138
|
+
customerInfo?: CustomerInfo;
|
|
135
139
|
}
|
|
136
140
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
137
141
|
wallet: SolanaWallet;
|
|
@@ -177,6 +181,7 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
|
177
181
|
blockchain: 'solana' | 'eth' | 'near' | 'polygon';
|
|
178
182
|
}[];
|
|
179
183
|
supportsVersionedTransactions?: boolean;
|
|
184
|
+
lockAmount?: boolean;
|
|
180
185
|
}
|
|
181
186
|
export interface CoinflowSolanaWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
182
187
|
wallet: SolanaWallet;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
2
|
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, SolanaWallet } from './CoinflowTypes';
|
|
3
|
+
import { Cents } from '@coinflow/common';
|
|
3
4
|
export declare class CoinflowUtils {
|
|
4
5
|
env: CoinflowEnvs;
|
|
5
6
|
url: string;
|
|
6
7
|
constructor(env?: CoinflowEnvs);
|
|
7
8
|
getNSurePartnerId(merchantId: string): Promise<string | undefined>;
|
|
8
|
-
getCreditBalance(publicKey: string, blockchain: 'solana' | 'near'): Promise<
|
|
9
|
+
getCreditBalance(publicKey: string, merchantId: string, blockchain: 'solana' | 'near'): Promise<Cents>;
|
|
9
10
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
10
11
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
11
|
-
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, supportsVersionedTransactions, webhookInfo, email, loaderBackground, handleHeightChange, useSocket, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, }: CoinflowIFrameProps): string;
|
|
12
|
+
static getCoinflowUrl({ walletPubkey, route, routePrefix, env, amount, transaction, blockchain, supportsVersionedTransactions, webhookInfo, email, loaderBackground, handleHeightChange, useSocket, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, }: CoinflowIFrameProps): string;
|
|
12
13
|
static serializeSolanaTransaction(transaction: Transaction | VersionedTransaction | undefined): string | undefined;
|
|
13
14
|
static solanaWalletSupportsVersionedTransactions(wallet: SolanaWallet): boolean;
|
|
14
15
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
@@ -23,18 +23,24 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
CoinflowUtils.prototype.getCreditBalance = function (publicKey, blockchain) {
|
|
26
|
+
CoinflowUtils.prototype.getCreditBalance = function (publicKey, merchantId, blockchain) {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function () {
|
|
28
|
-
var response,
|
|
28
|
+
var response, credits;
|
|
29
29
|
return __generator(this, function (_a) {
|
|
30
30
|
switch (_a.label) {
|
|
31
|
-
case 0: return [4 /*yield*/, fetch(this.url + "/
|
|
31
|
+
case 0: return [4 /*yield*/, fetch(this.url + "/api/customer/balances/".concat(merchantId), {
|
|
32
|
+
method: 'GET',
|
|
33
|
+
headers: {
|
|
34
|
+
'x-coinflow-auth-wallet': publicKey,
|
|
35
|
+
'x-coinflow-auth-blockchain': blockchain,
|
|
36
|
+
},
|
|
37
|
+
})];
|
|
32
38
|
case 1:
|
|
33
39
|
response = _a.sent();
|
|
34
40
|
return [4 /*yield*/, response.json()];
|
|
35
41
|
case 2:
|
|
36
|
-
|
|
37
|
-
return [2 /*return*/,
|
|
42
|
+
credits = (_a.sent()).credits;
|
|
43
|
+
return [2 /*return*/, credits];
|
|
38
44
|
}
|
|
39
45
|
});
|
|
40
46
|
});
|
|
@@ -55,7 +61,7 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
55
61
|
};
|
|
56
62
|
CoinflowUtils.getCoinflowUrl = function (_a) {
|
|
57
63
|
var _b;
|
|
58
|
-
var walletPubkey = _a.walletPubkey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain, supportsVersionedTransactions = _a.supportsVersionedTransactions, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange, useSocket = _a.useSocket, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, nearDeposit = _a.nearDeposit, chargebackProtectionData = _a.chargebackProtectionData, merchantCss = _a.merchantCss, color = _a.color, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, token = _a.token, tokens = _a.tokens, planCode = _a.planCode, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay;
|
|
64
|
+
var walletPubkey = _a.walletPubkey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain, supportsVersionedTransactions = _a.supportsVersionedTransactions, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange, useSocket = _a.useSocket, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, nearDeposit = _a.nearDeposit, chargebackProtectionData = _a.chargebackProtectionData, merchantCss = _a.merchantCss, color = _a.color, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, token = _a.token, tokens = _a.tokens, planCode = _a.planCode, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, settlementType = _a.settlementType, lockAmount = _a.lockAmount;
|
|
59
65
|
var prefix = routePrefix
|
|
60
66
|
? "/".concat(routePrefix, "/").concat(blockchain)
|
|
61
67
|
: "/".concat(blockchain);
|
|
@@ -73,6 +79,9 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
73
79
|
if (webhookInfo) {
|
|
74
80
|
url.searchParams.append('webhookInfo', Buffer.from(JSON.stringify(webhookInfo)).toString('base64'));
|
|
75
81
|
}
|
|
82
|
+
if (customerInfo) {
|
|
83
|
+
url.searchParams.append('customerInfo', Buffer.from(JSON.stringify(customerInfo)).toString('base64'));
|
|
84
|
+
}
|
|
76
85
|
if (email) {
|
|
77
86
|
url.searchParams.append('email', email);
|
|
78
87
|
}
|
|
@@ -120,6 +129,10 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
120
129
|
url.searchParams.append('disableApplePay', 'true');
|
|
121
130
|
if (disableGooglePay)
|
|
122
131
|
url.searchParams.append('disableGooglePay', 'true');
|
|
132
|
+
if (settlementType)
|
|
133
|
+
url.searchParams.append('settlementType', settlementType);
|
|
134
|
+
if (lockAmount)
|
|
135
|
+
url.searchParams.append('lockAmount', 'true');
|
|
123
136
|
return url.toString();
|
|
124
137
|
};
|
|
125
138
|
CoinflowUtils.serializeSolanaTransaction = function (transaction) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,MAAM,CAAC;AAS1B;IAIE,uBAAY,GAAkB;QAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,MAAM,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG,KAAK,MAAM;YAAE,IAAI,CAAC,GAAG,GAAG,2BAA2B,CAAC;aAC3D,IAAI,IAAI,CAAC,GAAG,KAAK,OAAO;YAAE,IAAI,CAAC,GAAG,GAAG,uBAAuB,CAAC;;YAC7D,IAAI,CAAC,GAAG,GAAG,sBAAe,IAAI,CAAC,GAAG,mBAAgB,CAAC;IAC1D,CAAC;IAEK,yCAAiB,GAAvB,UAAwB,UAAkB;;;gBACxC,sBAAO,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,yBAAkB,UAAU,CAAE,CAAC;yBACpD,IAAI,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,IAAI,EAAE,EAAf,CAAe,CAAC;yBACjC,IAAI,CACH,UAAC,IAGA,YAAK,OAAA,CAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,cAAc,KAAI,IAAI,CAAC,cAAc,CAAA,EAAA,CAChE;yBACA,KAAK,CAAC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
"description": "React Component for Coinflow Withdraw",
|
|
5
5
|
"main": "./build/cjs/index.js",
|
|
6
6
|
"module": "./build/esm/index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@solana/wallet-adapter-react": "^0.15.32",
|
|
36
36
|
"@near-wallet-selector/core": "^8.9.1",
|
|
37
|
-
"@types/react": "^18.2.
|
|
37
|
+
"@types/react": "^18.2.47",
|
|
38
38
|
"eslint-config-react-app": "^7.0.1",
|
|
39
39
|
"typescript": "^5.3.2",
|
|
40
|
-
"csstype": "^3.1.
|
|
40
|
+
"csstype": "^3.1.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@solana/web3.js": ">=1.54.0",
|