@reclaimprotocol/attestor-core 5.0.1-beta.2 → 5.0.1-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/resources/attestor-browser.min.mjs +4512 -0
- package/lib/avs/abis/avsDirectoryABI.js +338 -341
- package/lib/avs/abis/delegationABI.js +1 -4
- package/lib/avs/abis/registryABI.js +719 -722
- package/lib/avs/client/create-claim-on-avs.js +129 -157
- package/lib/avs/config.js +18 -24
- package/lib/avs/contracts/ReclaimServiceManager.js +1 -0
- package/lib/avs/contracts/common.js +1 -0
- package/lib/avs/contracts/factories/ReclaimServiceManager__factory.js +1139 -1156
- package/lib/avs/contracts/factories/index.js +4 -4
- package/lib/avs/contracts/index.js +2 -6
- package/lib/avs/types/index.js +1 -0
- package/lib/avs/utils/contracts.js +30 -50
- package/lib/avs/utils/register.js +75 -70
- package/lib/avs/utils/tasks.js +38 -45
- package/lib/client/create-claim.js +402 -431
- package/lib/client/tunnels/make-rpc-tcp-tunnel.js +46 -48
- package/lib/client/tunnels/make-rpc-tls-tunnel.js +125 -121
- package/lib/client/utils/attestor-pool.js +23 -22
- package/lib/client/utils/client-socket.js +86 -109
- package/lib/client/utils/message-handler.js +79 -89
- package/lib/config/index.js +40 -58
- package/lib/external-rpc/benchmark.js +61 -74
- package/lib/external-rpc/event-bus.js +12 -15
- package/lib/external-rpc/handle-incoming-msg.js +216 -225
- package/lib/external-rpc/jsc-polyfills/1.js +70 -68
- package/lib/external-rpc/jsc-polyfills/2.js +17 -12
- package/lib/external-rpc/jsc-polyfills/event.js +10 -15
- package/lib/external-rpc/jsc-polyfills/index.js +2 -2
- package/lib/external-rpc/jsc-polyfills/ws.js +77 -79
- package/lib/external-rpc/setup-browser.js +28 -28
- package/lib/external-rpc/setup-jsc.js +17 -17
- package/lib/external-rpc/types.js +1 -0
- package/lib/external-rpc/utils.js +89 -89
- package/lib/external-rpc/zk.js +55 -50
- package/lib/index.js +2 -6
- package/lib/mechain/abis/governanceABI.js +457 -460
- package/lib/mechain/abis/taskABI.js +502 -505
- package/lib/mechain/client/create-claim-on-mechain.js +24 -29
- package/lib/mechain/constants/index.js +3 -8
- package/lib/mechain/types/index.js +1 -0
- package/lib/proto/api.js +4200 -4087
- package/lib/proto/tee-bundle.js +1261 -1241
- package/lib/providers/http/index.js +616 -603
- package/lib/providers/http/patch-parse5-tree.js +27 -29
- package/lib/providers/http/utils.js +289 -248
- package/lib/providers/index.js +3 -6
- package/lib/server/create-server.js +89 -91
- package/lib/server/handlers/claimTeeBundle.js +231 -211
- package/lib/server/handlers/claimTunnel.js +66 -73
- package/lib/server/handlers/completeClaimOnChain.js +20 -25
- package/lib/server/handlers/createClaimOnChain.js +21 -27
- package/lib/server/handlers/createTaskOnMechain.js +40 -50
- package/lib/server/handlers/createTunnel.js +85 -90
- package/lib/server/handlers/disconnectTunnel.js +4 -7
- package/lib/server/handlers/fetchCertificateBytes.js +37 -53
- package/lib/server/handlers/index.js +21 -24
- package/lib/server/handlers/init.js +27 -28
- package/lib/server/handlers/toprf.js +13 -16
- package/lib/server/socket.js +97 -100
- package/lib/server/tunnels/make-tcp-tunnel.js +161 -186
- package/lib/server/utils/apm.js +32 -25
- package/lib/server/utils/assert-valid-claim-request.js +305 -334
- package/lib/server/utils/config-env.js +2 -2
- package/lib/server/utils/dns.js +12 -18
- package/lib/server/utils/gcp-attestation.js +233 -181
- package/lib/server/utils/generics.d.ts +1 -1
- package/lib/server/utils/generics.js +43 -37
- package/lib/server/utils/iso.js +253 -256
- package/lib/server/utils/keep-alive.js +36 -36
- package/lib/server/utils/nitro-attestation.js +295 -220
- package/lib/server/utils/oprf-raw.js +48 -55
- package/lib/server/utils/process-handshake.js +200 -218
- package/lib/server/utils/proxy-session.js +5 -5
- package/lib/server/utils/tee-oprf-mpc-verification.js +82 -78
- package/lib/server/utils/tee-oprf-verification.js +165 -142
- package/lib/server/utils/tee-transcript-reconstruction.js +176 -129
- package/lib/server/utils/tee-verification.js +397 -334
- package/lib/server/utils/validation.js +30 -37
- package/lib/types/bgp.js +1 -0
- package/lib/types/claims.js +1 -0
- package/lib/types/client.js +1 -0
- package/lib/types/general.js +1 -0
- package/lib/types/handlers.js +1 -0
- package/lib/types/providers.d.ts +3 -2
- package/lib/types/providers.gen.js +9 -15
- package/lib/types/providers.js +1 -0
- package/lib/types/rpc.js +1 -0
- package/lib/types/signatures.d.ts +1 -2
- package/lib/types/signatures.js +1 -0
- package/lib/types/tunnel.js +1 -0
- package/lib/types/zk.js +1 -0
- package/lib/utils/auth.js +54 -66
- package/lib/utils/b64-json.js +15 -15
- package/lib/utils/bgp-listener.js +107 -111
- package/lib/utils/claims.js +89 -80
- package/lib/utils/env.js +13 -17
- package/lib/utils/error.js +43 -47
- package/lib/utils/generics.js +284 -235
- package/lib/utils/http-parser.js +232 -187
- package/lib/utils/logger.js +80 -71
- package/lib/utils/prepare-packets.js +69 -67
- package/lib/utils/redactions.js +163 -121
- package/lib/utils/retries.js +22 -24
- package/lib/utils/signatures/eth.js +29 -28
- package/lib/utils/signatures/index.js +5 -10
- package/lib/utils/socket-base.js +84 -88
- package/lib/utils/tls.js +28 -28
- package/lib/utils/ws.js +19 -19
- package/lib/utils/zk.js +542 -582
- package/package.json +12 -5
- package/lib/external-rpc/global.d.js +0 -0
- package/lib/scripts/build-browser.d.ts +0 -1
- package/lib/scripts/build-jsc.d.ts +0 -1
- package/lib/scripts/build-lib.d.ts +0 -1
- package/lib/scripts/check-avs-registration.d.ts +0 -1
- package/lib/scripts/check-avs-registration.js +0 -28
- package/lib/scripts/fallbacks/crypto.d.ts +0 -1
- package/lib/scripts/fallbacks/crypto.js +0 -4
- package/lib/scripts/fallbacks/empty.d.ts +0 -3
- package/lib/scripts/fallbacks/empty.js +0 -4
- package/lib/scripts/fallbacks/re2.d.ts +0 -1
- package/lib/scripts/fallbacks/re2.js +0 -7
- package/lib/scripts/fallbacks/snarkjs.d.ts +0 -1
- package/lib/scripts/fallbacks/snarkjs.js +0 -10
- package/lib/scripts/fallbacks/stwo.d.ts +0 -6
- package/lib/scripts/fallbacks/stwo.js +0 -159
- package/lib/scripts/generate-provider-types.d.ts +0 -5
- package/lib/scripts/generate-provider-types.js +0 -101
- package/lib/scripts/generate-receipt.d.ts +0 -9
- package/lib/scripts/generate-receipt.js +0 -101
- package/lib/scripts/generate-toprf-keys.d.ts +0 -1
- package/lib/scripts/generate-toprf-keys.js +0 -24
- package/lib/scripts/jsc-cli-rpc.d.ts +0 -1
- package/lib/scripts/jsc-cli-rpc.js +0 -35
- package/lib/scripts/register-avs-operator.d.ts +0 -1
- package/lib/scripts/register-avs-operator.js +0 -3
- package/lib/scripts/start-server.d.ts +0 -1
- package/lib/scripts/start-server.js +0 -11
- package/lib/scripts/update-avs-metadata.d.ts +0 -1
- package/lib/scripts/update-avs-metadata.js +0 -20
- package/lib/scripts/utils.d.ts +0 -1
- package/lib/scripts/utils.js +0 -10
- package/lib/scripts/whitelist-operator.d.ts +0 -1
- package/lib/scripts/whitelist-operator.js +0 -16
package/lib/proto/tee-bundle.js
CHANGED
|
@@ -1,1296 +1,1316 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.5.0
|
|
4
|
+
// protoc v6.31.1
|
|
5
|
+
// source: tee-bundle.proto
|
|
6
|
+
/* eslint-disable */
|
|
1
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
const protobufPackage = "teeproto";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
export const protobufPackage = "teeproto";
|
|
9
|
+
/** Signature wrapper used everywhere */
|
|
10
|
+
export const BodyType = {
|
|
11
|
+
BODY_TYPE_UNSPECIFIED: 0,
|
|
12
|
+
BODY_TYPE_K_OUTPUT: 1,
|
|
13
|
+
BODY_TYPE_T_OUTPUT: 2,
|
|
14
|
+
UNRECOGNIZED: -1,
|
|
8
15
|
};
|
|
9
|
-
function bodyTypeFromJSON(object) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
export function bodyTypeFromJSON(object) {
|
|
17
|
+
switch (object) {
|
|
18
|
+
case 0:
|
|
19
|
+
case "BODY_TYPE_UNSPECIFIED":
|
|
20
|
+
return BodyType.BODY_TYPE_UNSPECIFIED;
|
|
21
|
+
case 1:
|
|
22
|
+
case "BODY_TYPE_K_OUTPUT":
|
|
23
|
+
return BodyType.BODY_TYPE_K_OUTPUT;
|
|
24
|
+
case 2:
|
|
25
|
+
case "BODY_TYPE_T_OUTPUT":
|
|
26
|
+
return BodyType.BODY_TYPE_T_OUTPUT;
|
|
27
|
+
case -1:
|
|
28
|
+
case "UNRECOGNIZED":
|
|
29
|
+
default:
|
|
30
|
+
return BodyType.UNRECOGNIZED;
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
|
-
function bodyTypeToJSON(object) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
export function bodyTypeToJSON(object) {
|
|
34
|
+
switch (object) {
|
|
35
|
+
case BodyType.BODY_TYPE_UNSPECIFIED:
|
|
36
|
+
return "BODY_TYPE_UNSPECIFIED";
|
|
37
|
+
case BodyType.BODY_TYPE_K_OUTPUT:
|
|
38
|
+
return "BODY_TYPE_K_OUTPUT";
|
|
39
|
+
case BodyType.BODY_TYPE_T_OUTPUT:
|
|
40
|
+
return "BODY_TYPE_T_OUTPUT";
|
|
41
|
+
case BodyType.UNRECOGNIZED:
|
|
42
|
+
default:
|
|
43
|
+
return "UNRECOGNIZED";
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
46
|
function createBaseRequestRedactionRange() {
|
|
40
|
-
|
|
47
|
+
return { start: 0, length: 0, type: "" };
|
|
41
48
|
}
|
|
42
|
-
const RequestRedactionRange = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
49
|
+
export const RequestRedactionRange = {
|
|
50
|
+
encode(message, writer = new BinaryWriter()) {
|
|
51
|
+
if (message.start !== 0) {
|
|
52
|
+
writer.uint32(8).int32(message.start);
|
|
53
|
+
}
|
|
54
|
+
if (message.length !== 0) {
|
|
55
|
+
writer.uint32(16).int32(message.length);
|
|
56
|
+
}
|
|
57
|
+
if (message.type !== "") {
|
|
58
|
+
writer.uint32(26).string(message.type);
|
|
59
|
+
}
|
|
60
|
+
return writer;
|
|
61
|
+
},
|
|
62
|
+
decode(input, length) {
|
|
63
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
64
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
65
|
+
const message = createBaseRequestRedactionRange();
|
|
66
|
+
while (reader.pos < end) {
|
|
67
|
+
const tag = reader.uint32();
|
|
68
|
+
switch (tag >>> 3) {
|
|
69
|
+
case 1: {
|
|
70
|
+
if (tag !== 8) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
message.start = reader.int32();
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
case 2: {
|
|
77
|
+
if (tag !== 16) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
message.length = reader.int32();
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
case 3: {
|
|
84
|
+
if (tag !== 26) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
message.type = reader.string();
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
reader.skip(tag & 7);
|
|
95
|
+
}
|
|
96
|
+
return message;
|
|
97
|
+
},
|
|
98
|
+
fromJSON(object) {
|
|
99
|
+
return {
|
|
100
|
+
start: isSet(object.start) ? globalThis.Number(object.start) : 0,
|
|
101
|
+
length: isSet(object.length) ? globalThis.Number(object.length) : 0,
|
|
102
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
toJSON(message) {
|
|
106
|
+
const obj = {};
|
|
107
|
+
if (message.start !== 0) {
|
|
108
|
+
obj.start = Math.round(message.start);
|
|
109
|
+
}
|
|
110
|
+
if (message.length !== 0) {
|
|
111
|
+
obj.length = Math.round(message.length);
|
|
112
|
+
}
|
|
113
|
+
if (message.type !== "") {
|
|
114
|
+
obj.type = message.type;
|
|
115
|
+
}
|
|
116
|
+
return obj;
|
|
117
|
+
},
|
|
118
|
+
create(base) {
|
|
119
|
+
return RequestRedactionRange.fromPartial(base ?? {});
|
|
120
|
+
},
|
|
121
|
+
fromPartial(object) {
|
|
122
|
+
const message = createBaseRequestRedactionRange();
|
|
123
|
+
message.start = object.start ?? 0;
|
|
124
|
+
message.length = object.length ?? 0;
|
|
125
|
+
message.type = object.type ?? "";
|
|
126
|
+
return message;
|
|
127
|
+
},
|
|
121
128
|
};
|
|
122
129
|
function createBaseResponseRedactionRange() {
|
|
123
|
-
|
|
130
|
+
return { start: 0, length: 0 };
|
|
124
131
|
}
|
|
125
|
-
const ResponseRedactionRange = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
132
|
+
export const ResponseRedactionRange = {
|
|
133
|
+
encode(message, writer = new BinaryWriter()) {
|
|
134
|
+
if (message.start !== 0) {
|
|
135
|
+
writer.uint32(8).int32(message.start);
|
|
136
|
+
}
|
|
137
|
+
if (message.length !== 0) {
|
|
138
|
+
writer.uint32(16).int32(message.length);
|
|
139
|
+
}
|
|
140
|
+
return writer;
|
|
141
|
+
},
|
|
142
|
+
decode(input, length) {
|
|
143
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
144
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
145
|
+
const message = createBaseResponseRedactionRange();
|
|
146
|
+
while (reader.pos < end) {
|
|
147
|
+
const tag = reader.uint32();
|
|
148
|
+
switch (tag >>> 3) {
|
|
149
|
+
case 1: {
|
|
150
|
+
if (tag !== 8) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
message.start = reader.int32();
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
case 2: {
|
|
157
|
+
if (tag !== 16) {
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
message.length = reader.int32();
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
reader.skip(tag & 7);
|
|
168
|
+
}
|
|
169
|
+
return message;
|
|
170
|
+
},
|
|
171
|
+
fromJSON(object) {
|
|
172
|
+
return {
|
|
173
|
+
start: isSet(object.start) ? globalThis.Number(object.start) : 0,
|
|
174
|
+
length: isSet(object.length) ? globalThis.Number(object.length) : 0,
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
toJSON(message) {
|
|
178
|
+
const obj = {};
|
|
179
|
+
if (message.start !== 0) {
|
|
180
|
+
obj.start = Math.round(message.start);
|
|
181
|
+
}
|
|
182
|
+
if (message.length !== 0) {
|
|
183
|
+
obj.length = Math.round(message.length);
|
|
184
|
+
}
|
|
185
|
+
return obj;
|
|
186
|
+
},
|
|
187
|
+
create(base) {
|
|
188
|
+
return ResponseRedactionRange.fromPartial(base ?? {});
|
|
189
|
+
},
|
|
190
|
+
fromPartial(object) {
|
|
191
|
+
const message = createBaseResponseRedactionRange();
|
|
192
|
+
message.start = object.start ?? 0;
|
|
193
|
+
message.length = object.length ?? 0;
|
|
194
|
+
return message;
|
|
195
|
+
},
|
|
189
196
|
};
|
|
190
197
|
function createBaseSignedRedactedDecryptionStream() {
|
|
191
|
-
|
|
198
|
+
return { redactedStream: new Uint8Array(0), seqNum: 0 };
|
|
192
199
|
}
|
|
193
|
-
const SignedRedactedDecryptionStream = {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
200
|
+
export const SignedRedactedDecryptionStream = {
|
|
201
|
+
encode(message, writer = new BinaryWriter()) {
|
|
202
|
+
if (message.redactedStream.length !== 0) {
|
|
203
|
+
writer.uint32(10).bytes(message.redactedStream);
|
|
204
|
+
}
|
|
205
|
+
if (message.seqNum !== 0) {
|
|
206
|
+
writer.uint32(16).uint64(message.seqNum);
|
|
207
|
+
}
|
|
208
|
+
return writer;
|
|
209
|
+
},
|
|
210
|
+
decode(input, length) {
|
|
211
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
212
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
213
|
+
const message = createBaseSignedRedactedDecryptionStream();
|
|
214
|
+
while (reader.pos < end) {
|
|
215
|
+
const tag = reader.uint32();
|
|
216
|
+
switch (tag >>> 3) {
|
|
217
|
+
case 1: {
|
|
218
|
+
if (tag !== 10) {
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
message.redactedStream = reader.bytes();
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
case 2: {
|
|
225
|
+
if (tag !== 16) {
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
message.seqNum = longToNumber(reader.uint64());
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
reader.skip(tag & 7);
|
|
236
|
+
}
|
|
237
|
+
return message;
|
|
238
|
+
},
|
|
239
|
+
fromJSON(object) {
|
|
240
|
+
return {
|
|
241
|
+
redactedStream: isSet(object.redactedStream) ? bytesFromBase64(object.redactedStream) : new Uint8Array(0),
|
|
242
|
+
seqNum: isSet(object.seqNum) ? globalThis.Number(object.seqNum) : 0,
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
toJSON(message) {
|
|
246
|
+
const obj = {};
|
|
247
|
+
if (message.redactedStream.length !== 0) {
|
|
248
|
+
obj.redactedStream = base64FromBytes(message.redactedStream);
|
|
249
|
+
}
|
|
250
|
+
if (message.seqNum !== 0) {
|
|
251
|
+
obj.seqNum = Math.round(message.seqNum);
|
|
252
|
+
}
|
|
253
|
+
return obj;
|
|
254
|
+
},
|
|
255
|
+
create(base) {
|
|
256
|
+
return SignedRedactedDecryptionStream.fromPartial(base ?? {});
|
|
257
|
+
},
|
|
258
|
+
fromPartial(object) {
|
|
259
|
+
const message = createBaseSignedRedactedDecryptionStream();
|
|
260
|
+
message.redactedStream = object.redactedStream ?? new Uint8Array(0);
|
|
261
|
+
message.seqNum = object.seqNum ?? 0;
|
|
262
|
+
return message;
|
|
263
|
+
},
|
|
257
264
|
};
|
|
258
265
|
function createBaseCertificateInfo() {
|
|
259
|
-
|
|
266
|
+
return { commonName: "", issuerCommonName: "", notBeforeUnix: 0, notAfterUnix: 0, dnsNames: [] };
|
|
260
267
|
}
|
|
261
|
-
const CertificateInfo = {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
268
|
+
export const CertificateInfo = {
|
|
269
|
+
encode(message, writer = new BinaryWriter()) {
|
|
270
|
+
if (message.commonName !== "") {
|
|
271
|
+
writer.uint32(10).string(message.commonName);
|
|
272
|
+
}
|
|
273
|
+
if (message.issuerCommonName !== "") {
|
|
274
|
+
writer.uint32(18).string(message.issuerCommonName);
|
|
275
|
+
}
|
|
276
|
+
if (message.notBeforeUnix !== 0) {
|
|
277
|
+
writer.uint32(24).uint64(message.notBeforeUnix);
|
|
278
|
+
}
|
|
279
|
+
if (message.notAfterUnix !== 0) {
|
|
280
|
+
writer.uint32(32).uint64(message.notAfterUnix);
|
|
281
|
+
}
|
|
282
|
+
for (const v of message.dnsNames) {
|
|
283
|
+
writer.uint32(42).string(v);
|
|
284
|
+
}
|
|
285
|
+
return writer;
|
|
286
|
+
},
|
|
287
|
+
decode(input, length) {
|
|
288
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
289
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
290
|
+
const message = createBaseCertificateInfo();
|
|
291
|
+
while (reader.pos < end) {
|
|
292
|
+
const tag = reader.uint32();
|
|
293
|
+
switch (tag >>> 3) {
|
|
294
|
+
case 1: {
|
|
295
|
+
if (tag !== 10) {
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
message.commonName = reader.string();
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
case 2: {
|
|
302
|
+
if (tag !== 18) {
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
message.issuerCommonName = reader.string();
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
case 3: {
|
|
309
|
+
if (tag !== 24) {
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
message.notBeforeUnix = longToNumber(reader.uint64());
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
case 4: {
|
|
316
|
+
if (tag !== 32) {
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
message.notAfterUnix = longToNumber(reader.uint64());
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
case 5: {
|
|
323
|
+
if (tag !== 42) {
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
message.dnsNames.push(reader.string());
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
reader.skip(tag & 7);
|
|
334
|
+
}
|
|
335
|
+
return message;
|
|
336
|
+
},
|
|
337
|
+
fromJSON(object) {
|
|
338
|
+
return {
|
|
339
|
+
commonName: isSet(object.commonName) ? globalThis.String(object.commonName) : "",
|
|
340
|
+
issuerCommonName: isSet(object.issuerCommonName) ? globalThis.String(object.issuerCommonName) : "",
|
|
341
|
+
notBeforeUnix: isSet(object.notBeforeUnix) ? globalThis.Number(object.notBeforeUnix) : 0,
|
|
342
|
+
notAfterUnix: isSet(object.notAfterUnix) ? globalThis.Number(object.notAfterUnix) : 0,
|
|
343
|
+
dnsNames: globalThis.Array.isArray(object?.dnsNames) ? object.dnsNames.map((e) => globalThis.String(e)) : [],
|
|
344
|
+
};
|
|
345
|
+
},
|
|
346
|
+
toJSON(message) {
|
|
347
|
+
const obj = {};
|
|
348
|
+
if (message.commonName !== "") {
|
|
349
|
+
obj.commonName = message.commonName;
|
|
350
|
+
}
|
|
351
|
+
if (message.issuerCommonName !== "") {
|
|
352
|
+
obj.issuerCommonName = message.issuerCommonName;
|
|
353
|
+
}
|
|
354
|
+
if (message.notBeforeUnix !== 0) {
|
|
355
|
+
obj.notBeforeUnix = Math.round(message.notBeforeUnix);
|
|
356
|
+
}
|
|
357
|
+
if (message.notAfterUnix !== 0) {
|
|
358
|
+
obj.notAfterUnix = Math.round(message.notAfterUnix);
|
|
359
|
+
}
|
|
360
|
+
if (message.dnsNames?.length) {
|
|
361
|
+
obj.dnsNames = message.dnsNames;
|
|
362
|
+
}
|
|
363
|
+
return obj;
|
|
364
|
+
},
|
|
365
|
+
create(base) {
|
|
366
|
+
return CertificateInfo.fromPartial(base ?? {});
|
|
367
|
+
},
|
|
368
|
+
fromPartial(object) {
|
|
369
|
+
const message = createBaseCertificateInfo();
|
|
370
|
+
message.commonName = object.commonName ?? "";
|
|
371
|
+
message.issuerCommonName = object.issuerCommonName ?? "";
|
|
372
|
+
message.notBeforeUnix = object.notBeforeUnix ?? 0;
|
|
373
|
+
message.notAfterUnix = object.notAfterUnix ?? 0;
|
|
374
|
+
message.dnsNames = object.dnsNames?.map((e) => e) || [];
|
|
375
|
+
return message;
|
|
376
|
+
},
|
|
370
377
|
};
|
|
371
378
|
function createBaseHandshakeSecrets() {
|
|
372
|
-
|
|
379
|
+
return { handshakeKey: new Uint8Array(0), handshakeIv: new Uint8Array(0), cipherSuite: 0, algorithm: "" };
|
|
373
380
|
}
|
|
374
|
-
const HandshakeSecrets = {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
381
|
+
export const HandshakeSecrets = {
|
|
382
|
+
encode(message, writer = new BinaryWriter()) {
|
|
383
|
+
if (message.handshakeKey.length !== 0) {
|
|
384
|
+
writer.uint32(10).bytes(message.handshakeKey);
|
|
385
|
+
}
|
|
386
|
+
if (message.handshakeIv.length !== 0) {
|
|
387
|
+
writer.uint32(18).bytes(message.handshakeIv);
|
|
388
|
+
}
|
|
389
|
+
if (message.cipherSuite !== 0) {
|
|
390
|
+
writer.uint32(24).uint32(message.cipherSuite);
|
|
391
|
+
}
|
|
392
|
+
if (message.algorithm !== "") {
|
|
393
|
+
writer.uint32(34).string(message.algorithm);
|
|
394
|
+
}
|
|
395
|
+
return writer;
|
|
396
|
+
},
|
|
397
|
+
decode(input, length) {
|
|
398
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
399
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
400
|
+
const message = createBaseHandshakeSecrets();
|
|
401
|
+
while (reader.pos < end) {
|
|
402
|
+
const tag = reader.uint32();
|
|
403
|
+
switch (tag >>> 3) {
|
|
404
|
+
case 1: {
|
|
405
|
+
if (tag !== 10) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
message.handshakeKey = reader.bytes();
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
case 2: {
|
|
412
|
+
if (tag !== 18) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
message.handshakeIv = reader.bytes();
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
case 3: {
|
|
419
|
+
if (tag !== 24) {
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
message.cipherSuite = reader.uint32();
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
case 4: {
|
|
426
|
+
if (tag !== 34) {
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
message.algorithm = reader.string();
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
reader.skip(tag & 7);
|
|
437
|
+
}
|
|
438
|
+
return message;
|
|
439
|
+
},
|
|
440
|
+
fromJSON(object) {
|
|
441
|
+
return {
|
|
442
|
+
handshakeKey: isSet(object.handshakeKey) ? bytesFromBase64(object.handshakeKey) : new Uint8Array(0),
|
|
443
|
+
handshakeIv: isSet(object.handshakeIv) ? bytesFromBase64(object.handshakeIv) : new Uint8Array(0),
|
|
444
|
+
cipherSuite: isSet(object.cipherSuite) ? globalThis.Number(object.cipherSuite) : 0,
|
|
445
|
+
algorithm: isSet(object.algorithm) ? globalThis.String(object.algorithm) : "",
|
|
446
|
+
};
|
|
447
|
+
},
|
|
448
|
+
toJSON(message) {
|
|
449
|
+
const obj = {};
|
|
450
|
+
if (message.handshakeKey.length !== 0) {
|
|
451
|
+
obj.handshakeKey = base64FromBytes(message.handshakeKey);
|
|
452
|
+
}
|
|
453
|
+
if (message.handshakeIv.length !== 0) {
|
|
454
|
+
obj.handshakeIv = base64FromBytes(message.handshakeIv);
|
|
455
|
+
}
|
|
456
|
+
if (message.cipherSuite !== 0) {
|
|
457
|
+
obj.cipherSuite = Math.round(message.cipherSuite);
|
|
458
|
+
}
|
|
459
|
+
if (message.algorithm !== "") {
|
|
460
|
+
obj.algorithm = message.algorithm;
|
|
461
|
+
}
|
|
462
|
+
return obj;
|
|
463
|
+
},
|
|
464
|
+
create(base) {
|
|
465
|
+
return HandshakeSecrets.fromPartial(base ?? {});
|
|
466
|
+
},
|
|
467
|
+
fromPartial(object) {
|
|
468
|
+
const message = createBaseHandshakeSecrets();
|
|
469
|
+
message.handshakeKey = object.handshakeKey ?? new Uint8Array(0);
|
|
470
|
+
message.handshakeIv = object.handshakeIv ?? new Uint8Array(0);
|
|
471
|
+
message.cipherSuite = object.cipherSuite ?? 0;
|
|
472
|
+
message.algorithm = object.algorithm ?? "";
|
|
473
|
+
return message;
|
|
474
|
+
},
|
|
468
475
|
};
|
|
469
476
|
function createBaseOpening() {
|
|
470
|
-
|
|
477
|
+
return { proofStream: new Uint8Array(0) };
|
|
471
478
|
}
|
|
472
|
-
const Opening = {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
479
|
+
export const Opening = {
|
|
480
|
+
encode(message, writer = new BinaryWriter()) {
|
|
481
|
+
if (message.proofStream.length !== 0) {
|
|
482
|
+
writer.uint32(10).bytes(message.proofStream);
|
|
483
|
+
}
|
|
484
|
+
return writer;
|
|
485
|
+
},
|
|
486
|
+
decode(input, length) {
|
|
487
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
488
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
489
|
+
const message = createBaseOpening();
|
|
490
|
+
while (reader.pos < end) {
|
|
491
|
+
const tag = reader.uint32();
|
|
492
|
+
switch (tag >>> 3) {
|
|
493
|
+
case 1: {
|
|
494
|
+
if (tag !== 10) {
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
message.proofStream = reader.bytes();
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
reader.skip(tag & 7);
|
|
505
|
+
}
|
|
506
|
+
return message;
|
|
507
|
+
},
|
|
508
|
+
fromJSON(object) {
|
|
509
|
+
return { proofStream: isSet(object.proofStream) ? bytesFromBase64(object.proofStream) : new Uint8Array(0) };
|
|
510
|
+
},
|
|
511
|
+
toJSON(message) {
|
|
512
|
+
const obj = {};
|
|
513
|
+
if (message.proofStream.length !== 0) {
|
|
514
|
+
obj.proofStream = base64FromBytes(message.proofStream);
|
|
515
|
+
}
|
|
516
|
+
return obj;
|
|
517
|
+
},
|
|
518
|
+
create(base) {
|
|
519
|
+
return Opening.fromPartial(base ?? {});
|
|
520
|
+
},
|
|
521
|
+
fromPartial(object) {
|
|
522
|
+
const message = createBaseOpening();
|
|
523
|
+
message.proofStream = object.proofStream ?? new Uint8Array(0);
|
|
524
|
+
return message;
|
|
525
|
+
},
|
|
519
526
|
};
|
|
520
527
|
function createBaseOPRFOutput() {
|
|
521
|
-
|
|
528
|
+
return { tlsStart: 0, tlsLength: 0, hashOutput: new Uint8Array(0) };
|
|
522
529
|
}
|
|
523
|
-
const OPRFOutput = {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
530
|
+
export const OPRFOutput = {
|
|
531
|
+
encode(message, writer = new BinaryWriter()) {
|
|
532
|
+
if (message.tlsStart !== 0) {
|
|
533
|
+
writer.uint32(8).int32(message.tlsStart);
|
|
534
|
+
}
|
|
535
|
+
if (message.tlsLength !== 0) {
|
|
536
|
+
writer.uint32(16).int32(message.tlsLength);
|
|
537
|
+
}
|
|
538
|
+
if (message.hashOutput.length !== 0) {
|
|
539
|
+
writer.uint32(26).bytes(message.hashOutput);
|
|
540
|
+
}
|
|
541
|
+
return writer;
|
|
542
|
+
},
|
|
543
|
+
decode(input, length) {
|
|
544
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
545
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
546
|
+
const message = createBaseOPRFOutput();
|
|
547
|
+
while (reader.pos < end) {
|
|
548
|
+
const tag = reader.uint32();
|
|
549
|
+
switch (tag >>> 3) {
|
|
550
|
+
case 1: {
|
|
551
|
+
if (tag !== 8) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
message.tlsStart = reader.int32();
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
case 2: {
|
|
558
|
+
if (tag !== 16) {
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
message.tlsLength = reader.int32();
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
case 3: {
|
|
565
|
+
if (tag !== 26) {
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
message.hashOutput = reader.bytes();
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
reader.skip(tag & 7);
|
|
576
|
+
}
|
|
577
|
+
return message;
|
|
578
|
+
},
|
|
579
|
+
fromJSON(object) {
|
|
580
|
+
return {
|
|
581
|
+
tlsStart: isSet(object.tlsStart) ? globalThis.Number(object.tlsStart) : 0,
|
|
582
|
+
tlsLength: isSet(object.tlsLength) ? globalThis.Number(object.tlsLength) : 0,
|
|
583
|
+
hashOutput: isSet(object.hashOutput) ? bytesFromBase64(object.hashOutput) : new Uint8Array(0),
|
|
584
|
+
};
|
|
585
|
+
},
|
|
586
|
+
toJSON(message) {
|
|
587
|
+
const obj = {};
|
|
588
|
+
if (message.tlsStart !== 0) {
|
|
589
|
+
obj.tlsStart = Math.round(message.tlsStart);
|
|
590
|
+
}
|
|
591
|
+
if (message.tlsLength !== 0) {
|
|
592
|
+
obj.tlsLength = Math.round(message.tlsLength);
|
|
593
|
+
}
|
|
594
|
+
if (message.hashOutput.length !== 0) {
|
|
595
|
+
obj.hashOutput = base64FromBytes(message.hashOutput);
|
|
596
|
+
}
|
|
597
|
+
return obj;
|
|
598
|
+
},
|
|
599
|
+
create(base) {
|
|
600
|
+
return OPRFOutput.fromPartial(base ?? {});
|
|
601
|
+
},
|
|
602
|
+
fromPartial(object) {
|
|
603
|
+
const message = createBaseOPRFOutput();
|
|
604
|
+
message.tlsStart = object.tlsStart ?? 0;
|
|
605
|
+
message.tlsLength = object.tlsLength ?? 0;
|
|
606
|
+
message.hashOutput = object.hashOutput ?? new Uint8Array(0);
|
|
607
|
+
return message;
|
|
608
|
+
},
|
|
602
609
|
};
|
|
603
610
|
function createBaseKOutputPayload() {
|
|
604
|
-
return {
|
|
605
|
-
redactedRequest: new Uint8Array(0),
|
|
606
|
-
requestRedactionRanges: [],
|
|
607
|
-
consolidatedResponseKeystream: new Uint8Array(0),
|
|
608
|
-
certificateInfo: void 0,
|
|
609
|
-
responseRedactionRanges: [],
|
|
610
|
-
timestampMs: 0,
|
|
611
|
-
sessionId: "",
|
|
612
|
-
oprfOutputs: []
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
const KOutputPayload = {
|
|
616
|
-
encode(message, writer = new BinaryWriter()) {
|
|
617
|
-
if (message.redactedRequest.length !== 0) {
|
|
618
|
-
writer.uint32(10).bytes(message.redactedRequest);
|
|
619
|
-
}
|
|
620
|
-
for (const v of message.requestRedactionRanges) {
|
|
621
|
-
RequestRedactionRange.encode(v, writer.uint32(18).fork()).join();
|
|
622
|
-
}
|
|
623
|
-
if (message.consolidatedResponseKeystream.length !== 0) {
|
|
624
|
-
writer.uint32(26).bytes(message.consolidatedResponseKeystream);
|
|
625
|
-
}
|
|
626
|
-
if (message.certificateInfo !== void 0) {
|
|
627
|
-
CertificateInfo.encode(message.certificateInfo, writer.uint32(34).fork()).join();
|
|
628
|
-
}
|
|
629
|
-
for (const v of message.responseRedactionRanges) {
|
|
630
|
-
ResponseRedactionRange.encode(v, writer.uint32(42).fork()).join();
|
|
631
|
-
}
|
|
632
|
-
if (message.timestampMs !== 0) {
|
|
633
|
-
writer.uint32(48).uint64(message.timestampMs);
|
|
634
|
-
}
|
|
635
|
-
if (message.sessionId !== "") {
|
|
636
|
-
writer.uint32(58).string(message.sessionId);
|
|
637
|
-
}
|
|
638
|
-
for (const v of message.oprfOutputs) {
|
|
639
|
-
OPRFOutput.encode(v, writer.uint32(82).fork()).join();
|
|
640
|
-
}
|
|
641
|
-
return writer;
|
|
642
|
-
},
|
|
643
|
-
decode(input, length) {
|
|
644
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
645
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
646
|
-
const message = createBaseKOutputPayload();
|
|
647
|
-
while (reader.pos < end) {
|
|
648
|
-
const tag = reader.uint32();
|
|
649
|
-
switch (tag >>> 3) {
|
|
650
|
-
case 1: {
|
|
651
|
-
if (tag !== 10) {
|
|
652
|
-
break;
|
|
653
|
-
}
|
|
654
|
-
message.redactedRequest = reader.bytes();
|
|
655
|
-
continue;
|
|
656
|
-
}
|
|
657
|
-
case 2: {
|
|
658
|
-
if (tag !== 18) {
|
|
659
|
-
break;
|
|
660
|
-
}
|
|
661
|
-
message.requestRedactionRanges.push(RequestRedactionRange.decode(reader, reader.uint32()));
|
|
662
|
-
continue;
|
|
663
|
-
}
|
|
664
|
-
case 3: {
|
|
665
|
-
if (tag !== 26) {
|
|
666
|
-
break;
|
|
667
|
-
}
|
|
668
|
-
message.consolidatedResponseKeystream = reader.bytes();
|
|
669
|
-
continue;
|
|
670
|
-
}
|
|
671
|
-
case 4: {
|
|
672
|
-
if (tag !== 34) {
|
|
673
|
-
break;
|
|
674
|
-
}
|
|
675
|
-
message.certificateInfo = CertificateInfo.decode(reader, reader.uint32());
|
|
676
|
-
continue;
|
|
677
|
-
}
|
|
678
|
-
case 5: {
|
|
679
|
-
if (tag !== 42) {
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
message.responseRedactionRanges.push(ResponseRedactionRange.decode(reader, reader.uint32()));
|
|
683
|
-
continue;
|
|
684
|
-
}
|
|
685
|
-
case 6: {
|
|
686
|
-
if (tag !== 48) {
|
|
687
|
-
break;
|
|
688
|
-
}
|
|
689
|
-
message.timestampMs = longToNumber(reader.uint64());
|
|
690
|
-
continue;
|
|
691
|
-
}
|
|
692
|
-
case 7: {
|
|
693
|
-
if (tag !== 58) {
|
|
694
|
-
break;
|
|
695
|
-
}
|
|
696
|
-
message.sessionId = reader.string();
|
|
697
|
-
continue;
|
|
698
|
-
}
|
|
699
|
-
case 10: {
|
|
700
|
-
if (tag !== 82) {
|
|
701
|
-
break;
|
|
702
|
-
}
|
|
703
|
-
message.oprfOutputs.push(OPRFOutput.decode(reader, reader.uint32()));
|
|
704
|
-
continue;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
708
|
-
break;
|
|
709
|
-
}
|
|
710
|
-
reader.skip(tag & 7);
|
|
711
|
-
}
|
|
712
|
-
return message;
|
|
713
|
-
},
|
|
714
|
-
fromJSON(object) {
|
|
715
611
|
return {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
612
|
+
redactedRequest: new Uint8Array(0),
|
|
613
|
+
requestRedactionRanges: [],
|
|
614
|
+
consolidatedResponseKeystream: new Uint8Array(0),
|
|
615
|
+
certificateInfo: undefined,
|
|
616
|
+
responseRedactionRanges: [],
|
|
617
|
+
timestampMs: 0,
|
|
618
|
+
sessionId: "",
|
|
619
|
+
oprfOutputs: [],
|
|
724
620
|
};
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
621
|
+
}
|
|
622
|
+
export const KOutputPayload = {
|
|
623
|
+
encode(message, writer = new BinaryWriter()) {
|
|
624
|
+
if (message.redactedRequest.length !== 0) {
|
|
625
|
+
writer.uint32(10).bytes(message.redactedRequest);
|
|
626
|
+
}
|
|
627
|
+
for (const v of message.requestRedactionRanges) {
|
|
628
|
+
RequestRedactionRange.encode(v, writer.uint32(18).fork()).join();
|
|
629
|
+
}
|
|
630
|
+
if (message.consolidatedResponseKeystream.length !== 0) {
|
|
631
|
+
writer.uint32(26).bytes(message.consolidatedResponseKeystream);
|
|
632
|
+
}
|
|
633
|
+
if (message.certificateInfo !== undefined) {
|
|
634
|
+
CertificateInfo.encode(message.certificateInfo, writer.uint32(34).fork()).join();
|
|
635
|
+
}
|
|
636
|
+
for (const v of message.responseRedactionRanges) {
|
|
637
|
+
ResponseRedactionRange.encode(v, writer.uint32(42).fork()).join();
|
|
638
|
+
}
|
|
639
|
+
if (message.timestampMs !== 0) {
|
|
640
|
+
writer.uint32(48).uint64(message.timestampMs);
|
|
641
|
+
}
|
|
642
|
+
if (message.sessionId !== "") {
|
|
643
|
+
writer.uint32(58).string(message.sessionId);
|
|
644
|
+
}
|
|
645
|
+
for (const v of message.oprfOutputs) {
|
|
646
|
+
OPRFOutput.encode(v, writer.uint32(82).fork()).join();
|
|
647
|
+
}
|
|
648
|
+
return writer;
|
|
649
|
+
},
|
|
650
|
+
decode(input, length) {
|
|
651
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
652
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
653
|
+
const message = createBaseKOutputPayload();
|
|
654
|
+
while (reader.pos < end) {
|
|
655
|
+
const tag = reader.uint32();
|
|
656
|
+
switch (tag >>> 3) {
|
|
657
|
+
case 1: {
|
|
658
|
+
if (tag !== 10) {
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
message.redactedRequest = reader.bytes();
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
case 2: {
|
|
665
|
+
if (tag !== 18) {
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
message.requestRedactionRanges.push(RequestRedactionRange.decode(reader, reader.uint32()));
|
|
669
|
+
continue;
|
|
670
|
+
}
|
|
671
|
+
case 3: {
|
|
672
|
+
if (tag !== 26) {
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
message.consolidatedResponseKeystream = reader.bytes();
|
|
676
|
+
continue;
|
|
677
|
+
}
|
|
678
|
+
case 4: {
|
|
679
|
+
if (tag !== 34) {
|
|
680
|
+
break;
|
|
681
|
+
}
|
|
682
|
+
message.certificateInfo = CertificateInfo.decode(reader, reader.uint32());
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
case 5: {
|
|
686
|
+
if (tag !== 42) {
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
message.responseRedactionRanges.push(ResponseRedactionRange.decode(reader, reader.uint32()));
|
|
690
|
+
continue;
|
|
691
|
+
}
|
|
692
|
+
case 6: {
|
|
693
|
+
if (tag !== 48) {
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
message.timestampMs = longToNumber(reader.uint64());
|
|
697
|
+
continue;
|
|
698
|
+
}
|
|
699
|
+
case 7: {
|
|
700
|
+
if (tag !== 58) {
|
|
701
|
+
break;
|
|
702
|
+
}
|
|
703
|
+
message.sessionId = reader.string();
|
|
704
|
+
continue;
|
|
705
|
+
}
|
|
706
|
+
case 10: {
|
|
707
|
+
if (tag !== 82) {
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
message.oprfOutputs.push(OPRFOutput.decode(reader, reader.uint32()));
|
|
711
|
+
continue;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
715
|
+
break;
|
|
716
|
+
}
|
|
717
|
+
reader.skip(tag & 7);
|
|
718
|
+
}
|
|
719
|
+
return message;
|
|
720
|
+
},
|
|
721
|
+
fromJSON(object) {
|
|
722
|
+
return {
|
|
723
|
+
redactedRequest: isSet(object.redactedRequest) ? bytesFromBase64(object.redactedRequest) : new Uint8Array(0),
|
|
724
|
+
requestRedactionRanges: globalThis.Array.isArray(object?.requestRedactionRanges)
|
|
725
|
+
? object.requestRedactionRanges.map((e) => RequestRedactionRange.fromJSON(e))
|
|
726
|
+
: [],
|
|
727
|
+
consolidatedResponseKeystream: isSet(object.consolidatedResponseKeystream)
|
|
728
|
+
? bytesFromBase64(object.consolidatedResponseKeystream)
|
|
729
|
+
: new Uint8Array(0),
|
|
730
|
+
certificateInfo: isSet(object.certificateInfo) ? CertificateInfo.fromJSON(object.certificateInfo) : undefined,
|
|
731
|
+
responseRedactionRanges: globalThis.Array.isArray(object?.responseRedactionRanges)
|
|
732
|
+
? object.responseRedactionRanges.map((e) => ResponseRedactionRange.fromJSON(e))
|
|
733
|
+
: [],
|
|
734
|
+
timestampMs: isSet(object.timestampMs) ? globalThis.Number(object.timestampMs) : 0,
|
|
735
|
+
sessionId: isSet(object.sessionId) ? globalThis.String(object.sessionId) : "",
|
|
736
|
+
oprfOutputs: globalThis.Array.isArray(object?.oprfOutputs)
|
|
737
|
+
? object.oprfOutputs.map((e) => OPRFOutput.fromJSON(e))
|
|
738
|
+
: [],
|
|
739
|
+
};
|
|
740
|
+
},
|
|
741
|
+
toJSON(message) {
|
|
742
|
+
const obj = {};
|
|
743
|
+
if (message.redactedRequest.length !== 0) {
|
|
744
|
+
obj.redactedRequest = base64FromBytes(message.redactedRequest);
|
|
745
|
+
}
|
|
746
|
+
if (message.requestRedactionRanges?.length) {
|
|
747
|
+
obj.requestRedactionRanges = message.requestRedactionRanges.map((e) => RequestRedactionRange.toJSON(e));
|
|
748
|
+
}
|
|
749
|
+
if (message.consolidatedResponseKeystream.length !== 0) {
|
|
750
|
+
obj.consolidatedResponseKeystream = base64FromBytes(message.consolidatedResponseKeystream);
|
|
751
|
+
}
|
|
752
|
+
if (message.certificateInfo !== undefined) {
|
|
753
|
+
obj.certificateInfo = CertificateInfo.toJSON(message.certificateInfo);
|
|
754
|
+
}
|
|
755
|
+
if (message.responseRedactionRanges?.length) {
|
|
756
|
+
obj.responseRedactionRanges = message.responseRedactionRanges.map((e) => ResponseRedactionRange.toJSON(e));
|
|
757
|
+
}
|
|
758
|
+
if (message.timestampMs !== 0) {
|
|
759
|
+
obj.timestampMs = Math.round(message.timestampMs);
|
|
760
|
+
}
|
|
761
|
+
if (message.sessionId !== "") {
|
|
762
|
+
obj.sessionId = message.sessionId;
|
|
763
|
+
}
|
|
764
|
+
if (message.oprfOutputs?.length) {
|
|
765
|
+
obj.oprfOutputs = message.oprfOutputs.map((e) => OPRFOutput.toJSON(e));
|
|
766
|
+
}
|
|
767
|
+
return obj;
|
|
768
|
+
},
|
|
769
|
+
create(base) {
|
|
770
|
+
return KOutputPayload.fromPartial(base ?? {});
|
|
771
|
+
},
|
|
772
|
+
fromPartial(object) {
|
|
773
|
+
const message = createBaseKOutputPayload();
|
|
774
|
+
message.redactedRequest = object.redactedRequest ?? new Uint8Array(0);
|
|
775
|
+
message.requestRedactionRanges = object.requestRedactionRanges?.map((e) => RequestRedactionRange.fromPartial(e)) ||
|
|
776
|
+
[];
|
|
777
|
+
message.consolidatedResponseKeystream = object.consolidatedResponseKeystream ?? new Uint8Array(0);
|
|
778
|
+
message.certificateInfo = (object.certificateInfo !== undefined && object.certificateInfo !== null)
|
|
779
|
+
? CertificateInfo.fromPartial(object.certificateInfo)
|
|
780
|
+
: undefined;
|
|
781
|
+
message.responseRedactionRanges =
|
|
782
|
+
object.responseRedactionRanges?.map((e) => ResponseRedactionRange.fromPartial(e)) || [];
|
|
783
|
+
message.timestampMs = object.timestampMs ?? 0;
|
|
784
|
+
message.sessionId = object.sessionId ?? "";
|
|
785
|
+
message.oprfOutputs = object.oprfOutputs?.map((e) => OPRFOutput.fromPartial(e)) || [];
|
|
786
|
+
return message;
|
|
787
|
+
},
|
|
769
788
|
};
|
|
770
789
|
function createBaseTOutputPayload() {
|
|
771
|
-
return {
|
|
772
|
-
consolidatedResponseCiphertext: new Uint8Array(0),
|
|
773
|
-
requestProofStreams: [],
|
|
774
|
-
timestampMs: 0,
|
|
775
|
-
sessionId: "",
|
|
776
|
-
oprfOutputs: []
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
const TOutputPayload = {
|
|
780
|
-
encode(message, writer = new BinaryWriter()) {
|
|
781
|
-
if (message.consolidatedResponseCiphertext.length !== 0) {
|
|
782
|
-
writer.uint32(10).bytes(message.consolidatedResponseCiphertext);
|
|
783
|
-
}
|
|
784
|
-
for (const v of message.requestProofStreams) {
|
|
785
|
-
writer.uint32(18).bytes(v);
|
|
786
|
-
}
|
|
787
|
-
if (message.timestampMs !== 0) {
|
|
788
|
-
writer.uint32(24).uint64(message.timestampMs);
|
|
789
|
-
}
|
|
790
|
-
if (message.sessionId !== "") {
|
|
791
|
-
writer.uint32(34).string(message.sessionId);
|
|
792
|
-
}
|
|
793
|
-
for (const v of message.oprfOutputs) {
|
|
794
|
-
OPRFOutput.encode(v, writer.uint32(82).fork()).join();
|
|
795
|
-
}
|
|
796
|
-
return writer;
|
|
797
|
-
},
|
|
798
|
-
decode(input, length) {
|
|
799
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
800
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
801
|
-
const message = createBaseTOutputPayload();
|
|
802
|
-
while (reader.pos < end) {
|
|
803
|
-
const tag = reader.uint32();
|
|
804
|
-
switch (tag >>> 3) {
|
|
805
|
-
case 1: {
|
|
806
|
-
if (tag !== 10) {
|
|
807
|
-
break;
|
|
808
|
-
}
|
|
809
|
-
message.consolidatedResponseCiphertext = reader.bytes();
|
|
810
|
-
continue;
|
|
811
|
-
}
|
|
812
|
-
case 2: {
|
|
813
|
-
if (tag !== 18) {
|
|
814
|
-
break;
|
|
815
|
-
}
|
|
816
|
-
message.requestProofStreams.push(reader.bytes());
|
|
817
|
-
continue;
|
|
818
|
-
}
|
|
819
|
-
case 3: {
|
|
820
|
-
if (tag !== 24) {
|
|
821
|
-
break;
|
|
822
|
-
}
|
|
823
|
-
message.timestampMs = longToNumber(reader.uint64());
|
|
824
|
-
continue;
|
|
825
|
-
}
|
|
826
|
-
case 4: {
|
|
827
|
-
if (tag !== 34) {
|
|
828
|
-
break;
|
|
829
|
-
}
|
|
830
|
-
message.sessionId = reader.string();
|
|
831
|
-
continue;
|
|
832
|
-
}
|
|
833
|
-
case 10: {
|
|
834
|
-
if (tag !== 82) {
|
|
835
|
-
break;
|
|
836
|
-
}
|
|
837
|
-
message.oprfOutputs.push(OPRFOutput.decode(reader, reader.uint32()));
|
|
838
|
-
continue;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
842
|
-
break;
|
|
843
|
-
}
|
|
844
|
-
reader.skip(tag & 7);
|
|
845
|
-
}
|
|
846
|
-
return message;
|
|
847
|
-
},
|
|
848
|
-
fromJSON(object) {
|
|
849
790
|
return {
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
791
|
+
consolidatedResponseCiphertext: new Uint8Array(0),
|
|
792
|
+
requestProofStreams: [],
|
|
793
|
+
timestampMs: 0,
|
|
794
|
+
sessionId: "",
|
|
795
|
+
oprfOutputs: [],
|
|
855
796
|
};
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
797
|
+
}
|
|
798
|
+
export const TOutputPayload = {
|
|
799
|
+
encode(message, writer = new BinaryWriter()) {
|
|
800
|
+
if (message.consolidatedResponseCiphertext.length !== 0) {
|
|
801
|
+
writer.uint32(10).bytes(message.consolidatedResponseCiphertext);
|
|
802
|
+
}
|
|
803
|
+
for (const v of message.requestProofStreams) {
|
|
804
|
+
writer.uint32(18).bytes(v);
|
|
805
|
+
}
|
|
806
|
+
if (message.timestampMs !== 0) {
|
|
807
|
+
writer.uint32(24).uint64(message.timestampMs);
|
|
808
|
+
}
|
|
809
|
+
if (message.sessionId !== "") {
|
|
810
|
+
writer.uint32(34).string(message.sessionId);
|
|
811
|
+
}
|
|
812
|
+
for (const v of message.oprfOutputs) {
|
|
813
|
+
OPRFOutput.encode(v, writer.uint32(82).fork()).join();
|
|
814
|
+
}
|
|
815
|
+
return writer;
|
|
816
|
+
},
|
|
817
|
+
decode(input, length) {
|
|
818
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
819
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
820
|
+
const message = createBaseTOutputPayload();
|
|
821
|
+
while (reader.pos < end) {
|
|
822
|
+
const tag = reader.uint32();
|
|
823
|
+
switch (tag >>> 3) {
|
|
824
|
+
case 1: {
|
|
825
|
+
if (tag !== 10) {
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
message.consolidatedResponseCiphertext = reader.bytes();
|
|
829
|
+
continue;
|
|
830
|
+
}
|
|
831
|
+
case 2: {
|
|
832
|
+
if (tag !== 18) {
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
message.requestProofStreams.push(reader.bytes());
|
|
836
|
+
continue;
|
|
837
|
+
}
|
|
838
|
+
case 3: {
|
|
839
|
+
if (tag !== 24) {
|
|
840
|
+
break;
|
|
841
|
+
}
|
|
842
|
+
message.timestampMs = longToNumber(reader.uint64());
|
|
843
|
+
continue;
|
|
844
|
+
}
|
|
845
|
+
case 4: {
|
|
846
|
+
if (tag !== 34) {
|
|
847
|
+
break;
|
|
848
|
+
}
|
|
849
|
+
message.sessionId = reader.string();
|
|
850
|
+
continue;
|
|
851
|
+
}
|
|
852
|
+
case 10: {
|
|
853
|
+
if (tag !== 82) {
|
|
854
|
+
break;
|
|
855
|
+
}
|
|
856
|
+
message.oprfOutputs.push(OPRFOutput.decode(reader, reader.uint32()));
|
|
857
|
+
continue;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
reader.skip(tag & 7);
|
|
864
|
+
}
|
|
865
|
+
return message;
|
|
866
|
+
},
|
|
867
|
+
fromJSON(object) {
|
|
868
|
+
return {
|
|
869
|
+
consolidatedResponseCiphertext: isSet(object.consolidatedResponseCiphertext)
|
|
870
|
+
? bytesFromBase64(object.consolidatedResponseCiphertext)
|
|
871
|
+
: new Uint8Array(0),
|
|
872
|
+
requestProofStreams: globalThis.Array.isArray(object?.requestProofStreams)
|
|
873
|
+
? object.requestProofStreams.map((e) => bytesFromBase64(e))
|
|
874
|
+
: [],
|
|
875
|
+
timestampMs: isSet(object.timestampMs) ? globalThis.Number(object.timestampMs) : 0,
|
|
876
|
+
sessionId: isSet(object.sessionId) ? globalThis.String(object.sessionId) : "",
|
|
877
|
+
oprfOutputs: globalThis.Array.isArray(object?.oprfOutputs)
|
|
878
|
+
? object.oprfOutputs.map((e) => OPRFOutput.fromJSON(e))
|
|
879
|
+
: [],
|
|
880
|
+
};
|
|
881
|
+
},
|
|
882
|
+
toJSON(message) {
|
|
883
|
+
const obj = {};
|
|
884
|
+
if (message.consolidatedResponseCiphertext.length !== 0) {
|
|
885
|
+
obj.consolidatedResponseCiphertext = base64FromBytes(message.consolidatedResponseCiphertext);
|
|
886
|
+
}
|
|
887
|
+
if (message.requestProofStreams?.length) {
|
|
888
|
+
obj.requestProofStreams = message.requestProofStreams.map((e) => base64FromBytes(e));
|
|
889
|
+
}
|
|
890
|
+
if (message.timestampMs !== 0) {
|
|
891
|
+
obj.timestampMs = Math.round(message.timestampMs);
|
|
892
|
+
}
|
|
893
|
+
if (message.sessionId !== "") {
|
|
894
|
+
obj.sessionId = message.sessionId;
|
|
895
|
+
}
|
|
896
|
+
if (message.oprfOutputs?.length) {
|
|
897
|
+
obj.oprfOutputs = message.oprfOutputs.map((e) => OPRFOutput.toJSON(e));
|
|
898
|
+
}
|
|
899
|
+
return obj;
|
|
900
|
+
},
|
|
901
|
+
create(base) {
|
|
902
|
+
return TOutputPayload.fromPartial(base ?? {});
|
|
903
|
+
},
|
|
904
|
+
fromPartial(object) {
|
|
905
|
+
const message = createBaseTOutputPayload();
|
|
906
|
+
message.consolidatedResponseCiphertext = object.consolidatedResponseCiphertext ?? new Uint8Array(0);
|
|
907
|
+
message.requestProofStreams = object.requestProofStreams?.map((e) => e) || [];
|
|
908
|
+
message.timestampMs = object.timestampMs ?? 0;
|
|
909
|
+
message.sessionId = object.sessionId ?? "";
|
|
910
|
+
message.oprfOutputs = object.oprfOutputs?.map((e) => OPRFOutput.fromPartial(e)) || [];
|
|
911
|
+
return message;
|
|
912
|
+
},
|
|
888
913
|
};
|
|
889
914
|
function createBaseAttestationReport() {
|
|
890
|
-
|
|
915
|
+
return { type: "", report: new Uint8Array(0) };
|
|
891
916
|
}
|
|
892
|
-
const AttestationReport = {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
917
|
+
export const AttestationReport = {
|
|
918
|
+
encode(message, writer = new BinaryWriter()) {
|
|
919
|
+
if (message.type !== "") {
|
|
920
|
+
writer.uint32(10).string(message.type);
|
|
921
|
+
}
|
|
922
|
+
if (message.report.length !== 0) {
|
|
923
|
+
writer.uint32(18).bytes(message.report);
|
|
924
|
+
}
|
|
925
|
+
return writer;
|
|
926
|
+
},
|
|
927
|
+
decode(input, length) {
|
|
928
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
929
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
930
|
+
const message = createBaseAttestationReport();
|
|
931
|
+
while (reader.pos < end) {
|
|
932
|
+
const tag = reader.uint32();
|
|
933
|
+
switch (tag >>> 3) {
|
|
934
|
+
case 1: {
|
|
935
|
+
if (tag !== 10) {
|
|
936
|
+
break;
|
|
937
|
+
}
|
|
938
|
+
message.type = reader.string();
|
|
939
|
+
continue;
|
|
940
|
+
}
|
|
941
|
+
case 2: {
|
|
942
|
+
if (tag !== 18) {
|
|
943
|
+
break;
|
|
944
|
+
}
|
|
945
|
+
message.report = reader.bytes();
|
|
946
|
+
continue;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
950
|
+
break;
|
|
951
|
+
}
|
|
952
|
+
reader.skip(tag & 7);
|
|
953
|
+
}
|
|
954
|
+
return message;
|
|
955
|
+
},
|
|
956
|
+
fromJSON(object) {
|
|
957
|
+
return {
|
|
958
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
959
|
+
report: isSet(object.report) ? bytesFromBase64(object.report) : new Uint8Array(0),
|
|
960
|
+
};
|
|
961
|
+
},
|
|
962
|
+
toJSON(message) {
|
|
963
|
+
const obj = {};
|
|
964
|
+
if (message.type !== "") {
|
|
965
|
+
obj.type = message.type;
|
|
966
|
+
}
|
|
967
|
+
if (message.report.length !== 0) {
|
|
968
|
+
obj.report = base64FromBytes(message.report);
|
|
969
|
+
}
|
|
970
|
+
return obj;
|
|
971
|
+
},
|
|
972
|
+
create(base) {
|
|
973
|
+
return AttestationReport.fromPartial(base ?? {});
|
|
974
|
+
},
|
|
975
|
+
fromPartial(object) {
|
|
976
|
+
const message = createBaseAttestationReport();
|
|
977
|
+
message.type = object.type ?? "";
|
|
978
|
+
message.report = object.report ?? new Uint8Array(0);
|
|
979
|
+
return message;
|
|
980
|
+
},
|
|
956
981
|
};
|
|
957
982
|
function createBaseSignedMessage() {
|
|
958
|
-
return {
|
|
959
|
-
bodyType: 0,
|
|
960
|
-
body: new Uint8Array(0),
|
|
961
|
-
ethAddress: new Uint8Array(0),
|
|
962
|
-
signature: new Uint8Array(0),
|
|
963
|
-
attestationReport: void 0
|
|
964
|
-
};
|
|
965
|
-
}
|
|
966
|
-
const SignedMessage = {
|
|
967
|
-
encode(message, writer = new BinaryWriter()) {
|
|
968
|
-
if (message.bodyType !== 0) {
|
|
969
|
-
writer.uint32(8).int32(message.bodyType);
|
|
970
|
-
}
|
|
971
|
-
if (message.body.length !== 0) {
|
|
972
|
-
writer.uint32(18).bytes(message.body);
|
|
973
|
-
}
|
|
974
|
-
if (message.ethAddress.length !== 0) {
|
|
975
|
-
writer.uint32(26).bytes(message.ethAddress);
|
|
976
|
-
}
|
|
977
|
-
if (message.signature.length !== 0) {
|
|
978
|
-
writer.uint32(34).bytes(message.signature);
|
|
979
|
-
}
|
|
980
|
-
if (message.attestationReport !== void 0) {
|
|
981
|
-
AttestationReport.encode(message.attestationReport, writer.uint32(42).fork()).join();
|
|
982
|
-
}
|
|
983
|
-
return writer;
|
|
984
|
-
},
|
|
985
|
-
decode(input, length) {
|
|
986
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
987
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
988
|
-
const message = createBaseSignedMessage();
|
|
989
|
-
while (reader.pos < end) {
|
|
990
|
-
const tag = reader.uint32();
|
|
991
|
-
switch (tag >>> 3) {
|
|
992
|
-
case 1: {
|
|
993
|
-
if (tag !== 8) {
|
|
994
|
-
break;
|
|
995
|
-
}
|
|
996
|
-
message.bodyType = reader.int32();
|
|
997
|
-
continue;
|
|
998
|
-
}
|
|
999
|
-
case 2: {
|
|
1000
|
-
if (tag !== 18) {
|
|
1001
|
-
break;
|
|
1002
|
-
}
|
|
1003
|
-
message.body = reader.bytes();
|
|
1004
|
-
continue;
|
|
1005
|
-
}
|
|
1006
|
-
case 3: {
|
|
1007
|
-
if (tag !== 26) {
|
|
1008
|
-
break;
|
|
1009
|
-
}
|
|
1010
|
-
message.ethAddress = reader.bytes();
|
|
1011
|
-
continue;
|
|
1012
|
-
}
|
|
1013
|
-
case 4: {
|
|
1014
|
-
if (tag !== 34) {
|
|
1015
|
-
break;
|
|
1016
|
-
}
|
|
1017
|
-
message.signature = reader.bytes();
|
|
1018
|
-
continue;
|
|
1019
|
-
}
|
|
1020
|
-
case 5: {
|
|
1021
|
-
if (tag !== 42) {
|
|
1022
|
-
break;
|
|
1023
|
-
}
|
|
1024
|
-
message.attestationReport = AttestationReport.decode(reader, reader.uint32());
|
|
1025
|
-
continue;
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1029
|
-
break;
|
|
1030
|
-
}
|
|
1031
|
-
reader.skip(tag & 7);
|
|
1032
|
-
}
|
|
1033
|
-
return message;
|
|
1034
|
-
},
|
|
1035
|
-
fromJSON(object) {
|
|
1036
983
|
return {
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
984
|
+
bodyType: 0,
|
|
985
|
+
body: new Uint8Array(0),
|
|
986
|
+
ethAddress: new Uint8Array(0),
|
|
987
|
+
signature: new Uint8Array(0),
|
|
988
|
+
attestationReport: undefined,
|
|
1042
989
|
};
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
990
|
+
}
|
|
991
|
+
export const SignedMessage = {
|
|
992
|
+
encode(message, writer = new BinaryWriter()) {
|
|
993
|
+
if (message.bodyType !== 0) {
|
|
994
|
+
writer.uint32(8).int32(message.bodyType);
|
|
995
|
+
}
|
|
996
|
+
if (message.body.length !== 0) {
|
|
997
|
+
writer.uint32(18).bytes(message.body);
|
|
998
|
+
}
|
|
999
|
+
if (message.ethAddress.length !== 0) {
|
|
1000
|
+
writer.uint32(26).bytes(message.ethAddress);
|
|
1001
|
+
}
|
|
1002
|
+
if (message.signature.length !== 0) {
|
|
1003
|
+
writer.uint32(34).bytes(message.signature);
|
|
1004
|
+
}
|
|
1005
|
+
if (message.attestationReport !== undefined) {
|
|
1006
|
+
AttestationReport.encode(message.attestationReport, writer.uint32(42).fork()).join();
|
|
1007
|
+
}
|
|
1008
|
+
return writer;
|
|
1009
|
+
},
|
|
1010
|
+
decode(input, length) {
|
|
1011
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1012
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1013
|
+
const message = createBaseSignedMessage();
|
|
1014
|
+
while (reader.pos < end) {
|
|
1015
|
+
const tag = reader.uint32();
|
|
1016
|
+
switch (tag >>> 3) {
|
|
1017
|
+
case 1: {
|
|
1018
|
+
if (tag !== 8) {
|
|
1019
|
+
break;
|
|
1020
|
+
}
|
|
1021
|
+
message.bodyType = reader.int32();
|
|
1022
|
+
continue;
|
|
1023
|
+
}
|
|
1024
|
+
case 2: {
|
|
1025
|
+
if (tag !== 18) {
|
|
1026
|
+
break;
|
|
1027
|
+
}
|
|
1028
|
+
message.body = reader.bytes();
|
|
1029
|
+
continue;
|
|
1030
|
+
}
|
|
1031
|
+
case 3: {
|
|
1032
|
+
if (tag !== 26) {
|
|
1033
|
+
break;
|
|
1034
|
+
}
|
|
1035
|
+
message.ethAddress = reader.bytes();
|
|
1036
|
+
continue;
|
|
1037
|
+
}
|
|
1038
|
+
case 4: {
|
|
1039
|
+
if (tag !== 34) {
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
message.signature = reader.bytes();
|
|
1043
|
+
continue;
|
|
1044
|
+
}
|
|
1045
|
+
case 5: {
|
|
1046
|
+
if (tag !== 42) {
|
|
1047
|
+
break;
|
|
1048
|
+
}
|
|
1049
|
+
message.attestationReport = AttestationReport.decode(reader, reader.uint32());
|
|
1050
|
+
continue;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1054
|
+
break;
|
|
1055
|
+
}
|
|
1056
|
+
reader.skip(tag & 7);
|
|
1057
|
+
}
|
|
1058
|
+
return message;
|
|
1059
|
+
},
|
|
1060
|
+
fromJSON(object) {
|
|
1061
|
+
return {
|
|
1062
|
+
bodyType: isSet(object.bodyType) ? bodyTypeFromJSON(object.bodyType) : 0,
|
|
1063
|
+
body: isSet(object.body) ? bytesFromBase64(object.body) : new Uint8Array(0),
|
|
1064
|
+
ethAddress: isSet(object.ethAddress) ? bytesFromBase64(object.ethAddress) : new Uint8Array(0),
|
|
1065
|
+
signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0),
|
|
1066
|
+
attestationReport: isSet(object.attestationReport)
|
|
1067
|
+
? AttestationReport.fromJSON(object.attestationReport)
|
|
1068
|
+
: undefined,
|
|
1069
|
+
};
|
|
1070
|
+
},
|
|
1071
|
+
toJSON(message) {
|
|
1072
|
+
const obj = {};
|
|
1073
|
+
if (message.bodyType !== 0) {
|
|
1074
|
+
obj.bodyType = bodyTypeToJSON(message.bodyType);
|
|
1075
|
+
}
|
|
1076
|
+
if (message.body.length !== 0) {
|
|
1077
|
+
obj.body = base64FromBytes(message.body);
|
|
1078
|
+
}
|
|
1079
|
+
if (message.ethAddress.length !== 0) {
|
|
1080
|
+
obj.ethAddress = base64FromBytes(message.ethAddress);
|
|
1081
|
+
}
|
|
1082
|
+
if (message.signature.length !== 0) {
|
|
1083
|
+
obj.signature = base64FromBytes(message.signature);
|
|
1084
|
+
}
|
|
1085
|
+
if (message.attestationReport !== undefined) {
|
|
1086
|
+
obj.attestationReport = AttestationReport.toJSON(message.attestationReport);
|
|
1087
|
+
}
|
|
1088
|
+
return obj;
|
|
1089
|
+
},
|
|
1090
|
+
create(base) {
|
|
1091
|
+
return SignedMessage.fromPartial(base ?? {});
|
|
1092
|
+
},
|
|
1093
|
+
fromPartial(object) {
|
|
1094
|
+
const message = createBaseSignedMessage();
|
|
1095
|
+
message.bodyType = object.bodyType ?? 0;
|
|
1096
|
+
message.body = object.body ?? new Uint8Array(0);
|
|
1097
|
+
message.ethAddress = object.ethAddress ?? new Uint8Array(0);
|
|
1098
|
+
message.signature = object.signature ?? new Uint8Array(0);
|
|
1099
|
+
message.attestationReport = (object.attestationReport !== undefined && object.attestationReport !== null)
|
|
1100
|
+
? AttestationReport.fromPartial(object.attestationReport)
|
|
1101
|
+
: undefined;
|
|
1102
|
+
return message;
|
|
1103
|
+
},
|
|
1075
1104
|
};
|
|
1076
1105
|
function createBaseOPRFVerificationData() {
|
|
1077
|
-
|
|
1106
|
+
return { streamPos: 0, streamLength: 0, publicSignalsJson: new Uint8Array(0) };
|
|
1078
1107
|
}
|
|
1079
|
-
const OPRFVerificationData = {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1108
|
+
export const OPRFVerificationData = {
|
|
1109
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1110
|
+
if (message.streamPos !== 0) {
|
|
1111
|
+
writer.uint32(8).uint32(message.streamPos);
|
|
1112
|
+
}
|
|
1113
|
+
if (message.streamLength !== 0) {
|
|
1114
|
+
writer.uint32(16).uint32(message.streamLength);
|
|
1115
|
+
}
|
|
1116
|
+
if (message.publicSignalsJson.length !== 0) {
|
|
1117
|
+
writer.uint32(26).bytes(message.publicSignalsJson);
|
|
1118
|
+
}
|
|
1119
|
+
return writer;
|
|
1120
|
+
},
|
|
1121
|
+
decode(input, length) {
|
|
1122
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1123
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1124
|
+
const message = createBaseOPRFVerificationData();
|
|
1125
|
+
while (reader.pos < end) {
|
|
1126
|
+
const tag = reader.uint32();
|
|
1127
|
+
switch (tag >>> 3) {
|
|
1128
|
+
case 1: {
|
|
1129
|
+
if (tag !== 8) {
|
|
1130
|
+
break;
|
|
1131
|
+
}
|
|
1132
|
+
message.streamPos = reader.uint32();
|
|
1133
|
+
continue;
|
|
1134
|
+
}
|
|
1135
|
+
case 2: {
|
|
1136
|
+
if (tag !== 16) {
|
|
1137
|
+
break;
|
|
1138
|
+
}
|
|
1139
|
+
message.streamLength = reader.uint32();
|
|
1140
|
+
continue;
|
|
1141
|
+
}
|
|
1142
|
+
case 3: {
|
|
1143
|
+
if (tag !== 26) {
|
|
1144
|
+
break;
|
|
1145
|
+
}
|
|
1146
|
+
message.publicSignalsJson = reader.bytes();
|
|
1147
|
+
continue;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1151
|
+
break;
|
|
1152
|
+
}
|
|
1153
|
+
reader.skip(tag & 7);
|
|
1154
|
+
}
|
|
1155
|
+
return message;
|
|
1156
|
+
},
|
|
1157
|
+
fromJSON(object) {
|
|
1158
|
+
return {
|
|
1159
|
+
streamPos: isSet(object.streamPos) ? globalThis.Number(object.streamPos) : 0,
|
|
1160
|
+
streamLength: isSet(object.streamLength) ? globalThis.Number(object.streamLength) : 0,
|
|
1161
|
+
publicSignalsJson: isSet(object.publicSignalsJson)
|
|
1162
|
+
? bytesFromBase64(object.publicSignalsJson)
|
|
1163
|
+
: new Uint8Array(0),
|
|
1164
|
+
};
|
|
1165
|
+
},
|
|
1166
|
+
toJSON(message) {
|
|
1167
|
+
const obj = {};
|
|
1168
|
+
if (message.streamPos !== 0) {
|
|
1169
|
+
obj.streamPos = Math.round(message.streamPos);
|
|
1170
|
+
}
|
|
1171
|
+
if (message.streamLength !== 0) {
|
|
1172
|
+
obj.streamLength = Math.round(message.streamLength);
|
|
1173
|
+
}
|
|
1174
|
+
if (message.publicSignalsJson.length !== 0) {
|
|
1175
|
+
obj.publicSignalsJson = base64FromBytes(message.publicSignalsJson);
|
|
1176
|
+
}
|
|
1177
|
+
return obj;
|
|
1178
|
+
},
|
|
1179
|
+
create(base) {
|
|
1180
|
+
return OPRFVerificationData.fromPartial(base ?? {});
|
|
1181
|
+
},
|
|
1182
|
+
fromPartial(object) {
|
|
1183
|
+
const message = createBaseOPRFVerificationData();
|
|
1184
|
+
message.streamPos = object.streamPos ?? 0;
|
|
1185
|
+
message.streamLength = object.streamLength ?? 0;
|
|
1186
|
+
message.publicSignalsJson = object.publicSignalsJson ?? new Uint8Array(0);
|
|
1187
|
+
return message;
|
|
1188
|
+
},
|
|
1158
1189
|
};
|
|
1159
1190
|
function createBaseVerificationBundle() {
|
|
1160
|
-
|
|
1191
|
+
return { teekSigned: undefined, teetSigned: undefined, oprfVerifications: [] };
|
|
1161
1192
|
}
|
|
1162
|
-
const VerificationBundle = {
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1193
|
+
export const VerificationBundle = {
|
|
1194
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1195
|
+
if (message.teekSigned !== undefined) {
|
|
1196
|
+
SignedMessage.encode(message.teekSigned, writer.uint32(10).fork()).join();
|
|
1197
|
+
}
|
|
1198
|
+
if (message.teetSigned !== undefined) {
|
|
1199
|
+
SignedMessage.encode(message.teetSigned, writer.uint32(18).fork()).join();
|
|
1200
|
+
}
|
|
1201
|
+
for (const v of message.oprfVerifications) {
|
|
1202
|
+
OPRFVerificationData.encode(v, writer.uint32(26).fork()).join();
|
|
1203
|
+
}
|
|
1204
|
+
return writer;
|
|
1205
|
+
},
|
|
1206
|
+
decode(input, length) {
|
|
1207
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1208
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1209
|
+
const message = createBaseVerificationBundle();
|
|
1210
|
+
while (reader.pos < end) {
|
|
1211
|
+
const tag = reader.uint32();
|
|
1212
|
+
switch (tag >>> 3) {
|
|
1213
|
+
case 1: {
|
|
1214
|
+
if (tag !== 10) {
|
|
1215
|
+
break;
|
|
1216
|
+
}
|
|
1217
|
+
message.teekSigned = SignedMessage.decode(reader, reader.uint32());
|
|
1218
|
+
continue;
|
|
1219
|
+
}
|
|
1220
|
+
case 2: {
|
|
1221
|
+
if (tag !== 18) {
|
|
1222
|
+
break;
|
|
1223
|
+
}
|
|
1224
|
+
message.teetSigned = SignedMessage.decode(reader, reader.uint32());
|
|
1225
|
+
continue;
|
|
1226
|
+
}
|
|
1227
|
+
case 3: {
|
|
1228
|
+
if (tag !== 26) {
|
|
1229
|
+
break;
|
|
1230
|
+
}
|
|
1231
|
+
message.oprfVerifications.push(OPRFVerificationData.decode(reader, reader.uint32()));
|
|
1232
|
+
continue;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1236
|
+
break;
|
|
1237
|
+
}
|
|
1238
|
+
reader.skip(tag & 7);
|
|
1239
|
+
}
|
|
1240
|
+
return message;
|
|
1241
|
+
},
|
|
1242
|
+
fromJSON(object) {
|
|
1243
|
+
return {
|
|
1244
|
+
teekSigned: isSet(object.teekSigned) ? SignedMessage.fromJSON(object.teekSigned) : undefined,
|
|
1245
|
+
teetSigned: isSet(object.teetSigned) ? SignedMessage.fromJSON(object.teetSigned) : undefined,
|
|
1246
|
+
oprfVerifications: globalThis.Array.isArray(object?.oprfVerifications)
|
|
1247
|
+
? object.oprfVerifications.map((e) => OPRFVerificationData.fromJSON(e))
|
|
1248
|
+
: [],
|
|
1249
|
+
};
|
|
1250
|
+
},
|
|
1251
|
+
toJSON(message) {
|
|
1252
|
+
const obj = {};
|
|
1253
|
+
if (message.teekSigned !== undefined) {
|
|
1254
|
+
obj.teekSigned = SignedMessage.toJSON(message.teekSigned);
|
|
1255
|
+
}
|
|
1256
|
+
if (message.teetSigned !== undefined) {
|
|
1257
|
+
obj.teetSigned = SignedMessage.toJSON(message.teetSigned);
|
|
1258
|
+
}
|
|
1259
|
+
if (message.oprfVerifications?.length) {
|
|
1260
|
+
obj.oprfVerifications = message.oprfVerifications.map((e) => OPRFVerificationData.toJSON(e));
|
|
1261
|
+
}
|
|
1262
|
+
return obj;
|
|
1263
|
+
},
|
|
1264
|
+
create(base) {
|
|
1265
|
+
return VerificationBundle.fromPartial(base ?? {});
|
|
1266
|
+
},
|
|
1267
|
+
fromPartial(object) {
|
|
1268
|
+
const message = createBaseVerificationBundle();
|
|
1269
|
+
message.teekSigned = (object.teekSigned !== undefined && object.teekSigned !== null)
|
|
1270
|
+
? SignedMessage.fromPartial(object.teekSigned)
|
|
1271
|
+
: undefined;
|
|
1272
|
+
message.teetSigned = (object.teetSigned !== undefined && object.teetSigned !== null)
|
|
1273
|
+
? SignedMessage.fromPartial(object.teetSigned)
|
|
1274
|
+
: undefined;
|
|
1275
|
+
message.oprfVerifications = object.oprfVerifications?.map((e) => OPRFVerificationData.fromPartial(e)) || [];
|
|
1276
|
+
return message;
|
|
1277
|
+
},
|
|
1241
1278
|
};
|
|
1242
1279
|
function bytesFromBase64(b64) {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1280
|
+
if (globalThis.Buffer) {
|
|
1281
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
const bin = globalThis.atob(b64);
|
|
1285
|
+
const arr = new Uint8Array(bin.length);
|
|
1286
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
1287
|
+
arr[i] = bin.charCodeAt(i);
|
|
1288
|
+
}
|
|
1289
|
+
return arr;
|
|
1250
1290
|
}
|
|
1251
|
-
return arr;
|
|
1252
|
-
}
|
|
1253
1291
|
}
|
|
1254
1292
|
function base64FromBytes(arr) {
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1293
|
+
if (globalThis.Buffer) {
|
|
1294
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
1295
|
+
}
|
|
1296
|
+
else {
|
|
1297
|
+
const bin = [];
|
|
1298
|
+
arr.forEach((byte) => {
|
|
1299
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
1300
|
+
});
|
|
1301
|
+
return globalThis.btoa(bin.join(""));
|
|
1302
|
+
}
|
|
1264
1303
|
}
|
|
1265
1304
|
function longToNumber(int64) {
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1305
|
+
const num = globalThis.Number(int64.toString());
|
|
1306
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1307
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1308
|
+
}
|
|
1309
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1310
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1311
|
+
}
|
|
1312
|
+
return num;
|
|
1274
1313
|
}
|
|
1275
1314
|
function isSet(value) {
|
|
1276
|
-
|
|
1315
|
+
return value !== null && value !== undefined;
|
|
1277
1316
|
}
|
|
1278
|
-
export {
|
|
1279
|
-
AttestationReport,
|
|
1280
|
-
BodyType,
|
|
1281
|
-
CertificateInfo,
|
|
1282
|
-
HandshakeSecrets,
|
|
1283
|
-
KOutputPayload,
|
|
1284
|
-
OPRFOutput,
|
|
1285
|
-
OPRFVerificationData,
|
|
1286
|
-
Opening,
|
|
1287
|
-
RequestRedactionRange,
|
|
1288
|
-
ResponseRedactionRange,
|
|
1289
|
-
SignedMessage,
|
|
1290
|
-
SignedRedactedDecryptionStream,
|
|
1291
|
-
TOutputPayload,
|
|
1292
|
-
VerificationBundle,
|
|
1293
|
-
bodyTypeFromJSON,
|
|
1294
|
-
bodyTypeToJSON,
|
|
1295
|
-
protobufPackage
|
|
1296
|
-
};
|