From 59117260c0f953dffabcfecef87d3be2d3d5cf4d Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 15:42:19 -0800 Subject: [PATCH 01/24] upgrade ucanto in access-client --- packages/access-client/package.json | 15 +++--- pnpm-lock.yaml | 78 ++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 20 deletions(-) diff --git a/packages/access-client/package.json b/packages/access-client/package.json index 63e8ac9b4..cb9d92734 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -23,7 +23,8 @@ "test:node": "mocha 'test/**/!(*.browser).test.js' -n experimental-vm-modules -n no-warnings", "test:browser": "playwright-test 'test/**/!(*.node).test.js'", "testw": "watch 'pnpm test' src test --interval 1", - "rc": "npm version prerelease --preid rc" + "rc": "npm version prerelease --preid rc", + "w3access": "./src/cli/index.js" }, "exports": { ".": "./src/index.js", @@ -56,12 +57,12 @@ "dependencies": { "@ipld/car": "^5.0.1", "@ipld/dag-ucan": "^2.0.1", - "@ucanto/client": "^3.0.2", - "@ucanto/core": "^3.0.2", - "@ucanto/interface": "^3.0.1", - "@ucanto/principal": "^3.0.1", - "@ucanto/transport": "^3.0.2", - "@ucanto/validator": "^3.0.4", + "@ucanto/client": "^3.0.3", + "@ucanto/core": "^3.0.3", + "@ucanto/interface": "^4.0.0", + "@ucanto/principal": "^4.0.0", + "@ucanto/transport": "^3.0.3", + "@ucanto/validator": "^3.0.5", "@web3-storage/capabilities": "workspace:^", "bigint-mod-arith": "^3.1.2", "conf": "^10.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 689bbf207..32ddfd2ba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -111,13 +111,13 @@ importers: '@types/mocha': ^10.0.0 '@types/node': ^18.11.10 '@types/ws': ^8.5.3 - '@ucanto/client': ^3.0.2 - '@ucanto/core': ^3.0.2 - '@ucanto/interface': ^3.0.1 - '@ucanto/principal': ^3.0.1 + '@ucanto/client': ^3.0.3 + '@ucanto/core': ^3.0.3 + '@ucanto/interface': ^4.0.0 + '@ucanto/principal': ^4.0.0 '@ucanto/server': ^3.0.4 - '@ucanto/transport': ^3.0.2 - '@ucanto/validator': ^3.0.4 + '@ucanto/transport': ^3.0.3 + '@ucanto/validator': ^3.0.5 '@web3-storage/capabilities': workspace:^ assert: ^2.0.0 bigint-mod-arith: ^3.1.2 @@ -145,12 +145,12 @@ importers: dependencies: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 2.0.1 - '@ucanto/client': 3.0.2 - '@ucanto/core': 3.0.2 - '@ucanto/interface': 3.0.1 - '@ucanto/principal': 3.0.1 - '@ucanto/transport': 3.0.2 - '@ucanto/validator': 3.0.4 + '@ucanto/client': 3.0.3 + '@ucanto/core': 3.0.3 + '@ucanto/interface': 4.0.0 + '@ucanto/principal': 4.0.0 + '@ucanto/transport': 3.0.3 + '@ucanto/validator': 3.0.5 '@web3-storage/capabilities': link:../capabilities bigint-mod-arith: 3.1.2 conf: 10.2.0 @@ -1627,6 +1627,13 @@ packages: multiformats: 10.0.2 dev: false + /@ucanto/client/3.0.3: + resolution: {integrity: sha512-4Kyt1z+tSStpXHoFWVtogFwHfmOtuDh1TvDlVKscMqhZFAtTyo/jiYYaW5o8P4gqA3CXlqDLSdiMleo4Wx2plA==} + dependencies: + '@ucanto/interface': 4.0.0 + multiformats: 10.0.2 + dev: false + /@ucanto/core/3.0.2: resolution: {integrity: sha512-TEVCqAM/3v4fXLuZcIBgQZrPwD53yqoXqwmSChhd420FikFGkkAeWvj6JT6oR4VmCuiIPK5FnukaE2LL5h0Ekg==} dependencies: @@ -1636,12 +1643,27 @@ packages: '@ucanto/interface': 3.0.1 multiformats: 10.0.2 + /@ucanto/core/3.0.3: + resolution: {integrity: sha512-xTHAEUzmtHTDlWyoCWmNBGHMIEWbn4kEudpBXMuYCGPIEp1klqOnCZBz3ELut3OuvJAHVHkeGOR9C4oixss9hg==} + dependencies: + '@ipld/car': 5.0.1 + '@ipld/dag-cbor': 8.0.0 + '@ipld/dag-ucan': 2.0.1 + '@ucanto/interface': 4.0.0 + multiformats: 10.0.2 + /@ucanto/interface/3.0.1: resolution: {integrity: sha512-1UlyLMjJwgzAmhlqu/V1gz0xrE9MUiI3gdzxOJbIXwrS7zAWsbtUZqIS/SPpr1+PYnNO8PHSGyGekb+N0dqtWQ==} dependencies: '@ipld/dag-ucan': 2.0.1 multiformats: 10.0.2 + /@ucanto/interface/4.0.0: + resolution: {integrity: sha512-4OZ8BIpF4PvvbAaCBYD13tIL70UC9f1ust9RWNUBeEA9dfgypbb2cWlZAyBpGOovLMBgeHDnvNr70NCOTLcWIQ==} + dependencies: + '@ipld/dag-ucan': 2.0.1 + multiformats: 10.0.2 + /@ucanto/principal/3.0.1: resolution: {integrity: sha512-0U0EF2ddfR55LKKc7FkzTkH8OFvjZvEeRqMkyV5FyeSsFEF7lXhgEXZrNgggK2zlriXjYC9VVCpPhsGb4cI72g==} dependencies: @@ -1651,6 +1673,16 @@ packages: multiformats: 10.0.2 one-webcrypto: 1.0.3 + /@ucanto/principal/4.0.0: + resolution: {integrity: sha512-6PzvUMFBJgEJJNfBMGECp+PF8uFT1UBfR1GNXUL4Qlp5KxhmDFhKLCOpNJKa1NfKgwZtu4xbGaUpwNo9vKGdjw==} + dependencies: + '@ipld/dag-ucan': 2.0.1 + '@noble/ed25519': 1.7.1 + '@ucanto/interface': 4.0.0 + multiformats: 10.0.2 + one-webcrypto: 1.0.3 + dev: false + /@ucanto/server/3.0.5: resolution: {integrity: sha512-6srksAbYrCixnGWMlPXAFa5smjCLZ9+AMLwxS5vbLdVToFcZc2JXFFZUFq7fJouOMETCUsk+q3ank4sNw2BQJg==} dependencies: @@ -1668,15 +1700,35 @@ packages: multiformats: 10.0.2 dev: false + /@ucanto/transport/3.0.3: + resolution: {integrity: sha512-/Re2TEglCZMxV5SvOVXLJE/BcF0V5qIFnzY1zo0pWGC/iH4fwjfTV9TWHXj5O2yb5UAd7ZwHx/ukdhoaWP+D5g==} + dependencies: + '@ipld/car': 5.0.1 + '@ipld/dag-cbor': 8.0.0 + '@ucanto/core': 3.0.3 + '@ucanto/interface': 4.0.0 + multiformats: 10.0.2 + dev: false + /@ucanto/validator/3.0.4: resolution: {integrity: sha512-JG6y6yWPDUBoJuWP7auwMTZf9SJN9d2e7y/ZbVvluQBZC+WvhLq1Z2cjWCjA21Y2FJxWeI27leBjWzyIsHtYUA==} dependencies: '@ipld/car': 5.0.1 '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.2 + '@ucanto/core': 3.0.3 '@ucanto/interface': 3.0.1 multiformats: 10.0.2 + /@ucanto/validator/3.0.5: + resolution: {integrity: sha512-ha1UZ5KO3ME2oPe8zx6jLDSdAXZApNa9iqHDYxksvHbdd2qlpTBVYxnWaW13VEFv79k9JuRBLBZHMrKFStdnSw==} + dependencies: + '@ipld/car': 5.0.1 + '@ipld/dag-cbor': 8.0.0 + '@ucanto/core': 3.0.3 + '@ucanto/interface': 4.0.0 + multiformats: 10.0.2 + dev: false + /@vue/compiler-core/3.2.45: resolution: {integrity: sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==} dependencies: From c73b355789f343a7910169136c68c8b952012029 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 15:42:36 -0800 Subject: [PATCH 02/24] start access-client cli test-ucanto-connection --- .../src/cli/cmd-test-ucanto-connection.js | 34 +++++++++++++++++++ packages/access-client/src/cli/index.js | 10 ++++++ 2 files changed, 44 insertions(+) create mode 100644 packages/access-client/src/cli/cmd-test-ucanto-connection.js diff --git a/packages/access-client/src/cli/cmd-test-ucanto-connection.js b/packages/access-client/src/cli/cmd-test-ucanto-connection.js new file mode 100644 index 000000000..14c3c56f4 --- /dev/null +++ b/packages/access-client/src/cli/cmd-test-ucanto-connection.js @@ -0,0 +1,34 @@ +/* eslint-disable no-console */ +import * as Client from '@ucanto/client' +// import * as ed25519 from '@ucanto/principal/ed25519' +import { DID } from '@ucanto/principal' +import * as HttpChannel from '@ucanto/transport/http' + +// fixtures from w3ui wip +// https://github.com/web3-storage/w3ui/blob/08bc15aca6aef0a3495e94697786551211f6edb7/packages/keyring-core/src/service.ts +export const serviceURL = new URL('https://access.web3.storage') +export const serviceKey = DID.parse( + 'did:key:z6MkrZ1r5XBFZjBU34qyD8fueMbMRkKw17BZaq2ivKFjnz2z' +) +export const servicePrincipal = serviceKey.withDID('did:web:web3.storage') + +/** + * + * @param {object} opts + * @param {string} [opts.url] - url to open ucanto connection to + */ +export async function testUcantoConnection(opts) { + const ucantoHttpUrl = new URL(opts.url || serviceURL) + console.log('testing ucanto connection against', ucantoHttpUrl.toString()) + const channel = HttpChannel.open({ + fetch, + url: ucantoHttpUrl, + }) + const connection = Client.connect({ + id: serviceKey, + encoder: await import('@ucanto/transport/car'), + decoder: await import('@ucanto/transport/cbor'), + channel, + }) + console.log('connection.id.did()', connection.id.did().toString()) +} diff --git a/packages/access-client/src/cli/index.js b/packages/access-client/src/cli/index.js index 878c8db56..474cfd1fc 100755 --- a/packages/access-client/src/cli/index.js +++ b/packages/access-client/src/cli/index.js @@ -10,6 +10,7 @@ import { cmdCreateAccount } from './cmd-create-account.js' import { cmdLink } from './cmd-link.js' import { cmdSetup } from './cmd-setup.js' import { cmdWhoami } from './cmd-whoami.js' +import { testUcantoConnection } from './cmd-test-ucanto-connection.js' import { StoreConf } from '../stores/store-conf.js' import { Agent } from '../agent.js' import { stringToDelegation } from '../encoding.js' @@ -158,4 +159,13 @@ prog console.error(`Run "${NAME} setup" first`) } }) + +prog + .command('test-ucanto-connection') + .describe('Test ucanto connection to the access service url') + .option('--url', 'URL to open a ucanto connection against') + .action(async (opts) => { + await testUcantoConnection(opts) + }) + prog.parse(process.argv) From 98f17b3d24fb4f0da4e7a9a58a2588dcc571c43f Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 16:11:23 -0800 Subject: [PATCH 03/24] upgrade all packages dep on @ucanto/interface and @ucanto/principal to 4.0.0 --- packages/access-api/package.json | 4 +- packages/access-client/src/stores/types.ts | 4 +- packages/capabilities/package.json | 14 +++-- packages/upload-client/package.json | 4 +- pnpm-lock.yaml | 68 +++++++++++----------- 5 files changed, 50 insertions(+), 44 deletions(-) diff --git a/packages/access-api/package.json b/packages/access-api/package.json index e1d99ee5e..2704029e0 100644 --- a/packages/access-api/package.json +++ b/packages/access-api/package.json @@ -18,8 +18,8 @@ "dependencies": { "@ipld/dag-ucan": "^2.0.1", "@ucanto/core": "^3.0.2", - "@ucanto/interface": "^3.0.1", - "@ucanto/principal": "^3.0.1", + "@ucanto/interface": "^4.0.0", + "@ucanto/principal": "^4.0.0", "@ucanto/server": "^3.0.4", "@ucanto/transport": "^3.0.2", "@web3-storage/access": "workspace:^", diff --git a/packages/access-client/src/stores/types.ts b/packages/access-client/src/stores/types.ts index ed01d7adc..2c91f8503 100644 --- a/packages/access-client/src/stores/types.ts +++ b/packages/access-client/src/stores/types.ts @@ -5,8 +5,8 @@ import { DelegationMeta, SpaceMeta, } from '../types.js' -import { RSASigner } from '@ucanto/principal/rsa' import { SignerArchive, DID } from '@ucanto/interface' +import { RSA } from '@ucanto/principal/.' /** * Store interface that all stores need to implement @@ -50,7 +50,7 @@ export interface IStore { export interface StoreDataIDB { id: number meta: AgentMeta - principal: SignerArchive + principal: SignerArchive, typeof RSA.signatureCode> currentSpace?: DID spaces: Map delegations: Map< diff --git a/packages/capabilities/package.json b/packages/capabilities/package.json index a669461e3..390af3006 100644 --- a/packages/capabilities/package.json +++ b/packages/capabilities/package.json @@ -57,11 +57,15 @@ "dist/src/**/*.d.ts.map" ], "dependencies": { - "@ucanto/core": "^3.0.2", - "@ucanto/interface": "^3.0.1", - "@ucanto/principal": "^3.0.1", - "@ucanto/transport": "^3.0.2", - "@ucanto/validator": "^3.0.4" + "@ipld/car": "^5.0.1", + "@ipld/dag-ucan": "^2.0.1", + "@ucanto/client": "^3.0.3", + "@ucanto/core": "^3.0.3", + "@ucanto/interface": "^4.0.0", + "@ucanto/principal": "^4.0.0", + "@ucanto/server": "^3.0.6", + "@ucanto/transport": "^3.0.3", + "@ucanto/validator": "^3.0.5" }, "devDependencies": { "@types/assert": "^1.5.6", diff --git a/packages/upload-client/package.json b/packages/upload-client/package.json index 4b6a00c02..6de4ad6ea 100644 --- a/packages/upload-client/package.json +++ b/packages/upload-client/package.json @@ -67,7 +67,7 @@ "@ipld/dag-ucan": "^2.0.1", "@ipld/unixfs": "^2.0.0", "@ucanto/client": "^3.0.1", - "@ucanto/interface": "^3.0.0", + "@ucanto/interface": "^4.0.0", "@ucanto/transport": "^3.0.1", "@web3-storage/capabilities": "workspace:^", "multiformats": "^10.0.2", @@ -77,7 +77,7 @@ "devDependencies": { "@types/assert": "^1.5.6", "@types/mocha": "^10.0.0", - "@ucanto/principal": "^3.0.0", + "@ucanto/principal": "^4.0.0", "@ucanto/server": "^3.0.1", "assert": "^2.0.0", "blockstore-core": "^2.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32ddfd2ba..69211d44f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,8 +35,8 @@ importers: '@types/node': ^18.11.10 '@types/qrcode': ^1.5.0 '@ucanto/core': ^3.0.2 - '@ucanto/interface': ^3.0.1 - '@ucanto/principal': ^3.0.1 + '@ucanto/interface': ^4.0.0 + '@ucanto/principal': ^4.0.0 '@ucanto/server': ^3.0.4 '@ucanto/transport': ^3.0.2 '@web3-storage/access': workspace:^ @@ -65,8 +65,8 @@ importers: dependencies: '@ipld/dag-ucan': 2.0.1 '@ucanto/core': 3.0.2 - '@ucanto/interface': 3.0.1 - '@ucanto/principal': 3.0.1 + '@ucanto/interface': 4.0.0 + '@ucanto/principal': 4.0.0 '@ucanto/server': 3.0.5 '@ucanto/transport': 3.0.2 '@web3-storage/access': link:../access-client @@ -228,14 +228,18 @@ importers: packages/capabilities: specifiers: + '@ipld/car': ^5.0.1 + '@ipld/dag-ucan': ^2.0.1 '@types/assert': ^1.5.6 '@types/mocha': ^10.0.0 '@types/node': ^18.11.10 - '@ucanto/core': ^3.0.2 - '@ucanto/interface': ^3.0.1 - '@ucanto/principal': ^3.0.1 - '@ucanto/transport': ^3.0.2 - '@ucanto/validator': ^3.0.4 + '@ucanto/client': ^3.0.3 + '@ucanto/core': ^3.0.3 + '@ucanto/interface': ^4.0.0 + '@ucanto/principal': ^4.0.0 + '@ucanto/server': ^3.0.6 + '@ucanto/transport': ^3.0.3 + '@ucanto/validator': ^3.0.5 assert: ^2.0.0 hd-scripts: ^3.0.2 mocha: ^10.1.0 @@ -243,11 +247,15 @@ importers: typescript: 4.8.4 watch: ^1.0.2 dependencies: - '@ucanto/core': 3.0.2 - '@ucanto/interface': 3.0.1 - '@ucanto/principal': 3.0.1 - '@ucanto/transport': 3.0.2 - '@ucanto/validator': 3.0.4 + '@ipld/car': 5.0.1 + '@ipld/dag-ucan': 2.0.1 + '@ucanto/client': 3.0.3 + '@ucanto/core': 3.0.3 + '@ucanto/interface': 4.0.0 + '@ucanto/principal': 4.0.0 + '@ucanto/server': 3.0.6 + '@ucanto/transport': 3.0.3 + '@ucanto/validator': 3.0.5 devDependencies: '@types/assert': 1.5.6 '@types/mocha': 10.0.1 @@ -267,8 +275,8 @@ importers: '@types/assert': ^1.5.6 '@types/mocha': ^10.0.0 '@ucanto/client': ^3.0.1 - '@ucanto/interface': ^3.0.0 - '@ucanto/principal': ^3.0.0 + '@ucanto/interface': ^4.0.0 + '@ucanto/principal': ^4.0.0 '@ucanto/server': ^3.0.1 '@ucanto/transport': ^3.0.1 '@web3-storage/capabilities': workspace:^ @@ -290,7 +298,7 @@ importers: '@ipld/dag-ucan': 2.0.1 '@ipld/unixfs': 2.0.0 '@ucanto/client': 3.0.2 - '@ucanto/interface': 3.0.1 + '@ucanto/interface': 4.0.0 '@ucanto/transport': 3.0.2 '@web3-storage/capabilities': link:../capabilities multiformats: 10.0.2 @@ -299,7 +307,7 @@ importers: devDependencies: '@types/assert': 1.5.6 '@types/mocha': 10.0.1 - '@ucanto/principal': 3.0.1 + '@ucanto/principal': 4.0.0 '@ucanto/server': 3.0.5 assert: 2.0.0 blockstore-core: 2.0.2 @@ -1347,10 +1355,6 @@ packages: /@types/node/18.11.10: resolution: {integrity: sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==} - dev: true - - /@types/node/18.11.9: - resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1664,15 +1668,6 @@ packages: '@ipld/dag-ucan': 2.0.1 multiformats: 10.0.2 - /@ucanto/principal/3.0.1: - resolution: {integrity: sha512-0U0EF2ddfR55LKKc7FkzTkH8OFvjZvEeRqMkyV5FyeSsFEF7lXhgEXZrNgggK2zlriXjYC9VVCpPhsGb4cI72g==} - dependencies: - '@ipld/dag-ucan': 2.0.1 - '@noble/ed25519': 1.7.1 - '@ucanto/interface': 3.0.1 - multiformats: 10.0.2 - one-webcrypto: 1.0.3 - /@ucanto/principal/4.0.0: resolution: {integrity: sha512-6PzvUMFBJgEJJNfBMGECp+PF8uFT1UBfR1GNXUL4Qlp5KxhmDFhKLCOpNJKa1NfKgwZtu4xbGaUpwNo9vKGdjw==} dependencies: @@ -1681,7 +1676,6 @@ packages: '@ucanto/interface': 4.0.0 multiformats: 10.0.2 one-webcrypto: 1.0.3 - dev: false /@ucanto/server/3.0.5: resolution: {integrity: sha512-6srksAbYrCixnGWMlPXAFa5smjCLZ9+AMLwxS5vbLdVToFcZc2JXFFZUFq7fJouOMETCUsk+q3ank4sNw2BQJg==} @@ -1690,6 +1684,14 @@ packages: '@ucanto/interface': 3.0.1 '@ucanto/validator': 3.0.4 + /@ucanto/server/3.0.6: + resolution: {integrity: sha512-kv2Iati3l7RVE/V1l/ATuVxeoRI+q4N7GATt+/l1zkouogX1EWv/b58Zf2fwqtLMCDA2yC2iCqROb5TNsDOBlg==} + dependencies: + '@ucanto/core': 3.0.3 + '@ucanto/interface': 4.0.0 + '@ucanto/validator': 3.0.5 + dev: false + /@ucanto/transport/3.0.2: resolution: {integrity: sha512-IyfI26VWPxCL2jnGiGP1i6mZblk8QORHzEVt5t+7Pic2k7pANQHoqbveQveRb9a8z6D/UdFogSPQxWYYtKaxWQ==} dependencies: @@ -6583,7 +6585,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 18.11.9 + '@types/node': 18.11.10 long: 5.2.1 /proxy-from-env/1.1.0: From 6e792ac5ba00ac04e672e415e9eddaa6d1fade11 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:05:55 -0800 Subject: [PATCH 04/24] access-client connection principal typefix --- packages/access-client/src/agent.js | 4 ++-- packages/capabilities/src/voucher.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/access-client/src/agent.js b/packages/access-client/src/agent.js index ec967a0d5..e70de04c7 100644 --- a/packages/access-client/src/agent.js +++ b/packages/access-client/src/agent.js @@ -33,7 +33,7 @@ const HOST = 'https://access.web3.storage' * import { connection } from '@web3-storage/access/agent' * ``` * - * @template {string} T - DID method + * @template {Ucanto.DID} T - DID method * @param {Ucanto.Principal} principal - w3access API Principal * @param {typeof fetch} _fetch - fetch implementation to use * @param {URL} url - w3access API URL @@ -70,7 +70,7 @@ export function connection(principal, _fetch, url, channel) { * @template {Ucanto.Signer} T - Ucanto Signer ie. ed25519, RSA or others */ export class Agent { - /** @type {Ucanto.Principal<"key">|undefined} */ + /** @type {Ucanto.Principal|undefined} */ #service /** @type {typeof fetch} */ diff --git a/packages/capabilities/src/voucher.js b/packages/capabilities/src/voucher.js index f2994d2b2..1fefd16e6 100644 --- a/packages/capabilities/src/voucher.js +++ b/packages/capabilities/src/voucher.js @@ -31,7 +31,7 @@ export const Identity = URI.match({ protocol: 'mailto:' }) /** * Services are identified using did:key identifier. */ -export const Service = DID.match({ method: 'key' }) +export const Service = DID.match({}) /** * Capability can only be delegated (but not invoked) allowing audience to From eedd40380615429269d13883af29256e6c00baf8 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:43:20 -0800 Subject: [PATCH 05/24] access - upgrade @ucanto/princpal to 4.0.1 --- packages/access-client/package.json | 2 +- pnpm-lock.yaml | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/access-client/package.json b/packages/access-client/package.json index cb9d92734..42955c019 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -60,7 +60,7 @@ "@ucanto/client": "^3.0.3", "@ucanto/core": "^3.0.3", "@ucanto/interface": "^4.0.0", - "@ucanto/principal": "^4.0.0", + "@ucanto/principal": "^4.0.1", "@ucanto/transport": "^3.0.3", "@ucanto/validator": "^3.0.5", "@web3-storage/capabilities": "workspace:^", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69211d44f..bcea180ef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -114,7 +114,7 @@ importers: '@ucanto/client': ^3.0.3 '@ucanto/core': ^3.0.3 '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.0 + '@ucanto/principal': ^4.0.1 '@ucanto/server': ^3.0.4 '@ucanto/transport': ^3.0.3 '@ucanto/validator': ^3.0.5 @@ -148,7 +148,7 @@ importers: '@ucanto/client': 3.0.3 '@ucanto/core': 3.0.3 '@ucanto/interface': 4.0.0 - '@ucanto/principal': 4.0.0 + '@ucanto/principal': 4.0.1 '@ucanto/transport': 3.0.3 '@ucanto/validator': 3.0.5 '@web3-storage/capabilities': link:../capabilities @@ -1677,6 +1677,16 @@ packages: multiformats: 10.0.2 one-webcrypto: 1.0.3 + /@ucanto/principal/4.0.1: + resolution: {integrity: sha512-D5ZWsRgWs3WriFEyGuisIpJYg/Mbo9GzI0ogu0jQ3HG9q2qE5Z0qEGDWBcmw6MdIIfi/5NMzxtVXOHeJY7sqPA==} + dependencies: + '@ipld/dag-ucan': 2.0.1 + '@noble/ed25519': 1.7.1 + '@ucanto/interface': 4.0.0 + multiformats: 10.0.2 + one-webcrypto: 1.0.3 + dev: false + /@ucanto/server/3.0.5: resolution: {integrity: sha512-6srksAbYrCixnGWMlPXAFa5smjCLZ9+AMLwxS5vbLdVToFcZc2JXFFZUFq7fJouOMETCUsk+q3ank4sNw2BQJg==} dependencies: From 9394b30a5185e50b5e3dd910ad90e761b5bc2d71 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:00:15 -0800 Subject: [PATCH 06/24] rm unused ts-expect-error --- packages/access-client/src/stores/store-indexeddb.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/access-client/src/stores/store-indexeddb.js b/packages/access-client/src/stores/store-indexeddb.js index e748bb882..1701f725f 100644 --- a/packages/access-client/src/stores/store-indexeddb.js +++ b/packages/access-client/src/stores/store-indexeddb.js @@ -160,7 +160,6 @@ export class StoreIndexedDB { const raw = { id: DATA_ID, meta: data.meta, - // @ts-expect-error principal: data.principal.toArchive(), currentSpace: data.currentSpace, spaces: data.spaces, From 750b6d78119a5e5e1258f722a115fbbf2660ba8a Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:05:40 -0800 Subject: [PATCH 07/24] capabilities,access: upgrade ucanto libraries to latest patch versions --- packages/access-client/package.json | 6 +-- packages/capabilities/package.json | 8 ++-- pnpm-lock.yaml | 63 +++++++++++++---------------- 3 files changed, 34 insertions(+), 43 deletions(-) diff --git a/packages/access-client/package.json b/packages/access-client/package.json index 42955c019..794ebf66c 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -58,11 +58,11 @@ "@ipld/car": "^5.0.1", "@ipld/dag-ucan": "^2.0.1", "@ucanto/client": "^3.0.3", - "@ucanto/core": "^3.0.3", + "@ucanto/core": "^3.0.4", "@ucanto/interface": "^4.0.0", "@ucanto/principal": "^4.0.1", - "@ucanto/transport": "^3.0.3", - "@ucanto/validator": "^3.0.5", + "@ucanto/transport": "^3.0.4", + "@ucanto/validator": "^3.0.6", "@web3-storage/capabilities": "workspace:^", "bigint-mod-arith": "^3.1.2", "conf": "^10.2.0", diff --git a/packages/capabilities/package.json b/packages/capabilities/package.json index 390af3006..02d435a7b 100644 --- a/packages/capabilities/package.json +++ b/packages/capabilities/package.json @@ -60,12 +60,12 @@ "@ipld/car": "^5.0.1", "@ipld/dag-ucan": "^2.0.1", "@ucanto/client": "^3.0.3", - "@ucanto/core": "^3.0.3", + "@ucanto/core": "^3.0.4", "@ucanto/interface": "^4.0.0", - "@ucanto/principal": "^4.0.0", + "@ucanto/principal": "^4.0.1", "@ucanto/server": "^3.0.6", - "@ucanto/transport": "^3.0.3", - "@ucanto/validator": "^3.0.5" + "@ucanto/transport": "^3.0.4", + "@ucanto/validator": "^3.0.6" }, "devDependencies": { "@types/assert": "^1.5.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bcea180ef..5316ad3bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -112,12 +112,12 @@ importers: '@types/node': ^18.11.10 '@types/ws': ^8.5.3 '@ucanto/client': ^3.0.3 - '@ucanto/core': ^3.0.3 + '@ucanto/core': ^3.0.4 '@ucanto/interface': ^4.0.0 '@ucanto/principal': ^4.0.1 '@ucanto/server': ^3.0.4 - '@ucanto/transport': ^3.0.3 - '@ucanto/validator': ^3.0.5 + '@ucanto/transport': ^3.0.4 + '@ucanto/validator': ^3.0.6 '@web3-storage/capabilities': workspace:^ assert: ^2.0.0 bigint-mod-arith: ^3.1.2 @@ -146,11 +146,11 @@ importers: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 2.0.1 '@ucanto/client': 3.0.3 - '@ucanto/core': 3.0.3 + '@ucanto/core': 3.0.4 '@ucanto/interface': 4.0.0 '@ucanto/principal': 4.0.1 - '@ucanto/transport': 3.0.3 - '@ucanto/validator': 3.0.5 + '@ucanto/transport': 3.0.4 + '@ucanto/validator': 3.0.6 '@web3-storage/capabilities': link:../capabilities bigint-mod-arith: 3.1.2 conf: 10.2.0 @@ -234,12 +234,12 @@ importers: '@types/mocha': ^10.0.0 '@types/node': ^18.11.10 '@ucanto/client': ^3.0.3 - '@ucanto/core': ^3.0.3 + '@ucanto/core': ^3.0.4 '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.0 + '@ucanto/principal': ^4.0.1 '@ucanto/server': ^3.0.6 - '@ucanto/transport': ^3.0.3 - '@ucanto/validator': ^3.0.5 + '@ucanto/transport': ^3.0.4 + '@ucanto/validator': ^3.0.6 assert: ^2.0.0 hd-scripts: ^3.0.2 mocha: ^10.1.0 @@ -250,12 +250,12 @@ importers: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 2.0.1 '@ucanto/client': 3.0.3 - '@ucanto/core': 3.0.3 + '@ucanto/core': 3.0.4 '@ucanto/interface': 4.0.0 - '@ucanto/principal': 4.0.0 + '@ucanto/principal': 4.0.1 '@ucanto/server': 3.0.6 - '@ucanto/transport': 3.0.3 - '@ucanto/validator': 3.0.5 + '@ucanto/transport': 3.0.4 + '@ucanto/validator': 3.0.6 devDependencies: '@types/assert': 1.5.6 '@types/mocha': 10.0.1 @@ -1646,9 +1646,10 @@ packages: '@ipld/dag-ucan': 2.0.1 '@ucanto/interface': 3.0.1 multiformats: 10.0.2 + dev: false - /@ucanto/core/3.0.3: - resolution: {integrity: sha512-xTHAEUzmtHTDlWyoCWmNBGHMIEWbn4kEudpBXMuYCGPIEp1klqOnCZBz3ELut3OuvJAHVHkeGOR9C4oixss9hg==} + /@ucanto/core/3.0.4: + resolution: {integrity: sha512-IDvp67QohCBKST2EXbNiqG2YL4brBCVqyWFV5Jrc4eCu7kpH7WBUhBRE04TSsSqB+v+J4cRo40iAiiGWxlzNNw==} dependencies: '@ipld/car': 5.0.1 '@ipld/dag-cbor': 8.0.0 @@ -1690,16 +1691,16 @@ packages: /@ucanto/server/3.0.5: resolution: {integrity: sha512-6srksAbYrCixnGWMlPXAFa5smjCLZ9+AMLwxS5vbLdVToFcZc2JXFFZUFq7fJouOMETCUsk+q3ank4sNw2BQJg==} dependencies: - '@ucanto/core': 3.0.2 + '@ucanto/core': 3.0.4 '@ucanto/interface': 3.0.1 - '@ucanto/validator': 3.0.4 + '@ucanto/validator': 3.0.6 /@ucanto/server/3.0.6: resolution: {integrity: sha512-kv2Iati3l7RVE/V1l/ATuVxeoRI+q4N7GATt+/l1zkouogX1EWv/b58Zf2fwqtLMCDA2yC2iCqROb5TNsDOBlg==} dependencies: - '@ucanto/core': 3.0.3 + '@ucanto/core': 3.0.4 '@ucanto/interface': 4.0.0 - '@ucanto/validator': 3.0.5 + '@ucanto/validator': 3.0.6 dev: false /@ucanto/transport/3.0.2: @@ -1712,34 +1713,24 @@ packages: multiformats: 10.0.2 dev: false - /@ucanto/transport/3.0.3: - resolution: {integrity: sha512-/Re2TEglCZMxV5SvOVXLJE/BcF0V5qIFnzY1zo0pWGC/iH4fwjfTV9TWHXj5O2yb5UAd7ZwHx/ukdhoaWP+D5g==} + /@ucanto/transport/3.0.4: + resolution: {integrity: sha512-nvfXCheawqknvUBFcuM/+efiX0+VosqdTewKk301yHfOHthmyBWLM/3OUHoy3wThPT3PFN8OkD4gsXkJ6yOe8g==} dependencies: '@ipld/car': 5.0.1 '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.3 + '@ucanto/core': 3.0.4 '@ucanto/interface': 4.0.0 multiformats: 10.0.2 dev: false - /@ucanto/validator/3.0.4: - resolution: {integrity: sha512-JG6y6yWPDUBoJuWP7auwMTZf9SJN9d2e7y/ZbVvluQBZC+WvhLq1Z2cjWCjA21Y2FJxWeI27leBjWzyIsHtYUA==} + /@ucanto/validator/3.0.6: + resolution: {integrity: sha512-ooATo3z12w1Yss8VSBJKaG+0qOUkpiV8LS6/xTOH0kBaZJ1vFRkJ0iBfAkjIQGz0f/27VsgbAgJMvPP1qFCN1Q==} dependencies: '@ipld/car': 5.0.1 '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.3 - '@ucanto/interface': 3.0.1 - multiformats: 10.0.2 - - /@ucanto/validator/3.0.5: - resolution: {integrity: sha512-ha1UZ5KO3ME2oPe8zx6jLDSdAXZApNa9iqHDYxksvHbdd2qlpTBVYxnWaW13VEFv79k9JuRBLBZHMrKFStdnSw==} - dependencies: - '@ipld/car': 5.0.1 - '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.3 + '@ucanto/core': 3.0.4 '@ucanto/interface': 4.0.0 multiformats: 10.0.2 - dev: false /@vue/compiler-core/3.2.45: resolution: {integrity: sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==} From 56f69d25c308784226748fc208f6d2ee647858a8 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:21:13 -0800 Subject: [PATCH 08/24] fix IndexedDB store test to handle new SignerArchive type with keys not key --- .../test/stores/store-indexeddb.browser.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/access-client/test/stores/store-indexeddb.browser.test.js b/packages/access-client/test/stores/store-indexeddb.browser.test.js index b1f15df78..9c518db35 100644 --- a/packages/access-client/test/stores/store-indexeddb.browser.test.js +++ b/packages/access-client/test/stores/store-indexeddb.browser.test.js @@ -12,8 +12,11 @@ describe('IndexedDB store', () => { // principal private key is not extractable const archive = data.principal.toArchive() assert(!(archive instanceof Uint8Array)) - assert(archive.key instanceof CryptoKey) - assert.equal(archive.key.extractable, false) + const keys = [...Object.entries(archive.keys)] + assert.equal(keys.length, 1) + const firstKey = keys[0][1] + assert(firstKey instanceof CryptoKey) + assert.equal(firstKey.extractable, false) // no accounts or delegations yet assert.equal(data.spaces.size, 0) From 158f0daa00671ed9469c881730b73093fd2f0f29 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:28:31 -0800 Subject: [PATCH 09/24] upgrade ucanto packages in access-client,capabilities --- packages/access-client/package.json | 2 +- packages/capabilities/package.json | 2 +- pnpm-lock.yaml | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/access-client/package.json b/packages/access-client/package.json index 794ebf66c..97094ae92 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -84,7 +84,7 @@ "@types/mocha": "^10.0.0", "@types/node": "^18.11.10", "@types/ws": "^8.5.3", - "@ucanto/server": "^3.0.4", + "@ucanto/server": "^3.0.7", "assert": "^2.0.0", "delay": "^5.0.0", "hd-scripts": "^3.0.2", diff --git a/packages/capabilities/package.json b/packages/capabilities/package.json index 02d435a7b..b28b19691 100644 --- a/packages/capabilities/package.json +++ b/packages/capabilities/package.json @@ -63,7 +63,7 @@ "@ucanto/core": "^3.0.4", "@ucanto/interface": "^4.0.0", "@ucanto/principal": "^4.0.1", - "@ucanto/server": "^3.0.6", + "@ucanto/server": "^3.0.7", "@ucanto/transport": "^3.0.4", "@ucanto/validator": "^3.0.6" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5316ad3bb..79a2f9ae1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,7 +115,7 @@ importers: '@ucanto/core': ^3.0.4 '@ucanto/interface': ^4.0.0 '@ucanto/principal': ^4.0.1 - '@ucanto/server': ^3.0.4 + '@ucanto/server': ^3.0.7 '@ucanto/transport': ^3.0.4 '@ucanto/validator': ^3.0.6 '@web3-storage/capabilities': workspace:^ @@ -171,7 +171,7 @@ importers: '@types/mocha': 10.0.1 '@types/node': 18.11.10 '@types/ws': 8.5.3 - '@ucanto/server': 3.0.5 + '@ucanto/server': 3.0.7 assert: 2.0.0 delay: 5.0.0 hd-scripts: 3.0.2 @@ -237,7 +237,7 @@ importers: '@ucanto/core': ^3.0.4 '@ucanto/interface': ^4.0.0 '@ucanto/principal': ^4.0.1 - '@ucanto/server': ^3.0.6 + '@ucanto/server': ^3.0.7 '@ucanto/transport': ^3.0.4 '@ucanto/validator': ^3.0.6 assert: ^2.0.0 @@ -253,7 +253,7 @@ importers: '@ucanto/core': 3.0.4 '@ucanto/interface': 4.0.0 '@ucanto/principal': 4.0.1 - '@ucanto/server': 3.0.6 + '@ucanto/server': 3.0.7 '@ucanto/transport': 3.0.4 '@ucanto/validator': 3.0.6 devDependencies: @@ -1695,13 +1695,12 @@ packages: '@ucanto/interface': 3.0.1 '@ucanto/validator': 3.0.6 - /@ucanto/server/3.0.6: - resolution: {integrity: sha512-kv2Iati3l7RVE/V1l/ATuVxeoRI+q4N7GATt+/l1zkouogX1EWv/b58Zf2fwqtLMCDA2yC2iCqROb5TNsDOBlg==} + /@ucanto/server/3.0.7: + resolution: {integrity: sha512-Q1WzThJDdOQIYZS9opd/PakfFCenp7ksFvDm6YWvB8k8w8l44+vofggaUneCEThewg2oj3wkPMnsJX7erNT0Vw==} dependencies: '@ucanto/core': 3.0.4 '@ucanto/interface': 4.0.0 '@ucanto/validator': 3.0.6 - dev: false /@ucanto/transport/3.0.2: resolution: {integrity: sha512-IyfI26VWPxCL2jnGiGP1i6mZblk8QORHzEVt5t+7Pic2k7pANQHoqbveQveRb9a8z6D/UdFogSPQxWYYtKaxWQ==} From 7558a0df031758613eca0f5dee8dde6b9acace02 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 11:13:37 -0800 Subject: [PATCH 10/24] upload-client upgrade ucanto libs --- packages/upload-client/package.json | 8 ++-- pnpm-lock.yaml | 68 ++++++++++++++++++++++------- 2 files changed, 57 insertions(+), 19 deletions(-) diff --git a/packages/upload-client/package.json b/packages/upload-client/package.json index 6de4ad6ea..3cbf3ef2e 100644 --- a/packages/upload-client/package.json +++ b/packages/upload-client/package.json @@ -66,9 +66,9 @@ "@ipld/car": "^5.0.0", "@ipld/dag-ucan": "^2.0.1", "@ipld/unixfs": "^2.0.0", - "@ucanto/client": "^3.0.1", + "@ucanto/client": "^3.0.5", "@ucanto/interface": "^4.0.0", - "@ucanto/transport": "^3.0.1", + "@ucanto/transport": "^3.0.5", "@web3-storage/capabilities": "workspace:^", "multiformats": "^10.0.2", "p-queue": "^7.3.0", @@ -77,8 +77,8 @@ "devDependencies": { "@types/assert": "^1.5.6", "@types/mocha": "^10.0.0", - "@ucanto/principal": "^4.0.0", - "@ucanto/server": "^3.0.1", + "@ucanto/principal": "^4.0.1", + "@ucanto/server": "^3.0.8", "assert": "^2.0.0", "blockstore-core": "^2.0.2", "c8": "^7.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79a2f9ae1..a664b3b62 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -274,11 +274,11 @@ importers: '@ipld/unixfs': ^2.0.0 '@types/assert': ^1.5.6 '@types/mocha': ^10.0.0 - '@ucanto/client': ^3.0.1 + '@ucanto/client': ^3.0.5 '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.0 - '@ucanto/server': ^3.0.1 - '@ucanto/transport': ^3.0.1 + '@ucanto/principal': ^4.0.1 + '@ucanto/server': ^3.0.8 + '@ucanto/transport': ^3.0.5 '@web3-storage/capabilities': workspace:^ assert: ^2.0.0 blockstore-core: ^2.0.2 @@ -297,9 +297,9 @@ importers: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 2.0.1 '@ipld/unixfs': 2.0.0 - '@ucanto/client': 3.0.2 + '@ucanto/client': 3.0.5 '@ucanto/interface': 4.0.0 - '@ucanto/transport': 3.0.2 + '@ucanto/transport': 3.0.5 '@web3-storage/capabilities': link:../capabilities multiformats: 10.0.2 p-queue: 7.3.0 @@ -307,8 +307,8 @@ importers: devDependencies: '@types/assert': 1.5.6 '@types/mocha': 10.0.1 - '@ucanto/principal': 4.0.0 - '@ucanto/server': 3.0.5 + '@ucanto/principal': 4.0.1 + '@ucanto/server': 3.0.8 assert: 2.0.0 blockstore-core: 2.0.2 c8: 7.12.0 @@ -1624,17 +1624,17 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@ucanto/client/3.0.2: - resolution: {integrity: sha512-viYv/fLPvH/POFIfVoIaK4B8KSYIBLNZeVFCdnhSbS4/m6t3h4G0Z7GMjNyP1mZG/CGjAOmHxeNvMUr0sNCyVQ==} + /@ucanto/client/3.0.3: + resolution: {integrity: sha512-4Kyt1z+tSStpXHoFWVtogFwHfmOtuDh1TvDlVKscMqhZFAtTyo/jiYYaW5o8P4gqA3CXlqDLSdiMleo4Wx2plA==} dependencies: - '@ucanto/interface': 3.0.1 + '@ucanto/interface': 4.0.0 multiformats: 10.0.2 dev: false - /@ucanto/client/3.0.3: - resolution: {integrity: sha512-4Kyt1z+tSStpXHoFWVtogFwHfmOtuDh1TvDlVKscMqhZFAtTyo/jiYYaW5o8P4gqA3CXlqDLSdiMleo4Wx2plA==} + /@ucanto/client/3.0.5: + resolution: {integrity: sha512-b0x/mAW0vpgZauATbcYK82WSLfIqe2i2YJ0Hj6tugmBpe5BpPZLI7LCTtBZtLQRF028Qr6ufHwdJN+xDZ2TLaA==} dependencies: - '@ucanto/interface': 4.0.0 + '@ucanto/interface': 3.0.1 multiformats: 10.0.2 dev: false @@ -1657,6 +1657,15 @@ packages: '@ucanto/interface': 4.0.0 multiformats: 10.0.2 + /@ucanto/core/3.0.5: + resolution: {integrity: sha512-UJ4PZ0EKdhJ9n/3qyXvDGTw0j8G6wmy4cZphLlQ7Z4+TJAlR2YciWtAFztsxK97ylRSU/n3UmqorjZwlP9mM/w==} + dependencies: + '@ipld/car': 5.0.1 + '@ipld/dag-cbor': 8.0.0 + '@ipld/dag-ucan': 2.0.1 + '@ucanto/interface': 3.0.1 + multiformats: 10.0.2 + /@ucanto/interface/3.0.1: resolution: {integrity: sha512-1UlyLMjJwgzAmhlqu/V1gz0xrE9MUiI3gdzxOJbIXwrS7zAWsbtUZqIS/SPpr1+PYnNO8PHSGyGekb+N0dqtWQ==} dependencies: @@ -1677,6 +1686,7 @@ packages: '@ucanto/interface': 4.0.0 multiformats: 10.0.2 one-webcrypto: 1.0.3 + dev: false /@ucanto/principal/4.0.1: resolution: {integrity: sha512-D5ZWsRgWs3WriFEyGuisIpJYg/Mbo9GzI0ogu0jQ3HG9q2qE5Z0qEGDWBcmw6MdIIfi/5NMzxtVXOHeJY7sqPA==} @@ -1686,7 +1696,6 @@ packages: '@ucanto/interface': 4.0.0 multiformats: 10.0.2 one-webcrypto: 1.0.3 - dev: false /@ucanto/server/3.0.5: resolution: {integrity: sha512-6srksAbYrCixnGWMlPXAFa5smjCLZ9+AMLwxS5vbLdVToFcZc2JXFFZUFq7fJouOMETCUsk+q3ank4sNw2BQJg==} @@ -1694,6 +1703,7 @@ packages: '@ucanto/core': 3.0.4 '@ucanto/interface': 3.0.1 '@ucanto/validator': 3.0.6 + dev: false /@ucanto/server/3.0.7: resolution: {integrity: sha512-Q1WzThJDdOQIYZS9opd/PakfFCenp7ksFvDm6YWvB8k8w8l44+vofggaUneCEThewg2oj3wkPMnsJX7erNT0Vw==} @@ -1702,6 +1712,14 @@ packages: '@ucanto/interface': 4.0.0 '@ucanto/validator': 3.0.6 + /@ucanto/server/3.0.8: + resolution: {integrity: sha512-qktafCRX/CSrXLUoyFyP1BDyZ7MDKeBE4xeNP3OTm7BxT/6DvuFIEHgoxaoI2rfCUlog38M1LA2BXCLH5JjVwg==} + dependencies: + '@ucanto/core': 3.0.5 + '@ucanto/interface': 3.0.1 + '@ucanto/validator': 3.0.7 + dev: true + /@ucanto/transport/3.0.2: resolution: {integrity: sha512-IyfI26VWPxCL2jnGiGP1i6mZblk8QORHzEVt5t+7Pic2k7pANQHoqbveQveRb9a8z6D/UdFogSPQxWYYtKaxWQ==} dependencies: @@ -1722,6 +1740,16 @@ packages: multiformats: 10.0.2 dev: false + /@ucanto/transport/3.0.5: + resolution: {integrity: sha512-4qq5bQB1xnhLGZ+vq9xMDfYiqhVorgvPv85J+ut1gkT3SmTPTUHUbEJteLpc12lHwi0xoiBtsw5oFBJ3KjhIwQ==} + dependencies: + '@ipld/car': 5.0.1 + '@ipld/dag-cbor': 8.0.0 + '@ucanto/core': 3.0.5 + '@ucanto/interface': 3.0.1 + multiformats: 10.0.2 + dev: false + /@ucanto/validator/3.0.6: resolution: {integrity: sha512-ooATo3z12w1Yss8VSBJKaG+0qOUkpiV8LS6/xTOH0kBaZJ1vFRkJ0iBfAkjIQGz0f/27VsgbAgJMvPP1qFCN1Q==} dependencies: @@ -1731,6 +1759,16 @@ packages: '@ucanto/interface': 4.0.0 multiformats: 10.0.2 + /@ucanto/validator/3.0.7: + resolution: {integrity: sha512-goeT7Fe7DpIx9AL95KfOB3mou+KjC7oU63qIuhZcbPaP5F9/9IXI4mz3QHGLV6KW6PT0dg1mtn0WEvDSDyzXeQ==} + dependencies: + '@ipld/car': 5.0.1 + '@ipld/dag-cbor': 8.0.0 + '@ucanto/core': 3.0.5 + '@ucanto/interface': 3.0.1 + multiformats: 10.0.2 + dev: true + /@vue/compiler-core/3.2.45: resolution: {integrity: sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==} dependencies: From 32b9a878d7cb403eb876f45c94afd0a5d74761de Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 11:23:06 -0800 Subject: [PATCH 11/24] access-api upgrade ucanto versions --- packages/access-api/package.json | 8 ++--- pnpm-lock.yaml | 56 +++++--------------------------- 2 files changed, 12 insertions(+), 52 deletions(-) diff --git a/packages/access-api/package.json b/packages/access-api/package.json index 2704029e0..1f7f7e5ce 100644 --- a/packages/access-api/package.json +++ b/packages/access-api/package.json @@ -17,11 +17,11 @@ "license": "(Apache-2.0 OR MIT)", "dependencies": { "@ipld/dag-ucan": "^2.0.1", - "@ucanto/core": "^3.0.2", + "@ucanto/core": "^3.0.5", "@ucanto/interface": "^4.0.0", - "@ucanto/principal": "^4.0.0", - "@ucanto/server": "^3.0.4", - "@ucanto/transport": "^3.0.2", + "@ucanto/principal": "^4.0.1", + "@ucanto/server": "^3.0.8", + "@ucanto/transport": "^3.0.5", "@web3-storage/access": "workspace:^", "@web3-storage/capabilities": "workspace:^", "@web3-storage/worker-utils": "0.4.3-dev", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a664b3b62..d6a69fe81 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,11 +34,11 @@ importers: '@types/git-rev-sync': ^2.0.0 '@types/node': ^18.11.10 '@types/qrcode': ^1.5.0 - '@ucanto/core': ^3.0.2 + '@ucanto/core': ^3.0.5 '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.0 - '@ucanto/server': ^3.0.4 - '@ucanto/transport': ^3.0.2 + '@ucanto/principal': ^4.0.1 + '@ucanto/server': ^3.0.8 + '@ucanto/transport': ^3.0.5 '@web3-storage/access': workspace:^ '@web3-storage/capabilities': workspace:^ '@web3-storage/worker-utils': 0.4.3-dev @@ -64,11 +64,11 @@ importers: wrangler: ^2.5.0 dependencies: '@ipld/dag-ucan': 2.0.1 - '@ucanto/core': 3.0.2 + '@ucanto/core': 3.0.5 '@ucanto/interface': 4.0.0 - '@ucanto/principal': 4.0.0 - '@ucanto/server': 3.0.5 - '@ucanto/transport': 3.0.2 + '@ucanto/principal': 4.0.1 + '@ucanto/server': 3.0.8 + '@ucanto/transport': 3.0.5 '@web3-storage/access': link:../access-client '@web3-storage/capabilities': link:../capabilities '@web3-storage/worker-utils': 0.4.3-dev @@ -1638,16 +1638,6 @@ packages: multiformats: 10.0.2 dev: false - /@ucanto/core/3.0.2: - resolution: {integrity: sha512-TEVCqAM/3v4fXLuZcIBgQZrPwD53yqoXqwmSChhd420FikFGkkAeWvj6JT6oR4VmCuiIPK5FnukaE2LL5h0Ekg==} - dependencies: - '@ipld/car': 5.0.1 - '@ipld/dag-cbor': 8.0.0 - '@ipld/dag-ucan': 2.0.1 - '@ucanto/interface': 3.0.1 - multiformats: 10.0.2 - dev: false - /@ucanto/core/3.0.4: resolution: {integrity: sha512-IDvp67QohCBKST2EXbNiqG2YL4brBCVqyWFV5Jrc4eCu7kpH7WBUhBRE04TSsSqB+v+J4cRo40iAiiGWxlzNNw==} dependencies: @@ -1678,16 +1668,6 @@ packages: '@ipld/dag-ucan': 2.0.1 multiformats: 10.0.2 - /@ucanto/principal/4.0.0: - resolution: {integrity: sha512-6PzvUMFBJgEJJNfBMGECp+PF8uFT1UBfR1GNXUL4Qlp5KxhmDFhKLCOpNJKa1NfKgwZtu4xbGaUpwNo9vKGdjw==} - dependencies: - '@ipld/dag-ucan': 2.0.1 - '@noble/ed25519': 1.7.1 - '@ucanto/interface': 4.0.0 - multiformats: 10.0.2 - one-webcrypto: 1.0.3 - dev: false - /@ucanto/principal/4.0.1: resolution: {integrity: sha512-D5ZWsRgWs3WriFEyGuisIpJYg/Mbo9GzI0ogu0jQ3HG9q2qE5Z0qEGDWBcmw6MdIIfi/5NMzxtVXOHeJY7sqPA==} dependencies: @@ -1697,14 +1677,6 @@ packages: multiformats: 10.0.2 one-webcrypto: 1.0.3 - /@ucanto/server/3.0.5: - resolution: {integrity: sha512-6srksAbYrCixnGWMlPXAFa5smjCLZ9+AMLwxS5vbLdVToFcZc2JXFFZUFq7fJouOMETCUsk+q3ank4sNw2BQJg==} - dependencies: - '@ucanto/core': 3.0.4 - '@ucanto/interface': 3.0.1 - '@ucanto/validator': 3.0.6 - dev: false - /@ucanto/server/3.0.7: resolution: {integrity: sha512-Q1WzThJDdOQIYZS9opd/PakfFCenp7ksFvDm6YWvB8k8w8l44+vofggaUneCEThewg2oj3wkPMnsJX7erNT0Vw==} dependencies: @@ -1718,17 +1690,6 @@ packages: '@ucanto/core': 3.0.5 '@ucanto/interface': 3.0.1 '@ucanto/validator': 3.0.7 - dev: true - - /@ucanto/transport/3.0.2: - resolution: {integrity: sha512-IyfI26VWPxCL2jnGiGP1i6mZblk8QORHzEVt5t+7Pic2k7pANQHoqbveQveRb9a8z6D/UdFogSPQxWYYtKaxWQ==} - dependencies: - '@ipld/car': 5.0.1 - '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.2 - '@ucanto/interface': 3.0.1 - multiformats: 10.0.2 - dev: false /@ucanto/transport/3.0.4: resolution: {integrity: sha512-nvfXCheawqknvUBFcuM/+efiX0+VosqdTewKk301yHfOHthmyBWLM/3OUHoy3wThPT3PFN8OkD4gsXkJ6yOe8g==} @@ -1767,7 +1728,6 @@ packages: '@ucanto/core': 3.0.5 '@ucanto/interface': 3.0.1 multiformats: 10.0.2 - dev: true /@vue/compiler-core/3.2.45: resolution: {integrity: sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==} From d1d3d3e7e49664fffc0adf1741087d1019cbf408 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 13:32:56 -0800 Subject: [PATCH 12/24] fix type issue in packages/access-api/test/helpers/utils.js --- packages/access-api/test/helpers/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/access-api/test/helpers/utils.js b/packages/access-api/test/helpers/utils.js index e0926c13b..e907679f1 100644 --- a/packages/access-api/test/helpers/utils.js +++ b/packages/access-api/test/helpers/utils.js @@ -21,7 +21,7 @@ export async function send(ucan, mf) { /** * @param {Types.Signer} issuer - * @param {Types.Principal<"key">} service + * @param {Types.Principal} service * @param {Types.ConnectionView} conn * @param {string} email */ From 70302385a7114ca1b5109e680c10e48c3bb507d1 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:43:33 -0800 Subject: [PATCH 13/24] finish upgrade of @ucanto/{core,interface,principal,transport,validator,server,client}@latest @ipld/dag-ucan@latest --- packages/access-api/package.json | 12 +- packages/access-client/package.json | 14 +- packages/capabilities/package.json | 14 +- packages/upload-client/package.json | 10 +- pnpm-lock.yaml | 210 +++++++++++----------------- 5 files changed, 110 insertions(+), 150 deletions(-) diff --git a/packages/access-api/package.json b/packages/access-api/package.json index 1f7f7e5ce..643e288e3 100644 --- a/packages/access-api/package.json +++ b/packages/access-api/package.json @@ -16,12 +16,12 @@ "author": "Hugo Dias (hugodias.me)", "license": "(Apache-2.0 OR MIT)", "dependencies": { - "@ipld/dag-ucan": "^2.0.1", - "@ucanto/core": "^3.0.5", - "@ucanto/interface": "^4.0.0", - "@ucanto/principal": "^4.0.1", - "@ucanto/server": "^3.0.8", - "@ucanto/transport": "^3.0.5", + "@ipld/dag-ucan": "^3.0.1", + "@ucanto/core": "^4.0.2", + "@ucanto/interface": "^4.0.2", + "@ucanto/principal": "^4.0.2", + "@ucanto/server": "^4.0.2", + "@ucanto/transport": "^4.0.2", "@web3-storage/access": "workspace:^", "@web3-storage/capabilities": "workspace:^", "@web3-storage/worker-utils": "0.4.3-dev", diff --git a/packages/access-client/package.json b/packages/access-client/package.json index 97094ae92..fa95be62b 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -57,12 +57,12 @@ "dependencies": { "@ipld/car": "^5.0.1", "@ipld/dag-ucan": "^2.0.1", - "@ucanto/client": "^3.0.3", - "@ucanto/core": "^3.0.4", - "@ucanto/interface": "^4.0.0", - "@ucanto/principal": "^4.0.1", - "@ucanto/transport": "^3.0.4", - "@ucanto/validator": "^3.0.6", + "@ucanto/client": "^4.0.2", + "@ucanto/core": "^4.0.2", + "@ucanto/interface": "^4.0.2", + "@ucanto/principal": "^4.0.2", + "@ucanto/transport": "^4.0.2", + "@ucanto/validator": "^4.0.2", "@web3-storage/capabilities": "workspace:^", "bigint-mod-arith": "^3.1.2", "conf": "^10.2.0", @@ -84,7 +84,7 @@ "@types/mocha": "^10.0.0", "@types/node": "^18.11.10", "@types/ws": "^8.5.3", - "@ucanto/server": "^3.0.7", + "@ucanto/server": "^4.0.2", "assert": "^2.0.0", "delay": "^5.0.0", "hd-scripts": "^3.0.2", diff --git a/packages/capabilities/package.json b/packages/capabilities/package.json index b28b19691..98081dd5a 100644 --- a/packages/capabilities/package.json +++ b/packages/capabilities/package.json @@ -59,13 +59,13 @@ "dependencies": { "@ipld/car": "^5.0.1", "@ipld/dag-ucan": "^2.0.1", - "@ucanto/client": "^3.0.3", - "@ucanto/core": "^3.0.4", - "@ucanto/interface": "^4.0.0", - "@ucanto/principal": "^4.0.1", - "@ucanto/server": "^3.0.7", - "@ucanto/transport": "^3.0.4", - "@ucanto/validator": "^3.0.6" + "@ucanto/client": "^4.0.2", + "@ucanto/core": "^4.0.2", + "@ucanto/interface": "^4.0.2", + "@ucanto/principal": "^4.0.2", + "@ucanto/server": "^4.0.2", + "@ucanto/transport": "^4.0.2", + "@ucanto/validator": "^4.0.2" }, "devDependencies": { "@types/assert": "^1.5.6", diff --git a/packages/upload-client/package.json b/packages/upload-client/package.json index 3cbf3ef2e..0dab90e28 100644 --- a/packages/upload-client/package.json +++ b/packages/upload-client/package.json @@ -66,9 +66,9 @@ "@ipld/car": "^5.0.0", "@ipld/dag-ucan": "^2.0.1", "@ipld/unixfs": "^2.0.0", - "@ucanto/client": "^3.0.5", - "@ucanto/interface": "^4.0.0", - "@ucanto/transport": "^3.0.5", + "@ucanto/client": "^4.0.2", + "@ucanto/interface": "^4.0.2", + "@ucanto/transport": "^4.0.2", "@web3-storage/capabilities": "workspace:^", "multiformats": "^10.0.2", "p-queue": "^7.3.0", @@ -77,8 +77,8 @@ "devDependencies": { "@types/assert": "^1.5.6", "@types/mocha": "^10.0.0", - "@ucanto/principal": "^4.0.1", - "@ucanto/server": "^3.0.8", + "@ucanto/principal": "^4.0.2", + "@ucanto/server": "^4.0.2", "assert": "^2.0.0", "blockstore-core": "^2.0.2", "c8": "^7.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6a69fe81..67fc6a07f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,17 +28,17 @@ importers: '@cloudflare/workers-types': ^3.18.0 '@databases/split-sql-query': ^1.0.3 '@databases/sql': ^3.2.0 - '@ipld/dag-ucan': ^2.0.1 + '@ipld/dag-ucan': ^3.0.1 '@sentry/cli': 2.7.0 '@types/assert': ^1.5.6 '@types/git-rev-sync': ^2.0.0 '@types/node': ^18.11.10 '@types/qrcode': ^1.5.0 - '@ucanto/core': ^3.0.5 - '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.1 - '@ucanto/server': ^3.0.8 - '@ucanto/transport': ^3.0.5 + '@ucanto/core': ^4.0.2 + '@ucanto/interface': ^4.0.2 + '@ucanto/principal': ^4.0.2 + '@ucanto/server': ^4.0.2 + '@ucanto/transport': ^4.0.2 '@web3-storage/access': workspace:^ '@web3-storage/capabilities': workspace:^ '@web3-storage/worker-utils': 0.4.3-dev @@ -63,12 +63,12 @@ importers: workers-qb: ^0.1.2 wrangler: ^2.5.0 dependencies: - '@ipld/dag-ucan': 2.0.1 - '@ucanto/core': 3.0.5 - '@ucanto/interface': 4.0.0 - '@ucanto/principal': 4.0.1 - '@ucanto/server': 3.0.8 - '@ucanto/transport': 3.0.5 + '@ipld/dag-ucan': 3.0.1 + '@ucanto/core': 4.0.2 + '@ucanto/interface': 4.0.2 + '@ucanto/principal': 4.0.2 + '@ucanto/server': 4.0.2 + '@ucanto/transport': 4.0.2 '@web3-storage/access': link:../access-client '@web3-storage/capabilities': link:../capabilities '@web3-storage/worker-utils': 0.4.3-dev @@ -111,13 +111,13 @@ importers: '@types/mocha': ^10.0.0 '@types/node': ^18.11.10 '@types/ws': ^8.5.3 - '@ucanto/client': ^3.0.3 - '@ucanto/core': ^3.0.4 - '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.1 - '@ucanto/server': ^3.0.7 - '@ucanto/transport': ^3.0.4 - '@ucanto/validator': ^3.0.6 + '@ucanto/client': ^4.0.2 + '@ucanto/core': ^4.0.2 + '@ucanto/interface': ^4.0.2 + '@ucanto/principal': ^4.0.2 + '@ucanto/server': ^4.0.2 + '@ucanto/transport': ^4.0.2 + '@ucanto/validator': ^4.0.2 '@web3-storage/capabilities': workspace:^ assert: ^2.0.0 bigint-mod-arith: ^3.1.2 @@ -145,12 +145,12 @@ importers: dependencies: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 2.0.1 - '@ucanto/client': 3.0.3 - '@ucanto/core': 3.0.4 - '@ucanto/interface': 4.0.0 - '@ucanto/principal': 4.0.1 - '@ucanto/transport': 3.0.4 - '@ucanto/validator': 3.0.6 + '@ucanto/client': 4.0.2 + '@ucanto/core': 4.0.2 + '@ucanto/interface': 4.0.2 + '@ucanto/principal': 4.0.2 + '@ucanto/transport': 4.0.2 + '@ucanto/validator': 4.0.2 '@web3-storage/capabilities': link:../capabilities bigint-mod-arith: 3.1.2 conf: 10.2.0 @@ -171,7 +171,7 @@ importers: '@types/mocha': 10.0.1 '@types/node': 18.11.10 '@types/ws': 8.5.3 - '@ucanto/server': 3.0.7 + '@ucanto/server': 4.0.2 assert: 2.0.0 delay: 5.0.0 hd-scripts: 3.0.2 @@ -233,13 +233,13 @@ importers: '@types/assert': ^1.5.6 '@types/mocha': ^10.0.0 '@types/node': ^18.11.10 - '@ucanto/client': ^3.0.3 - '@ucanto/core': ^3.0.4 - '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.1 - '@ucanto/server': ^3.0.7 - '@ucanto/transport': ^3.0.4 - '@ucanto/validator': ^3.0.6 + '@ucanto/client': ^4.0.2 + '@ucanto/core': ^4.0.2 + '@ucanto/interface': ^4.0.2 + '@ucanto/principal': ^4.0.2 + '@ucanto/server': ^4.0.2 + '@ucanto/transport': ^4.0.2 + '@ucanto/validator': ^4.0.2 assert: ^2.0.0 hd-scripts: ^3.0.2 mocha: ^10.1.0 @@ -249,13 +249,13 @@ importers: dependencies: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 2.0.1 - '@ucanto/client': 3.0.3 - '@ucanto/core': 3.0.4 - '@ucanto/interface': 4.0.0 - '@ucanto/principal': 4.0.1 - '@ucanto/server': 3.0.7 - '@ucanto/transport': 3.0.4 - '@ucanto/validator': 3.0.6 + '@ucanto/client': 4.0.2 + '@ucanto/core': 4.0.2 + '@ucanto/interface': 4.0.2 + '@ucanto/principal': 4.0.2 + '@ucanto/server': 4.0.2 + '@ucanto/transport': 4.0.2 + '@ucanto/validator': 4.0.2 devDependencies: '@types/assert': 1.5.6 '@types/mocha': 10.0.1 @@ -274,11 +274,11 @@ importers: '@ipld/unixfs': ^2.0.0 '@types/assert': ^1.5.6 '@types/mocha': ^10.0.0 - '@ucanto/client': ^3.0.5 - '@ucanto/interface': ^4.0.0 - '@ucanto/principal': ^4.0.1 - '@ucanto/server': ^3.0.8 - '@ucanto/transport': ^3.0.5 + '@ucanto/client': ^4.0.2 + '@ucanto/interface': ^4.0.2 + '@ucanto/principal': ^4.0.2 + '@ucanto/server': ^4.0.2 + '@ucanto/transport': ^4.0.2 '@web3-storage/capabilities': workspace:^ assert: ^2.0.0 blockstore-core: ^2.0.2 @@ -297,9 +297,9 @@ importers: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 2.0.1 '@ipld/unixfs': 2.0.0 - '@ucanto/client': 3.0.5 - '@ucanto/interface': 4.0.0 - '@ucanto/transport': 3.0.5 + '@ucanto/client': 4.0.2 + '@ucanto/interface': 4.0.2 + '@ucanto/transport': 4.0.2 '@web3-storage/capabilities': link:../capabilities multiformats: 10.0.2 p-queue: 7.3.0 @@ -307,8 +307,8 @@ importers: devDependencies: '@types/assert': 1.5.6 '@types/mocha': 10.0.1 - '@ucanto/principal': 4.0.1 - '@ucanto/server': 3.0.8 + '@ucanto/principal': 4.0.2 + '@ucanto/server': 4.0.2 assert: 2.0.0 blockstore-core: 2.0.2 c8: 7.12.0 @@ -632,6 +632,14 @@ packages: '@ipld/dag-cbor': 8.0.0 '@ipld/dag-json': 9.0.1 multiformats: 10.0.2 + dev: false + + /@ipld/dag-ucan/3.0.1: + resolution: {integrity: sha512-71YwJeRHxwX3diPXfwiuzhJTjmJSqi8XW/x5Xglp82UqpM5xwtNojB07VhmDXTZXhKi42bZHyQIOLaca/t9IHw==} + dependencies: + '@ipld/dag-cbor': 8.0.0 + '@ipld/dag-json': 9.0.1 + multiformats: 10.0.2 /@ipld/unixfs/2.0.0: resolution: {integrity: sha512-Li6ObZWlnQPM8R1O6mjUWQWlxjf+4yjZDERZIvNILOXeTvF0G36WFIdr3c2s9M6Aiez8gCMzodNnJLRXzXnJ0Q==} @@ -1624,109 +1632,61 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@ucanto/client/3.0.3: - resolution: {integrity: sha512-4Kyt1z+tSStpXHoFWVtogFwHfmOtuDh1TvDlVKscMqhZFAtTyo/jiYYaW5o8P4gqA3CXlqDLSdiMleo4Wx2plA==} + /@ucanto/client/4.0.2: + resolution: {integrity: sha512-kSAlNlk8lpK2eShsXe9cE2I4iP1a7vq8wIFpzLR8Jjvh0YN4oI3zYQ6grrKJGHrork1mubkqIimzZerHCzFiwQ==} dependencies: - '@ucanto/interface': 4.0.0 + '@ucanto/interface': 4.0.2 multiformats: 10.0.2 dev: false - /@ucanto/client/3.0.5: - resolution: {integrity: sha512-b0x/mAW0vpgZauATbcYK82WSLfIqe2i2YJ0Hj6tugmBpe5BpPZLI7LCTtBZtLQRF028Qr6ufHwdJN+xDZ2TLaA==} - dependencies: - '@ucanto/interface': 3.0.1 - multiformats: 10.0.2 - dev: false - - /@ucanto/core/3.0.4: - resolution: {integrity: sha512-IDvp67QohCBKST2EXbNiqG2YL4brBCVqyWFV5Jrc4eCu7kpH7WBUhBRE04TSsSqB+v+J4cRo40iAiiGWxlzNNw==} + /@ucanto/core/4.0.2: + resolution: {integrity: sha512-FxR6o4HsJepiYCj21j0F7D2vSPV4z6gk4489oo9NP/uF7+YJdZBSTxPytvBd/Ir7+2xlyFvBXP8Uxx/JRQu9HA==} dependencies: '@ipld/car': 5.0.1 '@ipld/dag-cbor': 8.0.0 - '@ipld/dag-ucan': 2.0.1 - '@ucanto/interface': 4.0.0 - multiformats: 10.0.2 - - /@ucanto/core/3.0.5: - resolution: {integrity: sha512-UJ4PZ0EKdhJ9n/3qyXvDGTw0j8G6wmy4cZphLlQ7Z4+TJAlR2YciWtAFztsxK97ylRSU/n3UmqorjZwlP9mM/w==} - dependencies: - '@ipld/car': 5.0.1 - '@ipld/dag-cbor': 8.0.0 - '@ipld/dag-ucan': 2.0.1 - '@ucanto/interface': 3.0.1 + '@ipld/dag-ucan': 3.0.1 + '@ucanto/interface': 4.0.2 multiformats: 10.0.2 - /@ucanto/interface/3.0.1: - resolution: {integrity: sha512-1UlyLMjJwgzAmhlqu/V1gz0xrE9MUiI3gdzxOJbIXwrS7zAWsbtUZqIS/SPpr1+PYnNO8PHSGyGekb+N0dqtWQ==} + /@ucanto/interface/4.0.2: + resolution: {integrity: sha512-3EPO9LRJy9ENWNBLk/x5XOx6ALCzgMkndvdRHJi8VTMKm4XroSnUYLarC3pPLdAWsF7NlmFN4g6aLz4mS9bHUQ==} dependencies: - '@ipld/dag-ucan': 2.0.1 - multiformats: 10.0.2 - - /@ucanto/interface/4.0.0: - resolution: {integrity: sha512-4OZ8BIpF4PvvbAaCBYD13tIL70UC9f1ust9RWNUBeEA9dfgypbb2cWlZAyBpGOovLMBgeHDnvNr70NCOTLcWIQ==} - dependencies: - '@ipld/dag-ucan': 2.0.1 + '@ipld/dag-ucan': 3.0.1 multiformats: 10.0.2 - /@ucanto/principal/4.0.1: - resolution: {integrity: sha512-D5ZWsRgWs3WriFEyGuisIpJYg/Mbo9GzI0ogu0jQ3HG9q2qE5Z0qEGDWBcmw6MdIIfi/5NMzxtVXOHeJY7sqPA==} + /@ucanto/principal/4.0.2: + resolution: {integrity: sha512-hicpJ5EGKlXPHJ4BhV1ymn6Sk4Rw/htCU0iAPpu6Ls8+9qVbKrFF/3GjVxlZOeWxOATNM2WHRfag5hBimyIrbw==} dependencies: - '@ipld/dag-ucan': 2.0.1 + '@ipld/dag-ucan': 3.0.1 '@noble/ed25519': 1.7.1 - '@ucanto/interface': 4.0.0 + '@ucanto/interface': 4.0.2 multiformats: 10.0.2 one-webcrypto: 1.0.3 - /@ucanto/server/3.0.7: - resolution: {integrity: sha512-Q1WzThJDdOQIYZS9opd/PakfFCenp7ksFvDm6YWvB8k8w8l44+vofggaUneCEThewg2oj3wkPMnsJX7erNT0Vw==} - dependencies: - '@ucanto/core': 3.0.4 - '@ucanto/interface': 4.0.0 - '@ucanto/validator': 3.0.6 - - /@ucanto/server/3.0.8: - resolution: {integrity: sha512-qktafCRX/CSrXLUoyFyP1BDyZ7MDKeBE4xeNP3OTm7BxT/6DvuFIEHgoxaoI2rfCUlog38M1LA2BXCLH5JjVwg==} + /@ucanto/server/4.0.2: + resolution: {integrity: sha512-UwuVqIY6i5JB+coxNMCNThbusqL5kCAlxcydgrxH8Cv3bKCP4lbsrYhCVHH+ETLmxWpdY/AiKCyDyhjJq5y5hQ==} dependencies: - '@ucanto/core': 3.0.5 - '@ucanto/interface': 3.0.1 - '@ucanto/validator': 3.0.7 + '@ucanto/core': 4.0.2 + '@ucanto/interface': 4.0.2 + '@ucanto/validator': 4.0.2 - /@ucanto/transport/3.0.4: - resolution: {integrity: sha512-nvfXCheawqknvUBFcuM/+efiX0+VosqdTewKk301yHfOHthmyBWLM/3OUHoy3wThPT3PFN8OkD4gsXkJ6yOe8g==} + /@ucanto/transport/4.0.2: + resolution: {integrity: sha512-KRWUcmmu6tvVKGO+Q0FnnUcEnIgFNGsQg5Udma+WQrQjJLcd+cDYrz5EhGItMmsC/gtM9Cm2+YMSZL21S/yf9A==} dependencies: '@ipld/car': 5.0.1 '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.4 - '@ucanto/interface': 4.0.0 + '@ucanto/core': 4.0.2 + '@ucanto/interface': 4.0.2 multiformats: 10.0.2 dev: false - /@ucanto/transport/3.0.5: - resolution: {integrity: sha512-4qq5bQB1xnhLGZ+vq9xMDfYiqhVorgvPv85J+ut1gkT3SmTPTUHUbEJteLpc12lHwi0xoiBtsw5oFBJ3KjhIwQ==} - dependencies: - '@ipld/car': 5.0.1 - '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.5 - '@ucanto/interface': 3.0.1 - multiformats: 10.0.2 - dev: false - - /@ucanto/validator/3.0.6: - resolution: {integrity: sha512-ooATo3z12w1Yss8VSBJKaG+0qOUkpiV8LS6/xTOH0kBaZJ1vFRkJ0iBfAkjIQGz0f/27VsgbAgJMvPP1qFCN1Q==} - dependencies: - '@ipld/car': 5.0.1 - '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.4 - '@ucanto/interface': 4.0.0 - multiformats: 10.0.2 - - /@ucanto/validator/3.0.7: - resolution: {integrity: sha512-goeT7Fe7DpIx9AL95KfOB3mou+KjC7oU63qIuhZcbPaP5F9/9IXI4mz3QHGLV6KW6PT0dg1mtn0WEvDSDyzXeQ==} + /@ucanto/validator/4.0.2: + resolution: {integrity: sha512-TXY5Pu/mbrpiDb0/1s0Bl/LKNX23hDKZYbcM9kAyAhO1C3EUIm7r2kYYJJgU1hc9dGGnPPSsvv+vu8xwj0yclg==} dependencies: '@ipld/car': 5.0.1 '@ipld/dag-cbor': 8.0.0 - '@ucanto/core': 3.0.5 - '@ucanto/interface': 3.0.1 + '@ucanto/core': 4.0.2 + '@ucanto/interface': 4.0.2 multiformats: 10.0.2 /@vue/compiler-core/3.2.45: From 00db6c2a94f9aca62ef51ced21d469179586cad2 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:46:35 -0800 Subject: [PATCH 14/24] rm unused dependencies from packages/capabilities/package.json --- packages/capabilities/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/capabilities/package.json b/packages/capabilities/package.json index 98081dd5a..e2fdf838a 100644 --- a/packages/capabilities/package.json +++ b/packages/capabilities/package.json @@ -57,13 +57,9 @@ "dist/src/**/*.d.ts.map" ], "dependencies": { - "@ipld/car": "^5.0.1", - "@ipld/dag-ucan": "^2.0.1", - "@ucanto/client": "^4.0.2", "@ucanto/core": "^4.0.2", "@ucanto/interface": "^4.0.2", "@ucanto/principal": "^4.0.2", - "@ucanto/server": "^4.0.2", "@ucanto/transport": "^4.0.2", "@ucanto/validator": "^4.0.2" }, From c28311f7ef048ac1d77a82dd4081b402424e6327 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:48:03 -0800 Subject: [PATCH 15/24] update pnpm-lock.yaml --- pnpm-lock.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67fc6a07f..f3459f763 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,16 +228,12 @@ importers: packages/capabilities: specifiers: - '@ipld/car': ^5.0.1 - '@ipld/dag-ucan': ^2.0.1 '@types/assert': ^1.5.6 '@types/mocha': ^10.0.0 '@types/node': ^18.11.10 - '@ucanto/client': ^4.0.2 '@ucanto/core': ^4.0.2 '@ucanto/interface': ^4.0.2 '@ucanto/principal': ^4.0.2 - '@ucanto/server': ^4.0.2 '@ucanto/transport': ^4.0.2 '@ucanto/validator': ^4.0.2 assert: ^2.0.0 @@ -247,13 +243,9 @@ importers: typescript: 4.8.4 watch: ^1.0.2 dependencies: - '@ipld/car': 5.0.1 - '@ipld/dag-ucan': 2.0.1 - '@ucanto/client': 4.0.2 '@ucanto/core': 4.0.2 '@ucanto/interface': 4.0.2 '@ucanto/principal': 4.0.2 - '@ucanto/server': 4.0.2 '@ucanto/transport': 4.0.2 '@ucanto/validator': 4.0.2 devDependencies: From 02017b703b5dfd65c91d8f936d992f3535b94049 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:52:16 -0800 Subject: [PATCH 16/24] rm unnecessary WIP changes to access-client cli (test-ucanto-connection) --- .../src/cli/cmd-test-ucanto-connection.js | 34 ------------------- packages/access-client/src/cli/index.js | 9 ----- 2 files changed, 43 deletions(-) delete mode 100644 packages/access-client/src/cli/cmd-test-ucanto-connection.js diff --git a/packages/access-client/src/cli/cmd-test-ucanto-connection.js b/packages/access-client/src/cli/cmd-test-ucanto-connection.js deleted file mode 100644 index 14c3c56f4..000000000 --- a/packages/access-client/src/cli/cmd-test-ucanto-connection.js +++ /dev/null @@ -1,34 +0,0 @@ -/* eslint-disable no-console */ -import * as Client from '@ucanto/client' -// import * as ed25519 from '@ucanto/principal/ed25519' -import { DID } from '@ucanto/principal' -import * as HttpChannel from '@ucanto/transport/http' - -// fixtures from w3ui wip -// https://github.com/web3-storage/w3ui/blob/08bc15aca6aef0a3495e94697786551211f6edb7/packages/keyring-core/src/service.ts -export const serviceURL = new URL('https://access.web3.storage') -export const serviceKey = DID.parse( - 'did:key:z6MkrZ1r5XBFZjBU34qyD8fueMbMRkKw17BZaq2ivKFjnz2z' -) -export const servicePrincipal = serviceKey.withDID('did:web:web3.storage') - -/** - * - * @param {object} opts - * @param {string} [opts.url] - url to open ucanto connection to - */ -export async function testUcantoConnection(opts) { - const ucantoHttpUrl = new URL(opts.url || serviceURL) - console.log('testing ucanto connection against', ucantoHttpUrl.toString()) - const channel = HttpChannel.open({ - fetch, - url: ucantoHttpUrl, - }) - const connection = Client.connect({ - id: serviceKey, - encoder: await import('@ucanto/transport/car'), - decoder: await import('@ucanto/transport/cbor'), - channel, - }) - console.log('connection.id.did()', connection.id.did().toString()) -} diff --git a/packages/access-client/src/cli/index.js b/packages/access-client/src/cli/index.js index 474cfd1fc..43bb3e146 100755 --- a/packages/access-client/src/cli/index.js +++ b/packages/access-client/src/cli/index.js @@ -10,7 +10,6 @@ import { cmdCreateAccount } from './cmd-create-account.js' import { cmdLink } from './cmd-link.js' import { cmdSetup } from './cmd-setup.js' import { cmdWhoami } from './cmd-whoami.js' -import { testUcantoConnection } from './cmd-test-ucanto-connection.js' import { StoreConf } from '../stores/store-conf.js' import { Agent } from '../agent.js' import { stringToDelegation } from '../encoding.js' @@ -160,12 +159,4 @@ prog } }) -prog - .command('test-ucanto-connection') - .describe('Test ucanto connection to the access service url') - .option('--url', 'URL to open a ucanto connection against') - .action(async (opts) => { - await testUcantoConnection(opts) - }) - prog.parse(process.argv) From 4bca15c15438e70715c421d8c34a36815024ae47 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:17:08 -0800 Subject: [PATCH 17/24] Update packages/access-client/src/stores/types.ts Co-authored-by: Irakli Gozalishvili --- packages/access-client/src/stores/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/access-client/src/stores/types.ts b/packages/access-client/src/stores/types.ts index 2c91f8503..6517b0050 100644 --- a/packages/access-client/src/stores/types.ts +++ b/packages/access-client/src/stores/types.ts @@ -6,7 +6,7 @@ import { SpaceMeta, } from '../types.js' import { SignerArchive, DID } from '@ucanto/interface' -import { RSA } from '@ucanto/principal/.' +import { RSA } from '@ucanto/principal' /** * Store interface that all stores need to implement From 2bf043c2a339a7f845abe5496f29cf2c2adc9b86 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:18:58 -0800 Subject: [PATCH 18/24] Update packages/access-client/test/stores/store-indexeddb.browser.test.js Co-authored-by: Irakli Gozalishvili --- .../test/stores/store-indexeddb.browser.test.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/access-client/test/stores/store-indexeddb.browser.test.js b/packages/access-client/test/stores/store-indexeddb.browser.test.js index 9c518db35..5d0984c37 100644 --- a/packages/access-client/test/stores/store-indexeddb.browser.test.js +++ b/packages/access-client/test/stores/store-indexeddb.browser.test.js @@ -12,11 +12,10 @@ describe('IndexedDB store', () => { // principal private key is not extractable const archive = data.principal.toArchive() assert(!(archive instanceof Uint8Array)) - const keys = [...Object.entries(archive.keys)] - assert.equal(keys.length, 1) - const firstKey = keys[0][1] - assert(firstKey instanceof CryptoKey) - assert.equal(firstKey.extractable, false) + const [[did, key], ...keys] = [...Object.entries(archive.keys)] + assert.deepEqual(keys, []) + assert(key instanceof CryptoKey) + assert.equal(key.extractable, false) // no accounts or delegations yet assert.equal(data.spaces.size, 0) From f32a6e7e16d27f465648de8b327b8e65009cf4e3 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:19:14 -0800 Subject: [PATCH 19/24] Update packages/access-client/src/stores/types.ts Co-authored-by: Irakli Gozalishvili --- packages/access-client/src/stores/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/access-client/src/stores/types.ts b/packages/access-client/src/stores/types.ts index 6517b0050..c1e4559f7 100644 --- a/packages/access-client/src/stores/types.ts +++ b/packages/access-client/src/stores/types.ts @@ -5,7 +5,7 @@ import { DelegationMeta, SpaceMeta, } from '../types.js' -import { SignerArchive, DID } from '@ucanto/interface' +import { SignerArchive, DID, DIDKey } from '@ucanto/interface' import { RSA } from '@ucanto/principal' /** From ea4f24ac9ab3a320b2201df4f477750395656185 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:19:21 -0800 Subject: [PATCH 20/24] Update packages/access-client/src/stores/types.ts Co-authored-by: Irakli Gozalishvili --- packages/access-client/src/stores/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/access-client/src/stores/types.ts b/packages/access-client/src/stores/types.ts index c1e4559f7..563b3c7e0 100644 --- a/packages/access-client/src/stores/types.ts +++ b/packages/access-client/src/stores/types.ts @@ -50,7 +50,7 @@ export interface IStore { export interface StoreDataIDB { id: number meta: AgentMeta - principal: SignerArchive, typeof RSA.signatureCode> + principal: SignerArchive currentSpace?: DID spaces: Map delegations: Map< From f3e5ca52374449c7149990f39888ffb889525d0b Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:23:08 -0800 Subject: [PATCH 21/24] fix comment in voucher capabilities --- packages/capabilities/src/voucher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/capabilities/src/voucher.js b/packages/capabilities/src/voucher.js index 1fefd16e6..65ae24f21 100644 --- a/packages/capabilities/src/voucher.js +++ b/packages/capabilities/src/voucher.js @@ -29,7 +29,7 @@ export const Product = URI.uri() export const Identity = URI.match({ protocol: 'mailto:' }) /** - * Services are identified using did:key identifier. + * Services are identified using a decentralized identifier. */ export const Service = DID.match({}) From f4fcc4ae583eff1e1ac579832e83920e4ee7a966 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:24:54 -0800 Subject: [PATCH 22/24] lint --- .../access-client/test/stores/store-indexeddb.browser.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/access-client/test/stores/store-indexeddb.browser.test.js b/packages/access-client/test/stores/store-indexeddb.browser.test.js index 5d0984c37..285bd369d 100644 --- a/packages/access-client/test/stores/store-indexeddb.browser.test.js +++ b/packages/access-client/test/stores/store-indexeddb.browser.test.js @@ -12,7 +12,8 @@ describe('IndexedDB store', () => { // principal private key is not extractable const archive = data.principal.toArchive() assert(!(archive instanceof Uint8Array)) - const [[did, key], ...keys] = [...Object.entries(archive.keys)] + // eslint-disable-next-line no-unused-vars + const [[_, key], ...keys] = [...Object.entries(archive.keys)] assert.deepEqual(keys, []) assert(key instanceof CryptoKey) assert.equal(key.extractable, false) From 627eea502bbe382cebfb4ceeee1fd15ce0dbd47d Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Wed, 7 Dec 2022 14:04:02 -0800 Subject: [PATCH 23/24] upgrade @ipld/dag-ucan from v2 to v3 in access-client and upload-client --- packages/access-client/package.json | 2 +- packages/upload-client/package.json | 2 +- pnpm-lock.yaml | 16 ++++------------ 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/access-client/package.json b/packages/access-client/package.json index f4a6246ea..9096a71b4 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -60,7 +60,7 @@ ], "dependencies": { "@ipld/car": "^5.0.1", - "@ipld/dag-ucan": "^2.0.1", + "@ipld/dag-ucan": "^3.0.1", "@ucanto/client": "^4.0.2", "@ucanto/core": "^4.0.2", "@ucanto/interface": "^4.0.2", diff --git a/packages/upload-client/package.json b/packages/upload-client/package.json index 709dd318a..cb27a8f46 100644 --- a/packages/upload-client/package.json +++ b/packages/upload-client/package.json @@ -64,7 +64,7 @@ ], "dependencies": { "@ipld/car": "^5.0.0", - "@ipld/dag-ucan": "^2.0.1", + "@ipld/dag-ucan": "^3.0.1", "@ipld/unixfs": "^2.0.0", "@ucanto/client": "^4.0.2", "@ucanto/interface": "^4.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c54e288fb..95e6d0920 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,7 +109,7 @@ importers: packages/access-client: specifiers: '@ipld/car': ^5.0.1 - '@ipld/dag-ucan': ^2.0.1 + '@ipld/dag-ucan': ^3.0.1 '@types/assert': ^1.5.6 '@types/inquirer': ^9.0.3 '@types/mocha': ^10.0.1 @@ -148,7 +148,7 @@ importers: zod: ^3.19.1 dependencies: '@ipld/car': 5.0.1 - '@ipld/dag-ucan': 2.0.1 + '@ipld/dag-ucan': 3.0.1 '@ucanto/client': 4.0.2 '@ucanto/core': 4.0.2 '@ucanto/interface': 4.0.2 @@ -268,7 +268,7 @@ importers: packages/upload-client: specifiers: '@ipld/car': ^5.0.0 - '@ipld/dag-ucan': ^2.0.1 + '@ipld/dag-ucan': ^3.0.1 '@ipld/unixfs': ^2.0.0 '@types/assert': ^1.5.6 '@types/mocha': ^10.0.1 @@ -293,7 +293,7 @@ importers: typescript: 4.9.3 dependencies: '@ipld/car': 5.0.1 - '@ipld/dag-ucan': 2.0.1 + '@ipld/dag-ucan': 3.0.1 '@ipld/unixfs': 2.0.0 '@ucanto/client': 4.0.2 '@ucanto/interface': 4.0.2 @@ -584,14 +584,6 @@ packages: multiformats: 10.0.2 dev: true - /@ipld/dag-ucan/2.0.1: - resolution: {integrity: sha512-0cqnXPmjmFhz9JVtgU/wCaNvbnFr/HYzl4LaVm7Q7c8FsF9u671rOvNgCbSpJL6f+YTM4Q4fihxLYWPHaUSEww==} - dependencies: - '@ipld/dag-cbor': 8.0.0 - '@ipld/dag-json': 9.0.1 - multiformats: 10.0.2 - dev: false - /@ipld/dag-ucan/3.0.1: resolution: {integrity: sha512-71YwJeRHxwX3diPXfwiuzhJTjmJSqi8XW/x5Xglp82UqpM5xwtNojB07VhmDXTZXhKi42bZHyQIOLaca/t9IHw==} dependencies: From e483d1e3b6f89b55fd9425bc84c0eac497132bb4 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Wed, 7 Dec 2022 14:05:54 -0800 Subject: [PATCH 24/24] clean up diff --- packages/access-client/package.json | 3 +-- packages/access-client/src/cli/index.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/access-client/package.json b/packages/access-client/package.json index 9096a71b4..9e0c0933b 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -23,8 +23,7 @@ "test:node": "mocha 'test/**/!(*.browser).test.js' -n experimental-vm-modules -n no-warnings", "test:browser": "playwright-test 'test/**/!(*.node).test.js'", "testw": "watch 'pnpm test' src test --interval 1", - "rc": "npm version prerelease --preid rc", - "w3access": "./src/cli/index.js" + "rc": "npm version prerelease --preid rc" }, "exports": { ".": "./src/index.js", diff --git a/packages/access-client/src/cli/index.js b/packages/access-client/src/cli/index.js index 5a7f179fc..0c87f5af9 100755 --- a/packages/access-client/src/cli/index.js +++ b/packages/access-client/src/cli/index.js @@ -178,5 +178,4 @@ prog console.error(`Run "${NAME} setup" first`) } }) - prog.parse(process.argv)