@graphprotocol/graph-auth-kit 7.8.1
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 +303 -0
- package/dist/Components/ConnectModal.d.ts +2 -0
- package/dist/Components/ConnectModal.d.ts.map +1 -0
- package/dist/Components/Connected.d.ts +33 -0
- package/dist/Components/Connected.d.ts.map +1 -0
- package/dist/Components/ConnectorOption.d.ts +7 -0
- package/dist/Components/ConnectorOption.d.ts.map +1 -0
- package/dist/Components/Disconnected.d.ts +28 -0
- package/dist/Components/Disconnected.d.ts.map +1 -0
- package/dist/Components/MultisigSignerOptions.d.ts +2 -0
- package/dist/Components/MultisigSignerOptions.d.ts.map +1 -0
- package/dist/Components/PrimaryConnectOptions.d.ts +2 -0
- package/dist/Components/PrimaryConnectOptions.d.ts.map +1 -0
- package/dist/Components/SafeInputForm.d.ts +2 -0
- package/dist/Components/SafeInputForm.d.ts.map +1 -0
- package/dist/Components/SafeSelection.d.ts +2 -0
- package/dist/Components/SafeSelection.d.ts.map +1 -0
- package/dist/Components/SwitchChain.d.ts +24 -0
- package/dist/Components/SwitchChain.d.ts.map +1 -0
- package/dist/Components/index.d.ts +4 -0
- package/dist/Components/index.d.ts.map +1 -0
- package/dist/GraphAuthKit.context.d.ts +130 -0
- package/dist/GraphAuthKit.context.d.ts.map +1 -0
- package/dist/GraphAuthKitInner.context-B3nCqd7x.js +629 -0
- package/dist/client.d.ts +12519 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/constants.d.ts +366 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/ens/hooks/index.d.ts +5 -0
- package/dist/ens/hooks/index.d.ts.map +1 -0
- package/dist/ens/hooks/useGraphAuthKitAvatar.d.ts +55 -0
- package/dist/ens/hooks/useGraphAuthKitAvatar.d.ts.map +1 -0
- package/dist/ens/hooks/useGraphAuthKitAvatars.d.ts +29 -0
- package/dist/ens/hooks/useGraphAuthKitAvatars.d.ts.map +1 -0
- package/dist/ens/hooks/useGraphAuthKitEnsName.d.ts +52 -0
- package/dist/ens/hooks/useGraphAuthKitEnsName.d.ts.map +1 -0
- package/dist/ens/hooks/useGraphAuthKitEnsNames.d.ts +28 -0
- package/dist/ens/hooks/useGraphAuthKitEnsNames.d.ts.map +1 -0
- package/dist/ens/index.d.ts +2 -0
- package/dist/ens/index.d.ts.map +1 -0
- package/dist/ens/index.js +7 -0
- package/dist/errors.d.ts +21 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/hooks-D5Hw1GuR.js +511 -0
- package/dist/hooks.d.ts +125 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +141 -0
- package/dist/inner/GraphAuthKitInner.context.d.ts +121 -0
- package/dist/inner/GraphAuthKitInner.context.d.ts.map +1 -0
- package/dist/inner/hooks.d.ts +13 -0
- package/dist/inner/hooks.d.ts.map +1 -0
- package/dist/inner/index.d.ts +3 -0
- package/dist/inner/index.d.ts.map +1 -0
- package/dist/safe/SafeEthersSigner.d.ts +39 -0
- package/dist/safe/SafeEthersSigner.d.ts.map +1 -0
- package/dist/safe/SafeMinimal.abi.d.ts +80 -0
- package/dist/safe/SafeMinimal.abi.d.ts.map +1 -0
- package/dist/safe/constants.d.ts +27 -0
- package/dist/safe/constants.d.ts.map +1 -0
- package/dist/safe/index.d.ts +5 -0
- package/dist/safe/index.d.ts.map +1 -0
- package/dist/safe/index.js +19 -0
- package/dist/safe/safeViemActions.d.ts +4 -0
- package/dist/safe/safeViemActions.d.ts.map +1 -0
- package/dist/safe/useWaitForSafeTransaction.d.ts +10 -0
- package/dist/safe/useWaitForSafeTransaction.d.ts.map +1 -0
- package/dist/safe/utils.d.ts +51 -0
- package/dist/safe/utils.d.ts.map +1 -0
- package/dist/test-harness/MockGraphAuthKit.context.d.ts +103 -0
- package/dist/test-harness/MockGraphAuthKit.context.d.ts.map +1 -0
- package/dist/test-harness/index.d.ts +3 -0
- package/dist/test-harness/index.d.ts.map +1 -0
- package/dist/test-harness/index.js +6 -0
- package/dist/test-harness/utils.d.ts +135 -0
- package/dist/test-harness/utils.d.ts.map +1 -0
- package/dist/types.d.ts +37 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/useGraphAuthKitEnsNames-DHMYvwgX.js +211 -0
- package/dist/useWaitForSafeTransaction-YeFsJ9A5.js +46 -0
- package/dist/utils-Br1fBg8o.js +897 -0
- package/dist/utils.d.ts +20 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +98 -0
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { providers } from 'ethers';
|
|
2
|
+
import { Account, Address, Chain, Client, Transport } from 'viem';
|
|
3
|
+
import { PublicClient } from './client';
|
|
4
|
+
import { SupportedClientChainId, SupportedClientChains } from './constants';
|
|
5
|
+
export declare function chainIsSupportedChain(chain: Chain): chain is SupportedClientChains;
|
|
6
|
+
export declare function isSupportedChainId(chainId: any): chainId is SupportedClientChainId;
|
|
7
|
+
export declare function mapChainIdToChain(chainId: number): SupportedClientChains;
|
|
8
|
+
export declare function isChainL2(chain: number): boolean;
|
|
9
|
+
export declare function isChainL1(chain: number): boolean;
|
|
10
|
+
export declare function isChainMainnet(chain: number): boolean;
|
|
11
|
+
export declare function isChainTestnet(chain: number): boolean;
|
|
12
|
+
export declare function clientToProvider(client: Client<Transport, Chain, Account>): providers.Web3Provider;
|
|
13
|
+
/**
|
|
14
|
+
* Test whether the given wallet is a multisig or EoA
|
|
15
|
+
* @param client connected public client instance
|
|
16
|
+
* @param address the connected wallet to test
|
|
17
|
+
* @returns true if the connected wallet is an EoA, false if it is a multisig contract
|
|
18
|
+
*/
|
|
19
|
+
export declare function connectedWalletIsEoA(client: PublicClient, address: Address): Promise<boolean>;
|
|
20
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAML,sBAAsB,EACtB,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAA;AAEpB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,qBAAqB,CAElF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,sBAAsB,CAElF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,CAgBxE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEhD;AACD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEhD;AACD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD;AACD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,0BASzE;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAInG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@graphprotocol/graph-auth-kit",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "7.8.1",
|
|
5
|
+
"description": "Wallet authentication connect kit in The Graph suite of applications",
|
|
6
|
+
"author": "Edge & Node",
|
|
7
|
+
"license": "UNLICENSED",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/graphprotocol/components.git",
|
|
11
|
+
"directory": "packages/graph-auth-kit"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./safe": {
|
|
22
|
+
"types": "./dist/safe/index.d.ts",
|
|
23
|
+
"default": "./dist/safe/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./test-harness": {
|
|
26
|
+
"types": "./dist/test-harness/index.d.ts",
|
|
27
|
+
"default": "./dist/test-harness/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./ens": {
|
|
30
|
+
"types": "./dist/ens/index.d.ts",
|
|
31
|
+
"default": "./dist/ens/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@ensdomains/ensjs": "^4.0.2",
|
|
40
|
+
"@ethersproject/abstract-signer": "^5.8.0",
|
|
41
|
+
"@safe-global/api-kit": "^4.0.0",
|
|
42
|
+
"@safe-global/protocol-kit": "^6.1.1",
|
|
43
|
+
"@safe-global/types-kit": "^3.0.0",
|
|
44
|
+
"@wagmi/core": "^2.21.1",
|
|
45
|
+
"tailwindcss": "^3.4.17",
|
|
46
|
+
"zod": "^4.1.11"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@emotion/react": "^11",
|
|
50
|
+
"@tanstack/react-query": "^5.90",
|
|
51
|
+
"ethers": "^5.7.2",
|
|
52
|
+
"react": "^18",
|
|
53
|
+
"react-dom": "^18",
|
|
54
|
+
"theme-ui": ">=0.16",
|
|
55
|
+
"viem": "^2.37",
|
|
56
|
+
"wagmi": "^2.17",
|
|
57
|
+
"@graphprotocol/ens": "^2.3.1",
|
|
58
|
+
"@graphprotocol/common": "^7.0.4",
|
|
59
|
+
"@graphprotocol/go": "^10.5.2",
|
|
60
|
+
"@graphprotocol/gds": "^6.9.1"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@emotion/react": "^11.14",
|
|
64
|
+
"@ethersproject/abstract-provider": "^5.8.0",
|
|
65
|
+
"@ethersproject/properties": "^5.8.0",
|
|
66
|
+
"@tanstack/react-query": "^5.90.2",
|
|
67
|
+
"@types/react": "^18.3.20",
|
|
68
|
+
"@types/react-dom": "^18.3.6",
|
|
69
|
+
"dotenv": "^17.2.2",
|
|
70
|
+
"ethers": "^5.8.0",
|
|
71
|
+
"postcss": "^8.5.6",
|
|
72
|
+
"react": "^18.3.1",
|
|
73
|
+
"react-dom": "^18.3.1",
|
|
74
|
+
"ts-node": "^10.9.2",
|
|
75
|
+
"viem": "^2.37.8",
|
|
76
|
+
"wagmi": "^2.17.2",
|
|
77
|
+
"@graphprotocol/common": "^7.0.4",
|
|
78
|
+
"@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"
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"build": "vite build",
|
|
86
|
+
"check": "pnpm typecheck && pnpm lint && pnpm prettier:check",
|
|
87
|
+
"check:fix": "pnpm lint:fix; pnpm prettier",
|
|
88
|
+
"lint": "eslint . --max-warnings 0",
|
|
89
|
+
"lint:fix": "eslint . --fix",
|
|
90
|
+
"prettier": "prettier . --write --list-different --ignore-path ../../.prettierignore",
|
|
91
|
+
"prettier:check": "prettier . --check --ignore-path ../../.prettierignore",
|
|
92
|
+
"typecheck": "tsc --noEmit",
|
|
93
|
+
"test": "vitest run",
|
|
94
|
+
"test:coverage": "vitest run --coverage && jest-coverage-badges",
|
|
95
|
+
"test:watch": "vitest",
|
|
96
|
+
"npm:publish": "pnpm publish && git push"
|
|
97
|
+
}
|
|
98
|
+
}
|