@ottochain/sdk 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/dist/cjs/index.js +34 -15
- package/dist/cjs/ottochain/index.js +20 -1
- package/dist/cjs/ottochain/metagraph-client.js +7 -8
- package/dist/cjs/ottochain/snapshot.js +3 -3
- package/dist/cjs/{metakit → ottochain}/transaction.js +4 -5
- package/dist/cjs/verify.js +17 -0
- package/dist/esm/apps/contracts/index.js +28 -10
- package/dist/esm/apps/corporate/index.js +79 -24
- package/dist/esm/apps/governance/index.js +85 -36
- package/dist/esm/apps/identity/constants.js +27 -22
- package/dist/esm/apps/identity/index.js +35 -7
- package/dist/esm/apps/index.js +32 -6
- package/dist/esm/apps/markets/index.js +27 -6
- package/dist/esm/apps/oracles/index.js +27 -7
- package/dist/esm/errors.js +19 -9
- package/dist/esm/generated/google/protobuf/struct.js +39 -33
- package/dist/esm/generated/google/protobuf/timestamp.js +9 -6
- package/dist/esm/generated/index.js +134 -10
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +54 -48
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +357 -335
- package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +299 -284
- package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +47 -38
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +50 -44
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +86 -77
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +72 -66
- package/dist/esm/generated/ottochain/v1/common.js +4 -1
- package/dist/esm/generated/ottochain/v1/fiber.js +96 -90
- package/dist/esm/generated/ottochain/v1/messages.js +82 -79
- package/dist/esm/generated/ottochain/v1/records.js +140 -137
- package/dist/esm/index.js +86 -20
- package/dist/esm/{metakit → ottochain}/drop-nulls.js +5 -1
- package/dist/esm/ottochain/index.js +56 -3
- package/dist/esm/ottochain/metagraph-client.js +16 -13
- package/dist/esm/{metakit → ottochain}/normalize.js +11 -4
- package/dist/esm/ottochain/snapshot.js +20 -10
- package/dist/esm/{metakit → ottochain}/transaction.js +25 -14
- package/dist/esm/ottochain/types.js +2 -1
- package/dist/esm/types.js +7 -2
- package/dist/esm/validation.js +76 -65
- package/dist/esm/verify.js +17 -0
- package/dist/types/index.d.ts +14 -7
- package/dist/types/ottochain/index.d.ts +4 -0
- package/dist/types/ottochain/metagraph-client.d.ts +1 -1
- package/dist/types/{metakit → ottochain}/transaction.d.ts +1 -1
- package/dist/types/validation.d.ts +8 -8
- package/dist/types/verify.d.ts +9 -0
- package/package.json +5 -3
- package/dist/cjs/metakit/binary.js +0 -58
- package/dist/cjs/metakit/canonicalize.js +0 -40
- package/dist/cjs/metakit/codec.js +0 -45
- package/dist/cjs/metakit/currency-transaction.js +0 -319
- package/dist/cjs/metakit/currency-types.js +0 -13
- package/dist/cjs/metakit/hash.js +0 -84
- package/dist/cjs/metakit/index.js +0 -86
- package/dist/cjs/metakit/network/client.js +0 -78
- package/dist/cjs/metakit/network/currency-l1-client.js +0 -101
- package/dist/cjs/metakit/network/data-l1-client.js +0 -76
- package/dist/cjs/metakit/network/index.js +0 -16
- package/dist/cjs/metakit/network/types.js +0 -20
- package/dist/cjs/metakit/sign.js +0 -120
- package/dist/cjs/metakit/signed-object.js +0 -100
- package/dist/cjs/metakit/types.js +0 -14
- package/dist/cjs/metakit/verify.js +0 -217
- package/dist/cjs/metakit/wallet.js +0 -127
- package/dist/esm/metakit/binary.js +0 -53
- package/dist/esm/metakit/canonicalize.js +0 -33
- package/dist/esm/metakit/codec.js +0 -38
- package/dist/esm/metakit/currency-transaction.js +0 -306
- package/dist/esm/metakit/currency-types.js +0 -10
- package/dist/esm/metakit/hash.js +0 -77
- package/dist/esm/metakit/index.js +0 -33
- package/dist/esm/metakit/network/client.js +0 -74
- package/dist/esm/metakit/network/currency-l1-client.js +0 -97
- package/dist/esm/metakit/network/data-l1-client.js +0 -72
- package/dist/esm/metakit/network/index.js +0 -9
- package/dist/esm/metakit/network/types.js +0 -16
- package/dist/esm/metakit/sign.js +0 -114
- package/dist/esm/metakit/signed-object.js +0 -94
- package/dist/esm/metakit/types.js +0 -11
- package/dist/esm/metakit/verify.js +0 -210
- package/dist/esm/metakit/wallet.js +0 -117
- package/dist/types/metakit/binary.d.ts +0 -38
- package/dist/types/metakit/canonicalize.d.ts +0 -26
- package/dist/types/metakit/codec.d.ts +0 -16
- package/dist/types/metakit/currency-transaction.d.ts +0 -157
- package/dist/types/metakit/currency-types.d.ts +0 -55
- package/dist/types/metakit/hash.d.ts +0 -50
- package/dist/types/metakit/index.d.ts +0 -26
- package/dist/types/metakit/network/client.d.ts +0 -23
- package/dist/types/metakit/network/currency-l1-client.d.ts +0 -71
- package/dist/types/metakit/network/data-l1-client.d.ts +0 -57
- package/dist/types/metakit/network/index.d.ts +0 -10
- package/dist/types/metakit/network/types.d.ts +0 -74
- package/dist/types/metakit/sign.d.ts +0 -65
- package/dist/types/metakit/signed-object.d.ts +0 -66
- package/dist/types/metakit/types.d.ts +0 -67
- package/dist/types/metakit/verify.d.ts +0 -55
- package/dist/types/metakit/wallet.d.ts +0 -70
- /package/dist/cjs/{metakit → ottochain}/drop-nulls.js +0 -0
- /package/dist/cjs/{metakit → ottochain}/normalize.js +0 -0
- /package/dist/types/{metakit → ottochain}/drop-nulls.d.ts +0 -0
- /package/dist/types/{metakit → ottochain}/normalize.d.ts +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
3
|
// versions:
|
|
3
4
|
// protoc-gen-ts_proto v2.11.2
|
|
4
5
|
// protoc unknown
|
|
5
6
|
// source: ottochain/apps/contracts/v1/contract.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ContractDefinition = exports.DisputeContractRequest = exports.RejectContractRequest = exports.CompleteContractRequest = exports.AcceptContractRequest = exports.ProposeContractRequest = exports.Contract = exports.contractStateToNumber = exports.contractStateToJSON = exports.contractStateFromJSON = exports.ContractState = exports.protobufPackage = void 0;
|
|
6
9
|
/* eslint-disable */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const struct_js_1 = require("../../../../google/protobuf/struct.js");
|
|
12
|
+
const timestamp_js_1 = require("../../../../google/protobuf/timestamp.js");
|
|
13
|
+
exports.protobufPackage = "ottochain.apps.contracts.v1";
|
|
11
14
|
/** Contract lifecycle states */
|
|
12
|
-
|
|
15
|
+
var ContractState;
|
|
13
16
|
(function (ContractState) {
|
|
14
17
|
ContractState["CONTRACT_STATE_UNSPECIFIED"] = "CONTRACT_STATE_UNSPECIFIED";
|
|
15
18
|
/** CONTRACT_STATE_PROPOSED - Awaiting counterparty acceptance */
|
|
@@ -25,8 +28,8 @@ export var ContractState;
|
|
|
25
28
|
/** CONTRACT_STATE_CANCELLED - Cancelled by proposer before acceptance (terminal) */
|
|
26
29
|
ContractState["CONTRACT_STATE_CANCELLED"] = "CONTRACT_STATE_CANCELLED";
|
|
27
30
|
ContractState["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
28
|
-
})(ContractState || (ContractState = {}));
|
|
29
|
-
|
|
31
|
+
})(ContractState || (exports.ContractState = ContractState = {}));
|
|
32
|
+
function contractStateFromJSON(object) {
|
|
30
33
|
switch (object) {
|
|
31
34
|
case 0:
|
|
32
35
|
case "CONTRACT_STATE_UNSPECIFIED":
|
|
@@ -55,7 +58,8 @@ export function contractStateFromJSON(object) {
|
|
|
55
58
|
return ContractState.UNRECOGNIZED;
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
|
-
|
|
61
|
+
exports.contractStateFromJSON = contractStateFromJSON;
|
|
62
|
+
function contractStateToJSON(object) {
|
|
59
63
|
switch (object) {
|
|
60
64
|
case ContractState.CONTRACT_STATE_UNSPECIFIED:
|
|
61
65
|
return "CONTRACT_STATE_UNSPECIFIED";
|
|
@@ -76,7 +80,8 @@ export function contractStateToJSON(object) {
|
|
|
76
80
|
return "UNRECOGNIZED";
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
|
-
|
|
83
|
+
exports.contractStateToJSON = contractStateToJSON;
|
|
84
|
+
function contractStateToNumber(object) {
|
|
80
85
|
switch (object) {
|
|
81
86
|
case ContractState.CONTRACT_STATE_UNSPECIFIED:
|
|
82
87
|
return 0;
|
|
@@ -97,6 +102,7 @@ export function contractStateToNumber(object) {
|
|
|
97
102
|
return -1;
|
|
98
103
|
}
|
|
99
104
|
}
|
|
105
|
+
exports.contractStateToNumber = contractStateToNumber;
|
|
100
106
|
function createBaseContract() {
|
|
101
107
|
return {
|
|
102
108
|
id: "",
|
|
@@ -111,8 +117,8 @@ function createBaseContract() {
|
|
|
111
117
|
completionProof: "",
|
|
112
118
|
};
|
|
113
119
|
}
|
|
114
|
-
|
|
115
|
-
encode(message, writer = new BinaryWriter()) {
|
|
120
|
+
exports.Contract = {
|
|
121
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
116
122
|
if (message.id !== "") {
|
|
117
123
|
writer.uint32(10).string(message.id);
|
|
118
124
|
}
|
|
@@ -129,16 +135,16 @@ export const Contract = {
|
|
|
129
135
|
writer.uint32(40).int32(contractStateToNumber(message.state));
|
|
130
136
|
}
|
|
131
137
|
if (message.terms !== undefined) {
|
|
132
|
-
Struct.encode(Struct.wrap(message.terms), writer.uint32(50).fork()).join();
|
|
138
|
+
struct_js_1.Struct.encode(struct_js_1.Struct.wrap(message.terms), writer.uint32(50).fork()).join();
|
|
133
139
|
}
|
|
134
140
|
if (message.proposedAt !== undefined) {
|
|
135
|
-
Timestamp.encode(toTimestamp(message.proposedAt), writer.uint32(58).fork()).join();
|
|
141
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.proposedAt), writer.uint32(58).fork()).join();
|
|
136
142
|
}
|
|
137
143
|
if (message.acceptedAt !== undefined) {
|
|
138
|
-
Timestamp.encode(toTimestamp(message.acceptedAt), writer.uint32(66).fork()).join();
|
|
144
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.acceptedAt), writer.uint32(66).fork()).join();
|
|
139
145
|
}
|
|
140
146
|
if (message.completedAt !== undefined) {
|
|
141
|
-
Timestamp.encode(toTimestamp(message.completedAt), writer.uint32(74).fork()).join();
|
|
147
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.completedAt), writer.uint32(74).fork()).join();
|
|
142
148
|
}
|
|
143
149
|
if (message.completionProof !== "") {
|
|
144
150
|
writer.uint32(82).string(message.completionProof);
|
|
@@ -146,7 +152,7 @@ export const Contract = {
|
|
|
146
152
|
return writer;
|
|
147
153
|
},
|
|
148
154
|
decode(input, length) {
|
|
149
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
155
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
150
156
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
151
157
|
const message = createBaseContract();
|
|
152
158
|
while (reader.pos < end) {
|
|
@@ -191,28 +197,28 @@ export const Contract = {
|
|
|
191
197
|
if (tag !== 50) {
|
|
192
198
|
break;
|
|
193
199
|
}
|
|
194
|
-
message.terms = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
200
|
+
message.terms = struct_js_1.Struct.unwrap(struct_js_1.Struct.decode(reader, reader.uint32()));
|
|
195
201
|
continue;
|
|
196
202
|
}
|
|
197
203
|
case 7: {
|
|
198
204
|
if (tag !== 58) {
|
|
199
205
|
break;
|
|
200
206
|
}
|
|
201
|
-
message.proposedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
207
|
+
message.proposedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
202
208
|
continue;
|
|
203
209
|
}
|
|
204
210
|
case 8: {
|
|
205
211
|
if (tag !== 66) {
|
|
206
212
|
break;
|
|
207
213
|
}
|
|
208
|
-
message.acceptedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
214
|
+
message.acceptedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
209
215
|
continue;
|
|
210
216
|
}
|
|
211
217
|
case 9: {
|
|
212
218
|
if (tag !== 74) {
|
|
213
219
|
break;
|
|
214
220
|
}
|
|
215
|
-
message.completedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
221
|
+
message.completedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
216
222
|
continue;
|
|
217
223
|
}
|
|
218
224
|
case 10: {
|
|
@@ -299,7 +305,7 @@ export const Contract = {
|
|
|
299
305
|
return obj;
|
|
300
306
|
},
|
|
301
307
|
create(base) {
|
|
302
|
-
return Contract.fromPartial(base ?? {});
|
|
308
|
+
return exports.Contract.fromPartial(base ?? {});
|
|
303
309
|
},
|
|
304
310
|
fromPartial(object) {
|
|
305
311
|
const message = createBaseContract();
|
|
@@ -319,8 +325,8 @@ export const Contract = {
|
|
|
319
325
|
function createBaseProposeContractRequest() {
|
|
320
326
|
return { proposer: "", counterparty: "", terms: undefined, description: "" };
|
|
321
327
|
}
|
|
322
|
-
|
|
323
|
-
encode(message, writer = new BinaryWriter()) {
|
|
328
|
+
exports.ProposeContractRequest = {
|
|
329
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
324
330
|
if (message.proposer !== "") {
|
|
325
331
|
writer.uint32(10).string(message.proposer);
|
|
326
332
|
}
|
|
@@ -328,7 +334,7 @@ export const ProposeContractRequest = {
|
|
|
328
334
|
writer.uint32(18).string(message.counterparty);
|
|
329
335
|
}
|
|
330
336
|
if (message.terms !== undefined) {
|
|
331
|
-
Struct.encode(Struct.wrap(message.terms), writer.uint32(26).fork()).join();
|
|
337
|
+
struct_js_1.Struct.encode(struct_js_1.Struct.wrap(message.terms), writer.uint32(26).fork()).join();
|
|
332
338
|
}
|
|
333
339
|
if (message.description !== "") {
|
|
334
340
|
writer.uint32(34).string(message.description);
|
|
@@ -336,7 +342,7 @@ export const ProposeContractRequest = {
|
|
|
336
342
|
return writer;
|
|
337
343
|
},
|
|
338
344
|
decode(input, length) {
|
|
339
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
345
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
340
346
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
341
347
|
const message = createBaseProposeContractRequest();
|
|
342
348
|
while (reader.pos < end) {
|
|
@@ -360,7 +366,7 @@ export const ProposeContractRequest = {
|
|
|
360
366
|
if (tag !== 26) {
|
|
361
367
|
break;
|
|
362
368
|
}
|
|
363
|
-
message.terms = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
369
|
+
message.terms = struct_js_1.Struct.unwrap(struct_js_1.Struct.decode(reader, reader.uint32()));
|
|
364
370
|
continue;
|
|
365
371
|
}
|
|
366
372
|
case 4: {
|
|
@@ -403,7 +409,7 @@ export const ProposeContractRequest = {
|
|
|
403
409
|
return obj;
|
|
404
410
|
},
|
|
405
411
|
create(base) {
|
|
406
|
-
return ProposeContractRequest.fromPartial(base ?? {});
|
|
412
|
+
return exports.ProposeContractRequest.fromPartial(base ?? {});
|
|
407
413
|
},
|
|
408
414
|
fromPartial(object) {
|
|
409
415
|
const message = createBaseProposeContractRequest();
|
|
@@ -417,8 +423,8 @@ export const ProposeContractRequest = {
|
|
|
417
423
|
function createBaseAcceptContractRequest() {
|
|
418
424
|
return { contractId: "", acceptor: "" };
|
|
419
425
|
}
|
|
420
|
-
|
|
421
|
-
encode(message, writer = new BinaryWriter()) {
|
|
426
|
+
exports.AcceptContractRequest = {
|
|
427
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
422
428
|
if (message.contractId !== "") {
|
|
423
429
|
writer.uint32(10).string(message.contractId);
|
|
424
430
|
}
|
|
@@ -428,7 +434,7 @@ export const AcceptContractRequest = {
|
|
|
428
434
|
return writer;
|
|
429
435
|
},
|
|
430
436
|
decode(input, length) {
|
|
431
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
437
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
432
438
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
433
439
|
const message = createBaseAcceptContractRequest();
|
|
434
440
|
while (reader.pos < end) {
|
|
@@ -477,7 +483,7 @@ export const AcceptContractRequest = {
|
|
|
477
483
|
return obj;
|
|
478
484
|
},
|
|
479
485
|
create(base) {
|
|
480
|
-
return AcceptContractRequest.fromPartial(base ?? {});
|
|
486
|
+
return exports.AcceptContractRequest.fromPartial(base ?? {});
|
|
481
487
|
},
|
|
482
488
|
fromPartial(object) {
|
|
483
489
|
const message = createBaseAcceptContractRequest();
|
|
@@ -489,8 +495,8 @@ export const AcceptContractRequest = {
|
|
|
489
495
|
function createBaseCompleteContractRequest() {
|
|
490
496
|
return { contractId: "", completer: "", proof: "" };
|
|
491
497
|
}
|
|
492
|
-
|
|
493
|
-
encode(message, writer = new BinaryWriter()) {
|
|
498
|
+
exports.CompleteContractRequest = {
|
|
499
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
494
500
|
if (message.contractId !== "") {
|
|
495
501
|
writer.uint32(10).string(message.contractId);
|
|
496
502
|
}
|
|
@@ -503,7 +509,7 @@ export const CompleteContractRequest = {
|
|
|
503
509
|
return writer;
|
|
504
510
|
},
|
|
505
511
|
decode(input, length) {
|
|
506
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
512
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
507
513
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
508
514
|
const message = createBaseCompleteContractRequest();
|
|
509
515
|
while (reader.pos < end) {
|
|
@@ -563,7 +569,7 @@ export const CompleteContractRequest = {
|
|
|
563
569
|
return obj;
|
|
564
570
|
},
|
|
565
571
|
create(base) {
|
|
566
|
-
return CompleteContractRequest.fromPartial(base ?? {});
|
|
572
|
+
return exports.CompleteContractRequest.fromPartial(base ?? {});
|
|
567
573
|
},
|
|
568
574
|
fromPartial(object) {
|
|
569
575
|
const message = createBaseCompleteContractRequest();
|
|
@@ -576,8 +582,8 @@ export const CompleteContractRequest = {
|
|
|
576
582
|
function createBaseRejectContractRequest() {
|
|
577
583
|
return { contractId: "", rejector: "", reason: "" };
|
|
578
584
|
}
|
|
579
|
-
|
|
580
|
-
encode(message, writer = new BinaryWriter()) {
|
|
585
|
+
exports.RejectContractRequest = {
|
|
586
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
581
587
|
if (message.contractId !== "") {
|
|
582
588
|
writer.uint32(10).string(message.contractId);
|
|
583
589
|
}
|
|
@@ -590,7 +596,7 @@ export const RejectContractRequest = {
|
|
|
590
596
|
return writer;
|
|
591
597
|
},
|
|
592
598
|
decode(input, length) {
|
|
593
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
599
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
594
600
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
595
601
|
const message = createBaseRejectContractRequest();
|
|
596
602
|
while (reader.pos < end) {
|
|
@@ -650,7 +656,7 @@ export const RejectContractRequest = {
|
|
|
650
656
|
return obj;
|
|
651
657
|
},
|
|
652
658
|
create(base) {
|
|
653
|
-
return RejectContractRequest.fromPartial(base ?? {});
|
|
659
|
+
return exports.RejectContractRequest.fromPartial(base ?? {});
|
|
654
660
|
},
|
|
655
661
|
fromPartial(object) {
|
|
656
662
|
const message = createBaseRejectContractRequest();
|
|
@@ -663,8 +669,8 @@ export const RejectContractRequest = {
|
|
|
663
669
|
function createBaseDisputeContractRequest() {
|
|
664
670
|
return { contractId: "", disputant: "", evidence: "", reason: "" };
|
|
665
671
|
}
|
|
666
|
-
|
|
667
|
-
encode(message, writer = new BinaryWriter()) {
|
|
672
|
+
exports.DisputeContractRequest = {
|
|
673
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
668
674
|
if (message.contractId !== "") {
|
|
669
675
|
writer.uint32(10).string(message.contractId);
|
|
670
676
|
}
|
|
@@ -680,7 +686,7 @@ export const DisputeContractRequest = {
|
|
|
680
686
|
return writer;
|
|
681
687
|
},
|
|
682
688
|
decode(input, length) {
|
|
683
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
689
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
684
690
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
685
691
|
const message = createBaseDisputeContractRequest();
|
|
686
692
|
while (reader.pos < end) {
|
|
@@ -751,7 +757,7 @@ export const DisputeContractRequest = {
|
|
|
751
757
|
return obj;
|
|
752
758
|
},
|
|
753
759
|
create(base) {
|
|
754
|
-
return DisputeContractRequest.fromPartial(base ?? {});
|
|
760
|
+
return exports.DisputeContractRequest.fromPartial(base ?? {});
|
|
755
761
|
},
|
|
756
762
|
fromPartial(object) {
|
|
757
763
|
const message = createBaseDisputeContractRequest();
|
|
@@ -765,8 +771,8 @@ export const DisputeContractRequest = {
|
|
|
765
771
|
function createBaseContractDefinition() {
|
|
766
772
|
return { requireBothSignatures: false, disputeWindowEpochs: 0 };
|
|
767
773
|
}
|
|
768
|
-
|
|
769
|
-
encode(message, writer = new BinaryWriter()) {
|
|
774
|
+
exports.ContractDefinition = {
|
|
775
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
770
776
|
if (message.requireBothSignatures !== false) {
|
|
771
777
|
writer.uint32(8).bool(message.requireBothSignatures);
|
|
772
778
|
}
|
|
@@ -776,7 +782,7 @@ export const ContractDefinition = {
|
|
|
776
782
|
return writer;
|
|
777
783
|
},
|
|
778
784
|
decode(input, length) {
|
|
779
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
785
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
780
786
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
781
787
|
const message = createBaseContractDefinition();
|
|
782
788
|
while (reader.pos < end) {
|
|
@@ -829,7 +835,7 @@ export const ContractDefinition = {
|
|
|
829
835
|
return obj;
|
|
830
836
|
},
|
|
831
837
|
create(base) {
|
|
832
|
-
return ContractDefinition.fromPartial(base ?? {});
|
|
838
|
+
return exports.ContractDefinition.fromPartial(base ?? {});
|
|
833
839
|
},
|
|
834
840
|
fromPartial(object) {
|
|
835
841
|
const message = createBaseContractDefinition();
|
|
@@ -856,7 +862,7 @@ function fromJsonTimestamp(o) {
|
|
|
856
862
|
return new globalThis.Date(o);
|
|
857
863
|
}
|
|
858
864
|
else {
|
|
859
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
865
|
+
return fromTimestamp(timestamp_js_1.Timestamp.fromJSON(o));
|
|
860
866
|
}
|
|
861
867
|
}
|
|
862
868
|
function isObject(value) {
|