@reclaimprotocol/attestor-core 4.0.3 → 5.0.1-beta.2

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 (297) hide show
  1. package/LICENSE +660 -660
  2. package/README.md +1 -2
  3. package/lib/avs/abis/avsDirectoryABI.js +341 -342
  4. package/lib/avs/abis/delegationABI.js +4 -5
  5. package/lib/avs/abis/registryABI.js +722 -723
  6. package/lib/avs/client/create-claim-on-avs.d.ts +5 -5
  7. package/lib/avs/client/create-claim-on-avs.js +160 -139
  8. package/lib/avs/config.d.ts +1 -1
  9. package/lib/avs/config.js +25 -23
  10. package/lib/avs/contracts/ReclaimServiceManager.d.ts +436 -532
  11. package/lib/avs/contracts/ReclaimServiceManager.js +0 -3
  12. package/lib/avs/contracts/common.d.ts +40 -11
  13. package/lib/avs/contracts/common.js +0 -3
  14. package/lib/avs/contracts/factories/ReclaimServiceManager__factory.d.ts +13 -11
  15. package/lib/avs/contracts/factories/ReclaimServiceManager__factory.js +1157 -1148
  16. package/lib/avs/contracts/factories/index.d.ts +1 -1
  17. package/lib/avs/contracts/factories/index.js +4 -9
  18. package/lib/avs/contracts/index.d.ts +3 -3
  19. package/lib/avs/contracts/index.js +6 -40
  20. package/lib/avs/types/index.d.ts +6 -6
  21. package/lib/avs/types/index.js +0 -3
  22. package/lib/avs/utils/contracts.d.ts +14 -14
  23. package/lib/avs/utils/contracts.js +50 -35
  24. package/lib/avs/utils/register.d.ts +3 -3
  25. package/lib/avs/utils/register.js +71 -79
  26. package/lib/avs/utils/tasks.d.ts +4 -4
  27. package/lib/avs/utils/tasks.js +44 -41
  28. package/lib/client/create-claim.d.ts +2 -2
  29. package/lib/client/create-claim.js +437 -400
  30. package/lib/client/index.d.ts +3 -3
  31. package/lib/client/index.js +3 -20
  32. package/lib/client/tunnels/make-rpc-tcp-tunnel.d.ts +2 -2
  33. package/lib/client/tunnels/make-rpc-tcp-tunnel.js +49 -56
  34. package/lib/client/tunnels/make-rpc-tls-tunnel.d.ts +4 -3
  35. package/lib/client/tunnels/make-rpc-tls-tunnel.js +123 -131
  36. package/lib/client/utils/attestor-pool.d.ts +3 -1
  37. package/lib/client/utils/attestor-pool.js +21 -25
  38. package/lib/client/utils/client-socket.d.ts +4 -4
  39. package/lib/client/utils/client-socket.js +114 -94
  40. package/lib/client/utils/message-handler.d.ts +2 -2
  41. package/lib/client/utils/message-handler.js +89 -86
  42. package/lib/config/index.d.ts +6 -3
  43. package/lib/config/index.js +60 -37
  44. package/lib/external-rpc/benchmark.d.ts +1 -0
  45. package/lib/external-rpc/benchmark.js +82 -0
  46. package/lib/external-rpc/event-bus.d.ts +7 -0
  47. package/lib/external-rpc/event-bus.js +17 -0
  48. package/lib/external-rpc/global.d.js +0 -0
  49. package/lib/external-rpc/handle-incoming-msg.d.ts +2 -0
  50. package/lib/external-rpc/handle-incoming-msg.js +241 -0
  51. package/lib/external-rpc/index.d.ts +3 -0
  52. package/lib/external-rpc/index.js +3 -0
  53. package/lib/external-rpc/jsc-polyfills/1.d.ts +14 -0
  54. package/lib/external-rpc/jsc-polyfills/1.js +80 -0
  55. package/lib/external-rpc/jsc-polyfills/2.js +15 -0
  56. package/lib/external-rpc/jsc-polyfills/event.d.ts +10 -0
  57. package/lib/external-rpc/jsc-polyfills/event.js +19 -0
  58. package/lib/external-rpc/jsc-polyfills/index.d.ts +2 -0
  59. package/lib/external-rpc/jsc-polyfills/index.js +2 -0
  60. package/lib/external-rpc/jsc-polyfills/ws.d.ts +21 -0
  61. package/lib/external-rpc/jsc-polyfills/ws.js +83 -0
  62. package/lib/external-rpc/setup-browser.d.ts +6 -0
  63. package/lib/external-rpc/setup-browser.js +33 -0
  64. package/lib/external-rpc/setup-jsc.d.ts +24 -0
  65. package/lib/external-rpc/setup-jsc.js +22 -0
  66. package/lib/{window-rpc → external-rpc}/types.d.ts +56 -35
  67. package/lib/external-rpc/types.js +0 -0
  68. package/lib/external-rpc/utils.d.ts +20 -0
  69. package/lib/external-rpc/utils.js +100 -0
  70. package/lib/external-rpc/zk.d.ts +14 -0
  71. package/lib/external-rpc/zk.js +58 -0
  72. package/lib/index.d.ts +8 -9
  73. package/lib/index.js +12 -49
  74. package/lib/mechain/abis/governanceABI.js +460 -461
  75. package/lib/mechain/abis/taskABI.js +505 -506
  76. package/lib/mechain/client/create-claim-on-mechain.d.ts +3 -3
  77. package/lib/mechain/client/create-claim-on-mechain.js +31 -30
  78. package/lib/mechain/client/index.d.ts +1 -1
  79. package/lib/mechain/client/index.js +1 -18
  80. package/lib/mechain/constants/index.js +8 -7
  81. package/lib/mechain/index.d.ts +2 -2
  82. package/lib/mechain/index.js +2 -19
  83. package/lib/mechain/types/index.d.ts +2 -2
  84. package/lib/mechain/types/index.js +0 -3
  85. package/lib/proto/api.d.ts +182 -39
  86. package/lib/proto/api.js +4105 -3555
  87. package/lib/proto/tee-bundle.d.ts +156 -0
  88. package/lib/proto/tee-bundle.js +1296 -0
  89. package/lib/providers/http/index.d.ts +16 -1
  90. package/lib/providers/http/index.js +603 -576
  91. package/lib/providers/http/patch-parse5-tree.d.ts +6 -0
  92. package/lib/providers/http/patch-parse5-tree.js +34 -0
  93. package/lib/providers/http/utils.d.ts +7 -4
  94. package/lib/providers/http/utils.js +240 -317
  95. package/lib/providers/index.d.ts +1 -1
  96. package/lib/providers/index.js +5 -9
  97. package/lib/scripts/check-avs-registration.d.ts +1 -1
  98. package/lib/scripts/check-avs-registration.js +24 -25
  99. package/lib/scripts/fallbacks/crypto.d.ts +1 -0
  100. package/lib/scripts/fallbacks/crypto.js +4 -0
  101. package/lib/scripts/fallbacks/empty.d.ts +3 -0
  102. package/lib/scripts/fallbacks/empty.js +4 -0
  103. package/lib/scripts/fallbacks/re2.d.ts +1 -0
  104. package/lib/scripts/fallbacks/re2.js +7 -0
  105. package/lib/scripts/fallbacks/snarkjs.d.ts +1 -0
  106. package/lib/scripts/fallbacks/snarkjs.js +10 -0
  107. package/lib/scripts/fallbacks/stwo.d.ts +6 -0
  108. package/lib/scripts/fallbacks/stwo.js +159 -0
  109. package/lib/scripts/generate-provider-types.js +92 -73
  110. package/lib/scripts/generate-receipt.d.ts +2 -2
  111. package/lib/scripts/generate-receipt.js +94 -83
  112. package/lib/scripts/generate-toprf-keys.js +17 -16
  113. package/lib/scripts/jsc-cli-rpc.d.ts +1 -0
  114. package/lib/scripts/jsc-cli-rpc.js +35 -0
  115. package/lib/scripts/register-avs-operator.d.ts +1 -1
  116. package/lib/scripts/register-avs-operator.js +3 -7
  117. package/lib/scripts/start-server.d.ts +1 -1
  118. package/lib/scripts/start-server.js +9 -11
  119. package/lib/scripts/update-avs-metadata.d.ts +1 -1
  120. package/lib/scripts/update-avs-metadata.js +17 -19
  121. package/lib/scripts/utils.js +8 -9
  122. package/lib/scripts/whitelist-operator.d.ts +1 -1
  123. package/lib/scripts/whitelist-operator.js +13 -15
  124. package/lib/server/create-server.d.ts +3 -2
  125. package/lib/server/create-server.js +98 -85
  126. package/lib/server/handlers/claimTeeBundle.d.ts +6 -0
  127. package/lib/server/handlers/claimTeeBundle.js +232 -0
  128. package/lib/server/handlers/claimTunnel.d.ts +1 -1
  129. package/lib/server/handlers/claimTunnel.js +75 -73
  130. package/lib/server/handlers/completeClaimOnChain.d.ts +1 -1
  131. package/lib/server/handlers/completeClaimOnChain.js +27 -26
  132. package/lib/server/handlers/createClaimOnChain.d.ts +1 -1
  133. package/lib/server/handlers/createClaimOnChain.js +30 -29
  134. package/lib/server/handlers/createTaskOnMechain.d.ts +1 -1
  135. package/lib/server/handlers/createTaskOnMechain.js +54 -49
  136. package/lib/server/handlers/createTunnel.d.ts +1 -1
  137. package/lib/server/handlers/createTunnel.js +91 -94
  138. package/lib/server/handlers/disconnectTunnel.d.ts +1 -1
  139. package/lib/server/handlers/disconnectTunnel.js +6 -8
  140. package/lib/server/handlers/fetchCertificateBytes.d.ts +2 -0
  141. package/lib/server/handlers/fetchCertificateBytes.js +57 -0
  142. package/lib/server/handlers/index.d.ts +1 -1
  143. package/lib/server/handlers/index.js +24 -21
  144. package/lib/server/handlers/init.d.ts +1 -1
  145. package/lib/server/handlers/init.js +31 -34
  146. package/lib/server/handlers/toprf.d.ts +1 -1
  147. package/lib/server/handlers/toprf.js +17 -19
  148. package/lib/server/index.d.ts +4 -4
  149. package/lib/server/index.js +4 -21
  150. package/lib/server/socket.d.ts +7 -7
  151. package/lib/server/socket.js +104 -106
  152. package/lib/server/tunnels/make-tcp-tunnel.d.ts +5 -3
  153. package/lib/server/tunnels/make-tcp-tunnel.js +189 -162
  154. package/lib/server/utils/apm.d.ts +1 -1
  155. package/lib/server/utils/apm.js +26 -40
  156. package/lib/server/utils/assert-valid-claim-request.d.ts +6 -5
  157. package/lib/server/utils/assert-valid-claim-request.js +339 -185
  158. package/lib/server/utils/config-env.js +4 -7
  159. package/lib/server/utils/dns.js +18 -16
  160. package/lib/server/utils/gcp-attestation.d.ts +17 -0
  161. package/lib/server/utils/gcp-attestation.js +237 -0
  162. package/lib/server/utils/generics.d.ts +3 -3
  163. package/lib/server/utils/generics.js +37 -51
  164. package/lib/server/utils/iso.js +255 -256
  165. package/lib/server/utils/keep-alive.d.ts +2 -2
  166. package/lib/server/utils/keep-alive.js +36 -40
  167. package/lib/server/utils/nitro-attestation.d.ts +33 -0
  168. package/lib/server/utils/nitro-attestation.js +249 -0
  169. package/lib/server/utils/oprf-raw.d.ts +21 -0
  170. package/lib/server/utils/oprf-raw.js +61 -0
  171. package/lib/server/utils/process-handshake.d.ts +3 -3
  172. package/lib/server/utils/process-handshake.js +217 -175
  173. package/lib/server/utils/proxy-session.d.ts +1 -0
  174. package/lib/server/utils/proxy-session.js +6 -0
  175. package/lib/server/utils/tee-oprf-mpc-verification.d.ts +16 -0
  176. package/lib/server/utils/tee-oprf-mpc-verification.js +86 -0
  177. package/lib/server/utils/tee-oprf-verification.d.ts +24 -0
  178. package/lib/server/utils/tee-oprf-verification.js +151 -0
  179. package/lib/server/utils/tee-transcript-reconstruction.d.ts +24 -0
  180. package/lib/server/utils/tee-transcript-reconstruction.js +140 -0
  181. package/lib/server/utils/tee-verification.d.ts +28 -0
  182. package/lib/server/utils/tee-verification.js +358 -0
  183. package/lib/{utils → server/utils}/validation.d.ts +1 -1
  184. package/lib/server/utils/validation.js +45 -0
  185. package/lib/types/bgp.js +0 -3
  186. package/lib/types/claims.d.ts +7 -10
  187. package/lib/types/claims.js +0 -3
  188. package/lib/types/client.d.ts +5 -5
  189. package/lib/types/client.js +0 -3
  190. package/lib/types/general.d.ts +29 -4
  191. package/lib/types/general.js +0 -3
  192. package/lib/types/handlers.d.ts +3 -3
  193. package/lib/types/handlers.js +0 -3
  194. package/lib/types/index.d.ts +10 -10
  195. package/lib/types/index.js +10 -27
  196. package/lib/types/providers.d.ts +15 -4
  197. package/lib/types/providers.gen.d.ts +15 -1
  198. package/lib/types/providers.gen.js +15 -13
  199. package/lib/types/providers.js +0 -3
  200. package/lib/types/rpc.d.ts +2 -2
  201. package/lib/types/rpc.js +0 -3
  202. package/lib/types/signatures.js +0 -3
  203. package/lib/types/tunnel.d.ts +2 -2
  204. package/lib/types/tunnel.js +0 -3
  205. package/lib/types/zk.d.ts +17 -2
  206. package/lib/types/zk.js +0 -3
  207. package/lib/utils/auth.d.ts +2 -1
  208. package/lib/utils/auth.js +66 -59
  209. package/lib/utils/b64-json.js +13 -19
  210. package/lib/utils/bgp-listener.d.ts +1 -1
  211. package/lib/utils/bgp-listener.js +111 -114
  212. package/lib/utils/claims.d.ts +3 -3
  213. package/lib/utils/claims.js +78 -101
  214. package/lib/utils/env.js +15 -16
  215. package/lib/utils/error.d.ts +6 -7
  216. package/lib/utils/error.js +50 -39
  217. package/lib/utils/generics.d.ts +15 -13
  218. package/lib/utils/generics.js +217 -297
  219. package/lib/utils/http-parser.d.ts +1 -1
  220. package/lib/utils/http-parser.js +186 -237
  221. package/lib/utils/index.d.ts +13 -12
  222. package/lib/utils/index.js +13 -29
  223. package/lib/utils/logger.d.ts +1 -1
  224. package/lib/utils/logger.js +69 -87
  225. package/lib/utils/prepare-packets.d.ts +3 -3
  226. package/lib/utils/prepare-packets.js +66 -58
  227. package/lib/utils/redactions.d.ts +20 -1
  228. package/lib/utils/redactions.js +116 -129
  229. package/lib/utils/retries.d.ts +1 -1
  230. package/lib/utils/retries.js +24 -26
  231. package/lib/utils/signatures/eth.d.ts +1 -1
  232. package/lib/utils/signatures/eth.js +28 -30
  233. package/lib/utils/signatures/index.d.ts +3 -3
  234. package/lib/utils/signatures/index.js +11 -10
  235. package/lib/utils/socket-base.d.ts +6 -5
  236. package/lib/utils/socket-base.js +89 -88
  237. package/lib/utils/tls.d.ts +1 -1
  238. package/lib/utils/tls.js +54 -28
  239. package/lib/utils/ws.d.ts +1 -6
  240. package/lib/utils/ws.js +17 -33
  241. package/lib/utils/zk.d.ts +28 -12
  242. package/lib/utils/zk.js +587 -406
  243. package/package.json +72 -60
  244. package/lib/avs/tests/test.operator.d.ts +0 -11
  245. package/lib/avs/tests/test.operator.js +0 -313
  246. package/lib/avs/tests/utils.d.ts +0 -2
  247. package/lib/avs/tests/utils.js +0 -50
  248. package/lib/scripts/verify-root-ca.d.ts +0 -1
  249. package/lib/scripts/verify-root-ca.js +0 -51
  250. package/lib/tests/describe-with-server.d.ts +0 -20
  251. package/lib/tests/describe-with-server.js +0 -64
  252. package/lib/tests/mock-provider-server.d.ts +0 -13
  253. package/lib/tests/mock-provider-server.js +0 -65
  254. package/lib/tests/mocks.d.ts +0 -4
  255. package/lib/tests/mocks.js +0 -23
  256. package/lib/tests/test.auth.js +0 -75
  257. package/lib/tests/test.bgp-listener.js +0 -169
  258. package/lib/tests/test.claim-creation.js +0 -280
  259. package/lib/tests/test.http-parser.d.ts +0 -1
  260. package/lib/tests/test.http-parser.js +0 -120
  261. package/lib/tests/test.http-provider-utils.js +0 -2416
  262. package/lib/tests/test.http-provider.d.ts +0 -1
  263. package/lib/tests/test.http-provider.js +0 -114
  264. package/lib/tests/test.rpc-communication.d.ts +0 -1
  265. package/lib/tests/test.rpc-communication.js +0 -64
  266. package/lib/tests/test.rpc-tunnel.d.ts +0 -1
  267. package/lib/tests/test.rpc-tunnel.js +0 -172
  268. package/lib/tests/test.signatures.d.ts +0 -1
  269. package/lib/tests/test.signatures.js +0 -24
  270. package/lib/tests/test.tcp-tunnel.d.ts +0 -1
  271. package/lib/tests/test.tcp-tunnel.js +0 -64
  272. package/lib/tests/test.zk.d.ts +0 -1
  273. package/lib/tests/test.zk.js +0 -337
  274. package/lib/tests/utils.d.ts +0 -18
  275. package/lib/tests/utils.js +0 -64
  276. package/lib/utils/atomic-operations.d.ts +0 -24
  277. package/lib/utils/atomic-operations.js +0 -65
  278. package/lib/utils/benchmark.d.ts +0 -1
  279. package/lib/utils/benchmark.js +0 -70
  280. package/lib/utils/connection-state-machine.d.ts +0 -43
  281. package/lib/utils/connection-state-machine.js +0 -129
  282. package/lib/utils/resource-monitor.d.ts +0 -61
  283. package/lib/utils/resource-monitor.js +0 -107
  284. package/lib/utils/validation.js +0 -46
  285. package/lib/window-rpc/index.d.ts +0 -3
  286. package/lib/window-rpc/index.js +0 -20
  287. package/lib/window-rpc/setup-window-rpc.d.ts +0 -5
  288. package/lib/window-rpc/setup-window-rpc.js +0 -291
  289. package/lib/window-rpc/types.js +0 -3
  290. package/lib/window-rpc/utils.d.ts +0 -14
  291. package/lib/window-rpc/utils.js +0 -102
  292. package/lib/window-rpc/window-rpc-zk.d.ts +0 -15
  293. package/lib/window-rpc/window-rpc-zk.js +0 -85
  294. /package/lib/{tests/test.auth.d.ts → external-rpc/jsc-polyfills/2.d.ts} +0 -0
  295. /package/lib/{tests/test.bgp-listener.d.ts → scripts/build-browser.d.ts} +0 -0
  296. /package/lib/{tests/test.claim-creation.d.ts → scripts/build-jsc.d.ts} +0 -0
  297. /package/lib/{tests/test.http-provider-utils.d.ts → scripts/build-lib.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
- import { CreateClaimOnMechainOpts } from '../../mechain/types';
2
- import { ClaimTunnelResponse } from '../../proto/api';
3
- import { ProviderName } from '../../types';
1
+ import type { CreateClaimOnMechainOpts } from '#src/mechain/types/index.ts';
2
+ import type { ClaimTunnelResponse } from '#src/proto/api.ts';
3
+ import type { ProviderName } from '#src/types/index.ts';
4
4
  /**
5
5
  * Creates a Reclaim claim on the AVS chain.
6
6
  */
@@ -1,32 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createClaimOnMechain = createClaimOnMechain;
4
- const client_1 = require("../../client");
5
- const client_2 = require("../../client");
6
- /**
7
- * Creates a Reclaim claim on the AVS chain.
8
- */
9
- async function createClaimOnMechain({ createClaimOnAttestor = client_1.createClaimOnAttestor, onStep, client, ...opts }) {
10
- const clientMechain = (0, client_1.getAttestorClientFromPool)(client.url);
11
- const timestamp = Math.floor(Date.now() / 1000);
12
- await clientMechain.waitForInit();
13
- onStep === null || onStep === void 0 ? void 0 : onStep({ type: 'taskRequested', timestamp });
14
- const { taskId, requiredAttestors, hosts } = await clientMechain.rpc('createTaskOnMechain', {
15
- timestamp: timestamp
1
+ import { createClaimOnAttestor as _createClaimOnAttestor, getAttestorClientFromPool } from "../../client/index.js";
2
+ import { AttestorClient } from "../../client/index.js";
3
+ async function createClaimOnMechain({
4
+ createClaimOnAttestor = _createClaimOnAttestor,
5
+ onStep,
6
+ client,
7
+ ...opts
8
+ }) {
9
+ const clientMechain = getAttestorClientFromPool(client.url);
10
+ const timestamp = Math.floor(Date.now() / 1e3);
11
+ await clientMechain.waitForInit();
12
+ onStep?.({ type: "taskRequested", timestamp });
13
+ const { taskId, requiredAttestors, hosts } = await clientMechain.rpc("createTaskOnMechain", {
14
+ timestamp
15
+ });
16
+ onStep?.({ type: "taskCreated", taskId });
17
+ const responses = [];
18
+ for (let i = 0; i < requiredAttestors; i++) {
19
+ onStep?.({ type: "attestorRequested", host: hosts[i] });
20
+ const client2 = new AttestorClient({
21
+ url: hosts[i]
16
22
  });
17
- onStep === null || onStep === void 0 ? void 0 : onStep({ type: 'taskCreated', taskId });
18
- const responses = [];
19
- for (let i = 0; i < requiredAttestors; i++) {
20
- onStep === null || onStep === void 0 ? void 0 : onStep({ type: 'attestorRequested', host: hosts[i] });
21
- const client = new client_2.AttestorClient({
22
- url: hosts[i]
23
- });
24
- const claimTunnelRes = await createClaimOnAttestor({
25
- ...opts,
26
- client
27
- });
28
- responses.push(claimTunnelRes);
29
- }
30
- return { taskId, responses };
23
+ const claimTunnelRes = await createClaimOnAttestor({
24
+ ...opts,
25
+ client: client2
26
+ });
27
+ responses.push(claimTunnelRes);
28
+ }
29
+ return { taskId, responses };
31
30
  }
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWNsYWltLW9uLW1lY2hhaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbWVjaGFpbi9jbGllbnQvY3JlYXRlLWNsYWltLW9uLW1lY2hhaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFTQSxvREEwQ0M7QUFuREQsdUNBQXVHO0FBQ3ZHLHVDQUEyQztBQUszQzs7R0FFRztBQUNJLEtBQUssVUFBVSxvQkFBb0IsQ0FBeUIsRUFDbEUscUJBQXFCLEdBQUcsOEJBQXNCLEVBQzlDLE1BQU0sRUFDTixNQUFNLEVBQ04sR0FBRyxJQUFJLEVBQ3NCO0lBRzdCLE1BQU0sYUFBYSxHQUFHLElBQUEsa0NBQXlCLEVBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBRTNELE1BQU0sU0FBUyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBQyxDQUFBO0lBRS9DLE1BQU0sYUFBYSxDQUFDLFdBQVcsRUFBRSxDQUFBO0lBRWpDLE1BQU0sYUFBTixNQUFNLHVCQUFOLE1BQU0sQ0FBRyxFQUFFLElBQUksRUFBRSxlQUFlLEVBQUUsU0FBUyxFQUFFLENBQUMsQ0FBQTtJQUU5QyxNQUFNLEVBQUUsTUFBTSxFQUFFLGlCQUFpQixFQUFFLEtBQUssRUFBRSxHQUFHLE1BQU0sYUFBYSxDQUFDLEdBQUcsQ0FBQyxxQkFBcUIsRUFBRTtRQUMzRixTQUFTLEVBQUUsU0FBUztLQUNwQixDQUFDLENBQUE7SUFFRixNQUFNLGFBQU4sTUFBTSx1QkFBTixNQUFNLENBQUcsRUFBRSxJQUFJLEVBQUUsYUFBYSxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUE7SUFFekMsTUFBTSxTQUFTLEdBQTJCLEVBQUUsQ0FBQTtJQUU1QyxLQUFJLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsaUJBQWlCLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQztRQUUzQyxNQUFNLGFBQU4sTUFBTSx1QkFBTixNQUFNLENBQUcsRUFBRSxJQUFJLEVBQUUsbUJBQW1CLEVBQUUsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUE7UUFFdkQsTUFBTSxNQUFNLEdBQUcsSUFBSSx1QkFBYyxDQUFDO1lBQ2pDLEdBQUcsRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFDO1NBQ2IsQ0FBQyxDQUFBO1FBRUYsTUFBTSxjQUFjLEdBQUcsTUFBTSxxQkFBcUIsQ0FBRTtZQUNuRCxHQUFHLElBQUk7WUFDUCxNQUFNO1NBQ04sQ0FBQyxDQUFBO1FBRUYsU0FBUyxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQTtJQUMvQixDQUFDO0lBRUQsT0FBTyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsQ0FBQTtBQUU3QixDQUFDIn0=
31
+ export {
32
+ createClaimOnMechain
33
+ };
@@ -1 +1 @@
1
- export * from './create-claim-on-mechain';
1
+ export * from './create-claim-on-mechain.ts';
@@ -1,18 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./create-claim-on-mechain"), exports);
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbWVjaGFpbi9jbGllbnQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDREQUF5QyJ9
1
+ export * from "./create-claim-on-mechain.js";
@@ -1,7 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RPC_URL = exports.GOVERNANCE_CONTRACT_ADDRESS = exports.TASK_CONTRACT_ADDRESS = void 0;
4
- exports.TASK_CONTRACT_ADDRESS = '0xB51FCb41fF11e0445600f63D8c38f955DcCB0B2c';
5
- exports.GOVERNANCE_CONTRACT_ADDRESS = '0x4A79C4fBe6c2F849D0fD4da8c24214491BaF41cd';
6
- exports.RPC_URL = 'https://testnet-rpc.mechain.tech';
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbWVjaGFpbi9jb25zdGFudHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxxQkFBcUIsR0FBRyw0Q0FBNEMsQ0FBQTtBQUVwRSxRQUFBLDJCQUEyQixHQUFHLDRDQUE0QyxDQUFBO0FBRTFFLFFBQUEsT0FBTyxHQUFHLGtDQUFrQyxDQUFBIn0=
1
+ const TASK_CONTRACT_ADDRESS = "0xB51FCb41fF11e0445600f63D8c38f955DcCB0B2c";
2
+ const GOVERNANCE_CONTRACT_ADDRESS = "0x4A79C4fBe6c2F849D0fD4da8c24214491BaF41cd";
3
+ const RPC_URL = "https://testnet-rpc.mechain.tech";
4
+ export {
5
+ GOVERNANCE_CONTRACT_ADDRESS,
6
+ RPC_URL,
7
+ TASK_CONTRACT_ADDRESS
8
+ };
@@ -1,2 +1,2 @@
1
- export * from './client';
2
- export * from './types';
1
+ export * from './client/index.ts';
2
+ export * from './types/index.ts';
@@ -1,19 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client"), exports);
18
- __exportStar(require("./types"), exports);
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbWVjaGFpbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsMkNBQXdCO0FBQ3hCLDBDQUF1QiJ9
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -1,5 +1,5 @@
1
- import type { createClaimOnAttestor } from '../../client';
2
- import type { CreateClaimOnAttestorOpts, ProviderName } from '../../types';
1
+ import type { createClaimOnAttestor } from '#src/client/index.ts';
2
+ import type { CreateClaimOnAttestorOpts, ProviderName } from '#src/types/index.ts';
3
3
  export type CreateClaimOnMechainStep = {
4
4
  type: 'taskRequested';
5
5
  timestamp: number;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbWVjaGFpbi90eXBlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -1,78 +1,131 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  export declare const protobufPackage = "reclaim_attestor";
3
- export declare enum TranscriptMessageSenderType {
4
- TRANSCRIPT_MESSAGE_SENDER_TYPE_UNKNOWN = 0,
5
- TRANSCRIPT_MESSAGE_SENDER_TYPE_CLIENT = 1,
6
- TRANSCRIPT_MESSAGE_SENDER_TYPE_SERVER = 2,
7
- UNRECOGNIZED = -1
3
+ export declare const TranscriptMessageSenderType: {
4
+ readonly TRANSCRIPT_MESSAGE_SENDER_TYPE_UNKNOWN: 0;
5
+ readonly TRANSCRIPT_MESSAGE_SENDER_TYPE_CLIENT: 1;
6
+ readonly TRANSCRIPT_MESSAGE_SENDER_TYPE_SERVER: 2;
7
+ readonly UNRECOGNIZED: -1;
8
+ };
9
+ export type TranscriptMessageSenderType = typeof TranscriptMessageSenderType[keyof typeof TranscriptMessageSenderType];
10
+ export declare namespace TranscriptMessageSenderType {
11
+ type TRANSCRIPT_MESSAGE_SENDER_TYPE_UNKNOWN = typeof TranscriptMessageSenderType.TRANSCRIPT_MESSAGE_SENDER_TYPE_UNKNOWN;
12
+ type TRANSCRIPT_MESSAGE_SENDER_TYPE_CLIENT = typeof TranscriptMessageSenderType.TRANSCRIPT_MESSAGE_SENDER_TYPE_CLIENT;
13
+ type TRANSCRIPT_MESSAGE_SENDER_TYPE_SERVER = typeof TranscriptMessageSenderType.TRANSCRIPT_MESSAGE_SENDER_TYPE_SERVER;
14
+ type UNRECOGNIZED = typeof TranscriptMessageSenderType.UNRECOGNIZED;
8
15
  }
9
16
  export declare function transcriptMessageSenderTypeFromJSON(object: any): TranscriptMessageSenderType;
10
17
  export declare function transcriptMessageSenderTypeToJSON(object: TranscriptMessageSenderType): string;
11
- export declare enum ServiceSignatureType {
12
- SERVICE_SIGNATURE_TYPE_UNKNOWN = 0,
18
+ export declare const ServiceSignatureType: {
19
+ readonly SERVICE_SIGNATURE_TYPE_UNKNOWN: 0;
13
20
  /**
14
21
  * SERVICE_SIGNATURE_TYPE_ETH - ETH keys & signature
15
22
  * keys: secp256k1
16
23
  * signature: ethereum flavor of ECDSA (https://goethereumbook.org/signature-generate/)
17
24
  */
18
- SERVICE_SIGNATURE_TYPE_ETH = 1,
19
- UNRECOGNIZED = -1
25
+ readonly SERVICE_SIGNATURE_TYPE_ETH: 1;
26
+ readonly UNRECOGNIZED: -1;
27
+ };
28
+ export type ServiceSignatureType = typeof ServiceSignatureType[keyof typeof ServiceSignatureType];
29
+ export declare namespace ServiceSignatureType {
30
+ type SERVICE_SIGNATURE_TYPE_UNKNOWN = typeof ServiceSignatureType.SERVICE_SIGNATURE_TYPE_UNKNOWN;
31
+ type SERVICE_SIGNATURE_TYPE_ETH = typeof ServiceSignatureType.SERVICE_SIGNATURE_TYPE_ETH;
32
+ type UNRECOGNIZED = typeof ServiceSignatureType.UNRECOGNIZED;
20
33
  }
21
34
  export declare function serviceSignatureTypeFromJSON(object: any): ServiceSignatureType;
22
35
  export declare function serviceSignatureTypeToJSON(object: ServiceSignatureType): string;
23
- export declare enum AttestorVersion {
24
- ATTESTOR_VERSION_UNKNOWN = 0,
25
- ATTESTOR_VERSION_1_0_0 = 1,
26
- ATTESTOR_VERSION_1_1_0 = 2,
27
- ATTESTOR_VERSION_2_0_0 = 3,
28
- ATTESTOR_VERSION_2_0_1 = 4,
29
- UNRECOGNIZED = -1
36
+ export declare const AttestorVersion: {
37
+ readonly ATTESTOR_VERSION_UNKNOWN: 0;
38
+ readonly ATTESTOR_VERSION_1_0_0: 1;
39
+ readonly ATTESTOR_VERSION_1_1_0: 2;
40
+ readonly ATTESTOR_VERSION_2_0_0: 3;
41
+ readonly ATTESTOR_VERSION_2_0_1: 4;
42
+ readonly ATTESTOR_VERSION_3_0_0: 5;
43
+ readonly UNRECOGNIZED: -1;
44
+ };
45
+ export type AttestorVersion = typeof AttestorVersion[keyof typeof AttestorVersion];
46
+ export declare namespace AttestorVersion {
47
+ type ATTESTOR_VERSION_UNKNOWN = typeof AttestorVersion.ATTESTOR_VERSION_UNKNOWN;
48
+ type ATTESTOR_VERSION_1_0_0 = typeof AttestorVersion.ATTESTOR_VERSION_1_0_0;
49
+ type ATTESTOR_VERSION_1_1_0 = typeof AttestorVersion.ATTESTOR_VERSION_1_1_0;
50
+ type ATTESTOR_VERSION_2_0_0 = typeof AttestorVersion.ATTESTOR_VERSION_2_0_0;
51
+ type ATTESTOR_VERSION_2_0_1 = typeof AttestorVersion.ATTESTOR_VERSION_2_0_1;
52
+ type ATTESTOR_VERSION_3_0_0 = typeof AttestorVersion.ATTESTOR_VERSION_3_0_0;
53
+ type UNRECOGNIZED = typeof AttestorVersion.UNRECOGNIZED;
30
54
  }
31
55
  export declare function attestorVersionFromJSON(object: any): AttestorVersion;
32
56
  export declare function attestorVersionToJSON(object: AttestorVersion): string;
33
- export declare enum ErrorCode {
57
+ export declare const ErrorCode: {
34
58
  /**
35
59
  * ERROR_NO_ERROR - 0 should be treated as the absence of an error
36
60
  * should be used when gracefully closing the connection
37
61
  */
38
- ERROR_NO_ERROR = 0,
62
+ readonly ERROR_NO_ERROR: 0;
39
63
  /**
40
64
  * ERROR_INTERNAL - internal error in the attestor -- all "Error/TypeError"
41
65
  * messages are mapped to this
42
66
  */
43
- ERROR_INTERNAL = 1,
67
+ readonly ERROR_INTERNAL: 1;
44
68
  /** ERROR_BAD_REQUEST - bad request from the client */
45
- ERROR_BAD_REQUEST = 2,
69
+ readonly ERROR_BAD_REQUEST: 2;
46
70
  /** ERROR_NOT_FOUND - the item requested was not found */
47
- ERROR_NOT_FOUND = 3,
71
+ readonly ERROR_NOT_FOUND: 3;
48
72
  /** ERROR_PROXY_ERROR - error in the proxy */
49
- ERROR_PROXY_ERROR = 4,
73
+ readonly ERROR_PROXY_ERROR: 4;
50
74
  /**
51
75
  * ERROR_INVALID_CLAIM - claim creation failed -- i.e. the transcript
52
76
  * did not result in a valid claim
53
77
  */
54
- ERROR_INVALID_CLAIM = 5,
78
+ readonly ERROR_INVALID_CLAIM: 5;
55
79
  /** ERROR_NETWORK_ERROR - any network error */
56
- ERROR_NETWORK_ERROR = 6,
80
+ readonly ERROR_NETWORK_ERROR: 6;
57
81
  /** ERROR_PAYMENT_REFUSED - attestor refused to pay the costs */
58
- ERROR_PAYMENT_REFUSED = 7,
82
+ readonly ERROR_PAYMENT_REFUSED: 7;
59
83
  /**
60
84
  * ERROR_BGP_ANNOUNCEMENT_OVERLAP - BGP announcement overlapped, potentially
61
85
  * compromising the claim's authenticity
62
86
  */
63
- ERROR_BGP_ANNOUNCEMENT_OVERLAP = 8,
87
+ readonly ERROR_BGP_ANNOUNCEMENT_OVERLAP: 8;
64
88
  /** ERROR_AUTHENTICATION_FAILED - authentication failed */
65
- ERROR_AUTHENTICATION_FAILED = 9,
89
+ readonly ERROR_AUTHENTICATION_FAILED: 9;
66
90
  /** ERROR_TIMEOUT - timed out waiting for the server to respond */
67
- ERROR_TIMEOUT = 10,
68
- UNRECOGNIZED = -1
91
+ readonly ERROR_TIMEOUT: 10;
92
+ /** ERROR_TOPRF_OUT_OF_BOUNDS - toprf couldn't be computed, as it went out of bounds */
93
+ readonly ERROR_TOPRF_OUT_OF_BOUNDS: 11;
94
+ /** ERROR_CERTIFICATE_FETCH_FAILED - failed to fetch certificate bytes from the URL */
95
+ readonly ERROR_CERTIFICATE_FETCH_FAILED: 12;
96
+ readonly UNRECOGNIZED: -1;
97
+ };
98
+ export type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];
99
+ export declare namespace ErrorCode {
100
+ type ERROR_NO_ERROR = typeof ErrorCode.ERROR_NO_ERROR;
101
+ type ERROR_INTERNAL = typeof ErrorCode.ERROR_INTERNAL;
102
+ type ERROR_BAD_REQUEST = typeof ErrorCode.ERROR_BAD_REQUEST;
103
+ type ERROR_NOT_FOUND = typeof ErrorCode.ERROR_NOT_FOUND;
104
+ type ERROR_PROXY_ERROR = typeof ErrorCode.ERROR_PROXY_ERROR;
105
+ type ERROR_INVALID_CLAIM = typeof ErrorCode.ERROR_INVALID_CLAIM;
106
+ type ERROR_NETWORK_ERROR = typeof ErrorCode.ERROR_NETWORK_ERROR;
107
+ type ERROR_PAYMENT_REFUSED = typeof ErrorCode.ERROR_PAYMENT_REFUSED;
108
+ type ERROR_BGP_ANNOUNCEMENT_OVERLAP = typeof ErrorCode.ERROR_BGP_ANNOUNCEMENT_OVERLAP;
109
+ type ERROR_AUTHENTICATION_FAILED = typeof ErrorCode.ERROR_AUTHENTICATION_FAILED;
110
+ type ERROR_TIMEOUT = typeof ErrorCode.ERROR_TIMEOUT;
111
+ type ERROR_TOPRF_OUT_OF_BOUNDS = typeof ErrorCode.ERROR_TOPRF_OUT_OF_BOUNDS;
112
+ type ERROR_CERTIFICATE_FETCH_FAILED = typeof ErrorCode.ERROR_CERTIFICATE_FETCH_FAILED;
113
+ type UNRECOGNIZED = typeof ErrorCode.UNRECOGNIZED;
69
114
  }
70
115
  export declare function errorCodeFromJSON(object: any): ErrorCode;
71
116
  export declare function errorCodeToJSON(object: ErrorCode): string;
72
- export declare enum ZKProofEngine {
73
- ZK_ENGINE_SNARKJS = 0,
74
- ZK_ENGINE_GNARK = 1,
75
- UNRECOGNIZED = -1
117
+ export declare const ZKProofEngine: {
118
+ readonly ZK_ENGINE_SNARKJS: 0;
119
+ readonly ZK_ENGINE_GNARK: 1;
120
+ readonly ZK_ENGINE_STWO: 2;
121
+ readonly UNRECOGNIZED: -1;
122
+ };
123
+ export type ZKProofEngine = typeof ZKProofEngine[keyof typeof ZKProofEngine];
124
+ export declare namespace ZKProofEngine {
125
+ type ZK_ENGINE_SNARKJS = typeof ZKProofEngine.ZK_ENGINE_SNARKJS;
126
+ type ZK_ENGINE_GNARK = typeof ZKProofEngine.ZK_ENGINE_GNARK;
127
+ type ZK_ENGINE_STWO = typeof ZKProofEngine.ZK_ENGINE_STWO;
128
+ type UNRECOGNIZED = typeof ZKProofEngine.UNRECOGNIZED;
76
129
  }
77
130
  export declare function zKProofEngineFromJSON(object: any): ZKProofEngine;
78
131
  export declare function zKProofEngineToJSON(object: ZKProofEngine): string;
@@ -156,6 +209,23 @@ export interface CreateTunnelRequest {
156
209
  * eg. US, IN, GB, etc.
157
210
  */
158
211
  geoLocation: string;
212
+ /**
213
+ * Session identifier for proxy IP persistence.
214
+ *
215
+ * When provided, ensures all requests within the same session
216
+ * are routed through the same proxy IP address. Useful for
217
+ * maintaining IP consistency across multiple requests.
218
+ *
219
+ * Can be a smallcase alphanumeric string of length 8-14 characters.
220
+ * eg. "mystring12345", "something1234".
221
+ */
222
+ proxySessionId: string;
223
+ }
224
+ export interface FetchCertificateBytesRequest {
225
+ url: string;
226
+ }
227
+ export interface FetchCertificateBytesResponse {
228
+ bytes: Uint8Array;
159
229
  }
160
230
  export interface DisconnectTunnelRequest {
161
231
  id: number;
@@ -196,13 +266,22 @@ export interface MessageReveal_MessageRevealDirect {
196
266
  }
197
267
  export interface MessageReveal_MessageRevealZk {
198
268
  proofs: MessageReveal_ZKProof[];
199
- }
200
- export interface MessageReveal_ZKProof {
269
+ toprfs: MessageReveal_TOPRFProof[];
270
+ /** Markers for server-side OPRF computation (oprf-raw mode) */
271
+ oprfRawMarkers: MessageReveal_OPRFRawMarker[];
201
272
  /**
202
- * JSON encoded snarkJS proof
203
- * @deprecated -- use `proofData` instead
273
+ * If an oprf-raw marker from the previous packet overshot into this packet,
274
+ * this indicates how many bytes of plaintext from this packet should be
275
+ * collected to complete the server-side OPRF computation.
204
276
  */
205
- proofJson: string;
277
+ overshotOprfRawLength: number;
278
+ }
279
+ /** Marker for server-side OPRF computation (oprf-raw mode). */
280
+ export interface MessageReveal_OPRFRawMarker {
281
+ /** Location of the data to OPRF in the revealed plaintext */
282
+ dataLocation: DataSlice | undefined;
283
+ }
284
+ export interface MessageReveal_ZKProof {
206
285
  /** the decrypted ciphertext as output by the ZK proof */
207
286
  decryptedRedactedCiphertext: Uint8Array;
208
287
  /** the plaintext that is fully or partially revealed */
@@ -213,11 +292,19 @@ export interface MessageReveal_ZKProof {
213
292
  */
214
293
  startIdx: number;
215
294
  proofData: Uint8Array;
295
+ }
296
+ export interface MessageReveal_TOPRFProof {
297
+ /**
298
+ * start of this specific block
299
+ * in the redactedPlaintext
300
+ */
301
+ startIdx: number;
302
+ proofData: Uint8Array;
216
303
  /**
217
304
  * If this block's proof contains an OPRF'd piece of data,
218
305
  * then provide the OPRF data here
219
306
  */
220
- toprf: TOPRFPayload | undefined;
307
+ payload: TOPRFPayload | undefined;
221
308
  }
222
309
  export interface TOPRFPayload {
223
310
  /** Location of the data in the chunk that was masked */
@@ -246,6 +333,42 @@ export interface ClaimRequestData {
246
333
  timestampS: number;
247
334
  context: string;
248
335
  }
336
+ export interface ClaimTeeBundleRequest {
337
+ /** TEE verification bundle containing attestations and signed data */
338
+ verificationBundle: Uint8Array;
339
+ /** Data describing the claim you want to prove */
340
+ data: ClaimRequestData | undefined;
341
+ /** User signature on the request */
342
+ signatures: ClaimTeeBundleRequest_Signatures | undefined;
343
+ }
344
+ export interface ClaimTeeBundleRequest_Signatures {
345
+ /**
346
+ * Signature of ClaimTeeBundleRequest
347
+ * with empty "signatures" field
348
+ */
349
+ requestSignature: Uint8Array;
350
+ }
351
+ export interface ClaimTeeBundleResponse {
352
+ /** The original request that was made */
353
+ request: ClaimTeeBundleRequest | undefined;
354
+ claim?: ProviderClaimData | undefined;
355
+ error?: ErrorData | undefined;
356
+ signatures: ClaimTeeBundleResponse_Signatures | undefined;
357
+ }
358
+ export interface ClaimTeeBundleResponse_Signatures {
359
+ /** Address of the attestor that has signed the claim */
360
+ attestorAddress: string;
361
+ /**
362
+ * Signature of `stringifyProviderClaimData(claim)`,
363
+ * if the claim was successful
364
+ */
365
+ claimSignature: Uint8Array;
366
+ /**
367
+ * Signature of the complete ClaimTeeBundleResponse
368
+ * structure with empty "signatures" field
369
+ */
370
+ resultSignature: Uint8Array;
371
+ }
249
372
  export interface ClaimTunnelRequest {
250
373
  /**
251
374
  * parameters supplied to establish the tunnel
@@ -379,6 +502,8 @@ export interface InitRequest {
379
502
  }
380
503
  export interface InitResponse {
381
504
  toprfPublicKey: Uint8Array;
505
+ /** Address of the attestor */
506
+ attestorAddress: string;
382
507
  }
383
508
  export interface TOPRFRequest {
384
509
  maskedData: Uint8Array;
@@ -453,6 +578,16 @@ export interface RPCMessage {
453
578
  /** Request the attestor to create a Task on the ReclaimTask contract. */
454
579
  createTaskOnMechainRequest?: CreateTaskOnMechainRequest | undefined;
455
580
  createTaskOnMechainResponse?: CreateTaskOnMechainResponse | undefined;
581
+ /** Claim a TEE verification bundle instead of traditional TLS transcript */
582
+ claimTeeBundleRequest?: ClaimTeeBundleRequest | undefined;
583
+ claimTeeBundleResponse?: ClaimTeeBundleResponse | undefined;
584
+ /**
585
+ * Request the attestor to fetch certificate bytes from a URL. This RPC
586
+ * is there as a helper for clients that cannot directly fetch certificates
587
+ * due to network restrictions.
588
+ */
589
+ fetchCertificateBytesRequest?: FetchCertificateBytesRequest | undefined;
590
+ fetchCertificateBytesResponse?: FetchCertificateBytesResponse | undefined;
456
591
  }
457
592
  export interface RPCMessages {
458
593
  messages: RPCMessage[];
@@ -463,6 +598,8 @@ export declare const ProviderClaimData: MessageFns<ProviderClaimData>;
463
598
  export declare const ProviderClaimInfo: MessageFns<ProviderClaimInfo>;
464
599
  export declare const ErrorData: MessageFns<ErrorData>;
465
600
  export declare const CreateTunnelRequest: MessageFns<CreateTunnelRequest>;
601
+ export declare const FetchCertificateBytesRequest: MessageFns<FetchCertificateBytesRequest>;
602
+ export declare const FetchCertificateBytesResponse: MessageFns<FetchCertificateBytesResponse>;
466
603
  export declare const DisconnectTunnelRequest: MessageFns<DisconnectTunnelRequest>;
467
604
  export declare const Empty: MessageFns<Empty>;
468
605
  export declare const TunnelMessage: MessageFns<TunnelMessage>;
@@ -470,10 +607,16 @@ export declare const TunnelDisconnectEvent: MessageFns<TunnelDisconnectEvent>;
470
607
  export declare const MessageReveal: MessageFns<MessageReveal>;
471
608
  export declare const MessageReveal_MessageRevealDirect: MessageFns<MessageReveal_MessageRevealDirect>;
472
609
  export declare const MessageReveal_MessageRevealZk: MessageFns<MessageReveal_MessageRevealZk>;
610
+ export declare const MessageReveal_OPRFRawMarker: MessageFns<MessageReveal_OPRFRawMarker>;
473
611
  export declare const MessageReveal_ZKProof: MessageFns<MessageReveal_ZKProof>;
612
+ export declare const MessageReveal_TOPRFProof: MessageFns<MessageReveal_TOPRFProof>;
474
613
  export declare const TOPRFPayload: MessageFns<TOPRFPayload>;
475
614
  export declare const DataSlice: MessageFns<DataSlice>;
476
615
  export declare const ClaimRequestData: MessageFns<ClaimRequestData>;
616
+ export declare const ClaimTeeBundleRequest: MessageFns<ClaimTeeBundleRequest>;
617
+ export declare const ClaimTeeBundleRequest_Signatures: MessageFns<ClaimTeeBundleRequest_Signatures>;
618
+ export declare const ClaimTeeBundleResponse: MessageFns<ClaimTeeBundleResponse>;
619
+ export declare const ClaimTeeBundleResponse_Signatures: MessageFns<ClaimTeeBundleResponse_Signatures>;
477
620
  export declare const ClaimTunnelRequest: MessageFns<ClaimTunnelRequest>;
478
621
  export declare const ClaimTunnelRequest_Signatures: MessageFns<ClaimTunnelRequest_Signatures>;
479
622
  export declare const ClaimTunnelRequest_TranscriptMessage: MessageFns<ClaimTunnelRequest_TranscriptMessage>;