From f6c609cc846ede2ac4b018aeb172fabb98fbd277 Mon Sep 17 00:00:00 2001 From: Paul Le Cam Date: Tue, 21 May 2024 10:30:13 +0100 Subject: [PATCH] Add document protocol package --- packages/document-protocol/LICENSE-APACHE | 5 + packages/document-protocol/LICENSE-MIT | 19 ++ packages/document-protocol/README.md | 5 + packages/document-protocol/package.json | 58 ++++++ packages/document-protocol/src/assertions.ts | 18 ++ packages/document-protocol/src/codecs.ts | 176 +++++++++++++++++++ packages/document-protocol/src/constants.ts | 1 + packages/document-protocol/src/index.ts | 3 + packages/document-protocol/tsconfig.json | 7 + packages/ethereum-did/package.json | 2 +- packages/events/package.json | 4 +- packages/identifiers/package.json | 2 +- packages/model-handler/package.json | 1 - packages/model-handler/src/handler.ts | 5 +- packages/model-handler/test/handler.test.ts | 3 +- packages/model-protocol/package.json | 2 +- packages/model-protocol/src/codecs.ts | 8 +- pnpm-lock.yaml | 89 +++++++--- 18 files changed, 371 insertions(+), 37 deletions(-) create mode 100644 packages/document-protocol/LICENSE-APACHE create mode 100644 packages/document-protocol/LICENSE-MIT create mode 100644 packages/document-protocol/README.md create mode 100644 packages/document-protocol/package.json create mode 100644 packages/document-protocol/src/assertions.ts create mode 100644 packages/document-protocol/src/codecs.ts create mode 100644 packages/document-protocol/src/constants.ts create mode 100644 packages/document-protocol/src/index.ts create mode 100644 packages/document-protocol/tsconfig.json diff --git a/packages/document-protocol/LICENSE-APACHE b/packages/document-protocol/LICENSE-APACHE new file mode 100644 index 0000000..14478a3 --- /dev/null +++ b/packages/document-protocol/LICENSE-APACHE @@ -0,0 +1,5 @@ +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/packages/document-protocol/LICENSE-MIT b/packages/document-protocol/LICENSE-MIT new file mode 100644 index 0000000..749aa1e --- /dev/null +++ b/packages/document-protocol/LICENSE-MIT @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/packages/document-protocol/README.md b/packages/document-protocol/README.md new file mode 100644 index 0000000..d6f92c8 --- /dev/null +++ b/packages/document-protocol/README.md @@ -0,0 +1,5 @@ +# Ceramic Document stream protocol + +## License + +Dual licensed under MIT and Apache 2 diff --git a/packages/document-protocol/package.json b/packages/document-protocol/package.json new file mode 100644 index 0000000..d333a76 --- /dev/null +++ b/packages/document-protocol/package.json @@ -0,0 +1,58 @@ +{ + "name": "@ceramic-sdk/document-protocol", + "version": "0.1.0", + "author": "3Box Labs", + "license": "(Apache-2.0 OR MIT)", + "keywords": ["ceramic", "stream", "document"], + "repository": { + "type": "git", + "url": "https://github.com/ceramicstudio/ceramic-sdk", + "directory": "packages/document-protocol" + }, + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": "./dist/index.js" + }, + "files": ["dist"], + "engines": { + "node": ">=20" + }, + "sideEffects": false, + "scripts": { + "build:clean": "del dist", + "build:js": "swc src -d ./dist --config-file ../../.swcrc --strip-leading-paths", + "build:types": "tsc --project tsconfig.json --emitDeclarationOnly --skipLibCheck", + "build": "pnpm build:clean && pnpm build:types && pnpm build:js", + "lint": "eslint src --fix", + "test": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js", + "test:ci": "pnpm run test --ci --coverage", + "prepare": "pnpm build", + "prepublishOnly": "package-check" + }, + "dependencies": { + "@ceramic-sdk/identifiers": "workspace:^", + "@didtools/codecs": "^3.0.0", + "codeco": "^1.2.3", + "object-sizeof": "^2.6.4" + }, + "devDependencies": { + "multiformats": "^13.1.0", + "ts-essentials": "^10.0.0" + }, + "jest": { + "extensionsToTreatAsEsm": [".ts"], + "moduleNameMapper": { + "^(\\.{1,2}/.*)\\.js$": "$1" + }, + "transform": { + "^.+\\.(t|j)s$": [ + "@swc/jest", + { + "root": "../.." + } + ] + } + } +} diff --git a/packages/document-protocol/src/assertions.ts b/packages/document-protocol/src/assertions.ts new file mode 100644 index 0000000..f8e19ca --- /dev/null +++ b/packages/document-protocol/src/assertions.ts @@ -0,0 +1,18 @@ +import sizeof from 'object-sizeof' + +import { MAX_DOCUMENT_SIZE } from './constants.js' + +/** + * Validate that content does not exceed the maximum allowed + * @param content Content to validate + */ +export function assertValidContentLength(content: unknown) { + if (content != null) { + const contentLength = sizeof(content) + if (contentLength > MAX_DOCUMENT_SIZE) { + throw new Error( + `Content has size of ${contentLength}B which exceeds maximum size of ${MAX_DOCUMENT_SIZE}B`, + ) + } + } +} diff --git a/packages/document-protocol/src/codecs.ts b/packages/document-protocol/src/codecs.ts new file mode 100644 index 0000000..79e5f88 --- /dev/null +++ b/packages/document-protocol/src/codecs.ts @@ -0,0 +1,176 @@ +import { streamIDAsBytes, streamIDAsString } from '@ceramic-sdk/identifiers' +import { + cid, + didString, + uint8ArrayAsBase64, + uint8array, +} from '@didtools/codecs' +import { + type TypeOf, + array, + boolean, + literal, + optional, + sparse, + strict, + string, + tuple, + union, + unknown, + unknownRecord, +} from 'codeco' +import 'multiformats' // Import needed for TS reference +import 'ts-essentials' // Import needed for TS reference + +/** + * JSON patch operations. + */ + +export const JSONPatchAddOperation = strict( + { + op: literal('add'), + path: string, + value: unknown, + }, + 'JSONPatchAddOperation', +) + +export const JSONPatchRemoveOperation = strict( + { + op: literal('remove'), + path: string, + }, + 'JSONPatchRemoveOperation', +) + +export const JSONPatchReplaceOperation = strict( + { + op: literal('replace'), + path: string, + value: unknown, + }, + 'JSONPatchReplaceOperation', +) + +export const JSONPatchMoveOperation = strict( + { + op: literal('move'), + path: string, + from: string, + }, + 'JSONPatchMoveOperation', +) + +export const JSONPatchCopyOperation = strict( + { + op: literal('copy'), + path: string, + from: string, + }, + 'JSONPatchCopyOperation', +) + +export const JSONPatchTestOperation = strict( + { + op: literal('test'), + path: string, + value: unknown, + }, + 'JSONPatchTestOperation', +) + +export const JSONPatchOperation = union( + [ + JSONPatchAddOperation, + JSONPatchRemoveOperation, + JSONPatchReplaceOperation, + JSONPatchMoveOperation, + JSONPatchCopyOperation, + JSONPatchTestOperation, + ], + 'JSONPatchOperation', +) +export type JSONPatchOperation = TypeOf + +/** + * Init event header for a ModelInstanceDocument Stream + */ +export const DocumentInitEventHeader = sparse( + { + controller: tuple([didString]), + model: streamIDAsBytes, + sep: literal('model'), + unique: optional(uint8array), + context: optional(streamIDAsBytes), + shouldIndex: optional(boolean), + }, + 'DocumentInitEventHeader', +) +export type DocumentInitEventHeader = TypeOf + +/** + * Init event payload for a ModelInstanceDocument Stream + */ +export const DocumentInitEventPayload = sparse( + { + data: unknownRecord, + header: DocumentInitEventHeader, + }, + 'DocumentInitEventPayload', +) +export type DocumentInitEventPayload = TypeOf + +/** + * Data event header for a ModelInstanceDocument Stream + */ +export const DocumentDataEventHeader = strict( + { + shouldIndex: boolean, + }, + 'DocumentDataEventHeader', +) +export type DocumentDataEventHeader = TypeOf + +/** + * Data event payload for a ModelInstanceDocument Stream + */ +export const DocumentDataEventPayload = sparse( + { + data: array(JSONPatchOperation), + prev: cid, + id: cid, + header: optional(DocumentDataEventHeader), + }, + 'DocumentDataEventPayload', +) +export type DocumentDataEventPayload = TypeOf + +/** + * Metadata for a ModelInstanceDocument Stream + */ +export const DocumentMetadata = sparse( + { + /** + * The DID that is allowed to author updates to this ModelInstanceDocument + */ + controller: didString, + /** + * The StreamID of the Model that this ModelInstanceDocument belongs to. + */ + model: streamIDAsString, + /** + * Unique bytes + */ + unique: optional(uint8ArrayAsBase64), + /** + * The "context" StreamID for this ModelInstanceDocument. + */ + context: optional(streamIDAsString), + /** + * Whether the stream should be indexed or not. + */ + shouldIndex: optional(boolean), + }, + 'DocumentMetadata', +) +export type DocumentMetadata = TypeOf diff --git a/packages/document-protocol/src/constants.ts b/packages/document-protocol/src/constants.ts new file mode 100644 index 0000000..37f0b31 --- /dev/null +++ b/packages/document-protocol/src/constants.ts @@ -0,0 +1 @@ +export const MAX_DOCUMENT_SIZE = 16_000_000 diff --git a/packages/document-protocol/src/index.ts b/packages/document-protocol/src/index.ts new file mode 100644 index 0000000..1af2a97 --- /dev/null +++ b/packages/document-protocol/src/index.ts @@ -0,0 +1,3 @@ +export * from './assertions.js' +export * from './codecs.js' +export * from './constants.js' diff --git a/packages/document-protocol/tsconfig.json b/packages/document-protocol/tsconfig.json new file mode 100644 index 0000000..34756dd --- /dev/null +++ b/packages/document-protocol/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.build.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": ["src"] +} diff --git a/packages/ethereum-did/package.json b/packages/ethereum-did/package.json index 28c4055..103c505 100644 --- a/packages/ethereum-did/package.json +++ b/packages/ethereum-did/package.json @@ -37,7 +37,7 @@ "caip": "^1.1.1", "did-session": "^3.1.0", "dids": "^5.0.2", - "viem": "^2.11.0" + "viem": "^2.11.1" }, "jest": { "extensionsToTreatAsEsm": [".ts"], diff --git a/packages/events/package.json b/packages/events/package.json index 4cc89e2..0fde676 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -37,8 +37,8 @@ "@ipld/dag-cbor": "^9.2.0", "@ipld/dag-json": "^10.2.0", "cartonne": "^3.0.1", - "codeco": "^1.2.2", - "dag-jose": "^5.0.0", + "codeco": "^1.2.3", + "dag-jose": "^5.1.0", "multiformats": "^13.1.0", "multihashes-sync": "^2.0.0", "uint8arrays": "^5.1.0" diff --git a/packages/identifiers/package.json b/packages/identifiers/package.json index ef476f1..de93f42 100644 --- a/packages/identifiers/package.json +++ b/packages/identifiers/package.json @@ -33,7 +33,7 @@ }, "dependencies": { "@ipld/dag-cbor": "^9.2.0", - "codeco": "^1.2.2", + "codeco": "^1.2.3", "mapmoize": "^1.2.1", "multiformats": "^13.1.0", "uint8arrays": "^5.1.0", diff --git a/packages/model-handler/package.json b/packages/model-handler/package.json index 88b127d..4896bc4 100644 --- a/packages/model-handler/package.json +++ b/packages/model-handler/package.json @@ -34,7 +34,6 @@ "dependencies": { "@ceramic-sdk/events": "workspace:^", "@ceramic-sdk/model-protocol": "workspace:^", - "codeco": "^1.2.2", "dids": "^5.0.2", "json-ptr": "^3.1.1", "lodash.ismatch": "^4.4.0" diff --git a/packages/model-handler/src/handler.ts b/packages/model-handler/src/handler.ts index 2ff3414..9c2cbb7 100644 --- a/packages/model-handler/src/handler.ts +++ b/packages/model-handler/src/handler.ts @@ -11,7 +11,6 @@ import { getModelStreamID, validateController, } from '@ceramic-sdk/model-protocol' -import { decode } from 'codeco' import type { DID } from 'dids' import { @@ -33,9 +32,9 @@ export async function handleInitEvent( ): Promise { const verified = await verifyInitEvent(context.verifier, event) - const metadata = decode(ModelMetadata, { + const metadata = ModelMetadata.encode({ controller: verified.header.controllers[0], - model: verified.header.model.bytes, + model: verified.header.model, }) await validateController(metadata.controller, event.cacaoBlock) diff --git a/packages/model-handler/test/handler.test.ts b/packages/model-handler/test/handler.test.ts index da3880f..1a55c57 100644 --- a/packages/model-handler/test/handler.test.ts +++ b/packages/model-handler/test/handler.test.ts @@ -8,6 +8,7 @@ import { createDID, getAuthenticatedDID } from '@ceramic-sdk/key-did' import { MODEL, MODEL_RESOURCE_URI, + MODEL_STREAM_ID, type ModelDefinition, type ModelDefinitionV2, type ModelInitEventPayload, @@ -245,7 +246,7 @@ describe('handleInitEvent()', () => { expect(state.id).toBe(streamID.toString()) expect(state.content).toEqual(testModelV1) expect(state.metadata.controller).toBe(authenticatedDID.id) - expect(state.metadata.model.equals(MODEL)).toBe(true) + expect(state.metadata.model).toBe(MODEL_STREAM_ID) expect(state.log[0]).toBe(event) }) }) diff --git a/packages/model-protocol/package.json b/packages/model-protocol/package.json index 672337e..c2f4a66 100644 --- a/packages/model-protocol/package.json +++ b/packages/model-protocol/package.json @@ -38,7 +38,7 @@ "@didtools/codecs": "^3.0.0", "ajv": "^8.13.0", "ajv-formats": "^3.0.1", - "codeco": "^1.2.2", + "codeco": "^1.2.3", "json-ptr": "^3.1.1" }, "devDependencies": { diff --git a/packages/model-protocol/src/codecs.ts b/packages/model-protocol/src/codecs.ts index c0b9dcc..91cc81a 100644 --- a/packages/model-protocol/src/codecs.ts +++ b/packages/model-protocol/src/codecs.ts @@ -1,5 +1,9 @@ import { SignedEvent } from '@ceramic-sdk/events' -import { streamIDAsBytes, streamIDString } from '@ceramic-sdk/identifiers' +import { + streamIDAsBytes, + streamIDAsString, + streamIDString, +} from '@ceramic-sdk/identifiers' import { didString } from '@didtools/codecs' import addFormats from 'ajv-formats' import Ajv from 'ajv/dist/2020.js' @@ -99,7 +103,7 @@ export const ModelMetadata = strict( /** * All Model streams have the same 'model' constant in their metadata. It is not a valid StreamID and cannot by loaded, but serves as a way to signal to indexers to index the set of all Models */ - model: streamIDAsBytes, + model: refinement(streamIDAsString, (id) => id.equals(MODEL)), }, 'ModelMetadata', ) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7fc56b8..0a026e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,6 +45,28 @@ importers: specifier: ^5.4.5 version: 5.4.5 + packages/document-protocol: + dependencies: + '@ceramic-sdk/identifiers': + specifier: workspace:^ + version: link:../identifiers + '@didtools/codecs': + specifier: ^3.0.0 + version: 3.0.0 + codeco: + specifier: ^1.2.3 + version: 1.2.3 + object-sizeof: + specifier: ^2.6.4 + version: 2.6.4 + devDependencies: + multiformats: + specifier: ^13.1.0 + version: 13.1.0 + ts-essentials: + specifier: ^10.0.0 + version: 10.0.0(typescript@5.4.5) + packages/ethereum-did: dependencies: '@didtools/cacao': @@ -63,8 +85,8 @@ importers: specifier: ^5.0.2 version: 5.0.2(typescript@5.4.5) viem: - specifier: ^2.11.0 - version: 2.11.0(typescript@5.4.5) + specifier: ^2.11.1 + version: 2.11.1(typescript@5.4.5) packages/events: dependencies: @@ -84,11 +106,11 @@ importers: specifier: ^3.0.1 version: 3.0.1 codeco: - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^1.2.3 + version: 1.2.3 dag-jose: - specifier: ^5.0.0 - version: 5.0.0 + specifier: ^5.1.0 + version: 5.1.0 multiformats: specifier: ^13.1.0 version: 13.1.0 @@ -125,8 +147,8 @@ importers: specifier: ^9.2.0 version: 9.2.0 codeco: - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^1.2.3 + version: 1.2.3 mapmoize: specifier: ^1.2.1 version: 1.2.1 @@ -183,9 +205,6 @@ importers: '@ceramic-sdk/model-protocol': specifier: workspace:^ version: link:../model-protocol - codeco: - specifier: ^1.2.2 - version: 1.2.2 dids: specifier: ^5.0.2 version: 5.0.2(typescript@5.4.5) @@ -233,8 +252,8 @@ importers: specifier: ^3.0.1 version: 3.0.1(ajv@8.13.0) codeco: - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^1.2.3 + version: 1.2.3 json-ptr: specifier: ^3.1.1 version: 3.1.1 @@ -1085,6 +1104,9 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + bin-check@4.1.0: resolution: {integrity: sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==} engines: {node: '>=4'} @@ -1118,6 +1140,9 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + cacheable-lookup@5.0.4: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} @@ -1192,8 +1217,8 @@ packages: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - codeco@1.2.2: - resolution: {integrity: sha512-lhIoURrqjebeKShlY8hpJSeB7oPvCXLB786lPCnLpqOSzPZ96lXFcdIGt5CU0GW1vNzQDlMQIaLCvT++Pb/G7A==} + codeco@1.2.3: + resolution: {integrity: sha512-nbj0SrL3Cr5nWRwStBDYkA/lEJ9xm9TOjKk7Fo4rEspEC/fb9k3N9MvoK/ygTInBh5dqjsFGC9Bd6AE3GnAyxg==} collect-v8-coverage@1.0.2: resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} @@ -1240,8 +1265,8 @@ packages: dag-jose-utils@4.0.0: resolution: {integrity: sha512-bmmXtVdEKp/zYH8El4GGkMREJioUztz8fzOErfy5dTbyKIVOF61C5sfsZLYCB/wiT/I9+SPNrQeo/Cx6Ik3wJQ==} - dag-jose@5.0.0: - resolution: {integrity: sha512-9IVE/OyubkGEGEuqRhSxpugwBtVKn6gd2fw2AMmlpYowjUrFfDpLPT0QToBstfyFgI9XNsKIQxQRM8Dq+nMASQ==} + dag-jose@5.1.0: + resolution: {integrity: sha512-IwxGBJTNdYquQebgFZHC2AFLs9isDM5WNopw3fzZeGh4ZGuKN2oW6Xj9qtXD/RS35gaLaxUTFxz2GC0GedYRhA==} debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} @@ -1982,6 +2007,9 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} + object-sizeof@2.6.4: + resolution: {integrity: sha512-YuJAf7Bi61KROcYmXm8RCeBrBw8UOaJDzTm1gp0eU7RjYi1xEte3/Nmg/VyPaHcJZ3sNojs1Y0xvSrgwkLmcFw==} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -2475,8 +2503,8 @@ packages: typescript: optional: true - viem@2.11.0: - resolution: {integrity: sha512-JwGxcpr3pUlquXWkRdXAWTOaY3RDPftrkxksiIWlPEgLWRYOLuFkJyxmvLTE6ZY3njww8vmZP97UqBt0R+B/xw==} + viem@2.11.1: + resolution: {integrity: sha512-4iypXhxWkXoWO45XStxQvhj/vYZ5+3AtSEngHiOnuHOSNoiIsYfDvTMoTiAO53PeyYvExyVzJc9BFwejGHh7pg==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -2808,7 +2836,7 @@ snapshots: '@didtools/codecs@3.0.0': dependencies: - codeco: 1.2.2 + codeco: 1.2.3 multiformats: 13.1.0 uint8arrays: 5.1.0 @@ -2834,7 +2862,7 @@ snapshots: '@didtools/siwx@2.0.0': dependencies: - codeco: 1.2.2 + codeco: 1.2.3 '@esbuild/aix-ppc64@0.20.2': optional: true @@ -3459,6 +3487,8 @@ snapshots: balanced-match@1.0.2: {} + base64-js@1.5.1: {} + bin-check@4.1.0: dependencies: execa: 0.7.0 @@ -3501,6 +3531,11 @@ snapshots: buffer-from@1.1.2: {} + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + cacheable-lookup@5.0.4: {} cacheable-request@7.0.4: @@ -3574,7 +3609,7 @@ snapshots: co@4.6.0: {} - codeco@1.2.2: {} + codeco@1.2.3: {} collect-v8-coverage@1.0.2: {} @@ -3632,7 +3667,7 @@ snapshots: '@ipld/dag-cbor': 9.2.0 multiformats: 13.1.0 - dag-jose@5.0.0: + dag-jose@5.1.0: dependencies: '@ipld/dag-cbor': 9.2.0 multiformats: 13.1.0 @@ -3713,7 +3748,7 @@ snapshots: '@didtools/codecs': 3.0.0 '@didtools/pkh-ethereum': 0.5.0(typescript@5.4.5) '@stablelib/random': 1.0.2 - codeco: 1.2.2 + codeco: 1.2.3 dag-jose-utils: 4.0.0 did-jwt: 7.4.7 did-resolver: 4.1.0 @@ -4576,6 +4611,10 @@ snapshots: dependencies: path-key: 3.1.1 + object-sizeof@2.6.4: + dependencies: + buffer: 6.0.3 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -5014,7 +5053,7 @@ snapshots: - utf-8-validate - zod - viem@2.11.0(typescript@5.4.5): + viem@2.11.1(typescript@5.4.5): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.2.0