@coinflowlabs/react 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/build/cjs/CoinflowIFrame.d.ts +3 -3
- package/build/cjs/CoinflowIFrame.js +2 -2
- 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 +1 -1
- package/build/cjs/CoinflowUtils.js +3 -6
- 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 +1 -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 -3
- package/build/esm/CoinflowIFrame.js +2 -2
- 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 +1 -1
- package/build/esm/CoinflowUtils.js +3 -6
- 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 +1 -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,15 @@ Props:
|
|
|
46
46
|
|
|
47
47
|
# Changelog
|
|
48
48
|
|
|
49
|
+
### 2.1.0
|
|
50
|
+
|
|
51
|
+
- Added handleHeightChange to all components to allow for dynamic height changes
|
|
52
|
+
|
|
53
|
+
### 2.0.0
|
|
54
|
+
|
|
55
|
+
- Removing hard requirements for most large 3rd party libraries
|
|
56
|
+
- Improved type checking for wallets and transactions
|
|
57
|
+
|
|
49
58
|
### 1.3.0
|
|
50
59
|
|
|
51
60
|
- Added support for Polygon blockchain
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CoinflowBlockchain, CoinflowEnvs } from './CoinflowUtils';
|
|
3
3
|
import type { PublicKey } from '@solana/web3.js';
|
|
4
|
-
interface CoinflowIFrameProps {
|
|
4
|
+
export interface CoinflowIFrameProps {
|
|
5
5
|
walletPubkey: string;
|
|
6
6
|
IFrameRef: React.RefObject<HTMLIFrameElement>;
|
|
7
7
|
route: string;
|
|
@@ -14,6 +14,6 @@ interface CoinflowIFrameProps {
|
|
|
14
14
|
env?: CoinflowEnvs;
|
|
15
15
|
loaderBackground?: string;
|
|
16
16
|
supportsVersionedTransactions?: boolean;
|
|
17
|
+
handleHeightChange?: (height: string) => void;
|
|
17
18
|
}
|
|
18
|
-
export declare function CoinflowIFrame({ walletPubkey, IFrameRef, env, route, transaction, amount, blockchain, webhookInfo, token, email, loaderBackground, supportsVersionedTransactions }: CoinflowIFrameProps): JSX.Element;
|
|
19
|
-
export {};
|
|
19
|
+
export declare function CoinflowIFrame({ walletPubkey, IFrameRef, env, route, transaction, amount, blockchain, webhookInfo, token, email, loaderBackground, supportsVersionedTransactions, handleHeightChange, }: CoinflowIFrameProps): JSX.Element;
|
|
@@ -5,7 +5,7 @@ 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, supportsVersionedTransactions = _a.supportsVersionedTransactions;
|
|
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, handleHeightChange = _a.handleHeightChange;
|
|
9
9
|
var url = (0, react_1.useMemo)(function () {
|
|
10
10
|
return CoinflowUtils_1.CoinflowUtils.getCoinflowUrl({
|
|
11
11
|
walletPubkey: walletPubkey,
|
|
@@ -21,7 +21,7 @@ function CoinflowIFrame(_a) {
|
|
|
21
21
|
supportsVersionedTransactions: supportsVersionedTransactions
|
|
22
22
|
});
|
|
23
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 () {
|
|
24
|
+
return (0, react_1.useMemo)(function () { return (react_1.default.createElement("iframe", { scrolling: handleHeightChange ? 'no' : 'yes', onLoad: function () {
|
|
25
25
|
if (IFrameRef.current)
|
|
26
26
|
IFrameRef.current.style.opacity = '1';
|
|
27
27
|
}, ref: IFrameRef, style: {
|
|
@@ -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;AAmBhF,SAAgB,cAAc,CAAC,EAcT;QAbpB,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,EAC7B,kBAAkB,wBAAA;IAElB,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,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;AApDD,wCAoDC"}
|
|
@@ -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,
|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AAK,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,
|
|
1
|
+
{"version":3,"file":"CoinflowPurchaseHistory.js","sourceRoot":"","sources":["../../src/CoinflowPurchaseHistory.tsx"],"names":[],"mappings":";;;;AAAA,qDAAkD;AAClD,mDAAqE;AACrE,wDAA0B;AAC1B,6EAA6E;AAC7E,yEAAyE;AACzE,iDAA8C;AAM9C,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,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAEjD,IAAM,WAAW,yCACZ,KAAK,KACR,YAAY,cAAA,EACZ,SAAS,W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, _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
|
|
96
|
-
) {
|
|
95
|
+
CoinflowUtils.byBlockchain = function (blockchain, args) {
|
|
97
96
|
switch (blockchain) {
|
|
98
97
|
case 'solana':
|
|
99
98
|
return args.solana;
|
|
100
99
|
case 'near':
|
|
101
100
|
return args.near;
|
|
101
|
+
case 'polygon':
|
|
102
|
+
return args.polygon;
|
|
102
103
|
case 'eth':
|
|
103
104
|
if (args.eth === undefined)
|
|
104
105
|
throw new Error('blockchain not supported for this operation!');
|
|
105
106
|
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
107
|
default:
|
|
111
108
|
throw new Error('blockchain not supported!');
|
|
112
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../src/CoinflowUtils.ts"],"names":[],"mappings":";;;;AAGA,sDAA0B;AAgD1B;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,mCAAW,GAAjB,UAAkB,UAAkB;;;;;4BACjB,qBAAM,KAAK,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 +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,
|
|
1
|
+
{"version":3,"file":"CoinflowWithdraw.js","sourceRoot":"","sources":["../../src/CoinflowWithdraw.tsx"],"names":[],"mappings":";;;;AAAA,wDAA0B;AAE1B,mDAAqE;AACrE,iDAKyB;AACzB,qDAAmE;AACnE,6EAA6E;AAC7E,yEAAyE;AAEzE,uEAAuE;AAgCvE,SAAgB,gBA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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,qDAAk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CAAC;IAC9C,IAAA,SAAS,GAAI,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,4BAAqB,KAAK,CAAC,UAAU,CAAE,GAC/C,CAAC;IACF,OAAO,CACL,8BAAC,+BAAc,uBAAK,WAAW,EAAI,CACpC,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,KAA4D;IACtF,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;IAElC,IAAM,WAAW,yCACZ,KAAK,KACR,YAAY,EAAE,MAAM,CAAC,OAAO,EAC5B,SAAS,WAAA,EACT,KAAK,EAAE,4BAAqB,KAAK,CAAC,UAAU,CAAE,GAC/C,CAAC;IACF,OAAO,CACL,8BAAC,+BAAc,uBAAK,WAAW,EAAI,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -5,6 +5,7 @@ export interface CommonCoinflowProps {
|
|
|
5
5
|
env?: CoinflowEnvs;
|
|
6
6
|
loaderBackground?: string;
|
|
7
7
|
blockchain: CoinflowBlockchain;
|
|
8
|
+
handleHeightChange?: (height: string) => void;
|
|
8
9
|
}
|
|
9
10
|
export interface CoinflowSolanaHistoryProps extends CommonCoinflowProps {
|
|
10
11
|
wallet: SolanaWallet;
|
|
@@ -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,CA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A,mBAAW,EACvC,UAAO,EAAkB;YAAjB,IAAI,UAAA;;;;;;wBACV,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;4BAC3B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;yBACpE;wBAEK,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;wBAChC,IAAI,cAAc,EAAE;4BAClB,cAAc,CAAC,OAAO,CAAC,UAAA,MAAM,IAAI,OAAA,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAzB,CAAyB,CAAC,CAAC;yBAC7D;wBAEyB,qBAAM,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,EAAA;;wBAApD,iBAAiB,GAAG,SAAgC;wBAC1D,sBAAO,cAAM,CAAC,MAAM,CAClB,iBAAiB,CAAC,SAAS,CAAC;gCAC1B,oBAAoB,EAAE,KAAK;gCAC3B,gBAAgB,EAAE,KAAK;6BACxB,CAAC,CACH,EAAC;;;;KACH,EACD,CAAC,cAAc,EAAE,MAAM,CAAC,CACzB,CAAC;IAEF,OAAO;QACL,qBAAqB,uBAAA;QACrB,qBAAqB,uBAAA;KACtB,CAAC;AACJ,CAAC;AA1GD,wEA0GC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IFrameMessageHandlers } from './SolanaIFrameMessageHandlers';
|
|
3
3
|
export type OnSuccessMethod = (params: string) => void | Promise<void>;
|
|
4
|
-
export declare function useIframeWallet({ handleSignTransaction, handleSendTransaction, handleSignMessage, }: IFrameMessageHandlers, onSuccess
|
|
4
|
+
export declare function useIframeWallet({ handleSignTransaction, handleSendTransaction, handleSignMessage, }: IFrameMessageHandlers, { onSuccess, handleHeightChange }: {
|
|
5
|
+
onSuccess?: OnSuccessMethod;
|
|
6
|
+
handleHeightChange?: (height: string) => void;
|
|
7
|
+
}): {
|
|
5
8
|
IFrameRef: import("react").MutableRefObject<HTMLIFrameElement | null>;
|
|
6
9
|
};
|