@rhinestone/deposit-modal 0.3.0 → 0.4.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/dist/{DepositModalReown-DNW4GH6L.cjs → DepositModalReown-KFTMS2WX.cjs} +9 -7
- package/dist/{DepositModalReown-6SUEC5IU.mjs → DepositModalReown-PC7EX5VK.mjs} +6 -4
- package/dist/{WithdrawModalReown-7UAGSOSU.mjs → WithdrawModalReown-BE23LUMT.mjs} +5 -4
- package/dist/{WithdrawModalReown-OUWBSKSM.cjs → WithdrawModalReown-Z2YF2FSJ.cjs} +8 -7
- package/dist/{caip-CrQ2KKU-.d.cts → caip-CsslyHGL.d.cts} +1 -1
- package/dist/{caip-CrQ2KKU-.d.ts → caip-CsslyHGL.d.ts} +1 -1
- package/dist/{chunk-33H6O5UU.cjs → chunk-3MXWIYAT.cjs} +16 -6
- package/dist/{chunk-KJ2RR2D4.mjs → chunk-3PVDRSJ7.mjs} +930 -682
- package/dist/{chunk-VVJAIMKB.cjs → chunk-7MP2UWIQ.cjs} +1091 -843
- package/dist/{chunk-MILJQWPT.cjs → chunk-ABVRVW3P.cjs} +133 -8
- package/dist/{chunk-2SMS542Q.cjs → chunk-AE5LHTPM.cjs} +122 -100
- package/dist/chunk-F7P4MV72.mjs +295 -0
- package/dist/chunk-FJWLC4AM.mjs +212 -0
- package/dist/{chunk-KAWJABTW.mjs → chunk-GKC22JC4.mjs} +901 -717
- package/dist/chunk-NRNJAQUA.cjs +212 -0
- package/dist/{chunk-RABZINV3.cjs → chunk-OQVLEVNR.cjs} +758 -574
- package/dist/chunk-UEKPBRBY.cjs +295 -0
- package/dist/{chunk-GPSBM66J.mjs → chunk-UFKFSGT3.mjs} +14 -4
- package/dist/{chunk-TKQYTBU6.mjs → chunk-WCIGOV34.mjs} +36 -14
- package/dist/{chunk-6YRDD462.mjs → chunk-WJX3TJFK.mjs} +135 -10
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -4
- package/dist/deposit.d.cts +4 -4
- package/dist/deposit.d.ts +4 -4
- package/dist/deposit.mjs +5 -3
- package/dist/index.cjs +7 -5
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +6 -4
- package/dist/polymarket.cjs +64 -0
- package/dist/polymarket.d.cts +57 -0
- package/dist/polymarket.d.ts +57 -0
- package/dist/polymarket.mjs +64 -0
- package/dist/styles.css +252 -9
- package/dist/{types-BMcGO5k_.d.cts → types-CFRuisqK.d.cts} +10 -1
- package/dist/{types-BMcGO5k_.d.ts → types-CFRuisqK.d.ts} +10 -1
- package/dist/withdraw.cjs +5 -4
- package/dist/withdraw.d.cts +4 -4
- package/dist/withdraw.d.ts +4 -4
- package/dist/withdraw.mjs +4 -3
- package/package.json +15 -2
package/dist/constants.cjs
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkABVRVW3Pcjs = require('./chunk-ABVRVW3P.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
@@ -67,4 +67,4 @@ var _chunkMILJQWPTcjs = require('./chunk-MILJQWPT.cjs');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
exports.CHAIN_BY_ID =
|
|
70
|
+
exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.HYPERCORE_CHAIN_ID = _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkABVRVW3Pcjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS; exports.SOLANA_TOKENS = _chunkABVRVW3Pcjs.SOLANA_TOKENS; exports.SOURCE_CHAINS = _chunkABVRVW3Pcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkABVRVW3Pcjs.SUPPORTED_CHAINS; exports.chainRegistry = _chunkABVRVW3Pcjs.chainRegistry; exports.findChainIdForToken = _chunkABVRVW3Pcjs.findChainIdForToken; exports.getChainBadge = _chunkABVRVW3Pcjs.getChainBadge; exports.getChainIcon = _chunkABVRVW3Pcjs.getChainIcon; exports.getChainId = _chunkABVRVW3Pcjs.getChainId; exports.getChainName = _chunkABVRVW3Pcjs.getChainName; exports.getChainObject = _chunkABVRVW3Pcjs.getChainObject; exports.getExplorerName = _chunkABVRVW3Pcjs.getExplorerName; exports.getExplorerTxUrl = _chunkABVRVW3Pcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkABVRVW3Pcjs.getExplorerUrl; exports.getSolanaTokenByMint = _chunkABVRVW3Pcjs.getSolanaTokenByMint; exports.getSolanaTokenBySymbol = _chunkABVRVW3Pcjs.getSolanaTokenBySymbol; exports.getSupportedChainIds = _chunkABVRVW3Pcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkABVRVW3Pcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkABVRVW3Pcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkABVRVW3Pcjs.getTokenAddress; exports.getTokenDecimals = _chunkABVRVW3Pcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon; exports.getTokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol; exports.getUsdcAddress = _chunkABVRVW3Pcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkABVRVW3Pcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkABVRVW3Pcjs.isSupportedTokenAddressForChain;
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS,
|
|
1
|
+
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, d as SupportedTokenOption, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.cjs';
|
|
2
2
|
import 'viem/chains';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS,
|
|
1
|
+
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, d as SupportedTokenOption, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.js';
|
|
2
2
|
import 'viem/chains';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/constants.mjs
CHANGED
package/dist/deposit.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunk7MP2UWIQcjs = require('./chunk-7MP2UWIQ.cjs');
|
|
4
|
+
require('./chunk-NRNJAQUA.cjs');
|
|
5
|
+
require('./chunk-OQVLEVNR.cjs');
|
|
6
|
+
require('./chunk-UEKPBRBY.cjs');
|
|
7
|
+
require('./chunk-ABVRVW3P.cjs');
|
|
6
8
|
|
|
7
9
|
|
|
8
|
-
exports.DepositModal =
|
|
10
|
+
exports.DepositModal = _chunk7MP2UWIQcjs.DepositModal;
|
package/dist/deposit.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { f as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { f as DepositModalProps } from './types-CFRuisqK.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CFRuisqK.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
|
-
declare function DepositModal(props: DepositModalProps):
|
|
6
|
+
declare function DepositModal(props: DepositModalProps): react.JSX.Element;
|
|
7
7
|
declare namespace DepositModal {
|
|
8
8
|
var displayName: string;
|
|
9
9
|
}
|
package/dist/deposit.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { f as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { f as DepositModalProps } from './types-CFRuisqK.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CFRuisqK.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
|
-
declare function DepositModal(props: DepositModalProps):
|
|
6
|
+
declare function DepositModal(props: DepositModalProps): react.JSX.Element;
|
|
7
7
|
declare namespace DepositModal {
|
|
8
8
|
var displayName: string;
|
|
9
9
|
}
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3PVDRSJ7.mjs";
|
|
4
|
+
import "./chunk-FJWLC4AM.mjs";
|
|
5
|
+
import "./chunk-GKC22JC4.mjs";
|
|
6
|
+
import "./chunk-F7P4MV72.mjs";
|
|
7
|
+
import "./chunk-WJX3TJFK.mjs";
|
|
6
8
|
export {
|
|
7
9
|
DepositModal
|
|
8
10
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7MP2UWIQcjs = require('./chunk-7MP2UWIQ.cjs');
|
|
4
|
+
require('./chunk-NRNJAQUA.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
7
|
+
var _chunkAE5LHTPMcjs = require('./chunk-AE5LHTPM.cjs');
|
|
8
|
+
require('./chunk-OQVLEVNR.cjs');
|
|
9
|
+
require('./chunk-UEKPBRBY.cjs');
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
|
|
@@ -36,7 +38,7 @@ require('./chunk-RABZINV3.cjs');
|
|
|
36
38
|
|
|
37
39
|
|
|
38
40
|
|
|
39
|
-
var
|
|
41
|
+
var _chunkABVRVW3Pcjs = require('./chunk-ABVRVW3P.cjs');
|
|
40
42
|
|
|
41
43
|
// src/core/reown-disconnect.ts
|
|
42
44
|
var _react = require('@reown/appkit/react');
|
|
@@ -83,4 +85,4 @@ async function disconnectWallet() {
|
|
|
83
85
|
|
|
84
86
|
|
|
85
87
|
|
|
86
|
-
exports.CHAIN_BY_ID =
|
|
88
|
+
exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk7MP2UWIQcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkABVRVW3Pcjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkABVRVW3Pcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkABVRVW3Pcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkAE5LHTPMcjs.WithdrawModal; exports.chainRegistry = _chunkABVRVW3Pcjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkABVRVW3Pcjs.findChainIdForToken; exports.getChainBadge = _chunkABVRVW3Pcjs.getChainBadge; exports.getChainIcon = _chunkABVRVW3Pcjs.getChainIcon; exports.getChainId = _chunkABVRVW3Pcjs.getChainId; exports.getChainName = _chunkABVRVW3Pcjs.getChainName; exports.getChainObject = _chunkABVRVW3Pcjs.getChainObject; exports.getExplorerName = _chunkABVRVW3Pcjs.getExplorerName; exports.getExplorerTxUrl = _chunkABVRVW3Pcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkABVRVW3Pcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkABVRVW3Pcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkABVRVW3Pcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkABVRVW3Pcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkABVRVW3Pcjs.getTokenAddress; exports.getTokenDecimals = _chunkABVRVW3Pcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon; exports.getTokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol; exports.getUsdcAddress = _chunkABVRVW3Pcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkABVRVW3Pcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkABVRVW3Pcjs.isSupportedTokenAddressForChain;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.cjs';
|
|
2
2
|
export { WithdrawModal } from './withdraw.cjs';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-
|
|
4
|
-
export {
|
|
5
|
-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CFRuisqK.cjs';
|
|
4
|
+
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.cjs';
|
|
5
|
+
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.cjs';
|
|
6
|
+
import 'react';
|
|
6
7
|
import 'viem';
|
|
7
8
|
import 'viem/chains';
|
|
8
9
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.js';
|
|
2
2
|
export { WithdrawModal } from './withdraw.js';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-
|
|
4
|
-
export {
|
|
5
|
-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CFRuisqK.js';
|
|
4
|
+
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.js';
|
|
5
|
+
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.js';
|
|
6
|
+
import 'react';
|
|
6
7
|
import 'viem';
|
|
7
8
|
import 'viem/chains';
|
|
8
9
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3PVDRSJ7.mjs";
|
|
4
|
+
import "./chunk-FJWLC4AM.mjs";
|
|
4
5
|
import {
|
|
5
6
|
WithdrawModal
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-WCIGOV34.mjs";
|
|
8
|
+
import "./chunk-GKC22JC4.mjs";
|
|
9
|
+
import "./chunk-F7P4MV72.mjs";
|
|
8
10
|
import {
|
|
9
11
|
CHAIN_BY_ID,
|
|
10
12
|
DEFAULT_BACKEND_URL,
|
|
@@ -36,7 +38,7 @@ import {
|
|
|
36
38
|
getUsdcAddress,
|
|
37
39
|
getUsdcDecimals,
|
|
38
40
|
isSupportedTokenAddressForChain
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-WJX3TJFK.mjs";
|
|
40
42
|
|
|
41
43
|
// src/core/reown-disconnect.ts
|
|
42
44
|
import { modal } from "@reown/appkit/react";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkNRNJAQUAcjs = require('./chunk-NRNJAQUA.cjs');
|
|
6
|
+
require('./chunk-UEKPBRBY.cjs');
|
|
7
|
+
require('./chunk-ABVRVW3P.cjs');
|
|
8
|
+
|
|
9
|
+
// src/core/dapp-imports/polymarket/account.ts
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _viem = require('viem');
|
|
17
|
+
var _chains = require('viem/chains');
|
|
18
|
+
async function getPolymarketAccount(params) {
|
|
19
|
+
const { rpcUrl, signal } = params;
|
|
20
|
+
if (typeof params.eoa !== "string" || !_viem.isAddress.call(void 0, params.eoa)) {
|
|
21
|
+
throw new TypeError(
|
|
22
|
+
`getPolymarketAccount: invalid EOA address: ${String(params.eoa)}`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
const eoa = _viem.getAddress.call(void 0, params.eoa);
|
|
26
|
+
const proxyWallet = await _chunkNRNJAQUAcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
|
|
27
|
+
if (!proxyWallet) return null;
|
|
28
|
+
throwIfAborted(signal);
|
|
29
|
+
let balances = { pusd: 0n, usdce: 0n };
|
|
30
|
+
try {
|
|
31
|
+
balances = await _chunkNRNJAQUAcjs.readPolymarketBalances.call(void 0, {
|
|
32
|
+
publicClient: polygonClient(rpcUrl),
|
|
33
|
+
proxyWallet
|
|
34
|
+
});
|
|
35
|
+
} catch (e) {
|
|
36
|
+
}
|
|
37
|
+
throwIfAborted(signal);
|
|
38
|
+
const pusd = toTokenBalance(balances.pusd);
|
|
39
|
+
const usdce = toTokenBalance(balances.usdce);
|
|
40
|
+
return {
|
|
41
|
+
eoa,
|
|
42
|
+
proxyWallet,
|
|
43
|
+
chainId: _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
44
|
+
pusd,
|
|
45
|
+
usdce,
|
|
46
|
+
totalUsd: pusd.usd + usdce.usd
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function toTokenBalance(raw) {
|
|
50
|
+
const formatted = _viem.formatUnits.call(void 0, raw, 6);
|
|
51
|
+
const usd = Number(formatted);
|
|
52
|
+
return { raw, formatted, usd: Number.isFinite(usd) ? usd : 0 };
|
|
53
|
+
}
|
|
54
|
+
function polygonClient(rpcUrl) {
|
|
55
|
+
return _viem.createPublicClient.call(void 0, { chain: _chains.polygon, transport: _viem.http.call(void 0, rpcUrl) });
|
|
56
|
+
}
|
|
57
|
+
function throwIfAborted(signal) {
|
|
58
|
+
if (_optionalChain([signal, 'optionalAccess', _ => _.aborted])) {
|
|
59
|
+
throw _nullishCoalesce(signal.reason, () => ( new DOMException("Aborted", "AbortError")));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
exports.getPolymarketAccount = getPolymarketAccount;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
|
|
3
|
+
declare const POLYMARKET_POLYGON_CHAIN_ID = 137;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Headless Polymarket account lookup, exported via the
|
|
7
|
+
* `@rhinestone/deposit-modal/polymarket` subpath so a consumer can render
|
|
8
|
+
* the user's Polymarket address + balance in their own UI (no React, no
|
|
9
|
+
* modal, no wallet-connect stack in the bundle).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface PolymarketTokenBalance {
|
|
13
|
+
/** Base units (6 decimals). */
|
|
14
|
+
raw: bigint;
|
|
15
|
+
/** `formatUnits(raw, 6)`. */
|
|
16
|
+
formatted: string;
|
|
17
|
+
/** 1:1 for pUSD and USDC.e. */
|
|
18
|
+
usd: number;
|
|
19
|
+
}
|
|
20
|
+
interface PolymarketAccount {
|
|
21
|
+
eoa: Address;
|
|
22
|
+
/** Present even when balances are zero. */
|
|
23
|
+
proxyWallet: Address;
|
|
24
|
+
chainId: typeof POLYMARKET_POLYGON_CHAIN_ID;
|
|
25
|
+
pusd: PolymarketTokenBalance;
|
|
26
|
+
usdce: PolymarketTokenBalance;
|
|
27
|
+
totalUsd: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Looks up the Polymarket proxy wallet for an EOA and reads its pUSD and
|
|
31
|
+
* USDC.e balances on Polygon.
|
|
32
|
+
*
|
|
33
|
+
* - Resolves `null` ONLY when the EOA has no Polymarket proxy at all.
|
|
34
|
+
* Found-but-empty resolves a full account with zeroed balances — the
|
|
35
|
+
* address is the headline.
|
|
36
|
+
* - A failed balance read (RPC outage) also resolves the account with
|
|
37
|
+
* zeroed balances rather than rejecting.
|
|
38
|
+
* - Transient Gamma failures (network, 5xx) and aborts reject, so a
|
|
39
|
+
* caller never mistakes an outage for "no account".
|
|
40
|
+
*
|
|
41
|
+
* The balance reported here is "what exists" at the proxy. The modal's
|
|
42
|
+
* own availability check additionally verifies the EOA can MOVE those
|
|
43
|
+
* funds (Safe owner / deposit-wallet owner) — an account whose EOA owns
|
|
44
|
+
* neither reports a balance here but routes to the modal's home screen
|
|
45
|
+
* when opened via `initialDappImport`.
|
|
46
|
+
*
|
|
47
|
+
* `signal` cancels the Gamma profile fetch and short-circuits between
|
|
48
|
+
* steps; an in-flight RPC balance read itself is not cancellable.
|
|
49
|
+
*/
|
|
50
|
+
declare function getPolymarketAccount(params: {
|
|
51
|
+
eoa: Address | string;
|
|
52
|
+
/** Overrides the default public Polygon RPC. */
|
|
53
|
+
rpcUrl?: string;
|
|
54
|
+
signal?: AbortSignal;
|
|
55
|
+
}): Promise<PolymarketAccount | null>;
|
|
56
|
+
|
|
57
|
+
export { type PolymarketAccount, type PolymarketTokenBalance, getPolymarketAccount };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
|
|
3
|
+
declare const POLYMARKET_POLYGON_CHAIN_ID = 137;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Headless Polymarket account lookup, exported via the
|
|
7
|
+
* `@rhinestone/deposit-modal/polymarket` subpath so a consumer can render
|
|
8
|
+
* the user's Polymarket address + balance in their own UI (no React, no
|
|
9
|
+
* modal, no wallet-connect stack in the bundle).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface PolymarketTokenBalance {
|
|
13
|
+
/** Base units (6 decimals). */
|
|
14
|
+
raw: bigint;
|
|
15
|
+
/** `formatUnits(raw, 6)`. */
|
|
16
|
+
formatted: string;
|
|
17
|
+
/** 1:1 for pUSD and USDC.e. */
|
|
18
|
+
usd: number;
|
|
19
|
+
}
|
|
20
|
+
interface PolymarketAccount {
|
|
21
|
+
eoa: Address;
|
|
22
|
+
/** Present even when balances are zero. */
|
|
23
|
+
proxyWallet: Address;
|
|
24
|
+
chainId: typeof POLYMARKET_POLYGON_CHAIN_ID;
|
|
25
|
+
pusd: PolymarketTokenBalance;
|
|
26
|
+
usdce: PolymarketTokenBalance;
|
|
27
|
+
totalUsd: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Looks up the Polymarket proxy wallet for an EOA and reads its pUSD and
|
|
31
|
+
* USDC.e balances on Polygon.
|
|
32
|
+
*
|
|
33
|
+
* - Resolves `null` ONLY when the EOA has no Polymarket proxy at all.
|
|
34
|
+
* Found-but-empty resolves a full account with zeroed balances — the
|
|
35
|
+
* address is the headline.
|
|
36
|
+
* - A failed balance read (RPC outage) also resolves the account with
|
|
37
|
+
* zeroed balances rather than rejecting.
|
|
38
|
+
* - Transient Gamma failures (network, 5xx) and aborts reject, so a
|
|
39
|
+
* caller never mistakes an outage for "no account".
|
|
40
|
+
*
|
|
41
|
+
* The balance reported here is "what exists" at the proxy. The modal's
|
|
42
|
+
* own availability check additionally verifies the EOA can MOVE those
|
|
43
|
+
* funds (Safe owner / deposit-wallet owner) — an account whose EOA owns
|
|
44
|
+
* neither reports a balance here but routes to the modal's home screen
|
|
45
|
+
* when opened via `initialDappImport`.
|
|
46
|
+
*
|
|
47
|
+
* `signal` cancels the Gamma profile fetch and short-circuits between
|
|
48
|
+
* steps; an in-flight RPC balance read itself is not cancellable.
|
|
49
|
+
*/
|
|
50
|
+
declare function getPolymarketAccount(params: {
|
|
51
|
+
eoa: Address | string;
|
|
52
|
+
/** Overrides the default public Polygon RPC. */
|
|
53
|
+
rpcUrl?: string;
|
|
54
|
+
signal?: AbortSignal;
|
|
55
|
+
}): Promise<PolymarketAccount | null>;
|
|
56
|
+
|
|
57
|
+
export { type PolymarketAccount, type PolymarketTokenBalance, getPolymarketAccount };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
POLYMARKET_POLYGON_CHAIN_ID,
|
|
3
|
+
fetchPolymarketProxyWallet,
|
|
4
|
+
readPolymarketBalances
|
|
5
|
+
} from "./chunk-FJWLC4AM.mjs";
|
|
6
|
+
import "./chunk-F7P4MV72.mjs";
|
|
7
|
+
import "./chunk-WJX3TJFK.mjs";
|
|
8
|
+
|
|
9
|
+
// src/core/dapp-imports/polymarket/account.ts
|
|
10
|
+
import {
|
|
11
|
+
createPublicClient,
|
|
12
|
+
formatUnits,
|
|
13
|
+
getAddress,
|
|
14
|
+
http,
|
|
15
|
+
isAddress
|
|
16
|
+
} from "viem";
|
|
17
|
+
import { polygon } from "viem/chains";
|
|
18
|
+
async function getPolymarketAccount(params) {
|
|
19
|
+
const { rpcUrl, signal } = params;
|
|
20
|
+
if (typeof params.eoa !== "string" || !isAddress(params.eoa)) {
|
|
21
|
+
throw new TypeError(
|
|
22
|
+
`getPolymarketAccount: invalid EOA address: ${String(params.eoa)}`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
const eoa = getAddress(params.eoa);
|
|
26
|
+
const proxyWallet = await fetchPolymarketProxyWallet(eoa, signal);
|
|
27
|
+
if (!proxyWallet) return null;
|
|
28
|
+
throwIfAborted(signal);
|
|
29
|
+
let balances = { pusd: 0n, usdce: 0n };
|
|
30
|
+
try {
|
|
31
|
+
balances = await readPolymarketBalances({
|
|
32
|
+
publicClient: polygonClient(rpcUrl),
|
|
33
|
+
proxyWallet
|
|
34
|
+
});
|
|
35
|
+
} catch {
|
|
36
|
+
}
|
|
37
|
+
throwIfAborted(signal);
|
|
38
|
+
const pusd = toTokenBalance(balances.pusd);
|
|
39
|
+
const usdce = toTokenBalance(balances.usdce);
|
|
40
|
+
return {
|
|
41
|
+
eoa,
|
|
42
|
+
proxyWallet,
|
|
43
|
+
chainId: POLYMARKET_POLYGON_CHAIN_ID,
|
|
44
|
+
pusd,
|
|
45
|
+
usdce,
|
|
46
|
+
totalUsd: pusd.usd + usdce.usd
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function toTokenBalance(raw) {
|
|
50
|
+
const formatted = formatUnits(raw, 6);
|
|
51
|
+
const usd = Number(formatted);
|
|
52
|
+
return { raw, formatted, usd: Number.isFinite(usd) ? usd : 0 };
|
|
53
|
+
}
|
|
54
|
+
function polygonClient(rpcUrl) {
|
|
55
|
+
return createPublicClient({ chain: polygon, transport: http(rpcUrl) });
|
|
56
|
+
}
|
|
57
|
+
function throwIfAborted(signal) {
|
|
58
|
+
if (signal?.aborted) {
|
|
59
|
+
throw signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
getPolymarketAccount
|
|
64
|
+
};
|