@bitgo-beta/sdk-coin-canton 1.0.1-beta.3 → 1.0.1-beta.30
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/dist/resources/hash/hash.d.ts +5 -0
- package/dist/resources/hash/hash.js +297 -0
- package/dist/resources/proto/damlTransaction.js +100 -0
- package/dist/resources/proto/damlTransactionNode.js +71 -0
- package/dist/resources/proto/damlTransactionNodeSeed.js +56 -0
- package/dist/resources/proto/metadata/metadataGlobalKeyMappingEntry.js +53 -0
- package/dist/resources/proto/metadata/metadataInputContract.js +80 -0
- package/dist/resources/proto/metadata/metadataSubmitterInfo.js +62 -0
- package/dist/resources/proto/metadata.js +189 -0
- package/dist/resources/proto/node/empty.js +36 -0
- package/dist/resources/proto/node/globalKey.js +81 -0
- package/dist/resources/proto/node/identifier.js +73 -0
- package/dist/resources/proto/node/node.js +656 -0
- package/dist/resources/proto/node/timestamp.js +145 -0
- package/dist/resources/proto/node/value.js +824 -0
- package/dist/resources/proto/preparedTransaction.d.ts +8 -0
- package/dist/resources/proto/preparedTransaction.js +66 -0
- package/dist/src/canton.d.ts +37 -0
- package/dist/src/canton.d.ts.map +1 -0
- package/dist/src/canton.js +94 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +20 -0
- package/dist/src/lib/constant.d.ts +12 -0
- package/dist/src/lib/constant.d.ts.map +1 -0
- package/dist/src/lib/constant.js +15 -0
- package/dist/src/lib/iface.d.ts +58 -0
- package/dist/src/lib/iface.d.ts.map +1 -0
- package/dist/src/lib/iface.js +3 -0
- package/dist/src/lib/index.d.ts +8 -0
- package/dist/src/lib/index.d.ts.map +1 -0
- package/dist/src/lib/index.js +49 -0
- package/dist/src/lib/keyPair.d.ts +18 -0
- package/dist/src/lib/keyPair.d.ts.map +1 -0
- package/dist/src/lib/keyPair.js +44 -0
- package/dist/src/lib/oneStepPreApprovalBuilder.d.ts +49 -0
- package/dist/src/lib/oneStepPreApprovalBuilder.d.ts.map +1 -0
- package/dist/src/lib/oneStepPreApprovalBuilder.js +87 -0
- package/dist/src/lib/resourcesInterface.d.ts +214 -0
- package/dist/src/lib/resourcesInterface.d.ts.map +1 -0
- package/dist/src/lib/resourcesInterface.js +3 -0
- package/dist/src/lib/transaction/transaction.d.ts +18 -0
- package/dist/src/lib/transaction/transaction.d.ts.map +1 -0
- package/dist/src/lib/transaction/transaction.js +79 -0
- package/dist/src/lib/transactionBuilder.d.ts +36 -0
- package/dist/src/lib/transactionBuilder.d.ts.map +1 -0
- package/dist/src/lib/transactionBuilder.js +86 -0
- package/dist/src/lib/transactionBuilderFactory.d.ts +12 -0
- package/dist/src/lib/transactionBuilderFactory.d.ts.map +1 -0
- package/dist/src/lib/transactionBuilderFactory.js +20 -0
- package/dist/src/lib/transferBuilder.d.ts +10 -0
- package/dist/src/lib/transferBuilder.d.ts.map +1 -0
- package/dist/src/lib/transferBuilder.js +18 -0
- package/dist/src/lib/utils.d.ts +107 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +243 -0
- package/dist/src/lib/walletInitBuilder.d.ts +98 -0
- package/dist/src/lib/walletInitBuilder.d.ts.map +1 -0
- package/dist/src/lib/walletInitBuilder.js +223 -0
- package/dist/src/lib/walletInitialization/walletInitTransaction.d.ts +16 -0
- package/dist/src/lib/walletInitialization/walletInitTransaction.d.ts.map +1 -0
- package/dist/src/lib/walletInitialization/walletInitTransaction.js +59 -0
- package/dist/src/register.d.ts +3 -0
- package/dist/src/register.d.ts.map +1 -0
- package/dist/src/register.js +11 -0
- package/dist/src/tcanton.d.ts +17 -0
- package/dist/src/tcanton.d.ts.map +1 -0
- package/dist/src/tcanton.js +30 -0
- package/dist/test/integration/index.d.ts +1 -0
- package/dist/test/integration/index.d.ts.map +1 -0
- package/dist/test/integration/index.js +1 -0
- package/dist/test/resources.d.ts +40 -0
- package/dist/test/resources.d.ts.map +1 -0
- package/dist/test/resources.js +53 -0
- package/dist/test/unit/builder/oneStepEnablement/oneStepEnablementBuilder.d.ts +2 -0
- package/dist/test/unit/builder/oneStepEnablement/oneStepEnablementBuilder.d.ts.map +1 -0
- package/dist/test/unit/builder/oneStepEnablement/oneStepEnablementBuilder.js +67 -0
- package/dist/test/unit/builder/walletInit/walletInitBuilder.d.ts +2 -0
- package/dist/test/unit/builder/walletInit/walletInitBuilder.d.ts.map +1 -0
- package/dist/test/unit/builder/walletInit/walletInitBuilder.js +66 -0
- package/dist/test/unit/index.d.ts +2 -0
- package/dist/test/unit/index.d.ts.map +1 -0
- package/dist/test/unit/index.js +16 -0
- package/dist/test/unit/keyPair.d.ts +2 -0
- package/dist/test/unit/keyPair.d.ts.map +1 -0
- package/dist/test/unit/keyPair.js +72 -0
- package/dist/test/unit/utils.d.ts +2 -0
- package/dist/test/unit/utils.d.ts.map +1 -0
- package/dist/test/unit/utils.js +35 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +16 -11
- package/.eslintignore +0 -5
- package/.mocharc.yml +0 -8
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
import { MessageType, UnknownFieldHandler, reflectionMergePartial, WireType } from '@protobuf-ts/runtime';
|
|
2
|
+
import { Value } from './value.js';
|
|
3
|
+
import { Identifier } from './identifier.js';
|
|
4
|
+
|
|
5
|
+
class Fetch$Type extends MessageType {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('com.daml.ledger.api.v2.interactive.transaction.v1.Fetch', [
|
|
8
|
+
{
|
|
9
|
+
no: 1,
|
|
10
|
+
name: 'lf_version',
|
|
11
|
+
kind: 'scalar',
|
|
12
|
+
T: 9 /*ScalarType.STRING*/,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
no: 2,
|
|
16
|
+
name: 'contract_id',
|
|
17
|
+
kind: 'scalar',
|
|
18
|
+
T: 9 /*ScalarType.STRING*/,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
no: 3,
|
|
22
|
+
name: 'package_name',
|
|
23
|
+
kind: 'scalar',
|
|
24
|
+
T: 9 /*ScalarType.STRING*/,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
no: 4,
|
|
28
|
+
name: 'template_id',
|
|
29
|
+
kind: 'message',
|
|
30
|
+
T: () => Identifier,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
no: 5,
|
|
34
|
+
name: 'signatories',
|
|
35
|
+
kind: 'scalar',
|
|
36
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
37
|
+
T: 9 /*ScalarType.STRING*/,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
no: 6,
|
|
41
|
+
name: 'stakeholders',
|
|
42
|
+
kind: 'scalar',
|
|
43
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
44
|
+
T: 9 /*ScalarType.STRING*/,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
no: 7,
|
|
48
|
+
name: 'acting_parties',
|
|
49
|
+
kind: 'scalar',
|
|
50
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
51
|
+
T: 9 /*ScalarType.STRING*/,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
no: 8,
|
|
55
|
+
name: 'interface_id',
|
|
56
|
+
kind: 'message',
|
|
57
|
+
T: () => Identifier,
|
|
58
|
+
},
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
create(value) {
|
|
62
|
+
const message = Object.create(this.messagePrototype);
|
|
63
|
+
message.lfVersion = '';
|
|
64
|
+
message.contractId = '';
|
|
65
|
+
message.packageName = '';
|
|
66
|
+
message.signatories = [];
|
|
67
|
+
message.stakeholders = [];
|
|
68
|
+
message.actingParties = [];
|
|
69
|
+
if (value !== undefined) reflectionMergePartial(this, message, value);
|
|
70
|
+
return message;
|
|
71
|
+
}
|
|
72
|
+
internalBinaryRead(reader, length, options, target) {
|
|
73
|
+
const message = target ?? this.create(),
|
|
74
|
+
end = reader.pos + length;
|
|
75
|
+
while (reader.pos < end) {
|
|
76
|
+
const [fieldNo, wireType] = reader.tag();
|
|
77
|
+
switch (fieldNo) {
|
|
78
|
+
case /* string lf_version */ 1:
|
|
79
|
+
message.lfVersion = reader.string();
|
|
80
|
+
break;
|
|
81
|
+
case /* string contract_id */ 2:
|
|
82
|
+
message.contractId = reader.string();
|
|
83
|
+
break;
|
|
84
|
+
case /* string package_name */ 3:
|
|
85
|
+
message.packageName = reader.string();
|
|
86
|
+
break;
|
|
87
|
+
case /* com.daml.ledger.api.v2.Identifier template_id */ 4:
|
|
88
|
+
message.templateId = Identifier.internalBinaryRead(reader, reader.uint32(), options, message.templateId);
|
|
89
|
+
break;
|
|
90
|
+
case /* repeated string signatories */ 5:
|
|
91
|
+
message.signatories.push(reader.string());
|
|
92
|
+
break;
|
|
93
|
+
case /* repeated string stakeholders */ 6:
|
|
94
|
+
message.stakeholders.push(reader.string());
|
|
95
|
+
break;
|
|
96
|
+
case /* repeated string acting_parties */ 7:
|
|
97
|
+
message.actingParties.push(reader.string());
|
|
98
|
+
break;
|
|
99
|
+
case /* com.daml.ledger.api.v2.Identifier interface_id */ 8:
|
|
100
|
+
message.interfaceId = Identifier.internalBinaryRead(reader, reader.uint32(), options, message.interfaceId);
|
|
101
|
+
break;
|
|
102
|
+
default:
|
|
103
|
+
const u = options.readUnknownField;
|
|
104
|
+
if (u === 'throw') throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
105
|
+
const d = reader.skip(wireType);
|
|
106
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return message;
|
|
110
|
+
}
|
|
111
|
+
internalBinaryWrite(message, writer, options) {
|
|
112
|
+
/* string lf_version = 1; */
|
|
113
|
+
if (message.lfVersion !== '') writer.tag(1, WireType.LengthDelimited).string(message.lfVersion);
|
|
114
|
+
/* string contract_id = 2; */
|
|
115
|
+
if (message.contractId !== '') writer.tag(2, WireType.LengthDelimited).string(message.contractId);
|
|
116
|
+
/* string package_name = 3; */
|
|
117
|
+
if (message.packageName !== '') writer.tag(3, WireType.LengthDelimited).string(message.packageName);
|
|
118
|
+
/* com.daml.ledger.api.v2.Identifier template_id = 4; */
|
|
119
|
+
if (message.templateId)
|
|
120
|
+
Identifier.internalBinaryWrite(
|
|
121
|
+
message.templateId,
|
|
122
|
+
writer.tag(4, WireType.LengthDelimited).fork(),
|
|
123
|
+
options
|
|
124
|
+
).join();
|
|
125
|
+
/* repeated string signatories = 5; */
|
|
126
|
+
for (let i = 0; i < message.signatories.length; i++)
|
|
127
|
+
writer.tag(5, WireType.LengthDelimited).string(message.signatories[i]);
|
|
128
|
+
/* repeated string stakeholders = 6; */
|
|
129
|
+
for (let i = 0; i < message.stakeholders.length; i++)
|
|
130
|
+
writer.tag(6, WireType.LengthDelimited).string(message.stakeholders[i]);
|
|
131
|
+
/* repeated string acting_parties = 7; */
|
|
132
|
+
for (let i = 0; i < message.actingParties.length; i++)
|
|
133
|
+
writer.tag(7, WireType.LengthDelimited).string(message.actingParties[i]);
|
|
134
|
+
/* com.daml.ledger.api.v2.Identifier interface_id = 8; */
|
|
135
|
+
if (message.interfaceId)
|
|
136
|
+
Identifier.internalBinaryWrite(
|
|
137
|
+
message.interfaceId,
|
|
138
|
+
writer.tag(8, WireType.LengthDelimited).fork(),
|
|
139
|
+
options
|
|
140
|
+
).join();
|
|
141
|
+
const u = options.writeUnknownFields;
|
|
142
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
143
|
+
return writer;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @generated MessageType for protobuf message com.daml.ledger.api.v2.interactive.transaction.v1.Fetch
|
|
148
|
+
*/
|
|
149
|
+
export const Fetch = new Fetch$Type();
|
|
150
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
151
|
+
class Exercise$Type extends MessageType {
|
|
152
|
+
constructor() {
|
|
153
|
+
super('com.daml.ledger.api.v2.interactive.transaction.v1.Exercise', [
|
|
154
|
+
{
|
|
155
|
+
no: 1,
|
|
156
|
+
name: 'lf_version',
|
|
157
|
+
kind: 'scalar',
|
|
158
|
+
T: 9 /*ScalarType.STRING*/,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
no: 2,
|
|
162
|
+
name: 'contract_id',
|
|
163
|
+
kind: 'scalar',
|
|
164
|
+
T: 9 /*ScalarType.STRING*/,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
no: 3,
|
|
168
|
+
name: 'package_name',
|
|
169
|
+
kind: 'scalar',
|
|
170
|
+
T: 9 /*ScalarType.STRING*/,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
no: 4,
|
|
174
|
+
name: 'template_id',
|
|
175
|
+
kind: 'message',
|
|
176
|
+
T: () => Identifier,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
no: 5,
|
|
180
|
+
name: 'signatories',
|
|
181
|
+
kind: 'scalar',
|
|
182
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
183
|
+
T: 9 /*ScalarType.STRING*/,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
no: 6,
|
|
187
|
+
name: 'stakeholders',
|
|
188
|
+
kind: 'scalar',
|
|
189
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
190
|
+
T: 9 /*ScalarType.STRING*/,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
no: 7,
|
|
194
|
+
name: 'acting_parties',
|
|
195
|
+
kind: 'scalar',
|
|
196
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
197
|
+
T: 9 /*ScalarType.STRING*/,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
no: 8,
|
|
201
|
+
name: 'interface_id',
|
|
202
|
+
kind: 'message',
|
|
203
|
+
T: () => Identifier,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
no: 9,
|
|
207
|
+
name: 'choice_id',
|
|
208
|
+
kind: 'scalar',
|
|
209
|
+
T: 9 /*ScalarType.STRING*/,
|
|
210
|
+
},
|
|
211
|
+
{ no: 10, name: 'chosen_value', kind: 'message', T: () => Value },
|
|
212
|
+
{
|
|
213
|
+
no: 11,
|
|
214
|
+
name: 'consuming',
|
|
215
|
+
kind: 'scalar',
|
|
216
|
+
T: 8 /*ScalarType.BOOL*/,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
no: 12,
|
|
220
|
+
name: 'children',
|
|
221
|
+
kind: 'scalar',
|
|
222
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
223
|
+
T: 9 /*ScalarType.STRING*/,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
no: 13,
|
|
227
|
+
name: 'exercise_result',
|
|
228
|
+
kind: 'message',
|
|
229
|
+
T: () => Value,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
no: 14,
|
|
233
|
+
name: 'choice_observers',
|
|
234
|
+
kind: 'scalar',
|
|
235
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
236
|
+
T: 9 /*ScalarType.STRING*/,
|
|
237
|
+
},
|
|
238
|
+
]);
|
|
239
|
+
}
|
|
240
|
+
create(value) {
|
|
241
|
+
const message = Object.create(this.messagePrototype);
|
|
242
|
+
message.lfVersion = '';
|
|
243
|
+
message.contractId = '';
|
|
244
|
+
message.packageName = '';
|
|
245
|
+
message.signatories = [];
|
|
246
|
+
message.stakeholders = [];
|
|
247
|
+
message.actingParties = [];
|
|
248
|
+
message.choiceId = '';
|
|
249
|
+
message.consuming = false;
|
|
250
|
+
message.children = [];
|
|
251
|
+
message.choiceObservers = [];
|
|
252
|
+
if (value !== undefined) reflectionMergePartial(this, message, value);
|
|
253
|
+
return message;
|
|
254
|
+
}
|
|
255
|
+
internalBinaryRead(reader, length, options, target) {
|
|
256
|
+
const message = target ?? this.create(),
|
|
257
|
+
end = reader.pos + length;
|
|
258
|
+
while (reader.pos < end) {
|
|
259
|
+
const [fieldNo, wireType] = reader.tag();
|
|
260
|
+
switch (fieldNo) {
|
|
261
|
+
case /* string lf_version */ 1:
|
|
262
|
+
message.lfVersion = reader.string();
|
|
263
|
+
break;
|
|
264
|
+
case /* string contract_id */ 2:
|
|
265
|
+
message.contractId = reader.string();
|
|
266
|
+
break;
|
|
267
|
+
case /* string package_name */ 3:
|
|
268
|
+
message.packageName = reader.string();
|
|
269
|
+
break;
|
|
270
|
+
case /* com.daml.ledger.api.v2.Identifier template_id */ 4:
|
|
271
|
+
message.templateId = Identifier.internalBinaryRead(reader, reader.uint32(), options, message.templateId);
|
|
272
|
+
break;
|
|
273
|
+
case /* repeated string signatories */ 5:
|
|
274
|
+
message.signatories.push(reader.string());
|
|
275
|
+
break;
|
|
276
|
+
case /* repeated string stakeholders */ 6:
|
|
277
|
+
message.stakeholders.push(reader.string());
|
|
278
|
+
break;
|
|
279
|
+
case /* repeated string acting_parties */ 7:
|
|
280
|
+
message.actingParties.push(reader.string());
|
|
281
|
+
break;
|
|
282
|
+
case /* com.daml.ledger.api.v2.Identifier interface_id */ 8:
|
|
283
|
+
message.interfaceId = Identifier.internalBinaryRead(reader, reader.uint32(), options, message.interfaceId);
|
|
284
|
+
break;
|
|
285
|
+
case /* string choice_id */ 9:
|
|
286
|
+
message.choiceId = reader.string();
|
|
287
|
+
break;
|
|
288
|
+
case /* com.daml.ledger.api.v2.Value chosen_value */ 10:
|
|
289
|
+
message.chosenValue = Value.internalBinaryRead(reader, reader.uint32(), options, message.chosenValue);
|
|
290
|
+
break;
|
|
291
|
+
case /* bool consuming */ 11:
|
|
292
|
+
message.consuming = reader.bool();
|
|
293
|
+
break;
|
|
294
|
+
case /* repeated string children */ 12:
|
|
295
|
+
message.children.push(reader.string());
|
|
296
|
+
break;
|
|
297
|
+
case /* com.daml.ledger.api.v2.Value exercise_result */ 13:
|
|
298
|
+
message.exerciseResult = Value.internalBinaryRead(reader, reader.uint32(), options, message.exerciseResult);
|
|
299
|
+
break;
|
|
300
|
+
case /* repeated string choice_observers */ 14:
|
|
301
|
+
message.choiceObservers.push(reader.string());
|
|
302
|
+
break;
|
|
303
|
+
default:
|
|
304
|
+
const u = options.readUnknownField;
|
|
305
|
+
if (u === 'throw') throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
306
|
+
const d = reader.skip(wireType);
|
|
307
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return message;
|
|
311
|
+
}
|
|
312
|
+
internalBinaryWrite(message, writer, options) {
|
|
313
|
+
/* string lf_version = 1; */
|
|
314
|
+
if (message.lfVersion !== '') writer.tag(1, WireType.LengthDelimited).string(message.lfVersion);
|
|
315
|
+
/* string contract_id = 2; */
|
|
316
|
+
if (message.contractId !== '') writer.tag(2, WireType.LengthDelimited).string(message.contractId);
|
|
317
|
+
/* string package_name = 3; */
|
|
318
|
+
if (message.packageName !== '') writer.tag(3, WireType.LengthDelimited).string(message.packageName);
|
|
319
|
+
/* com.daml.ledger.api.v2.Identifier template_id = 4; */
|
|
320
|
+
if (message.templateId)
|
|
321
|
+
Identifier.internalBinaryWrite(
|
|
322
|
+
message.templateId,
|
|
323
|
+
writer.tag(4, WireType.LengthDelimited).fork(),
|
|
324
|
+
options
|
|
325
|
+
).join();
|
|
326
|
+
/* repeated string signatories = 5; */
|
|
327
|
+
for (let i = 0; i < message.signatories.length; i++)
|
|
328
|
+
writer.tag(5, WireType.LengthDelimited).string(message.signatories[i]);
|
|
329
|
+
/* repeated string stakeholders = 6; */
|
|
330
|
+
for (let i = 0; i < message.stakeholders.length; i++)
|
|
331
|
+
writer.tag(6, WireType.LengthDelimited).string(message.stakeholders[i]);
|
|
332
|
+
/* repeated string acting_parties = 7; */
|
|
333
|
+
for (let i = 0; i < message.actingParties.length; i++)
|
|
334
|
+
writer.tag(7, WireType.LengthDelimited).string(message.actingParties[i]);
|
|
335
|
+
/* com.daml.ledger.api.v2.Identifier interface_id = 8; */
|
|
336
|
+
if (message.interfaceId)
|
|
337
|
+
Identifier.internalBinaryWrite(
|
|
338
|
+
message.interfaceId,
|
|
339
|
+
writer.tag(8, WireType.LengthDelimited).fork(),
|
|
340
|
+
options
|
|
341
|
+
).join();
|
|
342
|
+
/* string choice_id = 9; */
|
|
343
|
+
if (message.choiceId !== '') writer.tag(9, WireType.LengthDelimited).string(message.choiceId);
|
|
344
|
+
/* com.daml.ledger.api.v2.Value chosen_value = 10; */
|
|
345
|
+
if (message.chosenValue)
|
|
346
|
+
Value.internalBinaryWrite(message.chosenValue, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
347
|
+
/* bool consuming = 11; */
|
|
348
|
+
if (message.consuming !== false) writer.tag(11, WireType.Varint).bool(message.consuming);
|
|
349
|
+
/* repeated string children = 12; */
|
|
350
|
+
for (let i = 0; i < message.children.length; i++)
|
|
351
|
+
writer.tag(12, WireType.LengthDelimited).string(message.children[i]);
|
|
352
|
+
/* com.daml.ledger.api.v2.Value exercise_result = 13; */
|
|
353
|
+
if (message.exerciseResult)
|
|
354
|
+
Value.internalBinaryWrite(
|
|
355
|
+
message.exerciseResult,
|
|
356
|
+
writer.tag(13, WireType.LengthDelimited).fork(),
|
|
357
|
+
options
|
|
358
|
+
).join();
|
|
359
|
+
/* repeated string choice_observers = 14; */
|
|
360
|
+
for (let i = 0; i < message.choiceObservers.length; i++)
|
|
361
|
+
writer.tag(14, WireType.LengthDelimited).string(message.choiceObservers[i]);
|
|
362
|
+
const u = options.writeUnknownFields;
|
|
363
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
364
|
+
return writer;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* @generated MessageType for protobuf message com.daml.ledger.api.v2.interactive.transaction.v1.Exercise
|
|
369
|
+
*/
|
|
370
|
+
export const Exercise = new Exercise$Type();
|
|
371
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
372
|
+
class Create$Type extends MessageType {
|
|
373
|
+
constructor() {
|
|
374
|
+
super('com.daml.ledger.api.v2.interactive.transaction.v1.Create', [
|
|
375
|
+
{
|
|
376
|
+
no: 1,
|
|
377
|
+
name: 'lf_version',
|
|
378
|
+
kind: 'scalar',
|
|
379
|
+
T: 9 /*ScalarType.STRING*/,
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
no: 2,
|
|
383
|
+
name: 'contract_id',
|
|
384
|
+
kind: 'scalar',
|
|
385
|
+
T: 9 /*ScalarType.STRING*/,
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
no: 3,
|
|
389
|
+
name: 'package_name',
|
|
390
|
+
kind: 'scalar',
|
|
391
|
+
T: 9 /*ScalarType.STRING*/,
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
no: 4,
|
|
395
|
+
name: 'template_id',
|
|
396
|
+
kind: 'message',
|
|
397
|
+
T: () => Identifier,
|
|
398
|
+
},
|
|
399
|
+
{ no: 5, name: 'argument', kind: 'message', T: () => Value },
|
|
400
|
+
{
|
|
401
|
+
no: 6,
|
|
402
|
+
name: 'signatories',
|
|
403
|
+
kind: 'scalar',
|
|
404
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
405
|
+
T: 9 /*ScalarType.STRING*/,
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
no: 7,
|
|
409
|
+
name: 'stakeholders',
|
|
410
|
+
kind: 'scalar',
|
|
411
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
412
|
+
T: 9 /*ScalarType.STRING*/,
|
|
413
|
+
},
|
|
414
|
+
]);
|
|
415
|
+
}
|
|
416
|
+
create(value) {
|
|
417
|
+
const message = Object.create(this.messagePrototype);
|
|
418
|
+
message.lfVersion = '';
|
|
419
|
+
message.contractId = '';
|
|
420
|
+
message.packageName = '';
|
|
421
|
+
message.signatories = [];
|
|
422
|
+
message.stakeholders = [];
|
|
423
|
+
if (value !== undefined) reflectionMergePartial(this, message, value);
|
|
424
|
+
return message;
|
|
425
|
+
}
|
|
426
|
+
internalBinaryRead(reader, length, options, target) {
|
|
427
|
+
const message = target ?? this.create(),
|
|
428
|
+
end = reader.pos + length;
|
|
429
|
+
while (reader.pos < end) {
|
|
430
|
+
const [fieldNo, wireType] = reader.tag();
|
|
431
|
+
switch (fieldNo) {
|
|
432
|
+
case /* string lf_version */ 1:
|
|
433
|
+
message.lfVersion = reader.string();
|
|
434
|
+
break;
|
|
435
|
+
case /* string contract_id */ 2:
|
|
436
|
+
message.contractId = reader.string();
|
|
437
|
+
break;
|
|
438
|
+
case /* string package_name */ 3:
|
|
439
|
+
message.packageName = reader.string();
|
|
440
|
+
break;
|
|
441
|
+
case /* com.daml.ledger.api.v2.Identifier template_id */ 4:
|
|
442
|
+
message.templateId = Identifier.internalBinaryRead(reader, reader.uint32(), options, message.templateId);
|
|
443
|
+
break;
|
|
444
|
+
case /* com.daml.ledger.api.v2.Value argument */ 5:
|
|
445
|
+
message.argument = Value.internalBinaryRead(reader, reader.uint32(), options, message.argument);
|
|
446
|
+
break;
|
|
447
|
+
case /* repeated string signatories */ 6:
|
|
448
|
+
message.signatories.push(reader.string());
|
|
449
|
+
break;
|
|
450
|
+
case /* repeated string stakeholders */ 7:
|
|
451
|
+
message.stakeholders.push(reader.string());
|
|
452
|
+
break;
|
|
453
|
+
default:
|
|
454
|
+
const u = options.readUnknownField;
|
|
455
|
+
if (u === 'throw') throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
456
|
+
const d = reader.skip(wireType);
|
|
457
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return message;
|
|
461
|
+
}
|
|
462
|
+
internalBinaryWrite(message, writer, options) {
|
|
463
|
+
/* string lf_version = 1; */
|
|
464
|
+
if (message.lfVersion !== '') writer.tag(1, WireType.LengthDelimited).string(message.lfVersion);
|
|
465
|
+
/* string contract_id = 2; */
|
|
466
|
+
if (message.contractId !== '') writer.tag(2, WireType.LengthDelimited).string(message.contractId);
|
|
467
|
+
/* string package_name = 3; */
|
|
468
|
+
if (message.packageName !== '') writer.tag(3, WireType.LengthDelimited).string(message.packageName);
|
|
469
|
+
/* com.daml.ledger.api.v2.Identifier template_id = 4; */
|
|
470
|
+
if (message.templateId)
|
|
471
|
+
Identifier.internalBinaryWrite(
|
|
472
|
+
message.templateId,
|
|
473
|
+
writer.tag(4, WireType.LengthDelimited).fork(),
|
|
474
|
+
options
|
|
475
|
+
).join();
|
|
476
|
+
/* com.daml.ledger.api.v2.Value argument = 5; */
|
|
477
|
+
if (message.argument)
|
|
478
|
+
Value.internalBinaryWrite(message.argument, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
479
|
+
/* repeated string signatories = 6; */
|
|
480
|
+
for (let i = 0; i < message.signatories.length; i++)
|
|
481
|
+
writer.tag(6, WireType.LengthDelimited).string(message.signatories[i]);
|
|
482
|
+
/* repeated string stakeholders = 7; */
|
|
483
|
+
for (let i = 0; i < message.stakeholders.length; i++)
|
|
484
|
+
writer.tag(7, WireType.LengthDelimited).string(message.stakeholders[i]);
|
|
485
|
+
const u = options.writeUnknownFields;
|
|
486
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
487
|
+
return writer;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* @generated MessageType for protobuf message com.daml.ledger.api.v2.interactive.transaction.v1.Create
|
|
492
|
+
*/
|
|
493
|
+
export const Create = new Create$Type();
|
|
494
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
495
|
+
class Rollback$Type extends MessageType {
|
|
496
|
+
constructor() {
|
|
497
|
+
super('com.daml.ledger.api.v2.interactive.transaction.v1.Rollback', [
|
|
498
|
+
{
|
|
499
|
+
no: 1,
|
|
500
|
+
name: 'children',
|
|
501
|
+
kind: 'scalar',
|
|
502
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
503
|
+
T: 9 /*ScalarType.STRING*/,
|
|
504
|
+
},
|
|
505
|
+
]);
|
|
506
|
+
}
|
|
507
|
+
create(value) {
|
|
508
|
+
const message = Object.create(this.messagePrototype);
|
|
509
|
+
message.children = [];
|
|
510
|
+
if (value !== undefined) reflectionMergePartial(this, message, value);
|
|
511
|
+
return message;
|
|
512
|
+
}
|
|
513
|
+
internalBinaryRead(reader, length, options, target) {
|
|
514
|
+
const message = target ?? this.create(),
|
|
515
|
+
end = reader.pos + length;
|
|
516
|
+
while (reader.pos < end) {
|
|
517
|
+
const [fieldNo, wireType] = reader.tag();
|
|
518
|
+
switch (fieldNo) {
|
|
519
|
+
case /* repeated string children */ 1:
|
|
520
|
+
message.children.push(reader.string());
|
|
521
|
+
break;
|
|
522
|
+
default:
|
|
523
|
+
const u = options.readUnknownField;
|
|
524
|
+
if (u === 'throw') throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
525
|
+
const d = reader.skip(wireType);
|
|
526
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return message;
|
|
530
|
+
}
|
|
531
|
+
internalBinaryWrite(message, writer, options) {
|
|
532
|
+
/* repeated string children = 1; */
|
|
533
|
+
for (let i = 0; i < message.children.length; i++)
|
|
534
|
+
writer.tag(1, WireType.LengthDelimited).string(message.children[i]);
|
|
535
|
+
const u = options.writeUnknownFields;
|
|
536
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
537
|
+
return writer;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* @generated MessageType for protobuf message com.daml.ledger.api.v2.interactive.transaction.v1.Rollback
|
|
542
|
+
*/
|
|
543
|
+
export const Rollback = new Rollback$Type();
|
|
544
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
545
|
+
class Node$Type extends MessageType {
|
|
546
|
+
constructor() {
|
|
547
|
+
super('com.daml.ledger.api.v2.interactive.transaction.v1.Node', [
|
|
548
|
+
{
|
|
549
|
+
no: 1,
|
|
550
|
+
name: 'create',
|
|
551
|
+
kind: 'message',
|
|
552
|
+
oneof: 'nodeType',
|
|
553
|
+
T: () => Create,
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
no: 2,
|
|
557
|
+
name: 'fetch',
|
|
558
|
+
kind: 'message',
|
|
559
|
+
oneof: 'nodeType',
|
|
560
|
+
T: () => Fetch,
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
no: 3,
|
|
564
|
+
name: 'exercise',
|
|
565
|
+
kind: 'message',
|
|
566
|
+
oneof: 'nodeType',
|
|
567
|
+
T: () => Exercise,
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
no: 4,
|
|
571
|
+
name: 'rollback',
|
|
572
|
+
kind: 'message',
|
|
573
|
+
oneof: 'nodeType',
|
|
574
|
+
T: () => Rollback,
|
|
575
|
+
},
|
|
576
|
+
]);
|
|
577
|
+
}
|
|
578
|
+
create(value) {
|
|
579
|
+
const message = Object.create(this.messagePrototype);
|
|
580
|
+
message.nodeType = { oneofKind: undefined };
|
|
581
|
+
if (value !== undefined) reflectionMergePartial(this, message, value);
|
|
582
|
+
return message;
|
|
583
|
+
}
|
|
584
|
+
internalBinaryRead(reader, length, options, target) {
|
|
585
|
+
const message = target ?? this.create(),
|
|
586
|
+
end = reader.pos + length;
|
|
587
|
+
while (reader.pos < end) {
|
|
588
|
+
const [fieldNo, wireType] = reader.tag();
|
|
589
|
+
switch (fieldNo) {
|
|
590
|
+
case /* com.daml.ledger.api.v2.interactive.transaction.v1.Create create */ 1:
|
|
591
|
+
message.nodeType = {
|
|
592
|
+
oneofKind: 'create',
|
|
593
|
+
create: Create.internalBinaryRead(reader, reader.uint32(), options, message.nodeType.create),
|
|
594
|
+
};
|
|
595
|
+
break;
|
|
596
|
+
case /* com.daml.ledger.api.v2.interactive.transaction.v1.Fetch fetch */ 2:
|
|
597
|
+
message.nodeType = {
|
|
598
|
+
oneofKind: 'fetch',
|
|
599
|
+
fetch: Fetch.internalBinaryRead(reader, reader.uint32(), options, message.nodeType.fetch),
|
|
600
|
+
};
|
|
601
|
+
break;
|
|
602
|
+
case /* com.daml.ledger.api.v2.interactive.transaction.v1.Exercise exercise */ 3:
|
|
603
|
+
message.nodeType = {
|
|
604
|
+
oneofKind: 'exercise',
|
|
605
|
+
exercise: Exercise.internalBinaryRead(reader, reader.uint32(), options, message.nodeType.exercise),
|
|
606
|
+
};
|
|
607
|
+
break;
|
|
608
|
+
case /* com.daml.ledger.api.v2.interactive.transaction.v1.Rollback rollback */ 4:
|
|
609
|
+
message.nodeType = {
|
|
610
|
+
oneofKind: 'rollback',
|
|
611
|
+
rollback: Rollback.internalBinaryRead(reader, reader.uint32(), options, message.nodeType.rollback),
|
|
612
|
+
};
|
|
613
|
+
break;
|
|
614
|
+
default:
|
|
615
|
+
const u = options.readUnknownField;
|
|
616
|
+
if (u === 'throw') throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
617
|
+
const d = reader.skip(wireType);
|
|
618
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
return message;
|
|
622
|
+
}
|
|
623
|
+
internalBinaryWrite(message, writer, options) {
|
|
624
|
+
/* com.daml.ledger.api.v2.interactive.transaction.v1.Create create = 1; */
|
|
625
|
+
if (message.nodeType.oneofKind === 'create')
|
|
626
|
+
Create.internalBinaryWrite(
|
|
627
|
+
message.nodeType.create,
|
|
628
|
+
writer.tag(1, WireType.LengthDelimited).fork(),
|
|
629
|
+
options
|
|
630
|
+
).join();
|
|
631
|
+
/* com.daml.ledger.api.v2.interactive.transaction.v1.Fetch fetch = 2; */
|
|
632
|
+
if (message.nodeType.oneofKind === 'fetch')
|
|
633
|
+
Fetch.internalBinaryWrite(message.nodeType.fetch, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
634
|
+
/* com.daml.ledger.api.v2.interactive.transaction.v1.Exercise exercise = 3; */
|
|
635
|
+
if (message.nodeType.oneofKind === 'exercise')
|
|
636
|
+
Exercise.internalBinaryWrite(
|
|
637
|
+
message.nodeType.exercise,
|
|
638
|
+
writer.tag(3, WireType.LengthDelimited).fork(),
|
|
639
|
+
options
|
|
640
|
+
).join();
|
|
641
|
+
/* com.daml.ledger.api.v2.interactive.transaction.v1.Rollback rollback = 4; */
|
|
642
|
+
if (message.nodeType.oneofKind === 'rollback')
|
|
643
|
+
Rollback.internalBinaryWrite(
|
|
644
|
+
message.nodeType.rollback,
|
|
645
|
+
writer.tag(4, WireType.LengthDelimited).fork(),
|
|
646
|
+
options
|
|
647
|
+
).join();
|
|
648
|
+
const u = options.writeUnknownFields;
|
|
649
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
650
|
+
return writer;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* @generated MessageType for protobuf message com.daml.ledger.api.v2.interactive.transaction.v1.Node
|
|
655
|
+
*/
|
|
656
|
+
export const Node = new Node$Type();
|