@edgeandnode/graph-auth-kit 2.12.2 → 2.12.3
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.js +20 -19
- package/dist/safe/constants.d.ts +1 -0
- package/dist/safe/constants.d.ts.map +1 -1
- package/dist/safe/index.js +4 -3
- package/dist/test-harness/index.js +1 -1
- package/dist/{utils-DE0JzXpv.js → utils-CQnV98OX.js} +19 -15
- package/dist/{utils-BbKgcpsR.js → utils-Des8_iyZ.js} +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { b as createSafe, c as createApiKit, G as GraphAuthKitConnector, M as MULTISIG_AUTH_STORAGE_KEY } from "./utils-
|
|
5
|
-
import {
|
|
6
|
-
import { c as clientToProvider, u as useGraphAuthKitInnerContext, a as MultisigSchema } from "./utils-
|
|
7
|
-
import { G, f as f2, M, b, g as g2, n as n2, d as d2, j as j2, h as h2, k as k2, l as l2, i as i2, m as m2, e as e2 } from "./utils-
|
|
4
|
+
import { b as createSafe, c as createApiKit, G as GraphAuthKitConnector, M as MULTISIG_AUTH_STORAGE_KEY } from "./utils-CQnV98OX.js";
|
|
5
|
+
import { m, A, k, B, D, t, L, n, o, p, R, s, a, S, q, r, l, g, j, f, h, e, i, d } from "./utils-CQnV98OX.js";
|
|
6
|
+
import { c as clientToProvider, u as useGraphAuthKitInnerContext, a as MultisigSchema } from "./utils-Des8_iyZ.js";
|
|
7
|
+
import { G, f as f2, M, b, g as g2, n as n2, d as d2, j as j2, h as h2, k as k2, l as l2, i as i2, m as m2, e as e2 } from "./utils-Des8_iyZ.js";
|
|
8
8
|
import { useMutation } from "@tanstack/react-query";
|
|
9
9
|
import { watchAccount } from "@wagmi/core";
|
|
10
10
|
import { useMemo, useState, useEffect } from "react";
|
|
@@ -558,34 +558,34 @@ function SwitchChain(props) {
|
|
|
558
558
|
);
|
|
559
559
|
}
|
|
560
560
|
export {
|
|
561
|
-
|
|
561
|
+
m as AUTH_STORAGE_KEY,
|
|
562
562
|
A as ApiKitUrlMap,
|
|
563
|
-
|
|
563
|
+
k as BuildClientArgs,
|
|
564
564
|
B as BuildPublicClientArgs,
|
|
565
565
|
Connected,
|
|
566
566
|
D as DefChain,
|
|
567
567
|
Disconnected,
|
|
568
568
|
GraphAuthKitConnector,
|
|
569
569
|
G as GraphAuthKitContext,
|
|
570
|
-
|
|
570
|
+
t as GraphAuthKitProps,
|
|
571
571
|
f2 as GraphAuthKitProvider,
|
|
572
572
|
L as L1Chain,
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
573
|
+
n as L1ChainTestnet,
|
|
574
|
+
o as L2Chain,
|
|
575
|
+
p as L2ChainTestnet,
|
|
576
576
|
MULTISIG_AUTH_STORAGE_KEY,
|
|
577
577
|
M as MockGraphAuthKitProvider,
|
|
578
578
|
R as RequiredInfuraKey,
|
|
579
|
-
|
|
579
|
+
s as RequiredWalletConnectProjectId,
|
|
580
580
|
a as SafeSupportedNetworkNames,
|
|
581
581
|
S as SafeSupportedNetworks,
|
|
582
|
-
|
|
583
|
-
|
|
582
|
+
q as SupportedClientChainId,
|
|
583
|
+
r as SupportedClientChains,
|
|
584
584
|
SwitchChain,
|
|
585
|
-
|
|
586
|
-
|
|
585
|
+
l as buildClient,
|
|
586
|
+
g as buildInfuraHttpTransport,
|
|
587
587
|
b as buildMockProviderState,
|
|
588
|
-
|
|
588
|
+
j as buildPublicClient,
|
|
589
589
|
g2 as chainIsSupportedChain,
|
|
590
590
|
clientToProvider,
|
|
591
591
|
n2 as connectedWalletIsEoA,
|
|
@@ -593,14 +593,15 @@ export {
|
|
|
593
593
|
createSafe,
|
|
594
594
|
d2 as disconnectedMockState,
|
|
595
595
|
f as fetchOwnedSafes,
|
|
596
|
-
|
|
596
|
+
h as isBuildPublicClientArgs,
|
|
597
597
|
j2 as isChainL1,
|
|
598
598
|
h2 as isChainL2,
|
|
599
599
|
k2 as isChainMainnet,
|
|
600
600
|
l2 as isChainTestnet,
|
|
601
|
-
|
|
601
|
+
e as isSafeOwner,
|
|
602
|
+
i as isSafeSupportedNetwork,
|
|
602
603
|
i2 as isSupportedChainId,
|
|
603
|
-
|
|
604
|
+
d as isValidSafe,
|
|
604
605
|
m2 as mapChainIdToChain,
|
|
605
606
|
useAuthAccount,
|
|
606
607
|
useClientToEthersSigner,
|
package/dist/safe/constants.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const SafeSupportedNetworks: z.ZodReadonly<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<11155111>, z.ZodLiteral<42161>]>>;
|
|
3
3
|
export type SafeSupportedNetworks = z.infer<typeof SafeSupportedNetworks>;
|
|
4
|
+
export declare function isSafeSupportedNetwork(network: any): network is SafeSupportedNetworks;
|
|
4
5
|
export declare const SafeSupportedNetworkNames: {
|
|
5
6
|
readonly 42161: {
|
|
6
7
|
readonly shortName: "arb1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/safe/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,qBAAqB,oGAErB,CAAA;AACb,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAWrC,CAAA;AAED,eAAO,MAAM,YAAY;;;;CAIiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/safe/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,qBAAqB,oGAErB,CAAA;AACb,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,qBAAqB,CAErF;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAWrC,CAAA;AAED,eAAO,MAAM,YAAY;;;;CAIiC,CAAA"}
|
package/dist/safe/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, S, c, b, f,
|
|
1
|
+
import { A, a, S, c, b, f, e, i, d } from "../utils-CQnV98OX.js";
|
|
2
2
|
export {
|
|
3
3
|
A as ApiKitUrlMap,
|
|
4
4
|
a as SafeSupportedNetworkNames,
|
|
@@ -6,6 +6,7 @@ export {
|
|
|
6
6
|
c as createApiKit,
|
|
7
7
|
b as createSafe,
|
|
8
8
|
f as fetchOwnedSafes,
|
|
9
|
-
|
|
10
|
-
i as
|
|
9
|
+
e as isSafeOwner,
|
|
10
|
+
i as isSafeSupportedNetwork,
|
|
11
|
+
d as isValidSafe
|
|
11
12
|
};
|
|
@@ -81,6 +81,9 @@ function buildClient({ chain = DefChain, infuraKey }) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
const SafeSupportedNetworks = z.union([z.literal(L1Chain.id), z.literal(L1ChainTestnet.id), z.literal(L2Chain.id)]).readonly();
|
|
84
|
+
function isSafeSupportedNetwork(network) {
|
|
85
|
+
return SafeSupportedNetworks.safeParse(network).success;
|
|
86
|
+
}
|
|
84
87
|
const SafeSupportedNetworkNames = {
|
|
85
88
|
[L2Chain.id]: { shortName: "arb1", name: L2Chain.name, id: L2Chain.id },
|
|
86
89
|
[L1Chain.id]: { shortName: "eth", name: L1Chain.name, id: L1Chain.id },
|
|
@@ -276,20 +279,21 @@ export {
|
|
|
276
279
|
SafeSupportedNetworkNames as a,
|
|
277
280
|
createSafe as b,
|
|
278
281
|
createApiKit as c,
|
|
279
|
-
|
|
280
|
-
|
|
282
|
+
isValidSafe as d,
|
|
283
|
+
isSafeOwner as e,
|
|
281
284
|
fetchOwnedSafes as f,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
285
|
+
buildInfuraHttpTransport as g,
|
|
286
|
+
isBuildPublicClientArgs as h,
|
|
287
|
+
isSafeSupportedNetwork as i,
|
|
288
|
+
buildPublicClient as j,
|
|
289
|
+
BuildClientArgs as k,
|
|
290
|
+
buildClient as l,
|
|
291
|
+
AUTH_STORAGE_KEY as m,
|
|
292
|
+
L1ChainTestnet as n,
|
|
293
|
+
L2Chain as o,
|
|
294
|
+
L2ChainTestnet as p,
|
|
295
|
+
SupportedClientChainId as q,
|
|
296
|
+
SupportedClientChains as r,
|
|
297
|
+
RequiredWalletConnectProjectId as s,
|
|
298
|
+
GraphAuthKitProps as t
|
|
295
299
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "@theme-ui/core/jsx-runtime";
|
|
|
2
2
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
3
3
|
import { useConnect, useDisconnect, useAccountEffect, useConfig, WagmiProvider, createConfig, createStorage, cookieStorage, cookieToInitialState } from "wagmi";
|
|
4
4
|
import { injected, walletConnect, coinbaseWallet, mock } from "wagmi/connectors";
|
|
5
|
-
import {
|
|
5
|
+
import { q as SupportedClientChainId, D as DefChain, o as L2Chain, p as L2ChainTestnet, n as L1ChainTestnet, L as L1Chain, S as SafeSupportedNetworks, M as MULTISIG_AUTH_STORAGE_KEY, m as AUTH_STORAGE_KEY, j as buildPublicClient, e as isSafeOwner, G as GraphAuthKitConnector, a as SafeSupportedNetworkNames, d as isValidSafe, l as buildClient, R as RequiredInfuraKey } from "./utils-CQnV98OX.js";
|
|
6
6
|
import { createContext, useContext, useRef, useState, useReducer, useEffect } from "react";
|
|
7
7
|
import { Icon, ExperimentalButton, Alert, Divider, Link, ExperimentalSelect, ExperimentalInput, List, ExperimentalModal, ExperimentalLoadingIndicator } from "@edgeandnode/gds";
|
|
8
8
|
import { isAddress } from "viem";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgeandnode/graph-auth-kit",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Wallet authentication connect kit in The Graph suite of applications",
|
|
6
6
|
"author": "Edge & Node",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"viem": "2.21.19",
|
|
70
70
|
"wagmi": "2.12.17",
|
|
71
71
|
"@edgeandnode/common": "^6.24.2",
|
|
72
|
-
"@edgeandnode/gds": "^5.31.5",
|
|
73
72
|
"@edgeandnode/go": "^6.55.2",
|
|
73
|
+
"@edgeandnode/gds": "^5.31.5",
|
|
74
74
|
"@edgeandnode/test-utils": "^2.0.1"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|