Skip to content

Commit

Permalink
fix: upgrade ucanto libs
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Apr 4, 2024
1 parent a78c3ea commit a36b64d
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 175 deletions.
14 changes: 7 additions & 7 deletions packages/access-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@
"dependencies": {
"@ipld/car": "^5.1.1",
"@ipld/dag-ucan": "^3.4.0",
"@ucanto/client": "^9.0.0",
"@ucanto/core": "^9.0.1",
"@ucanto/interface": "^9.0.0",
"@ucanto/principal": "^9.0.0",
"@ucanto/transport": "^9.1.0",
"@ucanto/validator": "^9.0.1",
"@ucanto/client": "^9.0.1",
"@ucanto/core": "^10.0.0",
"@ucanto/interface": "^10.0.0",
"@ucanto/principal": "^9.0.1",
"@ucanto/transport": "^9.1.1",
"@ucanto/validator": "^9.0.2",
"@web3-storage/capabilities": "workspace:^",
"@web3-storage/did-mailto": "workspace:^",
"bigint-mod-arith": "^3.1.2",
Expand All @@ -125,7 +125,7 @@
"@types/sinon": "^10.0.19",
"@types/varint": "^6.0.1",
"@types/ws": "^8.5.4",
"@ucanto/server": "^9.0.1",
"@ucanto/server": "^10.0.0",
"assert": "^2.0.0",
"mocha": "^10.2.0",
"playwright-test": "^12.3.4",
Expand Down
10 changes: 5 additions & 5 deletions packages/capabilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@
"dist/src/**/*.d.ts.map"
],
"dependencies": {
"@ucanto/core": "^9.0.1",
"@ucanto/interface": "^9.0.0",
"@ucanto/principal": "^9.0.0",
"@ucanto/transport": "^9.1.0",
"@ucanto/validator": "^9.0.1",
"@ucanto/core": "^10.0.0",
"@ucanto/interface": "^10.0.0",
"@ucanto/principal": "^9.0.1",
"@ucanto/transport": "^9.1.1",
"@ucanto/validator": "^9.0.2",
"@web3-storage/data-segment": "^3.2.0",
"uint8arrays": "^5.0.3"
},
Expand Down
62 changes: 32 additions & 30 deletions packages/capabilities/src/ucan.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,40 +91,42 @@ export const conclude = capability({
with: Schema.did(),
// TODO: Should this just have bytes?
nb: Schema.struct({
/**
* A link to the UCAN invocation that this receipt is for.
*/
ran: UCANLink,
/**
* The value output of the invocation in Result format.
*/
out: Schema.unknown(),
/**
* Tasks that the invocation would like to enqueue.
*/
next: Schema.array(UCANLink),
/**
* Additional data about the receipt
*/
meta: Schema.unknown(),
/**
* The UTC Unix timestamp at which the Receipt was issued
*/
time: Schema.integer(),
bytes: Schema.Bytes,
// /**
// * A link to the UCAN invocation that this receipt is for.
// */
// ran: UCANLink,
// /**
// * The value output of the invocation in Result format.
// */
// out: Schema.unknown(),
// /**
// * Tasks that the invocation would like to enqueue.
// */
// next: Schema.array(UCANLink),
// /**
// * Additional data about the receipt
// */
// meta: Schema.unknown(),
// /**
// * The UTC Unix timestamp at which the Receipt was issued
// */
// time: Schema.integer(),
}),
derives: (claim, from) =>
// With field MUST be the same
and(equalWith(claim, from)) ??
// invocation MUST be the same
and(checkLink(claim.nb.ran, from.nb.ran, 'nb.ran')) ??
// value output MUST be the same
and(equal(claim.nb.out, from.nb.out, 'nb.out')) ??
// tasks to enqueue MUST be the same
and(equal(claim.nb.next, from.nb.next, 'nb.next')) ??
// additional data MUST be the same
and(equal(claim.nb.meta, from.nb.meta, 'nb.meta')) ??
// the receipt issue time MUST be the same
equal(claim.nb.time, from.nb.time, 'nb.time'),
equal(claim.nb.bytes, from.nb.bytes, 'nb.bytes'),
// // invocation MUST be the same
// and(checkLink(claim.nb.ran, from.nb.ran, 'nb.ran')) ??
// // value output MUST be the same
// and(equal(claim.nb.out, from.nb.out, 'nb.out')) ??
// // tasks to enqueue MUST be the same
// and(equal(claim.nb.next, from.nb.next, 'nb.next')) ??
// // additional data MUST be the same
// and(equal(claim.nb.meta, from.nb.meta, 'nb.meta')) ??
// // the receipt issue time MUST be the same
// equal(claim.nb.time, from.nb.time, 'nb.time'),
})

/**
Expand Down
16 changes: 8 additions & 8 deletions packages/filecoin-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,22 +153,22 @@
},
"dependencies": {
"@ipld/dag-ucan": "^3.4.0",
"@ucanto/client": "^9.0.0",
"@ucanto/core": "^9.0.1",
"@ucanto/interface": "^9.0.0",
"@ucanto/server": "^9.0.1",
"@ucanto/transport": "^9.1.0",
"@ucanto/client": "^9.0.1",
"@ucanto/core": "^10.0.0",
"@ucanto/interface": "^10.0.0",
"@ucanto/server": "^10.0.0",
"@ucanto/transport": "^9.1.1",
"@web3-storage/capabilities": "workspace:^",
"@web3-storage/content-claims": "^4.0.2",
"@web3-storage/content-claims": "^4.0.4",
"@web3-storage/data-segment": "^4.0.0",
"fr32-sha2-256-trunc254-padded-binary-tree-multihash": "^3.3.0",
"p-map": "^6.0.0"
},
"devDependencies": {
"@ipld/car": "^5.1.1",
"@types/mocha": "^10.0.1",
"@ucanto/client": "^9.0.0",
"@ucanto/principal": "^9.0.0",
"@ucanto/client": "^9.0.1",
"@ucanto/principal": "^9.0.1",
"@web-std/blob": "^3.0.5",
"@web3-storage/eslint-config-w3up": "workspace:^",
"@web3-storage/filecoin-client": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/filecoin-api/src/storefront/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ async function findDataAggregationProof({ taskStore, receiptStore }, task) {
aggregateAcceptReceipt = receiptRes.ok.out.ok
}
if (!receiptRes.ok.fx.join) break
task = receiptRes.ok.fx.join
task = receiptRes.ok.fx.join.link()
}
if (!inclusion) {
return {
Expand Down
12 changes: 6 additions & 6 deletions packages/filecoin-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@
],
"dependencies": {
"@ipld/dag-ucan": "^3.4.0",
"@ucanto/client": "^9.0.0",
"@ucanto/core": "^9.0.1",
"@ucanto/interface": "^9.0.0",
"@ucanto/transport": "^9.1.0",
"@ucanto/client": "^9.0.1",
"@ucanto/core": "^10.0.0",
"@ucanto/interface": "^10.0.0",
"@ucanto/transport": "^9.1.1",
"@web3-storage/capabilities": "workspace:^"
},
"devDependencies": {
"@ipld/car": "^5.1.1",
"@ipld/dag-json": "^10.1.4",
"@types/assert": "^1.5.6",
"@types/mocha": "^10.0.1",
"@ucanto/principal": "^9.0.0",
"@ucanto/server": "^9.0.1",
"@ucanto/principal": "^9.0.1",
"@ucanto/server": "^10.0.0",
"@web3-storage/data-segment": "^4.0.0",
"@web3-storage/eslint-config-w3up": "workspace:^",
"assert": "^2.0.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/upload-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@
"test-watch": "pnpm build && mocha --bail --timeout 10s --watch --parallel -n no-warnings -n experimental-vm-modules -n experimental-fetch --watch-files src,test"
},
"dependencies": {
"@ucanto/client": "^9.0.0",
"@ucanto/interface": "^9.0.0",
"@ucanto/principal": "^9.0.0",
"@ucanto/server": "^9.0.1",
"@ucanto/transport": "^9.1.0",
"@ucanto/validator": "^9.0.1",
"@ucanto/client": "^9.0.1",
"@ucanto/interface": "^10.0.0",
"@ucanto/principal": "^9.0.1",
"@ucanto/server": "^10.0.0",
"@ucanto/transport": "^9.1.1",
"@ucanto/validator": "^9.0.2",
"@web3-storage/access": "workspace:^",
"@web3-storage/capabilities": "workspace:^",
"@web3-storage/did-mailto": "workspace:^",
Expand All @@ -189,7 +189,7 @@
"@ipld/car": "^5.1.1",
"@ipld/dag-ucan": "^3.4.0",
"@types/mocha": "^10.0.1",
"@ucanto/core": "^9.0.1",
"@ucanto/core": "^10.0.0",
"@types/sinon": "^17.0.3",
"@web-std/blob": "^3.0.5",
"@web3-storage/eslint-config-w3up": "workspace:^",
Expand Down
10 changes: 5 additions & 5 deletions packages/upload-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
"@ipld/dag-cbor": "^9.0.6",
"@ipld/dag-ucan": "^3.4.0",
"@ipld/unixfs": "^2.1.1",
"@ucanto/client": "^9.0.0",
"@ucanto/interface": "^9.0.0",
"@ucanto/transport": "^9.1.0",
"@ucanto/client": "^9.0.1",
"@ucanto/interface": "^10.0.0",
"@ucanto/transport": "^9.1.1",
"@web3-storage/capabilities": "workspace:^",
"@web3-storage/data-segment": "^5.1.0",
"@web3-storage/filecoin-client": "workspace:^",
Expand All @@ -86,8 +86,8 @@
"@types/assert": "^1.5.6",
"@types/mocha": "^10.0.1",
"@types/varint": "^6.0.1",
"@ucanto/principal": "^9.0.0",
"@ucanto/server": "^9.0.1",
"@ucanto/principal": "^9.0.1",
"@ucanto/server": "^10.0.0",
"@web3-storage/eslint-config-w3up": "workspace:^",
"assert": "^2.0.0",
"blockstore-core": "^3.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/w3up-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
"dependencies": {
"@ipld/dag-ucan": "^3.4.0",
"@ucanto/client": "^9.0.0",
"@ucanto/core": "^9.0.1",
"@ucanto/interface": "^9.0.0",
"@ucanto/principal": "^9.0.0",
"@ucanto/transport": "^9.1.0",
"@ucanto/core": "^10.0.0",
"@ucanto/interface": "^10.0.0",
"@ucanto/principal": "^9.0.1",
"@ucanto/transport": "^9.1.1",
"@web3-storage/access": "workspace:^",
"@web3-storage/capabilities": "workspace:^",
"@web3-storage/did-mailto": "workspace:^",
Expand All @@ -126,7 +126,7 @@
"@types/assert": "^1.5.6",
"@types/mocha": "^10.0.1",
"@types/node": "^20.8.4",
"@ucanto/server": "^9.0.1",
"@ucanto/server": "^10.0.0",
"@web3-storage/data-segment": "^5.0.0",
"@web3-storage/eslint-config-w3up": "workspace:^",
"@web3-storage/upload-api": "workspace:^",
Expand Down
Loading

0 comments on commit a36b64d

Please sign in to comment.