@origintrail-official/dkg-chain 10.0.15 → 10.0.17

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.
Files changed (323) hide show
  1. package/dist/browser-wallet-rpc-policy.d.ts +5 -0
  2. package/dist/browser-wallet-rpc-policy.d.ts.map +1 -0
  3. package/dist/browser-wallet-rpc-policy.js +26 -0
  4. package/dist/browser-wallet-rpc-policy.js.map +1 -0
  5. package/dist/chain-adapter.d.ts +323 -17
  6. package/dist/chain-adapter.d.ts.map +1 -1
  7. package/dist/chain-adapter.js +26 -0
  8. package/dist/chain-adapter.js.map +1 -1
  9. package/dist/chain-event-log-binding.d.ts +177 -0
  10. package/dist/chain-event-log-binding.d.ts.map +1 -0
  11. package/dist/chain-event-log-binding.js +3 -0
  12. package/dist/chain-event-log-binding.js.map +1 -0
  13. package/dist/chain-index/chain-event-decoders.d.ts +112 -0
  14. package/dist/chain-index/chain-event-decoders.d.ts.map +1 -0
  15. package/dist/chain-index/chain-event-decoders.js +361 -0
  16. package/dist/chain-index/chain-event-decoders.js.map +1 -0
  17. package/dist/chain-index/chain-event-log-subscription.d.ts +53 -0
  18. package/dist/chain-index/chain-event-log-subscription.d.ts.map +1 -0
  19. package/dist/chain-index/chain-event-log-subscription.js +84 -0
  20. package/dist/chain-index/chain-event-log-subscription.js.map +1 -0
  21. package/dist/chain-index/chain-event-log.d.ts +243 -0
  22. package/dist/chain-index/chain-event-log.d.ts.map +1 -0
  23. package/dist/chain-index/chain-event-log.js +135 -0
  24. package/dist/chain-index/chain-event-log.js.map +1 -0
  25. package/dist/chain-index/chain-index-anchor.d.ts +192 -0
  26. package/dist/chain-index/chain-index-anchor.d.ts.map +1 -0
  27. package/dist/chain-index/chain-index-anchor.js +167 -0
  28. package/dist/chain-index/chain-index-anchor.js.map +1 -0
  29. package/dist/chain-index/chain-index-authority-page.d.ts +40 -0
  30. package/dist/chain-index/chain-index-authority-page.d.ts.map +1 -0
  31. package/dist/chain-index/chain-index-authority-page.js +78 -0
  32. package/dist/chain-index/chain-index-authority-page.js.map +1 -0
  33. package/dist/chain-index/chain-index-runner.d.ts +60 -0
  34. package/dist/chain-index/chain-index-runner.d.ts.map +1 -0
  35. package/dist/chain-index/chain-index-runner.js +259 -0
  36. package/dist/chain-index/chain-index-runner.js.map +1 -0
  37. package/dist/chain-index/chain-index-tick.d.ts +143 -0
  38. package/dist/chain-index/chain-index-tick.d.ts.map +1 -0
  39. package/dist/chain-index/chain-index-tick.js +620 -0
  40. package/dist/chain-index/chain-index-tick.js.map +1 -0
  41. package/dist/chain-index/hub-bindings.d.ts +113 -0
  42. package/dist/chain-index/hub-bindings.d.ts.map +1 -0
  43. package/dist/chain-index/hub-bindings.js +175 -0
  44. package/dist/chain-index/hub-bindings.js.map +1 -0
  45. package/dist/chain-index/index.d.ts +17 -0
  46. package/dist/chain-index/index.d.ts.map +1 -0
  47. package/dist/chain-index/index.js +18 -0
  48. package/dist/chain-index/index.js.map +1 -0
  49. package/dist/chain-index/knowledge-asset-read-model.d.ts +76 -0
  50. package/dist/chain-index/knowledge-asset-read-model.d.ts.map +1 -0
  51. package/dist/chain-index/knowledge-asset-read-model.js +177 -0
  52. package/dist/chain-index/knowledge-asset-read-model.js.map +1 -0
  53. package/dist/chain-index/knowledge-asset-reducer.d.ts +93 -0
  54. package/dist/chain-index/knowledge-asset-reducer.d.ts.map +1 -0
  55. package/dist/chain-index/knowledge-asset-reducer.js +179 -0
  56. package/dist/chain-index/knowledge-asset-reducer.js.map +1 -0
  57. package/dist/chain-rpc-transport-error.d.ts +23 -2
  58. package/dist/chain-rpc-transport-error.d.ts.map +1 -1
  59. package/dist/chain-rpc-transport-error.js +17 -1
  60. package/dist/chain-rpc-transport-error.js.map +1 -1
  61. package/dist/context-graph-authority-generation.d.ts +43 -0
  62. package/dist/context-graph-authority-generation.d.ts.map +1 -0
  63. package/dist/context-graph-authority-generation.js +101 -0
  64. package/dist/context-graph-authority-generation.js.map +1 -0
  65. package/dist/context-graph-authority-history.d.ts +97 -0
  66. package/dist/context-graph-authority-history.d.ts.map +1 -0
  67. package/dist/context-graph-authority-history.js +455 -0
  68. package/dist/context-graph-authority-history.js.map +1 -0
  69. package/dist/context-graph-authority-index-activity.d.ts +8 -0
  70. package/dist/context-graph-authority-index-activity.d.ts.map +1 -0
  71. package/dist/context-graph-authority-index-activity.js +28 -0
  72. package/dist/context-graph-authority-index-activity.js.map +1 -0
  73. package/dist/context-graph-authority-index-admission.d.ts +24 -0
  74. package/dist/context-graph-authority-index-admission.d.ts.map +1 -0
  75. package/dist/context-graph-authority-index-admission.js +76 -0
  76. package/dist/context-graph-authority-index-admission.js.map +1 -0
  77. package/dist/context-graph-authority-index-bootstrap.d.ts +31 -0
  78. package/dist/context-graph-authority-index-bootstrap.d.ts.map +1 -0
  79. package/dist/context-graph-authority-index-bootstrap.js +116 -0
  80. package/dist/context-graph-authority-index-bootstrap.js.map +1 -0
  81. package/dist/context-graph-authority-index-checkpoint.d.ts +51 -0
  82. package/dist/context-graph-authority-index-checkpoint.d.ts.map +1 -0
  83. package/dist/context-graph-authority-index-checkpoint.js +160 -0
  84. package/dist/context-graph-authority-index-checkpoint.js.map +1 -0
  85. package/dist/context-graph-authority-index-errors.d.ts +6 -0
  86. package/dist/context-graph-authority-index-errors.d.ts.map +1 -0
  87. package/dist/context-graph-authority-index-errors.js +9 -0
  88. package/dist/context-graph-authority-index-errors.js.map +1 -0
  89. package/dist/context-graph-authority-index-id.d.ts +11 -0
  90. package/dist/context-graph-authority-index-id.d.ts.map +1 -0
  91. package/dist/context-graph-authority-index-id.js +27 -0
  92. package/dist/context-graph-authority-index-id.js.map +1 -0
  93. package/dist/context-graph-authority-index-projection.d.ts +271 -0
  94. package/dist/context-graph-authority-index-projection.d.ts.map +1 -0
  95. package/dist/context-graph-authority-index-projection.js +494 -0
  96. package/dist/context-graph-authority-index-projection.js.map +1 -0
  97. package/dist/context-graph-authority-index-reducer.d.ts +16 -0
  98. package/dist/context-graph-authority-index-reducer.d.ts.map +1 -0
  99. package/dist/context-graph-authority-index-reducer.js +57 -0
  100. package/dist/context-graph-authority-index-reducer.js.map +1 -0
  101. package/dist/context-graph-authority-index-repository.d.ts +55 -0
  102. package/dist/context-graph-authority-index-repository.d.ts.map +1 -0
  103. package/dist/context-graph-authority-index-repository.js +142 -0
  104. package/dist/context-graph-authority-index-repository.js.map +1 -0
  105. package/dist/context-graph-authority-index-snapshot.d.ts +52 -0
  106. package/dist/context-graph-authority-index-snapshot.d.ts.map +1 -0
  107. package/dist/context-graph-authority-index-snapshot.js +74 -0
  108. package/dist/context-graph-authority-index-snapshot.js.map +1 -0
  109. package/dist/context-graph-authority-index.d.ts +92 -0
  110. package/dist/context-graph-authority-index.d.ts.map +1 -0
  111. package/dist/context-graph-authority-index.js +331 -0
  112. package/dist/context-graph-authority-index.js.map +1 -0
  113. package/dist/context-graph-authority-reader.d.ts +19 -0
  114. package/dist/context-graph-authority-reader.d.ts.map +1 -0
  115. package/dist/context-graph-authority-reader.js +23 -0
  116. package/dist/context-graph-authority-reader.js.map +1 -0
  117. package/dist/context-graph-authority-rpc-sites.d.ts +125 -0
  118. package/dist/context-graph-authority-rpc-sites.d.ts.map +1 -0
  119. package/dist/context-graph-authority-rpc-sites.js +127 -0
  120. package/dist/context-graph-authority-rpc-sites.js.map +1 -0
  121. package/dist/context-graph-authority-state.d.ts +106 -0
  122. package/dist/context-graph-authority-state.d.ts.map +1 -0
  123. package/dist/context-graph-authority-state.js +272 -0
  124. package/dist/context-graph-authority-state.js.map +1 -0
  125. package/dist/context-graph-live-authority-coalescer.d.ts +45 -0
  126. package/dist/context-graph-live-authority-coalescer.d.ts.map +1 -0
  127. package/dist/context-graph-live-authority-coalescer.js +249 -0
  128. package/dist/context-graph-live-authority-coalescer.js.map +1 -0
  129. package/dist/context-graph-name-hash-resolver.d.ts +17 -5
  130. package/dist/context-graph-name-hash-resolver.d.ts.map +1 -1
  131. package/dist/context-graph-name-hash-resolver.js +77 -37
  132. package/dist/context-graph-name-hash-resolver.js.map +1 -1
  133. package/dist/context-graph-registration-error.d.ts +12 -0
  134. package/dist/context-graph-registration-error.d.ts.map +1 -0
  135. package/dist/context-graph-registration-error.js +53 -0
  136. package/dist/context-graph-registration-error.js.map +1 -0
  137. package/dist/context-graph-registry-repair-coordinator.d.ts +32 -0
  138. package/dist/context-graph-registry-repair-coordinator.d.ts.map +1 -0
  139. package/dist/context-graph-registry-repair-coordinator.js +141 -0
  140. package/dist/context-graph-registry-repair-coordinator.js.map +1 -0
  141. package/dist/context-graph-registry-scan-cursor.d.ts +25 -3
  142. package/dist/context-graph-registry-scan-cursor.d.ts.map +1 -1
  143. package/dist/context-graph-registry-scan-cursor.js +113 -16
  144. package/dist/context-graph-registry-scan-cursor.js.map +1 -1
  145. package/dist/evm-adapter-base.d.ts +204 -20
  146. package/dist/evm-adapter-base.d.ts.map +1 -1
  147. package/dist/evm-adapter-base.js +764 -160
  148. package/dist/evm-adapter-base.js.map +1 -1
  149. package/dist/evm-adapter-constants.d.ts +50 -1
  150. package/dist/evm-adapter-constants.d.ts.map +1 -1
  151. package/dist/evm-adapter-constants.js +50 -1
  152. package/dist/evm-adapter-constants.js.map +1 -1
  153. package/dist/evm-adapter-context-graph.d.ts +57 -1
  154. package/dist/evm-adapter-context-graph.d.ts.map +1 -1
  155. package/dist/evm-adapter-context-graph.js +649 -47
  156. package/dist/evm-adapter-context-graph.js.map +1 -1
  157. package/dist/evm-adapter-conviction.d.ts +8 -8
  158. package/dist/evm-adapter-conviction.d.ts.map +1 -1
  159. package/dist/evm-adapter-conviction.js +19 -96
  160. package/dist/evm-adapter-conviction.js.map +1 -1
  161. package/dist/evm-adapter-errors.d.ts +7 -0
  162. package/dist/evm-adapter-errors.d.ts.map +1 -1
  163. package/dist/evm-adapter-errors.js +71 -12
  164. package/dist/evm-adapter-errors.js.map +1 -1
  165. package/dist/evm-adapter-events.d.ts +13 -0
  166. package/dist/evm-adapter-events.d.ts.map +1 -1
  167. package/dist/evm-adapter-events.js +68 -5
  168. package/dist/evm-adapter-events.js.map +1 -1
  169. package/dist/evm-adapter-identity.d.ts +3 -1
  170. package/dist/evm-adapter-identity.d.ts.map +1 -1
  171. package/dist/evm-adapter-identity.js +27 -0
  172. package/dist/evm-adapter-identity.js.map +1 -1
  173. package/dist/evm-adapter-publish.d.ts +7 -0
  174. package/dist/evm-adapter-publish.d.ts.map +1 -1
  175. package/dist/evm-adapter-publish.js +95 -48
  176. package/dist/evm-adapter-publish.js.map +1 -1
  177. package/dist/evm-adapter-random-sampling.d.ts +3 -0
  178. package/dist/evm-adapter-random-sampling.d.ts.map +1 -1
  179. package/dist/evm-adapter-random-sampling.js +55 -0
  180. package/dist/evm-adapter-random-sampling.js.map +1 -1
  181. package/dist/evm-adapter-receipt-finality.d.ts +34 -0
  182. package/dist/evm-adapter-receipt-finality.d.ts.map +1 -0
  183. package/dist/evm-adapter-receipt-finality.js +76 -0
  184. package/dist/evm-adapter-receipt-finality.js.map +1 -0
  185. package/dist/evm-adapter-rpc.d.ts +37 -2
  186. package/dist/evm-adapter-rpc.d.ts.map +1 -1
  187. package/dist/evm-adapter-rpc.js +30 -66
  188. package/dist/evm-adapter-rpc.js.map +1 -1
  189. package/dist/evm-adapter-storage-reads.d.ts +3 -8
  190. package/dist/evm-adapter-storage-reads.d.ts.map +1 -1
  191. package/dist/evm-adapter-storage-reads.js +106 -4
  192. package/dist/evm-adapter-storage-reads.js.map +1 -1
  193. package/dist/evm-adapter-types.d.ts +56 -0
  194. package/dist/evm-adapter-types.d.ts.map +1 -1
  195. package/dist/evm-adapter-types.js.map +1 -1
  196. package/dist/evm-adapter.d.ts +1 -1
  197. package/dist/evm-adapter.d.ts.map +1 -1
  198. package/dist/evm-adapter.js +1 -1
  199. package/dist/evm-adapter.js.map +1 -1
  200. package/dist/evm-chain-index-runtime-owner.d.ts +33 -0
  201. package/dist/evm-chain-index-runtime-owner.d.ts.map +1 -0
  202. package/dist/evm-chain-index-runtime-owner.js +83 -0
  203. package/dist/evm-chain-index-runtime-owner.js.map +1 -0
  204. package/dist/evm-chain-index-runtime.d.ts +90 -0
  205. package/dist/evm-chain-index-runtime.d.ts.map +1 -0
  206. package/dist/evm-chain-index-runtime.js +502 -0
  207. package/dist/evm-chain-index-runtime.js.map +1 -0
  208. package/dist/evm-context-graph-authority-index-reader.d.ts +111 -0
  209. package/dist/evm-context-graph-authority-index-reader.d.ts.map +1 -0
  210. package/dist/evm-context-graph-authority-index-reader.js +836 -0
  211. package/dist/evm-context-graph-authority-index-reader.js.map +1 -0
  212. package/dist/evm-context-graph-authority-source.d.ts +17 -0
  213. package/dist/evm-context-graph-authority-source.d.ts.map +1 -0
  214. package/dist/evm-context-graph-authority-source.js +132 -0
  215. package/dist/evm-context-graph-authority-source.js.map +1 -0
  216. package/dist/evm-context-graph-name-hash-fence.d.ts +32 -10
  217. package/dist/evm-context-graph-name-hash-fence.d.ts.map +1 -1
  218. package/dist/evm-context-graph-name-hash-fence.js +222 -129
  219. package/dist/evm-context-graph-name-hash-fence.js.map +1 -1
  220. package/dist/evm-context-graph-name-hash-resolver.d.ts +3 -1
  221. package/dist/evm-context-graph-name-hash-resolver.d.ts.map +1 -1
  222. package/dist/evm-context-graph-name-hash-resolver.js +39 -5
  223. package/dist/evm-context-graph-name-hash-resolver.js.map +1 -1
  224. package/dist/evm-error-text.d.ts +12 -0
  225. package/dist/evm-error-text.d.ts.map +1 -0
  226. package/dist/evm-error-text.js +40 -0
  227. package/dist/evm-error-text.js.map +1 -0
  228. package/dist/evm-finality-anchor.d.ts +53 -0
  229. package/dist/evm-finality-anchor.d.ts.map +1 -0
  230. package/dist/evm-finality-anchor.js +96 -0
  231. package/dist/evm-finality-anchor.js.map +1 -0
  232. package/dist/evm-log-range.d.ts +15 -0
  233. package/dist/evm-log-range.d.ts.map +1 -0
  234. package/dist/evm-log-range.js +35 -0
  235. package/dist/evm-log-range.js.map +1 -0
  236. package/dist/hub-contract-not-found-error.d.ts +7 -0
  237. package/dist/hub-contract-not-found-error.d.ts.map +1 -0
  238. package/dist/hub-contract-not-found-error.js +12 -0
  239. package/dist/hub-contract-not-found-error.js.map +1 -0
  240. package/dist/hub-rotation-poller.d.ts +30 -0
  241. package/dist/hub-rotation-poller.d.ts.map +1 -1
  242. package/dist/hub-rotation-poller.js +67 -3
  243. package/dist/hub-rotation-poller.js.map +1 -1
  244. package/dist/identity-id-cache.d.ts +15 -0
  245. package/dist/identity-id-cache.d.ts.map +1 -0
  246. package/dist/identity-id-cache.js +54 -0
  247. package/dist/identity-id-cache.js.map +1 -0
  248. package/dist/index.d.ts +27 -5
  249. package/dist/index.d.ts.map +1 -1
  250. package/dist/index.js +23 -7
  251. package/dist/index.js.map +1 -1
  252. package/dist/keyed-ttl-single-flight-cache.d.ts +49 -0
  253. package/dist/keyed-ttl-single-flight-cache.d.ts.map +1 -1
  254. package/dist/keyed-ttl-single-flight-cache.js +191 -0
  255. package/dist/keyed-ttl-single-flight-cache.js.map +1 -1
  256. package/dist/mock-adapter.d.ts +47 -15
  257. package/dist/mock-adapter.d.ts.map +1 -1
  258. package/dist/mock-adapter.js +263 -2
  259. package/dist/mock-adapter.js.map +1 -1
  260. package/dist/pca-read-cache.d.ts +1 -1
  261. package/dist/pca-read-cache.d.ts.map +1 -1
  262. package/dist/pca-read-cache.js +5 -7
  263. package/dist/pca-read-cache.js.map +1 -1
  264. package/dist/public-finalized-materialization-authority.d.ts +12 -1
  265. package/dist/public-finalized-materialization-authority.d.ts.map +1 -1
  266. package/dist/public-finalized-materialization-authority.js +72 -19
  267. package/dist/public-finalized-materialization-authority.js.map +1 -1
  268. package/dist/random-sampling-availability.d.ts +30 -0
  269. package/dist/random-sampling-availability.d.ts.map +1 -0
  270. package/dist/random-sampling-availability.js +38 -0
  271. package/dist/random-sampling-availability.js.map +1 -0
  272. package/dist/random-sampling-read-context.d.ts +28 -0
  273. package/dist/random-sampling-read-context.d.ts.map +1 -0
  274. package/dist/random-sampling-read-context.js +3 -0
  275. package/dist/random-sampling-read-context.js.map +1 -0
  276. package/dist/rpc-failover-client.d.ts +33 -27
  277. package/dist/rpc-failover-client.d.ts.map +1 -1
  278. package/dist/rpc-failover-client.js +111 -70
  279. package/dist/rpc-failover-client.js.map +1 -1
  280. package/dist/rpc-request-governor.d.ts +92 -0
  281. package/dist/rpc-request-governor.d.ts.map +1 -0
  282. package/dist/rpc-request-governor.js +366 -0
  283. package/dist/rpc-request-governor.js.map +1 -0
  284. package/dist/rpc-request-transport.d.ts +68 -4
  285. package/dist/rpc-request-transport.d.ts.map +1 -1
  286. package/dist/rpc-request-transport.js +288 -10
  287. package/dist/rpc-request-transport.js.map +1 -1
  288. package/dist/rpc-usage.d.ts +195 -36
  289. package/dist/rpc-usage.d.ts.map +1 -1
  290. package/dist/rpc-usage.js +595 -102
  291. package/dist/rpc-usage.js.map +1 -1
  292. package/dist/strict-current-finalized-evm-config.d.ts.map +1 -1
  293. package/dist/strict-current-finalized-evm-config.js +28 -127
  294. package/dist/strict-current-finalized-evm-config.js.map +1 -1
  295. package/dist/strict-current-finalized-evm-lifecycle.d.ts +2 -2
  296. package/dist/strict-current-finalized-evm-lifecycle.d.ts.map +1 -1
  297. package/dist/strict-current-finalized-evm-lifecycle.js +14 -3
  298. package/dist/strict-current-finalized-evm-lifecycle.js.map +1 -1
  299. package/dist/strict-current-finalized-evm-rpc-client.d.ts +22 -0
  300. package/dist/strict-current-finalized-evm-rpc-client.d.ts.map +1 -1
  301. package/dist/strict-current-finalized-evm-rpc-client.js +49 -0
  302. package/dist/strict-current-finalized-evm-rpc-client.js.map +1 -1
  303. package/dist/strict-current-finalized-evm-snapshot-transport.d.ts.map +1 -1
  304. package/dist/strict-current-finalized-evm-snapshot-transport.js +2 -2
  305. package/dist/strict-current-finalized-evm-snapshot-transport.js.map +1 -1
  306. package/dist/strict-current-finalized-evm-transport.d.ts.map +1 -1
  307. package/dist/strict-current-finalized-evm-transport.js +2 -2
  308. package/dist/strict-current-finalized-evm-transport.js.map +1 -1
  309. package/dist/strict-current-finalized-evm-types.d.ts +18 -1
  310. package/dist/strict-current-finalized-evm-types.d.ts.map +1 -1
  311. package/dist/strict-finalized-endpoint-session.d.ts +6 -14
  312. package/dist/strict-finalized-endpoint-session.d.ts.map +1 -1
  313. package/dist/strict-finalized-endpoint-session.js +74 -32
  314. package/dist/strict-finalized-endpoint-session.js.map +1 -1
  315. package/dist/transaction-receipt-failover.d.ts +19 -0
  316. package/dist/transaction-receipt-failover.d.ts.map +1 -0
  317. package/dist/transaction-receipt-failover.js +33 -0
  318. package/dist/transaction-receipt-failover.js.map +1 -0
  319. package/dist/wait-for-signal.d.ts +4 -0
  320. package/dist/wait-for-signal.d.ts.map +1 -0
  321. package/dist/wait-for-signal.js +34 -0
  322. package/dist/wait-for-signal.js.map +1 -0
  323. package/package.json +7 -6
@@ -0,0 +1,5 @@
1
+ import type { BrowserWalletRpcMethod } from './chain-adapter.js';
2
+ export type BrowserWalletReadStrategy = 'tipTransparent' | 'tipNullableTransparent' | 'stickyNullable' | 'sticky';
3
+ /** Select failover semantics for the bounded read methods used by browser wallets. */
4
+ export declare function classifyBrowserWalletRead(method: BrowserWalletRpcMethod, params: readonly unknown[]): BrowserWalletReadStrategy;
5
+ //# sourceMappingURL=browser-wallet-rpc-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-wallet-rpc-policy.d.ts","sourceRoot":"","sources":["../src/browser-wallet-rpc-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAIjE,MAAM,MAAM,yBAAyB,GACjC,gBAAgB,GAChB,wBAAwB,GACxB,gBAAgB,GAChB,QAAQ,CAAC;AAOb,sFAAsF;AACtF,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,sBAAsB,EAC9B,MAAM,EAAE,SAAS,OAAO,EAAE,GACzB,yBAAyB,CAmB3B"}
@@ -0,0 +1,26 @@
1
+ const TIP_BLOCK_TAGS = new Set(['latest', 'pending', 'safe', 'finalized']);
2
+ function assertNeverBrowserWalletMethod(method) {
3
+ const description = typeof method === 'string' ? method : '<non-string>';
4
+ throw new Error(`Unsupported browser-wallet RPC method: ${description}`);
5
+ }
6
+ /** Select failover semantics for the bounded read methods used by browser wallets. */
7
+ export function classifyBrowserWalletRead(method, params) {
8
+ const isLatestFamilyTag = (tag) => typeof tag === 'string' && TIP_BLOCK_TAGS.has(tag);
9
+ switch (method) {
10
+ case 'eth_blockNumber':
11
+ return 'tipTransparent';
12
+ case 'eth_call':
13
+ return params[1] === undefined || isLatestFamilyTag(params[1])
14
+ ? 'tipTransparent'
15
+ : 'sticky';
16
+ case 'eth_getBlockByNumber':
17
+ return isLatestFamilyTag(params[0]) ? 'tipNullableTransparent' : 'stickyNullable';
18
+ case 'eth_getTransactionReceipt':
19
+ case 'eth_getTransactionByHash':
20
+ return 'stickyNullable';
21
+ case 'eth_chainId':
22
+ return 'sticky';
23
+ }
24
+ return assertNeverBrowserWalletMethod(method);
25
+ }
26
+ //# sourceMappingURL=browser-wallet-rpc-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-wallet-rpc-policy.js","sourceRoot":"","sources":["../src/browser-wallet-rpc-policy.ts"],"names":[],"mappings":"AAEA,MAAM,cAAc,GAAG,IAAI,GAAG,CAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAQnF,SAAS,8BAA8B,CAAC,MAAa;IACnD,MAAM,WAAW,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC;IACzE,MAAM,IAAI,KAAK,CAAC,0CAA0C,WAAW,EAAE,CAAC,CAAC;AAC3E,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,yBAAyB,CACvC,MAA8B,EAC9B,MAA0B;IAE1B,MAAM,iBAAiB,GAAG,CAAC,GAAY,EAAW,EAAE,CAClD,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,iBAAiB;YACpB,OAAO,gBAAgB,CAAC;QAC1B,KAAK,UAAU;YACb,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC5D,CAAC,CAAC,gBAAgB;gBAClB,CAAC,CAAC,QAAQ,CAAC;QACf,KAAK,sBAAsB;YACzB,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,gBAAgB,CAAC;QACpF,KAAK,2BAA2B,CAAC;QACjC,KAAK,0BAA0B;YAC7B,OAAO,gBAAgB,CAAC;QAC1B,KAAK,aAAa;YAChB,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,OAAO,8BAA8B,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"}
@@ -1,5 +1,12 @@
1
+ import type { RandomSamplingAvailability } from './random-sampling-availability.js';
2
+ import type { RandomSamplingReadContextReader } from './random-sampling-read-context.js';
1
3
  import type { ethers } from 'ethers';
4
+ import type { RpcRequestClass } from './rpc-request-transport.js';
2
5
  import type { RpcUsageWindow } from './rpc-usage.js';
6
+ import type { ContextGraphAuthorityIndexSnapshots } from './context-graph-authority-index-snapshot.js';
7
+ import type { ContextGraphAuthorityProjectionServedEvidence } from './context-graph-authority-index-projection.js';
8
+ import type { ContextGraphAuthorityIndexId } from './context-graph-authority-index-id.js';
9
+ export type { ContextGraphAuthorityIndexId } from './context-graph-authority-index-id.js';
3
10
  /**
4
11
  * The Publishing-Conviction-Account read methods the funded-wallet selector
5
12
  * needs from the conviction mixin. Declared as a shared interface so a rename or
@@ -16,12 +23,22 @@ export interface ConvictionReader {
16
23
  fresh?: boolean;
17
24
  }): Promise<ShardingTableNode[]>;
18
25
  getPublishingConvictionContracts?(): Promise<PcaContracts>;
26
+ /** @deprecated Use requestBrowserWalletRpc for new browser-read features. */
19
27
  requestPublishingConvictionRpc?(method: PcaRpcMethod, params?: unknown[]): Promise<unknown>;
20
28
  }
21
29
  /** Inputs for one adapter-owned, cost-aware publisher planning decision. */
22
30
  export interface PublisherPublishPlanRequest {
23
31
  contextGraphId: bigint;
32
+ /**
33
+ * @deprecated Prefer billableByteSize in new code. Kept required so callers
34
+ * and adapters compiled against the previous planning shape remain valid.
35
+ */
24
36
  effectiveByteSize: bigint;
37
+ /**
38
+ * Exact byte quantity used for token quoting and fundability checks.
39
+ * Publisher calls supply both names while the deprecated alias is supported.
40
+ */
41
+ billableByteSize?: bigint;
25
42
  /** Caller override. When omitted, a covering PCA may select its own lock. */
26
43
  explicitPublishEpochs?: number;
27
44
  /** Direct-spend lifetime used when no covering PCA-specific plan applies. */
@@ -29,6 +46,8 @@ export interface PublisherPublishPlanRequest {
29
46
  /** Exact signer pin for an explicit publisher address/private key. */
30
47
  publisherAddress?: string;
31
48
  }
49
+ /** Normalize the current and deprecated planning names to one exact quantity. */
50
+ export declare function publisherPublishPlanByteSize(request: PublisherPublishPlanRequest): bigint;
32
51
  /** Final signer-dependent values that must be fixed before publish side effects. */
33
52
  export interface PublisherPublishPlan {
34
53
  publisherAddress: string;
@@ -59,7 +78,18 @@ export interface PcaContracts {
59
78
  rpcUrls: string[];
60
79
  walletRpcUrls?: string[];
61
80
  }
62
- export type PcaRpcMethod = 'eth_chainId' | 'eth_call' | 'eth_getTransactionReceipt' | 'eth_getTransactionByHash' | 'eth_blockNumber' | 'eth_getBlockByNumber';
81
+ /** Browser-safe read methods shared by the independently scoped wallet features. */
82
+ export type BrowserWalletRpcMethod = 'eth_chainId' | 'eth_call' | 'eth_getTransactionReceipt' | 'eth_getTransactionByHash' | 'eth_blockNumber' | 'eth_getBlockByNumber';
83
+ export type PcaRpcMethod = BrowserWalletRpcMethod;
84
+ /** All-or-none node-identity contract surface for browser-signed key rotation. */
85
+ export interface IdentityWalletContracts {
86
+ profile: string;
87
+ identity: string;
88
+ storage: string;
89
+ chainId: string;
90
+ rpcUrls: string[];
91
+ walletRpcUrls?: string[];
92
+ }
63
93
  export interface IdentityProof {
64
94
  publicKey: Uint8Array;
65
95
  signature: Uint8Array;
@@ -261,10 +291,17 @@ export type CanonicalFinalizationReceiptResolution = {
261
291
  * absence.
262
292
  */
263
293
  export type PublishTransactionResolution =
264
- /** Mined, successful, and carries a publish this adapter parsed. */
294
+ /**
295
+ * Mined, successful, and carries a publish this adapter parsed. An adapter
296
+ * that established the verdict from a canonical receipt may also carry that
297
+ * exact receipt so same-operation consumers do not have to re-prove it.
298
+ * Absence preserves compatibility with adapters that cannot project the
299
+ * stricter receipt shape; callers must then perform their existing read.
300
+ */
265
301
  {
266
302
  status: 'confirmed';
267
303
  publish: OnChainPublishResult;
304
+ canonicalReceipt?: CanonicalFinalizationReceipt;
268
305
  }
269
306
  /** Mined with a failure receipt: proven ineffective, and permanently so. */
270
307
  | {
@@ -396,6 +433,16 @@ export interface ChainEvent {
396
433
  blockNumber: number;
397
434
  data: Record<string, unknown>;
398
435
  }
436
+ /**
437
+ * A process-local, non-serializable lease over one conservative background
438
+ * event-scan boundary. It has no chain-head, finality or authorization
439
+ * meaning. Consumers must re-check `holds()` after every awaited dispatch and
440
+ * immediately before advancing or persisting their cursor.
441
+ */
442
+ export interface EventScanHorizonLease {
443
+ readonly throughBlockNumber: number;
444
+ holds(): Promise<boolean>;
445
+ }
399
446
  /**
400
447
  * Why an off-chain ACK signer pre-flight rejected a recovered signer.
401
448
  * Mirrors the two on-chain gates in
@@ -454,6 +501,99 @@ export interface ContextGraphOnChain {
454
501
  /** Only set if metadata was revealed on-chain. */
455
502
  description?: string;
456
503
  }
504
+ /** Deterministic finalized authority generation used by RFC-64 policy composition. */
505
+ /**
506
+ * Live (latest-block) authority for one context graph, from ONE
507
+ * `ContextGraphStorage.getContextGraph(uint256)` read: liveness, access policy
508
+ * and participant roster at a single block. Three separate reads at `latest`
509
+ * can straddle a deactivation or a membership change; one storage read cannot.
510
+ */
511
+ export interface ContextGraphLiveAuthority {
512
+ readonly active: boolean;
513
+ readonly accessPolicy: number;
514
+ readonly participantAgents: readonly string[];
515
+ }
516
+ /**
517
+ * Rejection from `getContextGraphLiveAuthority` when the single read failed in
518
+ * a way the package does not classify as retryable - a tuple that does not
519
+ * decode, a revert that proves nothing about this id. Callers fall back to the
520
+ * three point reads, which do not share the tuple. Distinct from a nonexistent
521
+ * id (which resolves `null`) and from a failure classified transient, local
522
+ * governor saturation included (which rejects with the transport's own error
523
+ * and is NOT a cue to issue more reads). `cause` is the original error.
524
+ */
525
+ export declare class ContextGraphLiveAuthorityUnsupportedError extends Error {
526
+ readonly code: "CONTEXT_GRAPH_LIVE_AUTHORITY_UNSUPPORTED";
527
+ constructor(detail: string, options?: {
528
+ cause?: unknown;
529
+ });
530
+ }
531
+ export interface ContextGraphAuthoritySnapshot {
532
+ readonly chainId: string;
533
+ readonly governanceContract: string;
534
+ readonly contextGraphId: string;
535
+ readonly owner: string;
536
+ readonly active: boolean;
537
+ readonly accessPolicy: number;
538
+ readonly publishPolicy: number;
539
+ readonly publishAuthority: string | null;
540
+ readonly publishAuthorityAccountId: string;
541
+ readonly participantAgents: readonly string[];
542
+ readonly nameHash: string;
543
+ readonly ownershipEra: string;
544
+ readonly policyVersion: string;
545
+ readonly rosterVersion: string;
546
+ readonly sourceBlockNumber: string;
547
+ readonly sourceBlockHash: string;
548
+ }
549
+ /**
550
+ * The two write-once fields committed by one finalized
551
+ * `ContextGraphCreated` event. This value is deliberately all-or-nothing:
552
+ * callers must never combine one field from the event index with the other
553
+ * from a later unpinned point read.
554
+ */
555
+ export interface ContextGraphFinalizedCreation {
556
+ readonly nameHash: string;
557
+ readonly accessPolicy: 0 | 1;
558
+ }
559
+ /**
560
+ * Logical finalized-authority capability. Callers provide the complete target
561
+ * set for one operation; the chain implementation owns validation, projection,
562
+ * and the single finalized anchor.
563
+ */
564
+ export interface ContextGraphAuthorityIndexRevisionReader {
565
+ /**
566
+ * Resolve one RFC-64 authority binding at the index's finalized anchor.
567
+ * This intentionally differs from the public current-state name resolver.
568
+ */
569
+ resolveFinalizedContextGraphIdByNameHash?(nameHash: string, options?: ContextGraphAuthorityReadOptions): Promise<bigint | null>;
570
+ /**
571
+ * Resolve many unique name commitments from one finalized index projection.
572
+ * Missing and zero-hash commitments are omitted; ambiguity fails closed.
573
+ */
574
+ resolveFinalizedContextGraphIdsByNameHashes?(nameHashes: readonly string[], options?: ContextGraphAuthorityReadOptions): Promise<ReadonlyMap<string, bigint>>;
575
+ /**
576
+ * Resolve a name commitment and its complete authority state atomically at
577
+ * one finalized anchor. RFC-64 consumers should prefer this over composing
578
+ * the single-name ID resolver with a later snapshot read.
579
+ */
580
+ resolveFinalizedContextGraphAuthoritySnapshotByNameHash?(nameHash: string, options?: ContextGraphAuthorityReadOptions): Promise<ContextGraphAuthoritySnapshot | null>;
581
+ /**
582
+ * Resolve many name commitments and their complete authority state from one
583
+ * finalized index projection. Missing and zero-hash commitments are omitted;
584
+ * ambiguity fails the whole projection closed.
585
+ */
586
+ resolveFinalizedContextGraphAuthoritySnapshotsByNameHashes?(nameHashes: readonly string[], options?: ContextGraphAuthorityReadOptions): Promise<ReadonlyMap<string, ContextGraphAuthoritySnapshot>>;
587
+ readContextGraphAuthorityIndexRevisions(contextGraphIds: readonly ContextGraphAuthorityIndexId[], options?: ContextGraphAuthorityReadOptions): Promise<ReadonlyMap<ContextGraphAuthorityIndexId, string>>;
588
+ /**
589
+ * Read complete authority snapshots for many graphs at one finalized anchor.
590
+ * Responsibility selection and immediate authority acceptance share this
591
+ * projection. Optional so older/custom adapters retain their point-read path.
592
+ */
593
+ readContextGraphAuthorityIndexSnapshots?(contextGraphIds: readonly ContextGraphAuthorityIndexId[], options?: ContextGraphAuthorityReadOptions): Promise<ReadonlyMap<ContextGraphAuthorityIndexId, ContextGraphAuthoritySnapshot>>;
594
+ /** Await the physical shared-index scans underlying detached/cancelled waiters. */
595
+ whenIdle(): Promise<void>;
596
+ }
457
597
  export declare class ContextGraphChainScanPartialError extends Error {
458
598
  readonly partialResults: ContextGraphOnChain[];
459
599
  readonly scannedToBlock: number;
@@ -494,7 +634,7 @@ export type ContextGraphLegacyIncrementalScanOptions = {
494
634
  };
495
635
  export type ContextGraphChainScanOptions = ContextGraphChainListOptions | ContextGraphLegacyIncrementalScanOptions;
496
636
  /** Cursor-backed daemon ContextGraphNameRegistry scan modes. */
497
- export type ContextGraphRegistryScanOptions = {
637
+ export type ContextGraphRegistryScanOptions = ({
498
638
  mode: 'incremental';
499
639
  pageBudget?: number;
500
640
  } | {
@@ -502,9 +642,38 @@ export type ContextGraphRegistryScanOptions = {
502
642
  } | {
503
643
  mode: 'seedFromCursor';
504
644
  pageBudget?: number;
505
- };
645
+ } | {
646
+ /**
647
+ * Establish the daemon's live cursor at the current reorg-protected tail.
648
+ * Historical discovery is deliberately left to the independent repair
649
+ * lane so a missing/corrupt live watermark cannot delay new registrations.
650
+ */
651
+ mode: 'seedLiveTail';
652
+ pageBudget?: number;
653
+ } | {
654
+ /**
655
+ * Low-priority historical integrity pass. Repair scans use a cursor and
656
+ * captured target that are independent from the live discovery cursor,
657
+ * never enter its reorg window, and resume within a logical page budget.
658
+ * Provider retry/failover attempts are governed independently by RPC
659
+ * request-class policy and may exceed the number of logical pages.
660
+ */
661
+ mode: 'repair';
662
+ pageBudget: number;
663
+ minimumIntervalMs?: number;
664
+ }) & ChainReadOptions;
506
665
  export interface ContextGraphRegistryScanPage {
507
666
  contextGraphs: ContextGraphOnChain[];
667
+ /** Bounded operational progress; contains no graph identifiers. */
668
+ scanProgress?: Readonly<{
669
+ mode: ContextGraphRegistryScanOptions['mode'] | 'listAll';
670
+ page: number;
671
+ pageBudget?: number;
672
+ fromBlock: number;
673
+ toBlock: number;
674
+ targetBlock: number;
675
+ completesGeneration: boolean;
676
+ }>;
508
677
  ack(): Promise<void>;
509
678
  }
510
679
  export declare function buildEvmDeploymentId(input: {
@@ -516,9 +685,15 @@ export interface ContextGraphRegistryScanCursorKey {
516
685
  deploymentId: string;
517
686
  registryAddress: string;
518
687
  }
688
+ export interface ContextGraphRegistryRepairAuditStore {
689
+ load(key: ContextGraphRegistryScanCursorKey): Promise<unknown>;
690
+ save(key: ContextGraphRegistryScanCursorKey, checkpoint: unknown): Promise<void>;
691
+ }
519
692
  export interface ContextGraphRegistryScanCursorStore {
520
693
  load(key: ContextGraphRegistryScanCursorKey): Promise<number | undefined>;
521
694
  save(key: ContextGraphRegistryScanCursorKey, nextBlock: number): Promise<void>;
695
+ /** Optional grouped capability for opaque, atomically replaced repair state. */
696
+ repairAudit?: ContextGraphRegistryRepairAuditStore;
522
697
  }
523
698
  /**
524
699
  * Per SPEC_CG_MEMORY_MODEL: every CG is hosted by the network's sharding
@@ -1030,6 +1205,61 @@ export interface PreBroadcastSignal {
1030
1205
  export interface ChainReadOptions {
1031
1206
  signal?: AbortSignal;
1032
1207
  }
1208
+ /**
1209
+ * One coherent finalized Knowledge Asset version and the immutable physical
1210
+ * evidence that produced it. The binding fields are optional only for legacy
1211
+ * and third-party adapters; optimizations must refuse reuse when any is absent.
1212
+ */
1213
+ export interface KnowledgeAssetVersionSnapshot {
1214
+ knowledgeAssetId?: bigint;
1215
+ latestRoot: string;
1216
+ rootCount: bigint;
1217
+ latestAuthor: string;
1218
+ latestPublisher: string;
1219
+ blockNumber: number;
1220
+ blockHash?: string;
1221
+ knowledgeAssetStorageAddress?: string;
1222
+ knowledgeAssetStorageGeneration?: number;
1223
+ }
1224
+ /** Options honored only by the shared live-authority read. */
1225
+ export interface ContextGraphLiveAuthorityReadOptions extends ChainReadOptions {
1226
+ /**
1227
+ * Explicit transport priority for this read. Only
1228
+ * `getContextGraphLiveAuthority` consults it today, to partition its shared
1229
+ * flights so a foreground gate read never waits behind a throttled
1230
+ * background one. Omitted means the caller's ambient class, which is what an
1231
+ * unshared read would have used anyway.
1232
+ */
1233
+ requestClass?: RpcRequestClass;
1234
+ }
1235
+ /** Options honored only by finalized Context Graph authority projections. */
1236
+ export interface ContextGraphAuthorityReadOptions extends ChainReadOptions {
1237
+ /**
1238
+ * Finalized Context Graph authority reads only: told how the read was
1239
+ * answered. FOUR ways, and a consumer that assumes three will read the
1240
+ * fourth as something it is not:
1241
+ *
1242
+ * - `scan` exercised the RPC pool now.
1243
+ * - `cache` came from a projection still inside `chain.indexTickMs`.
1244
+ * - `log` was FOLDED out of the node-local chain event log's stored rows and
1245
+ * touched no endpoint at all. It is neither inside `chain.indexTickMs`
1246
+ * (its bound is `min(max(3T, 15s), 5m)` against the background tick's last
1247
+ * head read, not T) nor the consequence of any failure — a healthy node
1248
+ * answers this way in the steady state. That combination is what makes it
1249
+ * worth naming here: the pre-log rule "a non-scan answer is either fresh
1250
+ * inside T or a failure" is no longer true of this interface.
1251
+ * - `stale-cache` was answered DESPITE a failed refresh.
1252
+ *
1253
+ * ONLY `scan` and `cache` are evidence that the pool is alive. A health
1254
+ * governor — the RFC-64 authority circuit breaker is the one that exists —
1255
+ * needs the distinction and must default to the no-proof side, so a member
1256
+ * added later cannot be mistaken for health by omission.
1257
+ * {@link ContextGraphAuthorityProjectionServedEvidence} carries the full
1258
+ * statement of each member. Every other reader ignores this and no other read
1259
+ * reports it.
1260
+ */
1261
+ onContextGraphAuthorityProjectionServed?: (evidence: ContextGraphAuthorityProjectionServedEvidence) => void;
1262
+ }
1033
1263
  /**
1034
1264
  * Scalar KA state returned by
1035
1265
  * `DKGKnowledgeAssets.getKnowledgeAssetUpdateContext(uint256)`.
@@ -1080,6 +1310,13 @@ export interface ChainAdapter {
1080
1310
  * `chainId` (single in-memory deployment per process).
1081
1311
  */
1082
1312
  deploymentId: string;
1313
+ /**
1314
+ * Optional explicit capability for daemon-local authority-index revisions.
1315
+ * Presence means a local index is bound; every read either returns revisions
1316
+ * or rejects, while absence selects the caller's unsupported path.
1317
+ */
1318
+ readonly contextGraphAuthorityIndexRevisionReader?: ContextGraphAuthorityIndexRevisionReader;
1319
+ readonly contextGraphAuthorityIndexSnapshots?: ContextGraphAuthorityIndexSnapshots;
1083
1320
  /**
1084
1321
  * OPTIONAL RPC-usage capability: drain the raw JSON-RPC request counts
1085
1322
  * accumulated since the previous drain (a DELTA window — summing drains over
@@ -1199,6 +1436,12 @@ export interface ChainAdapter {
1199
1436
  */
1200
1437
  verifyPublisherOwnsRange?(publisherAddress: string, startKAId: bigint, endKAId: bigint): Promise<boolean>;
1201
1438
  getBlockNumber?(): Promise<number>;
1439
+ /**
1440
+ * Conservative, possibly lagging one-log horizon for background event
1441
+ * polling. This is not a canonical head, finality fact, or authorization
1442
+ * input; absence makes the poller use `getBlockNumber()` exactly as before.
1443
+ */
1444
+ acquireEventScanHorizonLease?(eventTypes: readonly string[]): Promise<EventScanHorizonLease | undefined>;
1202
1445
  listenForEvents(filter: EventFilter): AsyncIterable<ChainEvent>;
1203
1446
  createContextGraph(params: CreateContextGraphParams): Promise<TxResult>;
1204
1447
  submitToContextGraph(kaId: string, contextGraphId: string): Promise<TxResult>;
@@ -1214,6 +1457,21 @@ export interface ChainAdapter {
1214
1457
  scanContextGraphRegistryPages?(options: ContextGraphRegistryScanOptions): AsyncIterable<ContextGraphRegistryScanPage>;
1215
1458
  /** True when the adapter has a registry scan watermark for its currently bound ContextGraphNameRegistry. */
1216
1459
  hasContextGraphRegistryScanWatermark?(): Promise<boolean>;
1460
+ /**
1461
+ * Resolve one graph's current policy and roster at a stable finalized
1462
+ * anchor. Optional for NoChain and legacy adapters; default RFC-64 callers
1463
+ * must bind the explicit ContextGraphAuthorityReader capability instead of
1464
+ * probing this member in individual workflows.
1465
+ */
1466
+ getContextGraphAuthoritySnapshot?(contextGraphId: bigint, options?: ContextGraphAuthorityReadOptions): Promise<ContextGraphAuthoritySnapshot>;
1467
+ /**
1468
+ * Read the immutable creation pair from one complete, current finalized
1469
+ * authority projection. Returns `undefined` when the event index cannot
1470
+ * prove a positive non-zero name commitment; callers then keep their
1471
+ * existing live reads. Implementations must not cache misses or either
1472
+ * field independently.
1473
+ */
1474
+ getContextGraphFinalizedCreation?(contextGraphId: bigint, options?: ContextGraphAuthorityReadOptions): Promise<ContextGraphFinalizedCreation | undefined>;
1217
1475
  /**
1218
1476
  * Live owner lookup for a PCA NFT — wraps `DKGPublishingConvictionNFT.ownerOf(accountId)`.
1219
1477
  * Used by the daemon's curated-CG registration preflight to populate the
@@ -1256,18 +1514,25 @@ export interface ChainAdapter {
1256
1514
  listDesignatableNodes?(opts?: {
1257
1515
  fresh?: boolean;
1258
1516
  }): Promise<ShardingTableNode[]>;
1517
+ /**
1518
+ * Independent browser bootstrap for node-identity key management. `null`
1519
+ * means the deployment does not expose the complete Profile / Identity /
1520
+ * IdentityStorage capability.
1521
+ */
1522
+ getIdentityWalletContracts?(): Promise<IdentityWalletContracts | null>;
1523
+ /** Feature-neutral, read-only JSON-RPC bridge for browser-wallet routes. */
1524
+ requestBrowserWalletRpc?(method: BrowserWalletRpcMethod, params?: unknown[]): Promise<unknown>;
1525
+ /**
1526
+ * @deprecated Use {@link requestBrowserWalletRpc}. Retained as a compatibility
1527
+ * bridge for adapters and embedders compiled against the PCA-specific API.
1528
+ */
1529
+ requestPublishingConvictionRpc?(method: PcaRpcMethod, params?: unknown[]): Promise<unknown>;
1259
1530
  /**
1260
1531
  * Browser-bootstrap contract addresses + chain params for the HW signing
1261
1532
  * layer. The browser needs the PCA NFT address, TRAC token address, chain id,
1262
1533
  * and safe RPC URLs; Hub/logic/ShardingTable stay daemon-side.
1263
1534
  */
1264
1535
  getPublishingConvictionContracts?(): Promise<PcaContracts>;
1265
- /**
1266
- * Daemon-internal read-only JSON-RPC bridge used by `/api/pca/rpc`. The HTTP
1267
- * route owns the allowlist; adapters forward allowed reads without exposing
1268
- * endpoint URLs.
1269
- */
1270
- requestPublishingConvictionRpc?(method: PcaRpcMethod, params?: unknown[]): Promise<unknown>;
1271
1536
  /**
1272
1537
  * Returns the V10 NFT-backed PCA's `lockDurationEpochs` for the given
1273
1538
  * `accountId` — i.e. the snapshotted publishing-conviction-epochs the
@@ -1622,6 +1887,10 @@ export interface ChainAdapter {
1622
1887
  * check rather than only testing method presence.
1623
1888
  */
1624
1889
  isRandomSamplingReady?(): boolean;
1890
+ /** Refresh RandomSampling bindings and read membership through one typed capability. */
1891
+ resolveRandomSamplingAvailability?(identityId: bigint): Promise<RandomSamplingAvailability>;
1892
+ /** Cohesive binding/epoch capability used for solved-period reuse. */
1893
+ getRandomSamplingReadContextReader?(): RandomSamplingReadContextReader | undefined;
1625
1894
  /**
1626
1895
  * Returns the deployed address of `KnowledgeAssetsV10` on this chain.
1627
1896
  * Required — the publisher uses it to build the H5-prefixed publish
@@ -1637,6 +1906,20 @@ export interface ChainAdapter {
1637
1906
  * publisher to build the H5-prefixed publish digests.
1638
1907
  */
1639
1908
  getEvmChainId(): Promise<bigint>;
1909
+ /**
1910
+ * The RESOLVED `chain.finalityConfirmations` this adapter is using — the
1911
+ * node's single definition of finality (see evm-finality-anchor.ts).
1912
+ *
1913
+ * Exposed because callers that hold an adapter must not re-derive the depth
1914
+ * from a raw config they may not have. `DKGAgent` accepts a PRE-BUILT
1915
+ * `chainAdapter`, in which case `chainConfig` is ignored entirely, so an
1916
+ * RFC-64 precommit reading `chainConfig?.finalityConfirmations` would anchor
1917
+ * at the default while the adapter's own authority reads honoured the
1918
+ * operator — two anchors in one process, with no error anywhere. Optional so
1919
+ * out-of-tree and mock adapters need not implement it; absent means "no
1920
+ * opinion", and the caller falls back to its configured value.
1921
+ */
1922
+ getFinalityConfirmations?(): number;
1640
1923
  createKnowledgeAsset?(params: CreateKCParams): Promise<TxResult>;
1641
1924
  updateKnowledgeAsset?(params: UpdateKCParams): Promise<TxResult>;
1642
1925
  /**
@@ -1714,13 +1997,13 @@ export interface ChainAdapter {
1714
1997
  * The pinned height uses `chain.finalityConfirmations`: confirmation 1 is the current head,
1715
1998
  * and larger values pin `head - confirmations + 1`.
1716
1999
  */
1717
- readKnowledgeAssetVersionSnapshot?(kaId: bigint, options?: ChainReadOptions): Promise<{
1718
- latestRoot: string;
1719
- rootCount: bigint;
1720
- latestAuthor: string;
1721
- latestPublisher: string;
1722
- blockNumber: number;
1723
- } | null>;
2000
+ readKnowledgeAssetVersionSnapshot?(kaId: bigint, options?: ChainReadOptions): Promise<KnowledgeAssetVersionSnapshot | null>;
2001
+ /**
2002
+ * Cheap lease validation for a previously-read coherent snapshot. A true
2003
+ * result proves that the same finalized block hash and exact physical KAS
2004
+ * binding generation are still current. Missing evidence is always false.
2005
+ */
2006
+ knowledgeAssetVersionSnapshotIsCurrent?(kaId: bigint, snapshot: KnowledgeAssetVersionSnapshot, options?: ChainReadOptions): Promise<boolean>;
1724
2007
  /**
1725
2008
  * Constant-cost scalar update context for a KA. Consumers that need version
1726
2009
  * plus sizing data should prefer this over separate root-count and leaf-count
@@ -1875,6 +2158,19 @@ export interface ChainAdapter {
1875
2158
  * their own fail-closed or ACK-backed fallback behavior.
1876
2159
  */
1877
2160
  isContextGraphActiveOnChain?(contextGraphId: bigint, options?: ChainReadOptions): Promise<boolean>;
2161
+ /**
2162
+ * One-read live authority: `active`, `accessPolicy` and `participantAgents`
2163
+ * from `ContextGraphStorage.getContextGraph(uint256)` at `latest`.
2164
+ *
2165
+ * Resolves `null` ONLY when the chain proved the id nonexistent
2166
+ * (`ERC721NonexistentToken`); callers must treat that exactly as a liveness
2167
+ * probe returning `false` — terminal, never retried. Rejects with
2168
+ * `ContextGraphLiveAuthorityUnsupportedError` on a deterministic failure of
2169
+ * the single read (callers fall back to the three point reads) and with the
2170
+ * transport's own error on a transient one. Optional, like the point reads
2171
+ * it composes.
2172
+ */
2173
+ getContextGraphLiveAuthority?(contextGraphId: bigint, options?: ContextGraphLiveAuthorityReadOptions): Promise<ContextGraphLiveAuthority | null>;
1878
2174
  /**
1879
2175
  * On-chain publish policy for `contextGraphId`. Read from
1880
2176
  * `ContextGraphStorage.getPublishPolicy(uint256)`. Returns the
@@ -1951,6 +2247,16 @@ export interface ChainAdapter {
1951
2247
  * exceeds it.
1952
2248
  */
1953
2249
  resolveContextGraphIdByNameHash?(nameHash: string, options?: ChainReadOptions): Promise<bigint | null>;
2250
+ /**
2251
+ * Request-scoped bulk equivalent of the exact current name-hash lookup.
2252
+ * Returns every unique lowercase bytes32 key supplied by the caller,
2253
+ * including null for proven misses. A partial or ambiguous batch MUST reject.
2254
+ * Absence from a returned map is never proof of non-registration.
2255
+ * Implementations page historical creation inventory by block range and
2256
+ * share fences across the complete input batch. They must not reuse a
2257
+ * persistent negative snapshot for an independent call.
2258
+ */
2259
+ resolveContextGraphIdsByNameHashes?(nameHashes: readonly string[], options?: ChainReadOptions): Promise<ReadonlyMap<string, bigint | null>>;
1954
2260
  }
1955
2261
  /** @deprecated Use VerifyParams instead. */
1956
2262
  export type AddBatchToContextGraphParams = VerifyParams;