@seedprotocol/eas 0.6.6 → 0.6.7
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.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +189 -120
- package/dist/index.js.map +1 -1
- package/dist/keccak.d.ts +3 -0
- package/dist/keccak.d.ts.map +1 -0
- package/dist/publishedBy.d.ts +19 -0
- package/dist/publishedBy.d.ts.map +1 -0
- package/dist/publishedByHelpers.d.ts +34 -0
- package/dist/publishedByHelpers.d.ts.map +1 -0
- package/package.json +3 -3
package/dist/keccak.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keccak.d.ts","sourceRoot":"","sources":["../src/keccak.ts"],"names":[],"mappings":"AAGA,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAG9D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Attestation } from './graphql/gql/graphql.js';
|
|
2
|
+
export type GetPublishedByFromEasParams = {
|
|
3
|
+
/** Tool canonical wallet(s) that may have attested. */
|
|
4
|
+
toolAddresses: string[];
|
|
5
|
+
/** Optional seed UIDs used as refUID on the sidecar. */
|
|
6
|
+
refUIDs?: string[];
|
|
7
|
+
/**
|
|
8
|
+
* PublishedBy schema UID. When omitted, filters by named schema
|
|
9
|
+
* {@link PUBLISHED_BY_SCHEMA_NAME}.
|
|
10
|
+
*/
|
|
11
|
+
schemaUid?: string;
|
|
12
|
+
excludeRevoked?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Query PublishedBy sidecar attestations by tool attester (and optional refUID / schema).
|
|
16
|
+
*/
|
|
17
|
+
export declare function getPublishedByFromEas(params: GetPublishedByFromEasParams): Promise<Attestation[]>;
|
|
18
|
+
export * from './publishedByHelpers.js';
|
|
19
|
+
//# sourceMappingURL=publishedBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishedBy.d.ts","sourceRoot":"","sources":["../src/publishedBy.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAE3D,MAAM,MAAM,2BAA2B,GAAG;IACxC,uDAAuD;IACvD,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,WAAW,EAAE,CAAC,CAwDxB;AAED,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** EAS schema definition for tool PublishedBy sidecar attestations (revocable). */
|
|
2
|
+
export declare const PUBLISHED_BY_SCHEMA_DEF = "bytes32 seedUid,bytes32 versionUid,bytes32[] attestationUids,bytes32 batchHash,string toolName,string toolVersion";
|
|
3
|
+
/** Schema #1 display name for {@link PUBLISHED_BY_SCHEMA_DEF}. */
|
|
4
|
+
export declare const PUBLISHED_BY_SCHEMA_NAME = "seedprotocol.publishedBy";
|
|
5
|
+
export type PublishedByDecoded = {
|
|
6
|
+
seedUid: `0x${string}`;
|
|
7
|
+
versionUid: `0x${string}`;
|
|
8
|
+
attestationUids: `0x${string}`[];
|
|
9
|
+
batchHash: `0x${string}`;
|
|
10
|
+
toolName: string;
|
|
11
|
+
toolVersion: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Deterministic batch hash: keccak256 of sorted UIDs concatenated (abi.encodePacked of bytes32 values).
|
|
15
|
+
*/
|
|
16
|
+
export declare function hashPublishedByBatch(uids: readonly string[]): `0x${string}`;
|
|
17
|
+
/**
|
|
18
|
+
* Returns true when `batchHash` equals {@link hashPublishedByBatch} of `attestationUids`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function verifyPublishedByBatch(params: {
|
|
21
|
+
attestationUids: readonly string[];
|
|
22
|
+
batchHash: string;
|
|
23
|
+
}): boolean;
|
|
24
|
+
type DecodedField = {
|
|
25
|
+
name?: string;
|
|
26
|
+
value?: unknown;
|
|
27
|
+
type?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Decode PublishedBy fields from EAS `decodedDataJson` (preferred) or a JSON array of named fields.
|
|
31
|
+
*/
|
|
32
|
+
export declare function decodePublishedByData(data: string | DecodedField[]): PublishedByDecoded;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=publishedByHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishedByHelpers.d.ts","sourceRoot":"","sources":["../src/publishedByHelpers.ts"],"names":[],"mappings":"AAGA,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,sHACiF,CAAA;AAErH,kEAAkE;AAClE,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAElE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;IACzB,eAAe,EAAE,KAAK,MAAM,EAAE,EAAE,CAAA;IAChC,SAAS,EAAE,KAAK,MAAM,EAAE,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAWD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,KAAK,MAAM,EAAE,CAa3E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,OAAO,CAGV;AAED,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAkBD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,GAAG,kBAAkB,CA4BvF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seedprotocol/eas",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "EAS GraphQL read client and helpers for Seed Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
40
|
+
"@noble/hashes": "^1.8.0",
|
|
40
41
|
"debug": "^4.4.1",
|
|
41
42
|
"graphql": "^16.10.0",
|
|
42
|
-
"graphql-request": "^7.3.5"
|
|
43
|
-
"js-sha3": "^0.9.3"
|
|
43
|
+
"graphql-request": "^7.3.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/bun": "latest",
|