@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 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-DE0JzXpv.js";
5
- import { l, A, j, B, D, s, L, m, n, o, R, r, a, S, p, q, k, e, h, f, g, d, i } from "./utils-DE0JzXpv.js";
6
- import { c as clientToProvider, u as useGraphAuthKitInnerContext, a as MultisigSchema } from "./utils-BbKgcpsR.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-BbKgcpsR.js";
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
- l as AUTH_STORAGE_KEY,
561
+ m as AUTH_STORAGE_KEY,
562
562
  A as ApiKitUrlMap,
563
- j as BuildClientArgs,
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
- s as GraphAuthKitProps,
570
+ t as GraphAuthKitProps,
571
571
  f2 as GraphAuthKitProvider,
572
572
  L as L1Chain,
573
- m as L1ChainTestnet,
574
- n as L2Chain,
575
- o as L2ChainTestnet,
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
- r as RequiredWalletConnectProjectId,
579
+ s as RequiredWalletConnectProjectId,
580
580
  a as SafeSupportedNetworkNames,
581
581
  S as SafeSupportedNetworks,
582
- p as SupportedClientChainId,
583
- q as SupportedClientChains,
582
+ q as SupportedClientChainId,
583
+ r as SupportedClientChains,
584
584
  SwitchChain,
585
- k as buildClient,
586
- e as buildInfuraHttpTransport,
585
+ l as buildClient,
586
+ g as buildInfuraHttpTransport,
587
587
  b as buildMockProviderState,
588
- h as buildPublicClient,
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
- g as isBuildPublicClientArgs,
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
- d as isSafeOwner,
601
+ e as isSafeOwner,
602
+ i as isSafeSupportedNetwork,
602
603
  i2 as isSupportedChainId,
603
- i as isValidSafe,
604
+ d as isValidSafe,
604
605
  m2 as mapChainIdToChain,
605
606
  useAuthAccount,
606
607
  useClientToEthersSigner,
@@ -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"}
@@ -1,4 +1,4 @@
1
- import { A, a, S, c, b, f, d, i } from "../utils-DE0JzXpv.js";
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
- d as isSafeOwner,
10
- i as isValidSafe
9
+ e as isSafeOwner,
10
+ i as isSafeSupportedNetwork,
11
+ d as isValidSafe
11
12
  };
@@ -1,4 +1,4 @@
1
- import { M, b, d } from "../utils-BbKgcpsR.js";
1
+ import { M, b, d } from "../utils-Des8_iyZ.js";
2
2
  export {
3
3
  M as MockGraphAuthKitProvider,
4
4
  b as buildMockProviderState,
@@ -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
- isSafeOwner as d,
280
- buildInfuraHttpTransport as e,
282
+ isValidSafe as d,
283
+ isSafeOwner as e,
281
284
  fetchOwnedSafes as f,
282
- isBuildPublicClientArgs as g,
283
- buildPublicClient as h,
284
- isValidSafe as i,
285
- BuildClientArgs as j,
286
- buildClient as k,
287
- AUTH_STORAGE_KEY as l,
288
- L1ChainTestnet as m,
289
- L2Chain as n,
290
- L2ChainTestnet as o,
291
- SupportedClientChainId as p,
292
- SupportedClientChains as q,
293
- RequiredWalletConnectProjectId as r,
294
- GraphAuthKitProps as s
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 { p as SupportedClientChainId, D as DefChain, n as L2Chain, o as L2ChainTestnet, m as L1ChainTestnet, L as L1Chain, S as SafeSupportedNetworks, M as MULTISIG_AUTH_STORAGE_KEY, l as AUTH_STORAGE_KEY, h as buildPublicClient, d as isSafeOwner, G as GraphAuthKitConnector, a as SafeSupportedNetworkNames, i as isValidSafe, k as buildClient, R as RequiredInfuraKey } from "./utils-DE0JzXpv.js";
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.2",
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": {