dash-platform-sdk 1.3.0-dev.4 → 1.3.0-dev.6
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/bundle.min.js +21 -2
- package/index.js +2 -5
- package/package.json +30 -31
- package/proto/generated/google/protobuf/wrappers.d.ts +260 -29
- package/proto/generated/google/protobuf/wrappers.js +562 -345
- package/proto/generated/platform.client.d.ts +251 -0
- package/proto/generated/platform.client.js +175 -0
- package/proto/generated/platform.d.ts +3682 -1939
- package/proto/generated/platform.js +8119 -18366
- package/src/DashPlatformSDK.d.ts +5 -4
- package/src/DashPlatformSDK.js +56 -46
- package/src/constants.js +7 -10
- package/src/contestedResources/createStateTransition.d.ts +1 -2
- package/src/contestedResources/createStateTransition.js +4 -7
- package/src/contestedResources/getContestedResourceVoteState.js +67 -118
- package/src/contestedResources/index.js +9 -55
- package/src/dataContracts/create.js +5 -8
- package/src/dataContracts/createStateTransition.js +10 -14
- package/src/dataContracts/getDataContractByIdentifier.js +40 -83
- package/src/dataContracts/index.js +17 -63
- package/src/documents/create.js +3 -6
- package/src/documents/createStateTransition.js +19 -31
- package/src/documents/index.js +25 -72
- package/src/documents/query.js +58 -90
- package/src/grpcConnectionPool.d.ts +30 -8
- package/src/grpcConnectionPool.js +63 -121
- package/src/identities/createStateTransition.js +14 -26
- package/src/identities/getIdentityBalance.js +37 -80
- package/src/identities/getIdentityByIdentifier.js +37 -80
- package/src/identities/getIdentityByNonUniquePublicKeyHash.js +41 -82
- package/src/identities/getIdentityByPublicKeyHash.js +37 -80
- package/src/identities/getIdentityContractNonce.js +40 -83
- package/src/identities/getIdentityNonce.js +38 -81
- package/src/identities/getIdentityPublicKeys.js +43 -81
- package/src/identities/index.js +57 -153
- package/src/keyPair/deriveChild.d.ts +2 -2
- package/src/keyPair/deriveChild.js +2 -49
- package/src/keyPair/derivePath.d.ts +2 -2
- package/src/keyPair/derivePath.js +2 -49
- package/src/keyPair/index.d.ts +39 -114
- package/src/keyPair/index.js +62 -296
- package/src/keyPair/mnemonicToSeed.d.ts +1 -1
- package/src/keyPair/mnemonicToSeed.js +3 -46
- package/src/names/index.js +43 -111
- package/src/names/registerName.js +60 -127
- package/src/names/searchByIdentity.d.ts +1 -1
- package/src/names/searchByIdentity.js +4 -50
- package/src/names/searchByName.js +15 -63
- package/src/names/testNameContested.js +1 -4
- package/src/names/validateName.js +3 -6
- package/src/node/epochs.js +43 -85
- package/src/node/index.d.ts +3 -3
- package/src/node/index.js +18 -77
- package/src/node/status.js +37 -81
- package/src/node/totalCredits.d.ts +2 -1
- package/src/node/totalCredits.js +32 -73
- package/src/signer/AbstractSigner.js +1 -2
- package/src/signer/setSigner.js +1 -4
- package/src/stateTransitions/broadcast.js +7 -57
- package/src/stateTransitions/index.js +13 -66
- package/src/stateTransitions/waitForStateTransitionResult.js +6 -58
- package/src/tokens/createStateTransition.js +23 -35
- package/src/tokens/getIdentitiesTokenBalances.js +40 -83
- package/src/tokens/getIdentityTokensBalances.js +40 -83
- package/src/tokens/getTokenContractInfo.js +40 -83
- package/src/tokens/getTokenDirectPurchasePrices.js +37 -80
- package/src/tokens/getTokenTotalSupply.js +38 -81
- package/src/tokens/index.js +39 -124
- package/src/types.d.ts +6 -12
- package/src/types.js +6 -16
- package/src/utils/base58ToBytes.js +3 -6
- package/src/utils/bytesToHex.js +2 -5
- package/src/utils/bytesToTypedArray.d.ts +1 -0
- package/src/utils/bytesToTypedArray.js +3 -0
- package/src/utils/calculateMsgHash.d.ts +1 -1
- package/src/utils/calculateMsgHash.js +10 -13
- package/src/utils/calculateSignHash.d.ts +1 -1
- package/src/utils/calculateSignHash.js +7 -10
- package/src/utils/calculateStateIdHash.d.ts +1 -1
- package/src/utils/calculateStateIdHash.js +8 -10
- package/src/utils/convertToHomographSafeChars.js +2 -5
- package/src/utils/createVoterIdentityId.d.ts +1 -1
- package/src/utils/createVoterIdentityId.js +12 -11
- package/src/utils/getEvonodeList.d.ts +2 -2
- package/src/utils/getEvonodeList.js +10 -61
- package/src/utils/getQuorumPublicKey.js +15 -66
- package/src/utils/getRandomArrayItem.js +1 -4
- package/src/utils/getRandomBytes.js +2 -5
- package/src/utils/hexToBytes.js +2 -6
- package/src/utils/index.js +21 -28
- package/src/utils/indexBytesToString.js +2 -5
- package/src/utils/sha256.d.ts +1 -1
- package/src/utils/sha256.js +10 -8
- package/src/utils/signHash.d.ts +1 -1
- package/src/utils/signHash.js +9 -12
- package/src/utils/signRequestId.d.ts +1 -1
- package/src/utils/signRequestId.js +9 -12
- package/src/utils/sleep.js +2 -50
- package/src/utils/stringToIndexValueBytes.js +4 -7
- package/src/utils/verifyTenderdashProof.d.ts +1 -1
- package/src/utils/verifyTenderdashProof.js +13 -17
- package/src/voting/createStateTransition.d.ts +1 -2
- package/src/voting/createStateTransition.js +4 -7
- package/src/voting/createVote.js +4 -7
- package/src/voting/index.d.ts +3 -4
- package/src/voting/index.js +19 -26
- package/test/unit/ContestedResources.spec.js +92 -177
- package/test/unit/DataContract.spec.js +44 -111
- package/test/unit/Document.spec.js +93 -183
- package/test/unit/Identity.spec.js +221 -346
- package/test/unit/KeyPair.spec.js +30 -145
- package/test/unit/Names.spec.js +27 -90
- package/test/unit/Node.spec.js +55 -126
- package/test/unit/SDK.spec.js +7 -9
- package/test/unit/Tokens.spec.js +111 -278
- package/bundle.min.js.LICENSE.txt +0 -1
- package/src/keyPair/keyToPublicKey.d.ts +0 -2
- package/src/keyPair/keyToPublicKey.js +0 -47
- package/src/keyPair/keyToWalletId.d.ts +0 -2
- package/src/keyPair/keyToWalletId.js +0 -50
- package/src/keyPair/keyToXPrivateKey.d.ts +0 -3
- package/src/keyPair/keyToXPrivateKey.js +0 -50
- package/src/keyPair/keyToXPublicKey.d.ts +0 -3
- package/src/keyPair/keyToXPublicKey.js +0 -50
- package/src/keyPair/mnemonicToIdentityKey.d.ts +0 -3
- package/src/keyPair/mnemonicToIdentityKey.js +0 -57
- package/src/keyPair/mnemonicToWallet.d.ts +0 -2
- package/src/keyPair/mnemonicToWallet.js +0 -55
- package/src/keyPair/privateKeyToWif.d.ts +0 -2
- package/src/keyPair/privateKeyToWif.js +0 -50
- package/src/keyPair/publicKeyToAddress.d.ts +0 -2
- package/src/keyPair/publicKeyToAddress.js +0 -50
- package/src/keyPair/seedToWallet.d.ts +0 -2
- package/src/keyPair/seedToWallet.js +0 -50
- package/src/keyPair/walletToIdentityKey.d.ts +0 -3
- package/src/keyPair/walletToIdentityKey.js +0 -56
- package/src/keyPair/xkeyToHDXKey.d.ts +0 -2
- package/src/keyPair/xkeyToHDXKey.js +0 -50
|
@@ -1,398 +1,615 @@
|
|
|
1
|
-
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies,long_type_string
|
|
2
|
+
// @generated from protobuf file "google/protobuf/wrappers.proto" (package "google.protobuf", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
// Protocol Buffers - Google's data interchange format
|
|
6
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
7
|
+
// https://developers.google.com/protocol-buffers/
|
|
8
|
+
//
|
|
9
|
+
// Redistribution and use in source and binary forms, with or without
|
|
10
|
+
// modification, are permitted provided that the following conditions are
|
|
11
|
+
// met:
|
|
12
|
+
//
|
|
13
|
+
// * Redistributions of source code must retain the above copyright
|
|
14
|
+
// notice, this list of conditions and the following disclaimer.
|
|
15
|
+
// * Redistributions in binary form must reproduce the above
|
|
16
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
17
|
+
// in the documentation and/or other materials provided with the
|
|
18
|
+
// distribution.
|
|
19
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
+
// contributors may be used to endorse or promote products derived from
|
|
21
|
+
// this software without specific prior written permission.
|
|
22
|
+
//
|
|
23
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
+
//
|
|
35
|
+
// Wrappers for primitive (non-message) types. These types were needed
|
|
36
|
+
// for legacy reasons and are not recommended for use in new APIs.
|
|
37
|
+
//
|
|
38
|
+
// Historically these wrappers were useful to have presence on proto3 primitive
|
|
39
|
+
// fields, but proto3 syntax has been updated to support the `optional` keyword.
|
|
40
|
+
// Using that keyword is now the strongly preferred way to add presence to
|
|
41
|
+
// proto3 primitive fields.
|
|
42
|
+
//
|
|
43
|
+
// A secondary usecase was to embed primitives in the `google.protobuf.Any`
|
|
44
|
+
// type: it is now recommended that you embed your value in your own wrapper
|
|
45
|
+
// message which can be specifically documented.
|
|
46
|
+
//
|
|
47
|
+
// These wrappers have no meaningful use within repeated fields as they lack
|
|
48
|
+
// the ability to detect presence on individual elements.
|
|
49
|
+
// These wrappers have no meaningful use within a map or a oneof since
|
|
50
|
+
// individual entries of a map or fields of a oneof can already detect presence.
|
|
51
|
+
//
|
|
52
|
+
import { ScalarType } from "@protobuf-ts/runtime";
|
|
53
|
+
import { LongType } from "@protobuf-ts/runtime";
|
|
54
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
55
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
56
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
57
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
58
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
59
|
+
class DoubleValue$Type extends MessageType {
|
|
60
|
+
constructor() {
|
|
61
|
+
super("google.protobuf.DoubleValue", [
|
|
62
|
+
{ no: 1, name: "value", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Encode `DoubleValue` to JSON number.
|
|
67
|
+
*/
|
|
68
|
+
internalJsonWrite(message, options) {
|
|
69
|
+
return this.refJsonWriter.scalar(2, message.value, "value", false, true);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Decode `DoubleValue` from JSON number.
|
|
73
|
+
*/
|
|
74
|
+
internalJsonRead(json, options, target) {
|
|
75
|
+
if (!target)
|
|
76
|
+
target = this.create();
|
|
77
|
+
target.value = this.refJsonReader.scalar(json, 1, undefined, "value");
|
|
78
|
+
return target;
|
|
79
|
+
}
|
|
80
|
+
create(value) {
|
|
81
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
82
|
+
message.value = 0;
|
|
83
|
+
if (value !== undefined)
|
|
84
|
+
reflectionMergePartial(this, message, value);
|
|
85
|
+
return message;
|
|
86
|
+
}
|
|
87
|
+
internalBinaryRead(reader, length, options, target) {
|
|
88
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
27
89
|
while (reader.pos < end) {
|
|
28
|
-
|
|
29
|
-
switch (
|
|
30
|
-
case 1:
|
|
31
|
-
if (tag !== 9) {
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
90
|
+
let [fieldNo, wireType] = reader.tag();
|
|
91
|
+
switch (fieldNo) {
|
|
92
|
+
case /* double value */ 1:
|
|
34
93
|
message.value = reader.double();
|
|
35
|
-
|
|
36
|
-
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
let u = options.readUnknownField;
|
|
97
|
+
if (u === "throw")
|
|
98
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
99
|
+
let d = reader.skip(wireType);
|
|
100
|
+
if (u !== false)
|
|
101
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
37
102
|
}
|
|
38
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
reader.skip(tag & 7);
|
|
42
103
|
}
|
|
43
104
|
return message;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return message;
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
function createBaseFloatValue() {
|
|
56
|
-
return { value: 0 };
|
|
57
|
-
}
|
|
58
|
-
exports.FloatValue = {
|
|
59
|
-
encode: function (message, writer) {
|
|
60
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
61
|
-
if (message.value !== 0) {
|
|
62
|
-
writer.uint32(13).float(message.value);
|
|
63
|
-
}
|
|
105
|
+
}
|
|
106
|
+
internalBinaryWrite(message, writer, options) {
|
|
107
|
+
/* double value = 1; */
|
|
108
|
+
if (message.value !== 0)
|
|
109
|
+
writer.tag(1, WireType.Bit64).double(message.value);
|
|
110
|
+
let u = options.writeUnknownFields;
|
|
111
|
+
if (u !== false)
|
|
112
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
64
113
|
return writer;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @generated MessageType for protobuf message google.protobuf.DoubleValue
|
|
118
|
+
*/
|
|
119
|
+
export const DoubleValue = new DoubleValue$Type();
|
|
120
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
121
|
+
class FloatValue$Type extends MessageType {
|
|
122
|
+
constructor() {
|
|
123
|
+
super("google.protobuf.FloatValue", [
|
|
124
|
+
{ no: 1, name: "value", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ }
|
|
125
|
+
]);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Encode `FloatValue` to JSON number.
|
|
129
|
+
*/
|
|
130
|
+
internalJsonWrite(message, options) {
|
|
131
|
+
return this.refJsonWriter.scalar(1, message.value, "value", false, true);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Decode `FloatValue` from JSON number.
|
|
135
|
+
*/
|
|
136
|
+
internalJsonRead(json, options, target) {
|
|
137
|
+
if (!target)
|
|
138
|
+
target = this.create();
|
|
139
|
+
target.value = this.refJsonReader.scalar(json, 1, undefined, "value");
|
|
140
|
+
return target;
|
|
141
|
+
}
|
|
142
|
+
create(value) {
|
|
143
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
144
|
+
message.value = 0;
|
|
145
|
+
if (value !== undefined)
|
|
146
|
+
reflectionMergePartial(this, message, value);
|
|
147
|
+
return message;
|
|
148
|
+
}
|
|
149
|
+
internalBinaryRead(reader, length, options, target) {
|
|
150
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
70
151
|
while (reader.pos < end) {
|
|
71
|
-
|
|
72
|
-
switch (
|
|
73
|
-
case 1:
|
|
74
|
-
if (tag !== 13) {
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
152
|
+
let [fieldNo, wireType] = reader.tag();
|
|
153
|
+
switch (fieldNo) {
|
|
154
|
+
case /* float value */ 1:
|
|
77
155
|
message.value = reader.float();
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
156
|
+
break;
|
|
157
|
+
default:
|
|
158
|
+
let u = options.readUnknownField;
|
|
159
|
+
if (u === "throw")
|
|
160
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
161
|
+
let d = reader.skip(wireType);
|
|
162
|
+
if (u !== false)
|
|
163
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
83
164
|
}
|
|
84
|
-
reader.skip(tag & 7);
|
|
85
165
|
}
|
|
86
166
|
return message;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return message;
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
function createBaseInt64Value() {
|
|
99
|
-
return { value: "0" };
|
|
100
|
-
}
|
|
101
|
-
exports.Int64Value = {
|
|
102
|
-
encode: function (message, writer) {
|
|
103
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
104
|
-
if (message.value !== "0") {
|
|
105
|
-
writer.uint32(8).int64(message.value);
|
|
106
|
-
}
|
|
167
|
+
}
|
|
168
|
+
internalBinaryWrite(message, writer, options) {
|
|
169
|
+
/* float value = 1; */
|
|
170
|
+
if (message.value !== 0)
|
|
171
|
+
writer.tag(1, WireType.Bit32).float(message.value);
|
|
172
|
+
let u = options.writeUnknownFields;
|
|
173
|
+
if (u !== false)
|
|
174
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
107
175
|
return writer;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @generated MessageType for protobuf message google.protobuf.FloatValue
|
|
180
|
+
*/
|
|
181
|
+
export const FloatValue = new FloatValue$Type();
|
|
182
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
183
|
+
class Int64Value$Type extends MessageType {
|
|
184
|
+
constructor() {
|
|
185
|
+
super("google.protobuf.Int64Value", [
|
|
186
|
+
{ no: 1, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
|
|
187
|
+
]);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Encode `Int64Value` to JSON string.
|
|
191
|
+
*/
|
|
192
|
+
internalJsonWrite(message, options) {
|
|
193
|
+
return this.refJsonWriter.scalar(ScalarType.INT64, message.value, "value", false, true);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Decode `Int64Value` from JSON string.
|
|
197
|
+
*/
|
|
198
|
+
internalJsonRead(json, options, target) {
|
|
199
|
+
if (!target)
|
|
200
|
+
target = this.create();
|
|
201
|
+
target.value = this.refJsonReader.scalar(json, ScalarType.INT64, LongType.STRING, "value");
|
|
202
|
+
return target;
|
|
203
|
+
}
|
|
204
|
+
create(value) {
|
|
205
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
206
|
+
message.value = "0";
|
|
207
|
+
if (value !== undefined)
|
|
208
|
+
reflectionMergePartial(this, message, value);
|
|
209
|
+
return message;
|
|
210
|
+
}
|
|
211
|
+
internalBinaryRead(reader, length, options, target) {
|
|
212
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
113
213
|
while (reader.pos < end) {
|
|
114
|
-
|
|
115
|
-
switch (
|
|
116
|
-
case 1:
|
|
117
|
-
if (tag !== 8) {
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
214
|
+
let [fieldNo, wireType] = reader.tag();
|
|
215
|
+
switch (fieldNo) {
|
|
216
|
+
case /* int64 value */ 1:
|
|
120
217
|
message.value = reader.int64().toString();
|
|
121
|
-
|
|
122
|
-
|
|
218
|
+
break;
|
|
219
|
+
default:
|
|
220
|
+
let u = options.readUnknownField;
|
|
221
|
+
if (u === "throw")
|
|
222
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
223
|
+
let d = reader.skip(wireType);
|
|
224
|
+
if (u !== false)
|
|
225
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
123
226
|
}
|
|
124
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
reader.skip(tag & 7);
|
|
128
227
|
}
|
|
129
228
|
return message;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return message;
|
|
139
|
-
},
|
|
140
|
-
};
|
|
141
|
-
function createBaseUInt64Value() {
|
|
142
|
-
return { value: "0" };
|
|
143
|
-
}
|
|
144
|
-
exports.UInt64Value = {
|
|
145
|
-
encode: function (message, writer) {
|
|
146
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
147
|
-
if (message.value !== "0") {
|
|
148
|
-
writer.uint32(8).uint64(message.value);
|
|
149
|
-
}
|
|
229
|
+
}
|
|
230
|
+
internalBinaryWrite(message, writer, options) {
|
|
231
|
+
/* int64 value = 1; */
|
|
232
|
+
if (message.value !== "0")
|
|
233
|
+
writer.tag(1, WireType.Varint).int64(message.value);
|
|
234
|
+
let u = options.writeUnknownFields;
|
|
235
|
+
if (u !== false)
|
|
236
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
150
237
|
return writer;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* @generated MessageType for protobuf message google.protobuf.Int64Value
|
|
242
|
+
*/
|
|
243
|
+
export const Int64Value = new Int64Value$Type();
|
|
244
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
245
|
+
class UInt64Value$Type extends MessageType {
|
|
246
|
+
constructor() {
|
|
247
|
+
super("google.protobuf.UInt64Value", [
|
|
248
|
+
{ no: 1, name: "value", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
|
|
249
|
+
]);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Encode `UInt64Value` to JSON string.
|
|
253
|
+
*/
|
|
254
|
+
internalJsonWrite(message, options) {
|
|
255
|
+
return this.refJsonWriter.scalar(ScalarType.UINT64, message.value, "value", false, true);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Decode `UInt64Value` from JSON string.
|
|
259
|
+
*/
|
|
260
|
+
internalJsonRead(json, options, target) {
|
|
261
|
+
if (!target)
|
|
262
|
+
target = this.create();
|
|
263
|
+
target.value = this.refJsonReader.scalar(json, ScalarType.UINT64, LongType.STRING, "value");
|
|
264
|
+
return target;
|
|
265
|
+
}
|
|
266
|
+
create(value) {
|
|
267
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
268
|
+
message.value = "0";
|
|
269
|
+
if (value !== undefined)
|
|
270
|
+
reflectionMergePartial(this, message, value);
|
|
271
|
+
return message;
|
|
272
|
+
}
|
|
273
|
+
internalBinaryRead(reader, length, options, target) {
|
|
274
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
156
275
|
while (reader.pos < end) {
|
|
157
|
-
|
|
158
|
-
switch (
|
|
159
|
-
case 1:
|
|
160
|
-
if (tag !== 8) {
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
276
|
+
let [fieldNo, wireType] = reader.tag();
|
|
277
|
+
switch (fieldNo) {
|
|
278
|
+
case /* uint64 value */ 1:
|
|
163
279
|
message.value = reader.uint64().toString();
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
280
|
+
break;
|
|
281
|
+
default:
|
|
282
|
+
let u = options.readUnknownField;
|
|
283
|
+
if (u === "throw")
|
|
284
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
285
|
+
let d = reader.skip(wireType);
|
|
286
|
+
if (u !== false)
|
|
287
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
169
288
|
}
|
|
170
|
-
reader.skip(tag & 7);
|
|
171
289
|
}
|
|
172
290
|
return message;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return message;
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
function createBaseInt32Value() {
|
|
185
|
-
return { value: 0 };
|
|
186
|
-
}
|
|
187
|
-
exports.Int32Value = {
|
|
188
|
-
encode: function (message, writer) {
|
|
189
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
190
|
-
if (message.value !== 0) {
|
|
191
|
-
writer.uint32(8).int32(message.value);
|
|
192
|
-
}
|
|
291
|
+
}
|
|
292
|
+
internalBinaryWrite(message, writer, options) {
|
|
293
|
+
/* uint64 value = 1; */
|
|
294
|
+
if (message.value !== "0")
|
|
295
|
+
writer.tag(1, WireType.Varint).uint64(message.value);
|
|
296
|
+
let u = options.writeUnknownFields;
|
|
297
|
+
if (u !== false)
|
|
298
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
193
299
|
return writer;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @generated MessageType for protobuf message google.protobuf.UInt64Value
|
|
304
|
+
*/
|
|
305
|
+
export const UInt64Value = new UInt64Value$Type();
|
|
306
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
307
|
+
class Int32Value$Type extends MessageType {
|
|
308
|
+
constructor() {
|
|
309
|
+
super("google.protobuf.Int32Value", [
|
|
310
|
+
{ no: 1, name: "value", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
311
|
+
]);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Encode `Int32Value` to JSON string.
|
|
315
|
+
*/
|
|
316
|
+
internalJsonWrite(message, options) {
|
|
317
|
+
return this.refJsonWriter.scalar(5, message.value, "value", false, true);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Decode `Int32Value` from JSON string.
|
|
321
|
+
*/
|
|
322
|
+
internalJsonRead(json, options, target) {
|
|
323
|
+
if (!target)
|
|
324
|
+
target = this.create();
|
|
325
|
+
target.value = this.refJsonReader.scalar(json, 5, undefined, "value");
|
|
326
|
+
return target;
|
|
327
|
+
}
|
|
328
|
+
create(value) {
|
|
329
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
330
|
+
message.value = 0;
|
|
331
|
+
if (value !== undefined)
|
|
332
|
+
reflectionMergePartial(this, message, value);
|
|
333
|
+
return message;
|
|
334
|
+
}
|
|
335
|
+
internalBinaryRead(reader, length, options, target) {
|
|
336
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
199
337
|
while (reader.pos < end) {
|
|
200
|
-
|
|
201
|
-
switch (
|
|
202
|
-
case 1:
|
|
203
|
-
if (tag !== 8) {
|
|
204
|
-
break;
|
|
205
|
-
}
|
|
338
|
+
let [fieldNo, wireType] = reader.tag();
|
|
339
|
+
switch (fieldNo) {
|
|
340
|
+
case /* int32 value */ 1:
|
|
206
341
|
message.value = reader.int32();
|
|
207
|
-
|
|
208
|
-
|
|
342
|
+
break;
|
|
343
|
+
default:
|
|
344
|
+
let u = options.readUnknownField;
|
|
345
|
+
if (u === "throw")
|
|
346
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
347
|
+
let d = reader.skip(wireType);
|
|
348
|
+
if (u !== false)
|
|
349
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
209
350
|
}
|
|
210
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
reader.skip(tag & 7);
|
|
214
351
|
}
|
|
215
352
|
return message;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
return message;
|
|
225
|
-
},
|
|
226
|
-
};
|
|
227
|
-
function createBaseUInt32Value() {
|
|
228
|
-
return { value: 0 };
|
|
229
|
-
}
|
|
230
|
-
exports.UInt32Value = {
|
|
231
|
-
encode: function (message, writer) {
|
|
232
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
233
|
-
if (message.value !== 0) {
|
|
234
|
-
writer.uint32(8).uint32(message.value);
|
|
235
|
-
}
|
|
353
|
+
}
|
|
354
|
+
internalBinaryWrite(message, writer, options) {
|
|
355
|
+
/* int32 value = 1; */
|
|
356
|
+
if (message.value !== 0)
|
|
357
|
+
writer.tag(1, WireType.Varint).int32(message.value);
|
|
358
|
+
let u = options.writeUnknownFields;
|
|
359
|
+
if (u !== false)
|
|
360
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
236
361
|
return writer;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* @generated MessageType for protobuf message google.protobuf.Int32Value
|
|
366
|
+
*/
|
|
367
|
+
export const Int32Value = new Int32Value$Type();
|
|
368
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
369
|
+
class UInt32Value$Type extends MessageType {
|
|
370
|
+
constructor() {
|
|
371
|
+
super("google.protobuf.UInt32Value", [
|
|
372
|
+
{ no: 1, name: "value", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
|
|
373
|
+
]);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Encode `UInt32Value` to JSON string.
|
|
377
|
+
*/
|
|
378
|
+
internalJsonWrite(message, options) {
|
|
379
|
+
return this.refJsonWriter.scalar(13, message.value, "value", false, true);
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Decode `UInt32Value` from JSON string.
|
|
383
|
+
*/
|
|
384
|
+
internalJsonRead(json, options, target) {
|
|
385
|
+
if (!target)
|
|
386
|
+
target = this.create();
|
|
387
|
+
target.value = this.refJsonReader.scalar(json, 13, undefined, "value");
|
|
388
|
+
return target;
|
|
389
|
+
}
|
|
390
|
+
create(value) {
|
|
391
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
392
|
+
message.value = 0;
|
|
393
|
+
if (value !== undefined)
|
|
394
|
+
reflectionMergePartial(this, message, value);
|
|
395
|
+
return message;
|
|
396
|
+
}
|
|
397
|
+
internalBinaryRead(reader, length, options, target) {
|
|
398
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
242
399
|
while (reader.pos < end) {
|
|
243
|
-
|
|
244
|
-
switch (
|
|
245
|
-
case 1:
|
|
246
|
-
if (tag !== 8) {
|
|
247
|
-
break;
|
|
248
|
-
}
|
|
400
|
+
let [fieldNo, wireType] = reader.tag();
|
|
401
|
+
switch (fieldNo) {
|
|
402
|
+
case /* uint32 value */ 1:
|
|
249
403
|
message.value = reader.uint32();
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
404
|
+
break;
|
|
405
|
+
default:
|
|
406
|
+
let u = options.readUnknownField;
|
|
407
|
+
if (u === "throw")
|
|
408
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
409
|
+
let d = reader.skip(wireType);
|
|
410
|
+
if (u !== false)
|
|
411
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
255
412
|
}
|
|
256
|
-
reader.skip(tag & 7);
|
|
257
413
|
}
|
|
258
414
|
return message;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
return message;
|
|
268
|
-
},
|
|
269
|
-
};
|
|
270
|
-
function createBaseBoolValue() {
|
|
271
|
-
return { value: false };
|
|
272
|
-
}
|
|
273
|
-
exports.BoolValue = {
|
|
274
|
-
encode: function (message, writer) {
|
|
275
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
276
|
-
if (message.value !== false) {
|
|
277
|
-
writer.uint32(8).bool(message.value);
|
|
278
|
-
}
|
|
415
|
+
}
|
|
416
|
+
internalBinaryWrite(message, writer, options) {
|
|
417
|
+
/* uint32 value = 1; */
|
|
418
|
+
if (message.value !== 0)
|
|
419
|
+
writer.tag(1, WireType.Varint).uint32(message.value);
|
|
420
|
+
let u = options.writeUnknownFields;
|
|
421
|
+
if (u !== false)
|
|
422
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
279
423
|
return writer;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* @generated MessageType for protobuf message google.protobuf.UInt32Value
|
|
428
|
+
*/
|
|
429
|
+
export const UInt32Value = new UInt32Value$Type();
|
|
430
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
431
|
+
class BoolValue$Type extends MessageType {
|
|
432
|
+
constructor() {
|
|
433
|
+
super("google.protobuf.BoolValue", [
|
|
434
|
+
{ no: 1, name: "value", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
435
|
+
]);
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Encode `BoolValue` to JSON bool.
|
|
439
|
+
*/
|
|
440
|
+
internalJsonWrite(message, options) {
|
|
441
|
+
return message.value;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Decode `BoolValue` from JSON bool.
|
|
445
|
+
*/
|
|
446
|
+
internalJsonRead(json, options, target) {
|
|
447
|
+
if (!target)
|
|
448
|
+
target = this.create();
|
|
449
|
+
target.value = this.refJsonReader.scalar(json, 8, undefined, "value");
|
|
450
|
+
return target;
|
|
451
|
+
}
|
|
452
|
+
create(value) {
|
|
453
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
454
|
+
message.value = false;
|
|
455
|
+
if (value !== undefined)
|
|
456
|
+
reflectionMergePartial(this, message, value);
|
|
457
|
+
return message;
|
|
458
|
+
}
|
|
459
|
+
internalBinaryRead(reader, length, options, target) {
|
|
460
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
285
461
|
while (reader.pos < end) {
|
|
286
|
-
|
|
287
|
-
switch (
|
|
288
|
-
case 1:
|
|
289
|
-
if (tag !== 8) {
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
462
|
+
let [fieldNo, wireType] = reader.tag();
|
|
463
|
+
switch (fieldNo) {
|
|
464
|
+
case /* bool value */ 1:
|
|
292
465
|
message.value = reader.bool();
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
466
|
+
break;
|
|
467
|
+
default:
|
|
468
|
+
let u = options.readUnknownField;
|
|
469
|
+
if (u === "throw")
|
|
470
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
471
|
+
let d = reader.skip(wireType);
|
|
472
|
+
if (u !== false)
|
|
473
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
298
474
|
}
|
|
299
|
-
reader.skip(tag & 7);
|
|
300
475
|
}
|
|
301
476
|
return message;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
return message;
|
|
311
|
-
},
|
|
312
|
-
};
|
|
313
|
-
function createBaseStringValue() {
|
|
314
|
-
return { value: "" };
|
|
315
|
-
}
|
|
316
|
-
exports.StringValue = {
|
|
317
|
-
encode: function (message, writer) {
|
|
318
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
319
|
-
if (message.value !== "") {
|
|
320
|
-
writer.uint32(10).string(message.value);
|
|
321
|
-
}
|
|
477
|
+
}
|
|
478
|
+
internalBinaryWrite(message, writer, options) {
|
|
479
|
+
/* bool value = 1; */
|
|
480
|
+
if (message.value !== false)
|
|
481
|
+
writer.tag(1, WireType.Varint).bool(message.value);
|
|
482
|
+
let u = options.writeUnknownFields;
|
|
483
|
+
if (u !== false)
|
|
484
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
322
485
|
return writer;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* @generated MessageType for protobuf message google.protobuf.BoolValue
|
|
490
|
+
*/
|
|
491
|
+
export const BoolValue = new BoolValue$Type();
|
|
492
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
493
|
+
class StringValue$Type extends MessageType {
|
|
494
|
+
constructor() {
|
|
495
|
+
super("google.protobuf.StringValue", [
|
|
496
|
+
{ no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
497
|
+
]);
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Encode `StringValue` to JSON string.
|
|
501
|
+
*/
|
|
502
|
+
internalJsonWrite(message, options) {
|
|
503
|
+
return message.value;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Decode `StringValue` from JSON string.
|
|
507
|
+
*/
|
|
508
|
+
internalJsonRead(json, options, target) {
|
|
509
|
+
if (!target)
|
|
510
|
+
target = this.create();
|
|
511
|
+
target.value = this.refJsonReader.scalar(json, 9, undefined, "value");
|
|
512
|
+
return target;
|
|
513
|
+
}
|
|
514
|
+
create(value) {
|
|
515
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
516
|
+
message.value = "";
|
|
517
|
+
if (value !== undefined)
|
|
518
|
+
reflectionMergePartial(this, message, value);
|
|
519
|
+
return message;
|
|
520
|
+
}
|
|
521
|
+
internalBinaryRead(reader, length, options, target) {
|
|
522
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
328
523
|
while (reader.pos < end) {
|
|
329
|
-
|
|
330
|
-
switch (
|
|
331
|
-
case 1:
|
|
332
|
-
if (tag !== 10) {
|
|
333
|
-
break;
|
|
334
|
-
}
|
|
524
|
+
let [fieldNo, wireType] = reader.tag();
|
|
525
|
+
switch (fieldNo) {
|
|
526
|
+
case /* string value */ 1:
|
|
335
527
|
message.value = reader.string();
|
|
336
|
-
|
|
337
|
-
|
|
528
|
+
break;
|
|
529
|
+
default:
|
|
530
|
+
let u = options.readUnknownField;
|
|
531
|
+
if (u === "throw")
|
|
532
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
533
|
+
let d = reader.skip(wireType);
|
|
534
|
+
if (u !== false)
|
|
535
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
338
536
|
}
|
|
339
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
340
|
-
break;
|
|
341
|
-
}
|
|
342
|
-
reader.skip(tag & 7);
|
|
343
537
|
}
|
|
344
538
|
return message;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
return message;
|
|
354
|
-
},
|
|
355
|
-
};
|
|
356
|
-
function createBaseBytesValue() {
|
|
357
|
-
return { value: new Uint8Array(0) };
|
|
358
|
-
}
|
|
359
|
-
exports.BytesValue = {
|
|
360
|
-
encode: function (message, writer) {
|
|
361
|
-
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
362
|
-
if (message.value.length !== 0) {
|
|
363
|
-
writer.uint32(10).bytes(message.value);
|
|
364
|
-
}
|
|
539
|
+
}
|
|
540
|
+
internalBinaryWrite(message, writer, options) {
|
|
541
|
+
/* string value = 1; */
|
|
542
|
+
if (message.value !== "")
|
|
543
|
+
writer.tag(1, WireType.LengthDelimited).string(message.value);
|
|
544
|
+
let u = options.writeUnknownFields;
|
|
545
|
+
if (u !== false)
|
|
546
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
365
547
|
return writer;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* @generated MessageType for protobuf message google.protobuf.StringValue
|
|
552
|
+
*/
|
|
553
|
+
export const StringValue = new StringValue$Type();
|
|
554
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
555
|
+
class BytesValue$Type extends MessageType {
|
|
556
|
+
constructor() {
|
|
557
|
+
super("google.protobuf.BytesValue", [
|
|
558
|
+
{ no: 1, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
|
559
|
+
]);
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Encode `BytesValue` to JSON string.
|
|
563
|
+
*/
|
|
564
|
+
internalJsonWrite(message, options) {
|
|
565
|
+
return this.refJsonWriter.scalar(12, message.value, "value", false, true);
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Decode `BytesValue` from JSON string.
|
|
569
|
+
*/
|
|
570
|
+
internalJsonRead(json, options, target) {
|
|
571
|
+
if (!target)
|
|
572
|
+
target = this.create();
|
|
573
|
+
target.value = this.refJsonReader.scalar(json, 12, undefined, "value");
|
|
574
|
+
return target;
|
|
575
|
+
}
|
|
576
|
+
create(value) {
|
|
577
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
578
|
+
message.value = new Uint8Array(0);
|
|
579
|
+
if (value !== undefined)
|
|
580
|
+
reflectionMergePartial(this, message, value);
|
|
581
|
+
return message;
|
|
582
|
+
}
|
|
583
|
+
internalBinaryRead(reader, length, options, target) {
|
|
584
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
371
585
|
while (reader.pos < end) {
|
|
372
|
-
|
|
373
|
-
switch (
|
|
374
|
-
case 1:
|
|
375
|
-
if (tag !== 10) {
|
|
376
|
-
break;
|
|
377
|
-
}
|
|
586
|
+
let [fieldNo, wireType] = reader.tag();
|
|
587
|
+
switch (fieldNo) {
|
|
588
|
+
case /* bytes value */ 1:
|
|
378
589
|
message.value = reader.bytes();
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
590
|
+
break;
|
|
591
|
+
default:
|
|
592
|
+
let u = options.readUnknownField;
|
|
593
|
+
if (u === "throw")
|
|
594
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
595
|
+
let d = reader.skip(wireType);
|
|
596
|
+
if (u !== false)
|
|
597
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
384
598
|
}
|
|
385
|
-
reader.skip(tag & 7);
|
|
386
599
|
}
|
|
387
600
|
return message;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
return
|
|
397
|
-
}
|
|
398
|
-
}
|
|
601
|
+
}
|
|
602
|
+
internalBinaryWrite(message, writer, options) {
|
|
603
|
+
/* bytes value = 1; */
|
|
604
|
+
if (message.value.length)
|
|
605
|
+
writer.tag(1, WireType.LengthDelimited).bytes(message.value);
|
|
606
|
+
let u = options.writeUnknownFields;
|
|
607
|
+
if (u !== false)
|
|
608
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
609
|
+
return writer;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* @generated MessageType for protobuf message google.protobuf.BytesValue
|
|
614
|
+
*/
|
|
615
|
+
export const BytesValue = new BytesValue$Type();
|