@rhinestone/deposit-modal 0.17.0 → 0.19.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 +109 -0
- package/dist/{DepositModalReown-6CXXGQ7X.cjs → DepositModalReown-UITYXJ6W.cjs} +17 -17
- package/dist/{DepositModalReown-ELDSTIME.mjs → DepositModalReown-XBNY6QCI.mjs} +4 -4
- package/dist/{WithdrawModal-QRMDR5T4.mjs → WithdrawModal-DY6A55OA.mjs} +3 -3
- package/dist/WithdrawModal-V42OK7L3.cjs +11 -0
- package/dist/bearer-transport-CVHNBgoV.d.cts +14 -0
- package/dist/bearer-transport-CVHNBgoV.d.ts +14 -0
- package/dist/{chunk-QMGEK623.mjs → chunk-5NWLS5BQ.mjs} +536 -225
- package/dist/chunk-ADEWTBSN.cjs +19 -0
- package/dist/{chunk-ZHX4QROC.mjs → chunk-BIL4ENC3.mjs} +1 -1
- package/dist/{chunk-2W4BJ5I3.cjs → chunk-EG4H7OMC.cjs} +71 -71
- package/dist/{chunk-QGNJFDEO.cjs → chunk-HMUGY66O.cjs} +690 -379
- package/dist/chunk-ISLVD5HQ.cjs +41 -0
- package/dist/{chunk-H66WM5AO.mjs → chunk-NITKDXHR.mjs} +388 -95
- package/dist/{chunk-XJMDCBHS.cjs → chunk-OCWSMLOP.cjs} +862 -569
- package/dist/chunk-PP4QE32S.mjs +19 -0
- package/dist/{chunk-JCWJ6HW7.cjs → chunk-PYOC6K24.cjs} +1 -1
- package/dist/{chunk-XCBDJPBD.mjs → chunk-X6N2XPTO.mjs} +1 -1
- package/dist/chunk-ZGHVJ2XM.mjs +41 -0
- package/dist/compliance.cjs +14 -0
- package/dist/compliance.d.cts +10 -0
- package/dist/compliance.d.ts +10 -0
- package/dist/compliance.mjs +14 -0
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +3 -3
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/embed.cjs +16 -16
- package/dist/embed.d.cts +1 -1
- package/dist/embed.d.ts +1 -1
- package/dist/embed.mjs +8 -8
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/offramp.cjs +25 -0
- package/dist/offramp.d.cts +28 -0
- package/dist/offramp.d.ts +28 -0
- package/dist/offramp.mjs +25 -0
- package/dist/onramp.cjs +40 -0
- package/dist/onramp.d.cts +55 -0
- package/dist/onramp.d.ts +55 -0
- package/dist/onramp.mjs +40 -0
- package/dist/ramp-types-C6aUz4SZ.d.cts +43 -0
- package/dist/ramp-types-C6aUz4SZ.d.ts +43 -0
- package/dist/server.cjs +54 -2
- package/dist/server.d.cts +13 -1
- package/dist/server.d.ts +13 -1
- package/dist/server.mjs +52 -0
- package/dist/styles.css +25 -0
- package/dist/{types-B9SbZQIG.d.ts → types-BOxa1DE-.d.ts} +40 -4
- package/dist/{types-SwGGf0eH.d.cts → types-BShYNpvO.d.cts} +40 -4
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +35 -5
- package/dist/WithdrawModal-QB2U756L.cjs +0 -11
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/core/ramp-utils.ts
|
|
2
|
+
function rampQuery(value) {
|
|
3
|
+
return new URLSearchParams(
|
|
4
|
+
Object.entries(value).filter(([, value2]) => value2 !== void 0).map(([key, value2]) => [key, String(value2)])
|
|
5
|
+
).toString();
|
|
6
|
+
}
|
|
7
|
+
function rampResourceId(value) {
|
|
8
|
+
if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(
|
|
9
|
+
value
|
|
10
|
+
)) {
|
|
11
|
+
throw new Error("Invalid ramp resource ID");
|
|
12
|
+
}
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
rampQuery,
|
|
18
|
+
rampResourceId
|
|
19
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/core/version.ts
|
|
2
|
-
var MODAL_VERSION = "0.
|
|
2
|
+
var MODAL_VERSION = "0.19.0";
|
|
3
3
|
var SERVICE_HEADERS = {
|
|
4
4
|
"Content-Type": "application/json",
|
|
5
5
|
"x-deposit-modal-version": MODAL_VERSION
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
serviceHeaders
|
|
3
|
+
} from "./chunk-X6N2XPTO.mjs";
|
|
4
|
+
|
|
5
|
+
// src/core/bearer-transport.ts
|
|
6
|
+
var ScopedRequestError = class extends Error {
|
|
7
|
+
constructor(status) {
|
|
8
|
+
super(
|
|
9
|
+
status === 404 ? "Route unavailable; upgrade the proxy before using this API" : `Scoped request failed (${status})`
|
|
10
|
+
);
|
|
11
|
+
this.status = status;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function createBearerTransport(options) {
|
|
15
|
+
const base = options.backendUrl.replace(/\/$/, "");
|
|
16
|
+
if (!base) throw new Error("backendUrl is required");
|
|
17
|
+
return async function request(path, body) {
|
|
18
|
+
const session = await options.getSession();
|
|
19
|
+
if (!session.token || /\s/.test(session.token) || !Number.isFinite(Date.parse(session.expiresAt)) || Date.parse(session.expiresAt) <= Date.now()) {
|
|
20
|
+
throw new ScopedRequestError(401);
|
|
21
|
+
}
|
|
22
|
+
const response = await fetch(`${base}${path}`, {
|
|
23
|
+
method: body === void 0 ? "GET" : "POST",
|
|
24
|
+
headers: {
|
|
25
|
+
...serviceHeaders(),
|
|
26
|
+
Authorization: `Bearer ${session.token}`
|
|
27
|
+
},
|
|
28
|
+
body: body === void 0 ? void 0 : JSON.stringify(body),
|
|
29
|
+
credentials: "omit",
|
|
30
|
+
cache: "no-store",
|
|
31
|
+
redirect: "error"
|
|
32
|
+
});
|
|
33
|
+
if (!response.ok) throw new ScopedRequestError(response.status);
|
|
34
|
+
return response.json();
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
ScopedRequestError,
|
|
40
|
+
createBearerTransport
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkISLVD5HQcjs = require('./chunk-ISLVD5HQ.cjs');
|
|
5
|
+
require('./chunk-PYOC6K24.cjs');
|
|
6
|
+
|
|
7
|
+
// src/core/compliance-service.ts
|
|
8
|
+
function getComplianceStatus(options) {
|
|
9
|
+
return _chunkISLVD5HQcjs.createBearerTransport.call(void 0, options)("/compliance/status");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.ScopedRequestError = _chunkISLVD5HQcjs.ScopedRequestError; exports.getComplianceStatus = getComplianceStatus;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { C as CustomerSessionOptions } from './bearer-transport-CVHNBgoV.cjs';
|
|
2
|
+
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-CVHNBgoV.cjs';
|
|
3
|
+
|
|
4
|
+
interface ComplianceStatus {
|
|
5
|
+
status: "not_started";
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
}
|
|
8
|
+
declare function getComplianceStatus(options: CustomerSessionOptions): Promise<ComplianceStatus>;
|
|
9
|
+
|
|
10
|
+
export { type ComplianceStatus, CustomerSessionOptions, getComplianceStatus };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { C as CustomerSessionOptions } from './bearer-transport-CVHNBgoV.js';
|
|
2
|
+
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-CVHNBgoV.js';
|
|
3
|
+
|
|
4
|
+
interface ComplianceStatus {
|
|
5
|
+
status: "not_started";
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
}
|
|
8
|
+
declare function getComplianceStatus(options: CustomerSessionOptions): Promise<ComplianceStatus>;
|
|
9
|
+
|
|
10
|
+
export { type ComplianceStatus, CustomerSessionOptions, getComplianceStatus };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ScopedRequestError,
|
|
3
|
+
createBearerTransport
|
|
4
|
+
} from "./chunk-ZGHVJ2XM.mjs";
|
|
5
|
+
import "./chunk-X6N2XPTO.mjs";
|
|
6
|
+
|
|
7
|
+
// src/core/compliance-service.ts
|
|
8
|
+
function getComplianceStatus(options) {
|
|
9
|
+
return createBearerTransport(options)("/compliance/status");
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
ScopedRequestError,
|
|
13
|
+
getComplianceStatus
|
|
14
|
+
};
|
package/dist/constants.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var _chunkJCWJ6HW7cjs = require('./chunk-JCWJ6HW7.cjs');
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
|
|
@@ -30,9 +29,10 @@ var _chunkJCWJ6HW7cjs = require('./chunk-JCWJ6HW7.cjs');
|
|
|
30
29
|
|
|
31
30
|
|
|
32
31
|
|
|
32
|
+
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkPYOC6K24cjs = require('./chunk-PYOC6K24.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
@@ -65,4 +65,4 @@ var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
exports.HYPERCORE_CHAIN_ID = _chunkOY5N3E6Lcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_SPOT_CAIP2 = _chunkOY5N3E6Lcjs.HYPERCORE_SPOT_CAIP2; exports.HYPERCORE_USDC_ADDRESS = _chunkOY5N3E6Lcjs.HYPERCORE_USDC_ADDRESS; exports.MODAL_VERSION =
|
|
68
|
+
exports.HYPERCORE_CHAIN_ID = _chunkOY5N3E6Lcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_SPOT_CAIP2 = _chunkOY5N3E6Lcjs.HYPERCORE_SPOT_CAIP2; exports.HYPERCORE_USDC_ADDRESS = _chunkOY5N3E6Lcjs.HYPERCORE_USDC_ADDRESS; exports.MODAL_VERSION = _chunkPYOC6K24cjs.MODAL_VERSION; exports.NATIVE_TOKEN_ADDRESS = _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS; exports.SOLANA_TOKENS = _chunkOY5N3E6Lcjs.SOLANA_TOKENS; exports.SUPPORTED_CHAIN_IDS = _chunkOY5N3E6Lcjs.SUPPORTED_CHAIN_IDS; exports.chainRegistry = _chunkOY5N3E6Lcjs.chainRegistry; exports.findChainIdForToken = _chunkOY5N3E6Lcjs.findChainIdForToken; exports.getChainBadge = _chunkOY5N3E6Lcjs.getChainBadge; exports.getChainIcon = _chunkOY5N3E6Lcjs.getChainIcon; exports.getChainId = _chunkOY5N3E6Lcjs.getChainId; exports.getChainName = _chunkOY5N3E6Lcjs.getChainName; exports.getExplorerName = _chunkOY5N3E6Lcjs.getExplorerName; exports.getExplorerTxUrl = _chunkOY5N3E6Lcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkOY5N3E6Lcjs.getExplorerUrl; exports.getSolanaTokenByMint = _chunkOY5N3E6Lcjs.getSolanaTokenByMint; exports.getSolanaTokenBySymbol = _chunkOY5N3E6Lcjs.getSolanaTokenBySymbol; exports.getSupportedChainIds = _chunkOY5N3E6Lcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkOY5N3E6Lcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkOY5N3E6Lcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkOY5N3E6Lcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkOY5N3E6Lcjs.getTokenAddress; exports.getTokenDecimals = _chunkOY5N3E6Lcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkOY5N3E6Lcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkOY5N3E6Lcjs.getTokenIcon; exports.getTokenSymbol = _chunkOY5N3E6Lcjs.getTokenSymbol; exports.getUsdcAddress = _chunkOY5N3E6Lcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkOY5N3E6Lcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkOY5N3E6Lcjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunkOY5N3E6Lcjs.tokenIconUrl;
|
package/dist/constants.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, w as SupportedToke
|
|
|
2
2
|
export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS } from './caip-BMi-9t09.cjs';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
|
5
|
-
declare const MODAL_VERSION = "0.
|
|
5
|
+
declare const MODAL_VERSION = "0.19.0";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Lightweight Solana token registry — no `@solana/web3.js` dependency, so it
|
package/dist/constants.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, w as SupportedToke
|
|
|
2
2
|
export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS } from './caip-BMi-9t09.js';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
|
5
|
-
declare const MODAL_VERSION = "0.
|
|
5
|
+
declare const MODAL_VERSION = "0.19.0";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Lightweight Solana token registry — no `@solana/web3.js` dependency, so it
|
package/dist/constants.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MODAL_VERSION
|
|
3
|
-
} from "./chunk-XCBDJPBD.mjs";
|
|
4
1
|
import {
|
|
5
2
|
HYPERCORE_CHAIN_ID,
|
|
6
3
|
HYPERCORE_SPOT_CAIP2,
|
|
@@ -33,6 +30,9 @@ import {
|
|
|
33
30
|
isSupportedTokenAddressForChain,
|
|
34
31
|
tokenIconUrl
|
|
35
32
|
} from "./chunk-EAGMY3QE.mjs";
|
|
33
|
+
import {
|
|
34
|
+
MODAL_VERSION
|
|
35
|
+
} from "./chunk-X6N2XPTO.mjs";
|
|
36
36
|
export {
|
|
37
37
|
HYPERCORE_CHAIN_ID,
|
|
38
38
|
HYPERCORE_SPOT_CAIP2,
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-QGNJFDEO.cjs');
|
|
5
|
-
require('./chunk-JCWJ6HW7.cjs');
|
|
3
|
+
var _chunkOCWSMLOPcjs = require('./chunk-OCWSMLOP.cjs');
|
|
6
4
|
require('./chunk-LVCD6RHF.cjs');
|
|
5
|
+
require('./chunk-HMUGY66O.cjs');
|
|
7
6
|
require('./chunk-OY5N3E6L.cjs');
|
|
7
|
+
require('./chunk-PYOC6K24.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.DepositModal =
|
|
10
|
+
exports.DepositModal = _chunkOCWSMLOPcjs.DepositModal;
|
package/dist/deposit.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { O as DepositModalProps } from './types-
|
|
3
|
-
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as
|
|
2
|
+
import { O as DepositModalProps } from './types-BShYNpvO.cjs';
|
|
3
|
+
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as PaymentConfig, a1 as RecoveryErrorCode, a2 as RpcUrlMap, a3 as SignRecovery, a4 as SignRecoveryPayload } from './types-BShYNpvO.cjs';
|
|
4
4
|
import './caip-BMi-9t09.cjs';
|
|
5
5
|
import 'viem';
|
|
6
6
|
|
package/dist/deposit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { O as DepositModalProps } from './types-
|
|
3
|
-
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as
|
|
2
|
+
import { O as DepositModalProps } from './types-BOxa1DE-.js';
|
|
3
|
+
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as PaymentConfig, a1 as RecoveryErrorCode, a2 as RpcUrlMap, a3 as SignRecovery, a4 as SignRecoveryPayload } from './types-BOxa1DE-.js';
|
|
4
4
|
import './caip-BMi-9t09.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-QMGEK623.mjs";
|
|
5
|
-
import "./chunk-XCBDJPBD.mjs";
|
|
3
|
+
} from "./chunk-NITKDXHR.mjs";
|
|
6
4
|
import "./chunk-FTWKAJGN.mjs";
|
|
5
|
+
import "./chunk-5NWLS5BQ.mjs";
|
|
7
6
|
import "./chunk-EAGMY3QE.mjs";
|
|
7
|
+
import "./chunk-X6N2XPTO.mjs";
|
|
8
8
|
export {
|
|
9
9
|
DepositModal
|
|
10
10
|
};
|
package/dist/embed.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOCWSMLOPcjs = require('./chunk-OCWSMLOP.cjs');
|
|
4
|
+
require('./chunk-LVCD6RHF.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
var
|
|
8
|
+
var _chunkHMUGY66Ocjs = require('./chunk-HMUGY66O.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
var
|
|
12
|
-
require('./chunk-LVCD6RHF.cjs');
|
|
12
|
+
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkPYOC6K24cjs = require('./chunk-PYOC6K24.cjs');
|
|
17
17
|
|
|
18
18
|
// src/embed.tsx
|
|
19
19
|
var _react = require('react');
|
|
@@ -691,7 +691,7 @@ function assertResultShape(method, result) {
|
|
|
691
691
|
`${method}: ${detail}`
|
|
692
692
|
)
|
|
693
693
|
);
|
|
694
|
-
throw SUBMITTING_WALLET_METHODS.includes(method) ?
|
|
694
|
+
throw SUBMITTING_WALLET_METHODS.includes(method) ? _chunkHMUGY66Ocjs.markSubmissionUncertain.call(void 0, error) : error;
|
|
695
695
|
};
|
|
696
696
|
switch (method) {
|
|
697
697
|
case "eth_sendTransaction":
|
|
@@ -743,7 +743,7 @@ function createBridgedWalletSession(options) {
|
|
|
743
743
|
);
|
|
744
744
|
} catch (error) {
|
|
745
745
|
if (submitting && isBridgeRequestError(error) && error.code === -32603) {
|
|
746
|
-
throw
|
|
746
|
+
throw _chunkHMUGY66Ocjs.markSubmissionUncertain.call(void 0,
|
|
747
747
|
new BridgeRequestError(
|
|
748
748
|
bridgeError(
|
|
749
749
|
BridgeErrorCode.SUBMISSION_UNCERTAIN,
|
|
@@ -754,7 +754,7 @@ function createBridgedWalletSession(options) {
|
|
|
754
754
|
);
|
|
755
755
|
}
|
|
756
756
|
if (submitting && isBridgeCode(error, BridgeErrorCode.SUBMISSION_UNCERTAIN)) {
|
|
757
|
-
throw
|
|
757
|
+
throw _chunkHMUGY66Ocjs.markSubmissionUncertain.call(void 0, error);
|
|
758
758
|
}
|
|
759
759
|
throw error;
|
|
760
760
|
}
|
|
@@ -873,7 +873,7 @@ async function connectToHost(options) {
|
|
|
873
873
|
});
|
|
874
874
|
const params = {
|
|
875
875
|
protocol: PROTOCOL_VERSION,
|
|
876
|
-
modalVersion:
|
|
876
|
+
modalVersion: _chunkPYOC6K24cjs.MODAL_VERSION
|
|
877
877
|
};
|
|
878
878
|
let raw;
|
|
879
879
|
try {
|
|
@@ -959,12 +959,12 @@ async function requestHostTransfer(transport, params) {
|
|
|
959
959
|
);
|
|
960
960
|
} catch (error) {
|
|
961
961
|
if (error instanceof Error && isBridgeCode(error, BridgeErrorCode.SUBMISSION_UNCERTAIN)) {
|
|
962
|
-
throw
|
|
962
|
+
throw _chunkHMUGY66Ocjs.markSubmissionUncertain.call(void 0, error);
|
|
963
963
|
}
|
|
964
964
|
throw error;
|
|
965
965
|
}
|
|
966
966
|
if (!isTxHash(_optionalChain([result, 'optionalAccess', _25 => _25.txHash]))) {
|
|
967
|
-
throw
|
|
967
|
+
throw _chunkHMUGY66Ocjs.markSubmissionUncertain.call(void 0,
|
|
968
968
|
new Error(
|
|
969
969
|
"The app did not return a transaction hash. Check your activity before trying again."
|
|
970
970
|
)
|
|
@@ -1109,7 +1109,7 @@ var UNKNOWN_SCREEN = "unknown";
|
|
|
1109
1109
|
// src/embed.tsx
|
|
1110
1110
|
var _jsxruntime = require('react/jsx-runtime');
|
|
1111
1111
|
var WithdrawModal = _react.lazy.call(void 0,
|
|
1112
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModal-
|
|
1112
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModal-V42OK7L3.cjs"))).then((m) => ({ default: m.WithdrawModal }))
|
|
1113
1113
|
);
|
|
1114
1114
|
function missingField(config, keys) {
|
|
1115
1115
|
const missing = keys.find(
|
|
@@ -1338,11 +1338,11 @@ function DepositEmbed({ target, onFatal }) {
|
|
|
1338
1338
|
_optionalChain([back, 'optionalCall', _33 => _33()]);
|
|
1339
1339
|
return { handled: Boolean(back) };
|
|
1340
1340
|
});
|
|
1341
|
-
|
|
1341
|
+
_chunkPYOC6K24cjs.setEmbedHost.call(void 0, next.hello.host);
|
|
1342
1342
|
setSession(next);
|
|
1343
1343
|
setChannelScope(next.channelScope);
|
|
1344
1344
|
setConfig(sanitizeConfig(next.hello.config));
|
|
1345
|
-
void
|
|
1345
|
+
void _chunkHMUGY66Ocjs.primeRuntimeChains.call(void 0, next.hello.config.backendUrl).then((result) => {
|
|
1346
1346
|
chains = result;
|
|
1347
1347
|
});
|
|
1348
1348
|
} catch (error) {
|
|
@@ -1352,7 +1352,7 @@ function DepositEmbed({ target, onFatal }) {
|
|
|
1352
1352
|
return () => {
|
|
1353
1353
|
live = false;
|
|
1354
1354
|
_optionalChain([opened, 'optionalAccess', _36 => _36.close, 'call', _37 => _37()]);
|
|
1355
|
-
|
|
1355
|
+
_chunkPYOC6K24cjs.setEmbedHost.call(void 0, null);
|
|
1356
1356
|
};
|
|
1357
1357
|
}, [target]);
|
|
1358
1358
|
const handleUiState = _react.useCallback.call(void 0,
|
|
@@ -1491,7 +1491,7 @@ function DepositEmbed({ target, onFatal }) {
|
|
|
1491
1491
|
) });
|
|
1492
1492
|
}
|
|
1493
1493
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1494
|
-
|
|
1494
|
+
_chunkOCWSMLOPcjs.DepositModalInner,
|
|
1495
1495
|
{
|
|
1496
1496
|
...toModalProps(ready, canOpenExternally, walletWithheld),
|
|
1497
1497
|
openExternally: canOpenExternally ? openExternally : void 0,
|
package/dist/embed.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { d as TargetChain } from './caip-BMi-9t09.cjs';
|
|
3
|
-
import { $ as OutputTokenRule, W as FiatMethodsConfig, d as AssetMigrationsConfig, P as DepositModalTheme, Q as DepositModalUIConfig } from './types-
|
|
3
|
+
import { $ as OutputTokenRule, W as FiatMethodsConfig, d as AssetMigrationsConfig, P as DepositModalTheme, Q as DepositModalUIConfig } from './types-BShYNpvO.cjs';
|
|
4
4
|
import { WalletClient, PublicClient, Address } from 'viem';
|
|
5
5
|
import { Transaction, Connection } from '@solana/web3.js';
|
|
6
6
|
|
package/dist/embed.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { d as TargetChain } from './caip-BMi-9t09.js';
|
|
3
|
-
import { $ as OutputTokenRule, W as FiatMethodsConfig, d as AssetMigrationsConfig, P as DepositModalTheme, Q as DepositModalUIConfig } from './types-
|
|
3
|
+
import { $ as OutputTokenRule, W as FiatMethodsConfig, d as AssetMigrationsConfig, P as DepositModalTheme, Q as DepositModalUIConfig } from './types-BOxa1DE-.js';
|
|
4
4
|
import { WalletClient, PublicClient, Address } from 'viem';
|
|
5
5
|
import { Transaction, Connection } from '@solana/web3.js';
|
|
6
6
|
|
package/dist/embed.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NITKDXHR.mjs";
|
|
4
|
+
import "./chunk-FTWKAJGN.mjs";
|
|
4
5
|
import {
|
|
5
6
|
markSubmissionUncertain,
|
|
6
7
|
primeRuntimeChains
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
MODAL_VERSION,
|
|
10
|
-
setEmbedHost
|
|
11
|
-
} from "./chunk-XCBDJPBD.mjs";
|
|
12
|
-
import "./chunk-FTWKAJGN.mjs";
|
|
8
|
+
} from "./chunk-5NWLS5BQ.mjs";
|
|
13
9
|
import {
|
|
14
10
|
getChainName,
|
|
15
11
|
isTargetChain
|
|
16
12
|
} from "./chunk-EAGMY3QE.mjs";
|
|
13
|
+
import {
|
|
14
|
+
MODAL_VERSION,
|
|
15
|
+
setEmbedHost
|
|
16
|
+
} from "./chunk-X6N2XPTO.mjs";
|
|
17
17
|
|
|
18
18
|
// src/embed.tsx
|
|
19
19
|
import { Suspense, lazy, useCallback, useEffect, useRef, useState } from "react";
|
|
@@ -1109,7 +1109,7 @@ var UNKNOWN_SCREEN = "unknown";
|
|
|
1109
1109
|
// src/embed.tsx
|
|
1110
1110
|
import { jsx } from "react/jsx-runtime";
|
|
1111
1111
|
var WithdrawModal = lazy(
|
|
1112
|
-
() => import("./WithdrawModal-
|
|
1112
|
+
() => import("./WithdrawModal-DY6A55OA.mjs").then((m) => ({ default: m.WithdrawModal }))
|
|
1113
1113
|
);
|
|
1114
1114
|
function missingField(config, keys) {
|
|
1115
1115
|
const missing = keys.find(
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEG4H7OMCcjs = require('./chunk-EG4H7OMC.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-QGNJFDEO.cjs');
|
|
8
|
-
require('./chunk-JCWJ6HW7.cjs');
|
|
6
|
+
var _chunkOCWSMLOPcjs = require('./chunk-OCWSMLOP.cjs');
|
|
9
7
|
require('./chunk-LVCD6RHF.cjs');
|
|
8
|
+
require('./chunk-HMUGY66O.cjs');
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
|
|
@@ -39,6 +38,7 @@ require('./chunk-LVCD6RHF.cjs');
|
|
|
39
38
|
|
|
40
39
|
|
|
41
40
|
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
41
|
+
require('./chunk-PYOC6K24.cjs');
|
|
42
42
|
|
|
43
43
|
// src/core/reown-disconnect.ts
|
|
44
44
|
async function disconnectWallet() {
|
|
@@ -93,4 +93,4 @@ async function disconnectWallet() {
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
exports.DepositModal =
|
|
96
|
+
exports.DepositModal = _chunkOCWSMLOPcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkOY5N3E6Lcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_SPOT_CAIP2 = _chunkOY5N3E6Lcjs.HYPERCORE_SPOT_CAIP2; exports.HYPERCORE_USDC_ADDRESS = _chunkOY5N3E6Lcjs.HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = _chunkOY5N3E6Lcjs.HYPERCORE_USDT0_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS; exports.STELLAR_PUBNET_CAIP2 = _chunkOY5N3E6Lcjs.STELLAR_PUBNET_CAIP2; exports.SUPPORTED_CHAIN_IDS = _chunkOY5N3E6Lcjs.SUPPORTED_CHAIN_IDS; exports.TRON_MAINNET_CAIP2 = _chunkOY5N3E6Lcjs.TRON_MAINNET_CAIP2; exports.WithdrawModal = _chunkEG4H7OMCcjs.WithdrawModal; exports.chainRegistry = _chunkOY5N3E6Lcjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkOY5N3E6Lcjs.findChainIdForToken; exports.getChainBadge = _chunkOY5N3E6Lcjs.getChainBadge; exports.getChainIcon = _chunkOY5N3E6Lcjs.getChainIcon; exports.getChainId = _chunkOY5N3E6Lcjs.getChainId; exports.getChainName = _chunkOY5N3E6Lcjs.getChainName; exports.getExplorerName = _chunkOY5N3E6Lcjs.getExplorerName; exports.getExplorerTxUrl = _chunkOY5N3E6Lcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkOY5N3E6Lcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkOY5N3E6Lcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkOY5N3E6Lcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkOY5N3E6Lcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkOY5N3E6Lcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkOY5N3E6Lcjs.getTokenAddress; exports.getTokenDecimals = _chunkOY5N3E6Lcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkOY5N3E6Lcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkOY5N3E6Lcjs.getTokenIcon; exports.getTokenSymbol = _chunkOY5N3E6Lcjs.getTokenSymbol; exports.getUsdcAddress = _chunkOY5N3E6Lcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkOY5N3E6Lcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkOY5N3E6Lcjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunkOY5N3E6Lcjs.tokenIconUrl;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.cjs';
|
|
2
2
|
export { WithdrawModal } from './withdraw.cjs';
|
|
3
|
-
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, C as ChainId, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, N as DepositLifecycleEvent, O as DepositModalProps, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, _ as ModalAnalyticsEvent, $ as OutputTokenRule, a0 as
|
|
3
|
+
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, C as ChainId, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, N as DepositLifecycleEvent, O as DepositModalProps, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, _ as ModalAnalyticsEvent, $ as OutputTokenRule, a0 as PaymentConfig, a1 as RecoveryErrorCode, a2 as RpcUrlMap, a3 as SignRecovery, a4 as SignRecoveryPayload, a5 as WithdrawAnalyticsAbandonmentReason, a6 as WithdrawAnalyticsCloseSource, a7 as WithdrawAnalyticsEvent, a8 as WithdrawAnalyticsEventPayload, a9 as WithdrawAnalyticsFailureReason, aa as WithdrawAnalyticsSessionProperties, ab as WithdrawAnalyticsStep, ac as WithdrawAnalyticsUiOutcome, ad as WithdrawCompleteEventData, ae as WithdrawFailedEventData, af as WithdrawLifecycleEvent, ag as WithdrawModalProps, ah as WithdrawSubmittedEventData, ai as WithdrawTransferRequest } from './types-BShYNpvO.cjs';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.cjs';
|
|
5
5
|
export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, c as chainRegistry, f as findChainIdForToken, g as getChainBadge, a as getChainIcon, b as getChainId, d as getChainName, e as getExplorerName, h as getExplorerTxUrl, i as getExplorerUrl, j as getSupportedChainIds, k as getSupportedTargetTokens, l as getSupportedTokenSymbolsForChain, m as getTargetTokenSymbolsForChain, n as getTokenAddress, o as getTokenDecimals, p as getTokenDecimalsByAddress, q as getTokenIcon, r as getTokenSymbol, s as getUsdcAddress, t as getUsdcDecimals, u as isSupportedTokenAddressForChain, v as tokenIconUrl } from './constants-BT4ctuHo.cjs';
|
|
6
6
|
export { D as DisplayChainId, H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS, c as HYPERCORE_USDT0_ADDRESS, S as STELLAR_PUBNET_CAIP2, T as TRON_MAINNET_CAIP2, d as TargetChain } from './caip-BMi-9t09.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.js';
|
|
2
2
|
export { WithdrawModal } from './withdraw.js';
|
|
3
|
-
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, C as ChainId, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, N as DepositLifecycleEvent, O as DepositModalProps, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, _ as ModalAnalyticsEvent, $ as OutputTokenRule, a0 as
|
|
3
|
+
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, C as ChainId, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, N as DepositLifecycleEvent, O as DepositModalProps, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, _ as ModalAnalyticsEvent, $ as OutputTokenRule, a0 as PaymentConfig, a1 as RecoveryErrorCode, a2 as RpcUrlMap, a3 as SignRecovery, a4 as SignRecoveryPayload, a5 as WithdrawAnalyticsAbandonmentReason, a6 as WithdrawAnalyticsCloseSource, a7 as WithdrawAnalyticsEvent, a8 as WithdrawAnalyticsEventPayload, a9 as WithdrawAnalyticsFailureReason, aa as WithdrawAnalyticsSessionProperties, ab as WithdrawAnalyticsStep, ac as WithdrawAnalyticsUiOutcome, ad as WithdrawCompleteEventData, ae as WithdrawFailedEventData, af as WithdrawLifecycleEvent, ag as WithdrawModalProps, ah as WithdrawSubmittedEventData, ai as WithdrawTransferRequest } from './types-BOxa1DE-.js';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.js';
|
|
5
5
|
export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, c as chainRegistry, f as findChainIdForToken, g as getChainBadge, a as getChainIcon, b as getChainId, d as getChainName, e as getExplorerName, h as getExplorerTxUrl, i as getExplorerUrl, j as getSupportedChainIds, k as getSupportedTargetTokens, l as getSupportedTokenSymbolsForChain, m as getTargetTokenSymbolsForChain, n as getTokenAddress, o as getTokenDecimals, p as getTokenDecimalsByAddress, q as getTokenIcon, r as getTokenSymbol, s as getUsdcAddress, t as getUsdcDecimals, u as isSupportedTokenAddressForChain, v as tokenIconUrl } from './constants-D21ZdNOP.js';
|
|
6
6
|
export { D as DisplayChainId, H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS, c as HYPERCORE_USDT0_ADDRESS, S as STELLAR_PUBNET_CAIP2, T as TRON_MAINNET_CAIP2, d as TargetChain } from './caip-BMi-9t09.js';
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BIL4ENC3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DepositModal
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-QMGEK623.mjs";
|
|
8
|
-
import "./chunk-XCBDJPBD.mjs";
|
|
6
|
+
} from "./chunk-NITKDXHR.mjs";
|
|
9
7
|
import "./chunk-FTWKAJGN.mjs";
|
|
8
|
+
import "./chunk-5NWLS5BQ.mjs";
|
|
10
9
|
import {
|
|
11
10
|
HYPERCORE_CHAIN_ID,
|
|
12
11
|
HYPERCORE_SPOT_CAIP2,
|
|
@@ -39,6 +38,7 @@ import {
|
|
|
39
38
|
isSupportedTokenAddressForChain,
|
|
40
39
|
tokenIconUrl
|
|
41
40
|
} from "./chunk-EAGMY3QE.mjs";
|
|
41
|
+
import "./chunk-X6N2XPTO.mjs";
|
|
42
42
|
|
|
43
43
|
// src/core/reown-disconnect.ts
|
|
44
44
|
async function disconnectWallet() {
|
package/dist/offramp.cjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkADEWTBSNcjs = require('./chunk-ADEWTBSN.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkISLVD5HQcjs = require('./chunk-ISLVD5HQ.cjs');
|
|
9
|
+
require('./chunk-PYOC6K24.cjs');
|
|
10
|
+
|
|
11
|
+
// src/core/offramp-service.ts
|
|
12
|
+
function createOfframpService(options) {
|
|
13
|
+
const request = _chunkISLVD5HQcjs.createBearerTransport.call(void 0, options);
|
|
14
|
+
return {
|
|
15
|
+
createSession: (body) => request("/offramp/noah/sessions", body),
|
|
16
|
+
getSession: (id) => request(`/offramp/noah/sessions/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}`),
|
|
17
|
+
getOptions: (intent) => request(`/offramp/noah/options?${_chunkADEWTBSNcjs.rampQuery.call(void 0, intent)}`),
|
|
18
|
+
listPayments: (page = {}) => request(`/offramp/noah/payments?${_chunkADEWTBSNcjs.rampQuery.call(void 0, page)}`),
|
|
19
|
+
getPayment: (id) => request(`/offramp/noah/payments/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}`)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.ScopedRequestError = _chunkISLVD5HQcjs.ScopedRequestError; exports.createOfframpService = createOfframpService;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { C as CustomerSessionOptions } from './bearer-transport-CVHNBgoV.cjs';
|
|
2
|
+
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-CVHNBgoV.cjs';
|
|
3
|
+
import { B as BankIntent, R as RampPayment, P as PaymentLegStatus, a as PaymentReturnStatus, b as RampSession, c as RampPage, d as RampOption, e as RampPagination } from './ramp-types-C6aUz4SZ.cjs';
|
|
4
|
+
export { H as HostedNextAction, f as RampCurrency } from './ramp-types-C6aUz4SZ.cjs';
|
|
5
|
+
|
|
6
|
+
interface OfframpSessionRequest extends BankIntent {
|
|
7
|
+
purpose: "beneficiary_collection";
|
|
8
|
+
}
|
|
9
|
+
interface OfframpOptionsRequest extends BankIntent {
|
|
10
|
+
/** Decimal fiat major units the recipient receives, not crypto input. */
|
|
11
|
+
amount: string;
|
|
12
|
+
}
|
|
13
|
+
interface OfframpPayment extends RampPayment {
|
|
14
|
+
funding: PaymentLegStatus;
|
|
15
|
+
payout: PaymentLegStatus;
|
|
16
|
+
reversal: PaymentReturnStatus;
|
|
17
|
+
cryptoReturn: PaymentReturnStatus;
|
|
18
|
+
}
|
|
19
|
+
/** No requests until an offramp method is called. */
|
|
20
|
+
declare function createOfframpService(options: CustomerSessionOptions): {
|
|
21
|
+
createSession: (body: OfframpSessionRequest) => Promise<RampSession>;
|
|
22
|
+
getSession: (id: string) => Promise<RampSession>;
|
|
23
|
+
getOptions: (intent: OfframpOptionsRequest) => Promise<RampPage<RampOption>>;
|
|
24
|
+
listPayments: (page?: RampPagination) => Promise<RampPage<OfframpPayment>>;
|
|
25
|
+
getPayment: (id: string) => Promise<OfframpPayment>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { CustomerSessionOptions, type OfframpOptionsRequest, type OfframpPayment, type OfframpSessionRequest, PaymentLegStatus, PaymentReturnStatus, RampOption, RampPage, RampPagination, RampSession, createOfframpService };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { C as CustomerSessionOptions } from './bearer-transport-CVHNBgoV.js';
|
|
2
|
+
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-CVHNBgoV.js';
|
|
3
|
+
import { B as BankIntent, R as RampPayment, P as PaymentLegStatus, a as PaymentReturnStatus, b as RampSession, c as RampPage, d as RampOption, e as RampPagination } from './ramp-types-C6aUz4SZ.js';
|
|
4
|
+
export { H as HostedNextAction, f as RampCurrency } from './ramp-types-C6aUz4SZ.js';
|
|
5
|
+
|
|
6
|
+
interface OfframpSessionRequest extends BankIntent {
|
|
7
|
+
purpose: "beneficiary_collection";
|
|
8
|
+
}
|
|
9
|
+
interface OfframpOptionsRequest extends BankIntent {
|
|
10
|
+
/** Decimal fiat major units the recipient receives, not crypto input. */
|
|
11
|
+
amount: string;
|
|
12
|
+
}
|
|
13
|
+
interface OfframpPayment extends RampPayment {
|
|
14
|
+
funding: PaymentLegStatus;
|
|
15
|
+
payout: PaymentLegStatus;
|
|
16
|
+
reversal: PaymentReturnStatus;
|
|
17
|
+
cryptoReturn: PaymentReturnStatus;
|
|
18
|
+
}
|
|
19
|
+
/** No requests until an offramp method is called. */
|
|
20
|
+
declare function createOfframpService(options: CustomerSessionOptions): {
|
|
21
|
+
createSession: (body: OfframpSessionRequest) => Promise<RampSession>;
|
|
22
|
+
getSession: (id: string) => Promise<RampSession>;
|
|
23
|
+
getOptions: (intent: OfframpOptionsRequest) => Promise<RampPage<RampOption>>;
|
|
24
|
+
listPayments: (page?: RampPagination) => Promise<RampPage<OfframpPayment>>;
|
|
25
|
+
getPayment: (id: string) => Promise<OfframpPayment>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { CustomerSessionOptions, type OfframpOptionsRequest, type OfframpPayment, type OfframpSessionRequest, PaymentLegStatus, PaymentReturnStatus, RampOption, RampPage, RampPagination, RampSession, createOfframpService };
|