@graphprotocol/graph-auth-kit 7.8.1 → 7.9.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 CHANGED
@@ -44,6 +44,7 @@ Properties:
44
44
 
45
45
  - `config` -> [REQUIRED]. The instantiated [wagmi config](https://wagmi.sh/react/api/createConfig) instance.
46
46
  - `queryClient` -> [OPTIONAL]. The `GraphAuthKitProvider` renders a `QueryClientProvider` instance. Pass in an instantiated `QueryClient` to use, otherwise, `GraphAuthKit` will instantiate its own.
47
+ - `safePollingDelay` -> [OPTIONAL]. Delay in milliseconds between Safe transaction status requests from `useClientToEthersSigner`. Defaults to `5000`; set `safePollingDelay={30_000}` to reduce waiting requests. Must be finite and between `5000` and `2147483647`, otherwise constructing the Safe signer throws a `RangeError`. The first check is immediate; subsequent retries use this delay. Longer delays postpone recognition of execution. This does not configure Wagmi polling or the separate `useWaitForSafeTransaction` hook.
47
48
  - `infuraKey` -> [REQUIRED]
48
49
  - `gatewayApiKey` -> [OPTIONAL]. A The Graph Gateway API key used to query Subgraphs published on the Graph Network. Used for ENS name resolution
49
50
 
@@ -27,6 +27,8 @@ export type GraphAuthKitProviderProps<config extends Config = ResolvedRegister['
27
27
  */
28
28
  queryClient?: QueryClient;
29
29
  safeApiKey?: string;
30
+ /** Safe transaction status polling delay in milliseconds (5,000–2,147,483,647). Defaults to 5,000. */
31
+ safePollingDelay?: number;
30
32
  } & Readonly<{
31
33
  children: ReactNode;
32
34
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"GraphAuthKit.context.d.ts","sourceRoot":"","sources":["../src/GraphAuthKit.context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAuB,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAgC,MAAM,OAAO,CAAA;AAIxF,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 @@ const defInnerState = {
353
353
  _infuraKey: "",
354
354
  _gatewayApiKey: null,
355
355
  _safeApiKey: void 0,
356
+ _safePollingDelay: void 0,
356
357
  // just a default value so that the context can be initialized. overridden in the provider
357
358
  _ensResolver: {
358
359
  async resolveEnsName() {
@@ -402,6 +403,7 @@ function GraphAuthKitInnerContextProvider({
402
403
  infuraKey,
403
404
  gatewayApiKey,
404
405
  safeApiKey,
406
+ safePollingDelay,
405
407
  children
406
408
  }) {
407
409
  const { connect } = useConnect({ config });
@@ -541,6 +543,7 @@ function GraphAuthKitInnerContextProvider({
541
543
  _infuraKey: infuraKey,
542
544
  _gatewayApiKey: gatewayApiKey,
543
545
  _safeApiKey: safeApiKey,
546
+ _safePollingDelay: safePollingDelay,
544
547
  _ensResolver: buildEnsResolver({ infuraKey, gatewayApiKey }),
545
548
  _connectModalOpen,
546
549
  _setConnectModalOpen: setConnectModalOpen,
package/dist/ens/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { u, a, b, c } from "../useGraphAuthKitEnsNames-DHMYvwgX.js";
1
+ import { u, a, b, c } from "../useGraphAuthKitEnsNames-BOTbNQrR.js";
2
2
  export {
3
3
  u as useGraphAuthKitAvatar,
4
4
  a as useGraphAuthKitAvatars,
@@ -8,7 +8,7 @@ import { useMemo, useState, useEffect } from "react";
8
8
  import { encodeFunctionData, getAddress, isAddress } from "viem";
9
9
  import { useChainId, useConnectorClient, useAccount, useConfig, useAccountEffect, useWalletClient } from "wagmi";
10
10
  import { writeContractMutationOptions } from "wagmi/query";
11
- import { b as createSafe, c as createApiKit, K as useGraphAuthKitInnerContext, I as clientToProvider, w as GraphAuthKitConnector, M as MULTISIG_AUTH_STORAGE_KEY, N as MultisigSchema } from "./GraphAuthKitInner.context-B3nCqd7x.js";
11
+ import { b as createSafe, c as createApiKit, K as useGraphAuthKitInnerContext, I as clientToProvider, w as GraphAuthKitConnector, M as MULTISIG_AUTH_STORAGE_KEY, N as MultisigSchema } from "./GraphAuthKitInner.context-DFDaC5w3.js";
12
12
  import { VoidSigner } from "@ethersproject/abstract-signer";
13
13
  import "@safe-global/protocol-kit";
14
14
  import { OperationType } from "@safe-global/types-kit";
@@ -115,6 +115,10 @@ class SafeEthersSigner extends VoidSigner {
115
115
  this.signerAddress = signerAddress;
116
116
  this.safeAddress = safeAddress;
117
117
  this.chainId = chainId;
118
+ const pollingDelay = options == null ? void 0 : options.pollingDelay;
119
+ if (pollingDelay !== void 0 && (!Number.isFinite(pollingDelay) || pollingDelay < 5e3 || pollingDelay > 2147483647)) {
120
+ throw new RangeError("Safe pollingDelay must be a finite number between 5000 and 2147483647 milliseconds");
121
+ }
118
122
  this.options = options;
119
123
  }
120
124
  async createSafeInstance() {
@@ -311,7 +315,7 @@ function safeViemActions(safeAddress, chainId, safeApiKey) {
311
315
  function useClientToEthersSigner() {
312
316
  const chainId = useChainId();
313
317
  const { data: client, ...rest } = useConnectorClient({ chainId });
314
- const { _enteredMultisigInfo, _safeApiKey } = useGraphAuthKitInnerContext();
318
+ const { _enteredMultisigInfo, _safeApiKey, _safePollingDelay } = useGraphAuthKitInnerContext();
315
319
  return useMemo(() => {
316
320
  if (rest.error) {
317
321
  return { signer: void 0, ...rest };
@@ -328,12 +332,12 @@ function useClientToEthersSigner() {
328
332
  provider,
329
333
  client.account.address,
330
334
  chainId,
331
- { apiKey: _safeApiKey }
335
+ { apiKey: _safeApiKey, pollingDelay: _safePollingDelay }
332
336
  );
333
337
  return { signer: safeEthersSigner, type: "multisig", ...rest };
334
338
  }
335
339
  return { signer: provider.getSigner(), type: "eoa", ...rest };
336
- }, [chainId, client, rest.status, rest.error, _enteredMultisigInfo, _safeApiKey]);
340
+ }, [chainId, client, rest.status, rest.error, _enteredMultisigInfo, _safeApiKey, _safePollingDelay]);
337
341
  }
338
342
  function useGraphAuthKitConnector() {
339
343
  const account = useGraphAuthKitAccount();
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { m, A, k, B, D, w, G, L, n, o, p, M, O, v, R, u, a, S, q, r, s, t, l, g, j, x, I, J, c, b, f, h, E, C, F, H, e, i, y, d, z } from "./GraphAuthKitInner.context-B3nCqd7x.js";
3
- import { G as G2, a as a2, M as M2, b as b2, d as d2, u as u2 } from "./utils-Br1fBg8o.js";
4
- import { a as useGraphAuthKitAccount, b as useGraphAuthKitConnector } from "./hooks-D5Hw1GuR.js";
5
- import { S as S2, m as m2, d as d3, c as c2, e as e2, f as f2, g as g2, u as u3 } from "./hooks-D5Hw1GuR.js";
6
- import { g as g3, u as u4, w as w2 } from "./useWaitForSafeTransaction-YeFsJ9A5.js";
2
+ import { m, A, k, B, D, w, G, L, n, o, p, M, O, v, R, u, a, S, q, r, s, t, l, g, j, x, I, J, c, b, f, h, E, C, F, H, e, i, y, d, z } from "./GraphAuthKitInner.context-DFDaC5w3.js";
3
+ import { G as G2, a as a2, M as M2, b as b2, d as d2, u as u2 } from "./utils-CHmOZz26.js";
4
+ import { a as useGraphAuthKitAccount, b as useGraphAuthKitConnector } from "./hooks-DeU86P4k.js";
5
+ import { S as S2, m as m2, d as d3, c as c2, e as e2, f as f2, g as g2, u as u3 } from "./hooks-DeU86P4k.js";
6
+ import { g as g3, u as u4, w as w2 } from "./useWaitForSafeTransaction-DqUJ6JOu.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Alert, ExperimentalButton } from "@graphprotocol/gds";
9
9
  import { useConfig, useSwitchChain } from "wagmi";
10
- import { u as u5, a as a3, b as b3, c as c3 } from "./useGraphAuthKitEnsNames-DHMYvwgX.js";
10
+ import { u as u5, a as a3, b as b3, c as c3 } from "./useGraphAuthKitEnsNames-BOTbNQrR.js";
11
11
  function Connected({ children }) {
12
12
  const account = useGraphAuthKitAccount();
13
13
  const connector = useGraphAuthKitConnector();
@@ -21,6 +21,8 @@ export type GraphAuthKitInnerState = {
21
21
  _gatewayApiKey: OptionalGatewayApiKey['gatewayApiKey'];
22
22
  /** Safe API key passed down from the top-level provider/app */
23
23
  _safeApiKey?: string;
24
+ /** Safe transaction status polling delay in milliseconds. */
25
+ _safePollingDelay?: number;
24
26
  /** Access to a EnsResolverConfig instance. */
25
27
  _ensResolver: EnsResolverConfig;
26
28
  /** The ConnectModal open state */
@@ -80,6 +82,7 @@ export declare const defInnerState: {
80
82
  readonly _infuraKey: "";
81
83
  readonly _gatewayApiKey: null;
82
84
  readonly _safeApiKey: undefined;
85
+ readonly _safePollingDelay: undefined;
83
86
  readonly _ensResolver: {
84
87
  readonly resolveEnsName: () => Promise<null>;
85
88
  readonly resolveEnsNamesBatch: () => Promise<{}>;
@@ -115,7 +118,8 @@ export type GraphAuthKitInnerContextProviderProps<config extends Config = Resolv
115
118
  infuraKey: RequiredInfuraKey['infuraKey'];
116
119
  gatewayApiKey: OptionalGatewayApiKey['gatewayApiKey'];
117
120
  safeApiKey?: string;
121
+ safePollingDelay?: number;
118
122
  children: ReactNode;
119
123
  }>;
120
- export declare function GraphAuthKitInnerContextProvider<const config extends Config = ResolvedRegister['config']>({ config, infuraKey, gatewayApiKey, safeApiKey, children, }: GraphAuthKitInnerContextProviderProps): import("react/jsx-runtime").JSX.Element;
124
+ export declare function GraphAuthKitInnerContextProvider<const config extends Config = ResolvedRegister['config']>({ config, infuraKey, gatewayApiKey, safeApiKey, safePollingDelay, children, }: GraphAuthKitInnerContextProviderProps): import("react/jsx-runtime").JSX.Element;
121
125
  //# sourceMappingURL=GraphAuthKitInner.context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GraphAuthKitInner.context.d.ts","sourceRoot":"","sources":["../../src/inner/GraphAuthKitInner.context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,EAAiB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAA;AAClG,OAAO,EAAE,KAAK,OAAO,EAAa,MAAM,MAAM,CAAA;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAE,K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;;;;;;;;;;;;;;;;;;;;;;CAkCiB,CAAA;AAC3C,eAAO,MAAM,wBAAwB,iDAAuD,CAAA;AAE5F;;;;;;GAMG;AACH,wBAAgB,2BAA2B,2BAE1C;AAED,MAAM,MAAM,qCAAqC,CAAC,MAAM,SAAS,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;IAC/G,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IACzC,aAAa,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAA;IACrD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAC,CAAA;AACF,wBAAgB,gCAAgC,CAAC,KAAK,CAAC,MAAM,SAAS,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,EAAE,EACzG,MAAM,EACN,SAAS,EACT,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,EAAE,qCAAqC,2CAiOvC"}
@@ -11,6 +11,7 @@ export interface SafeTransactionResponse extends TransactionResponse {
11
11
  operation: OperationType;
12
12
  }
13
13
  export interface SafeEthersSignerOptions {
14
+ /** Delay between Safe status requests in milliseconds (5,000–2,147,483,647). Defaults to 5,000. */
14
15
  pollingDelay?: number;
15
16
  apiKey?: string;
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SafeEthersSigner.d.ts","sourceRoot":"","sources":["../../src/safe/SafeEthersSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACnH,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAA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gBAGjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,SAAS,CAAC,YAAY,EAChC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,qBAAqB,EAC9B,OAAO,CAAC,EAAE,uBAAuB;IAiB7B,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAcnC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAOtC,oBAAoB;IAId,iBAAiB;IAOjB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAU/B,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAqCjH;;;;;OAKG;IACY,eAAe,CAAC,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAkD9G"}
@@ -1,6 +1,6 @@
1
- import { A, a, S, c, b, f, e, i, d } from "../GraphAuthKitInner.context-B3nCqd7x.js";
2
- import { S as S2, m } from "../hooks-D5Hw1GuR.js";
3
- import { g, u, w } from "../useWaitForSafeTransaction-YeFsJ9A5.js";
1
+ import { A, a, S, c, b, f, e, i, d } from "../GraphAuthKitInner.context-DFDaC5w3.js";
2
+ import { S as S2, m } from "../hooks-DeU86P4k.js";
3
+ import { g, u, w } from "../useWaitForSafeTransaction-DqUJ6JOu.js";
4
4
  export {
5
5
  A as ApiKitUrlMap,
6
6
  S2 as SafeEthersSigner,
@@ -1,4 +1,4 @@
1
- import { M, b, d } from "../utils-Br1fBg8o.js";
1
+ import { M, b, d } from "../utils-CHmOZz26.js";
2
2
  export {
3
3
  M as MockGraphAuthKitProvider,
4
4
  b as buildMockProviderState,
@@ -2,8 +2,8 @@
2
2
  import { createIdenticon } from "@graphprotocol/gds";
3
3
  import { getEnsAvatarQueryKey, getEnsNameQueryKey } from "@wagmi/core/query";
4
4
  import { useQuery } from "wagmi/query";
5
- import { K as useGraphAuthKitInnerContext, y as isSupportedChainId, o as L2Chain, n as L1ChainTestnet, p as L2ChainTestnet, L as L1Chain } from "./GraphAuthKitInner.context-B3nCqd7x.js";
6
- import { a as useGraphAuthKitAccount } from "./hooks-D5Hw1GuR.js";
5
+ import { K as useGraphAuthKitInnerContext, y as isSupportedChainId, o as L2Chain, n as L1ChainTestnet, p as L2ChainTestnet, L as L1Chain } from "./GraphAuthKitInner.context-DFDaC5w3.js";
6
+ import { a as useGraphAuthKitAccount } from "./hooks-DeU86P4k.js";
7
7
  import { useChainId } from "wagmi";
8
8
  function useGraphAuthKitAvatar(args = {}) {
9
9
  const innerCtx = useGraphAuthKitInnerContext();
@@ -1,7 +1,7 @@
1
1
  import { useQuery } from "@tanstack/react-query";
2
2
  import { useConfig } from "wagmi";
3
- import { u as useMultisigInfo } from "./hooks-D5Hw1GuR.js";
4
- import { c as createApiKit } from "./GraphAuthKitInner.context-B3nCqd7x.js";
3
+ import { u as useMultisigInfo } from "./hooks-DeU86P4k.js";
4
+ import { c as createApiKit } from "./GraphAuthKitInner.context-DFDaC5w3.js";
5
5
  async function getSafeTransaction(safeTxHash, network, safeApiKey) {
6
6
  const apiKit = await createApiKit(network, safeApiKey);
7
7
  const txDetails = await apiKit.getTransaction(safeTxHash);
@@ -3,7 +3,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
4
4
  import { useConfig, WagmiProvider, useDisconnect, createConfig, createStorage, cookieStorage, cookieToInitialState } from "wagmi";
5
5
  import { injected, walletConnect, coinbaseWallet, mock } from "wagmi/connectors";
6
- import { K as useGraphAuthKitInnerContext, w as GraphAuthKitConnector, o as L2Chain, a as SafeSupportedNetworkNames, j as buildPublicClient, L as L1Chain, n as L1ChainTestnet, d as isValidSafe, S as SafeSupportedNetworks, P as GraphAuthKitInnerContextProvider, p as L2ChainTestnet, m as AUTH_STORAGE_KEY, x as chainIsSupportedChain, D as DefChain, l as buildClient, Q as GraphAuthKitInnerContext, T as defInnerState, R as RequiredInfuraKey, O as OptionalGatewayApiKey, q as SupportedClientChainId } from "./GraphAuthKitInner.context-B3nCqd7x.js";
6
+ import { K as useGraphAuthKitInnerContext, w as GraphAuthKitConnector, o as L2Chain, a as SafeSupportedNetworkNames, j as buildPublicClient, L as L1Chain, n as L1ChainTestnet, d as isValidSafe, S as SafeSupportedNetworks, P as GraphAuthKitInnerContextProvider, p as L2ChainTestnet, m as AUTH_STORAGE_KEY, x as chainIsSupportedChain, D as DefChain, l as buildClient, Q as GraphAuthKitInnerContext, T as defInnerState, R as RequiredInfuraKey, O as OptionalGatewayApiKey, q as SupportedClientChainId } from "./GraphAuthKitInner.context-DFDaC5w3.js";
7
7
  import { useState, useReducer, useId, useEffect, createContext, useContext } from "react";
8
8
  import { Icon, ExperimentalModal, ExperimentalButton, Alert, Link, ExperimentalLoadingIndicator, ExperimentalSelect, ExperimentalInput, Divider, List } from "@graphprotocol/gds";
9
9
  import { addrShortener } from "@graphprotocol/common";
@@ -573,6 +573,7 @@ function GraphAuthKitProvider(props) {
573
573
  infuraKey: props.infuraKey,
574
574
  gatewayApiKey: props.gatewayApiKey,
575
575
  safeApiKey: props.safeApiKey,
576
+ safePollingDelay: props.safePollingDelay,
576
577
  children: /* @__PURE__ */ jsx(GraphAuthKitContent, { config: props.config, children: props.children })
577
578
  }
578
579
  ) }) });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-auth-kit",
3
3
  "private": false,
4
- "version": "7.8.1",
4
+ "version": "7.9.0",
5
5
  "description": "Wallet authentication connect kit in The Graph suite of applications",
6
6
  "author": "Edge & Node",
7
7
  "license": "UNLICENSED",
@@ -55,9 +55,9 @@
55
55
  "viem": "^2.37",
56
56
  "wagmi": "^2.17",
57
57
  "@graphprotocol/ens": "^2.3.1",
58
- "@graphprotocol/common": "^7.0.4",
59
- "@graphprotocol/go": "^10.5.2",
60
- "@graphprotocol/gds": "^6.9.1"
58
+ "@graphprotocol/go": "^10.5.4",
59
+ "@graphprotocol/gds": "^6.9.3",
60
+ "@graphprotocol/common": "^7.0.4"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@emotion/react": "^11.14",
@@ -74,12 +74,12 @@
74
74
  "ts-node": "^10.9.2",
75
75
  "viem": "^2.37.8",
76
76
  "wagmi": "^2.17.2",
77
- "@graphprotocol/common": "^7.0.4",
78
77
  "@graphprotocol/ens": "^2.3.1",
79
- "@graphprotocol/go": "^10.5.2",
80
- "@graphprotocol/jsx": "^1.1.0",
81
- "@graphprotocol/gds": "^6.9.1",
82
- "@graphprotocol/test-utils": "^2.1.0"
78
+ "@graphprotocol/go": "^10.5.4",
79
+ "@graphprotocol/gds": "^6.9.3",
80
+ "@graphprotocol/common": "^7.0.4",
81
+ "@graphprotocol/test-utils": "^2.1.0",
82
+ "@graphprotocol/jsx": "^1.1.0"
83
83
  },
84
84
  "scripts": {
85
85
  "build": "vite build",