@seedprotocol/eas 0.5.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.
Files changed (57) hide show
  1. package/dist/EasClient/BaseEasClient.d.ts +16 -0
  2. package/dist/EasClient/BaseEasClient.d.ts.map +1 -0
  3. package/dist/EasClient/IEasClient.d.ts +5 -0
  4. package/dist/EasClient/IEasClient.d.ts.map +1 -0
  5. package/dist/QueryClient/BaseQueryClient.d.ts +9 -0
  6. package/dist/QueryClient/BaseQueryClient.d.ts.map +1 -0
  7. package/dist/QueryClient/IQueryClient.d.ts +15 -0
  8. package/dist/QueryClient/IQueryClient.d.ts.map +1 -0
  9. package/dist/QueryClient/IQueryClientFactory.d.ts +5 -0
  10. package/dist/QueryClient/IQueryClientFactory.d.ts.map +1 -0
  11. package/dist/api.d.ts +25 -0
  12. package/dist/api.d.ts.map +1 -0
  13. package/dist/constants-Ch1B4W2F.js +35 -0
  14. package/dist/constants-Ch1B4W2F.js.map +1 -0
  15. package/dist/constants.d.ts +5 -0
  16. package/dist/constants.d.ts.map +1 -0
  17. package/dist/easPropertyCanonical.d.ts +15 -0
  18. package/dist/easPropertyCanonical.d.ts.map +1 -0
  19. package/dist/easRevokedFilter.d.ts +10 -0
  20. package/dist/easRevokedFilter.d.ts.map +1 -0
  21. package/dist/easUid.d.ts +13 -0
  22. package/dist/easUid.d.ts.map +1 -0
  23. package/dist/graphql/fragments/Attestation.d.ts +2 -0
  24. package/dist/graphql/fragments/Attestation.d.ts.map +1 -0
  25. package/dist/graphql/fragments/Schema.d.ts +2 -0
  26. package/dist/graphql/fragments/Schema.d.ts.map +1 -0
  27. package/dist/graphql/fragments/index.d.ts +3 -0
  28. package/dist/graphql/fragments/index.d.ts.map +1 -0
  29. package/dist/graphql/gql/fragment-masking.d.ts +20 -0
  30. package/dist/graphql/gql/fragment-masking.d.ts.map +1 -0
  31. package/dist/graphql/gql/gql.d.ts +97 -0
  32. package/dist/graphql/gql/gql.d.ts.map +1 -0
  33. package/dist/graphql/gql/graphql.d.ts +2683 -0
  34. package/dist/graphql/gql/graphql.d.ts.map +1 -0
  35. package/dist/graphql/gql/index.d.ts +3 -0
  36. package/dist/graphql/gql/index.d.ts.map +1 -0
  37. package/dist/index.d.ts +16 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +2210 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/node/EasClient.d.ts +9 -0
  42. package/dist/node/EasClient.d.ts.map +1 -0
  43. package/dist/node/QueryClient.d.ts +8 -0
  44. package/dist/node/QueryClient.d.ts.map +1 -0
  45. package/dist/node/index.d.ts +5 -0
  46. package/dist/node/index.d.ts.map +1 -0
  47. package/dist/node.js +31 -0
  48. package/dist/node.js.map +1 -0
  49. package/dist/queries.d.ts +36 -0
  50. package/dist/queries.d.ts.map +1 -0
  51. package/dist/shims/typed-document-node.d.ts +5 -0
  52. package/dist/shims/typed-document-node.d.ts.map +1 -0
  53. package/dist/stores/schemaUidCache.d.ts +13 -0
  54. package/dist/stores/schemaUidCache.d.ts.map +1 -0
  55. package/dist/utils.d.ts +4 -0
  56. package/dist/utils.d.ts.map +1 -0
  57. package/package.json +57 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","names":[],"sources":["../src/node/EasClient.ts","../src/node/QueryClient.ts","../src/node/index.ts"],"sourcesContent":["import { BaseEasClient } from '../EasClient/BaseEasClient.js'\nimport type { IEasClient } from '../EasClient/IEasClient.js'\nimport { EAS_ENDPOINT } from '../constants.js'\nimport { GraphQLClient } from 'graphql-request'\n\nexport class NodeEasClient implements IEasClient {\n private easClient: GraphQLClient | undefined\n\n getEasClient(): GraphQLClient {\n if (!this.easClient) {\n this.easClient = new GraphQLClient(EAS_ENDPOINT)\n }\n return this.easClient\n }\n}\n\n/** @deprecated Prefer NodeEasClient */\nexport const EasClient = NodeEasClient\n\nBaseEasClient.configure(new NodeEasClient())\n\nconst _check: IEasClient = new NodeEasClient()\nvoid _check\n","import { BaseQueryClient } from '../QueryClient/BaseQueryClient.js'\nimport type { FetchQueryOptions, IQueryClient } from '../QueryClient/IQueryClient.js'\nimport type { IQueryClientFactory } from '../QueryClient/IQueryClientFactory.js'\n\nexport class NodeQueryClient implements IQueryClientFactory {\n getQueryClient(): IQueryClient {\n return {\n fetchQuery: async <T>({ queryFn }: FetchQueryOptions<T>): Promise<T> => queryFn(),\n getQueryData: () => undefined,\n removeQueries: async () => {},\n }\n }\n}\n\n/** @deprecated Prefer NodeQueryClient */\nexport const QueryClient = NodeQueryClient\n\nBaseQueryClient.configure(new NodeQueryClient())\n\nconst _check: IQueryClientFactory = new NodeQueryClient()\nvoid _check\n","import { NodeEasClient } from './EasClient.js'\nimport { NodeQueryClient } from './QueryClient.js'\nimport { BaseEasClient } from '../EasClient/BaseEasClient.js'\nimport { BaseQueryClient } from '../QueryClient/BaseQueryClient.js'\n\nexport { EasClient, NodeEasClient } from './EasClient.js'\nexport { QueryClient, NodeQueryClient } from './QueryClient.js'\n\n/** Register Node.js EAS + query client implementations. */\nexport function registerNodeEasPlatform(): void {\n BaseEasClient.configure(new NodeEasClient())\n BaseQueryClient.configure(new NodeQueryClient())\n}\n"],"mappings":";;;AAKA,IAAa,IAAb,MAAiD;CAC/C;CAEA,eAA8B;EAI5B,OAHA,AACE,KAAK,cAAY,IAAI,EAAc,CAAY,GAE1C,KAAK;CACd;AACF,GAGa,IAAY;AAEzB,EAAc,UAAU,IAAI,EAAc,CAAC,GAEhB,IAAI,EAAc;;;ACjB7C,IAAa,IAAb,MAA4D;CAC1D,iBAA+B;EAC7B,OAAO;GACL,YAAY,OAAU,EAAE,iBAAgD,EAAQ;GAChF,oBAAoB,KAAA;GACpB,eAAe,YAAY,CAAC;EAC9B;CACF;AACF,GAGa,IAAc;AAE3B,EAAgB,UAAU,IAAI,EAAgB,CAAC,GAEX,IAAI,EAAgB;;;ACVxD,SAAgB,IAAgC;CAE9C,AADA,EAAc,UAAU,IAAI,EAAc,CAAC,GAC3C,EAAgB,UAAU,IAAI,EAAgB,CAAC;AACjD"}
@@ -0,0 +1,36 @@
1
+ import { TypedDocumentNode } from '@graphql-typed-document-node/core';
2
+ import type { Attestation, Schema as EASSchema } from './graphql/gql/graphql.js';
3
+ export declare const GET_SCHEMAS: TypedDocumentNode<import("./graphql/gql/graphql.js").GetSchemasQuery, import("./graphql/gql/graphql.js").Exact<{
4
+ where: import("./index.js").SchemaWhereInput;
5
+ }>>;
6
+ export declare const GET_SCHEMA_BY_NAME: TypedDocumentNode<{
7
+ schemas: EASSchema[];
8
+ }>;
9
+ export declare const GET_SEEDS: TypedDocumentNode<{
10
+ itemSeeds: Attestation[];
11
+ }>;
12
+ export declare const GET_SEED_IDS: TypedDocumentNode<{
13
+ itemSeedIds: Attestation[];
14
+ }>;
15
+ export declare const GET_STORAGE_TRANSACTION_ID: TypedDocumentNode<{
16
+ storageTransactionId: Attestation[];
17
+ }>;
18
+ export declare const GET_VERSIONS: TypedDocumentNode<{
19
+ itemVersions: Attestation[];
20
+ }>;
21
+ export declare const GET_PROPERTIES: TypedDocumentNode<{
22
+ itemProperties: Attestation[];
23
+ }>;
24
+ export declare const GET_ALL_PROPERTIES_FOR_ALL_VERSIONS: TypedDocumentNode<{
25
+ allProperties: Attestation[];
26
+ }>;
27
+ export declare const GET_FILES_METADATA: TypedDocumentNode<{
28
+ filesMetadata: Attestation[];
29
+ }>;
30
+ export declare const GET_IMAGE_SEEDS: TypedDocumentNode<{
31
+ imageSeeds: Attestation[];
32
+ }>;
33
+ export declare const GET_IMAGE_VERSIONS: TypedDocumentNode<{
34
+ imageVersions: Attestation[];
35
+ }>;
36
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEhF,eAAO,MAAM,WAAW;;GAUtB,CAAA;AAEF,eAAO,MAAM,kBAAkB,EAUzB,iBAAiB,CAAC;IAAE,OAAO,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,CAAA;AAEjD,eAAO,MAAM,SAAS,EAmBhB,iBAAiB,CAAC;IAAE,SAAS,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAErD,eAAO,MAAM,YAAY,EAMnB,iBAAiB,CAAC;IAAE,WAAW,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAEvD,eAAO,MAAM,0BAA0B,EAUjC,iBAAiB,CAAC;IAAE,oBAAoB,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAEhE,eAAO,MAAM,YAAY,EASnB,iBAAiB,CAAC;IAAE,YAAY,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAExD,eAAO,MAAM,cAAc,EASrB,iBAAiB,CAAC;IAAE,cAAc,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAE1D,eAAO,MAAM,mCAAmC,EAS1C,iBAAiB,CAAC;IAAE,aAAa,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAEzD,eAAO,MAAM,kBAAkB,EASzB,iBAAiB,CAAC;IAAE,aAAa,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAEzD,eAAO,MAAM,eAAe,EAoBtB,iBAAiB,CAAC;IAAE,UAAU,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA;AAEtD,eAAO,MAAM,kBAAkB,EASzB,iBAAiB,CAAC;IAAE,aAAa,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ /** Runtime stubs — graphql-codegen imports these as values but only uses them as types. */
2
+ export const TypedDocumentNode: undefined;
3
+ export const ResultOf: undefined;
4
+ export const DocumentTypeDecoration: undefined;
5
+ //# sourceMappingURL=typed-document-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-document-node.d.ts","sourceRoot":"","sources":["../../src/shims/typed-document-node.js"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,0CAA0C;AAC1C,iCAAiC;AACjC,+CAA+C"}
@@ -0,0 +1,13 @@
1
+ export declare const setSchemaUidForSchemaDefinition: ({ text, schemaUid, }: {
2
+ text: string;
3
+ schemaUid: string;
4
+ }) => void;
5
+ export declare const setSchemaUidForModel: ({ modelName, schemaUid, }: {
6
+ modelName: string;
7
+ schemaUid: string;
8
+ }) => void;
9
+ export declare const getSchemaUidForModelFromCache: (modelName: string) => string | undefined;
10
+ export declare const getEasSchemaUidForSchemaDefinition: ({ schemaText, }: {
11
+ schemaText: string;
12
+ }) => Promise<string | undefined>;
13
+ //# sourceMappingURL=schemaUidCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaUidCache.d.ts","sourceRoot":"","sources":["../../src/stores/schemaUidCache.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,+BAA+B,GAAI,sBAG7C;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB,KAAG,IAEH,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,2BAGlC;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB,KAAG,IAEH,CAAA;AAED,eAAO,MAAM,6BAA6B,GAAI,WAAW,MAAM,KAAG,MAAM,GAAG,SAC3B,CAAA;AAEhD,eAAO,MAAM,kCAAkC,GAAU,iBAEtD;IACD,UAAU,EAAE,MAAM,CAAA;CACnB,KAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAU7B,CAAA"}
@@ -0,0 +1,4 @@
1
+ export declare const toSnakeCase: (str: string) => string;
2
+ /** EIP-55 checksum for a 20-byte hex address (with or without 0x prefix). */
3
+ export declare function checksumAddress(address: string): string;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,MACa,CAAA;AAEvD,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWvD"}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@seedprotocol/eas",
3
+ "version": "0.5.1",
4
+ "description": "EAS GraphQL read client and helpers for Seed Protocol",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "require": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "./node": {
19
+ "import": {
20
+ "types": "./dist/node/index.d.ts",
21
+ "default": "./dist/node.js"
22
+ },
23
+ "require": {
24
+ "types": "./dist/node/index.d.ts",
25
+ "default": "./dist/node.js"
26
+ }
27
+ },
28
+ "./package.json": "./package.json"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "scripts": {
34
+ "build": "rimraf dist && tsc -p tsconfig.build.json && vite build",
35
+ "test": "vitest run --reporter=default",
36
+ "prepublishOnly": "bun run build && node ../../scripts/sync-versions.js"
37
+ },
38
+ "dependencies": {
39
+ "@graphql-typed-document-node/core": "^3.2.0",
40
+ "debug": "^4.4.1",
41
+ "graphql": "^16.10.0",
42
+ "graphql-request": "^7.3.5",
43
+ "js-sha3": "^0.9.3"
44
+ },
45
+ "devDependencies": {
46
+ "@types/bun": "latest",
47
+ "rimraf": "^6.0.1",
48
+ "typescript": "~5.9.3",
49
+ "vite": "^8.0.0",
50
+ "vitest": "^3.0.0"
51
+ },
52
+ "author": "Keith Axline <keith@journodao.xyz>",
53
+ "license": "MIT",
54
+ "publishConfig": {
55
+ "access": "public"
56
+ }
57
+ }