Skip to content

Commit

Permalink
Include tuple entries in proof config (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
robknight authored Sep 30, 2024
1 parent 19567a8 commit a3ae530
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 18 deletions.
9 changes: 9 additions & 0 deletions apps/client-web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# client-web

## 0.0.7

### Patch Changes

- Updated dependencies [0cc537e]
- @parcnet-js/podspec@0.0.4
- @parcnet-js/client-rpc@0.0.5
- @parcnet-js/client-helpers@0.0.7

## 0.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/client-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "client-web",
"private": true,
"version": "0.0.6",
"version": "0.0.7",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
10 changes: 10 additions & 0 deletions examples/test-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# test-app

## 1.0.9

### Patch Changes

- Updated dependencies [0cc537e]
- @parcnet-js/podspec@0.0.4
- @parcnet-js/app-connector@0.0.8
- @parcnet-js/client-rpc@0.0.5
- @parcnet-js/ticket-spec@0.0.3

## 1.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/test-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-app",
"version": "1.0.8",
"version": "1.0.9",
"private": true,
"type": "module",
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions packages/app-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @parcnet-js/app-connector

## 0.0.8

### Patch Changes

- Updated dependencies [0cc537e]
- @parcnet-js/podspec@0.0.4
- @parcnet-js/client-rpc@0.0.5

## 0.0.7

### Patch Changes
Expand Down
12 changes: 9 additions & 3 deletions packages/app-connector/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "@parcnet-js/app-connector",
"version": "0.0.7",
"version": "0.0.8",
"license": "GPL-3.0-or-later",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "src/index.ts",
"exports": {
".": {
"import": { "types": "./src/index.ts", "import": "./dist/index.js" },
"import": {
"types": "./src/index.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./src/index.ts",
"require": "./dist/index.cjs"
Expand Down Expand Up @@ -45,7 +48,10 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"import": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
"import": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"require": "./dist/index.cjs"
Expand Down
6 changes: 6 additions & 0 deletions packages/client-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @parcnet-js/client-helpers

## 0.0.7

### Patch Changes

- @parcnet-js/client-rpc@0.0.5

## 0.0.6

### Patch Changes
Expand Down
12 changes: 9 additions & 3 deletions packages/client-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "@parcnet-js/client-helpers",
"version": "0.0.6",
"version": "0.0.7",
"license": "GPL-3.0-or-later",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "src/index.ts",
"exports": {
".": {
"import": { "types": "./src/index.ts", "import": "./dist/index.js" },
"import": {
"types": "./src/index.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./src/index.ts",
"require": "./dist/index.cjs"
Expand Down Expand Up @@ -45,7 +48,10 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
"import": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"require": "./dist/index.cjs"
Expand Down
7 changes: 7 additions & 0 deletions packages/client-rpc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @parcnet-js/client-rpc

## 0.0.5

### Patch Changes

- Updated dependencies [0cc537e]
- @parcnet-js/podspec@0.0.4

## 0.0.4

### Patch Changes
Expand Down
12 changes: 9 additions & 3 deletions packages/client-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "@parcnet-js/client-rpc",
"type": "module",
"version": "0.0.4",
"version": "0.0.5",
"license": "GPL-3.0-or-later",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "src/index.ts",
"exports": {
".": {
"import": { "types": "./src/index.ts", "import": "./dist/index.js" },
"import": {
"types": "./src/index.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./src/index.ts",
"require": "./dist/index.cjs"
Expand Down Expand Up @@ -39,7 +42,10 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"import": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
"import": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"require": "./dist/index.cjs"
Expand Down
6 changes: 6 additions & 0 deletions packages/podspec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @parcnet-js/podspec

## 0.0.4

### Patch Changes

- 0cc537e: Add entries to config if included in tuples

## 0.0.3

### Patch Changes
Expand Down
12 changes: 9 additions & 3 deletions packages/podspec/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "@parcnet-js/podspec",
"version": "0.0.3",
"version": "0.0.4",
"license": "GPL-3.0-or-later",
"main": "dist/index.cjs",
"module": "dist/index.js",
"type": "module",
"types": "src/index.ts",
"exports": {
".": {
"import": { "types": "./src/index.ts", "import": "./dist/index.js" },
"import": {
"types": "./src/index.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./src/index.ts",
"require": "./dist/index.cjs"
Expand Down Expand Up @@ -53,7 +56,10 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"import": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
"import": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"require": "./dist/index.cjs"
Expand Down
16 changes: 15 additions & 1 deletion packages/podspec/src/gpc/proof_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ function makeProofRequest<P extends NamedPODs>(
entrySchema.isNotMemberOf;
}
}
pods[podName] = podConfig;

for (const entriesTupleSchema of podSchema.tuples ?? []) {
const tupleName = `tuple_${podName}_entries_${entriesTupleSchema.entries.join(
Expand All @@ -206,7 +205,22 @@ function makeProofRequest<P extends NamedPODs>(
membershipLists[`blocklist_${tupleName}`] =
entriesTupleSchema.isNotMemberOf;
}
// Tuples may contain entries which are not revealed or subject to any
// membership rules or constraints, in which case we need to add them to
// the proof config so that they are included.
for (const entry of entriesTupleSchema.entries) {
if (entry === "$signerPublicKey") {
continue;
}
if (!(entry in podConfig.entries)) {
podConfig.entries[entry] = {
isRevealed: false
};
}
}
}

pods[podName] = podConfig;
}

return {
Expand Down
8 changes: 8 additions & 0 deletions packages/ticket-spec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @parcnet-js/ticket-utils

## 0.0.3

### Patch Changes

- Updated dependencies [0cc537e]
- @parcnet-js/podspec@0.0.4
- @parcnet-js/client-rpc@0.0.5

## 0.0.2

### Patch Changes
Expand Down
12 changes: 9 additions & 3 deletions packages/ticket-spec/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "@parcnet-js/ticket-spec",
"version": "0.0.2",
"version": "0.0.3",
"license": "GPL-3.0-or-later",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "src/index.ts",
"exports": {
".": {
"import": { "types": "./src/index.ts", "import": "./dist/index.js" },
"import": {
"types": "./src/index.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./src/index.ts",
"require": "./dist/index.cjs"
Expand Down Expand Up @@ -42,7 +45,10 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
"import": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"require": "./dist/index.cjs"
Expand Down

0 comments on commit a3ae530

Please sign in to comment.