@coinflowlabs/react 1.2.0 → 2.0.0-sandbox-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 +6 -0
- package/build/cjs/CoinflowIFrame.d.ts +4 -2
- package/build/cjs/CoinflowIFrame.js +8 -18
- package/build/cjs/CoinflowIFrame.js.map +1 -1
- package/build/cjs/CoinflowPurchase.d.ts +30 -3
- package/build/cjs/CoinflowPurchase.js +36 -8
- package/build/cjs/CoinflowPurchase.js.map +1 -1
- package/build/cjs/CoinflowPurchaseHistory.js +7 -7
- package/build/cjs/CoinflowPurchaseHistory.js.map +1 -1
- package/build/cjs/CoinflowUtils.d.ts +7 -15
- package/build/cjs/CoinflowUtils.js +12 -7
- package/build/cjs/CoinflowUtils.js.map +1 -1
- package/build/cjs/CoinflowWithdraw.d.ts +7 -3
- package/build/cjs/CoinflowWithdraw.js +12 -11
- package/build/cjs/CoinflowWithdraw.js.map +1 -1
- package/build/cjs/CoinflowWithdrawHistory.js +10 -10
- package/build/cjs/CoinflowWithdrawHistory.js.map +1 -1
- package/build/cjs/CommonCoinflowProps.d.ts +5 -1
- package/build/cjs/CommonCoinflowProps.js +1 -1
- package/build/cjs/EthIFrameMessageHandlers.d.ts +3 -1
- package/build/cjs/EthIFrameMessageHandlers.js +16 -17
- package/build/cjs/EthIFrameMessageHandlers.js.map +1 -1
- package/build/cjs/NearIFrameMessageHandlers.js +1 -22
- package/build/cjs/NearIFrameMessageHandlers.js.map +1 -1
- package/build/cjs/SolanaIFrameMessageHandlers.d.ts +2 -2
- package/build/cjs/SolanaIFrameMessageHandlers.js +56 -73
- package/build/cjs/SolanaIFrameMessageHandlers.js.map +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/useIframeWallet.d.ts +1 -1
- package/build/cjs/useIframeWallet.js +24 -21
- package/build/cjs/useIframeWallet.js.map +1 -1
- package/build/esm/CoinflowIFrame.d.ts +4 -2
- package/build/esm/CoinflowIFrame.js +6 -16
- package/build/esm/CoinflowIFrame.js.map +1 -1
- package/build/esm/CoinflowPurchase.d.ts +30 -3
- package/build/esm/CoinflowPurchase.js +31 -4
- package/build/esm/CoinflowPurchase.js.map +1 -1
- package/build/esm/CoinflowPurchaseHistory.js +3 -3
- package/build/esm/CoinflowUtils.d.ts +7 -15
- package/build/esm/CoinflowUtils.js +11 -6
- package/build/esm/CoinflowUtils.js.map +1 -1
- package/build/esm/CoinflowWithdraw.d.ts +7 -3
- package/build/esm/CoinflowWithdraw.js +7 -6
- package/build/esm/CoinflowWithdraw.js.map +1 -1
- package/build/esm/CoinflowWithdrawHistory.js +4 -4
- package/build/esm/CommonCoinflowProps.d.ts +5 -1
- package/build/esm/EthIFrameMessageHandlers.d.ts +3 -1
- package/build/esm/EthIFrameMessageHandlers.js +15 -16
- package/build/esm/EthIFrameMessageHandlers.js.map +1 -1
- package/build/esm/NearIFrameMessageHandlers.js +0 -21
- package/build/esm/NearIFrameMessageHandlers.js.map +1 -1
- package/build/esm/SolanaIFrameMessageHandlers.d.ts +2 -2
- package/build/esm/SolanaIFrameMessageHandlers.js +54 -71
- package/build/esm/SolanaIFrameMessageHandlers.js.map +1 -1
- package/build/esm/useIframeWallet.d.ts +1 -1
- package/build/esm/useIframeWallet.js +23 -20
- package/build/esm/useIframeWallet.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ Props:
|
|
|
36
36
|
* `transaction` (optional): transaction for the user to run which redeems their credits with your smart contract. Create this transaction just like you would for a normal user who has USDC in their account.
|
|
37
37
|
* `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
38
|
* `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
|
+
* `token` (optional): The token to use for the purchase. Defaults to USDC. Currently only supported for the Solana Blockchain.
|
|
39
40
|
|
|
40
41
|
## Utils
|
|
41
42
|
|
|
@@ -45,6 +46,11 @@ Props:
|
|
|
45
46
|
|
|
46
47
|
# Changelog
|
|
47
48
|
|
|
49
|
+
### 1.3.0
|
|
50
|
+
|
|
51
|
+
- Added support for Polygon blockchain
|
|
52
|
+
- Added support for Solana Checkout with non-USDC tokens
|
|
53
|
+
|
|
48
54
|
### 1.2.0
|
|
49
55
|
|
|
50
56
|
- Added support for Ethereum Mainnet blockchain
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CoinflowBlockchain, CoinflowEnvs } from './CoinflowUtils';
|
|
3
|
+
import type { PublicKey } from '@solana/web3.js';
|
|
3
4
|
interface CoinflowIFrameProps {
|
|
4
5
|
walletPubkey: string;
|
|
5
6
|
IFrameRef: React.RefObject<HTMLIFrameElement>;
|
|
@@ -8,10 +9,11 @@ interface CoinflowIFrameProps {
|
|
|
8
9
|
transaction?: string;
|
|
9
10
|
blockchain: CoinflowBlockchain;
|
|
10
11
|
webhookInfo?: object;
|
|
11
|
-
token?: string;
|
|
12
|
+
token?: string | PublicKey;
|
|
12
13
|
email?: string;
|
|
13
14
|
env?: CoinflowEnvs;
|
|
14
15
|
loaderBackground?: string;
|
|
16
|
+
supportsVersionedTransactions?: boolean;
|
|
15
17
|
}
|
|
16
|
-
export declare function CoinflowIFrame({ walletPubkey, IFrameRef, env, route, transaction, amount, blockchain, webhookInfo, token, email, loaderBackground, }: CoinflowIFrameProps): JSX.Element;
|
|
18
|
+
export declare function CoinflowIFrame({ walletPubkey, IFrameRef, env, route, transaction, amount, blockchain, webhookInfo, token, email, loaderBackground, supportsVersionedTransactions }: CoinflowIFrameProps): JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoinflowIFrame = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
var CoinflowUtils_1 = require("./CoinflowUtils");
|
|
7
7
|
function CoinflowIFrame(_a) {
|
|
8
|
-
var walletPubkey = _a.walletPubkey, IFrameRef = _a.IFrameRef, env = _a.env, route = _a.route, transaction = _a.transaction, amount = _a.amount, blockchain = _a.blockchain, webhookInfo = _a.webhookInfo, token = _a.token, email = _a.email, loaderBackground = _a.loaderBackground;
|
|
8
|
+
var walletPubkey = _a.walletPubkey, IFrameRef = _a.IFrameRef, env = _a.env, route = _a.route, transaction = _a.transaction, amount = _a.amount, blockchain = _a.blockchain, webhookInfo = _a.webhookInfo, token = _a.token, email = _a.email, loaderBackground = _a.loaderBackground, supportsVersionedTransactions = _a.supportsVersionedTransactions;
|
|
9
9
|
var url = (0, react_1.useMemo)(function () {
|
|
10
10
|
return CoinflowUtils_1.CoinflowUtils.getCoinflowUrl({
|
|
11
11
|
walletPubkey: walletPubkey,
|
|
@@ -15,30 +15,20 @@ function CoinflowIFrame(_a) {
|
|
|
15
15
|
transaction: transaction,
|
|
16
16
|
blockchain: blockchain,
|
|
17
17
|
webhookInfo: webhookInfo,
|
|
18
|
-
token: token,
|
|
18
|
+
token: token === null || token === void 0 ? void 0 : token.toString(),
|
|
19
19
|
email: email,
|
|
20
|
-
loaderBackground: loaderBackground
|
|
20
|
+
loaderBackground: loaderBackground,
|
|
21
|
+
supportsVersionedTransactions: supportsVersionedTransactions
|
|
21
22
|
});
|
|
22
|
-
}, [
|
|
23
|
-
|
|
24
|
-
walletPubkey,
|
|
25
|
-
amount,
|
|
26
|
-
env,
|
|
27
|
-
route,
|
|
28
|
-
transaction,
|
|
29
|
-
blockchain,
|
|
30
|
-
webhookInfo,
|
|
31
|
-
token,
|
|
32
|
-
email,
|
|
33
|
-
]);
|
|
34
|
-
return (0, react_1.useMemo)(function () { return (react_1["default"].createElement("iframe", { onLoad: function () {
|
|
23
|
+
}, [walletPubkey, amount, env, route, transaction, blockchain, webhookInfo, token, email, loaderBackground, supportsVersionedTransactions]);
|
|
24
|
+
return (0, react_1.useMemo)(function () { return (react_1.default.createElement("iframe", { onLoad: function () {
|
|
35
25
|
if (IFrameRef.current)
|
|
36
26
|
IFrameRef.current.style.opacity = '1';
|
|
37
27
|
}, ref: IFrameRef, style: {
|
|
38
28
|
width: '100%',
|
|
39
29
|
height: '100%',
|
|
40
30
|
opacity: 0,
|
|
41
|
-
transition: 'opacity 300ms linear'
|
|
31
|
+
transition: 'opacity 300ms linear',
|
|
42
32
|
}, title: "withdraw", frameBorder: "0", src: url })); }, [IFrameRef, url]);
|
|
43
33
|
}
|
|
44
34
|
exports.CoinflowIFrame = CoinflowIFrame;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowIFrame.js","sourceRoot":"","sources":["../../src/CoinflowIFrame.tsx"],"names":[],"mappings":";;;;AAAA,qDAAqC;AACrC,iDAAgF;
|
|
1
|
+
{"version":3,"file":"CoinflowIFrame.js","sourceRoot":"","sources":["../../src/CoinflowIFrame.tsx"],"names":[],"mappings":";;;;AAAA,qDAAqC;AACrC,iDAAgF;AAkBhF,SAAgB,cAAc,CAAC,EAaT;QAZpB,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,GAAG,SAAA,EACH,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,KAAK,WAAA,EACL,KAAK,WAAA,EACL,gBAAgB,sBAAA,EAChB,6BAA6B,mCAAA;IAE7B,IAAM,GAAG,GAAG,IAAA,eAAO,EAAC;QAClB,OAAO,6BAAa,CAAC,cAAc,CAAC;YAClC,YAAY,cAAA;YACZ,MAAM,QAAA;YACN,GAAG,KAAA;YACH,KAAK,OAAA;YACL,WAAW,aAAA;YACX,UAAU,YAAA;YACV,WAAW,aAAA;YACX,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAE;YACxB,KAAK,OAAA;YACL,gBAAgB,kBAAA;YAChB,6BAA6B,+BAAA;SAC9B,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,6BAA6B,CAAC,CAAC,CAAC;IAE5I,OAAO,IAAA,eAAO,EACZ,cAAM,OAAA,CACJ,0CACE,MAAM,EAAE;YACN,IAAI,SAAS,CAAC,OAAO;gBAAE,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;QAC/D,CAAC,EACD,GAAG,EAAE,SAAS,EACd,KAAK,EAAE;YACL,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,CAAC;YACV,UAAU,EAAE,sBAAsB;SACnC,EACD,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,GAAG,EACf,GAAG,EAAE,GAAG,GACR,CACH,EAhBK,CAgBL,EACD,CAAC,SAAS,EAAE,GAAG,CAAC,CACjB,CAAC;AACJ,CAAC;AAlDD,wCAkDC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Connection, Signer, Transaction } from
|
|
3
|
-
import { NearWallet, SolanaWalletContextState } from './CoinflowUtils';
|
|
2
|
+
import type { Connection, PublicKey, Signer, Transaction } from "@solana/web3.js";
|
|
3
|
+
import { EthWallet, NearWallet, SolanaWalletContextState } from './CoinflowUtils';
|
|
4
4
|
import { OnSuccessMethod } from './useIframeWallet';
|
|
5
5
|
import { CommonCoinflowProps } from './CommonCoinflowProps';
|
|
6
6
|
export interface CoinflowCommonPurchaseProps extends CommonCoinflowProps {
|
|
@@ -16,6 +16,8 @@ export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps
|
|
|
16
16
|
debugTx?: boolean;
|
|
17
17
|
connection: Connection;
|
|
18
18
|
blockchain: 'solana';
|
|
19
|
+
token?: PublicKey | string;
|
|
20
|
+
supportsVersionedTransactions?: boolean;
|
|
19
21
|
}
|
|
20
22
|
export type NearFtTransferCallAction = {
|
|
21
23
|
methodName: 'ft_transfer_call';
|
|
@@ -28,4 +30,29 @@ export interface CoinflowNearPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
|
28
30
|
blockchain: 'near';
|
|
29
31
|
action?: NearFtTransferCallAction;
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
type BigNumberish = object | bigint | string | number;
|
|
34
|
+
type Bytes = ArrayLike<number>;
|
|
35
|
+
type BytesLike = Bytes | string;
|
|
36
|
+
type EvmTransaction = {
|
|
37
|
+
to: string;
|
|
38
|
+
from?: string;
|
|
39
|
+
nonce?: BigNumberish;
|
|
40
|
+
gasLimit?: BigNumberish;
|
|
41
|
+
gasPrice?: BigNumberish;
|
|
42
|
+
data?: BytesLike;
|
|
43
|
+
value?: BigNumberish;
|
|
44
|
+
chainId?: number;
|
|
45
|
+
type?: number;
|
|
46
|
+
maxPriorityFeePerGas?: BigNumberish;
|
|
47
|
+
maxFeePerGas?: BigNumberish;
|
|
48
|
+
customData?: Record<string, any>;
|
|
49
|
+
ccipReadEnabled?: boolean;
|
|
50
|
+
};
|
|
51
|
+
export interface CoinflowPolygonPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
52
|
+
transaction?: EvmTransaction;
|
|
53
|
+
wallet: EthWallet;
|
|
54
|
+
blockchain: 'polygon';
|
|
55
|
+
}
|
|
56
|
+
export declare function CoinflowPurchase(props: CoinflowSolanaPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps): JSX.Element;
|
|
57
|
+
export declare function PolygonCoinflowPurchase({ merchantId, amount, env, onSuccess, wallet, transaction, webhookInfo, email, loaderBackground, }: CoinflowPolygonPurchaseProps): JSX.Element | null;
|
|
58
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
3
|
-
exports.CoinflowPurchase = void 0;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolygonCoinflowPurchase = exports.CoinflowPurchase = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
var CoinflowIFrame_1 = require("./CoinflowIFrame");
|
|
@@ -8,20 +8,22 @@ var SolanaIFrameMessageHandlers_1 = require("./SolanaIFrameMessageHandlers");
|
|
|
8
8
|
var CoinflowUtils_1 = require("./CoinflowUtils");
|
|
9
9
|
var useIframeWallet_1 = require("./useIframeWallet");
|
|
10
10
|
var NearIFrameMessageHandlers_1 = require("./NearIFrameMessageHandlers");
|
|
11
|
+
var EthIFrameMessageHandlers_1 = require("./EthIFrameMessageHandlers");
|
|
11
12
|
function CoinflowPurchase(props) {
|
|
12
13
|
return CoinflowUtils_1.CoinflowUtils.byBlockchain(props.blockchain, {
|
|
13
|
-
solana: (react_1
|
|
14
|
-
near: react_1
|
|
14
|
+
solana: (react_1.default.createElement(SolanaCoinflowPurchase, tslib_1.__assign({}, props))),
|
|
15
|
+
near: react_1.default.createElement(NearCoinflowPurchase, tslib_1.__assign({}, props)),
|
|
16
|
+
polygon: (react_1.default.createElement(PolygonCoinflowPurchase, tslib_1.__assign({}, props))),
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
19
|
exports.CoinflowPurchase = CoinflowPurchase;
|
|
18
20
|
function SolanaCoinflowPurchase(_a) {
|
|
19
|
-
var merchantId = _a.merchantId, amount = _a.amount, env = _a.env, onSuccess = _a.onSuccess, wallet = _a.wallet, transaction = _a.transaction, partialSigners = _a.partialSigners, debugTx = _a.debugTx, connection = _a.connection, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground;
|
|
21
|
+
var merchantId = _a.merchantId, amount = _a.amount, env = _a.env, onSuccess = _a.onSuccess, wallet = _a.wallet, transaction = _a.transaction, partialSigners = _a.partialSigners, debugTx = _a.debugTx, connection = _a.connection, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, token = _a.token, supportsVersionedTransactionsParam = _a.supportsVersionedTransactions;
|
|
20
22
|
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)({
|
|
21
23
|
wallet: wallet,
|
|
22
24
|
connection: connection,
|
|
23
25
|
partialSigners: partialSigners,
|
|
24
|
-
debugTx: debugTx
|
|
26
|
+
debugTx: debugTx,
|
|
25
27
|
});
|
|
26
28
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
27
29
|
var transactionStr = (0, react_1.useMemo)(function () {
|
|
@@ -29,10 +31,20 @@ function SolanaCoinflowPurchase(_a) {
|
|
|
29
31
|
? CoinflowUtils_1.CoinflowUtils.serializeSolanaTransaction(transaction)
|
|
30
32
|
: undefined;
|
|
31
33
|
}, [transaction]);
|
|
34
|
+
var supportsVersionedTransactions = (0, react_1.useMemo)(function () {
|
|
35
|
+
if (supportsVersionedTransactionsParam !== undefined)
|
|
36
|
+
return supportsVersionedTransactionsParam;
|
|
37
|
+
if (!(wallet === null || wallet === void 0 ? void 0 : wallet.wallet))
|
|
38
|
+
return false;
|
|
39
|
+
var supportedTransactionVersions = wallet.wallet.adapter.supportedTransactionVersions;
|
|
40
|
+
if (!supportedTransactionVersions)
|
|
41
|
+
return false;
|
|
42
|
+
return supportedTransactionVersions.has(0);
|
|
43
|
+
}, [supportsVersionedTransactionsParam, wallet.wallet]);
|
|
32
44
|
if (!wallet.publicKey)
|
|
33
45
|
return null;
|
|
34
46
|
var walletPubkey = wallet.publicKey.toString();
|
|
35
|
-
return (react_1
|
|
47
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/purchase/".concat(merchantId), env: env, transaction: transactionStr, amount: amount, blockchain: 'solana', webhookInfo: webhookInfo, email: email, loaderBackground: loaderBackground, token: token, supportsVersionedTransactions: supportsVersionedTransactions }));
|
|
36
48
|
}
|
|
37
49
|
function NearCoinflowPurchase(_a) {
|
|
38
50
|
var merchantId = _a.merchantId, amount = _a.amount, env = _a.env, onSuccess = _a.onSuccess, wallet = _a.wallet, action = _a.action, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground;
|
|
@@ -43,6 +55,22 @@ function NearCoinflowPurchase(_a) {
|
|
|
43
55
|
? Buffer.from(JSON.stringify(action)).toString('base64')
|
|
44
56
|
: undefined;
|
|
45
57
|
}, [action]);
|
|
46
|
-
return (react_1
|
|
58
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: wallet.accountId, IFrameRef: IFrameRef, route: "/purchase/".concat(merchantId), env: env, amount: amount, blockchain: 'near', transaction: transaction, webhookInfo: webhookInfo, email: email, loaderBackground: loaderBackground }));
|
|
47
59
|
}
|
|
60
|
+
function PolygonCoinflowPurchase(_a) {
|
|
61
|
+
var merchantId = _a.merchantId, amount = _a.amount, env = _a.env, onSuccess = _a.onSuccess, wallet = _a.wallet, transaction = _a.transaction, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground;
|
|
62
|
+
var handlers = (0, EthIFrameMessageHandlers_1.useEthIFrameMessageHandlers)({ wallet: wallet });
|
|
63
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
64
|
+
var transactionStr = (0, react_1.useMemo)(function () {
|
|
65
|
+
if (!transaction)
|
|
66
|
+
return undefined;
|
|
67
|
+
return Buffer.from(JSON.stringify(transaction)).toString('base64');
|
|
68
|
+
}, [transaction]);
|
|
69
|
+
if (!wallet.address)
|
|
70
|
+
return null;
|
|
71
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { transaction: transactionStr, walletPubkey: wallet.address, IFrameRef: IFrameRef, route: "/purchase/".concat(merchantId), env: env, amount: amount, blockchain: 'polygon',
|
|
72
|
+
// transaction={transaction} TODO
|
|
73
|
+
webhookInfo: webhookInfo, email: email, loaderBackground: loaderBackground }));
|
|
74
|
+
}
|
|
75
|
+
exports.PolygonCoinflowPurchase = PolygonCoinflowPurchase;
|
|
48
76
|
//# sourceMappingURL=CoinflowPurchase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowPurchase.js","sourceRoot":"","sources":["../../src/CoinflowPurchase.tsx"],"names":[],"mappings":";;;;AAAA,qDAAqC;AAErC,mDAAgD;AAChD,6EAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"CoinflowPurchase.js","sourceRoot":"","sources":["../../src/CoinflowPurchase.tsx"],"names":[],"mappings":";;;;AAAA,qDAAqC;AAErC,mDAAgD;AAChD,6EAA6E;AAC7E,iDAKyB;AACzB,qDAAmE;AACnE,yEAAyE;AAEzE,uEAAuE;AAkEvE,SAAgB,gBAAgB,CAC9B,KAGgC;IAEhC,OAAO,6BAAa,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE;QAClD,MAAM,EAAE,CACN,8BAAC,sBAAsB,uBAAM,KAAqC,EAAI,CACvE;QACD,IAAI,EAAE,8BAAC,oBAAoB,uBAAM,KAAmC,EAAI;QACxE,OAAO,EAAE,CACP,8BAAC,uBAAuB,uBAAM,KAAsC,EAAI,CACzE;KACF,CAAC,CAAC;AACL,CAAC;AAfD,4CAeC;AAED,SAAS,sBAAsB,CAAC,EAeF;QAd5B,UAAU,gBAAA,EACV,MAAM,YAAA,EACN,GAAG,SAAA,EACH,SAAS,eAAA,EACT,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,cAAc,oBAAA,EACd,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,KAAK,WAAA,EACL,gBAAgB,sBAAA,EAChB,KAAK,WAAA,EAC0B,kCAAkC,mCAAA;IAEjE,IAAM,QAAQ,GAAG,IAAA,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B,IAAM,QAAQ,GAAG,IAAA,sDAA2B,EAAC,EAAC,MAAM,QAAA,EAAC,CAAC,CAAC;IAChD,IAAA,SAAS,GAAI,IAAA,iCAAe,EAAC,QAAQ,EAAE,SAAS,CAAC,UAAxC,CAAyC;IAEzD,IAAM,cAAc,GAAG,IAAA,eAAO,EAAC;QAC7B,IAAI,CAAC,WAAW;YAAE,OAAO,SAAS,CAAC;QACnC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAEjC,OAAO,CACL,8BAAC,+BAAc,IACb,WAAW,EAAE,cAAc,EAC3B,YAAY,EAAE,MAAM,CAAC,OAAO,EAC5B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,oBAAa,UAAU,CAAE,EAChC,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,SAAS;QACrB,iCAAiC;QACjC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC;AACJ,CAAC;AApCD,0DAoCC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoinflowPurchaseHistory = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var useIframeWallet_1 = require("./useIframeWallet");
|
|
@@ -10,8 +10,8 @@ var NearIFrameMessageHandlers_1 = require("./NearIFrameMessageHandlers");
|
|
|
10
10
|
var CoinflowUtils_1 = require("./CoinflowUtils");
|
|
11
11
|
function CoinflowPurchaseHistory(props) {
|
|
12
12
|
return CoinflowUtils_1.CoinflowUtils.byBlockchain(props.blockchain, {
|
|
13
|
-
solana: (react_1
|
|
14
|
-
near: react_1
|
|
13
|
+
solana: (react_1.default.createElement(SolanaPurchaseHistory, tslib_1.__assign({}, props))),
|
|
14
|
+
near: react_1.default.createElement(NearPurchaseHistory, tslib_1.__assign({}, props)),
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
exports.CoinflowPurchaseHistory = CoinflowPurchaseHistory;
|
|
@@ -19,23 +19,23 @@ function SolanaPurchaseHistory(_a) {
|
|
|
19
19
|
var wallet = _a.wallet, merchantId = _a.merchantId, connection = _a.connection, env = _a.env, loaderBackground = _a.loaderBackground;
|
|
20
20
|
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)({
|
|
21
21
|
wallet: wallet,
|
|
22
|
-
connection: connection
|
|
22
|
+
connection: connection,
|
|
23
23
|
});
|
|
24
24
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
25
25
|
if (!wallet.publicKey)
|
|
26
26
|
return null;
|
|
27
27
|
var walletPubkey = wallet.publicKey.toString();
|
|
28
|
-
return (react_1
|
|
28
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/history/purchase/".concat(merchantId), env: env, blockchain: 'solana', loaderBackground: loaderBackground }));
|
|
29
29
|
}
|
|
30
30
|
function NearPurchaseHistory(_a) {
|
|
31
31
|
var wallet = _a.wallet, merchantId = _a.merchantId, env = _a.env, loaderBackground = _a.loaderBackground;
|
|
32
32
|
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)({
|
|
33
|
-
wallet: wallet
|
|
33
|
+
wallet: wallet,
|
|
34
34
|
});
|
|
35
35
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
36
36
|
if (!wallet)
|
|
37
37
|
return null;
|
|
38
38
|
var walletPubkey = wallet.accountId;
|
|
39
|
-
return (react_1
|
|
39
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/history/purchase/".concat(merchantId), env: env, blockchain: 'near', loaderBackground: loaderBackground }));
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=CoinflowPurchaseHistory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowPurchaseHistory.js","sourceRoot":"","sources":["../../src/CoinflowPurchaseHistory.tsx"],"names":[],"mappings":";;;;AAAA,qDAAkD;AAClD,mDAAgD;AAChD,wDAA0B;AAC1B,6EAA6E;AAC7E,yEAAyE;AACzE,iDAA8C;AAM9C,SAAgB,uBAAuB,CACrC,KAA4D;IAE5D,OAAO,6BAAa,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE;QAClD,MAAM,EAAE,CACN,
|
|
1
|
+
{"version":3,"file":"CoinflowPurchaseHistory.js","sourceRoot":"","sources":["../../src/CoinflowPurchaseHistory.tsx"],"names":[],"mappings":";;;;AAAA,qDAAkD;AAClD,mDAAgD;AAChD,wDAA0B;AAC1B,6EAA6E;AAC7E,yEAAyE;AACzE,iDAA8C;AAM9C,SAAgB,uBAAuB,CACrC,KAA4D;IAE5D,OAAO,6BAAa,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE;QAClD,MAAM,EAAE,CACN,8BAAC,qBAAqB,uBAAM,KAAoC,EAAI,CACrE;QACD,IAAI,EAAE,8BAAC,mBAAmB,uBAAM,KAAkC,EAAI;KACvE,CAAC,CAAC;AACL,CAAC;AATD,0DASC;AAED,SAAS,qBAAqB,CAAC,EAMF;QAL3B,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,UAAU,gBAAA,EACV,GAAG,SAAA,EACH,gBAAgB,sBAAA;IAEhB,IAAM,QAAQ,GAAG,IAAA,4DAA8B,EAAC;QAC9C,MAAM,QAAA;QACN,UAAU,YAAA;KACX,CAAC,CAAC;IACI,IAAA,SAAS,GAAI,IAAA,iCAAe,EAAC,QAAQ,CAAC,UAA7B,CAA8B;IAE9C,IAAI,CAAC,MAAM,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IACnC,IAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAEjD,OAAO,CACL,8BAAC,+BAAc,IACb,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,4BAAqB,UAAU,CAAE,EACxC,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,QAAQ,EACpB,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,EAKF;QAJzB,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,GAAG,SAAA,EACH,gBAAgB,sBAAA;IAEhB,IAAM,QAAQ,GAAG,IAAA,wDAA4B,EAAC;QAC5C,MAAM,QAAA;KACP,CAAC,CAAC;IACI,IAAA,SAAS,GAAI,IAAA,iCAAe,EAAC,QAAQ,CAAC,UAA7B,CAA8B;IAE9C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,IAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC;IAEtC,OAAO,CACL,8BAAC,+BAAc,IACb,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,4BAAqB,UAAU,CAAE,EACxC,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Transaction } from '@solana/web3.js';
|
|
2
2
|
import { WalletContextState } from '@solana/wallet-adapter-react';
|
|
3
|
-
export type CoinflowBlockchain = 'solana' | 'near' | 'eth';
|
|
3
|
+
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon';
|
|
4
4
|
export type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
|
|
5
|
-
|
|
5
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
6
|
+
export type SolanaWalletContextState = PartialBy<Pick<WalletContextState, 'wallet' | 'signTransaction' | 'connected' | 'publicKey' | 'sendTransaction'>, 'wallet'>;
|
|
6
7
|
export type NearWallet = {
|
|
7
8
|
accountId: string;
|
|
8
|
-
verifyOwner: (params: {
|
|
9
|
-
message: string;
|
|
10
|
-
}) => Promise<{
|
|
11
|
-
accountId: string;
|
|
12
|
-
message: string;
|
|
13
|
-
blockId: string;
|
|
14
|
-
publicKey: string;
|
|
15
|
-
signature: string;
|
|
16
|
-
keyType: number;
|
|
17
|
-
}>;
|
|
18
9
|
signAndSendTransaction: (params: {
|
|
19
10
|
signerId?: string;
|
|
20
11
|
receiverId?: string;
|
|
@@ -38,7 +29,6 @@ type AccessList = Array<{
|
|
|
38
29
|
type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
39
30
|
export type EthWallet = {
|
|
40
31
|
address: string | null | undefined;
|
|
41
|
-
signMessage: (message: string) => Promise<string>;
|
|
42
32
|
sendTransaction: (transaction: {
|
|
43
33
|
to: string;
|
|
44
34
|
from?: string;
|
|
@@ -57,12 +47,13 @@ export type EthWallet = {
|
|
|
57
47
|
}) => Promise<{
|
|
58
48
|
hash: string;
|
|
59
49
|
}>;
|
|
50
|
+
signMessage: (message: string) => Promise<string>;
|
|
60
51
|
};
|
|
61
52
|
export declare class CoinflowUtils {
|
|
62
53
|
env: CoinflowEnvs;
|
|
63
54
|
url: string;
|
|
64
55
|
constructor(env?: CoinflowEnvs);
|
|
65
|
-
getFeePayer(merchantId: string): Promise<
|
|
56
|
+
getFeePayer(merchantId: string): Promise<string>;
|
|
66
57
|
getCreditBalance(publicKey: string, blockchain: 'solana' | 'near'): Promise<number>;
|
|
67
58
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
68
59
|
static getCoinflowUrl({ walletPubkey, route, env, amount, transaction, blockchain, supportsVersionedTransactions, webhookInfo, token, email, loaderBackground, }: {
|
|
@@ -84,6 +75,7 @@ export declare class CoinflowUtils {
|
|
|
84
75
|
solana: T;
|
|
85
76
|
near: T;
|
|
86
77
|
eth?: T;
|
|
78
|
+
polygon?: T;
|
|
87
79
|
}): T;
|
|
88
80
|
}
|
|
89
81
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoinflowUtils = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var web3_js_1 = require("@solana/web3.js");
|
|
6
5
|
var bs58_1 = tslib_1.__importDefault(require("bs58"));
|
|
7
6
|
var CoinflowUtils = /** @class */ (function () {
|
|
8
7
|
function CoinflowUtils(env) {
|
|
@@ -25,7 +24,7 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
25
24
|
return [4 /*yield*/, response.json()];
|
|
26
25
|
case 2:
|
|
27
26
|
json = _a.sent();
|
|
28
|
-
return [2 /*return*/,
|
|
27
|
+
return [2 /*return*/, json.feePayerPublicKey];
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
});
|
|
@@ -83,16 +82,18 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
83
82
|
CoinflowUtils.serializeSolanaTransaction = function (transaction) {
|
|
84
83
|
if (!transaction)
|
|
85
84
|
return undefined;
|
|
86
|
-
|
|
85
|
+
var serializedTx = transaction.serialize({
|
|
87
86
|
requireAllSignatures: false,
|
|
88
|
-
verifySignatures: false
|
|
89
|
-
})
|
|
87
|
+
verifySignatures: false,
|
|
88
|
+
});
|
|
89
|
+
return bs58_1.default.encode(serializedTx);
|
|
90
90
|
};
|
|
91
91
|
CoinflowUtils.solanaWalletSupportsVersionedTransactions = function (wallet) {
|
|
92
92
|
var _a, _b, _c;
|
|
93
93
|
return !!((_c = (_b = (_a = wallet.wallet) === null || _a === void 0 ? void 0 : _a.adapter) === null || _b === void 0 ? void 0 : _b.supportedTransactionVersions) === null || _c === void 0 ? void 0 : _c.has(0));
|
|
94
94
|
};
|
|
95
|
-
CoinflowUtils.byBlockchain = function (blockchain, args
|
|
95
|
+
CoinflowUtils.byBlockchain = function (blockchain, args // TODO polygon not optional
|
|
96
|
+
) {
|
|
96
97
|
switch (blockchain) {
|
|
97
98
|
case 'solana':
|
|
98
99
|
return args.solana;
|
|
@@ -102,6 +103,10 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
102
103
|
if (args.eth === undefined)
|
|
103
104
|
throw new Error('blockchain not supported for this operation!');
|
|
104
105
|
return args.eth;
|
|
106
|
+
case 'polygon':
|
|
107
|
+
if (args.polygon === undefined)
|
|
108
|
+
throw new Error('blockchain not supported for this operation!');
|
|
109
|
+
return args.polygon;
|
|
105
110
|
default:
|
|
106
111
|
throw new Error('blockchain not supported!');
|
|
107
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";;;;AAEA,sDAA0B;AA+D1B;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;IAE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,MAAA,MAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,OAAO,0CAAE,4BAA4B,0CAAE,GAAG,CAAC,CAAC,CAAC,CAAA,CAAC;IACxE,CAAC;IAEM,0BAAY,GAAnB,UACE,UAA8B,EAC9B,IAAgD,CAAC,4BAA4B;;QAE7E,QAAQ,UAAU,EAAE;YAClB,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,MAAM,CAAC;YACrB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,IAAI,CAAC;YACnB,KAAK,KAAK;gBACR,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS;oBACxB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBAClE,OAAO,IAAI,CAAC,GAAG,CAAC;YAClB,KAAK,SAAS;gBACZ,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS;oBAC5B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBAClE,OAAO,IAAI,CAAC,OAAO,CAAC;YACtB;gBACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAChD;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AA1ID,IA0IC;AA1IY,sCAAa"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Connection } from '@solana/web3.js';
|
|
2
|
+
import type { Connection } from '@solana/web3.js';
|
|
3
3
|
import { EthWallet, NearWallet, SolanaWalletContextState } from './CoinflowUtils';
|
|
4
4
|
import { OnSuccessMethod } from './useIframeWallet';
|
|
5
5
|
import { CommonCoinflowProps } from './CommonCoinflowProps';
|
|
@@ -19,7 +19,11 @@ export interface CoinflowNearWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
|
19
19
|
blockchain: 'near';
|
|
20
20
|
}
|
|
21
21
|
export interface CoinflowEthWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
22
|
-
wallet: EthWallet
|
|
22
|
+
wallet: Omit<EthWallet, 'signMessage'>;
|
|
23
23
|
blockchain: 'eth';
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export interface CoinflowPolygonWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
26
|
+
wallet: Omit<EthWallet, 'signMessage'>;
|
|
27
|
+
blockchain: 'polygon';
|
|
28
|
+
}
|
|
29
|
+
export declare function CoinflowWithdraw(props: CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoinflowWithdraw = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
@@ -11,9 +11,10 @@ var NearIFrameMessageHandlers_1 = require("./NearIFrameMessageHandlers");
|
|
|
11
11
|
var EthIFrameMessageHandlers_1 = require("./EthIFrameMessageHandlers");
|
|
12
12
|
function CoinflowWithdraw(props) {
|
|
13
13
|
return CoinflowUtils_1.CoinflowUtils.byBlockchain(props.blockchain, {
|
|
14
|
-
solana: (react_1
|
|
15
|
-
near: react_1
|
|
16
|
-
eth: react_1
|
|
14
|
+
solana: (react_1.default.createElement(CoinflowSolanaWithdraw, tslib_1.__assign({}, props))),
|
|
15
|
+
near: react_1.default.createElement(CoinflowNearWithdraw, tslib_1.__assign({}, props)),
|
|
16
|
+
eth: react_1.default.createElement(CoinflowEthWithdraw, tslib_1.__assign({}, props)),
|
|
17
|
+
polygon: (react_1.default.createElement(CoinflowEthWithdraw, tslib_1.__assign({}, props))),
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
exports.CoinflowWithdraw = CoinflowWithdraw;
|
|
@@ -21,34 +22,34 @@ function CoinflowSolanaWithdraw(_a) {
|
|
|
21
22
|
var wallet = _a.wallet, merchantId = _a.merchantId, env = _a.env, connection = _a.connection, onSuccess = _a.onSuccess, email = _a.email, token = _a.token, amount = _a.amount, loaderBackground = _a.loaderBackground;
|
|
22
23
|
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)({
|
|
23
24
|
wallet: wallet,
|
|
24
|
-
connection: connection
|
|
25
|
+
connection: connection,
|
|
25
26
|
});
|
|
26
27
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
27
28
|
if (!wallet.publicKey)
|
|
28
29
|
return null;
|
|
29
30
|
var walletPubkey = wallet.publicKey.toString();
|
|
30
|
-
return (react_1
|
|
31
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/withdraw/".concat(merchantId), env: env, blockchain: 'solana', email: email, token: token, amount: amount, loaderBackground: loaderBackground }));
|
|
31
32
|
}
|
|
32
33
|
function CoinflowNearWithdraw(_a) {
|
|
33
34
|
var wallet = _a.wallet, merchantId = _a.merchantId, env = _a.env, onSuccess = _a.onSuccess, email = _a.email, token = _a.token, amount = _a.amount, loaderBackground = _a.loaderBackground;
|
|
34
35
|
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)({
|
|
35
|
-
wallet: wallet
|
|
36
|
+
wallet: wallet,
|
|
36
37
|
});
|
|
37
38
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
38
39
|
if (!wallet)
|
|
39
40
|
return null;
|
|
40
41
|
var walletPubkey = wallet.accountId;
|
|
41
|
-
return (react_1
|
|
42
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/withdraw/".concat(merchantId), env: env, blockchain: 'near', token: token, amount: amount, email: email, loaderBackground: loaderBackground }));
|
|
42
43
|
}
|
|
43
44
|
function CoinflowEthWithdraw(_a) {
|
|
44
|
-
var wallet = _a.wallet, merchantId = _a.merchantId, env = _a.env, onSuccess = _a.onSuccess, email = _a.email, token = _a.token, amount = _a.amount, loaderBackground = _a.loaderBackground;
|
|
45
|
+
var wallet = _a.wallet, merchantId = _a.merchantId, env = _a.env, onSuccess = _a.onSuccess, email = _a.email, token = _a.token, amount = _a.amount, loaderBackground = _a.loaderBackground, blockchain = _a.blockchain;
|
|
45
46
|
var handlers = (0, EthIFrameMessageHandlers_1.useEthIFrameMessageHandlers)({
|
|
46
|
-
wallet: wallet
|
|
47
|
+
wallet: wallet,
|
|
47
48
|
});
|
|
48
49
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
49
50
|
if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address))
|
|
50
51
|
return null;
|
|
51
52
|
var walletPubkey = wallet.address;
|
|
52
|
-
return (react_1
|
|
53
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/withdraw/".concat(merchantId), env: env, blockchain: blockchain, token: token, amount: amount, email: email, loaderBackground: loaderBackground }));
|
|
53
54
|
}
|
|
54
55
|
//# sourceMappingURL=CoinflowWithdraw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWithdraw.js","sourceRoot":"","sources":["../../src/CoinflowWithdraw.tsx"],"names":[],"mappings":";;;;AAAA,wDAA0B;AAE1B,mDAAgD;AAChD,iDAKyB;AACzB,qDAAmE;AACnE,6EAA6E;AAC7E,yEAAyE;AAEzE,uEAAuE;
|
|
1
|
+
{"version":3,"file":"CoinflowWithdraw.js","sourceRoot":"","sources":["../../src/CoinflowWithdraw.tsx"],"names":[],"mappings":";;;;AAAA,wDAA0B;AAE1B,mDAAgD;AAChD,iDAKyB;AACzB,qDAAmE;AACnE,6EAA6E;AAC7E,yEAAyE;AAEzE,uEAAuE;AAgCvE,SAAgB,gBAAgB,CAC9B,KAIgC;IAEhC,OA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a,UAAU,CAAE,EAChC,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoinflowWithdrawHistory = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var CoinflowUtils_1 = require("./CoinflowUtils");
|
|
@@ -11,9 +11,9 @@ var NearIFrameMessageHandlers_1 = require("./NearIFrameMessageHandlers");
|
|
|
11
11
|
var EthIFrameMessageHandlers_1 = require("./EthIFrameMessageHandlers");
|
|
12
12
|
function CoinflowWithdrawHistory(props) {
|
|
13
13
|
return CoinflowUtils_1.CoinflowUtils.byBlockchain(props.blockchain, {
|
|
14
|
-
solana: (react_1
|
|
15
|
-
near: react_1
|
|
16
|
-
eth: react_1
|
|
14
|
+
solana: (react_1.default.createElement(SolanaWithdrawHistory, tslib_1.__assign({}, props))),
|
|
15
|
+
near: react_1.default.createElement(NearWithdrawHistory, tslib_1.__assign({}, props)),
|
|
16
|
+
eth: react_1.default.createElement(EthWithdrawHistory, tslib_1.__assign({}, props)),
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
exports.CoinflowWithdrawHistory = CoinflowWithdrawHistory;
|
|
@@ -21,33 +21,33 @@ function SolanaWithdrawHistory(_a) {
|
|
|
21
21
|
var wallet = _a.wallet, merchantId = _a.merchantId, connection = _a.connection, env = _a.env, loaderBackground = _a.loaderBackground;
|
|
22
22
|
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)({
|
|
23
23
|
wallet: wallet,
|
|
24
|
-
connection: connection
|
|
24
|
+
connection: connection,
|
|
25
25
|
});
|
|
26
26
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
27
27
|
if (!wallet.publicKey)
|
|
28
28
|
return null;
|
|
29
29
|
var walletPubkey = wallet.publicKey.toString();
|
|
30
|
-
return (react_1
|
|
30
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/history/withdraw/".concat(merchantId), env: env, blockchain: 'solana', loaderBackground: loaderBackground }));
|
|
31
31
|
}
|
|
32
32
|
function NearWithdrawHistory(_a) {
|
|
33
33
|
var wallet = _a.wallet, merchantId = _a.merchantId, env = _a.env, loaderBackground = _a.loaderBackground;
|
|
34
34
|
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)({
|
|
35
|
-
wallet: wallet
|
|
35
|
+
wallet: wallet,
|
|
36
36
|
});
|
|
37
37
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
38
38
|
if (!wallet)
|
|
39
39
|
return null;
|
|
40
40
|
var walletPubkey = wallet.accountId;
|
|
41
|
-
return (react_1
|
|
41
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/history/withdraw/".concat(merchantId), env: env, blockchain: 'near', loaderBackground: loaderBackground }));
|
|
42
42
|
}
|
|
43
43
|
function EthWithdrawHistory(_a) {
|
|
44
44
|
var wallet = _a.wallet, merchantId = _a.merchantId, env = _a.env, loaderBackground = _a.loaderBackground;
|
|
45
45
|
var handlers = (0, EthIFrameMessageHandlers_1.useEthIFrameMessageHandlers)({
|
|
46
|
-
wallet: wallet
|
|
46
|
+
wallet: wallet,
|
|
47
47
|
});
|
|
48
48
|
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
49
49
|
if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address))
|
|
50
50
|
return null;
|
|
51
|
-
return (react_1
|
|
51
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, { walletPubkey: wallet.address, IFrameRef: IFrameRef, route: "/history/withdraw/".concat(merchantId), env: env, blockchain: 'eth', loaderBackground: loaderBackground }));
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=CoinflowWithdrawHistory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWithdrawHistory.js","sourceRoot":"","sources":["../../src/CoinflowWithdrawHistory.tsx"],"names":[],"mappings":";;;;AAAA,iDAA8C;AAC9C,qDAAkD;AAClD,mDAAgD;AAChD,wDAA0B;AAC1B,6EAA6E;AAC7E,yEAAyE;AAMzE,uEAAuE;AAEvE,SAAgB,uBAAuB,CACrC,KAG2B;IAE3B,OAAO,6BAAa,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE;QAClD,MAAM,EAAE,CACN,
|
|
1
|
+
{"version":3,"file":"CoinflowWithdrawHistory.js","sourceRoot":"","sources":["../../src/CoinflowWithdrawHistory.tsx"],"names":[],"mappings":";;;;AAAA,iDAA8C;AAC9C,qDAAkD;AAClD,mDAAgD;AAChD,wDAA0B;AAC1B,6EAA6E;AAC7E,yEAAyE;AAMzE,uEAAuE;AAEvE,SAAgB,uBAAuB,CACrC,KAG2B;IAE3B,OAAO,6BAAa,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE;QAClD,MAAM,EAAE,CACN,8BAAC,qBAAqB,uBAAM,KAAoC,EAAI,CACrE;QACD,IAAI,EAAE,8BAAC,mBAAmB,uBAAM,KAAkC,EAAI;QACtE,GAAG,EAAE,8BAAC,kBAAkB,uBAAM,KAAiC,EAAI;KACpE,CAAC,CAAC;AACL,CAAC;AAbD,0DAaC;AAED,SAAS,qBAAqB,CAAC,EAMF;QAL3B,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,UAAU,gBAAA,EACV,GAAG,SAAA,EACH,gBAAgB,sBAAA;IAEhB,IAAM,QAAQ,GAAG,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