@edgeandnode/graph-auth-kit 7.8.0-safe-api-tx-svc-url-1766452950574-83c0e604053aa2586f4a7a08018c885c20aeddc9 → 7.8.0-safe-api-tx-svc-url-1766466186218-357452e3975f5732641d63fea660745f4551ea65
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/{GraphAuthKitInner.context-HNi3qW1p.js → GraphAuthKitInner.context-210wrb8B.js} +13 -13
- package/dist/ens/index.js +1 -1
- package/dist/{hooks-pE4kHRpw.js → hooks-DFTtn3AS.js} +8 -5
- package/dist/hooks.d.ts.map +1 -1
- package/dist/index.js +22 -22
- package/dist/safe/index.js +3 -3
- package/dist/safe/safeViemActions.d.ts +1 -1
- package/dist/safe/safeViemActions.d.ts.map +1 -1
- package/dist/safe/useWaitForSafeTransaction.d.ts +2 -1
- package/dist/safe/useWaitForSafeTransaction.d.ts.map +1 -1
- package/dist/test-harness/index.js +1 -1
- package/dist/{useGraphAuthKitEnsNames-c-TN8vYB.js → useGraphAuthKitEnsNames--W-Jo-EL.js} +2 -2
- package/dist/{useWaitForSafeTransaction-C--5eXmJ.js → useWaitForSafeTransaction-DMOLsrrp.js} +7 -7
- package/dist/{utils-CvWKjLih.js → utils-DubMAgnQ.js} +1 -1
- package/package.json +3 -3
package/dist/{GraphAuthKitInner.context-HNi3qW1p.js → GraphAuthKitInner.context-210wrb8B.js}
RENAMED
|
@@ -582,15 +582,15 @@ function GraphAuthKitInnerContextProvider({
|
|
|
582
582
|
export {
|
|
583
583
|
ApiKitUrlMap as A,
|
|
584
584
|
BuildPublicClientArgs as B,
|
|
585
|
-
|
|
585
|
+
isChainL2 as C,
|
|
586
586
|
DefChain as D,
|
|
587
|
-
|
|
588
|
-
|
|
587
|
+
isChainL1 as E,
|
|
588
|
+
isChainMainnet as F,
|
|
589
589
|
GraphAuthKitProps as G,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
590
|
+
isChainTestnet as H,
|
|
591
|
+
clientToProvider as I,
|
|
592
|
+
connectedWalletIsEoA as J,
|
|
593
|
+
useGraphAuthKitInnerContext as K,
|
|
594
594
|
L1Chain as L,
|
|
595
595
|
MULTISIG_AUTH_STORAGE_KEY as M,
|
|
596
596
|
MultisigSchema as N,
|
|
@@ -620,10 +620,10 @@ export {
|
|
|
620
620
|
SupportedClientChains as r,
|
|
621
621
|
SupportedL1ClientChainId as s,
|
|
622
622
|
SupportedL2ClientChainId as t,
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
623
|
+
RequiredWalletConnectProjectId as u,
|
|
624
|
+
OptionalSafeApiKey as v,
|
|
625
|
+
GraphAuthKitConnector as w,
|
|
626
|
+
chainIsSupportedChain as x,
|
|
627
|
+
isSupportedChainId as y,
|
|
628
|
+
mapChainIdToChain as z
|
|
629
629
|
};
|
package/dist/ens/index.js
CHANGED
|
@@ -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,
|
|
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-210wrb8B.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";
|
|
@@ -235,7 +235,7 @@ class SafeEthersSigner extends VoidSigner {
|
|
|
235
235
|
return this.buildTransactionResponse(safeTxHash, safeTransaction.data);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function safeViemActions(safeAddress, chainId) {
|
|
238
|
+
function safeViemActions(safeAddress, chainId, safeApiKey) {
|
|
239
239
|
return (client) => {
|
|
240
240
|
return {
|
|
241
241
|
async writeContract(parameters) {
|
|
@@ -266,7 +266,7 @@ function safeViemActions(safeAddress, chainId) {
|
|
|
266
266
|
return client.request({ method, params });
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
|
-
const apiKit = await createApiKit(chainId);
|
|
269
|
+
const apiKit = await createApiKit(chainId, safeApiKey);
|
|
270
270
|
const signerAddresses = await client.getAddresses();
|
|
271
271
|
const signerAddress = signerAddresses[0];
|
|
272
272
|
const protocolKit = await createSafe({ provider: eip1193Provider, signer: signerAddress, safeAddress });
|
|
@@ -462,12 +462,15 @@ function useGraphAuthKitAccountEffect(args = {}) {
|
|
|
462
462
|
function useGraphAuthKitWalletClient() {
|
|
463
463
|
const walletClient = useWalletClient();
|
|
464
464
|
const _enteredMultisigInfo = useMultisigInfo();
|
|
465
|
+
const { _safeApiKey } = useGraphAuthKitInnerContext();
|
|
465
466
|
if (!walletClient.data) {
|
|
466
467
|
return walletClient;
|
|
467
468
|
}
|
|
468
|
-
if (_enteredMultisigInfo != null) {
|
|
469
|
+
if (_enteredMultisigInfo != null && _safeApiKey != null) {
|
|
469
470
|
const safeAddress = getAddress(_enteredMultisigInfo.address);
|
|
470
|
-
const safeWalletClient = walletClient.data.extend(
|
|
471
|
+
const safeWalletClient = walletClient.data.extend(
|
|
472
|
+
safeViemActions(safeAddress, _enteredMultisigInfo.network, _safeApiKey)
|
|
473
|
+
);
|
|
471
474
|
return { ...walletClient, data: safeWalletClient };
|
|
472
475
|
}
|
|
473
476
|
return walletClient;
|
package/dist/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,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CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,0BAA0B,CAAC,MAAM,EAAE,OAAO,CAAC,CA8B3G"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { m, A, k, B, D,
|
|
3
|
-
import { G as G2, a as a2, M as M2, b as b2, d as d2, u } from "./utils-
|
|
4
|
-
import { a as useGraphAuthKitAccount, b as useGraphAuthKitConnector } from "./hooks-
|
|
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
|
|
6
|
-
import { g as g3, u as
|
|
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-210wrb8B.js";
|
|
3
|
+
import { G as G2, a as a2, M as M2, b as b2, d as d2, u as u2 } from "./utils-DubMAgnQ.js";
|
|
4
|
+
import { a as useGraphAuthKitAccount, b as useGraphAuthKitConnector } from "./hooks-DFTtn3AS.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-DFTtn3AS.js";
|
|
6
|
+
import { g as g3, u as u4, w as w2 } from "./useWaitForSafeTransaction-DMOLsrrp.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Alert, ExperimentalButton } from "@edgeandnode/gds";
|
|
9
9
|
import { useConfig, useSwitchChain } from "wagmi";
|
|
10
|
-
import { u as
|
|
10
|
+
import { u as u5, a as a3, b as b3, c as c3 } from "./useGraphAuthKitEnsNames--W-Jo-EL.js";
|
|
11
11
|
function Connected({ children }) {
|
|
12
12
|
const account = useGraphAuthKitAccount();
|
|
13
13
|
const connector = useGraphAuthKitConnector();
|
|
@@ -78,7 +78,7 @@ export {
|
|
|
78
78
|
Connected,
|
|
79
79
|
D as DefChain,
|
|
80
80
|
Disconnected,
|
|
81
|
-
|
|
81
|
+
w as GraphAuthKitConnector,
|
|
82
82
|
G2 as GraphAuthKitContext,
|
|
83
83
|
G as GraphAuthKitProps,
|
|
84
84
|
a2 as GraphAuthKitProvider,
|
|
@@ -89,9 +89,9 @@ export {
|
|
|
89
89
|
M as MULTISIG_AUTH_STORAGE_KEY,
|
|
90
90
|
M2 as MockGraphAuthKitProvider,
|
|
91
91
|
O as OptionalGatewayApiKey,
|
|
92
|
-
|
|
92
|
+
v as OptionalSafeApiKey,
|
|
93
93
|
R as RequiredInfuraKey,
|
|
94
|
-
|
|
94
|
+
u as RequiredWalletConnectProjectId,
|
|
95
95
|
S2 as SafeEthersSigner,
|
|
96
96
|
a as SafeSupportedNetworkNames,
|
|
97
97
|
S as SafeSupportedNetworks,
|
|
@@ -104,38 +104,38 @@ export {
|
|
|
104
104
|
g as buildInfuraHttpTransport,
|
|
105
105
|
b2 as buildMockProviderState,
|
|
106
106
|
j as buildPublicClient,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
x as chainIsSupportedChain,
|
|
108
|
+
I as clientToProvider,
|
|
109
|
+
J as connectedWalletIsEoA,
|
|
110
110
|
c as createApiKit,
|
|
111
111
|
b as createSafe,
|
|
112
112
|
d2 as disconnectedMockState,
|
|
113
113
|
f as fetchOwnedSafes,
|
|
114
114
|
g3 as getSafeTransaction,
|
|
115
115
|
h as isBuildPublicClientArgs,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
E as isChainL1,
|
|
117
|
+
C as isChainL2,
|
|
118
|
+
F as isChainMainnet,
|
|
119
|
+
H as isChainTestnet,
|
|
120
120
|
e as isSafeOwner,
|
|
121
121
|
i as isSafeSupportedNetwork,
|
|
122
|
-
|
|
122
|
+
y as isSupportedChainId,
|
|
123
123
|
d as isValidSafe,
|
|
124
|
-
|
|
124
|
+
z as mapChainIdToChain,
|
|
125
125
|
m2 as mapReceipt,
|
|
126
126
|
d3 as useAuthAccount,
|
|
127
127
|
c2 as useClientToEthersSigner,
|
|
128
|
-
|
|
128
|
+
u2 as useGraphAuthKit,
|
|
129
129
|
useGraphAuthKitAccount,
|
|
130
130
|
e2 as useGraphAuthKitAccountEffect,
|
|
131
|
-
|
|
131
|
+
u5 as useGraphAuthKitAvatar,
|
|
132
132
|
a3 as useGraphAuthKitAvatars,
|
|
133
133
|
useGraphAuthKitConnector,
|
|
134
134
|
b3 as useGraphAuthKitEnsName,
|
|
135
135
|
c3 as useGraphAuthKitEnsNames,
|
|
136
136
|
f2 as useGraphAuthKitWalletClient,
|
|
137
137
|
g2 as useGraphAuthKitWriteContract,
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
u3 as useMultisigInfo,
|
|
139
|
+
u4 as useWaitForSafeTransaction,
|
|
140
140
|
w2 as waitForSafeTransation
|
|
141
141
|
};
|
package/dist/safe/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A, a, S, c, b, f, e, i, d } from "../GraphAuthKitInner.context-
|
|
2
|
-
import { S as S2, m } from "../hooks-
|
|
3
|
-
import { g, u, w } from "../useWaitForSafeTransaction-
|
|
1
|
+
import { A, a, S, c, b, f, e, i, d } from "../GraphAuthKitInner.context-210wrb8B.js";
|
|
2
|
+
import { S as S2, m } from "../hooks-DFTtn3AS.js";
|
|
3
|
+
import { g, u, w } from "../useWaitForSafeTransaction-DMOLsrrp.js";
|
|
4
4
|
export {
|
|
5
5
|
A as ApiKitUrlMap,
|
|
6
6
|
S2 as SafeEthersSigner,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Account, Chain, Transport, WalletActions, WalletClient } from 'viem';
|
|
2
2
|
import { SafeSupportedNetworks } from './constants';
|
|
3
|
-
export declare function safeViemActions(safeAddress: string, chainId: SafeSupportedNetworks): <transport extends Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined>(client: WalletClient<transport, chain, account>) => Pick<WalletActions<chain, account>, "writeContract">;
|
|
3
|
+
export declare function safeViemActions(safeAddress: string, chainId: SafeSupportedNetworks, safeApiKey: string): <transport extends Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined>(client: WalletClient<transport, chain, account>) => Pick<WalletActions<chain, account>, "writeContract">;
|
|
4
4
|
//# sourceMappingURL=safeViemActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safeViemActions.d.ts","sourceRoot":"","sources":["../../src/safe/safeViemActions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAGxD,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"safeViemActions.d.ts","sourceRoot":"","sources":["../../src/safe/safeViemActions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAGxD,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,IAEnG,SAAS,SAAS,SAAS,EAC3B,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,EAEzD,QAAQ,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,KAC9C,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,CA6FxD"}
|
|
@@ -3,7 +3,8 @@ import { Config, ResolvedRegister } from 'wagmi';
|
|
|
3
3
|
import { SafeSupportedNetworks } from './constants';
|
|
4
4
|
export declare function getSafeTransaction(safeTxHash: string, network: SafeSupportedNetworks, safeApiKey: string): Promise<SafeMultisigTransactionResponse>;
|
|
5
5
|
export declare function waitForSafeTransation(safeTxHash: string, network: SafeSupportedNetworks, pollingInterval: number | undefined, safeApiKey: string): Promise<SafeMultisigTransactionResponse>;
|
|
6
|
-
export declare function useWaitForSafeTransaction<const config extends Config = ResolvedRegister['config']>({ safeTxHash, }: {
|
|
6
|
+
export declare function useWaitForSafeTransaction<const config extends Config = ResolvedRegister['config']>({ safeTxHash, safeApiKey, }: {
|
|
7
7
|
safeTxHash: string | undefined;
|
|
8
|
+
safeApiKey: string;
|
|
8
9
|
}): import('@tanstack/react-query').UseQueryResult<SafeMultisigTransactionResponse | undefined, Error>;
|
|
9
10
|
//# sourceMappingURL=useWaitForSafeTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWaitForSafeTransaction.d.ts","sourceRoot":"","sources":["../../src/safe/useWaitForSafeTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAA;AAE7E,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAa,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"useWaitForSafeTransaction.d.ts","sourceRoot":"","sources":["../../src/safe/useWaitForSafeTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAA;AAE7E,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAa,MAAM,OAAO,CAAA;AAIrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAGnD,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,4CAI9G;AAED,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,qBAAqB,EAC9B,eAAe,EAAE,MAAM,YAAQ,EAC/B,UAAU,EAAE,MAAM,4CAWnB;AAED,wBAAgB,yBAAyB,CAAC,KAAK,CAAC,MAAM,SAAS,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,EAAE,EAClG,UAAU,EACV,UAAU,GACX,EAAE;IACD,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAA;CACnB,sGAkBA"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { createIdenticon } from "@edgeandnode/gds";
|
|
3
3
|
import { getEnsAvatarQueryKey, getEnsNameQueryKey } from "@wagmi/core/query";
|
|
4
4
|
import { useQuery } from "wagmi/query";
|
|
5
|
-
import {
|
|
6
|
-
import { a as useGraphAuthKitAccount } from "./hooks-
|
|
5
|
+
import { K as useGraphAuthKitInnerContext, y as isSupportedChainId, o as L2Chain, n as L1ChainTestnet, p as L2ChainTestnet, L as L1Chain } from "./GraphAuthKitInner.context-210wrb8B.js";
|
|
6
|
+
import { a as useGraphAuthKitAccount } from "./hooks-DFTtn3AS.js";
|
|
7
7
|
import { useChainId } from "wagmi";
|
|
8
8
|
function useGraphAuthKitAvatar(args = {}) {
|
|
9
9
|
const innerCtx = useGraphAuthKitInnerContext();
|
package/dist/{useWaitForSafeTransaction-C--5eXmJ.js → useWaitForSafeTransaction-DMOLsrrp.js}
RENAMED
|
@@ -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-
|
|
4
|
-
import { c as createApiKit
|
|
3
|
+
import { u as useMultisigInfo } from "./hooks-DFTtn3AS.js";
|
|
4
|
+
import { c as createApiKit } from "./GraphAuthKitInner.context-210wrb8B.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);
|
|
@@ -19,24 +19,24 @@ async function waitForSafeTransation(safeTxHash, network, pollingInterval = 4e3,
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
function useWaitForSafeTransaction({
|
|
22
|
-
safeTxHash
|
|
22
|
+
safeTxHash,
|
|
23
|
+
safeApiKey
|
|
23
24
|
}) {
|
|
24
25
|
const config = useConfig();
|
|
25
|
-
const { _safeApiKey } = useGraphAuthKitInnerContext();
|
|
26
26
|
const _enteredMultisigInfo = useMultisigInfo();
|
|
27
27
|
return useQuery({
|
|
28
28
|
queryKey: ["SafeMultisigTransactionResponse", safeTxHash],
|
|
29
29
|
queryFn: async () => {
|
|
30
|
-
if (!_enteredMultisigInfo || !safeTxHash || !
|
|
30
|
+
if (!_enteredMultisigInfo || !safeTxHash || !safeApiKey) return;
|
|
31
31
|
const txDetails = await waitForSafeTransation(
|
|
32
32
|
safeTxHash,
|
|
33
33
|
_enteredMultisigInfo.network,
|
|
34
34
|
config.getClient().pollingInterval,
|
|
35
|
-
|
|
35
|
+
safeApiKey
|
|
36
36
|
);
|
|
37
37
|
return txDetails;
|
|
38
38
|
},
|
|
39
|
-
enabled: _enteredMultisigInfo != null && safeTxHash != null &&
|
|
39
|
+
enabled: _enteredMultisigInfo != null && safeTxHash != null && safeApiKey != null
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
@@ -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 {
|
|
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-210wrb8B.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 "@edgeandnode/gds";
|
|
9
9
|
import { addrShortener } from "@edgeandnode/common";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgeandnode/graph-auth-kit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "7.8.0-safe-api-tx-svc-url-
|
|
4
|
+
"version": "7.8.0-safe-api-tx-svc-url-1766466186218-357452e3975f5732641d63fea660745f4551ea65",
|
|
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
|
"@edgeandnode/common": "^7.0.4",
|
|
58
|
-
"@edgeandnode/ens": "^2.3.1",
|
|
59
58
|
"@edgeandnode/gds": "^6.9.0",
|
|
60
|
-
"@edgeandnode/go": "^10.5.0"
|
|
59
|
+
"@edgeandnode/go": "^10.5.0",
|
|
60
|
+
"@edgeandnode/ens": "^2.3.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@emotion/react": "^11.14",
|