@naculus/connect-appkit-vue 0.11.1 → 0.12.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/index.cjs +54 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1854,6 +1854,7 @@ function useUserOpStatus(options) {
|
|
|
1854
1854
|
}
|
|
1855
1855
|
|
|
1856
1856
|
// src/useSendCalls.ts
|
|
1857
|
+
var import_connect_appkit_core15 = require("@naculus/connect-appkit-core");
|
|
1857
1858
|
var import_vue26 = require("vue");
|
|
1858
1859
|
function useSendCalls(options) {
|
|
1859
1860
|
const status = (0, import_vue26.shallowRef)("idle");
|
|
@@ -1877,7 +1878,7 @@ function useSendCalls(options) {
|
|
|
1877
1878
|
}
|
|
1878
1879
|
return hash;
|
|
1879
1880
|
} catch (cause) {
|
|
1880
|
-
const normalized = cause instanceof Error ? cause : new Error(
|
|
1881
|
+
const normalized = cause instanceof Error ? cause : new Error((0, import_connect_appkit_core15.errorMessage)(cause));
|
|
1881
1882
|
if (!disposed && own === sendGeneration) {
|
|
1882
1883
|
status.value = "failed";
|
|
1883
1884
|
error.value = normalized;
|
|
@@ -2011,7 +2012,7 @@ function useSiwxAuthSession(options) {
|
|
|
2011
2012
|
}
|
|
2012
2013
|
|
|
2013
2014
|
// src/useBalance.ts
|
|
2014
|
-
var
|
|
2015
|
+
var import_connect_appkit_core16 = require("@naculus/connect-appkit-core");
|
|
2015
2016
|
var import_connect_core12 = require("@naculus/connect-core");
|
|
2016
2017
|
var import_vue30 = require("vue");
|
|
2017
2018
|
function useBalance(account, client, options = {}) {
|
|
@@ -2021,7 +2022,7 @@ function useBalance(account, client, options = {}) {
|
|
|
2021
2022
|
let timer = null;
|
|
2022
2023
|
const refetch = async () => {
|
|
2023
2024
|
const reader = (0, import_vue30.toValue)(client);
|
|
2024
|
-
const address = (0,
|
|
2025
|
+
const address = (0, import_connect_appkit_core16.bareEvmAddress)((0, import_vue30.toValue)(account));
|
|
2025
2026
|
if (!reader || !address) {
|
|
2026
2027
|
guard.reset();
|
|
2027
2028
|
balance.value = null;
|
|
@@ -2084,7 +2085,7 @@ function useBalance(account, client, options = {}) {
|
|
|
2084
2085
|
}
|
|
2085
2086
|
|
|
2086
2087
|
// src/useRouteQuote.ts
|
|
2087
|
-
var
|
|
2088
|
+
var import_connect_appkit_core17 = require("@naculus/connect-appkit-core");
|
|
2088
2089
|
var import_vue31 = require("vue");
|
|
2089
2090
|
function useRouteQuote(input, getQuotes, options = {}) {
|
|
2090
2091
|
const guard = useActionGuard();
|
|
@@ -2096,7 +2097,7 @@ function useRouteQuote(input, getQuotes, options = {}) {
|
|
|
2096
2097
|
timer = null;
|
|
2097
2098
|
};
|
|
2098
2099
|
const requestable = (current) => {
|
|
2099
|
-
if (!(0,
|
|
2100
|
+
if (!(0, import_connect_appkit_core17.isQuotableInput)(current)) {
|
|
2100
2101
|
guard.invalidate();
|
|
2101
2102
|
loading.value = false;
|
|
2102
2103
|
quotes.value = [];
|
|
@@ -2182,7 +2183,7 @@ function useRouteQuote(input, getQuotes, options = {}) {
|
|
|
2182
2183
|
}
|
|
2183
2184
|
|
|
2184
2185
|
// src/useCompareCosts.ts
|
|
2185
|
-
var
|
|
2186
|
+
var import_connect_appkit_core18 = require("@naculus/connect-appkit-core");
|
|
2186
2187
|
var import_vue32 = require("vue");
|
|
2187
2188
|
function useCompareCosts(input, compareCosts) {
|
|
2188
2189
|
const guard = useActionGuard();
|
|
@@ -2228,7 +2229,7 @@ function useCompareCosts(input, compareCosts) {
|
|
|
2228
2229
|
});
|
|
2229
2230
|
};
|
|
2230
2231
|
(0, import_vue32.watch)(
|
|
2231
|
-
[() => (0,
|
|
2232
|
+
[() => (0, import_connect_appkit_core18.compareCostsKey)((0, import_vue32.toValue)(input)), () => (0, import_vue32.unref)(compareCosts)],
|
|
2232
2233
|
() => {
|
|
2233
2234
|
void fetchComparisons();
|
|
2234
2235
|
},
|
|
@@ -2243,7 +2244,7 @@ function useCompareCosts(input, compareCosts) {
|
|
|
2243
2244
|
}
|
|
2244
2245
|
|
|
2245
2246
|
// src/useExecuteRoute.ts
|
|
2246
|
-
var
|
|
2247
|
+
var import_connect_appkit_core19 = require("@naculus/connect-appkit-core");
|
|
2247
2248
|
var import_vue33 = require("vue");
|
|
2248
2249
|
function useExecuteRoute(executeRoute) {
|
|
2249
2250
|
const executing = (0, import_vue33.shallowRef)(false);
|
|
@@ -2261,7 +2262,7 @@ function useExecuteRoute(executeRoute) {
|
|
|
2261
2262
|
result.value = null;
|
|
2262
2263
|
return null;
|
|
2263
2264
|
}
|
|
2264
|
-
const recipientError = (0,
|
|
2265
|
+
const recipientError = (0, import_connect_appkit_core19.validateRouteRecipient)(quote, recipient);
|
|
2265
2266
|
if (recipientError) {
|
|
2266
2267
|
error.value = recipientError;
|
|
2267
2268
|
result.value = null;
|
|
@@ -2283,7 +2284,7 @@ function useExecuteRoute(executeRoute) {
|
|
|
2283
2284
|
if (!disposed) result.value = execResult;
|
|
2284
2285
|
return execResult;
|
|
2285
2286
|
} catch (cause) {
|
|
2286
|
-
if (!disposed) error.value = (0,
|
|
2287
|
+
if (!disposed) error.value = (0, import_connect_appkit_core19.toExecuteRouteError)(cause);
|
|
2287
2288
|
return null;
|
|
2288
2289
|
} finally {
|
|
2289
2290
|
inFlight = false;
|
|
@@ -2307,7 +2308,7 @@ function useExecuteRoute(executeRoute) {
|
|
|
2307
2308
|
}
|
|
2308
2309
|
|
|
2309
2310
|
// src/useTokenList.ts
|
|
2310
|
-
var
|
|
2311
|
+
var import_connect_appkit_core20 = require("@naculus/connect-appkit-core");
|
|
2311
2312
|
var import_connect_core13 = require("@naculus/connect-core");
|
|
2312
2313
|
var import_vue34 = require("vue");
|
|
2313
2314
|
function useTokenList(chainId, options = {}) {
|
|
@@ -2320,7 +2321,7 @@ function useTokenList(chainId, options = {}) {
|
|
|
2320
2321
|
const isLoaded = (0, import_vue34.shallowRef)(false);
|
|
2321
2322
|
const select = () => {
|
|
2322
2323
|
const id = (0, import_vue34.toValue)(chainId);
|
|
2323
|
-
const numeric = id ? (0,
|
|
2324
|
+
const numeric = id ? (0, import_connect_appkit_core20.eip155ChainIdToNumber)(id) : void 0;
|
|
2324
2325
|
return manager.getTokens(
|
|
2325
2326
|
numeric !== void 0 ? { chainId: numeric } : void 0
|
|
2326
2327
|
);
|
|
@@ -2362,7 +2363,7 @@ function useTokenList(chainId, options = {}) {
|
|
|
2362
2363
|
}
|
|
2363
2364
|
|
|
2364
2365
|
// src/useTokenSearch.ts
|
|
2365
|
-
var
|
|
2366
|
+
var import_connect_appkit_core21 = require("@naculus/connect-appkit-core");
|
|
2366
2367
|
var import_connect_core14 = require("@naculus/connect-core");
|
|
2367
2368
|
var import_vue35 = require("vue");
|
|
2368
2369
|
var DEBOUNCE_MS = 300;
|
|
@@ -2397,7 +2398,7 @@ function useTokenSearch(query, chainId, options = {}) {
|
|
|
2397
2398
|
timer = setTimeout(() => {
|
|
2398
2399
|
timer = null;
|
|
2399
2400
|
const manager = options.manager ?? getSharedManager();
|
|
2400
|
-
const numeric = id ? (0,
|
|
2401
|
+
const numeric = id ? (0, import_connect_appkit_core21.eip155ChainIdToNumber)(id) : void 0;
|
|
2401
2402
|
results.value = manager.search(q, {
|
|
2402
2403
|
chainId: numeric,
|
|
2403
2404
|
limit: options.limit ?? 20
|
|
@@ -2412,16 +2413,16 @@ function useTokenSearch(query, chainId, options = {}) {
|
|
|
2412
2413
|
}
|
|
2413
2414
|
|
|
2414
2415
|
// src/useValidateDestination.ts
|
|
2415
|
-
var
|
|
2416
|
+
var import_connect_appkit_core22 = require("@naculus/connect-appkit-core");
|
|
2416
2417
|
var import_vue36 = require("vue");
|
|
2417
2418
|
function useValidateDestination(address) {
|
|
2418
2419
|
return {
|
|
2419
|
-
validation: (0, import_vue36.computed)(() => (0,
|
|
2420
|
+
validation: (0, import_vue36.computed)(() => (0, import_connect_appkit_core22.validateDestination)((0, import_vue36.toValue)(address) ?? ""))
|
|
2420
2421
|
};
|
|
2421
2422
|
}
|
|
2422
2423
|
|
|
2423
2424
|
// src/useTokenBalance.ts
|
|
2424
|
-
var
|
|
2425
|
+
var import_connect_appkit_core23 = require("@naculus/connect-appkit-core");
|
|
2425
2426
|
var import_connect_core15 = require("@naculus/connect-core");
|
|
2426
2427
|
var import_vue37 = require("vue");
|
|
2427
2428
|
function tokensKey(tokens) {
|
|
@@ -2434,7 +2435,7 @@ function useTokenBalance(account, client, tokens, options = {}) {
|
|
|
2434
2435
|
let timer = null;
|
|
2435
2436
|
const refetch = async () => {
|
|
2436
2437
|
const reader = (0, import_vue37.toValue)(client);
|
|
2437
|
-
const address = (0,
|
|
2438
|
+
const address = (0, import_connect_appkit_core23.bareEvmAddress)((0, import_vue37.toValue)(account));
|
|
2438
2439
|
const list = (0, import_vue37.toValue)(tokens) ?? [];
|
|
2439
2440
|
if (!reader || !address || list.length === 0) {
|
|
2440
2441
|
guard.reset();
|
|
@@ -2517,7 +2518,7 @@ function useTokenBalance(account, client, tokens, options = {}) {
|
|
|
2517
2518
|
}
|
|
2518
2519
|
|
|
2519
2520
|
// src/useDelegate.ts
|
|
2520
|
-
var
|
|
2521
|
+
var import_connect_appkit_core24 = require("@naculus/connect-appkit-core");
|
|
2521
2522
|
var import_connect_core16 = require("@naculus/connect-core");
|
|
2522
2523
|
var import_vue38 = require("vue");
|
|
2523
2524
|
function useDelegate(options) {
|
|
@@ -2534,7 +2535,7 @@ function useDelegate(options) {
|
|
|
2534
2535
|
const run = async (target, allowlist) => {
|
|
2535
2536
|
if (inFlight) return fail(new Error("A delegation is already in progress"));
|
|
2536
2537
|
const session = (0, import_vue38.toValue)(options.session);
|
|
2537
|
-
const account = (0,
|
|
2538
|
+
const account = (0, import_connect_appkit_core24.bareEvmAddress)((0, import_vue38.toValue)(options.account));
|
|
2538
2539
|
const chainId = (0, import_vue38.toValue)(options.chainId);
|
|
2539
2540
|
if (!session || !account || !chainId) {
|
|
2540
2541
|
return fail(
|
|
@@ -2609,7 +2610,7 @@ function useDelegate(options) {
|
|
|
2609
2610
|
}
|
|
2610
2611
|
|
|
2611
2612
|
// src/useDelegation.ts
|
|
2612
|
-
var
|
|
2613
|
+
var import_connect_appkit_core25 = require("@naculus/connect-appkit-core");
|
|
2613
2614
|
var import_connect_core17 = require("@naculus/connect-core");
|
|
2614
2615
|
var import_vue39 = require("vue");
|
|
2615
2616
|
function useDelegation(account, client, chainId) {
|
|
@@ -2618,7 +2619,7 @@ function useDelegation(account, client, chainId) {
|
|
|
2618
2619
|
const isFetching = (0, import_vue39.shallowRef)(false);
|
|
2619
2620
|
const refetch = async () => {
|
|
2620
2621
|
const reader = (0, import_vue39.toValue)(client);
|
|
2621
|
-
const address = (0,
|
|
2622
|
+
const address = (0, import_connect_appkit_core25.bareEvmAddress)((0, import_vue39.toValue)(account));
|
|
2622
2623
|
status.value = import_connect_core17.UNKNOWN_DELEGATION;
|
|
2623
2624
|
if (!reader || !address) {
|
|
2624
2625
|
guard.reset();
|
|
@@ -2667,7 +2668,7 @@ function useDelegation(account, client, chainId) {
|
|
|
2667
2668
|
}
|
|
2668
2669
|
|
|
2669
2670
|
// src/usePaymentFetch.ts
|
|
2670
|
-
var
|
|
2671
|
+
var import_connect_appkit_core26 = require("@naculus/connect-appkit-core");
|
|
2671
2672
|
var import_vue40 = require("vue");
|
|
2672
2673
|
function usePaymentFetch(pay, options = {}) {
|
|
2673
2674
|
const guard = useActionGuard();
|
|
@@ -2683,16 +2684,16 @@ function usePaymentFetch(pay, options = {}) {
|
|
|
2683
2684
|
const own = epoch;
|
|
2684
2685
|
return guard.run(async () => {
|
|
2685
2686
|
const result = await invoke(input, init);
|
|
2686
|
-
let payment = (0,
|
|
2687
|
+
let payment = (0, import_connect_appkit_core26.describePayment)(input, result);
|
|
2687
2688
|
if (payment && own === epoch) {
|
|
2688
2689
|
const verify = options.verify;
|
|
2689
2690
|
if (!verify) {
|
|
2690
2691
|
lastPayment.value = payment;
|
|
2691
2692
|
} else {
|
|
2692
|
-
payment = (0,
|
|
2693
|
+
payment = (0, import_connect_appkit_core26.applySettlementVerification)(payment, { status: "pending" });
|
|
2693
2694
|
lastPayment.value = payment;
|
|
2694
2695
|
const verificationOwn = ++verification;
|
|
2695
|
-
const retry = options.verifyRetry ??
|
|
2696
|
+
const retry = options.verifyRetry ?? import_connect_appkit_core26.DEFAULT_VERIFY_RETRY;
|
|
2696
2697
|
void Promise.resolve().then(async () => {
|
|
2697
2698
|
let outcome = { status: "pending" };
|
|
2698
2699
|
for (let attempt = 0; attempt < retry.attempts; attempt += 1) {
|
|
@@ -2715,7 +2716,7 @@ function usePaymentFetch(pay, options = {}) {
|
|
|
2715
2716
|
if (own === epoch && verificationOwn === verification) {
|
|
2716
2717
|
const current = lastPayment.value;
|
|
2717
2718
|
if (current)
|
|
2718
|
-
lastPayment.value = (0,
|
|
2719
|
+
lastPayment.value = (0, import_connect_appkit_core26.applySettlementVerification)(
|
|
2719
2720
|
current,
|
|
2720
2721
|
outcome
|
|
2721
2722
|
);
|
|
@@ -2741,13 +2742,13 @@ function usePaymentFetch(pay, options = {}) {
|
|
|
2741
2742
|
}
|
|
2742
2743
|
|
|
2743
2744
|
// src/useMppSession.ts
|
|
2744
|
-
var
|
|
2745
|
+
var import_connect_appkit_core27 = require("@naculus/connect-appkit-core");
|
|
2745
2746
|
var import_vue41 = require("vue");
|
|
2746
2747
|
function useMppSession(session) {
|
|
2747
2748
|
const current = () => (0, import_vue41.unref)(session);
|
|
2748
2749
|
const pending = (0, import_vue41.shallowRef)(current().meter.pending);
|
|
2749
2750
|
const channel = (0, import_vue41.shallowRef)(
|
|
2750
|
-
(0,
|
|
2751
|
+
(0, import_connect_appkit_core27.readCurrentMppSessionChannel)(current())
|
|
2751
2752
|
);
|
|
2752
2753
|
const lastReceipt = (0, import_vue41.shallowRef)(null);
|
|
2753
2754
|
const recoveryChannelId = (0, import_vue41.shallowRef)(null);
|
|
@@ -2765,7 +2766,7 @@ function useMppSession(session) {
|
|
|
2765
2766
|
active = 0;
|
|
2766
2767
|
isPending.value = false;
|
|
2767
2768
|
pending.value = value.meter.pending;
|
|
2768
|
-
channel.value = (0,
|
|
2769
|
+
channel.value = (0, import_connect_appkit_core27.readCurrentMppSessionChannel)(value);
|
|
2769
2770
|
lastReceipt.value = null;
|
|
2770
2771
|
recoveryChannelId.value = null;
|
|
2771
2772
|
error.value = null;
|
|
@@ -2787,7 +2788,7 @@ function useMppSession(session) {
|
|
|
2787
2788
|
return operation(invokedSession).then((result) => {
|
|
2788
2789
|
if (!disposed && ownEpoch === epoch) {
|
|
2789
2790
|
publish?.(result);
|
|
2790
|
-
const currentChannel = (0,
|
|
2791
|
+
const currentChannel = (0, import_connect_appkit_core27.readCurrentMppSessionChannel)(invokedSession);
|
|
2791
2792
|
channel.value = currentChannel;
|
|
2792
2793
|
pending.value = invokedSession.meter.pending;
|
|
2793
2794
|
if (clearsRecovery || !currentChannel) {
|
|
@@ -2798,10 +2799,10 @@ function useMppSession(session) {
|
|
|
2798
2799
|
}).catch((cause) => {
|
|
2799
2800
|
const normalized = cause instanceof Error ? cause : new Error("MPP session operation failed");
|
|
2800
2801
|
if (!disposed && ownEpoch === epoch) {
|
|
2801
|
-
const currentChannel = (0,
|
|
2802
|
+
const currentChannel = (0, import_connect_appkit_core27.readCurrentMppSessionChannel)(invokedSession);
|
|
2802
2803
|
channel.value = currentChannel;
|
|
2803
2804
|
pending.value = invokedSession.meter.pending;
|
|
2804
|
-
const recovery = (0,
|
|
2805
|
+
const recovery = (0, import_connect_appkit_core27.readMppRecoveryChannelId)(cause);
|
|
2805
2806
|
if (recovery) recoveryChannelId.value = recovery;
|
|
2806
2807
|
else if (!currentChannel) recoveryChannelId.value = null;
|
|
2807
2808
|
if (own === generation) error.value = normalized;
|
|
@@ -2817,14 +2818,14 @@ function useMppSession(session) {
|
|
|
2817
2818
|
const fetch = (input, init) => run(
|
|
2818
2819
|
(value) => value(input, init),
|
|
2819
2820
|
(result) => {
|
|
2820
|
-
const receipt = (0,
|
|
2821
|
+
const receipt = (0, import_connect_appkit_core27.readMppSessionReceipt)(result.receipt);
|
|
2821
2822
|
if (receipt) lastReceipt.value = receipt;
|
|
2822
2823
|
}
|
|
2823
2824
|
);
|
|
2824
2825
|
const close = () => run(
|
|
2825
2826
|
(value) => value.close(),
|
|
2826
2827
|
(result) => {
|
|
2827
|
-
const receipt = (0,
|
|
2828
|
+
const receipt = (0, import_connect_appkit_core27.readMppSessionReceipt)(result.receipt);
|
|
2828
2829
|
if (receipt) lastReceipt.value = receipt;
|
|
2829
2830
|
},
|
|
2830
2831
|
true
|
|
@@ -2838,7 +2839,7 @@ function useMppSession(session) {
|
|
|
2838
2839
|
} catch (cause) {
|
|
2839
2840
|
const normalized = cause instanceof Error ? cause : new Error("MPP session operation failed");
|
|
2840
2841
|
error.value = normalized;
|
|
2841
|
-
recoveryChannelId.value = (0,
|
|
2842
|
+
recoveryChannelId.value = (0, import_connect_appkit_core27.readMppRecoveryChannelId)(cause);
|
|
2842
2843
|
throw normalized;
|
|
2843
2844
|
}
|
|
2844
2845
|
};
|
|
@@ -2859,7 +2860,7 @@ function useMppSession(session) {
|
|
|
2859
2860
|
active = 0;
|
|
2860
2861
|
isPending.value = false;
|
|
2861
2862
|
pending.value = current().meter.pending;
|
|
2862
|
-
channel.value = (0,
|
|
2863
|
+
channel.value = (0, import_connect_appkit_core27.readCurrentMppSessionChannel)(current());
|
|
2863
2864
|
lastReceipt.value = null;
|
|
2864
2865
|
recoveryChannelId.value = null;
|
|
2865
2866
|
error.value = null;
|
|
@@ -2868,7 +2869,7 @@ function useMppSession(session) {
|
|
|
2868
2869
|
}
|
|
2869
2870
|
|
|
2870
2871
|
// src/useSolanaSessionKey.ts
|
|
2871
|
-
var
|
|
2872
|
+
var import_connect_appkit_core28 = require("@naculus/connect-appkit-core");
|
|
2872
2873
|
var import_vue42 = require("vue");
|
|
2873
2874
|
function useSolanaSessionKey(deps) {
|
|
2874
2875
|
const guard = useActionGuard();
|
|
@@ -2887,7 +2888,7 @@ function useSolanaSessionKey(deps) {
|
|
|
2887
2888
|
(0, import_vue42.watch)(
|
|
2888
2889
|
() => (0, import_vue42.unref)(deps),
|
|
2889
2890
|
(next) => {
|
|
2890
|
-
flow = next ? (0,
|
|
2891
|
+
flow = next ? (0, import_connect_appkit_core28.createSolanaSessionKeyFlow)(next) : null;
|
|
2891
2892
|
guard.invalidate();
|
|
2892
2893
|
void refresh().catch(() => {
|
|
2893
2894
|
});
|
|
@@ -2918,7 +2919,7 @@ function useSolanaSessionKey(deps) {
|
|
|
2918
2919
|
}
|
|
2919
2920
|
|
|
2920
2921
|
// src/name-lookup.ts
|
|
2921
|
-
var
|
|
2922
|
+
var import_connect_appkit_core29 = require("@naculus/connect-appkit-core");
|
|
2922
2923
|
var import_vue43 = require("vue");
|
|
2923
2924
|
function useNameLookup(options) {
|
|
2924
2925
|
const guard = useActionGuard();
|
|
@@ -2941,7 +2942,7 @@ function useNameLookup(options) {
|
|
|
2941
2942
|
async (commit) => {
|
|
2942
2943
|
try {
|
|
2943
2944
|
const result = await Promise.resolve().then(
|
|
2944
|
-
() => options.query((0,
|
|
2945
|
+
() => options.query((0, import_connect_appkit_core29.getResolver)(config), input, scope)
|
|
2945
2946
|
);
|
|
2946
2947
|
commit(() => {
|
|
2947
2948
|
data.value = result;
|
|
@@ -3025,21 +3026,21 @@ function useSolanaAccount(accounts, connected) {
|
|
|
3025
3026
|
}
|
|
3026
3027
|
|
|
3027
3028
|
// src/useChain.ts
|
|
3028
|
-
var
|
|
3029
|
+
var import_connect_appkit_core30 = require("@naculus/connect-appkit-core");
|
|
3029
3030
|
var import_vue45 = require("vue");
|
|
3030
3031
|
function useChain(chains, chainId) {
|
|
3031
3032
|
const list = (0, import_vue45.computed)(() => (0, import_vue45.toValue)(chains) ?? []);
|
|
3032
3033
|
const id = (0, import_vue45.computed)(() => (0, import_vue45.toValue)(chainId) ?? null);
|
|
3033
|
-
const currentChain = (0, import_vue45.computed)(() => (0,
|
|
3034
|
+
const currentChain = (0, import_vue45.computed)(() => (0, import_connect_appkit_core30.resolveChain)(list.value, id.value));
|
|
3034
3035
|
return {
|
|
3035
3036
|
currentChain,
|
|
3036
|
-
chainInfo: (0, import_vue45.computed)(() => (0,
|
|
3037
|
-
availableChains: (0, import_vue45.computed)(() => (0,
|
|
3037
|
+
chainInfo: (0, import_vue45.computed)(() => (0, import_connect_appkit_core30.describeChain)(list.value, id.value)),
|
|
3038
|
+
availableChains: (0, import_vue45.computed)(() => (0, import_connect_appkit_core30.chainsForNamespace)(list.value, id.value)),
|
|
3038
3039
|
currentChainNumber: (0, import_vue45.computed)(
|
|
3039
|
-
() => currentChain.value ? (0,
|
|
3040
|
+
() => currentChain.value ? (0, import_connect_appkit_core30.chainNumber)(currentChain.value) : null
|
|
3040
3041
|
),
|
|
3041
3042
|
namespace: (0, import_vue45.computed)(
|
|
3042
|
-
() => currentChain.value ? (0,
|
|
3043
|
+
() => currentChain.value ? (0, import_connect_appkit_core30.chainNamespace)(currentChain.value) : null
|
|
3043
3044
|
)
|
|
3044
3045
|
};
|
|
3045
3046
|
}
|
|
@@ -3332,7 +3333,7 @@ function useTxMonitor(hash, chainId, monitor) {
|
|
|
3332
3333
|
}
|
|
3333
3334
|
|
|
3334
3335
|
// src/useCapabilities.ts
|
|
3335
|
-
var
|
|
3336
|
+
var import_connect_appkit_core31 = require("@naculus/connect-appkit-core");
|
|
3336
3337
|
var import_vue51 = require("vue");
|
|
3337
3338
|
function useCapabilities(client, session, chainId) {
|
|
3338
3339
|
const guard = useActionGuard();
|
|
@@ -3355,7 +3356,7 @@ function useCapabilities(client, session, chainId) {
|
|
|
3355
3356
|
try {
|
|
3356
3357
|
const raw = await activeClient.getCapabilities(activeSession);
|
|
3357
3358
|
commit(() => {
|
|
3358
|
-
capabilities.value = (0,
|
|
3359
|
+
capabilities.value = (0, import_connect_appkit_core31.normalizeCapabilities)(raw);
|
|
3359
3360
|
});
|
|
3360
3361
|
} catch (err) {
|
|
3361
3362
|
commit(() => {
|
|
@@ -3382,10 +3383,10 @@ function useCapabilities(client, session, chainId) {
|
|
|
3382
3383
|
return {
|
|
3383
3384
|
capabilities,
|
|
3384
3385
|
current: (0, import_vue51.computed)(
|
|
3385
|
-
() => (0,
|
|
3386
|
+
() => (0, import_connect_appkit_core31.selectChainCapabilities)(capabilities.value, (0, import_vue51.toValue)(chainId))
|
|
3386
3387
|
),
|
|
3387
3388
|
atomic: (0, import_vue51.computed)(
|
|
3388
|
-
() => (0,
|
|
3389
|
+
() => (0, import_connect_appkit_core31.atomicSupportFor)(capabilities.value, (0, import_vue51.toValue)(chainId))
|
|
3389
3390
|
),
|
|
3390
3391
|
isFetching,
|
|
3391
3392
|
error: guard.error,
|
|
@@ -3394,11 +3395,11 @@ function useCapabilities(client, session, chainId) {
|
|
|
3394
3395
|
}
|
|
3395
3396
|
|
|
3396
3397
|
// src/useSolanaRoles.ts
|
|
3397
|
-
var
|
|
3398
|
+
var import_connect_appkit_core32 = require("@naculus/connect-appkit-core");
|
|
3398
3399
|
var import_vue52 = require("vue");
|
|
3399
3400
|
function useSolanaRoles(connector, session) {
|
|
3400
3401
|
const state = (0, import_vue52.computed)(
|
|
3401
|
-
() => (0,
|
|
3402
|
+
() => (0, import_connect_appkit_core32.readSolanaRoles)((0, import_vue52.toValue)(connector), (0, import_vue52.toValue)(session))
|
|
3402
3403
|
);
|
|
3403
3404
|
return {
|
|
3404
3405
|
roles: (0, import_vue52.computed)(() => state.value.roles),
|