diff --git a/apps/client-web/CHANGELOG.md b/apps/client-web/CHANGELOG.md index 13dffde..3cacb95 100644 --- a/apps/client-web/CHANGELOG.md +++ b/apps/client-web/CHANGELOG.md @@ -1,5 +1,14 @@ # client-web +## 0.0.16 + +### Patch Changes + +- Updated dependencies + - @parcnet-js/podspec@1.1.3 + - @parcnet-js/client-rpc@1.1.6 + - @parcnet-js/client-helpers@1.0.7 + ## 0.0.15 ### Patch Changes diff --git a/apps/client-web/package.json b/apps/client-web/package.json index fe2e6eb..8c538a4 100644 --- a/apps/client-web/package.json +++ b/apps/client-web/package.json @@ -1,7 +1,7 @@ { "name": "client-web", "private": true, - "version": "0.0.15", + "version": "0.0.16", "type": "module", "scripts": { "dev": "vite", diff --git a/examples/test-app/CHANGELOG.md b/examples/test-app/CHANGELOG.md index def9745..f55c281 100644 --- a/examples/test-app/CHANGELOG.md +++ b/examples/test-app/CHANGELOG.md @@ -1,5 +1,16 @@ # test-app +## 1.0.20 + +### Patch Changes + +- Updated dependencies + - @parcnet-js/podspec@1.1.3 + - @parcnet-js/app-connector@1.1.8 + - @parcnet-js/client-rpc@1.1.6 + - @parcnet-js/ticket-spec@1.1.6 + - @parcnet-js/app-connector-react@1.0.3 + ## 1.0.19 ### Patch Changes diff --git a/examples/test-app/package.json b/examples/test-app/package.json index d13d55f..2d7c8f8 100644 --- a/examples/test-app/package.json +++ b/examples/test-app/package.json @@ -1,6 +1,6 @@ { "name": "test-app", - "version": "1.0.19", + "version": "1.0.20", "private": true, "type": "module", "scripts": { diff --git a/packages/app-connector-react/CHANGELOG.md b/packages/app-connector-react/CHANGELOG.md index d6a501f..a43e1fd 100644 --- a/packages/app-connector-react/CHANGELOG.md +++ b/packages/app-connector-react/CHANGELOG.md @@ -1,5 +1,11 @@ # @parcnet-js/app-connector-react +## 1.0.3 + +### Patch Changes + +- @parcnet-js/app-connector@1.1.8 + ## 1.0.2 ### Patch Changes diff --git a/packages/app-connector-react/package.json b/packages/app-connector-react/package.json index 1ccf485..3a38a29 100644 --- a/packages/app-connector-react/package.json +++ b/packages/app-connector-react/package.json @@ -1,6 +1,6 @@ { "name": "@parcnet-js/app-connector-react", - "version": "1.0.2", + "version": "1.0.3", "license": "GPL-3.0-or-later", "type": "module", "main": "dist/index.cjs", diff --git a/packages/app-connector/CHANGELOG.md b/packages/app-connector/CHANGELOG.md index 8ee91d4..ac199d1 100644 --- a/packages/app-connector/CHANGELOG.md +++ b/packages/app-connector/CHANGELOG.md @@ -1,5 +1,13 @@ # @parcnet-js/app-connector +## 1.1.8 + +### Patch Changes + +- Updated dependencies + - @parcnet-js/podspec@1.1.3 + - @parcnet-js/client-rpc@1.1.6 + ## 1.1.7 ### Patch Changes diff --git a/packages/app-connector/package.json b/packages/app-connector/package.json index 62be797..88bc047 100644 --- a/packages/app-connector/package.json +++ b/packages/app-connector/package.json @@ -1,6 +1,6 @@ { "name": "@parcnet-js/app-connector", - "version": "1.1.7", + "version": "1.1.8", "license": "GPL-3.0-or-later", "type": "module", "main": "dist/index.cjs", diff --git a/packages/app-connector/test/parcnet-connector.spec.ts b/packages/app-connector/test/parcnet-connector.spec.ts index c67e497..f93c95b 100644 --- a/packages/app-connector/test/parcnet-connector.spec.ts +++ b/packages/app-connector/test/parcnet-connector.spec.ts @@ -35,10 +35,16 @@ describe("parcnet-client should work", function () { const client = new ParcnetRPCConnector(chan.port2, mockDialog); expect(client.isConnected()).to.be.false; - client.start(() => { - // This is called when the connection is established - expect(client.isConnected()).to.be.true; - }); + client.start( + () => { + // This is called when the connection is established + expect(client.isConnected()).to.be.true; + }, + () => { + // This is called if the connection fails. We should never get here. + assert(false); + } + ); postRPCMessage(chan.port1, { type: RPCMessageType.PARCNET_CLIENT_READY diff --git a/packages/app-connector/test/utils.ts b/packages/app-connector/test/utils.ts index 524ade4..b79c60a 100644 --- a/packages/app-connector/test/utils.ts +++ b/packages/app-connector/test/utils.ts @@ -1,5 +1,5 @@ import { RPCMessageType } from "@parcnet-js/client-rpc"; -import { expect } from "vitest"; +import { assert, expect } from "vitest"; import type { DialogController } from "../src/adapters/iframe.js"; import { postRPCMessage } from "../src/adapters/iframe.js"; import { ParcnetRPCConnector } from "../src/rpc_client.js"; @@ -19,10 +19,16 @@ export async function connectedClient(): Promise<{ }> { const chan = new MessageChannel(); const client = new ParcnetRPCConnector(chan.port2, mockDialog); - client.start(() => { - // This is called when the connection is established - expect(client.isConnected()).to.be.true; - }); + client.start( + () => { + // This is called when the connection is established + expect(client.isConnected()).to.be.true; + }, + () => { + // This is called if the connection fails. We should never get here. + assert(false); + } + ); postRPCMessage(chan.port1, { type: RPCMessageType.PARCNET_CLIENT_READY diff --git a/packages/client-helpers/CHANGELOG.md b/packages/client-helpers/CHANGELOG.md index 2d4ef28..edc482c 100644 --- a/packages/client-helpers/CHANGELOG.md +++ b/packages/client-helpers/CHANGELOG.md @@ -1,5 +1,11 @@ # @parcnet-js/client-helpers +## 1.0.7 + +### Patch Changes + +- @parcnet-js/client-rpc@1.1.6 + ## 1.0.6 ### Patch Changes diff --git a/packages/client-helpers/package.json b/packages/client-helpers/package.json index 2a2f225..a28e797 100644 --- a/packages/client-helpers/package.json +++ b/packages/client-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@parcnet-js/client-helpers", - "version": "1.0.6", + "version": "1.0.7", "license": "GPL-3.0-or-later", "type": "module", "main": "dist/index.js", diff --git a/packages/client-rpc/CHANGELOG.md b/packages/client-rpc/CHANGELOG.md index 0426e20..482754c 100644 --- a/packages/client-rpc/CHANGELOG.md +++ b/packages/client-rpc/CHANGELOG.md @@ -1,5 +1,12 @@ # @parcnet-js/client-rpc +## 1.1.6 + +### Patch Changes + +- Updated dependencies + - @parcnet-js/podspec@1.1.3 + ## 1.1.5 ### Patch Changes diff --git a/packages/client-rpc/package.json b/packages/client-rpc/package.json index cff2242..102daa8 100644 --- a/packages/client-rpc/package.json +++ b/packages/client-rpc/package.json @@ -1,7 +1,7 @@ { "name": "@parcnet-js/client-rpc", "type": "module", - "version": "1.1.5", + "version": "1.1.6", "license": "GPL-3.0-or-later", "main": "dist/index.js", "module": "dist/index.js", diff --git a/packages/podspec/CHANGELOG.md b/packages/podspec/CHANGELOG.md index a780747..e3bb0c9 100644 --- a/packages/podspec/CHANGELOG.md +++ b/packages/podspec/CHANGELOG.md @@ -1,5 +1,11 @@ # @parcnet-js/podspec +## 1.1.3 + +### Patch Changes + +- Fix compatibility with POD serialization restrictions on membership list names + ## 1.1.2 ### Patch Changes diff --git a/packages/podspec/package.json b/packages/podspec/package.json index a78aa71..d8d159d 100644 --- a/packages/podspec/package.json +++ b/packages/podspec/package.json @@ -1,6 +1,6 @@ { "name": "@parcnet-js/podspec", - "version": "1.1.2", + "version": "1.1.3", "license": "GPL-3.0-or-later", "main": "dist/index.cjs", "module": "dist/index.js", @@ -30,8 +30,8 @@ }, "scripts": { "lint": "eslint . --max-warnings 0", - "build": "tsup 'src/**/*@(ts|tsx)' --format cjs,esm --clean --sourcemap", - "prepublish": "tsup 'src/**/*@(ts|tsx)' --format cjs,esm --clean --sourcemap --dts", + "build": "tsup 'src/**/*@(ts|tsx)' --format cjs,esm --clean --sourcemap --no-splitting", + "prepublish": "tsup 'src/**/*@(ts|tsx)' --format cjs,esm --clean --sourcemap --dts --no-splitting", "test": "vitest run --typecheck" }, "files": ["dist", "./README.md", "./LICENSE"], diff --git a/packages/podspec/src/gpc/proof_request.ts b/packages/podspec/src/gpc/proof_request.ts index 3334bcf..04dcc14 100644 --- a/packages/podspec/src/gpc/proof_request.ts +++ b/packages/podspec/src/gpc/proof_request.ts @@ -9,6 +9,7 @@ import type { } from "@pcd/gpc"; import type { POD, PODName, PODValue } from "@pcd/pod"; import { PodSpec } from "../parse/pod.js"; +import { $e } from "../pod_value_utils.js"; import type { EntriesSchema } from "../schemas/entries.js"; import type { PODSchema } from "../schemas/pod.js"; @@ -183,9 +184,9 @@ function makeProofRequest
( } for (const entriesTupleSchema of podSchema.tuples ?? []) { - const tupleName = `tuple_${podName}_entries_${entriesTupleSchema.entries.join( - "_" - )}`; + const tupleName = `tuple_${podName}_entries_${entriesTupleSchema.entries + .map((entryName) => entryName.replace("$", "_")) + .join("_")}`; tuples[tupleName] = { entries: entriesTupleSchema.entries.map( (entryName) => `${podName}.${entryName}` satisfies PODEntryIdentifier @@ -220,6 +221,26 @@ function makeProofRequest
(
}
}
+ if (podSchema.signerPublicKey) {
+ podConfig.signerPublicKey = {
+ isRevealed: podSchema.signerPublicKey.isRevealed ?? false
+ };
+ if (podSchema.signerPublicKey.isMemberOf) {
+ // Double underscore to avoid collision with entry names.
+ membershipLists[`allowlist_${podName}__signerPublicKey`] = $e(
+ podSchema.signerPublicKey.isMemberOf
+ );
+ podConfig.signerPublicKey.isMemberOf = `allowlist_${podName}__signerPublicKey`;
+ }
+ if (podSchema.signerPublicKey.isNotMemberOf) {
+ // Double underscore to avoid collision with entry names.
+ membershipLists[`blocklist_${podName}__signerPublicKey`] = $e(
+ podSchema.signerPublicKey.isNotMemberOf
+ );
+ podConfig.signerPublicKey.isNotMemberOf = `blocklist_${podName}__signerPublicKey`;
+ }
+ }
+
pods[podName] = podConfig;
}
diff --git a/packages/podspec/src/schemas/pod.ts b/packages/podspec/src/schemas/pod.ts
index e474e36..a34ffa9 100644
--- a/packages/podspec/src/schemas/pod.ts
+++ b/packages/podspec/src/schemas/pod.ts
@@ -15,6 +15,7 @@ export type PODSchema