@coinflowlabs/react 2.0.0 → 2.1.1
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 +13 -0
- package/build/cjs/CoinflowIFrame.d.ts +3 -19
- package/build/cjs/CoinflowIFrame.js +5 -17
- package/build/cjs/CoinflowIFrame.js.map +1 -1
- package/build/cjs/CoinflowPurchase.d.ts +1 -1
- package/build/cjs/CoinflowPurchase.js +18 -22
- package/build/cjs/CoinflowPurchase.js.map +1 -1
- package/build/cjs/CoinflowPurchaseHistory.d.ts +2 -2
- package/build/cjs/CoinflowPurchaseHistory.js +24 -17
- package/build/cjs/CoinflowPurchaseHistory.js.map +1 -1
- package/build/cjs/CoinflowUtils.d.ts +3 -14
- package/build/cjs/CoinflowUtils.js +8 -8
- package/build/cjs/CoinflowUtils.js.map +1 -1
- package/build/cjs/CoinflowWithdraw.js +18 -22
- package/build/cjs/CoinflowWithdraw.js.map +1 -1
- package/build/cjs/CoinflowWithdrawHistory.d.ts +2 -2
- package/build/cjs/CoinflowWithdrawHistory.js +19 -22
- package/build/cjs/CoinflowWithdrawHistory.js.map +1 -1
- package/build/cjs/CommonCoinflowProps.d.ts +18 -0
- package/build/cjs/SolanaIFrameMessageHandlers.d.ts +1 -0
- package/build/cjs/SolanaIFrameMessageHandlers.js.map +1 -1
- package/build/cjs/useIframeWallet.d.ts +4 -1
- package/build/cjs/useIframeWallet.js +21 -12
- package/build/cjs/useIframeWallet.js.map +1 -1
- package/build/esm/CoinflowIFrame.d.ts +3 -19
- package/build/esm/CoinflowIFrame.js +5 -17
- package/build/esm/CoinflowIFrame.js.map +1 -1
- package/build/esm/CoinflowPurchase.d.ts +1 -1
- package/build/esm/CoinflowPurchase.js +18 -22
- package/build/esm/CoinflowPurchase.js.map +1 -1
- package/build/esm/CoinflowPurchaseHistory.d.ts +2 -2
- package/build/esm/CoinflowPurchaseHistory.js +24 -17
- package/build/esm/CoinflowPurchaseHistory.js.map +1 -1
- package/build/esm/CoinflowUtils.d.ts +3 -14
- package/build/esm/CoinflowUtils.js +8 -8
- package/build/esm/CoinflowUtils.js.map +1 -1
- package/build/esm/CoinflowWithdraw.js +18 -22
- package/build/esm/CoinflowWithdraw.js.map +1 -1
- package/build/esm/CoinflowWithdrawHistory.d.ts +2 -2
- package/build/esm/CoinflowWithdrawHistory.js +19 -22
- package/build/esm/CoinflowWithdrawHistory.js.map +1 -1
- package/build/esm/CommonCoinflowProps.d.ts +18 -0
- package/build/esm/SolanaIFrameMessageHandlers.d.ts +1 -0
- package/build/esm/SolanaIFrameMessageHandlers.js.map +1 -1
- package/build/esm/useIframeWallet.d.ts +4 -1
- package/build/esm/useIframeWallet.js +21 -12
- package/build/esm/useIframeWallet.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -46,6 +46,19 @@ Props:
|
|
|
46
46
|
|
|
47
47
|
# Changelog
|
|
48
48
|
|
|
49
|
+
### 2.1.1
|
|
50
|
+
|
|
51
|
+
- Bug fix to set useHeightChange url param to true if using the handleHeightChange prop
|
|
52
|
+
|
|
53
|
+
### 2.1.0
|
|
54
|
+
|
|
55
|
+
- Added handleHeightChange to all components to allow for dynamic height changes
|
|
56
|
+
|
|
57
|
+
### 2.0.0
|
|
58
|
+
|
|
59
|
+
- Removing hard requirements for most large 3rd party libraries
|
|
60
|
+
- Improved type checking for wallets and transactions
|
|
61
|
+
|
|
49
62
|
### 1.3.0
|
|
50
63
|
|
|
51
64
|
- Added support for Polygon blockchain
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface CoinflowIFrameProps {
|
|
5
|
-
walletPubkey: string;
|
|
6
|
-
IFrameRef: React.RefObject<HTMLIFrameElement>;
|
|
7
|
-
route: string;
|
|
8
|
-
amount?: number;
|
|
9
|
-
transaction?: string;
|
|
10
|
-
blockchain: CoinflowBlockchain;
|
|
11
|
-
webhookInfo?: object;
|
|
12
|
-
token?: string | PublicKey;
|
|
13
|
-
email?: string;
|
|
14
|
-
env?: CoinflowEnvs;
|
|
15
|
-
loaderBackground?: string;
|
|
16
|
-
supportsVersionedTransactions?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function CoinflowIFrame({ walletPubkey, IFrameRef, env, route, transaction, amount, blockchain, webhookInfo, token, email, loaderBackground, supportsVersionedTransactions }: CoinflowIFrameProps): JSX.Element;
|
|
19
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CoinflowIFrameProps } from './CommonCoinflowProps';
|
|
3
|
+
export declare function CoinflowIFrame(props: CoinflowIFrameProps): JSX.Element;
|
|
@@ -4,24 +4,12 @@ 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
|
-
function CoinflowIFrame(
|
|
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;
|
|
7
|
+
function CoinflowIFrame(props) {
|
|
9
8
|
var url = (0, react_1.useMemo)(function () {
|
|
10
|
-
return CoinflowUtils_1.CoinflowUtils.getCoinflowUrl(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
route: route,
|
|
15
|
-
transaction: transaction,
|
|
16
|
-
blockchain: blockchain,
|
|
17
|
-
webhookInfo: webhookInfo,
|
|
18
|
-
token: token === null || token === void 0 ? void 0 : token.toString(),
|
|
19
|
-
email: email,
|
|
20
|
-
loaderBackground: loaderBackground,
|
|
21
|
-
supportsVersionedTransactions: supportsVersionedTransactions
|
|
22
|
-
});
|
|
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 () {
|
|
9
|
+
return CoinflowUtils_1.CoinflowUtils.getCoinflowUrl(props);
|
|
10
|
+
}, [props]);
|
|
11
|
+
var handleHeightChange = props.handleHeightChange, IFrameRef = props.IFrameRef;
|
|
12
|
+
return (0, react_1.useMemo)(function () { return (react_1.default.createElement("iframe", { scrolling: handleHeightChange ? 'no' : 'yes', onLoad: function () {
|
|
25
13
|
if (IFrameRef.current)
|
|
26
14
|
IFrameRef.current.style.opacity = '1';
|
|
27
15
|
}, ref: IFrameRef, style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowIFrame.js","sourceRoot":"","sources":["../../src/CoinflowIFrame.tsx"],"names":[],"mappings":";;;;AAAA,qDAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"CoinflowIFrame.js","sourceRoot":"","sources":["../../src/CoinflowIFrame.tsx"],"names":[],"mappings":";;;;AAAA,qDAAqC;AACrC,iDAA8C;AAG9C,SAAgB,cAAc,CAAC,KAA0B;IACvD,IAAM,GAAG,GAAG,IAAA,eAAO,EAAC;QAClB,OAAO,6BAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEL,IAAA,kBAAkB,GAAe,KAAK,mBAApB,EAAE,SAAS,GAAI,KAAK,UAAT,CAAU;IAC9C,OAAO,IAAA,eAAO,EACZ,cAAM,OAAA,CACJ,0CACE,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAA,CAAC,CAAC,KAAK,EAC3C,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,EAjBK,CAiBL,EACD,CAAC,SAAS,EAAE,GAAG,CAAC,CACjB,CAAC;AACJ,CAAC;AA3BD,wCA2BC"}
|
|
@@ -54,5 +54,5 @@ export interface CoinflowPolygonPurchaseProps extends CoinflowCommonPurchaseProp
|
|
|
54
54
|
blockchain: 'polygon';
|
|
55
55
|
}
|
|
56
56
|
export declare function CoinflowPurchase(props: CoinflowSolanaPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps): JSX.Element;
|
|
57
|
-
export declare function PolygonCoinflowPurchase(
|
|
57
|
+
export declare function PolygonCoinflowPurchase(props: CoinflowPolygonPurchaseProps): JSX.Element | null;
|
|
58
58
|
export {};
|
|
@@ -17,15 +17,10 @@ function CoinflowPurchase(props) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
exports.CoinflowPurchase = CoinflowPurchase;
|
|
20
|
-
function SolanaCoinflowPurchase(
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
connection: connection,
|
|
25
|
-
partialSigners: partialSigners,
|
|
26
|
-
debugTx: debugTx,
|
|
27
|
-
});
|
|
28
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
20
|
+
function SolanaCoinflowPurchase(props) {
|
|
21
|
+
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)(props);
|
|
22
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
23
|
+
var wallet = props.wallet, transaction = props.transaction, supportsVersionedTransactionsParam = props.supportsVersionedTransactions;
|
|
29
24
|
var transactionStr = (0, react_1.useMemo)(function () {
|
|
30
25
|
return transaction
|
|
31
26
|
? CoinflowUtils_1.CoinflowUtils.serializeSolanaTransaction(transaction)
|
|
@@ -44,23 +39,25 @@ function SolanaCoinflowPurchase(_a) {
|
|
|
44
39
|
if (!wallet.publicKey)
|
|
45
40
|
return null;
|
|
46
41
|
var walletPubkey = wallet.publicKey.toString();
|
|
47
|
-
|
|
42
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: walletPubkey, IFrameRef: IFrameRef, transaction: transactionStr, supportsVersionedTransactions: supportsVersionedTransactions, route: "/purchase/".concat(props.merchantId) });
|
|
43
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
48
44
|
}
|
|
49
|
-
function NearCoinflowPurchase(
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
45
|
+
function NearCoinflowPurchase(props) {
|
|
46
|
+
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)(props);
|
|
47
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
48
|
+
var wallet = props.wallet, action = props.action;
|
|
53
49
|
var transaction = (0, react_1.useMemo)(function () {
|
|
54
50
|
return action
|
|
55
51
|
? Buffer.from(JSON.stringify(action)).toString('base64')
|
|
56
52
|
: undefined;
|
|
57
53
|
}, [action]);
|
|
58
|
-
|
|
54
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: wallet.accountId, IFrameRef: IFrameRef, transaction: transaction, route: "/purchase/".concat(props.merchantId) });
|
|
55
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
59
56
|
}
|
|
60
|
-
function PolygonCoinflowPurchase(
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
57
|
+
function PolygonCoinflowPurchase(props) {
|
|
58
|
+
var handlers = (0, EthIFrameMessageHandlers_1.useEthIFrameMessageHandlers)(props);
|
|
59
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
60
|
+
var transaction = props.transaction, wallet = props.wallet;
|
|
64
61
|
var transactionStr = (0, react_1.useMemo)(function () {
|
|
65
62
|
if (!transaction)
|
|
66
63
|
return undefined;
|
|
@@ -68,9 +65,8 @@ function PolygonCoinflowPurchase(_a) {
|
|
|
68
65
|
}, [transaction]);
|
|
69
66
|
if (!wallet.address)
|
|
70
67
|
return null;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
webhookInfo: webhookInfo, email: email, loaderBackground: loaderBackground }));
|
|
68
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: wallet.address, IFrameRef: IFrameRef, transaction: transactionStr, route: "/purchase/".concat(props.merchantId) });
|
|
69
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
74
70
|
}
|
|
75
71
|
exports.PolygonCoinflowPurchase = PolygonCoinflowPurchase;
|
|
76
72
|
//# 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,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,CA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A,EACT,WAAW,aAAA,EACX,KAAK,EAAE,oBAAa,KAAK,CAAC,UAAU,CAAE,GACvC,CAAA;IACD,OAAO,CACL,8BAAC,+BAAc,uBAAK,WAAW,EAAG,CACnC,CAAC;AACJ,CAAC;AAED,SAAgB,uBAAuB,CAAC,KAAmC;IACzE,IAAM,QAAQ,GAAG,IAAA,sDAA2B,EAAC,KAAK,CAAC,CAAC;IAC7C,IAAA,SAAS,GAAI,IAAA,iCAAe,EAAC,QAAQ,EAAE,KAAK,CAAC,UAApC,CAAqC;IAE9C,IAAA,WAAW,GAAY,KAAK,YAAjB,EAAE,MAAM,GAAI,KAAK,OAAT,CAAU;IACpC,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,IAAM,WAAW,yCACZ,KAAK,KACR,YAAY,EAAE,MAAM,CAAC,OAAO,EAC5B,SAAS,WAAA,EACT,WAAW,EAAE,cAAc,EAC3B,KAAK,EAAE,oBAAa,KAAK,CAAC,UAAU,CAAE,GACvC,CAAA;IACD,OAAO,CACL,8BAAC,+BAAc,uBAAK,WAAW,EAAG,CACnC,CAAC;AACJ,CAAC;AAtBD,0DAsBC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CoinflowNearHistoryProps, CoinflowSolanaHistoryProps } from './CommonCoinflowProps';
|
|
3
|
-
export declare function CoinflowPurchaseHistory(props: CoinflowSolanaHistoryProps | CoinflowNearHistoryProps): JSX.Element;
|
|
2
|
+
import { CoinflowNearHistoryProps, CoinflowPolygonHistoryProps, CoinflowSolanaHistoryProps } from './CommonCoinflowProps';
|
|
3
|
+
export declare function CoinflowPurchaseHistory(props: CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps): JSX.Element;
|
|
@@ -8,34 +8,41 @@ var react_1 = tslib_1.__importDefault(require("react"));
|
|
|
8
8
|
var SolanaIFrameMessageHandlers_1 = require("./SolanaIFrameMessageHandlers");
|
|
9
9
|
var NearIFrameMessageHandlers_1 = require("./NearIFrameMessageHandlers");
|
|
10
10
|
var CoinflowUtils_1 = require("./CoinflowUtils");
|
|
11
|
+
var EthIFrameMessageHandlers_1 = require("./EthIFrameMessageHandlers");
|
|
11
12
|
function CoinflowPurchaseHistory(props) {
|
|
12
13
|
return CoinflowUtils_1.CoinflowUtils.byBlockchain(props.blockchain, {
|
|
13
14
|
solana: (react_1.default.createElement(SolanaPurchaseHistory, tslib_1.__assign({}, props))),
|
|
14
15
|
near: react_1.default.createElement(NearPurchaseHistory, tslib_1.__assign({}, props)),
|
|
16
|
+
polygon: react_1.default.createElement(PolygonPurchaseHistory, tslib_1.__assign({}, props)),
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
19
|
exports.CoinflowPurchaseHistory = CoinflowPurchaseHistory;
|
|
18
|
-
function SolanaPurchaseHistory(
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
connection: connection,
|
|
23
|
-
});
|
|
24
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
20
|
+
function SolanaPurchaseHistory(props) {
|
|
21
|
+
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)(props);
|
|
22
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
23
|
+
var wallet = props.wallet;
|
|
25
24
|
if (!wallet.publicKey)
|
|
26
25
|
return null;
|
|
27
26
|
var walletPubkey = wallet.publicKey.toString();
|
|
28
|
-
|
|
27
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/history/purchase/".concat(props.merchantId) });
|
|
28
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
29
29
|
}
|
|
30
|
-
function NearPurchaseHistory(
|
|
31
|
-
var
|
|
32
|
-
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
function NearPurchaseHistory(props) {
|
|
31
|
+
var _a;
|
|
32
|
+
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)(props);
|
|
33
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
34
|
+
if (!((_a = props.wallet) === null || _a === void 0 ? void 0 : _a.accountId))
|
|
35
|
+
return null;
|
|
36
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: props.wallet.accountId, IFrameRef: IFrameRef, route: "/history/purchase/".concat(props.merchantId) });
|
|
37
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
38
|
+
}
|
|
39
|
+
function PolygonPurchaseHistory(props) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
var handlers = (0, EthIFrameMessageHandlers_1.useEthIFrameMessageHandlers)(props);
|
|
42
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
43
|
+
if (!((_a = props.wallet) === null || _a === void 0 ? void 0 : _a.address))
|
|
37
44
|
return null;
|
|
38
|
-
var walletPubkey = wallet.
|
|
39
|
-
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame,
|
|
45
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: (_b = props.wallet) === null || _b === void 0 ? void 0 : _b.address, IFrameRef: IFrameRef, route: "/history/purchase/".concat(props.merchantId) });
|
|
46
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
40
47
|
}
|
|
41
48
|
//# 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;
|
|
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;AAO9C,uEAAuE;AAEvE,SAAgB,uBAAuB,CACrC,KAA0F;IAE1F,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,OAAO,EAAE,8BAAC,sBAAsB,uBAAM,KAAqC,EAAI;KAChF,CAAC,CAAC;AACL,CAAC;AAVD,0DAUC;AAED,SAAS,qBAAqB,CAAC,KAAiC;IAC9D,IAAM,QAAQ,GAAG,IAAA,4DAA8B,EAAC,KAAK,CAAC,CAAC;IAChD,IAAA,SAAS,GAAI,IAAA,iCAAe,EAAC,QAAQ,EAAE,KAAK,CAAC,UAApC,CAAqC;IAE9C,IAAA,MAAM,GAAI,KAAK,OAAT,CAAU;IACvB,IAAI,CAAC,MAAM,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IACnC,IAAM,YAAY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AK,WAAW,EAAI,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Transaction } from '@solana/web3.js';
|
|
2
2
|
import type { WalletContextState } from '@solana/wallet-adapter-react';
|
|
3
3
|
import type { Wallet } from '@near-wallet-selector/core';
|
|
4
|
+
import { CoinflowIFrameProps } from './CommonCoinflowProps';
|
|
4
5
|
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon';
|
|
5
6
|
export type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
|
|
6
7
|
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
@@ -44,26 +45,14 @@ export declare class CoinflowUtils {
|
|
|
44
45
|
getFeePayer(merchantId: string): Promise<string>;
|
|
45
46
|
getCreditBalance(publicKey: string, blockchain: 'solana' | 'near'): Promise<number>;
|
|
46
47
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
47
|
-
static getCoinflowUrl({ walletPubkey, route, env, amount, transaction, blockchain, supportsVersionedTransactions, webhookInfo, token, email, loaderBackground, }:
|
|
48
|
-
walletPubkey: string;
|
|
49
|
-
route: string;
|
|
50
|
-
env?: CoinflowEnvs;
|
|
51
|
-
amount?: number;
|
|
52
|
-
transaction?: string;
|
|
53
|
-
supportsVersionedTransactions?: boolean;
|
|
54
|
-
blockchain: CoinflowBlockchain;
|
|
55
|
-
webhookInfo?: object;
|
|
56
|
-
token?: string;
|
|
57
|
-
email?: string;
|
|
58
|
-
loaderBackground?: string;
|
|
59
|
-
}): string;
|
|
48
|
+
static getCoinflowUrl({ walletPubkey, route, env, amount, transaction, blockchain, supportsVersionedTransactions, webhookInfo, token, email, loaderBackground, handleHeightChange, }: CoinflowIFrameProps): string;
|
|
60
49
|
static serializeSolanaTransaction(transaction: Transaction | undefined): string | undefined;
|
|
61
50
|
static solanaWalletSupportsVersionedTransactions(wallet: SolanaWallet): boolean;
|
|
62
51
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
63
52
|
solana: T;
|
|
64
53
|
near: T;
|
|
65
54
|
eth?: T;
|
|
66
|
-
polygon
|
|
55
|
+
polygon: T;
|
|
67
56
|
}): T;
|
|
68
57
|
}
|
|
69
58
|
export {};
|
|
@@ -53,7 +53,7 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
53
53
|
return "https://".concat(env, ".coinflow.cash");
|
|
54
54
|
};
|
|
55
55
|
CoinflowUtils.getCoinflowUrl = function (_a) {
|
|
56
|
-
var walletPubkey = _a.walletPubkey, route = _a.route, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain, supportsVersionedTransactions = _a.supportsVersionedTransactions, webhookInfo = _a.webhookInfo, token = _a.token, email = _a.email, loaderBackground = _a.loaderBackground;
|
|
56
|
+
var walletPubkey = _a.walletPubkey, route = _a.route, env = _a.env, amount = _a.amount, transaction = _a.transaction, blockchain = _a.blockchain, supportsVersionedTransactions = _a.supportsVersionedTransactions, webhookInfo = _a.webhookInfo, token = _a.token, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange;
|
|
57
57
|
var url = new URL("/".concat(blockchain) + route, CoinflowUtils.getCoinflowBaseUrl(env));
|
|
58
58
|
url.searchParams.append('pubkey', walletPubkey);
|
|
59
59
|
if (transaction) {
|
|
@@ -72,11 +72,14 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
72
72
|
url.searchParams.append('email', email);
|
|
73
73
|
}
|
|
74
74
|
if (token) {
|
|
75
|
-
url.searchParams.append('token', token);
|
|
75
|
+
url.searchParams.append('token', token.toString());
|
|
76
76
|
}
|
|
77
77
|
if (loaderBackground) {
|
|
78
78
|
url.searchParams.append('loaderBackground', loaderBackground);
|
|
79
79
|
}
|
|
80
|
+
if (handleHeightChange) {
|
|
81
|
+
url.searchParams.append('useHeightChange', 'true');
|
|
82
|
+
}
|
|
80
83
|
return url.toString();
|
|
81
84
|
};
|
|
82
85
|
CoinflowUtils.serializeSolanaTransaction = function (transaction) {
|
|
@@ -92,21 +95,18 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
92
95
|
var _a, _b, _c;
|
|
93
96
|
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
97
|
};
|
|
95
|
-
CoinflowUtils.byBlockchain = function (blockchain, args
|
|
96
|
-
) {
|
|
98
|
+
CoinflowUtils.byBlockchain = function (blockchain, args) {
|
|
97
99
|
switch (blockchain) {
|
|
98
100
|
case 'solana':
|
|
99
101
|
return args.solana;
|
|
100
102
|
case 'near':
|
|
101
103
|
return args.near;
|
|
104
|
+
case 'polygon':
|
|
105
|
+
return args.polygon;
|
|
102
106
|
case 'eth':
|
|
103
107
|
if (args.eth === undefined)
|
|
104
108
|
throw new Error('blockchain not supported for this operation!');
|
|
105
109
|
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;
|
|
110
110
|
default:
|
|
111
111
|
throw new Error('blockchain not supported!');
|
|
112
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";;;;AAGA,sDAA0B;
|
|
1
|
+
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";;;;AAGA,sDAA0B;AAiD1B;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,GAA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AI,CAAC,WAAW;YAAE,OAAO,SAAS,CAAC;QAEnC,IAAM,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC;YACzC,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;SACxB,CAAC,CAAC;QACH,OAAO,cAAM,CAAC,MAAM,CAAC,YAA0B,CAAC,CAAC;IACnD,CAAC;IAEM,uDAAyC,GAAhD,UACE,MAAoB;;QAEpB,OAAO,CAAC,CAAC,CAAA,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,IAA+C;QAE/C,QAAQ,UAAU,EAAE;YAClB,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;SAChD;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAjID,IAiIC;AAjIY,sCAAa"}
|
|
@@ -18,38 +18,34 @@ function CoinflowWithdraw(props) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
exports.CoinflowWithdraw = CoinflowWithdraw;
|
|
21
|
-
function CoinflowSolanaWithdraw(
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
connection: connection,
|
|
26
|
-
});
|
|
27
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
21
|
+
function CoinflowSolanaWithdraw(props) {
|
|
22
|
+
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)(props);
|
|
23
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
24
|
+
var wallet = props.wallet;
|
|
28
25
|
if (!wallet.publicKey)
|
|
29
26
|
return null;
|
|
30
27
|
var walletPubkey = wallet.publicKey.toString();
|
|
31
|
-
|
|
28
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/withdraw/".concat(props.merchantId) });
|
|
29
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
32
30
|
}
|
|
33
|
-
function CoinflowNearWithdraw(
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
31
|
+
function CoinflowNearWithdraw(props) {
|
|
32
|
+
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)(props);
|
|
33
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
34
|
+
var wallet = props.wallet;
|
|
39
35
|
if (!wallet)
|
|
40
36
|
return null;
|
|
41
37
|
var walletPubkey = wallet.accountId;
|
|
42
|
-
|
|
38
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/withdraw/".concat(props.merchantId) });
|
|
39
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
43
40
|
}
|
|
44
|
-
function CoinflowEthWithdraw(
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
});
|
|
49
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, onSuccess).IFrameRef;
|
|
41
|
+
function CoinflowEthWithdraw(props) {
|
|
42
|
+
var handlers = (0, EthIFrameMessageHandlers_1.useEthIFrameMessageHandlers)(props);
|
|
43
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
44
|
+
var wallet = props.wallet;
|
|
50
45
|
if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address))
|
|
51
46
|
return null;
|
|
52
47
|
var walletPubkey = wallet.address;
|
|
53
|
-
|
|
48
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/withdraw/".concat(props.merchantId) });
|
|
49
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
54
50
|
}
|
|
55
51
|
//# 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;AAgCvE,SAAgB,gBAAgB,CAC9B,KAIgC;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,GAAG,EAAE,8BAAC,mBAAmB,uBAAM,KAAkC,EAAI;QACrE,OAAO,EAAE,CACP,8BAAC,mBAAmB,uBAAM,KAAsC,EAAI,CACrE;KACF,CAAC,CAAC;AACL,CAAC;AAjBD,4CAiBC;AAED,SAAS,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"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I,IAAA,iCAAe,EAAC,QAAQ,EAAE,KAAK,CAAC,UAApC,CAAqC;IAE9C,IAAA,MAAM,GAAI,KAAK,OAAT,CAAU;IACvB,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,IAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC;IAEtC,IAAM,WAAW,yCACZ,KAAK,KACR,YAAY,cAAA,EACZ,SAAS,WAAA,EACT,KAAK,EAAE,oBAAa,KAAK,CAAC,UAAU,CAAE,GACvC,CAAC;IACF,OAAO,CACL,8BAAC,+BAAc,uBAAK,WAAW,EAAG,CACnC,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,KAA8D;IACzF,IAAM,QAAQ,GAAG,IAAA,sDAA2B,EAAC,KAAK,CAAC,CAAC;IAC7C,IAAA,SAAS,GAAI,IAAA,iCAAe,EAAC,QAAQ,EAAE,KAAK,CAAC,UAApC,CAAqC;IAE9C,IAAA,MAAM,GAAI,KAAK,OAAT,CAAU;IACvB,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAA;QAAE,OAAO,IAAI,CAAC;IAClC,IAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC;IAEpC,IAAM,WAAW,yCACZ,KAAK,KACR,YAAY,cAAA,EACZ,SAAS,WAAA,EACT,KAAK,EAAE,oBAAa,KAAK,CAAC,UAAU,CAAE,GACvC,CAAC;IACF,OAAO,CACL,8BAAC,+BAAc,uBAAK,WAAW,EAAG,CACnC,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CoinflowNearHistoryProps, CoinflowSolanaHistoryProps, CoinflowEthHistoryProps } from './CommonCoinflowProps';
|
|
3
|
-
export declare function CoinflowWithdrawHistory(props: CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowEthHistoryProps): JSX.Element;
|
|
2
|
+
import { CoinflowNearHistoryProps, CoinflowSolanaHistoryProps, CoinflowEthHistoryProps, CoinflowPolygonHistoryProps } from './CommonCoinflowProps';
|
|
3
|
+
export declare function CoinflowWithdrawHistory(props: CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowEthHistoryProps | CoinflowPolygonHistoryProps): JSX.Element;
|
|
@@ -14,40 +14,37 @@ function CoinflowWithdrawHistory(props) {
|
|
|
14
14
|
solana: (react_1.default.createElement(SolanaWithdrawHistory, tslib_1.__assign({}, props))),
|
|
15
15
|
near: react_1.default.createElement(NearWithdrawHistory, tslib_1.__assign({}, props)),
|
|
16
16
|
eth: react_1.default.createElement(EthWithdrawHistory, tslib_1.__assign({}, props)),
|
|
17
|
+
polygon: react_1.default.createElement(EthWithdrawHistory, tslib_1.__assign({}, props)),
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
exports.CoinflowWithdrawHistory = CoinflowWithdrawHistory;
|
|
20
|
-
function SolanaWithdrawHistory(
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
connection: connection,
|
|
25
|
-
});
|
|
26
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
21
|
+
function SolanaWithdrawHistory(props) {
|
|
22
|
+
var handlers = (0, SolanaIFrameMessageHandlers_1.useSolanaIFrameMessageHandlers)(props);
|
|
23
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
24
|
+
var wallet = props.wallet;
|
|
27
25
|
if (!wallet.publicKey)
|
|
28
26
|
return null;
|
|
29
27
|
var walletPubkey = wallet.publicKey.toString();
|
|
30
|
-
|
|
28
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/history/withdraw/".concat(props.merchantId) });
|
|
29
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
31
30
|
}
|
|
32
|
-
function NearWithdrawHistory(
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
31
|
+
function NearWithdrawHistory(props) {
|
|
32
|
+
var handlers = (0, NearIFrameMessageHandlers_1.useNearIFrameMessageHandlers)(props);
|
|
33
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
34
|
+
var wallet = props.wallet;
|
|
38
35
|
if (!wallet)
|
|
39
36
|
return null;
|
|
40
37
|
var walletPubkey = wallet.accountId;
|
|
41
|
-
|
|
38
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: walletPubkey, IFrameRef: IFrameRef, route: "/history/withdraw/".concat(props.merchantId) });
|
|
39
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
42
40
|
}
|
|
43
|
-
function EthWithdrawHistory(
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
});
|
|
48
|
-
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers).IFrameRef;
|
|
41
|
+
function EthWithdrawHistory(props) {
|
|
42
|
+
var handlers = (0, EthIFrameMessageHandlers_1.useEthIFrameMessageHandlers)(props);
|
|
43
|
+
var IFrameRef = (0, useIframeWallet_1.useIframeWallet)(handlers, props).IFrameRef;
|
|
44
|
+
var wallet = props.wallet;
|
|
49
45
|
if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address))
|
|
50
46
|
return null;
|
|
51
|
-
|
|
47
|
+
var iframeProps = tslib_1.__assign(tslib_1.__assign({}, props), { walletPubkey: wallet.address, IFrameRef: IFrameRef, route: "/history/withdraw/".concat(props.merchantId) });
|
|
48
|
+
return (react_1.default.createElement(CoinflowIFrame_1.CoinflowIFrame, tslib_1.__assign({}, iframeProps)));
|
|
52
49
|
}
|
|
53
50
|
//# 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;
|
|
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;AAOzE,uEAAuE;AAEvE,SAAgB,uBAAuB,CACrC,KAI+B;IAE/B,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;QACnE,OAAO,EAAE,8BAAC,kBAAkB,uBAAM,KAAqC,EAAI;KAC5E,CAAC,CAAC;AACL,CAAC;AAfD,0DAeC;AAED,SAAS,qBAAqB,CAAC,KAAiC;IAC9D,IAAM,QAAQ,GAAG,IAAA,4DAA8B,EAAC,KAAK,CAAC,CAAC;IAChD,IAAA,SAAS,GAAI,IAAA,iCAAe,EAAC,QAAQ,EAAE,KAAK,CAAC,UAApC,CAAqC;IAE9C,IAAA,MAAM,GAAI,KAAK,OAAT,CAAU;IACvB,IAAI,CAAC,MAAM,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IACnC,IAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAEjD,IAAM,WAAW,yCACZ,KAAK,KACR,YAA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|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { CoinflowBlockchain, CoinflowEnvs, EthWallet, NearWallet, SolanaWallet } from './CoinflowUtils';
|
|
2
2
|
import type { Connection } from '@solana/web3.js';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { PublicKey } from '@solana/web3.js';
|
|
3
5
|
export interface CommonCoinflowProps {
|
|
4
6
|
merchantId: string;
|
|
5
7
|
env?: CoinflowEnvs;
|
|
6
8
|
loaderBackground?: string;
|
|
7
9
|
blockchain: CoinflowBlockchain;
|
|
10
|
+
handleHeightChange?: (height: string) => void;
|
|
8
11
|
}
|
|
9
12
|
export interface CoinflowSolanaHistoryProps extends CommonCoinflowProps {
|
|
10
13
|
wallet: SolanaWallet;
|
|
@@ -23,3 +26,18 @@ export interface CoinflowPolygonHistoryProps extends CommonCoinflowProps {
|
|
|
23
26
|
wallet: EthWallet;
|
|
24
27
|
blockchain: 'polygon';
|
|
25
28
|
}
|
|
29
|
+
export interface CoinflowIFrameProps {
|
|
30
|
+
walletPubkey: string;
|
|
31
|
+
IFrameRef: React.RefObject<HTMLIFrameElement>;
|
|
32
|
+
route: string;
|
|
33
|
+
amount?: number;
|
|
34
|
+
transaction?: string;
|
|
35
|
+
blockchain: CoinflowBlockchain;
|
|
36
|
+
webhookInfo?: object;
|
|
37
|
+
token?: string | PublicKey;
|
|
38
|
+
email?: string;
|
|
39
|
+
env?: CoinflowEnvs;
|
|
40
|
+
loaderBackground?: string;
|
|
41
|
+
supportsVersionedTransactions?: boolean;
|
|
42
|
+
handleHeightChange?: (height: string) => void;
|
|
43
|
+
}
|
|
@@ -14,5 +14,6 @@ export type IFrameMessageHandlers = {
|
|
|
14
14
|
handleSignMessage?: ({ data }: WalletCall) => Promise<string>;
|
|
15
15
|
handleSignTransaction?: ({ data }: WalletCall) => Promise<string>;
|
|
16
16
|
handleSendTransaction: ({ data }: WalletCall) => Promise<string>;
|
|
17
|
+
handleHeightChange?: (height: string) => void;
|
|
17
18
|
};
|
|
18
19
|
export declare function useSolanaIFrameMessageHandlers({ wallet, connection, partialSigners, debugTx, }: SolanaIFrameWalletProps): IFrameMessageHandlers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaIFrameMessageHandlers.js","sourceRoot":"","sources":["../../src/SolanaIFrameMessageHandlers.ts"],"names":[],"mappings":";;;;AAAA,+BAAkC;AAClC,sDAA0B;
|
|
1
|
+
{"version":3,"file":"SolanaIFrameMessageHandlers.js","sourceRoot":"","sources":["../../src/SolanaIFrameMessageHandlers.ts"],"names":[],"mappings":";;;;AAAA,+BAAkC;AAClC,sDAA0B;AAoB1B,SAAgB,8BAA8B,CAAC,EAKrB;IAL1B,iBA0GC;QAzGC,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,cAAc,oBAAA,EACd,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA;IAEf,IAAM,oBAAoB,GAAG,IAAA,mBAAW,EACtC,UAAO,EAAsC;;;;;;oBAC3C,IAAI,CAAC,MAAM,CAAC,eAAe;wBACzB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;oBAE7C,qBAAM,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,EAAA;;oBAA3C,QAAQ,GAAG,SAAgC;oBAC3C,YAAY,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;oBACZ,qBAAM,UAAU,CAAC,mBAAmB,CAAC,QAAuB,CAAC,EAAA;;oBAA5E,UAAU,GAAK,CAAA,SAA6D,CAAA,MAAlE;oBACzB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAChC,WAAuC,EAArB,WAAA,UAAU,CAAC,IAAI,mCAAI,EAAE,EAArB,cAAqB,EAArB,IAAqB,EAAE;wBAA9B,GAAG;wBACZ,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;qBAClB;oBACiB,qBAAM,UAAU,CAAC,kBAAkB,CAAC,YAAY,EAAE;4BAClE,aAAa,EAAE,IAAI;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