@seedprotocol/eas 0.7.9-next.1177.ga3e08ed → 0.7.9-next.1306.g4ff6582

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.
@@ -0,0 +1,27 @@
1
+ import debug from 'debug';
2
+ import type { FetchQueryOptions, IQueryClient } from './QueryClient/IQueryClient.js';
3
+ /**
4
+ * Per-request EAS timings under `DEBUG=seedEas:timing`. Two kinds of line:
5
+ *
6
+ * - `request <operation> <filters> rows=<n> bytes=<n> <ms>ms`, one per indexer request, timed from
7
+ * send until the response body is read and parsed. `<filters>` gives the length of each
8
+ * `id: { in }` / `refUID: { in }` list in the `where`; `bytes` is the decoded body size.
9
+ * - `fetchQuery <key> network|cache|deduped <ms>ms`, one per call of the api.ts helpers that go
10
+ * through the query client: `network` when this call ran the request, `deduped` when it waited
11
+ * on the same request already in flight, `cache` when the query client answered from its cache.
12
+ */
13
+ export declare const easTimingLogger: debug.Debugger;
14
+ type FetchInit = Parameters<typeof fetch>[1];
15
+ /**
16
+ * `fetch` that logs a request line when timing is on. The body is read here so the time covers
17
+ * the whole response, then handed on as a new Response. When timing is off it is `doFetch`.
18
+ */
19
+ export declare function timedEasFetch(doFetch: () => Promise<Response>, init: FetchInit): Promise<Response>;
20
+ /**
21
+ * `queryClient.fetchQuery(options)`, logging whether the result came from this call's request, a
22
+ * request already in flight for the same key, or the query client's cache. When timing is off it
23
+ * is `fetchQuery` unchanged.
24
+ */
25
+ export declare function timedFetchQuery<T>(queryClient: IQueryClient, options: FetchQueryOptions<T>): Promise<T>;
26
+ export {};
27
+ //# sourceMappingURL=easTiming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"easTiming.d.ts","sourceRoot":"","sources":["../src/easTiming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEpF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,gBAA0B,CAAA;AAItD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AAsC5C;;;GAGG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,EAChC,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,QAAQ,CAAC,CAkBnB;AAKD;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CA6B7G"}
@@ -4,6 +4,7 @@
4
4
  * The indexer's `decodedDataJson` gives a small uint (`uint8`) as a JSON number or a numeric
5
5
  * string, and a wide one (`uint256`) as `{ type: 'BigNumber', hex }`. Seed publishes Number as a
6
6
  * decimal string and Date as `uint256` Unix seconds. {@link decodeEasNumber} reads all of these.
7
+ * Also the empty values Seed attests for a removed property (ADR 0021).
7
8
  */
8
9
  /** `uint8` … `uint256`, `int8` … `int256`, and the bare `uint`/`int`. */
9
10
  export declare function isNumericEasType(easType: string | undefined | null): boolean;
@@ -16,4 +17,10 @@ export declare function isNumericEasType(easType: string | undefined | null): bo
16
17
  * function for the value it attests, so what is written and what is read agree.
17
18
  */
18
19
  export declare function decodeEasNumber(value: unknown): string | undefined;
20
+ /**
21
+ * Whether an attested value is the empty value Seed attests to record a property's removal
22
+ * (ADR 0021): `''` for a `string`, a zero `bytes32`. Readers treat the property as absent. An
23
+ * empty `bytes32[]` is an empty list, not a removal.
24
+ */
25
+ export declare function isEasEmptyValue(easType: string | undefined | null, value: unknown): boolean;
19
26
  //# sourceMappingURL=easValues.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"easValues.d.ts","sourceRoot":"","sources":["../src/easValues.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAE5E;AASD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAgBlE"}
1
+ {"version":3,"file":"easValues.d.ts","sourceRoot":"","sources":["../src/easValues.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAE5E;AASD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAgBlE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAI3F"}
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './publishAuthorization.js';
7
7
  export * from './easPropertyCanonical.js';
8
8
  export * from './easRefAttester.js';
9
9
  export * from './easNames.js';
10
+ export * from './modelSchemas.js';
10
11
  export * from './easValues.js';
11
12
  export * from './easRevokedFilter.js';
12
13
  export * from './easUid.js';
@@ -15,6 +16,7 @@ export * from './queries.js';
15
16
  export * from './utils.js';
16
17
  export * from './EasClient/BaseEasClient.js';
17
18
  export { createEasGraphQLClient, EAS_REQUEST_TIMEOUT_MS } from './EasClient/createEasGraphQLClient.js';
19
+ export type { EasGraphQLClientOptions } from './EasClient/createEasGraphQLClient.js';
18
20
  export { EasClient } from './EasClient/BaseEasClient.js';
19
21
  export type { IEasClient } from './EasClient/IEasClient.js';
20
22
  export * from './QueryClient/BaseQueryClient.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3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