@rhinestone/deposit-modal 0.19.0 → 0.20.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 +151 -61
- package/dist/BankOnrampStep-JG32OCM2.mjs +435 -0
- package/dist/BankOnrampStep-NPGXAA7U.cjs +435 -0
- package/dist/{DepositModalReown-XBNY6QCI.mjs → DepositModalReown-3FGTPER6.mjs} +6 -5
- package/dist/{DepositModalReown-UITYXJ6W.cjs → DepositModalReown-ALVWADG7.cjs} +21 -20
- package/dist/WithdrawModal-5YWFJSYY.cjs +12 -0
- package/dist/WithdrawModal-LL4Z5WZP.mjs +12 -0
- package/dist/{bearer-transport-CVHNBgoV.d.cts → bearer-transport-DZyeDG64.d.cts} +5 -1
- package/dist/{bearer-transport-CVHNBgoV.d.ts → bearer-transport-DZyeDG64.d.ts} +5 -1
- package/dist/{caip-BMi-9t09.d.cts → caip-nwFFL46o.d.cts} +2 -2
- package/dist/{caip-BMi-9t09.d.ts → caip-nwFFL46o.d.ts} +2 -2
- package/dist/{chunk-NITKDXHR.mjs → chunk-247GJH57.mjs} +480 -272
- package/dist/{chunk-FTWKAJGN.mjs → chunk-2FOPO4N5.mjs} +1 -1
- package/dist/{chunk-5NWLS5BQ.mjs → chunk-32ERBFMO.mjs} +1432 -961
- package/dist/chunk-5QUWEFD4.mjs +19 -0
- package/dist/chunk-6CTJFR3T.mjs +113 -0
- package/dist/{chunk-X6N2XPTO.mjs → chunk-B2LZQIGB.mjs} +1 -1
- package/dist/{chunk-EG4H7OMC.cjs → chunk-BTEG2VNZ.cjs} +171 -130
- package/dist/{chunk-HMUGY66O.cjs → chunk-CXRH5MKO.cjs} +1502 -1031
- package/dist/chunk-E7IMWVMN.mjs +346 -0
- package/dist/{chunk-PYOC6K24.cjs → chunk-EKFXUF5A.cjs} +1 -1
- package/dist/chunk-FKJ6EJHH.cjs +346 -0
- package/dist/chunk-FMUSY563.cjs +19 -0
- package/dist/{chunk-LVCD6RHF.cjs → chunk-FVJKUTHF.cjs} +2 -2
- package/dist/chunk-G264OM23.cjs +224 -0
- package/dist/{chunk-BIL4ENC3.mjs → chunk-HP7S7AD6.mjs} +73 -32
- package/dist/{chunk-ISLVD5HQ.cjs → chunk-OPT5EW6L.cjs} +10 -5
- package/dist/chunk-PYRXOP2Y.cjs +113 -0
- package/dist/{chunk-ZGHVJ2XM.mjs → chunk-XBJCZYBX.mjs} +8 -3
- package/dist/chunk-YY4ZOAH5.mjs +224 -0
- package/dist/{chunk-OCWSMLOP.cjs → chunk-Z4RBTNKX.cjs} +980 -772
- package/dist/compliance.cjs +4 -7
- package/dist/compliance.d.cts +26 -3
- package/dist/compliance.d.ts +26 -3
- package/dist/compliance.mjs +6 -9
- package/dist/constants-BQDxVNgr.d.cts +29 -0
- package/dist/constants-DjGQW5N5.d.ts +29 -0
- package/dist/constants.cjs +3 -37
- package/dist/constants.d.cts +4 -20
- package/dist/constants.d.ts +4 -20
- package/dist/constants.mjs +4 -38
- package/dist/deposit.cjs +7 -6
- package/dist/deposit.d.cts +5 -3
- package/dist/deposit.d.ts +5 -3
- package/dist/deposit.mjs +6 -5
- package/dist/embed.cjs +21 -20
- package/dist/embed.d.cts +3 -2
- package/dist/embed.d.ts +3 -2
- package/dist/embed.mjs +7 -6
- package/dist/index.cjs +8 -35
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.mjs +9 -36
- package/dist/onramp.cjs +4 -33
- package/dist/onramp.d.cts +51 -33
- package/dist/onramp.d.ts +51 -33
- package/dist/onramp.mjs +5 -34
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +2 -2
- package/dist/ramp-types-HYWd7CW0.d.cts +108 -0
- package/dist/ramp-types-HYWd7CW0.d.ts +108 -0
- package/dist/styles.css +255 -0
- package/dist/{types-BShYNpvO.d.cts → types-BxSrazbq.d.ts} +20 -2
- package/dist/{types-BOxa1DE-.d.ts → types-CixUBhrM.d.cts} +20 -2
- package/dist/withdraw.cjs +6 -5
- package/dist/withdraw.d.cts +4 -3
- package/dist/withdraw.d.ts +4 -3
- package/dist/withdraw.mjs +5 -4
- package/package.json +9 -17
- package/dist/WithdrawModal-DY6A55OA.mjs +0 -11
- package/dist/WithdrawModal-V42OK7L3.cjs +0 -11
- package/dist/chunk-ADEWTBSN.cjs +0 -19
- package/dist/chunk-EAGMY3QE.mjs +0 -962
- package/dist/chunk-OY5N3E6L.cjs +0 -962
- package/dist/chunk-PP4QE32S.mjs +0 -19
- package/dist/constants-BT4ctuHo.d.cts +0 -64
- package/dist/constants-D21ZdNOP.d.ts +0 -64
- package/dist/offramp.cjs +0 -25
- package/dist/offramp.d.cts +0 -28
- package/dist/offramp.d.ts +0 -28
- package/dist/offramp.mjs +0 -25
- package/dist/ramp-types-C6aUz4SZ.d.cts +0 -43
- package/dist/ramp-types-C6aUz4SZ.d.ts +0 -43
package/dist/embed.mjs
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-247GJH57.mjs";
|
|
4
|
+
import "./chunk-2FOPO4N5.mjs";
|
|
5
5
|
import {
|
|
6
6
|
markSubmissionUncertain,
|
|
7
7
|
primeRuntimeChains
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-32ERBFMO.mjs";
|
|
9
|
+
import "./chunk-YY4ZOAH5.mjs";
|
|
9
10
|
import {
|
|
10
11
|
getChainName,
|
|
11
12
|
isTargetChain
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-E7IMWVMN.mjs";
|
|
13
14
|
import {
|
|
14
15
|
MODAL_VERSION,
|
|
15
16
|
setEmbedHost
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-B2LZQIGB.mjs";
|
|
17
18
|
|
|
18
19
|
// src/embed.tsx
|
|
19
20
|
import { Suspense, lazy, useCallback, useEffect, useRef, useState } from "react";
|
|
@@ -1109,7 +1110,7 @@ var UNKNOWN_SCREEN = "unknown";
|
|
|
1109
1110
|
// src/embed.tsx
|
|
1110
1111
|
import { jsx } from "react/jsx-runtime";
|
|
1111
1112
|
var WithdrawModal = lazy(
|
|
1112
|
-
() => import("./WithdrawModal-
|
|
1113
|
+
() => import("./WithdrawModal-LL4Z5WZP.mjs").then((m) => ({ default: m.WithdrawModal }))
|
|
1113
1114
|
);
|
|
1114
1115
|
function missingField(config, keys) {
|
|
1115
1116
|
const missing = keys.find(
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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 _chunkBTEG2VNZcjs = require('./chunk-BTEG2VNZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
6
|
+
var _chunkZ4RBTNKXcjs = require('./chunk-Z4RBTNKX.cjs');
|
|
7
|
+
require('./chunk-FVJKUTHF.cjs');
|
|
8
|
+
require('./chunk-CXRH5MKO.cjs');
|
|
9
|
+
require('./chunk-G264OM23.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
@@ -23,22 +24,8 @@ require('./chunk-HMUGY66O.cjs');
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
41
|
-
require('./chunk-PYOC6K24.cjs');
|
|
27
|
+
var _chunkFKJ6EJHHcjs = require('./chunk-FKJ6EJHH.cjs');
|
|
28
|
+
require('./chunk-EKFXUF5A.cjs');
|
|
42
29
|
|
|
43
30
|
// src/core/reown-disconnect.ts
|
|
44
31
|
async function disconnectWallet() {
|
|
@@ -79,18 +66,4 @@ async function disconnectWallet() {
|
|
|
79
66
|
|
|
80
67
|
|
|
81
68
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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;
|
|
69
|
+
exports.DepositModal = _chunkZ4RBTNKXcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkFKJ6EJHHcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_SPOT_CAIP2 = _chunkFKJ6EJHHcjs.HYPERCORE_SPOT_CAIP2; exports.HYPERCORE_USDC_ADDRESS = _chunkFKJ6EJHHcjs.HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = _chunkFKJ6EJHHcjs.HYPERCORE_USDT0_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkFKJ6EJHHcjs.NATIVE_TOKEN_ADDRESS; exports.STELLAR_PUBNET_CAIP2 = _chunkFKJ6EJHHcjs.STELLAR_PUBNET_CAIP2; exports.SUPPORTED_CHAIN_IDS = _chunkFKJ6EJHHcjs.SUPPORTED_CHAIN_IDS; exports.TRON_MAINNET_CAIP2 = _chunkFKJ6EJHHcjs.TRON_MAINNET_CAIP2; exports.WithdrawModal = _chunkBTEG2VNZcjs.WithdrawModal; exports.disconnectWallet = disconnectWallet; exports.getChainBadge = _chunkFKJ6EJHHcjs.getChainBadge; exports.getChainIcon = _chunkFKJ6EJHHcjs.getChainIcon; exports.getChainId = _chunkFKJ6EJHHcjs.getChainId; exports.getChainName = _chunkFKJ6EJHHcjs.getChainName; exports.getExplorerName = _chunkFKJ6EJHHcjs.getExplorerName; exports.getExplorerTxUrl = _chunkFKJ6EJHHcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkFKJ6EJHHcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkFKJ6EJHHcjs.getSupportedChainIds;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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,
|
|
3
|
+
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, B as BankOnrampConfig, 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, E as DepositAnalyticsStep, F as DepositAnalyticsTransferStep, G as DepositAnalyticsUiOutcome, H as DepositAnalyticsWalletStep, I as DepositAssetMigrationMethodIdentifiers, J as DepositCompleteEventData, K as DepositExchangeConnectMethodIdentifiers, L as DepositFailedEventData, M as DepositFiatOnrampMethodIdentifiers, N as DepositFundingMethod, O as DepositLifecycleEvent, P as DepositModalProps, Q as DepositModalTheme, R as DepositModalUIConfig, S as DepositSubmittedEventData, T as DepositTransferHandoffIdentifiers, U as DepositWalletIntegration, V as DepositWalletMethodIdentifiers, W as ErrorEventData, X as FiatMethodsConfig, Y as HistoryAnalyticsBadge, Z as HistoryClaimEntrySource, _ as HistoryStatus, $ as ModalAnalyticsEvent, a0 as OutputTokenRule, a1 as PaymentConfig, a2 as RecoveryErrorCode, a3 as RpcUrlMap, a4 as SignRecovery, a5 as SignRecoveryPayload, a6 as WithdrawAnalyticsAbandonmentReason, a7 as WithdrawAnalyticsCloseSource, a8 as WithdrawAnalyticsEvent, a9 as WithdrawAnalyticsEventPayload, aa as WithdrawAnalyticsFailureReason, ab as WithdrawAnalyticsSessionProperties, ac as WithdrawAnalyticsStep, ad as WithdrawAnalyticsUiOutcome, ae as WithdrawCompleteEventData, af as WithdrawFailedEventData, ag as WithdrawLifecycleEvent, ah as WithdrawModalProps, ai as WithdrawSubmittedEventData, aj as WithdrawTransferRequest } from './types-CixUBhrM.cjs';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.cjs';
|
|
5
|
-
export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS,
|
|
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-
|
|
5
|
+
export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, g as getChainBadge, a as getChainIcon, b as getChainId, c as getChainName, d as getExplorerName, e as getExplorerTxUrl, f as getExplorerUrl, h as getSupportedChainIds } from './constants-BQDxVNgr.cjs';
|
|
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-nwFFL46o.cjs';
|
|
7
|
+
export { a as CustomerSession } from './bearer-transport-DZyeDG64.cjs';
|
|
8
|
+
export { R as RampCurrency } from './ramp-types-HYWd7CW0.cjs';
|
|
7
9
|
import 'react';
|
|
8
10
|
import 'viem';
|
|
9
11
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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,
|
|
3
|
+
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, B as BankOnrampConfig, 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, E as DepositAnalyticsStep, F as DepositAnalyticsTransferStep, G as DepositAnalyticsUiOutcome, H as DepositAnalyticsWalletStep, I as DepositAssetMigrationMethodIdentifiers, J as DepositCompleteEventData, K as DepositExchangeConnectMethodIdentifiers, L as DepositFailedEventData, M as DepositFiatOnrampMethodIdentifiers, N as DepositFundingMethod, O as DepositLifecycleEvent, P as DepositModalProps, Q as DepositModalTheme, R as DepositModalUIConfig, S as DepositSubmittedEventData, T as DepositTransferHandoffIdentifiers, U as DepositWalletIntegration, V as DepositWalletMethodIdentifiers, W as ErrorEventData, X as FiatMethodsConfig, Y as HistoryAnalyticsBadge, Z as HistoryClaimEntrySource, _ as HistoryStatus, $ as ModalAnalyticsEvent, a0 as OutputTokenRule, a1 as PaymentConfig, a2 as RecoveryErrorCode, a3 as RpcUrlMap, a4 as SignRecovery, a5 as SignRecoveryPayload, a6 as WithdrawAnalyticsAbandonmentReason, a7 as WithdrawAnalyticsCloseSource, a8 as WithdrawAnalyticsEvent, a9 as WithdrawAnalyticsEventPayload, aa as WithdrawAnalyticsFailureReason, ab as WithdrawAnalyticsSessionProperties, ac as WithdrawAnalyticsStep, ad as WithdrawAnalyticsUiOutcome, ae as WithdrawCompleteEventData, af as WithdrawFailedEventData, ag as WithdrawLifecycleEvent, ah as WithdrawModalProps, ai as WithdrawSubmittedEventData, aj as WithdrawTransferRequest } from './types-BxSrazbq.js';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.js';
|
|
5
|
-
export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS,
|
|
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-
|
|
5
|
+
export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, g as getChainBadge, a as getChainIcon, b as getChainId, c as getChainName, d as getExplorerName, e as getExplorerTxUrl, f as getExplorerUrl, h as getSupportedChainIds } from './constants-DjGQW5N5.js';
|
|
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-nwFFL46o.js';
|
|
7
|
+
export { a as CustomerSession } from './bearer-transport-DZyeDG64.js';
|
|
8
|
+
export { R as RampCurrency } from './ramp-types-HYWd7CW0.js';
|
|
7
9
|
import 'react';
|
|
8
10
|
import 'viem';
|
|
9
11
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HP7S7AD6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DepositModal
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-247GJH57.mjs";
|
|
7
|
+
import "./chunk-2FOPO4N5.mjs";
|
|
8
|
+
import "./chunk-32ERBFMO.mjs";
|
|
9
|
+
import "./chunk-YY4ZOAH5.mjs";
|
|
9
10
|
import {
|
|
10
11
|
HYPERCORE_CHAIN_ID,
|
|
11
12
|
HYPERCORE_SPOT_CAIP2,
|
|
@@ -15,8 +16,6 @@ import {
|
|
|
15
16
|
STELLAR_PUBNET_CAIP2,
|
|
16
17
|
SUPPORTED_CHAIN_IDS,
|
|
17
18
|
TRON_MAINNET_CAIP2,
|
|
18
|
-
chainRegistry,
|
|
19
|
-
findChainIdForToken,
|
|
20
19
|
getChainBadge,
|
|
21
20
|
getChainIcon,
|
|
22
21
|
getChainId,
|
|
@@ -24,21 +23,9 @@ import {
|
|
|
24
23
|
getExplorerName,
|
|
25
24
|
getExplorerTxUrl,
|
|
26
25
|
getExplorerUrl,
|
|
27
|
-
getSupportedChainIds
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
getTargetTokenSymbolsForChain,
|
|
31
|
-
getTokenAddress,
|
|
32
|
-
getTokenDecimals,
|
|
33
|
-
getTokenDecimalsByAddress,
|
|
34
|
-
getTokenIcon,
|
|
35
|
-
getTokenSymbol,
|
|
36
|
-
getUsdcAddress,
|
|
37
|
-
getUsdcDecimals,
|
|
38
|
-
isSupportedTokenAddressForChain,
|
|
39
|
-
tokenIconUrl
|
|
40
|
-
} from "./chunk-EAGMY3QE.mjs";
|
|
41
|
-
import "./chunk-X6N2XPTO.mjs";
|
|
26
|
+
getSupportedChainIds
|
|
27
|
+
} from "./chunk-E7IMWVMN.mjs";
|
|
28
|
+
import "./chunk-B2LZQIGB.mjs";
|
|
42
29
|
|
|
43
30
|
// src/core/reown-disconnect.ts
|
|
44
31
|
async function disconnectWallet() {
|
|
@@ -70,9 +57,7 @@ export {
|
|
|
70
57
|
SUPPORTED_CHAIN_IDS,
|
|
71
58
|
TRON_MAINNET_CAIP2,
|
|
72
59
|
WithdrawModal,
|
|
73
|
-
chainRegistry,
|
|
74
60
|
disconnectWallet,
|
|
75
|
-
findChainIdForToken,
|
|
76
61
|
getChainBadge,
|
|
77
62
|
getChainIcon,
|
|
78
63
|
getChainId,
|
|
@@ -80,17 +65,5 @@ export {
|
|
|
80
65
|
getExplorerName,
|
|
81
66
|
getExplorerTxUrl,
|
|
82
67
|
getExplorerUrl,
|
|
83
|
-
getSupportedChainIds
|
|
84
|
-
getSupportedTargetTokens,
|
|
85
|
-
getSupportedTokenSymbolsForChain,
|
|
86
|
-
getTargetTokenSymbolsForChain,
|
|
87
|
-
getTokenAddress,
|
|
88
|
-
getTokenDecimals,
|
|
89
|
-
getTokenDecimalsByAddress,
|
|
90
|
-
getTokenIcon,
|
|
91
|
-
getTokenSymbol,
|
|
92
|
-
getUsdcAddress,
|
|
93
|
-
getUsdcDecimals,
|
|
94
|
-
isSupportedTokenAddressForChain,
|
|
95
|
-
tokenIconUrl
|
|
68
|
+
getSupportedChainIds
|
|
96
69
|
};
|
package/dist/onramp.cjs
CHANGED
|
@@ -1,40 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkPYRXOP2Ycjs = require('./chunk-PYRXOP2Y.cjs');
|
|
3
4
|
|
|
4
|
-
var _chunkADEWTBSNcjs = require('./chunk-ADEWTBSN.cjs');
|
|
5
5
|
|
|
6
|
+
var _chunkOPT5EW6Lcjs = require('./chunk-OPT5EW6L.cjs');
|
|
7
|
+
require('./chunk-EKFXUF5A.cjs');
|
|
6
8
|
|
|
7
9
|
|
|
8
|
-
var _chunkISLVD5HQcjs = require('./chunk-ISLVD5HQ.cjs');
|
|
9
|
-
require('./chunk-PYOC6K24.cjs');
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
function createOnrampService(options) {
|
|
13
|
-
const request = _chunkISLVD5HQcjs.createBearerTransport.call(void 0, options);
|
|
14
|
-
return {
|
|
15
|
-
createSetup: (body) => request("/onramp/noah/setup", body),
|
|
16
|
-
getSetup: (id) => request(`/onramp/noah/setup/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}`),
|
|
17
|
-
getOptions: (intent) => request(`/onramp/noah/options?${_chunkADEWTBSNcjs.rampQuery.call(void 0, intent)}`),
|
|
18
|
-
listAccounts: (page = {}) => request(
|
|
19
|
-
`/onramp/noah/accounts?${_chunkADEWTBSNcjs.rampQuery.call(void 0, page)}`
|
|
20
|
-
),
|
|
21
|
-
getAccount: (id) => request(`/onramp/noah/accounts/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}`),
|
|
22
|
-
/**
|
|
23
|
-
* Mint a hosted address for the customer to read their account number or
|
|
24
|
-
* international account number from. A POST because minting one is a
|
|
25
|
-
* provider write; the coordinates themselves never cross this API.
|
|
26
|
-
*/
|
|
27
|
-
getAccountDetails: (id) => request(
|
|
28
|
-
`/onramp/noah/accounts/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}/details`,
|
|
29
|
-
{}
|
|
30
|
-
),
|
|
31
|
-
listPayments: (page = {}) => request(
|
|
32
|
-
`/onramp/noah/payments?${_chunkADEWTBSNcjs.rampQuery.call(void 0, page)}`
|
|
33
|
-
),
|
|
34
|
-
getPayment: (id) => request(`/onramp/noah/payments/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}`)
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
exports.ScopedRequestError = _chunkISLVD5HQcjs.ScopedRequestError; exports.createOnrampService = createOnrampService;
|
|
11
|
+
exports.ScopedRequestError = _chunkOPT5EW6Lcjs.ScopedRequestError; exports.createOnrampService = _chunkPYRXOP2Ycjs.createOnrampService;
|
package/dist/onramp.d.cts
CHANGED
|
@@ -1,55 +1,73 @@
|
|
|
1
|
-
import { C as CustomerSessionOptions } from './bearer-transport-
|
|
2
|
-
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-
|
|
3
|
-
import {
|
|
1
|
+
import { C as CustomerSessionOptions } from './bearer-transport-DZyeDG64.cjs';
|
|
2
|
+
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-DZyeDG64.cjs';
|
|
3
|
+
import { R as RampCurrency, B as BankIntent, a as RampOption, b as RampPagination, c as RampPage, O as OnrampOrder } from './ramp-types-HYWd7CW0.cjs';
|
|
4
|
+
export { C as ConversionStage, D as DeliveryStage, F as FiatFigure, d as ReceiptStage, e as ReturnStage } from './ramp-types-HYWd7CW0.cjs';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
type OnrampAccountRequest = BankIntent;
|
|
7
|
+
interface OnrampOptionsRequest {
|
|
8
|
+
/** One option for this currency; both without. */
|
|
9
|
+
currency?: RampCurrency;
|
|
7
10
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
interface OnrampPayment extends RampPayment {
|
|
13
|
-
bankReceipt: PaymentLegStatus;
|
|
14
|
-
conversion: PaymentLegStatus;
|
|
15
|
-
cryptoDelivery: PaymentLegStatus;
|
|
16
|
-
refund: PaymentReturnStatus;
|
|
17
|
-
adjustment: PaymentReturnStatus;
|
|
11
|
+
/** `GET /onramp/options?provider=noah`. */
|
|
12
|
+
interface OnrampOptions {
|
|
13
|
+
provider: "noah";
|
|
14
|
+
options: RampOption[];
|
|
18
15
|
}
|
|
19
16
|
interface OnrampAccount {
|
|
20
17
|
id: string;
|
|
21
18
|
currency: RampCurrency;
|
|
22
|
-
paymentMethod: "bank_transfer";
|
|
23
19
|
status: "pending" | "active" | "disabled";
|
|
24
20
|
}
|
|
25
21
|
/**
|
|
26
|
-
* The result of one account setup
|
|
27
|
-
* status and no expiry
|
|
28
|
-
* it failed. There is nothing to poll and nothing that lapses.
|
|
22
|
+
* The result of one account setup: the account it configured. It carries no
|
|
23
|
+
* status and no expiry, so there is nothing to poll and nothing that lapses.
|
|
29
24
|
*/
|
|
30
|
-
interface
|
|
31
|
-
id: string;
|
|
25
|
+
interface OnrampAccountCreated {
|
|
32
26
|
account: OnrampAccount;
|
|
33
27
|
}
|
|
34
|
-
|
|
28
|
+
interface OnrampBankDetails {
|
|
29
|
+
schemaVersion: 1;
|
|
30
|
+
capturedAt: string;
|
|
31
|
+
currency: RampCurrency;
|
|
32
|
+
accountHolderName: string;
|
|
33
|
+
bankName?: string;
|
|
34
|
+
bankAddress?: {
|
|
35
|
+
street: string;
|
|
36
|
+
street2?: string;
|
|
37
|
+
city: string;
|
|
38
|
+
postCode: string;
|
|
39
|
+
state: string;
|
|
40
|
+
country: string;
|
|
41
|
+
};
|
|
42
|
+
reference?: string;
|
|
43
|
+
rails: {
|
|
44
|
+
type: "BankAch" | "BankFedwire" | "BankSwift" | "BankSepa";
|
|
45
|
+
accountNumber: string;
|
|
46
|
+
bankCode: string;
|
|
47
|
+
fee: {
|
|
48
|
+
currency: RampCurrency;
|
|
49
|
+
base: string;
|
|
50
|
+
percent: string;
|
|
51
|
+
minimum: string;
|
|
52
|
+
};
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
/** The instructions the modal renders; read from the processor's snapshot. */
|
|
35
56
|
interface OnrampAccountDetails {
|
|
36
|
-
|
|
57
|
+
bankDetails: OnrampBankDetails;
|
|
37
58
|
}
|
|
38
59
|
/** No requests until an onramp method is called. */
|
|
39
60
|
declare function createOnrampService(options: CustomerSessionOptions): {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
getOptions: (intent: OnrampOptionsRequest) => Promise<RampPage<RampOption>>;
|
|
61
|
+
getOptions: ({ currency }?: OnrampOptionsRequest) => Promise<OnrampOptions>;
|
|
62
|
+
createAccount: ({ currency, optionId }: OnrampAccountRequest) => Promise<OnrampAccountCreated>;
|
|
43
63
|
listAccounts: (page?: RampPagination) => Promise<RampPage<OnrampAccount>>;
|
|
44
64
|
getAccount: (id: string) => Promise<OnrampAccount>;
|
|
65
|
+
getAccountDetails: (id: string) => Promise<OnrampAccountDetails>;
|
|
45
66
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* provider write; the coordinates themselves never cross this API.
|
|
67
|
+
* The customer's Noah orders, newest first. Filtered on the server, before
|
|
68
|
+
* `limit`, so another provider's orders can never crowd one out of a page.
|
|
49
69
|
*/
|
|
50
|
-
|
|
51
|
-
listPayments: (page?: RampPagination) => Promise<RampPage<OnrampPayment>>;
|
|
52
|
-
getPayment: (id: string) => Promise<OnrampPayment>;
|
|
70
|
+
listOrders: ({ cursor, limit }?: RampPagination) => Promise<RampPage<OnrampOrder>>;
|
|
53
71
|
};
|
|
54
72
|
|
|
55
|
-
export { CustomerSessionOptions,
|
|
73
|
+
export { CustomerSessionOptions, type OnrampAccount, type OnrampAccountCreated, type OnrampAccountDetails, type OnrampAccountRequest, type OnrampBankDetails, type OnrampOptions, type OnrampOptionsRequest, OnrampOrder, RampCurrency, RampOption, RampPage, RampPagination, createOnrampService };
|
package/dist/onramp.d.ts
CHANGED
|
@@ -1,55 +1,73 @@
|
|
|
1
|
-
import { C as CustomerSessionOptions } from './bearer-transport-
|
|
2
|
-
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-
|
|
3
|
-
import {
|
|
1
|
+
import { C as CustomerSessionOptions } from './bearer-transport-DZyeDG64.js';
|
|
2
|
+
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-DZyeDG64.js';
|
|
3
|
+
import { R as RampCurrency, B as BankIntent, a as RampOption, b as RampPagination, c as RampPage, O as OnrampOrder } from './ramp-types-HYWd7CW0.js';
|
|
4
|
+
export { C as ConversionStage, D as DeliveryStage, F as FiatFigure, d as ReceiptStage, e as ReturnStage } from './ramp-types-HYWd7CW0.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
type OnrampAccountRequest = BankIntent;
|
|
7
|
+
interface OnrampOptionsRequest {
|
|
8
|
+
/** One option for this currency; both without. */
|
|
9
|
+
currency?: RampCurrency;
|
|
7
10
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
interface OnrampPayment extends RampPayment {
|
|
13
|
-
bankReceipt: PaymentLegStatus;
|
|
14
|
-
conversion: PaymentLegStatus;
|
|
15
|
-
cryptoDelivery: PaymentLegStatus;
|
|
16
|
-
refund: PaymentReturnStatus;
|
|
17
|
-
adjustment: PaymentReturnStatus;
|
|
11
|
+
/** `GET /onramp/options?provider=noah`. */
|
|
12
|
+
interface OnrampOptions {
|
|
13
|
+
provider: "noah";
|
|
14
|
+
options: RampOption[];
|
|
18
15
|
}
|
|
19
16
|
interface OnrampAccount {
|
|
20
17
|
id: string;
|
|
21
18
|
currency: RampCurrency;
|
|
22
|
-
paymentMethod: "bank_transfer";
|
|
23
19
|
status: "pending" | "active" | "disabled";
|
|
24
20
|
}
|
|
25
21
|
/**
|
|
26
|
-
* The result of one account setup
|
|
27
|
-
* status and no expiry
|
|
28
|
-
* it failed. There is nothing to poll and nothing that lapses.
|
|
22
|
+
* The result of one account setup: the account it configured. It carries no
|
|
23
|
+
* status and no expiry, so there is nothing to poll and nothing that lapses.
|
|
29
24
|
*/
|
|
30
|
-
interface
|
|
31
|
-
id: string;
|
|
25
|
+
interface OnrampAccountCreated {
|
|
32
26
|
account: OnrampAccount;
|
|
33
27
|
}
|
|
34
|
-
|
|
28
|
+
interface OnrampBankDetails {
|
|
29
|
+
schemaVersion: 1;
|
|
30
|
+
capturedAt: string;
|
|
31
|
+
currency: RampCurrency;
|
|
32
|
+
accountHolderName: string;
|
|
33
|
+
bankName?: string;
|
|
34
|
+
bankAddress?: {
|
|
35
|
+
street: string;
|
|
36
|
+
street2?: string;
|
|
37
|
+
city: string;
|
|
38
|
+
postCode: string;
|
|
39
|
+
state: string;
|
|
40
|
+
country: string;
|
|
41
|
+
};
|
|
42
|
+
reference?: string;
|
|
43
|
+
rails: {
|
|
44
|
+
type: "BankAch" | "BankFedwire" | "BankSwift" | "BankSepa";
|
|
45
|
+
accountNumber: string;
|
|
46
|
+
bankCode: string;
|
|
47
|
+
fee: {
|
|
48
|
+
currency: RampCurrency;
|
|
49
|
+
base: string;
|
|
50
|
+
percent: string;
|
|
51
|
+
minimum: string;
|
|
52
|
+
};
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
/** The instructions the modal renders; read from the processor's snapshot. */
|
|
35
56
|
interface OnrampAccountDetails {
|
|
36
|
-
|
|
57
|
+
bankDetails: OnrampBankDetails;
|
|
37
58
|
}
|
|
38
59
|
/** No requests until an onramp method is called. */
|
|
39
60
|
declare function createOnrampService(options: CustomerSessionOptions): {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
getOptions: (intent: OnrampOptionsRequest) => Promise<RampPage<RampOption>>;
|
|
61
|
+
getOptions: ({ currency }?: OnrampOptionsRequest) => Promise<OnrampOptions>;
|
|
62
|
+
createAccount: ({ currency, optionId }: OnrampAccountRequest) => Promise<OnrampAccountCreated>;
|
|
43
63
|
listAccounts: (page?: RampPagination) => Promise<RampPage<OnrampAccount>>;
|
|
44
64
|
getAccount: (id: string) => Promise<OnrampAccount>;
|
|
65
|
+
getAccountDetails: (id: string) => Promise<OnrampAccountDetails>;
|
|
45
66
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* provider write; the coordinates themselves never cross this API.
|
|
67
|
+
* The customer's Noah orders, newest first. Filtered on the server, before
|
|
68
|
+
* `limit`, so another provider's orders can never crowd one out of a page.
|
|
49
69
|
*/
|
|
50
|
-
|
|
51
|
-
listPayments: (page?: RampPagination) => Promise<RampPage<OnrampPayment>>;
|
|
52
|
-
getPayment: (id: string) => Promise<OnrampPayment>;
|
|
70
|
+
listOrders: ({ cursor, limit }?: RampPagination) => Promise<RampPage<OnrampOrder>>;
|
|
53
71
|
};
|
|
54
72
|
|
|
55
|
-
export { CustomerSessionOptions,
|
|
73
|
+
export { CustomerSessionOptions, type OnrampAccount, type OnrampAccountCreated, type OnrampAccountDetails, type OnrampAccountRequest, type OnrampBankDetails, type OnrampOptions, type OnrampOptionsRequest, OnrampOrder, RampCurrency, RampOption, RampPage, RampPagination, createOnrampService };
|
package/dist/onramp.mjs
CHANGED
|
@@ -1,39 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-PP4QE32S.mjs";
|
|
2
|
+
createOnrampService
|
|
3
|
+
} from "./chunk-6CTJFR3T.mjs";
|
|
5
4
|
import {
|
|
6
|
-
ScopedRequestError
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "./chunk-X6N2XPTO.mjs";
|
|
10
|
-
|
|
11
|
-
// src/core/onramp-service.ts
|
|
12
|
-
function createOnrampService(options) {
|
|
13
|
-
const request = createBearerTransport(options);
|
|
14
|
-
return {
|
|
15
|
-
createSetup: (body) => request("/onramp/noah/setup", body),
|
|
16
|
-
getSetup: (id) => request(`/onramp/noah/setup/${rampResourceId(id)}`),
|
|
17
|
-
getOptions: (intent) => request(`/onramp/noah/options?${rampQuery(intent)}`),
|
|
18
|
-
listAccounts: (page = {}) => request(
|
|
19
|
-
`/onramp/noah/accounts?${rampQuery(page)}`
|
|
20
|
-
),
|
|
21
|
-
getAccount: (id) => request(`/onramp/noah/accounts/${rampResourceId(id)}`),
|
|
22
|
-
/**
|
|
23
|
-
* Mint a hosted address for the customer to read their account number or
|
|
24
|
-
* international account number from. A POST because minting one is a
|
|
25
|
-
* provider write; the coordinates themselves never cross this API.
|
|
26
|
-
*/
|
|
27
|
-
getAccountDetails: (id) => request(
|
|
28
|
-
`/onramp/noah/accounts/${rampResourceId(id)}/details`,
|
|
29
|
-
{}
|
|
30
|
-
),
|
|
31
|
-
listPayments: (page = {}) => request(
|
|
32
|
-
`/onramp/noah/payments?${rampQuery(page)}`
|
|
33
|
-
),
|
|
34
|
-
getPayment: (id) => request(`/onramp/noah/payments/${rampResourceId(id)}`)
|
|
35
|
-
};
|
|
36
|
-
}
|
|
5
|
+
ScopedRequestError
|
|
6
|
+
} from "./chunk-XBJCZYBX.mjs";
|
|
7
|
+
import "./chunk-B2LZQIGB.mjs";
|
|
37
8
|
export {
|
|
38
9
|
ScopedRequestError,
|
|
39
10
|
createOnrampService
|
package/dist/polymarket.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var _chunkFVJKUTHFcjs = require('./chunk-FVJKUTHF.cjs');
|
|
6
|
+
require('./chunk-FKJ6EJHH.cjs');
|
|
7
7
|
|
|
8
8
|
// src/core/dapp-imports/polymarket/account.ts
|
|
9
9
|
|
|
@@ -22,12 +22,12 @@ async function getPolymarketAccount(params) {
|
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
const eoa = _viem.getAddress.call(void 0, params.eoa);
|
|
25
|
-
const proxyWallet = await
|
|
25
|
+
const proxyWallet = await _chunkFVJKUTHFcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
|
|
26
26
|
if (!proxyWallet) return null;
|
|
27
27
|
throwIfAborted(signal);
|
|
28
28
|
let balances = { pusd: 0n, usdce: 0n };
|
|
29
29
|
try {
|
|
30
|
-
balances = await
|
|
30
|
+
balances = await _chunkFVJKUTHFcjs.readPolymarketBalances.call(void 0, {
|
|
31
31
|
publicClient: polygonClient(rpcUrl),
|
|
32
32
|
proxyWallet
|
|
33
33
|
});
|
|
@@ -39,7 +39,7 @@ async function getPolymarketAccount(params) {
|
|
|
39
39
|
return {
|
|
40
40
|
eoa,
|
|
41
41
|
proxyWallet,
|
|
42
|
-
chainId:
|
|
42
|
+
chainId: _chunkFVJKUTHFcjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
43
43
|
pusd,
|
|
44
44
|
usdce,
|
|
45
45
|
totalUsd: pusd.usd + usdce.usd
|
|
@@ -51,7 +51,7 @@ function toTokenBalance(raw) {
|
|
|
51
51
|
return { raw, formatted, usd: Number.isFinite(usd) ? usd : 0 };
|
|
52
52
|
}
|
|
53
53
|
var polygon = _viem.defineChain.call(void 0, {
|
|
54
|
-
id:
|
|
54
|
+
id: _chunkFVJKUTHFcjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
55
55
|
name: "Polygon",
|
|
56
56
|
nativeCurrency: { name: "POL", symbol: "POL", decimals: 18 },
|
|
57
57
|
// Verified to answer `eth_chainId` with 137. `polygon-rpc.com`, the obvious
|
package/dist/polymarket.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
POLYMARKET_POLYGON_CHAIN_ID,
|
|
3
3
|
fetchPolymarketProxyWallet,
|
|
4
4
|
readPolymarketBalances
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2FOPO4N5.mjs";
|
|
6
|
+
import "./chunk-E7IMWVMN.mjs";
|
|
7
7
|
|
|
8
8
|
// src/core/dapp-imports/polymarket/account.ts
|
|
9
9
|
import {
|