@avaprotocol/sdk-js 2.0.2 → 2.0.3
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 +6 -0
- package/dist/index.js +32 -5
- package/dist/index.mjs +32 -5
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +9 -1
- package/dist/models/trigger/factory.d.ts.map +1 -1
- package/dist/models/trigger/factory.js +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -88,6 +88,7 @@ var require_avs_pb = __commonJS({
|
|
|
88
88
|
goog.exportSymbol("proto.aggregator.EventTrigger.Config", null, global);
|
|
89
89
|
goog.exportSymbol("proto.aggregator.EventTrigger.Matcher", null, global);
|
|
90
90
|
goog.exportSymbol("proto.aggregator.EventTrigger.Output", null, global);
|
|
91
|
+
goog.exportSymbol("proto.aggregator.EventTrigger.Output.OutputTypeCase", null, global);
|
|
91
92
|
goog.exportSymbol("proto.aggregator.EventTrigger.TransferLogOutput", null, global);
|
|
92
93
|
goog.exportSymbol("proto.aggregator.Evm", null, global);
|
|
93
94
|
goog.exportSymbol("proto.aggregator.Evm.Log", null, global);
|
|
@@ -281,7 +282,7 @@ var require_avs_pb = __commonJS({
|
|
|
281
282
|
proto.aggregator.EventTrigger.Config.displayName = "proto.aggregator.EventTrigger.Config";
|
|
282
283
|
}
|
|
283
284
|
proto.aggregator.EventTrigger.Output = function(opt_data) {
|
|
284
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null,
|
|
285
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.EventTrigger.Output.oneofGroups_);
|
|
285
286
|
};
|
|
286
287
|
goog.inherits(proto.aggregator.EventTrigger.Output, jspb.Message);
|
|
287
288
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -2281,6 +2282,18 @@ var require_avs_pb = __commonJS({
|
|
|
2281
2282
|
proto.aggregator.EventTrigger.Config.prototype.setExpression = function(value) {
|
|
2282
2283
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
2283
2284
|
};
|
|
2285
|
+
proto.aggregator.EventTrigger.Output.oneofGroups_ = [[1, 2]];
|
|
2286
|
+
proto.aggregator.EventTrigger.Output.OutputTypeCase = {
|
|
2287
|
+
OUTPUT_TYPE_NOT_SET: 0,
|
|
2288
|
+
EVM_LOG: 1,
|
|
2289
|
+
TRANSFER_LOG: 2
|
|
2290
|
+
};
|
|
2291
|
+
proto.aggregator.EventTrigger.Output.prototype.getOutputTypeCase = function() {
|
|
2292
|
+
return (
|
|
2293
|
+
/** @type {proto.aggregator.EventTrigger.Output.OutputTypeCase} */
|
|
2294
|
+
jspb.Message.computeOneofCase(this, proto.aggregator.EventTrigger.Output.oneofGroups_[0])
|
|
2295
|
+
);
|
|
2296
|
+
};
|
|
2284
2297
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2285
2298
|
proto.aggregator.EventTrigger.Output.prototype.toObject = function(opt_includeInstance) {
|
|
2286
2299
|
return proto.aggregator.EventTrigger.Output.toObject(opt_includeInstance, this);
|
|
@@ -2356,7 +2369,7 @@ var require_avs_pb = __commonJS({
|
|
|
2356
2369
|
);
|
|
2357
2370
|
};
|
|
2358
2371
|
proto.aggregator.EventTrigger.Output.prototype.setEvmLog = function(value) {
|
|
2359
|
-
return jspb.Message.
|
|
2372
|
+
return jspb.Message.setOneofWrapperField(this, 1, proto.aggregator.EventTrigger.Output.oneofGroups_[0], value);
|
|
2360
2373
|
};
|
|
2361
2374
|
proto.aggregator.EventTrigger.Output.prototype.clearEvmLog = function() {
|
|
2362
2375
|
return this.setEvmLog(void 0);
|
|
@@ -2371,7 +2384,7 @@ var require_avs_pb = __commonJS({
|
|
|
2371
2384
|
);
|
|
2372
2385
|
};
|
|
2373
2386
|
proto.aggregator.EventTrigger.Output.prototype.setTransferLog = function(value) {
|
|
2374
|
-
return jspb.Message.
|
|
2387
|
+
return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.EventTrigger.Output.oneofGroups_[0], value);
|
|
2375
2388
|
};
|
|
2376
2389
|
proto.aggregator.EventTrigger.Output.prototype.clearTransferLog = function() {
|
|
2377
2390
|
return this.setTransferLog(void 0);
|
|
@@ -14670,7 +14683,14 @@ var EventTrigger2 = class _EventTrigger extends interface_default {
|
|
|
14670
14683
|
*/
|
|
14671
14684
|
static fromOutputData(outputData) {
|
|
14672
14685
|
const eventOutput = outputData.getEventTrigger();
|
|
14673
|
-
|
|
14686
|
+
if (eventOutput) {
|
|
14687
|
+
if (eventOutput.hasEvmLog()) {
|
|
14688
|
+
return eventOutput.getEvmLog()?.toObject();
|
|
14689
|
+
} else if (eventOutput.hasTransferLog()) {
|
|
14690
|
+
return eventOutput.getTransferLog()?.toObject();
|
|
14691
|
+
}
|
|
14692
|
+
}
|
|
14693
|
+
return null;
|
|
14674
14694
|
}
|
|
14675
14695
|
};
|
|
14676
14696
|
var event_default = EventTrigger2;
|
|
@@ -14984,7 +15004,14 @@ var TriggerFactory = class {
|
|
|
14984
15004
|
break;
|
|
14985
15005
|
case avs_pb7.RunTriggerResp.OutputDataCase.EVENT_TRIGGER:
|
|
14986
15006
|
triggerOutput = outputData.getEventTrigger();
|
|
14987
|
-
|
|
15007
|
+
if (triggerOutput) {
|
|
15008
|
+
if (triggerOutput.hasEvmLog()) {
|
|
15009
|
+
return triggerOutput.getEvmLog()?.toObject();
|
|
15010
|
+
} else if (triggerOutput.hasTransferLog()) {
|
|
15011
|
+
return triggerOutput.getTransferLog()?.toObject();
|
|
15012
|
+
}
|
|
15013
|
+
}
|
|
15014
|
+
return null;
|
|
14988
15015
|
case avs_pb7.RunTriggerResp.OutputDataCase.MANUAL_TRIGGER:
|
|
14989
15016
|
triggerOutput = outputData.getManualTrigger();
|
|
14990
15017
|
break;
|
package/dist/index.mjs
CHANGED
|
@@ -88,6 +88,7 @@ var require_avs_pb = __commonJS({
|
|
|
88
88
|
goog.exportSymbol("proto.aggregator.EventTrigger.Config", null, global);
|
|
89
89
|
goog.exportSymbol("proto.aggregator.EventTrigger.Matcher", null, global);
|
|
90
90
|
goog.exportSymbol("proto.aggregator.EventTrigger.Output", null, global);
|
|
91
|
+
goog.exportSymbol("proto.aggregator.EventTrigger.Output.OutputTypeCase", null, global);
|
|
91
92
|
goog.exportSymbol("proto.aggregator.EventTrigger.TransferLogOutput", null, global);
|
|
92
93
|
goog.exportSymbol("proto.aggregator.Evm", null, global);
|
|
93
94
|
goog.exportSymbol("proto.aggregator.Evm.Log", null, global);
|
|
@@ -281,7 +282,7 @@ var require_avs_pb = __commonJS({
|
|
|
281
282
|
proto.aggregator.EventTrigger.Config.displayName = "proto.aggregator.EventTrigger.Config";
|
|
282
283
|
}
|
|
283
284
|
proto.aggregator.EventTrigger.Output = function(opt_data) {
|
|
284
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null,
|
|
285
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.EventTrigger.Output.oneofGroups_);
|
|
285
286
|
};
|
|
286
287
|
goog.inherits(proto.aggregator.EventTrigger.Output, jspb.Message);
|
|
287
288
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -2281,6 +2282,18 @@ var require_avs_pb = __commonJS({
|
|
|
2281
2282
|
proto.aggregator.EventTrigger.Config.prototype.setExpression = function(value) {
|
|
2282
2283
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
2283
2284
|
};
|
|
2285
|
+
proto.aggregator.EventTrigger.Output.oneofGroups_ = [[1, 2]];
|
|
2286
|
+
proto.aggregator.EventTrigger.Output.OutputTypeCase = {
|
|
2287
|
+
OUTPUT_TYPE_NOT_SET: 0,
|
|
2288
|
+
EVM_LOG: 1,
|
|
2289
|
+
TRANSFER_LOG: 2
|
|
2290
|
+
};
|
|
2291
|
+
proto.aggregator.EventTrigger.Output.prototype.getOutputTypeCase = function() {
|
|
2292
|
+
return (
|
|
2293
|
+
/** @type {proto.aggregator.EventTrigger.Output.OutputTypeCase} */
|
|
2294
|
+
jspb.Message.computeOneofCase(this, proto.aggregator.EventTrigger.Output.oneofGroups_[0])
|
|
2295
|
+
);
|
|
2296
|
+
};
|
|
2284
2297
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2285
2298
|
proto.aggregator.EventTrigger.Output.prototype.toObject = function(opt_includeInstance) {
|
|
2286
2299
|
return proto.aggregator.EventTrigger.Output.toObject(opt_includeInstance, this);
|
|
@@ -2356,7 +2369,7 @@ var require_avs_pb = __commonJS({
|
|
|
2356
2369
|
);
|
|
2357
2370
|
};
|
|
2358
2371
|
proto.aggregator.EventTrigger.Output.prototype.setEvmLog = function(value) {
|
|
2359
|
-
return jspb.Message.
|
|
2372
|
+
return jspb.Message.setOneofWrapperField(this, 1, proto.aggregator.EventTrigger.Output.oneofGroups_[0], value);
|
|
2360
2373
|
};
|
|
2361
2374
|
proto.aggregator.EventTrigger.Output.prototype.clearEvmLog = function() {
|
|
2362
2375
|
return this.setEvmLog(void 0);
|
|
@@ -2371,7 +2384,7 @@ var require_avs_pb = __commonJS({
|
|
|
2371
2384
|
);
|
|
2372
2385
|
};
|
|
2373
2386
|
proto.aggregator.EventTrigger.Output.prototype.setTransferLog = function(value) {
|
|
2374
|
-
return jspb.Message.
|
|
2387
|
+
return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.EventTrigger.Output.oneofGroups_[0], value);
|
|
2375
2388
|
};
|
|
2376
2389
|
proto.aggregator.EventTrigger.Output.prototype.clearTransferLog = function() {
|
|
2377
2390
|
return this.setTransferLog(void 0);
|
|
@@ -14641,7 +14654,14 @@ var EventTrigger2 = class _EventTrigger extends interface_default {
|
|
|
14641
14654
|
*/
|
|
14642
14655
|
static fromOutputData(outputData) {
|
|
14643
14656
|
const eventOutput = outputData.getEventTrigger();
|
|
14644
|
-
|
|
14657
|
+
if (eventOutput) {
|
|
14658
|
+
if (eventOutput.hasEvmLog()) {
|
|
14659
|
+
return eventOutput.getEvmLog()?.toObject();
|
|
14660
|
+
} else if (eventOutput.hasTransferLog()) {
|
|
14661
|
+
return eventOutput.getTransferLog()?.toObject();
|
|
14662
|
+
}
|
|
14663
|
+
}
|
|
14664
|
+
return null;
|
|
14645
14665
|
}
|
|
14646
14666
|
};
|
|
14647
14667
|
var event_default = EventTrigger2;
|
|
@@ -14961,7 +14981,14 @@ var TriggerFactory = class {
|
|
|
14961
14981
|
break;
|
|
14962
14982
|
case avs_pb7.RunTriggerResp.OutputDataCase.EVENT_TRIGGER:
|
|
14963
14983
|
triggerOutput = outputData.getEventTrigger();
|
|
14964
|
-
|
|
14984
|
+
if (triggerOutput) {
|
|
14985
|
+
if (triggerOutput.hasEvmLog()) {
|
|
14986
|
+
return triggerOutput.getEvmLog()?.toObject();
|
|
14987
|
+
} else if (triggerOutput.hasTransferLog()) {
|
|
14988
|
+
return triggerOutput.getTransferLog()?.toObject();
|
|
14989
|
+
}
|
|
14990
|
+
}
|
|
14991
|
+
return null;
|
|
14965
14992
|
case avs_pb7.RunTriggerResp.OutputDataCase.MANUAL_TRIGGER:
|
|
14966
14993
|
triggerOutput = outputData.getManualTrigger();
|
|
14967
14994
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAA0B,MAAM,aAAa,CAAC;AACrD,OAAO,EAAqC,kBAAkB,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AAwB5H,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;IAyC/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,YAAY;IAiC1D;;;;OAIG;IACH,SAAS,IAAI,kBAAkB,GAAG,SAAS;IAI3C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAA0B,MAAM,aAAa,CAAC;AACrD,OAAO,EAAqC,kBAAkB,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AAwB5H,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;IAyC/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,YAAY;IAiC1D;;;;OAIG;IACH,SAAS,IAAI,kBAAkB,GAAG,SAAS;IAI3C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAW9D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -97,7 +97,15 @@ class EventTrigger extends Trigger {
|
|
|
97
97
|
*/
|
|
98
98
|
static fromOutputData(outputData) {
|
|
99
99
|
const eventOutput = outputData.getEventTrigger();
|
|
100
|
-
|
|
100
|
+
if (eventOutput) {
|
|
101
|
+
if (eventOutput.hasEvmLog()) {
|
|
102
|
+
return eventOutput.getEvmLog()?.toObject();
|
|
103
|
+
}
|
|
104
|
+
else if (eventOutput.hasTransferLog()) {
|
|
105
|
+
return eventOutput.getTransferLog()?.toObject();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
101
109
|
}
|
|
102
110
|
}
|
|
103
111
|
export default EventTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,YAAY,MAAM,SAAS,CAAC;AACnC,OA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C,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAsD9D;AAED,eAAe,cAAc,CAAC;AAG9B,OAAO,EACL,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,aAAa,GACd,CAAC;AAGF,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,GACnB,CAAC"}
|
|
@@ -68,7 +68,15 @@ class TriggerFactory {
|
|
|
68
68
|
break;
|
|
69
69
|
case avs_pb.RunTriggerResp.OutputDataCase.EVENT_TRIGGER:
|
|
70
70
|
triggerOutput = outputData.getEventTrigger();
|
|
71
|
-
|
|
71
|
+
if (triggerOutput) {
|
|
72
|
+
if (triggerOutput.hasEvmLog()) {
|
|
73
|
+
return triggerOutput.getEvmLog()?.toObject();
|
|
74
|
+
}
|
|
75
|
+
else if (triggerOutput.hasTransferLog()) {
|
|
76
|
+
return triggerOutput.getTransferLog()?.toObject();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
72
80
|
case avs_pb.RunTriggerResp.OutputDataCase.MANUAL_TRIGGER:
|
|
73
81
|
triggerOutput = outputData.getManualTrigger();
|
|
74
82
|
break;
|
package/package.json
CHANGED