@opendatalabs/vana-sdk 3.18.0 → 3.18.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 CHANGED
@@ -424,9 +424,12 @@ with `details.unknown`, 400 `LINEAGE_INVALID` /
424
424
  `WriteRejectedError` (other), `WriteSessionExpiredError`, `WriteTransportError`,
425
425
  `WriteRequestError`, and `LineageReadError` for lineage reads. Each carries the
426
426
  server's `status`, `errorCode` and `details`. Lineage entries the caller holds
427
- no grant for come back as `{ dataPointId, redacted: true }` (narrow with
428
- `isRedactedLineageNode`); the gateway's `proof` over the served view is passed
429
- through.
427
+ no grant for come back as exactly `{ redacted: true }` (narrow with
428
+ `isRedactedLineageNode`): no id, scope or version, because the id is
429
+ `keccak256(owner, scope)` and a grantee who knows the owner could recover the
430
+ scope from it; order and count are preserved, so a redacted node is identified
431
+ by its position. The SDK refuses a view whose redacted node carries anything
432
+ else. The gateway's `proof` over the served view is passed through.
430
433
 
431
434
  ## Networks
432
435
 
@@ -33149,10 +33149,15 @@ var LineageNodeSchema = z.object({
33149
33149
  */
33150
33150
  version: VersionSchema,
33151
33151
  /** The node's tombstone time, or `null` when live. */
33152
- deletedAt: z.string().nullable()
33152
+ deletedAt: z.string().nullable(),
33153
+ /**
33154
+ * Never present on a visible node. Declared so a node that carries
33155
+ * `redacted: true` next to an id, scope and version cannot slip through
33156
+ * this branch of {@link LineageEntrySchema} with the key stripped.
33157
+ */
33158
+ redacted: z.never().optional()
33153
33159
  });
33154
- var RedactedLineageNodeSchema = z.object({
33155
- dataPointId: DataPointIdSchema,
33160
+ var RedactedLineageNodeSchema = z.strictObject({
33156
33161
  redacted: z.literal(true)
33157
33162
  });
33158
33163
  var LineageEntrySchema = z.union([
@@ -33177,7 +33182,7 @@ var LineageGraphSchema = z.object({
33177
33182
  derivativesTruncated: z.boolean().optional()
33178
33183
  });
33179
33184
  function isRedactedLineageNode(entry) {
33180
- return "redacted" in entry && entry.redacted === true;
33185
+ return "redacted" in entry && entry.redacted === true && Object.keys(entry).length === 1;
33181
33186
  }
33182
33187
  function personalServerLineagePath(scope, version) {
33183
33188
  return `/v1/data/${encodeURIComponent(scope)}/lineage${version === void 0 ? "" : `/${String(version)}`}`;