@avaprotocol/sdk-js 2.0.4 → 2.1.1
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/CHANGELOG.md +12 -0
- package/dist/auth.d.ts +2 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +10 -0
- package/dist/config.d.ts +9 -0
- package/dist/index.js +695 -147
- package/dist/index.mjs +706 -158
- package/dist/models/node/contractRead.d.ts.map +1 -1
- package/dist/models/node/contractRead.js +22 -5
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +10 -1
- package/dist/models/secret.d.ts +16 -0
- package/dist/models/step.d.ts.map +1 -1
- package/dist/models/step.js +33 -4
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +74 -27
- package/dist/utils.d.ts +60 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66,6 +66,9 @@ var require_avs_pb = __commonJS({
|
|
|
66
66
|
goog.exportSymbol("proto.aggregator.BranchNode.Output", null, global);
|
|
67
67
|
goog.exportSymbol("proto.aggregator.ContractReadNode", null, global);
|
|
68
68
|
goog.exportSymbol("proto.aggregator.ContractReadNode.Config", null, global);
|
|
69
|
+
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodCall", null, global);
|
|
70
|
+
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodResult", null, global);
|
|
71
|
+
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodResult.StructuredField", null, global);
|
|
69
72
|
goog.exportSymbol("proto.aggregator.ContractReadNode.Output", null, global);
|
|
70
73
|
goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global);
|
|
71
74
|
goog.exportSymbol("proto.aggregator.ContractWriteNode.Config", null, global);
|
|
@@ -86,9 +89,10 @@ var require_avs_pb = __commonJS({
|
|
|
86
89
|
goog.exportSymbol("proto.aggregator.Error", null, global);
|
|
87
90
|
goog.exportSymbol("proto.aggregator.EventTrigger", null, global);
|
|
88
91
|
goog.exportSymbol("proto.aggregator.EventTrigger.Config", null, global);
|
|
89
|
-
goog.exportSymbol("proto.aggregator.EventTrigger.Matcher", null, global);
|
|
90
92
|
goog.exportSymbol("proto.aggregator.EventTrigger.Output", null, global);
|
|
91
93
|
goog.exportSymbol("proto.aggregator.EventTrigger.Output.OutputTypeCase", null, global);
|
|
94
|
+
goog.exportSymbol("proto.aggregator.EventTrigger.Query", null, global);
|
|
95
|
+
goog.exportSymbol("proto.aggregator.EventTrigger.Topics", null, global);
|
|
92
96
|
goog.exportSymbol("proto.aggregator.EventTrigger.TransferLogOutput", null, global);
|
|
93
97
|
goog.exportSymbol("proto.aggregator.Evm", null, global);
|
|
94
98
|
goog.exportSymbol("proto.aggregator.Evm.Log", null, global);
|
|
@@ -267,12 +271,19 @@ var require_avs_pb = __commonJS({
|
|
|
267
271
|
if (goog.DEBUG && !COMPILED) {
|
|
268
272
|
proto.aggregator.EventTrigger.displayName = "proto.aggregator.EventTrigger";
|
|
269
273
|
}
|
|
270
|
-
proto.aggregator.EventTrigger.
|
|
271
|
-
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EventTrigger.
|
|
274
|
+
proto.aggregator.EventTrigger.Query = function(opt_data) {
|
|
275
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EventTrigger.Query.repeatedFields_, null);
|
|
272
276
|
};
|
|
273
|
-
goog.inherits(proto.aggregator.EventTrigger.
|
|
277
|
+
goog.inherits(proto.aggregator.EventTrigger.Query, jspb.Message);
|
|
274
278
|
if (goog.DEBUG && !COMPILED) {
|
|
275
|
-
proto.aggregator.EventTrigger.
|
|
279
|
+
proto.aggregator.EventTrigger.Query.displayName = "proto.aggregator.EventTrigger.Query";
|
|
280
|
+
}
|
|
281
|
+
proto.aggregator.EventTrigger.Topics = function(opt_data) {
|
|
282
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EventTrigger.Topics.repeatedFields_, null);
|
|
283
|
+
};
|
|
284
|
+
goog.inherits(proto.aggregator.EventTrigger.Topics, jspb.Message);
|
|
285
|
+
if (goog.DEBUG && !COMPILED) {
|
|
286
|
+
proto.aggregator.EventTrigger.Topics.displayName = "proto.aggregator.EventTrigger.Topics";
|
|
276
287
|
}
|
|
277
288
|
proto.aggregator.EventTrigger.Config = function(opt_data) {
|
|
278
289
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EventTrigger.Config.repeatedFields_, null);
|
|
@@ -372,13 +383,34 @@ var require_avs_pb = __commonJS({
|
|
|
372
383
|
if (goog.DEBUG && !COMPILED) {
|
|
373
384
|
proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode";
|
|
374
385
|
}
|
|
375
|
-
proto.aggregator.ContractReadNode.
|
|
386
|
+
proto.aggregator.ContractReadNode.MethodCall = function(opt_data) {
|
|
376
387
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
377
388
|
};
|
|
389
|
+
goog.inherits(proto.aggregator.ContractReadNode.MethodCall, jspb.Message);
|
|
390
|
+
if (goog.DEBUG && !COMPILED) {
|
|
391
|
+
proto.aggregator.ContractReadNode.MethodCall.displayName = "proto.aggregator.ContractReadNode.MethodCall";
|
|
392
|
+
}
|
|
393
|
+
proto.aggregator.ContractReadNode.Config = function(opt_data) {
|
|
394
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ContractReadNode.Config.repeatedFields_, null);
|
|
395
|
+
};
|
|
378
396
|
goog.inherits(proto.aggregator.ContractReadNode.Config, jspb.Message);
|
|
379
397
|
if (goog.DEBUG && !COMPILED) {
|
|
380
398
|
proto.aggregator.ContractReadNode.Config.displayName = "proto.aggregator.ContractReadNode.Config";
|
|
381
399
|
}
|
|
400
|
+
proto.aggregator.ContractReadNode.MethodResult = function(opt_data) {
|
|
401
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ContractReadNode.MethodResult.repeatedFields_, null);
|
|
402
|
+
};
|
|
403
|
+
goog.inherits(proto.aggregator.ContractReadNode.MethodResult, jspb.Message);
|
|
404
|
+
if (goog.DEBUG && !COMPILED) {
|
|
405
|
+
proto.aggregator.ContractReadNode.MethodResult.displayName = "proto.aggregator.ContractReadNode.MethodResult";
|
|
406
|
+
}
|
|
407
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField = function(opt_data) {
|
|
408
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
409
|
+
};
|
|
410
|
+
goog.inherits(proto.aggregator.ContractReadNode.MethodResult.StructuredField, jspb.Message);
|
|
411
|
+
if (goog.DEBUG && !COMPILED) {
|
|
412
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.displayName = "proto.aggregator.ContractReadNode.MethodResult.StructuredField";
|
|
413
|
+
}
|
|
382
414
|
proto.aggregator.ContractReadNode.Output = function(opt_data) {
|
|
383
415
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ContractReadNode.Output.repeatedFields_, null);
|
|
384
416
|
};
|
|
@@ -2089,15 +2121,20 @@ var require_avs_pb = __commonJS({
|
|
|
2089
2121
|
);
|
|
2090
2122
|
}
|
|
2091
2123
|
};
|
|
2092
|
-
proto.aggregator.EventTrigger.
|
|
2124
|
+
proto.aggregator.EventTrigger.Query.repeatedFields_ = [1, 2];
|
|
2093
2125
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2094
|
-
proto.aggregator.EventTrigger.
|
|
2095
|
-
return proto.aggregator.EventTrigger.
|
|
2126
|
+
proto.aggregator.EventTrigger.Query.prototype.toObject = function(opt_includeInstance) {
|
|
2127
|
+
return proto.aggregator.EventTrigger.Query.toObject(opt_includeInstance, this);
|
|
2096
2128
|
};
|
|
2097
|
-
proto.aggregator.EventTrigger.
|
|
2129
|
+
proto.aggregator.EventTrigger.Query.toObject = function(includeInstance, msg) {
|
|
2098
2130
|
var f, obj = {
|
|
2099
|
-
|
|
2100
|
-
|
|
2131
|
+
addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f,
|
|
2132
|
+
topicsList: jspb.Message.toObjectList(
|
|
2133
|
+
msg.getTopicsList(),
|
|
2134
|
+
proto.aggregator.EventTrigger.Topics.toObject,
|
|
2135
|
+
includeInstance
|
|
2136
|
+
),
|
|
2137
|
+
maxEventsPerBlock: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
2101
2138
|
};
|
|
2102
2139
|
if (includeInstance) {
|
|
2103
2140
|
obj.$jspbMessageInstance = msg;
|
|
@@ -2105,12 +2142,12 @@ var require_avs_pb = __commonJS({
|
|
|
2105
2142
|
return obj;
|
|
2106
2143
|
};
|
|
2107
2144
|
}
|
|
2108
|
-
proto.aggregator.EventTrigger.
|
|
2145
|
+
proto.aggregator.EventTrigger.Query.deserializeBinary = function(bytes) {
|
|
2109
2146
|
var reader = new jspb.BinaryReader(bytes);
|
|
2110
|
-
var msg = new proto.aggregator.EventTrigger.
|
|
2111
|
-
return proto.aggregator.EventTrigger.
|
|
2147
|
+
var msg = new proto.aggregator.EventTrigger.Query();
|
|
2148
|
+
return proto.aggregator.EventTrigger.Query.deserializeBinaryFromReader(msg, reader);
|
|
2112
2149
|
};
|
|
2113
|
-
proto.aggregator.EventTrigger.
|
|
2150
|
+
proto.aggregator.EventTrigger.Query.deserializeBinaryFromReader = function(msg, reader) {
|
|
2114
2151
|
while (reader.nextField()) {
|
|
2115
2152
|
if (reader.isEndGroup()) {
|
|
2116
2153
|
break;
|
|
@@ -2122,14 +2159,19 @@ var require_avs_pb = __commonJS({
|
|
|
2122
2159
|
/** @type {string} */
|
|
2123
2160
|
reader.readString()
|
|
2124
2161
|
);
|
|
2125
|
-
msg.
|
|
2162
|
+
msg.addAddresses(value);
|
|
2126
2163
|
break;
|
|
2127
2164
|
case 2:
|
|
2165
|
+
var value = new proto.aggregator.EventTrigger.Topics();
|
|
2166
|
+
reader.readMessage(value, proto.aggregator.EventTrigger.Topics.deserializeBinaryFromReader);
|
|
2167
|
+
msg.addTopics(value);
|
|
2168
|
+
break;
|
|
2169
|
+
case 3:
|
|
2128
2170
|
var value = (
|
|
2129
|
-
/** @type {
|
|
2130
|
-
reader.
|
|
2171
|
+
/** @type {number} */
|
|
2172
|
+
reader.readUint32()
|
|
2131
2173
|
);
|
|
2132
|
-
msg.
|
|
2174
|
+
msg.setMaxEventsPerBlock(value);
|
|
2133
2175
|
break;
|
|
2134
2176
|
default:
|
|
2135
2177
|
reader.skipField();
|
|
@@ -2138,51 +2180,152 @@ var require_avs_pb = __commonJS({
|
|
|
2138
2180
|
}
|
|
2139
2181
|
return msg;
|
|
2140
2182
|
};
|
|
2141
|
-
proto.aggregator.EventTrigger.
|
|
2183
|
+
proto.aggregator.EventTrigger.Query.prototype.serializeBinary = function() {
|
|
2142
2184
|
var writer = new jspb.BinaryWriter();
|
|
2143
|
-
proto.aggregator.EventTrigger.
|
|
2185
|
+
proto.aggregator.EventTrigger.Query.serializeBinaryToWriter(this, writer);
|
|
2144
2186
|
return writer.getResultBuffer();
|
|
2145
2187
|
};
|
|
2146
|
-
proto.aggregator.EventTrigger.
|
|
2188
|
+
proto.aggregator.EventTrigger.Query.serializeBinaryToWriter = function(message, writer) {
|
|
2147
2189
|
var f = void 0;
|
|
2148
|
-
f = message.
|
|
2190
|
+
f = message.getAddressesList();
|
|
2149
2191
|
if (f.length > 0) {
|
|
2150
|
-
writer.
|
|
2192
|
+
writer.writeRepeatedString(
|
|
2151
2193
|
1,
|
|
2152
2194
|
f
|
|
2153
2195
|
);
|
|
2154
2196
|
}
|
|
2155
|
-
f = message.
|
|
2197
|
+
f = message.getTopicsList();
|
|
2156
2198
|
if (f.length > 0) {
|
|
2157
|
-
writer.
|
|
2199
|
+
writer.writeRepeatedMessage(
|
|
2158
2200
|
2,
|
|
2201
|
+
f,
|
|
2202
|
+
proto.aggregator.EventTrigger.Topics.serializeBinaryToWriter
|
|
2203
|
+
);
|
|
2204
|
+
}
|
|
2205
|
+
f = /** @type {number} */
|
|
2206
|
+
jspb.Message.getField(message, 3);
|
|
2207
|
+
if (f != null) {
|
|
2208
|
+
writer.writeUint32(
|
|
2209
|
+
3,
|
|
2159
2210
|
f
|
|
2160
2211
|
);
|
|
2161
2212
|
}
|
|
2162
2213
|
};
|
|
2163
|
-
proto.aggregator.EventTrigger.
|
|
2214
|
+
proto.aggregator.EventTrigger.Query.prototype.getAddressesList = function() {
|
|
2164
2215
|
return (
|
|
2165
|
-
/** @type {string} */
|
|
2166
|
-
jspb.Message.
|
|
2216
|
+
/** @type {!Array<string>} */
|
|
2217
|
+
jspb.Message.getRepeatedField(this, 1)
|
|
2167
2218
|
);
|
|
2168
2219
|
};
|
|
2169
|
-
proto.aggregator.EventTrigger.
|
|
2170
|
-
return jspb.Message.
|
|
2220
|
+
proto.aggregator.EventTrigger.Query.prototype.setAddressesList = function(value) {
|
|
2221
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
2222
|
+
};
|
|
2223
|
+
proto.aggregator.EventTrigger.Query.prototype.addAddresses = function(value, opt_index) {
|
|
2224
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
2225
|
+
};
|
|
2226
|
+
proto.aggregator.EventTrigger.Query.prototype.clearAddressesList = function() {
|
|
2227
|
+
return this.setAddressesList([]);
|
|
2228
|
+
};
|
|
2229
|
+
proto.aggregator.EventTrigger.Query.prototype.getTopicsList = function() {
|
|
2230
|
+
return (
|
|
2231
|
+
/** @type{!Array<!proto.aggregator.EventTrigger.Topics>} */
|
|
2232
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.EventTrigger.Topics, 2)
|
|
2233
|
+
);
|
|
2234
|
+
};
|
|
2235
|
+
proto.aggregator.EventTrigger.Query.prototype.setTopicsList = function(value) {
|
|
2236
|
+
return jspb.Message.setRepeatedWrapperField(this, 2, value);
|
|
2237
|
+
};
|
|
2238
|
+
proto.aggregator.EventTrigger.Query.prototype.addTopics = function(opt_value, opt_index) {
|
|
2239
|
+
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.EventTrigger.Topics, opt_index);
|
|
2240
|
+
};
|
|
2241
|
+
proto.aggregator.EventTrigger.Query.prototype.clearTopicsList = function() {
|
|
2242
|
+
return this.setTopicsList([]);
|
|
2243
|
+
};
|
|
2244
|
+
proto.aggregator.EventTrigger.Query.prototype.getMaxEventsPerBlock = function() {
|
|
2245
|
+
return (
|
|
2246
|
+
/** @type {number} */
|
|
2247
|
+
jspb.Message.getFieldWithDefault(this, 3, 0)
|
|
2248
|
+
);
|
|
2249
|
+
};
|
|
2250
|
+
proto.aggregator.EventTrigger.Query.prototype.setMaxEventsPerBlock = function(value) {
|
|
2251
|
+
return jspb.Message.setField(this, 3, value);
|
|
2252
|
+
};
|
|
2253
|
+
proto.aggregator.EventTrigger.Query.prototype.clearMaxEventsPerBlock = function() {
|
|
2254
|
+
return jspb.Message.setField(this, 3, void 0);
|
|
2255
|
+
};
|
|
2256
|
+
proto.aggregator.EventTrigger.Query.prototype.hasMaxEventsPerBlock = function() {
|
|
2257
|
+
return jspb.Message.getField(this, 3) != null;
|
|
2258
|
+
};
|
|
2259
|
+
proto.aggregator.EventTrigger.Topics.repeatedFields_ = [1];
|
|
2260
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2261
|
+
proto.aggregator.EventTrigger.Topics.prototype.toObject = function(opt_includeInstance) {
|
|
2262
|
+
return proto.aggregator.EventTrigger.Topics.toObject(opt_includeInstance, this);
|
|
2263
|
+
};
|
|
2264
|
+
proto.aggregator.EventTrigger.Topics.toObject = function(includeInstance, msg) {
|
|
2265
|
+
var f, obj = {
|
|
2266
|
+
valuesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f
|
|
2267
|
+
};
|
|
2268
|
+
if (includeInstance) {
|
|
2269
|
+
obj.$jspbMessageInstance = msg;
|
|
2270
|
+
}
|
|
2271
|
+
return obj;
|
|
2272
|
+
};
|
|
2273
|
+
}
|
|
2274
|
+
proto.aggregator.EventTrigger.Topics.deserializeBinary = function(bytes) {
|
|
2275
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2276
|
+
var msg = new proto.aggregator.EventTrigger.Topics();
|
|
2277
|
+
return proto.aggregator.EventTrigger.Topics.deserializeBinaryFromReader(msg, reader);
|
|
2278
|
+
};
|
|
2279
|
+
proto.aggregator.EventTrigger.Topics.deserializeBinaryFromReader = function(msg, reader) {
|
|
2280
|
+
while (reader.nextField()) {
|
|
2281
|
+
if (reader.isEndGroup()) {
|
|
2282
|
+
break;
|
|
2283
|
+
}
|
|
2284
|
+
var field = reader.getFieldNumber();
|
|
2285
|
+
switch (field) {
|
|
2286
|
+
case 1:
|
|
2287
|
+
var value = (
|
|
2288
|
+
/** @type {string} */
|
|
2289
|
+
reader.readString()
|
|
2290
|
+
);
|
|
2291
|
+
msg.addValues(value);
|
|
2292
|
+
break;
|
|
2293
|
+
default:
|
|
2294
|
+
reader.skipField();
|
|
2295
|
+
break;
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
return msg;
|
|
2171
2299
|
};
|
|
2172
|
-
proto.aggregator.EventTrigger.
|
|
2300
|
+
proto.aggregator.EventTrigger.Topics.prototype.serializeBinary = function() {
|
|
2301
|
+
var writer = new jspb.BinaryWriter();
|
|
2302
|
+
proto.aggregator.EventTrigger.Topics.serializeBinaryToWriter(this, writer);
|
|
2303
|
+
return writer.getResultBuffer();
|
|
2304
|
+
};
|
|
2305
|
+
proto.aggregator.EventTrigger.Topics.serializeBinaryToWriter = function(message, writer) {
|
|
2306
|
+
var f = void 0;
|
|
2307
|
+
f = message.getValuesList();
|
|
2308
|
+
if (f.length > 0) {
|
|
2309
|
+
writer.writeRepeatedString(
|
|
2310
|
+
1,
|
|
2311
|
+
f
|
|
2312
|
+
);
|
|
2313
|
+
}
|
|
2314
|
+
};
|
|
2315
|
+
proto.aggregator.EventTrigger.Topics.prototype.getValuesList = function() {
|
|
2173
2316
|
return (
|
|
2174
2317
|
/** @type {!Array<string>} */
|
|
2175
|
-
jspb.Message.getRepeatedField(this,
|
|
2318
|
+
jspb.Message.getRepeatedField(this, 1)
|
|
2176
2319
|
);
|
|
2177
2320
|
};
|
|
2178
|
-
proto.aggregator.EventTrigger.
|
|
2179
|
-
return jspb.Message.setField(this,
|
|
2321
|
+
proto.aggregator.EventTrigger.Topics.prototype.setValuesList = function(value) {
|
|
2322
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
2180
2323
|
};
|
|
2181
|
-
proto.aggregator.EventTrigger.
|
|
2182
|
-
return jspb.Message.addToRepeatedField(this,
|
|
2324
|
+
proto.aggregator.EventTrigger.Topics.prototype.addValues = function(value, opt_index) {
|
|
2325
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
2183
2326
|
};
|
|
2184
|
-
proto.aggregator.EventTrigger.
|
|
2185
|
-
return this.
|
|
2327
|
+
proto.aggregator.EventTrigger.Topics.prototype.clearValuesList = function() {
|
|
2328
|
+
return this.setValuesList([]);
|
|
2186
2329
|
};
|
|
2187
2330
|
proto.aggregator.EventTrigger.Config.repeatedFields_ = [1];
|
|
2188
2331
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -2191,12 +2334,11 @@ var require_avs_pb = __commonJS({
|
|
|
2191
2334
|
};
|
|
2192
2335
|
proto.aggregator.EventTrigger.Config.toObject = function(includeInstance, msg) {
|
|
2193
2336
|
var f, obj = {
|
|
2194
|
-
|
|
2195
|
-
msg.
|
|
2196
|
-
proto.aggregator.EventTrigger.
|
|
2337
|
+
queriesList: jspb.Message.toObjectList(
|
|
2338
|
+
msg.getQueriesList(),
|
|
2339
|
+
proto.aggregator.EventTrigger.Query.toObject,
|
|
2197
2340
|
includeInstance
|
|
2198
|
-
)
|
|
2199
|
-
expression: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
2341
|
+
)
|
|
2200
2342
|
};
|
|
2201
2343
|
if (includeInstance) {
|
|
2202
2344
|
obj.$jspbMessageInstance = msg;
|
|
@@ -2217,16 +2359,9 @@ var require_avs_pb = __commonJS({
|
|
|
2217
2359
|
var field = reader.getFieldNumber();
|
|
2218
2360
|
switch (field) {
|
|
2219
2361
|
case 1:
|
|
2220
|
-
var value = new proto.aggregator.EventTrigger.
|
|
2221
|
-
reader.readMessage(value, proto.aggregator.EventTrigger.
|
|
2222
|
-
msg.
|
|
2223
|
-
break;
|
|
2224
|
-
case 2:
|
|
2225
|
-
var value = (
|
|
2226
|
-
/** @type {string} */
|
|
2227
|
-
reader.readString()
|
|
2228
|
-
);
|
|
2229
|
-
msg.setExpression(value);
|
|
2362
|
+
var value = new proto.aggregator.EventTrigger.Query();
|
|
2363
|
+
reader.readMessage(value, proto.aggregator.EventTrigger.Query.deserializeBinaryFromReader);
|
|
2364
|
+
msg.addQueries(value);
|
|
2230
2365
|
break;
|
|
2231
2366
|
default:
|
|
2232
2367
|
reader.skipField();
|
|
@@ -2242,45 +2377,29 @@ var require_avs_pb = __commonJS({
|
|
|
2242
2377
|
};
|
|
2243
2378
|
proto.aggregator.EventTrigger.Config.serializeBinaryToWriter = function(message, writer) {
|
|
2244
2379
|
var f = void 0;
|
|
2245
|
-
f = message.
|
|
2380
|
+
f = message.getQueriesList();
|
|
2246
2381
|
if (f.length > 0) {
|
|
2247
2382
|
writer.writeRepeatedMessage(
|
|
2248
2383
|
1,
|
|
2249
2384
|
f,
|
|
2250
|
-
proto.aggregator.EventTrigger.
|
|
2251
|
-
);
|
|
2252
|
-
}
|
|
2253
|
-
f = message.getExpression();
|
|
2254
|
-
if (f.length > 0) {
|
|
2255
|
-
writer.writeString(
|
|
2256
|
-
2,
|
|
2257
|
-
f
|
|
2385
|
+
proto.aggregator.EventTrigger.Query.serializeBinaryToWriter
|
|
2258
2386
|
);
|
|
2259
2387
|
}
|
|
2260
2388
|
};
|
|
2261
|
-
proto.aggregator.EventTrigger.Config.prototype.
|
|
2389
|
+
proto.aggregator.EventTrigger.Config.prototype.getQueriesList = function() {
|
|
2262
2390
|
return (
|
|
2263
|
-
/** @type{!Array<!proto.aggregator.EventTrigger.
|
|
2264
|
-
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.EventTrigger.
|
|
2391
|
+
/** @type{!Array<!proto.aggregator.EventTrigger.Query>} */
|
|
2392
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.EventTrigger.Query, 1)
|
|
2265
2393
|
);
|
|
2266
2394
|
};
|
|
2267
|
-
proto.aggregator.EventTrigger.Config.prototype.
|
|
2395
|
+
proto.aggregator.EventTrigger.Config.prototype.setQueriesList = function(value) {
|
|
2268
2396
|
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
2269
2397
|
};
|
|
2270
|
-
proto.aggregator.EventTrigger.Config.prototype.
|
|
2271
|
-
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.EventTrigger.
|
|
2398
|
+
proto.aggregator.EventTrigger.Config.prototype.addQueries = function(opt_value, opt_index) {
|
|
2399
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.EventTrigger.Query, opt_index);
|
|
2272
2400
|
};
|
|
2273
|
-
proto.aggregator.EventTrigger.Config.prototype.
|
|
2274
|
-
return this.
|
|
2275
|
-
};
|
|
2276
|
-
proto.aggregator.EventTrigger.Config.prototype.getExpression = function() {
|
|
2277
|
-
return (
|
|
2278
|
-
/** @type {string} */
|
|
2279
|
-
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
2280
|
-
);
|
|
2281
|
-
};
|
|
2282
|
-
proto.aggregator.EventTrigger.Config.prototype.setExpression = function(value) {
|
|
2283
|
-
return jspb.Message.setProto3StringField(this, 2, value);
|
|
2401
|
+
proto.aggregator.EventTrigger.Config.prototype.clearQueriesList = function() {
|
|
2402
|
+
return this.setQueriesList([]);
|
|
2284
2403
|
};
|
|
2285
2404
|
proto.aggregator.EventTrigger.Output.oneofGroups_ = [[1, 2]];
|
|
2286
2405
|
proto.aggregator.EventTrigger.Output.OutputTypeCase = {
|
|
@@ -3759,6 +3878,95 @@ var require_avs_pb = __commonJS({
|
|
|
3759
3878
|
);
|
|
3760
3879
|
}
|
|
3761
3880
|
};
|
|
3881
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3882
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.toObject = function(opt_includeInstance) {
|
|
3883
|
+
return proto.aggregator.ContractReadNode.MethodCall.toObject(opt_includeInstance, this);
|
|
3884
|
+
};
|
|
3885
|
+
proto.aggregator.ContractReadNode.MethodCall.toObject = function(includeInstance, msg) {
|
|
3886
|
+
var f, obj = {
|
|
3887
|
+
callData: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
3888
|
+
methodName: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
3889
|
+
};
|
|
3890
|
+
if (includeInstance) {
|
|
3891
|
+
obj.$jspbMessageInstance = msg;
|
|
3892
|
+
}
|
|
3893
|
+
return obj;
|
|
3894
|
+
};
|
|
3895
|
+
}
|
|
3896
|
+
proto.aggregator.ContractReadNode.MethodCall.deserializeBinary = function(bytes) {
|
|
3897
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
3898
|
+
var msg = new proto.aggregator.ContractReadNode.MethodCall();
|
|
3899
|
+
return proto.aggregator.ContractReadNode.MethodCall.deserializeBinaryFromReader(msg, reader);
|
|
3900
|
+
};
|
|
3901
|
+
proto.aggregator.ContractReadNode.MethodCall.deserializeBinaryFromReader = function(msg, reader) {
|
|
3902
|
+
while (reader.nextField()) {
|
|
3903
|
+
if (reader.isEndGroup()) {
|
|
3904
|
+
break;
|
|
3905
|
+
}
|
|
3906
|
+
var field = reader.getFieldNumber();
|
|
3907
|
+
switch (field) {
|
|
3908
|
+
case 1:
|
|
3909
|
+
var value = (
|
|
3910
|
+
/** @type {string} */
|
|
3911
|
+
reader.readString()
|
|
3912
|
+
);
|
|
3913
|
+
msg.setCallData(value);
|
|
3914
|
+
break;
|
|
3915
|
+
case 2:
|
|
3916
|
+
var value = (
|
|
3917
|
+
/** @type {string} */
|
|
3918
|
+
reader.readString()
|
|
3919
|
+
);
|
|
3920
|
+
msg.setMethodName(value);
|
|
3921
|
+
break;
|
|
3922
|
+
default:
|
|
3923
|
+
reader.skipField();
|
|
3924
|
+
break;
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
return msg;
|
|
3928
|
+
};
|
|
3929
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.serializeBinary = function() {
|
|
3930
|
+
var writer = new jspb.BinaryWriter();
|
|
3931
|
+
proto.aggregator.ContractReadNode.MethodCall.serializeBinaryToWriter(this, writer);
|
|
3932
|
+
return writer.getResultBuffer();
|
|
3933
|
+
};
|
|
3934
|
+
proto.aggregator.ContractReadNode.MethodCall.serializeBinaryToWriter = function(message, writer) {
|
|
3935
|
+
var f = void 0;
|
|
3936
|
+
f = message.getCallData();
|
|
3937
|
+
if (f.length > 0) {
|
|
3938
|
+
writer.writeString(
|
|
3939
|
+
1,
|
|
3940
|
+
f
|
|
3941
|
+
);
|
|
3942
|
+
}
|
|
3943
|
+
f = message.getMethodName();
|
|
3944
|
+
if (f.length > 0) {
|
|
3945
|
+
writer.writeString(
|
|
3946
|
+
2,
|
|
3947
|
+
f
|
|
3948
|
+
);
|
|
3949
|
+
}
|
|
3950
|
+
};
|
|
3951
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.getCallData = function() {
|
|
3952
|
+
return (
|
|
3953
|
+
/** @type {string} */
|
|
3954
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
3955
|
+
);
|
|
3956
|
+
};
|
|
3957
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.setCallData = function(value) {
|
|
3958
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
3959
|
+
};
|
|
3960
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.getMethodName = function() {
|
|
3961
|
+
return (
|
|
3962
|
+
/** @type {string} */
|
|
3963
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
3964
|
+
);
|
|
3965
|
+
};
|
|
3966
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.setMethodName = function(value) {
|
|
3967
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
3968
|
+
};
|
|
3969
|
+
proto.aggregator.ContractReadNode.Config.repeatedFields_ = [3];
|
|
3762
3970
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3763
3971
|
proto.aggregator.ContractReadNode.Config.prototype.toObject = function(opt_includeInstance) {
|
|
3764
3972
|
return proto.aggregator.ContractReadNode.Config.toObject(opt_includeInstance, this);
|
|
@@ -3766,8 +3974,12 @@ var require_avs_pb = __commonJS({
|
|
|
3766
3974
|
proto.aggregator.ContractReadNode.Config.toObject = function(includeInstance, msg) {
|
|
3767
3975
|
var f, obj = {
|
|
3768
3976
|
contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
3769
|
-
|
|
3770
|
-
|
|
3977
|
+
contractAbi: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
3978
|
+
methodCallsList: jspb.Message.toObjectList(
|
|
3979
|
+
msg.getMethodCallsList(),
|
|
3980
|
+
proto.aggregator.ContractReadNode.MethodCall.toObject,
|
|
3981
|
+
includeInstance
|
|
3982
|
+
)
|
|
3771
3983
|
};
|
|
3772
3984
|
if (includeInstance) {
|
|
3773
3985
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3799,14 +4011,12 @@ var require_avs_pb = __commonJS({
|
|
|
3799
4011
|
/** @type {string} */
|
|
3800
4012
|
reader.readString()
|
|
3801
4013
|
);
|
|
3802
|
-
msg.
|
|
4014
|
+
msg.setContractAbi(value);
|
|
3803
4015
|
break;
|
|
3804
4016
|
case 3:
|
|
3805
|
-
var value = (
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
);
|
|
3809
|
-
msg.setContractAbi(value);
|
|
4017
|
+
var value = new proto.aggregator.ContractReadNode.MethodCall();
|
|
4018
|
+
reader.readMessage(value, proto.aggregator.ContractReadNode.MethodCall.deserializeBinaryFromReader);
|
|
4019
|
+
msg.addMethodCalls(value);
|
|
3810
4020
|
break;
|
|
3811
4021
|
default:
|
|
3812
4022
|
reader.skipField();
|
|
@@ -3829,18 +4039,19 @@ var require_avs_pb = __commonJS({
|
|
|
3829
4039
|
f
|
|
3830
4040
|
);
|
|
3831
4041
|
}
|
|
3832
|
-
f = message.
|
|
4042
|
+
f = message.getContractAbi();
|
|
3833
4043
|
if (f.length > 0) {
|
|
3834
4044
|
writer.writeString(
|
|
3835
4045
|
2,
|
|
3836
4046
|
f
|
|
3837
4047
|
);
|
|
3838
4048
|
}
|
|
3839
|
-
f = message.
|
|
4049
|
+
f = message.getMethodCallsList();
|
|
3840
4050
|
if (f.length > 0) {
|
|
3841
|
-
writer.
|
|
4051
|
+
writer.writeRepeatedMessage(
|
|
3842
4052
|
3,
|
|
3843
|
-
f
|
|
4053
|
+
f,
|
|
4054
|
+
proto.aggregator.ContractReadNode.MethodCall.serializeBinaryToWriter
|
|
3844
4055
|
);
|
|
3845
4056
|
}
|
|
3846
4057
|
};
|
|
@@ -3853,24 +4064,288 @@ var require_avs_pb = __commonJS({
|
|
|
3853
4064
|
proto.aggregator.ContractReadNode.Config.prototype.setContractAddress = function(value) {
|
|
3854
4065
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
3855
4066
|
};
|
|
3856
|
-
proto.aggregator.ContractReadNode.Config.prototype.
|
|
4067
|
+
proto.aggregator.ContractReadNode.Config.prototype.getContractAbi = function() {
|
|
3857
4068
|
return (
|
|
3858
4069
|
/** @type {string} */
|
|
3859
4070
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
3860
4071
|
);
|
|
3861
4072
|
};
|
|
3862
|
-
proto.aggregator.ContractReadNode.Config.prototype.
|
|
4073
|
+
proto.aggregator.ContractReadNode.Config.prototype.setContractAbi = function(value) {
|
|
3863
4074
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
3864
4075
|
};
|
|
3865
|
-
proto.aggregator.ContractReadNode.Config.prototype.
|
|
4076
|
+
proto.aggregator.ContractReadNode.Config.prototype.getMethodCallsList = function() {
|
|
4077
|
+
return (
|
|
4078
|
+
/** @type{!Array<!proto.aggregator.ContractReadNode.MethodCall>} */
|
|
4079
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ContractReadNode.MethodCall, 3)
|
|
4080
|
+
);
|
|
4081
|
+
};
|
|
4082
|
+
proto.aggregator.ContractReadNode.Config.prototype.setMethodCallsList = function(value) {
|
|
4083
|
+
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
4084
|
+
};
|
|
4085
|
+
proto.aggregator.ContractReadNode.Config.prototype.addMethodCalls = function(opt_value, opt_index) {
|
|
4086
|
+
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.aggregator.ContractReadNode.MethodCall, opt_index);
|
|
4087
|
+
};
|
|
4088
|
+
proto.aggregator.ContractReadNode.Config.prototype.clearMethodCallsList = function() {
|
|
4089
|
+
return this.setMethodCallsList([]);
|
|
4090
|
+
};
|
|
4091
|
+
proto.aggregator.ContractReadNode.MethodResult.repeatedFields_ = [1];
|
|
4092
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4093
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.toObject = function(opt_includeInstance) {
|
|
4094
|
+
return proto.aggregator.ContractReadNode.MethodResult.toObject(opt_includeInstance, this);
|
|
4095
|
+
};
|
|
4096
|
+
proto.aggregator.ContractReadNode.MethodResult.toObject = function(includeInstance, msg) {
|
|
4097
|
+
var f, obj = {
|
|
4098
|
+
dataList: jspb.Message.toObjectList(
|
|
4099
|
+
msg.getDataList(),
|
|
4100
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.toObject,
|
|
4101
|
+
includeInstance
|
|
4102
|
+
),
|
|
4103
|
+
methodName: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4104
|
+
success: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
4105
|
+
error: jspb.Message.getFieldWithDefault(msg, 4, "")
|
|
4106
|
+
};
|
|
4107
|
+
if (includeInstance) {
|
|
4108
|
+
obj.$jspbMessageInstance = msg;
|
|
4109
|
+
}
|
|
4110
|
+
return obj;
|
|
4111
|
+
};
|
|
4112
|
+
}
|
|
4113
|
+
proto.aggregator.ContractReadNode.MethodResult.deserializeBinary = function(bytes) {
|
|
4114
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
4115
|
+
var msg = new proto.aggregator.ContractReadNode.MethodResult();
|
|
4116
|
+
return proto.aggregator.ContractReadNode.MethodResult.deserializeBinaryFromReader(msg, reader);
|
|
4117
|
+
};
|
|
4118
|
+
proto.aggregator.ContractReadNode.MethodResult.deserializeBinaryFromReader = function(msg, reader) {
|
|
4119
|
+
while (reader.nextField()) {
|
|
4120
|
+
if (reader.isEndGroup()) {
|
|
4121
|
+
break;
|
|
4122
|
+
}
|
|
4123
|
+
var field = reader.getFieldNumber();
|
|
4124
|
+
switch (field) {
|
|
4125
|
+
case 1:
|
|
4126
|
+
var value = new proto.aggregator.ContractReadNode.MethodResult.StructuredField();
|
|
4127
|
+
reader.readMessage(value, proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinaryFromReader);
|
|
4128
|
+
msg.addData(value);
|
|
4129
|
+
break;
|
|
4130
|
+
case 2:
|
|
4131
|
+
var value = (
|
|
4132
|
+
/** @type {string} */
|
|
4133
|
+
reader.readString()
|
|
4134
|
+
);
|
|
4135
|
+
msg.setMethodName(value);
|
|
4136
|
+
break;
|
|
4137
|
+
case 3:
|
|
4138
|
+
var value = (
|
|
4139
|
+
/** @type {boolean} */
|
|
4140
|
+
reader.readBool()
|
|
4141
|
+
);
|
|
4142
|
+
msg.setSuccess(value);
|
|
4143
|
+
break;
|
|
4144
|
+
case 4:
|
|
4145
|
+
var value = (
|
|
4146
|
+
/** @type {string} */
|
|
4147
|
+
reader.readString()
|
|
4148
|
+
);
|
|
4149
|
+
msg.setError(value);
|
|
4150
|
+
break;
|
|
4151
|
+
default:
|
|
4152
|
+
reader.skipField();
|
|
4153
|
+
break;
|
|
4154
|
+
}
|
|
4155
|
+
}
|
|
4156
|
+
return msg;
|
|
4157
|
+
};
|
|
4158
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.serializeBinary = function() {
|
|
4159
|
+
var writer = new jspb.BinaryWriter();
|
|
4160
|
+
proto.aggregator.ContractReadNode.MethodResult.serializeBinaryToWriter(this, writer);
|
|
4161
|
+
return writer.getResultBuffer();
|
|
4162
|
+
};
|
|
4163
|
+
proto.aggregator.ContractReadNode.MethodResult.serializeBinaryToWriter = function(message, writer) {
|
|
4164
|
+
var f = void 0;
|
|
4165
|
+
f = message.getDataList();
|
|
4166
|
+
if (f.length > 0) {
|
|
4167
|
+
writer.writeRepeatedMessage(
|
|
4168
|
+
1,
|
|
4169
|
+
f,
|
|
4170
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.serializeBinaryToWriter
|
|
4171
|
+
);
|
|
4172
|
+
}
|
|
4173
|
+
f = message.getMethodName();
|
|
4174
|
+
if (f.length > 0) {
|
|
4175
|
+
writer.writeString(
|
|
4176
|
+
2,
|
|
4177
|
+
f
|
|
4178
|
+
);
|
|
4179
|
+
}
|
|
4180
|
+
f = message.getSuccess();
|
|
4181
|
+
if (f) {
|
|
4182
|
+
writer.writeBool(
|
|
4183
|
+
3,
|
|
4184
|
+
f
|
|
4185
|
+
);
|
|
4186
|
+
}
|
|
4187
|
+
f = message.getError();
|
|
4188
|
+
if (f.length > 0) {
|
|
4189
|
+
writer.writeString(
|
|
4190
|
+
4,
|
|
4191
|
+
f
|
|
4192
|
+
);
|
|
4193
|
+
}
|
|
4194
|
+
};
|
|
4195
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4196
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.toObject = function(opt_includeInstance) {
|
|
4197
|
+
return proto.aggregator.ContractReadNode.MethodResult.StructuredField.toObject(opt_includeInstance, this);
|
|
4198
|
+
};
|
|
4199
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.toObject = function(includeInstance, msg) {
|
|
4200
|
+
var f, obj = {
|
|
4201
|
+
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
4202
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4203
|
+
value: jspb.Message.getFieldWithDefault(msg, 3, "")
|
|
4204
|
+
};
|
|
4205
|
+
if (includeInstance) {
|
|
4206
|
+
obj.$jspbMessageInstance = msg;
|
|
4207
|
+
}
|
|
4208
|
+
return obj;
|
|
4209
|
+
};
|
|
4210
|
+
}
|
|
4211
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinary = function(bytes) {
|
|
4212
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
4213
|
+
var msg = new proto.aggregator.ContractReadNode.MethodResult.StructuredField();
|
|
4214
|
+
return proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinaryFromReader(msg, reader);
|
|
4215
|
+
};
|
|
4216
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinaryFromReader = function(msg, reader) {
|
|
4217
|
+
while (reader.nextField()) {
|
|
4218
|
+
if (reader.isEndGroup()) {
|
|
4219
|
+
break;
|
|
4220
|
+
}
|
|
4221
|
+
var field = reader.getFieldNumber();
|
|
4222
|
+
switch (field) {
|
|
4223
|
+
case 1:
|
|
4224
|
+
var value = (
|
|
4225
|
+
/** @type {string} */
|
|
4226
|
+
reader.readString()
|
|
4227
|
+
);
|
|
4228
|
+
msg.setName(value);
|
|
4229
|
+
break;
|
|
4230
|
+
case 2:
|
|
4231
|
+
var value = (
|
|
4232
|
+
/** @type {string} */
|
|
4233
|
+
reader.readString()
|
|
4234
|
+
);
|
|
4235
|
+
msg.setType(value);
|
|
4236
|
+
break;
|
|
4237
|
+
case 3:
|
|
4238
|
+
var value = (
|
|
4239
|
+
/** @type {string} */
|
|
4240
|
+
reader.readString()
|
|
4241
|
+
);
|
|
4242
|
+
msg.setValue(value);
|
|
4243
|
+
break;
|
|
4244
|
+
default:
|
|
4245
|
+
reader.skipField();
|
|
4246
|
+
break;
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
return msg;
|
|
4250
|
+
};
|
|
4251
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.serializeBinary = function() {
|
|
4252
|
+
var writer = new jspb.BinaryWriter();
|
|
4253
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.serializeBinaryToWriter(this, writer);
|
|
4254
|
+
return writer.getResultBuffer();
|
|
4255
|
+
};
|
|
4256
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.serializeBinaryToWriter = function(message, writer) {
|
|
4257
|
+
var f = void 0;
|
|
4258
|
+
f = message.getName();
|
|
4259
|
+
if (f.length > 0) {
|
|
4260
|
+
writer.writeString(
|
|
4261
|
+
1,
|
|
4262
|
+
f
|
|
4263
|
+
);
|
|
4264
|
+
}
|
|
4265
|
+
f = message.getType();
|
|
4266
|
+
if (f.length > 0) {
|
|
4267
|
+
writer.writeString(
|
|
4268
|
+
2,
|
|
4269
|
+
f
|
|
4270
|
+
);
|
|
4271
|
+
}
|
|
4272
|
+
f = message.getValue();
|
|
4273
|
+
if (f.length > 0) {
|
|
4274
|
+
writer.writeString(
|
|
4275
|
+
3,
|
|
4276
|
+
f
|
|
4277
|
+
);
|
|
4278
|
+
}
|
|
4279
|
+
};
|
|
4280
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.getName = function() {
|
|
4281
|
+
return (
|
|
4282
|
+
/** @type {string} */
|
|
4283
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
4284
|
+
);
|
|
4285
|
+
};
|
|
4286
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.setName = function(value) {
|
|
4287
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
4288
|
+
};
|
|
4289
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.getType = function() {
|
|
4290
|
+
return (
|
|
4291
|
+
/** @type {string} */
|
|
4292
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
4293
|
+
);
|
|
4294
|
+
};
|
|
4295
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.setType = function(value) {
|
|
4296
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
4297
|
+
};
|
|
4298
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.getValue = function() {
|
|
3866
4299
|
return (
|
|
3867
4300
|
/** @type {string} */
|
|
3868
4301
|
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
3869
4302
|
);
|
|
3870
4303
|
};
|
|
3871
|
-
proto.aggregator.ContractReadNode.
|
|
4304
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.setValue = function(value) {
|
|
3872
4305
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
3873
4306
|
};
|
|
4307
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getDataList = function() {
|
|
4308
|
+
return (
|
|
4309
|
+
/** @type{!Array<!proto.aggregator.ContractReadNode.MethodResult.StructuredField>} */
|
|
4310
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ContractReadNode.MethodResult.StructuredField, 1)
|
|
4311
|
+
);
|
|
4312
|
+
};
|
|
4313
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setDataList = function(value) {
|
|
4314
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
4315
|
+
};
|
|
4316
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.addData = function(opt_value, opt_index) {
|
|
4317
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ContractReadNode.MethodResult.StructuredField, opt_index);
|
|
4318
|
+
};
|
|
4319
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.clearDataList = function() {
|
|
4320
|
+
return this.setDataList([]);
|
|
4321
|
+
};
|
|
4322
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getMethodName = function() {
|
|
4323
|
+
return (
|
|
4324
|
+
/** @type {string} */
|
|
4325
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
4326
|
+
);
|
|
4327
|
+
};
|
|
4328
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setMethodName = function(value) {
|
|
4329
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
4330
|
+
};
|
|
4331
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getSuccess = function() {
|
|
4332
|
+
return (
|
|
4333
|
+
/** @type {boolean} */
|
|
4334
|
+
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
|
|
4335
|
+
);
|
|
4336
|
+
};
|
|
4337
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setSuccess = function(value) {
|
|
4338
|
+
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
4339
|
+
};
|
|
4340
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getError = function() {
|
|
4341
|
+
return (
|
|
4342
|
+
/** @type {string} */
|
|
4343
|
+
jspb.Message.getFieldWithDefault(this, 4, "")
|
|
4344
|
+
);
|
|
4345
|
+
};
|
|
4346
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setError = function(value) {
|
|
4347
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
4348
|
+
};
|
|
3874
4349
|
proto.aggregator.ContractReadNode.Output.repeatedFields_ = [1];
|
|
3875
4350
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3876
4351
|
proto.aggregator.ContractReadNode.Output.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -3878,9 +4353,9 @@ var require_avs_pb = __commonJS({
|
|
|
3878
4353
|
};
|
|
3879
4354
|
proto.aggregator.ContractReadNode.Output.toObject = function(includeInstance, msg) {
|
|
3880
4355
|
var f, obj = {
|
|
3881
|
-
|
|
3882
|
-
msg.
|
|
3883
|
-
|
|
4356
|
+
resultsList: jspb.Message.toObjectList(
|
|
4357
|
+
msg.getResultsList(),
|
|
4358
|
+
proto.aggregator.ContractReadNode.MethodResult.toObject,
|
|
3884
4359
|
includeInstance
|
|
3885
4360
|
)
|
|
3886
4361
|
};
|
|
@@ -3903,9 +4378,9 @@ var require_avs_pb = __commonJS({
|
|
|
3903
4378
|
var field = reader.getFieldNumber();
|
|
3904
4379
|
switch (field) {
|
|
3905
4380
|
case 1:
|
|
3906
|
-
var value = new
|
|
3907
|
-
reader.readMessage(value,
|
|
3908
|
-
msg.
|
|
4381
|
+
var value = new proto.aggregator.ContractReadNode.MethodResult();
|
|
4382
|
+
reader.readMessage(value, proto.aggregator.ContractReadNode.MethodResult.deserializeBinaryFromReader);
|
|
4383
|
+
msg.addResults(value);
|
|
3909
4384
|
break;
|
|
3910
4385
|
default:
|
|
3911
4386
|
reader.skipField();
|
|
@@ -3921,29 +4396,29 @@ var require_avs_pb = __commonJS({
|
|
|
3921
4396
|
};
|
|
3922
4397
|
proto.aggregator.ContractReadNode.Output.serializeBinaryToWriter = function(message, writer) {
|
|
3923
4398
|
var f = void 0;
|
|
3924
|
-
f = message.
|
|
4399
|
+
f = message.getResultsList();
|
|
3925
4400
|
if (f.length > 0) {
|
|
3926
4401
|
writer.writeRepeatedMessage(
|
|
3927
4402
|
1,
|
|
3928
4403
|
f,
|
|
3929
|
-
|
|
4404
|
+
proto.aggregator.ContractReadNode.MethodResult.serializeBinaryToWriter
|
|
3930
4405
|
);
|
|
3931
4406
|
}
|
|
3932
4407
|
};
|
|
3933
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
4408
|
+
proto.aggregator.ContractReadNode.Output.prototype.getResultsList = function() {
|
|
3934
4409
|
return (
|
|
3935
|
-
/** @type{!Array<!proto.
|
|
3936
|
-
jspb.Message.getRepeatedWrapperField(this,
|
|
4410
|
+
/** @type{!Array<!proto.aggregator.ContractReadNode.MethodResult>} */
|
|
4411
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ContractReadNode.MethodResult, 1)
|
|
3937
4412
|
);
|
|
3938
4413
|
};
|
|
3939
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
4414
|
+
proto.aggregator.ContractReadNode.Output.prototype.setResultsList = function(value) {
|
|
3940
4415
|
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
3941
4416
|
};
|
|
3942
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
3943
|
-
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.
|
|
4417
|
+
proto.aggregator.ContractReadNode.Output.prototype.addResults = function(opt_value, opt_index) {
|
|
4418
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ContractReadNode.MethodResult, opt_index);
|
|
3944
4419
|
};
|
|
3945
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
3946
|
-
return this.
|
|
4420
|
+
proto.aggregator.ContractReadNode.Output.prototype.clearResultsList = function() {
|
|
4421
|
+
return this.setResultsList([]);
|
|
3947
4422
|
};
|
|
3948
4423
|
proto.aggregator.ContractReadNode.prototype.getConfig = function() {
|
|
3949
4424
|
return (
|
|
@@ -14614,7 +15089,6 @@ var CronTrigger2 = class _CronTrigger extends interface_default {
|
|
|
14614
15089
|
var cron_default = CronTrigger2;
|
|
14615
15090
|
|
|
14616
15091
|
// src/models/trigger/event.ts
|
|
14617
|
-
var _ = __toESM(require("lodash"));
|
|
14618
15092
|
var avs_pb4 = __toESM(require_avs_pb());
|
|
14619
15093
|
var import_types3 = require("@avaprotocol/types");
|
|
14620
15094
|
var EventTrigger2 = class _EventTrigger extends interface_default {
|
|
@@ -14630,45 +15104,66 @@ var EventTrigger2 = class _EventTrigger extends interface_default {
|
|
|
14630
15104
|
throw new Error(`Trigger data is missing for ${this.type}`);
|
|
14631
15105
|
}
|
|
14632
15106
|
const trigger = new avs_pb4.EventTrigger();
|
|
14633
|
-
const dataConfig = this.data;
|
|
14634
15107
|
const config = new avs_pb4.EventTrigger.Config();
|
|
14635
|
-
const
|
|
14636
|
-
const
|
|
14637
|
-
if (
|
|
14638
|
-
throw new Error(`
|
|
14639
|
-
}
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
15108
|
+
const dataConfig = this.data;
|
|
15109
|
+
const queries = dataConfig.queriesList;
|
|
15110
|
+
if (!queries || queries.length === 0) {
|
|
15111
|
+
throw new Error(`Queries array is required for ${this.type}`);
|
|
15112
|
+
}
|
|
15113
|
+
const queryMessages = queries.map((queryData) => {
|
|
15114
|
+
const query = new avs_pb4.EventTrigger.Query();
|
|
15115
|
+
if (queryData.addressesList && queryData.addressesList.length > 0) {
|
|
15116
|
+
query.setAddressesList(queryData.addressesList);
|
|
15117
|
+
}
|
|
15118
|
+
if (queryData.topicsList && queryData.topicsList.length > 0) {
|
|
15119
|
+
const topicsMessages = queryData.topicsList.map((topicData) => {
|
|
15120
|
+
const topics = new avs_pb4.EventTrigger.Topics();
|
|
15121
|
+
if (topicData.valuesList) {
|
|
15122
|
+
topics.setValuesList(topicData.valuesList);
|
|
15123
|
+
}
|
|
15124
|
+
return topics;
|
|
15125
|
+
});
|
|
15126
|
+
query.setTopicsList(topicsMessages);
|
|
15127
|
+
}
|
|
15128
|
+
if (queryData.maxEventsPerBlock !== void 0) {
|
|
15129
|
+
query.setMaxEventsPerBlock(queryData.maxEventsPerBlock);
|
|
15130
|
+
}
|
|
15131
|
+
return query;
|
|
15132
|
+
});
|
|
15133
|
+
config.setQueriesList(queryMessages);
|
|
14650
15134
|
trigger.setConfig(config);
|
|
14651
15135
|
request.setEvent(trigger);
|
|
14652
15136
|
return request;
|
|
14653
15137
|
}
|
|
14654
15138
|
static fromResponse(raw) {
|
|
14655
15139
|
const obj = raw.toObject();
|
|
14656
|
-
let data = {
|
|
15140
|
+
let data = { queriesList: [] };
|
|
14657
15141
|
if (raw.getEvent() && raw.getEvent().hasConfig()) {
|
|
14658
15142
|
const config = raw.getEvent().getConfig();
|
|
14659
15143
|
if (config) {
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
return {
|
|
14667
|
-
type: item.getType(),
|
|
14668
|
-
valueList: item.getValueList() || []
|
|
15144
|
+
const queries = [];
|
|
15145
|
+
if (config.getQueriesList && config.getQueriesList().length > 0) {
|
|
15146
|
+
config.getQueriesList().forEach((query) => {
|
|
15147
|
+
const queryData = {
|
|
15148
|
+
addressesList: [],
|
|
15149
|
+
topicsList: []
|
|
14669
15150
|
};
|
|
15151
|
+
if (query.getAddressesList && query.getAddressesList().length > 0) {
|
|
15152
|
+
queryData.addressesList = query.getAddressesList();
|
|
15153
|
+
}
|
|
15154
|
+
if (query.getTopicsList && query.getTopicsList().length > 0) {
|
|
15155
|
+
queryData.topicsList = query.getTopicsList().map((topics) => ({
|
|
15156
|
+
valuesList: topics.getValuesList() || []
|
|
15157
|
+
}));
|
|
15158
|
+
}
|
|
15159
|
+
const maxEvents = query.getMaxEventsPerBlock();
|
|
15160
|
+
if (maxEvents && maxEvents > 0) {
|
|
15161
|
+
queryData.maxEventsPerBlock = maxEvents;
|
|
15162
|
+
}
|
|
15163
|
+
queries.push(queryData);
|
|
14670
15164
|
});
|
|
14671
15165
|
}
|
|
15166
|
+
data = { queriesList: queries };
|
|
14672
15167
|
}
|
|
14673
15168
|
}
|
|
14674
15169
|
return new _EventTrigger({
|
|
@@ -15260,18 +15755,35 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
15260
15755
|
const nodeData = new avs_pb13.ContractReadNode();
|
|
15261
15756
|
const config = new avs_pb13.ContractReadNode.Config();
|
|
15262
15757
|
config.setContractAddress(this.data.contractAddress);
|
|
15263
|
-
config.setCallData(this.data.callData);
|
|
15264
15758
|
config.setContractAbi(this.data.contractAbi);
|
|
15759
|
+
const methodCalls = this.data.methodCallsList || [];
|
|
15760
|
+
methodCalls.forEach((methodCall) => {
|
|
15761
|
+
const methodCallMsg = new avs_pb13.ContractReadNode.MethodCall();
|
|
15762
|
+
methodCallMsg.setCallData(methodCall.callData);
|
|
15763
|
+
if (methodCall.methodName) {
|
|
15764
|
+
methodCallMsg.setMethodName(methodCall.methodName);
|
|
15765
|
+
}
|
|
15766
|
+
config.addMethodCalls(methodCallMsg);
|
|
15767
|
+
});
|
|
15265
15768
|
nodeData.setConfig(config);
|
|
15266
15769
|
request.setContractRead(nodeData);
|
|
15267
15770
|
return request;
|
|
15268
15771
|
}
|
|
15269
15772
|
static fromOutputData(outputData) {
|
|
15270
15773
|
const contractReadOutput = outputData.getContractRead();
|
|
15271
|
-
if (contractReadOutput && contractReadOutput.
|
|
15272
|
-
const
|
|
15774
|
+
if (contractReadOutput && contractReadOutput.getResultsList()) {
|
|
15775
|
+
const resultsList = contractReadOutput.getResultsList();
|
|
15273
15776
|
return {
|
|
15274
|
-
|
|
15777
|
+
results: resultsList.map((result) => ({
|
|
15778
|
+
methodName: result.getMethodName(),
|
|
15779
|
+
success: result.getSuccess(),
|
|
15780
|
+
error: result.getError(),
|
|
15781
|
+
data: result.getDataList().map((field) => ({
|
|
15782
|
+
name: field.getName(),
|
|
15783
|
+
type: field.getType(),
|
|
15784
|
+
value: field.getValue()
|
|
15785
|
+
}))
|
|
15786
|
+
}))
|
|
15275
15787
|
};
|
|
15276
15788
|
}
|
|
15277
15789
|
return null;
|
|
@@ -15458,8 +15970,16 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
15458
15970
|
if (data.contractRead.config) {
|
|
15459
15971
|
const config2 = new avs_pb17.ContractReadNode.Config();
|
|
15460
15972
|
config2.setContractAddress(data.contractRead.config.contractAddress);
|
|
15461
|
-
config2.setCallData(data.contractRead.config.callData);
|
|
15462
15973
|
config2.setContractAbi(data.contractRead.config.contractAbi);
|
|
15974
|
+
const methodCalls = data.contractRead.config.methodCallsList || [];
|
|
15975
|
+
methodCalls.forEach((methodCall) => {
|
|
15976
|
+
const methodCallMsg = new avs_pb17.ContractReadNode.MethodCall();
|
|
15977
|
+
methodCallMsg.setCallData(methodCall.callData);
|
|
15978
|
+
if (methodCall.methodName) {
|
|
15979
|
+
methodCallMsg.setMethodName(methodCall.methodName);
|
|
15980
|
+
}
|
|
15981
|
+
config2.addMethodCalls(methodCallMsg);
|
|
15982
|
+
});
|
|
15463
15983
|
contractRead.setConfig(config2);
|
|
15464
15984
|
}
|
|
15465
15985
|
loopNode.setContractRead(contractRead);
|
|
@@ -15831,9 +16351,37 @@ var Step = class _Step {
|
|
|
15831
16351
|
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_READ:
|
|
15832
16352
|
nodeOutputMessage = step.getContractRead();
|
|
15833
16353
|
if (nodeOutputMessage) {
|
|
15834
|
-
|
|
16354
|
+
const results = nodeOutputMessage.getResultsList();
|
|
16355
|
+
if (results && results.length > 0) {
|
|
16356
|
+
if (results.length === 1) {
|
|
16357
|
+
const result = results[0];
|
|
16358
|
+
const structuredData = {};
|
|
16359
|
+
result.getDataList().forEach((field) => {
|
|
16360
|
+
structuredData[field.getName()] = field.getValue();
|
|
16361
|
+
});
|
|
16362
|
+
return {
|
|
16363
|
+
methodName: result.getMethodName(),
|
|
16364
|
+
success: result.getSuccess(),
|
|
16365
|
+
error: result.getError(),
|
|
16366
|
+
data: structuredData
|
|
16367
|
+
};
|
|
16368
|
+
} else {
|
|
16369
|
+
return results.map((result) => {
|
|
16370
|
+
const structuredData = {};
|
|
16371
|
+
result.getDataList().forEach((field) => {
|
|
16372
|
+
structuredData[field.getName()] = field.getValue();
|
|
16373
|
+
});
|
|
16374
|
+
return {
|
|
16375
|
+
methodName: result.getMethodName(),
|
|
16376
|
+
success: result.getSuccess(),
|
|
16377
|
+
error: result.getError(),
|
|
16378
|
+
data: structuredData
|
|
16379
|
+
};
|
|
16380
|
+
});
|
|
16381
|
+
}
|
|
16382
|
+
}
|
|
15835
16383
|
}
|
|
15836
|
-
return
|
|
16384
|
+
return void 0;
|
|
15837
16385
|
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_WRITE:
|
|
15838
16386
|
return step.getContractWrite()?.toObject();
|
|
15839
16387
|
case avs_pb20.Execution.Step.OutputDataCase.CUSTOM_CODE:
|