diff --git a/package-lock.json b/package-lock.json index 8ebf4c522..9d91be93a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -731,6 +731,89 @@ "@stablelib/xchacha20": "^1.0.1" } }, + "node_modules/@tbd54566975/dwn-sdk-js": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@tbd54566975/dwn-sdk-js/-/dwn-sdk-js-0.2.4.tgz", + "integrity": "sha512-d2/8o0sA+kNqyyFovReyviczABPyi5wPNuaS7oPojrmMDN2GC+okifF/rqr4qO393Dk/m07ngk8eXnPPk/oiMQ==", + "dependencies": { + "@ipld/dag-cbor": "9.0.3", + "@js-temporal/polyfill": "0.4.4", + "@noble/ed25519": "2.0.0", + "@noble/secp256k1": "2.0.0", + "abstract-level": "1.0.3", + "ajv": "8.12.0", + "blockstore-core": "4.2.0", + "cross-fetch": "4.0.0", + "eciesjs": "0.4.0", + "flat": "5.0.2", + "interface-blockstore": "5.2.3", + "interface-store": "5.1.2", + "ipfs-unixfs-exporter": "13.1.5", + "ipfs-unixfs-importer": "15.1.5", + "level": "8.0.0", + "lodash": "4.17.21", + "lru-cache": "9.1.2", + "ms": "2.1.3", + "multiformats": "11.0.2", + "randombytes": "2.1.0", + "readable-stream": "4.4.0", + "ulidx": "2.1.0", + "uuid": "8.3.2", + "varint": "6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@tbd54566975/dwn-sdk-js/node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/@tbd54566975/dwn-sdk-js/node_modules/lru-cache": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", + "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@tbd54566975/dwn-sdk-js/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/@tbd54566975/dwn-sdk-js/node_modules/readable-stream": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.0.tgz", + "integrity": "sha512-kDMOq0qLtxV9f/SQv522h8cxZBqNZXuXNyjyezmfAAuribMyVXziljpQ/uQhfE1XLg2/TLTW2DsnoE4VAi/krg==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@types/chai": { "version": "4.3.6", "dev": true, @@ -8264,10 +8347,10 @@ }, "packages/agent": { "name": "@web5/agent", - "version": "0.2.1", + "version": "0.2.2", "license": "Apache-2.0", "dependencies": { - "@tbd54566975/dwn-sdk-js": "0.2.3", + "@tbd54566975/dwn-sdk-js": "0.2.4", "@web5/common": "0.2.1", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1", @@ -8308,91 +8391,13 @@ "node": ">=18.0.0" } }, - "packages/agent/node_modules/@tbd54566975/dwn-sdk-js": { - "version": "0.2.3", - "license": "Apache-2.0", - "dependencies": { - "@ipld/dag-cbor": "9.0.3", - "@js-temporal/polyfill": "0.4.4", - "@noble/ed25519": "2.0.0", - "@noble/secp256k1": "2.0.0", - "abstract-level": "1.0.3", - "ajv": "8.12.0", - "blockstore-core": "4.2.0", - "cross-fetch": "4.0.0", - "eciesjs": "0.4.0", - "flat": "5.0.2", - "interface-blockstore": "5.2.3", - "interface-store": "5.1.2", - "ipfs-unixfs-exporter": "13.1.5", - "ipfs-unixfs-importer": "15.1.5", - "level": "8.0.0", - "lodash": "4.17.21", - "lru-cache": "9.1.2", - "ms": "2.1.3", - "multiformats": "11.0.2", - "randombytes": "2.1.0", - "readable-stream": "4.4.0", - "ulidx": "2.1.0", - "uuid": "8.3.2", - "varint": "6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "packages/agent/node_modules/@tbd54566975/dwn-sdk-js/node_modules/readable-stream": { - "version": "4.4.0", - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/agent/node_modules/cross-fetch": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "packages/agent/node_modules/lru-cache": { - "version": "9.1.2", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "packages/agent/node_modules/node-fetch": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "packages/api": { "name": "@web5/api", - "version": "0.8.1", + "version": "0.8.2", "license": "Apache-2.0", "dependencies": { - "@tbd54566975/dwn-sdk-js": "0.2.3", - "@web5/agent": "0.2.1", + "@tbd54566975/dwn-sdk-js": "0.2.4", + "@web5/agent": "0.2.2", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1", "@web5/user-agent": "0.2.1", @@ -8438,9 +8443,24 @@ "node": ">=18.0.0" } }, - "packages/api/node_modules/@tbd54566975/dwn-sdk-js": { + "packages/api/node_modules/@web5/user-agent": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@web5/user-agent/-/user-agent-0.2.1.tgz", + "integrity": "sha512-hci8hc5aLIsXzsMAET355HsPFPts2NVSYeBaOCvRXY3qt00Mlal7gqgGhoNtqGlXiEtmpgjG6n1LvY2ukidMYw==", + "dependencies": { + "@web5/agent": "0.2.1", + "@web5/common": "0.2.1", + "@web5/crypto": "0.2.1", + "@web5/dids": "0.2.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "packages/api/node_modules/@web5/user-agent/node_modules/@tbd54566975/dwn-sdk-js": { "version": "0.2.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@tbd54566975/dwn-sdk-js/-/dwn-sdk-js-0.2.3.tgz", + "integrity": "sha512-T3Yy6kY6zftdVgsX2C0D2bIAmWQQVCFrLB95+BN/zoAAA29LogOr807Kx15QHrKmILWidVfYt/ZwsPHl4k5bDQ==", "dependencies": { "@ipld/dag-cbor": "9.0.3", "@js-temporal/polyfill": "0.4.4", @@ -8471,9 +8491,10 @@ "node": ">= 18" } }, - "packages/api/node_modules/@tbd54566975/dwn-sdk-js/node_modules/readable-stream": { + "packages/api/node_modules/@web5/user-agent/node_modules/@tbd54566975/dwn-sdk-js/node_modules/readable-stream": { "version": "4.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.0.tgz", + "integrity": "sha512-kDMOq0qLtxV9f/SQv522h8cxZBqNZXuXNyjyezmfAAuribMyVXziljpQ/uQhfE1XLg2/TLTW2DsnoE4VAi/krg==", "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -8484,23 +8505,43 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "packages/api/node_modules/@web5/user-agent/node_modules/@web5/agent": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@web5/agent/-/agent-0.2.1.tgz", + "integrity": "sha512-LQW8RnlVcadG6iAsOm8iWFzjIKm6r79lZRIm0W8sAYx7VniF3twJI70gdR4RAQFUkAi69yPATIvATBeos2Y1DA==", + "dependencies": { + "@tbd54566975/dwn-sdk-js": "0.2.3", + "@web5/common": "0.2.1", + "@web5/crypto": "0.2.1", + "@web5/dids": "0.2.1", + "level": "8.0.0", + "readable-stream": "4.4.2", + "readable-web-to-node-stream": "3.0.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, "packages/api/node_modules/cross-fetch": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dependencies": { "node-fetch": "^2.6.12" } }, "packages/api/node_modules/lru-cache": { "version": "9.1.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", + "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", "engines": { "node": "14 || >=16.14" } }, "packages/api/node_modules/node-fetch": { "version": "2.7.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -8697,13 +8738,16 @@ "node": ">=18.0.0" } }, + "packages/dwn-sdk-js": { + "extraneous": true + }, "packages/identity-agent": { "name": "@web5/identity-agent", - "version": "0.2.1", + "version": "0.2.2", "license": "Apache-2.0", "dependencies": { - "@web5/agent": "0.2.1", - "@web5/api": "0.8.1" + "@web5/agent": "0.2.2", + "@web5/api": "0.8.2" }, "devDependencies": { "@playwright/test": "1.36.2", @@ -8739,10 +8783,10 @@ }, "packages/proxy-agent": { "name": "@web5/proxy-agent", - "version": "0.2.1", + "version": "0.2.2", "license": "Apache-2.0", "dependencies": { - "@web5/agent": "0.2.1", + "@web5/agent": "0.2.2", "@web5/common": "0.2.1", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1" @@ -8781,10 +8825,10 @@ }, "packages/user-agent": { "name": "@web5/user-agent", - "version": "0.2.1", + "version": "0.2.2", "license": "Apache-2.0", "dependencies": { - "@web5/agent": "0.2.1", + "@web5/agent": "0.2.2", "@web5/common": "0.2.1", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1" diff --git a/packages/agent/package.json b/packages/agent/package.json index d4880b063..9e70084cc 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,6 +1,6 @@ { "name": "@web5/agent", - "version": "0.2.1", + "version": "0.2.2", "type": "module", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -67,7 +67,7 @@ "node": ">=18.0.0" }, "dependencies": { - "@tbd54566975/dwn-sdk-js": "0.2.3", + "@tbd54566975/dwn-sdk-js": "0.2.4", "@web5/common": "0.2.1", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1", diff --git a/packages/api/package.json b/packages/api/package.json index f825ef404..4f6251232 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@web5/api", - "version": "0.8.1", + "version": "0.8.2", "description": "SDK for accessing the features and capabilities of Web5", "type": "module", "main": "./dist/cjs/index.js", @@ -75,8 +75,8 @@ "node": ">=18.0.0" }, "dependencies": { - "@tbd54566975/dwn-sdk-js": "0.2.3", - "@web5/agent": "0.2.1", + "@tbd54566975/dwn-sdk-js": "0.2.4", + "@web5/agent": "0.2.2", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1", "@web5/user-agent": "0.2.1", diff --git a/packages/api/src/dwn-api.ts b/packages/api/src/dwn-api.ts index 155cae9ce..11bccc120 100644 --- a/packages/api/src/dwn-api.ts +++ b/packages/api/src/dwn-api.ts @@ -159,7 +159,10 @@ export class DwnApi { const protocols = entries.map((entry: ProtocolsQueryReplyEntry) => { const metadata = { author: this.connectedDid, }; - return new Protocol(this.agent, entry, metadata); + // FIXME: dwn-sdk-js actually returns the entire ProtocolsConfigure message, + // but the type claims that it returns the message without authorization. + // When dwn-sdk-js fixes the type, we should remove `as ProtocolsConfigureMessage` + return new Protocol(this.agent, entry as ProtocolsConfigureMessage, metadata); }); return { protocols, status }; diff --git a/packages/api/src/record.ts b/packages/api/src/record.ts index 1af6fe69e..a3a72e8fa 100644 --- a/packages/api/src/record.ts +++ b/packages/api/src/record.ts @@ -16,7 +16,7 @@ export type RecordOptions = RecordsWriteMessage & { }; export type RecordModel = RecordsWriteDescriptor - & Omit + & Omit & { author: string; recordId?: string; diff --git a/packages/dev-env/docker-compose.yaml b/packages/dev-env/docker-compose.yaml index 98e08847e..d0a601355 100644 --- a/packages/dev-env/docker-compose.yaml +++ b/packages/dev-env/docker-compose.yaml @@ -3,6 +3,6 @@ version: "3.98" services: dwn-server: container_name: dwn-server - image: ghcr.io/tbd54566975/dwn-server:dwn-sdk-0.2.3 + image: ghcr.io/tbd54566975/dwn-server:dwn-sdk-0.2.4 ports: - "3000:3000" diff --git a/packages/identity-agent/package.json b/packages/identity-agent/package.json index ad96a137b..7d8756429 100644 --- a/packages/identity-agent/package.json +++ b/packages/identity-agent/package.json @@ -1,6 +1,6 @@ { "name": "@web5/identity-agent", - "version": "0.2.1", + "version": "0.2.2", "type": "module", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -67,8 +67,8 @@ "node": ">=18.0.0" }, "dependencies": { - "@web5/agent": "0.2.1", - "@web5/api": "0.8.1" + "@web5/agent": "0.2.2", + "@web5/api": "0.8.2" }, "devDependencies": { "@playwright/test": "1.36.2", diff --git a/packages/proxy-agent/package.json b/packages/proxy-agent/package.json index 2b8e22f70..a1bc5e9a3 100644 --- a/packages/proxy-agent/package.json +++ b/packages/proxy-agent/package.json @@ -1,6 +1,6 @@ { "name": "@web5/proxy-agent", - "version": "0.2.1", + "version": "0.2.2", "type": "module", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -67,7 +67,7 @@ "node": ">=18.0.0" }, "dependencies": { - "@web5/agent": "0.2.1", + "@web5/agent": "0.2.2", "@web5/common": "0.2.1", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1" diff --git a/packages/user-agent/package.json b/packages/user-agent/package.json index bdb0e2880..d1e18cd1a 100644 --- a/packages/user-agent/package.json +++ b/packages/user-agent/package.json @@ -1,6 +1,6 @@ { "name": "@web5/user-agent", - "version": "0.2.1", + "version": "0.2.2", "type": "module", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -67,7 +67,7 @@ "node": ">=18.0.0" }, "dependencies": { - "@web5/agent": "0.2.1", + "@web5/agent": "0.2.2", "@web5/common": "0.2.1", "@web5/crypto": "0.2.1", "@web5/dids": "0.2.1"