@stellar-registry/perch-artifacts 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,7 +41,11 @@ file is stale:
41
41
 
42
42
  ```json
43
43
  {
44
- "doc_compiler": { "MAX_DOC_SIGNERS": 8, "MAX_DOC_RULES": 11, "MAX_DOC_CANONICAL_BYTES": 8192, "MAX_RULE_NAME_BYTES": 20 },
44
+ "doc_compiler": {
45
+ "MAX_DOC_SIGNERS": 8, "MAX_DOC_RULES": 10, "MAX_DOC_CANONICAL_BYTES": 8192,
46
+ "MAX_GRANT_SIGNERS": 15, "MAX_GRANT_RULES": 50, "MAX_GRANT_CANONICAL_BYTES": 8192,
47
+ "MAX_GRANT_STORED_BYTES": 49152, "MAX_RULE_NAME_BYTES": 20
48
+ },
45
49
  "program": { "PROGRAM_VERSION": 1, "MAX_PROGRAM_LEN": 256, "MAX_STACK_DEPTH": 128 }
46
50
  }
47
51
  ```
package/constants.json CHANGED
@@ -2,8 +2,12 @@
2
2
  "comment": "Written by crates/integration-tests/tests/artifact_constants.rs (PERCH_BLESS=1) from the crates' own constants.",
3
3
  "doc_compiler": {
4
4
  "MAX_DOC_CANONICAL_BYTES": 8192,
5
- "MAX_DOC_RULES": 11,
5
+ "MAX_DOC_RULES": 10,
6
6
  "MAX_DOC_SIGNERS": 8,
7
+ "MAX_GRANT_CANONICAL_BYTES": 8192,
8
+ "MAX_GRANT_RULES": 50,
9
+ "MAX_GRANT_SIGNERS": 15,
10
+ "MAX_GRANT_STORED_BYTES": 49152,
7
11
  "MAX_RULE_NAME_BYTES": 20
8
12
  },
9
13
  "program": {
@@ -0,0 +1,129 @@
1
+ {
2
+ "schema": 1,
3
+ "network": "mainnet",
4
+ "network_passphrase": "Public Global Stellar Network ; September 2015",
5
+ "rpc_url": "https://mainnet.sorobanrpc.com",
6
+ "channel": "beta",
7
+ "deployed_at": "2026-10-26T01:28:04Z",
8
+ "deployed_ledger": 65138427,
9
+ "source": {
10
+ "commit": "c135aca277745434f2abf679edd9868c95204b51",
11
+ "dirty": false
12
+ },
13
+ "toolchain": {
14
+ "builder": "scaffold",
15
+ "rustc": "rustc 1.99.1 (58cf8f9c3 2026-10-13)",
16
+ "stellar": "stellar 28.0.0-aha.0 (70667cde89632b363d1c8dfb84ff698cbb646988)",
17
+ "scaffold": "scaffold 0.0.27 (stellar-scaffold-cli-v0.0.27-0-g6f1f06c3e8d2cf82573ec214b20d1550e9ce326b)"
18
+ },
19
+ "registry": {
20
+ "id": "CC236AK2RX7MUO7BV7JYDDW5KHZ3X7YYJOJKCVDC543BQBNNSUCZB7NN",
21
+ "wasm_hash": "0acc4da2b0b44b70988fe9a3b64b31e7ace166e5a949e9e6846f72c6ce93c055",
22
+ "admin": "GAMPJROHOAW662FINQ4XQOY2ULX5IEGYXCI4SMZYE75EHQBR6PSTJG3M",
23
+ "manager": "GAMPJROHOAW662FINQ4XQOY2ULX5IEGYXCI4SMZYE75EHQBR6PSTJG3M",
24
+ "root": "CDU4M3LDIOUJJ5F3YXKJ4EJEP5VPRPG6N2LJ5HOQIMN7MNGL3NS3EGUY"
25
+ },
26
+ "zk": {
27
+ "circuit_id": "9e39c41f4f35aad43e64b255dfe3ba13f10e8c9d36d6f56fce23c2d97c0a0b4a",
28
+ "tree_depth": 32,
29
+ "circuit_manifest": "circuits/manifest.json"
30
+ },
31
+ "contracts": {
32
+ "perch-doc-compiler": {
33
+ "version": "0.3.5",
34
+ "wasm": "perch_doc_compiler.wasm",
35
+ "sha256": "2730a7d39d619579bb7873818900fa5f9150d69d49fa1ee3b4a38f61ba768a16",
36
+ "bytes": 109947,
37
+ "tier": 0,
38
+ "pins": {},
39
+ "address": "CB65ACZRA777XHGEKVX46LEU2ZSUAL2UQY2PKMVDL7KJTDHRTX5MTBQD"
40
+ },
41
+ "perch-interpreter": {
42
+ "version": "0.1.6",
43
+ "wasm": "perch_interpreter.wasm",
44
+ "sha256": "f884913eba4a9491f8bcf89d1a687381c7c0699b148f98f8dc344e9a6223b26e",
45
+ "bytes": 17999,
46
+ "tier": 0,
47
+ "pins": {},
48
+ "address": "CCLU4UY5D7JLAQJCHBHEFN7ACFZXDPHCQXA7L6MT5ALIHRPQ7BGIVMTC"
49
+ },
50
+ "perch-spending-limit": {
51
+ "version": "0.1.4",
52
+ "wasm": "perch_spending_limit.wasm",
53
+ "sha256": "8c043dcc24f944d7c3e349fb5fd83cedba4a9124b5791b625bd76b520b0f4a80",
54
+ "bytes": 12923,
55
+ "tier": 0,
56
+ "pins": {},
57
+ "address": "CAD75KDQREQCGN3HIKMAVYKZWRGOFQYDZSXB4ILFSR6OHKTJ5UDNSOKU"
58
+ },
59
+ "perch-ed25519-verifier": {
60
+ "version": "10.0.2",
61
+ "wasm": "perch_ed25519_verifier.wasm",
62
+ "sha256": "defdab3434b361272c2461a174b94271a49e67fa0a6714b53689aca32e8d1592",
63
+ "bytes": 1863,
64
+ "tier": 0,
65
+ "pins": {},
66
+ "address": "CBOMBLOC5AB7YEHCEVMRFUFXV6UBEOP6IZJKA2PIWV32N3SSGS35AS6P"
67
+ },
68
+ "perch-webauthn-verifier": {
69
+ "version": "0.1.2",
70
+ "wasm": "perch_webauthn_verifier.wasm",
71
+ "sha256": "f2e1dfce8c496be6d318045bc5a24ac5eb799ada837f92e8032ec953f1994230",
72
+ "bytes": 11825,
73
+ "tier": 0,
74
+ "pins": {},
75
+ "address": "CCTFLCCC5DK4BM5DVUK3RYF2YVPB4QTGRKFGGOGN2WKG5IJMWEH3LTGJ"
76
+ },
77
+ "perch-zk-pool": {
78
+ "version": "0.1.4",
79
+ "wasm": "perch_zk_pool.wasm",
80
+ "sha256": "985660d4a6d6baa31a863158e89b8cbecc37cececd7104382172a1805b7289d5",
81
+ "bytes": 47959,
82
+ "tier": 0,
83
+ "pins": {},
84
+ "address": "CB762AC3OEH7AYDMU3YH6SCUKKWUXNXI6WLVKK4MC2NGJBX2DJSWEFHJ"
85
+ },
86
+ "perch-zk-adapter": {
87
+ "version": "0.1.4",
88
+ "wasm": "perch_zk_adapter.wasm",
89
+ "sha256": "95869bab4b89e5a4306ffe0d7a9e91931a56518ef18b3f61e95df86145dda63e",
90
+ "bytes": 69803,
91
+ "tier": 0,
92
+ "pins": {},
93
+ "address": "CB3KP2O7E6IDNNO23F7GVCAPZGFA6XGERYY633PIGQMASYPY2XRRLXS3"
94
+ },
95
+ "perch-recovery": {
96
+ "version": "0.1.5",
97
+ "wasm": "perch_recovery.wasm",
98
+ "sha256": "daaf09d9f73f6890753572b33a5c41a22c2ebf0e9ce29593e8407ff858844eb8",
99
+ "bytes": 68263,
100
+ "tier": 0,
101
+ "pins": {},
102
+ "address": "CD67NUU74YA5UTPD2DDBDGKTMWHBYZVLO2K3PUEC362A6WN2OKJ5I7ZN"
103
+ },
104
+ "perch-account": {
105
+ "version": "0.5.1",
106
+ "wasm": "perch_account.wasm",
107
+ "sha256": "2c976bfd98678f3b6fcf5514420a81ef5e5b9fc1c5b6c60ec6f2dd64448479d5",
108
+ "bytes": 70702,
109
+ "tier": 1,
110
+ "pins": {
111
+ "perch-doc-compiler": "2730a7d39d619579bb7873818900fa5f9150d69d49fa1ee3b4a38f61ba768a16",
112
+ "perch-interpreter": "f884913eba4a9491f8bcf89d1a687381c7c0699b148f98f8dc344e9a6223b26e",
113
+ "perch-spending-limit": "8c043dcc24f944d7c3e349fb5fd83cedba4a9124b5791b625bd76b520b0f4a80"
114
+ }
115
+ },
116
+ "perch-account-factory": {
117
+ "version": "0.3.1",
118
+ "wasm": "perch_account_factory.wasm",
119
+ "sha256": "6b434991d983063c92a47ba1573514f46e5c2ecb184d8c654af60a637ccd3fc2",
120
+ "bytes": 4533,
121
+ "tier": 2,
122
+ "pins": {
123
+ "perch-account": "2c976bfd98678f3b6fcf5514420a81ef5e5b9fc1c5b6c60ec6f2dd64448479d5",
124
+ "perch-webauthn-verifier": "f2e1dfce8c496be6d318045bc5a24ac5eb799ada837f92e8032ec953f1994230"
125
+ },
126
+ "address": "CC2K7PEAV24N66JCEG5OPFCBBA4OK6DK7YISRCMQQQUC7KLNISNGYLMK"
127
+ }
128
+ }
129
+ }
package/dist/index.d.ts CHANGED
@@ -32,6 +32,18 @@ export interface DeployedContract {
32
32
  /** sha256 of every contract this one was built against. */
33
33
  pins: Record<string, string>;
34
34
  }
35
+ /** A verifier in `perch/verifiers`. `contracts.<name>.address` is the
36
+ * registry's copy of the same bytes, which no account admits as an admin
37
+ * verifier. */
38
+ export interface DeployedVerifier {
39
+ version: string;
40
+ sha256: string;
41
+ bytes: number;
42
+ /** Its `verifier-name`: `<name>@<version>`. */
43
+ name: string;
44
+ /** Its content address in `perch/verifiers`: what a document names. */
45
+ address: string;
46
+ }
35
47
  /** A deployment manifest (`deployments/<network>.json`, written by scripts/deploy-stack.sh). */
36
48
  export interface Deployment {
37
49
  schema: number;
@@ -54,6 +66,18 @@ export interface Deployment {
54
66
  manager: string;
55
67
  root: string;
56
68
  };
69
+ /** `perch/verifiers`, where a document's `verifier-name` resolves and the
70
+ * factory pins its WebAuthn verifier, with each stack verifier it serves.
71
+ * Absent from a deployment that predates it, whose factory pins the
72
+ * registry's copy. */
73
+ verifiers?: {
74
+ id: string;
75
+ wasm_hash: string;
76
+ admin: string;
77
+ manager: string;
78
+ root: string;
79
+ contracts: Record<string, DeployedVerifier>;
80
+ };
57
81
  zk: {
58
82
  circuit_id: string;
59
83
  tree_depth: number;
@@ -90,10 +114,17 @@ export declare const circuitManifest: CircuitManifest;
90
114
  /** Limits no contract view reports, written from the crates' own constants
91
115
  * by crates/integration-tests/tests/artifact_constants.rs. */
92
116
  export interface Constants {
117
+ /** An account document's caps (`MAX_DOC_*`), a grant document's
118
+ * (`MAX_GRANT_*`), and the rule-name cap both share. */
93
119
  doc_compiler: {
94
120
  MAX_DOC_SIGNERS: number;
95
121
  MAX_DOC_RULES: number;
96
122
  MAX_DOC_CANONICAL_BYTES: number;
123
+ MAX_GRANT_SIGNERS: number;
124
+ MAX_GRANT_RULES: number;
125
+ MAX_GRANT_CANONICAL_BYTES: number;
126
+ /** The largest ledger entry a grant document may make its account store. */
127
+ MAX_GRANT_STORED_BYTES: number;
97
128
  MAX_RULE_NAME_BYTES: number;
98
129
  };
99
130
  program: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-registry/perch-artifacts",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Perch's consumable artifacts as files: deployment manifests, the Noir ZK recovery circuits and their manifest, test vectors, document and program limits, and the scripts that fetch the deployed wasm and install the pinned ZK toolchain",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -52,5 +52,5 @@
52
52
  "url": "https://github.com/stellar-registry/perch",
53
53
  "directory": "packages/perch-artifacts"
54
54
  },
55
- "gitHead": "6af7622da80309b9c6764f1e05c8a6186ad2e0ad"
55
+ "gitHead": "e844485f0a5abe460916482b033489a4349eebbd"
56
56
  }
@@ -7,15 +7,17 @@
7
7
  # crates/perch-account-factory/wasm/ perch-account, perch-webauthn-verifier
8
8
  #
9
9
  # Each name gets <name>.wasm (git-ignored; only tests read the bytes) and
10
- # <name>.sha256 (committed, with registry.path: all a build reads, so a plain
11
- # checkout builds without this script). scripts/check-pins.sh checks the
12
- # committed pins against the manifest.
10
+ # <name>.sha256 (committed, with the registry paths: all a build reads, so a
11
+ # plain checkout builds without this script). scripts/check-pins.sh checks
12
+ # the committed pins against the manifest.
13
13
  #
14
- # The registry is not a fetched pin: both crates commit the path they derive
15
- # it from (wasm/registry.path), and the manifest's registry must be the one
16
- # that path derives on its network, or a migration
17
- # deployments/pending-registry.json declares (scripts/manifest-registry.sh).
18
- # This script refuses any other manifest and never rewrites the path.
14
+ # The registries are not fetched pins. The account commits the path it
15
+ # derives the infra registry from (wasm/registry.path), and the manifest's
16
+ # registry must be the one that path derives on its network, or a migration
17
+ # deployments/pending-registry.json declares (scripts/manifest-registry.sh);
18
+ # this script refuses any other manifest. The factory pins only the WebAuthn
19
+ # verifier's hash, which it resolves in perch/verifiers (wasm/verifiers.path).
20
+ # This script never rewrites a path.
19
21
  #
20
22
  # Each wasm is fetched from the chain by the exact address (or, for the
21
23
  # account, the exact wasm hash) the manifest records, and refused unless
@@ -28,10 +30,11 @@
28
30
  #
29
31
  # Usage: scripts/fetch-infra-wasm.sh [--manifest <path>] [--stack <dir>]
30
32
  # --manifest default deployments/${STELLAR_NETWORK:-testnet}.json
31
- # --stack also fetch every manifest contract into <dir> and write
32
- # <dir>/build.json, so tests/release_stack.rs runs against the
33
- # deployed bytes; it keeps the manifest's zk circuit, which
34
- # those bytes compile in
33
+ # --stack also fetch every manifest contract, and the registry code
34
+ # (the manifest's registry.wasm_hash, which perch/verifiers
35
+ # runs too), into <dir> and write <dir>/build.json, so
36
+ # tests/release_stack.rs runs against the deployed bytes; it
37
+ # keeps the manifest's zk circuit, which those bytes compile in
35
38
  #
36
39
  # Requires the Stellar CLI. After a redeploy, run
37
40
  # `cargo test -p perch-integration-tests --test testnet_pins`.
@@ -141,10 +144,20 @@ if [ -n "$stack" ]; then
141
144
  for name in $(m '.contracts | keys[]'); do
142
145
  fetch "$name" "$stack/${name//-/_}.wasm"
143
146
  done
144
- jq '{registry: .registry.id, source, toolchain} + (if .zk then {zk} else {} end) + {
145
- artifacts: [.contracts | to_entries[] |
147
+ code="$stack/perch_constructorless_registry.wasm"
148
+ fetch_retry perch-constructorless-registry "$code" --wasm-hash "$(m .registry.wasm_hash)"
149
+ [ "$(sha256 "$code")" = "$(m .registry.wasm_hash)" ] || {
150
+ echo "error: perch-constructorless-registry: fetched $(sha256 "$code"), manifest says $(m .registry.wasm_hash)" >&2
151
+ exit 1
152
+ }
153
+ jq --argjson bytes "$(wc -c <"$code" | tr -d ' ')" \
154
+ '{registry: .registry.id, source, toolchain} + (if .zk then {zk} else {} end) + {
155
+ artifacts: ([.contracts | to_entries[] |
146
156
  {package: .key, version: .value.version, wasm: (.key | gsub("-"; "_") + ".wasm"),
147
157
  sha256: .value.sha256, bytes: .value.bytes, tier: .value.tier,
148
- pins: (.value.pins // {})}]}' "$manifest" >"$stack/build.json"
158
+ pins: (.value.pins // {})}] + [
159
+ {package: "perch-constructorless-registry", version: .registry.version,
160
+ wasm: "perch_constructorless_registry.wasm", sha256: .registry.wasm_hash, bytes: $bytes,
161
+ tier: -1, pins: {}}])}' "$manifest" >"$stack/build.json"
149
162
  echo "wrote ${stack%/}/build.json" >&2
150
163
  fi
@@ -3,9 +3,7 @@
3
3
  {
4
4
  "account": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVAX5",
5
5
  "events": [
6
- "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAAAAAu4AAAAEAAAAAEAAAACAAAADgAAABtmYWlsaW5nIHdpdGggY29udHJhY3QgZXJyb3IAAAAAAwAAC7g=",
7
- "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAAAAAu4AAAADgAAABllc2NhbGF0aW5nIGVycm9yIHRvIHBhbmljAAAA",
8
- "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAAAAAu4AAAADgAAABpjYXVnaHQgZXJyb3IgZnJvbSBmdW5jdGlvbgAA",
6
+ "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAAAAAu4AAAADgAAADZlc2NhbGF0aW5nIE9rKFNjRXJyb3JUeXBlOjpDb250cmFjdCkgZnJhbWUtZXhpdCB0byBFcnIAAA==",
9
7
  "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAkAAAAGAAAAEAAAAAEAAAADAAAADgAAAChmYWlsZWQgYWNjb3VudCBhdXRoZW50aWNhdGlvbiB3aXRoIGVycm9yAAAAEgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAAAAAALuA==",
10
8
  "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAkAAAAGAAAADgAAABllc2NhbGF0aW5nIGVycm9yIHRvIHBhbmljAAAA",
11
9
  "AAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAIAAAAPAAAABWVycm9yAAAAAAAAAgAAAAkAAAAGAAAADgAAABpjYXVnaHQgZXJyb3IgZnJvbSBmdW5jdGlvbgAA",