@avaprotocol/sdk-js 2.7.5-dev.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @avaprotocol/sdk-js
2
2
 
3
+ ## 2.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c74b912: Added fee estimation interface and gas cost to execution.step
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [c74b912]
12
+ - @avaprotocol/types@2.6.0
13
+
3
14
  ## 2.7.4
4
15
 
5
16
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -353,16 +353,10 @@ declare class Client extends BaseClient {
353
353
  getTokenMetadata({ address }: GetTokenMetadataRequest, options?: RequestOptions): Promise<GetTokenMetadataResponse>;
354
354
  /**
355
355
  * Get comprehensive fee estimation for workflow deployment
356
- * Provides detailed breakdown of gas fees, automation fees, and smart wallet creation costs
357
- * @param {EstimateFeesRequest} params - The fee estimation request parameters
358
- * @param {TriggerProps} params.trigger - Trigger configuration for the workflow
359
- * @param {NodeProps[]} params.nodes - Array of workflow nodes
360
- * @param {string} [params.runner] - Runner address (smart wallet) - optional if in inputVariables
361
- * @param {Record<string, any>} [params.inputVariables] - Input variables including workflowContext
362
- * @param {number} params.createdAt - Workflow creation timestamp (milliseconds)
363
- * @param {number} params.expireAt - Workflow expiration timestamp (milliseconds)
364
- * @param {RequestOptions} options - Request options
365
- * @returns {Promise<EstimateFeesResponse>} - Comprehensive fee breakdown with gas, automation, and creation costs
356
+ *
357
+ * @param params - Fee estimation request parameters
358
+ * @param options - Optional request options (auth key, timeout)
359
+ * @returns Promise resolving to comprehensive fee breakdown
366
360
  */
367
361
  estimateFees({ trigger, nodes, runner, inputVariables, createdAt, expireAt, }: EstimateFeesRequest, options?: RequestOptions): Promise<EstimateFeesResponse>;
368
362
  /**
@@ -389,7 +383,4 @@ declare class Client extends BaseClient {
389
383
  export * from "./models/node/factory";
390
384
  export * from "./models/trigger/factory";
391
385
  export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, Secret, ErrorCode, cleanGrpcErrorMessage, };
392
- export type { TokenMetadata, GetTokenMetadataRequest, GetTokenMetadataResponse, TokenSource, WithdrawFundsRequest, WithdrawFundsResponse, } from "@avaprotocol/types";
393
- export type { EstimateFeesRequest, EstimateFeesResponse, FeeAmount, GasFeeBreakdown, NodeGasFee, AutomationFee, AutomationFeeComponent, SmartWalletCreationFee, Discount, } from "@avaprotocol/types";
394
- export { TimeoutPresets, type TimeoutConfig, type TimeoutError, } from "@avaprotocol/types";
395
386
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,EAAU,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAOL,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,K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;;;;;OAMG;IACG,gBAAgB,CACpB,EAAE,OAAO,EAAE,EAAE,uBAAuB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,wBAAwB,CAAC;IAyBpC;;;;;;OAMG;IACG,YAAY,CAChB,EACE,OAAO,EACP,KAAK,EACL,MAAM,EACN,cAAmB,EACnB,SAAS,EACT,QAAQ,GACT,EAAE,mBAAmB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,oBAAoB,CAAC;IA0ChC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAwGnC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CAQzB;AAED,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,cAAc,EACd,MAAM,EACN,SAAS,EACT,qBAAqB,GACtB,CAAC"}
package/dist/index.js CHANGED
@@ -7262,6 +7262,7 @@ var require_avs_pb = __commonJS({
7262
7262
  name: jspb.Message.getFieldWithDefault(msg, 18, ""),
7263
7263
  success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
7264
7264
  error: jspb.Message.getFieldWithDefault(msg, 13, ""),
7265
+ errorCode: jspb.Message.getFieldWithDefault(msg, 31, 0),
7265
7266
  log: jspb.Message.getFieldWithDefault(msg, 12, ""),
7266
7267
  inputsList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? void 0 : f,
7267
7268
  config: (f = msg.getConfig()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
@@ -7340,6 +7341,13 @@ var require_avs_pb = __commonJS({
7340
7341
  );
7341
7342
  msg.setError(value);
7342
7343
  break;
7344
+ case 31:
7345
+ var value = (
7346
+ /** @type {!proto.aggregator.ErrorCode} */
7347
+ reader.readEnum()
7348
+ );
7349
+ msg.setErrorCode(value);
7350
+ break;
7343
7351
  case 12:
7344
7352
  var value = (
7345
7353
  /** @type {string} */
@@ -7523,6 +7531,13 @@ var require_avs_pb = __commonJS({
7523
7531
  f
7524
7532
  );
7525
7533
  }
7534
+ f = message.getErrorCode();
7535
+ if (f !== 0) {
7536
+ writer.writeEnum(
7537
+ 31,
7538
+ f
7539
+ );
7540
+ }
7526
7541
  f = message.getLog();
7527
7542
  if (f.length > 0) {
7528
7543
  writer.writeString(
@@ -7754,6 +7769,15 @@ var require_avs_pb = __commonJS({
7754
7769
  proto.aggregator.Execution.Step.prototype.setError = function(value) {
7755
7770
  return jspb.Message.setProto3StringField(this, 13, value);
7756
7771
  };
7772
+ proto.aggregator.Execution.Step.prototype.getErrorCode = function() {
7773
+ return (
7774
+ /** @type {!proto.aggregator.ErrorCode} */
7775
+ jspb.Message.getFieldWithDefault(this, 31, 0)
7776
+ );
7777
+ };
7778
+ proto.aggregator.Execution.Step.prototype.setErrorCode = function(value) {
7779
+ return jspb.Message.setProto3EnumField(this, 31, value);
7780
+ };
7757
7781
  proto.aggregator.Execution.Step.prototype.getLog = function() {
7758
7782
  return (
7759
7783
  /** @type {string} */
@@ -18169,7 +18193,6 @@ __export(index_exports, {
18169
18193
  RestAPINode: () => restApi_default,
18170
18194
  Secret: () => secret_default,
18171
18195
  Step: () => step_default,
18172
- TimeoutPresets: () => import_types22.TimeoutPresets,
18173
18196
  Trigger: () => Trigger,
18174
18197
  TriggerFactory: () => factory_default,
18175
18198
  Workflow: () => workflow_default,
@@ -18435,7 +18458,6 @@ function convertProtobufValueToJs(value) {
18435
18458
  }
18436
18459
  }
18437
18460
  function convertJSValueToProtobuf(value) {
18438
- console.log("\u{1F50D} [DEBUG] convertJSValueToProtobuf called with:", { value, type: typeof value });
18439
18461
  const protobufValue = new import_struct_pb.Value();
18440
18462
  if (value === null || value === void 0) {
18441
18463
  protobufValue.setNullValue(0);
@@ -19917,6 +19939,13 @@ var Workflow = class _Workflow {
19917
19939
  (node) => factory_default2.fromResponse(node)
19918
19940
  );
19919
19941
  const edges = import_lodash3.default.map(obj.getEdgesList(), (edge) => edge_default.fromResponse(edge));
19942
+ const inputVariables = {};
19943
+ const inputVarsMap = obj.getInputVariablesMap();
19944
+ if (inputVarsMap && inputVarsMap.getLength() > 0) {
19945
+ inputVarsMap.forEach((value, key) => {
19946
+ inputVariables[key] = value.toJavaScript();
19947
+ });
19948
+ }
19920
19949
  const workflow = new _Workflow({
19921
19950
  id: obj.getId(),
19922
19951
  owner: obj.getOwner(),
@@ -19931,7 +19960,8 @@ var Workflow = class _Workflow {
19931
19960
  name: obj.getName(),
19932
19961
  status: convertStatusToString(obj.getStatus()),
19933
19962
  completedAt: obj.getCompletedAt(),
19934
- lastRanAt: obj.getLastRanAt()
19963
+ lastRanAt: obj.getLastRanAt(),
19964
+ inputVariables: Object.keys(inputVariables).length > 0 ? inputVariables : void 0
19935
19965
  });
19936
19966
  return workflow;
19937
19967
  }
@@ -19944,6 +19974,13 @@ var Workflow = class _Workflow {
19944
19974
  if (!trigger) {
19945
19975
  throw new Error("Trigger is undefined in fromListResponse()");
19946
19976
  }
19977
+ const inputVariables = {};
19978
+ const inputVarsMap = obj.getInputVariablesMap();
19979
+ if (inputVarsMap && inputVarsMap.getLength() > 0) {
19980
+ inputVarsMap.forEach((value, key) => {
19981
+ inputVariables[key] = value.toJavaScript();
19982
+ });
19983
+ }
19947
19984
  return new _Workflow({
19948
19985
  id: obj.getId(),
19949
19986
  owner: obj.getOwner(),
@@ -19958,7 +19995,8 @@ var Workflow = class _Workflow {
19958
19995
  completedAt: obj.getCompletedAt(),
19959
19996
  status: convertStatusToString(obj.getStatus()),
19960
19997
  name: obj.getName(),
19961
- lastRanAt: obj.getLastRanAt()
19998
+ lastRanAt: obj.getLastRanAt(),
19999
+ inputVariables: Object.keys(inputVariables).length > 0 ? inputVariables : void 0
19962
20000
  });
19963
20001
  }
19964
20002
  toRequest() {
@@ -20001,21 +20039,11 @@ var Workflow = class _Workflow {
20001
20039
  if (this.name) {
20002
20040
  request.setName(this.name);
20003
20041
  }
20004
- console.log("\u{1F50D} [DEBUG] Workflow.toRequest() inputVariables check:", {
20005
- hasInputVariables: !!this.inputVariables,
20006
- inputVariables: this.inputVariables,
20007
- inputVariablesType: typeof this.inputVariables,
20008
- inputVariablesKeys: this.inputVariables ? Object.keys(this.inputVariables) : []
20009
- });
20010
20042
  if (this.inputVariables) {
20011
20043
  const inputVarsMap = request.getInputVariablesMap();
20012
20044
  for (const [key, value] of Object.entries(this.inputVariables)) {
20013
- console.log("\u{1F50D} [DEBUG] Converting inputVariable:", { key, value, valueType: typeof value });
20014
20045
  inputVarsMap.set(key, convertJSValueToProtobuf(value));
20015
20046
  }
20016
- console.log("\u{1F50D} [DEBUG] Final inputVarsMap size:", inputVarsMap.getLength());
20017
- } else {
20018
- console.log("\u{1F50D} [DEBUG] No inputVariables to add to request");
20019
20047
  }
20020
20048
  return request;
20021
20049
  }
@@ -20058,6 +20086,7 @@ var Step = class _Step {
20058
20086
  this.name = props.name;
20059
20087
  this.success = props.success;
20060
20088
  this.error = props.error;
20089
+ this.errorCode = props.errorCode;
20061
20090
  this.log = props.log;
20062
20091
  this.inputsList = props.inputsList;
20063
20092
  this.config = props.config;
@@ -20081,6 +20110,7 @@ var Step = class _Step {
20081
20110
  name: this.name,
20082
20111
  success: this.success,
20083
20112
  error: this.error,
20113
+ errorCode: this.errorCode,
20084
20114
  log: this.log,
20085
20115
  inputsList: this.inputsList,
20086
20116
  config: this.config,
@@ -20204,6 +20234,7 @@ var Step = class _Step {
20204
20234
  const getName = () => typeof step.getName === "function" ? step.getName() : step.name;
20205
20235
  const getSuccess = () => typeof step.getSuccess === "function" ? step.getSuccess() : step.success;
20206
20236
  const getError = () => typeof step.getError === "function" ? step.getError() : step.error;
20237
+ const getErrorCode = () => typeof step.getErrorCode === "function" ? step.getErrorCode() : step.errorCode;
20207
20238
  const getLog = () => typeof step.getLog === "function" ? step.getLog() : step.log;
20208
20239
  const getInputsList = () => typeof step.getInputsList === "function" ? step.getInputsList() : step.inputsList || [];
20209
20240
  const getStartAt = () => typeof step.getStartAt === "function" ? step.getStartAt() : step.startAt;
@@ -20239,6 +20270,7 @@ var Step = class _Step {
20239
20270
  name: getName(),
20240
20271
  success: getSuccess(),
20241
20272
  error: getError(),
20273
+ errorCode: getErrorCode(),
20242
20274
  log: getLog(),
20243
20275
  inputsList: getInputsList(),
20244
20276
  config: configData,
@@ -20349,7 +20381,6 @@ var secret_default = Secret;
20349
20381
  var import_types21 = require("@avaprotocol/types");
20350
20382
  var import_avs_pb = __toESM(require_avs_pb());
20351
20383
  var google_protobuf_struct_pb4 = __toESM(require("google-protobuf/google/protobuf/struct_pb"));
20352
- var import_types22 = require("@avaprotocol/types");
20353
20384
  function convertProtobufExecutionStatus(protobufStatus) {
20354
20385
  switch (protobufStatus) {
20355
20386
  case import_avs_pb.ExecutionStatus.EXECUTION_STATUS_PENDING:
@@ -21381,16 +21412,10 @@ var Client = class extends BaseClient {
21381
21412
  }
21382
21413
  /**
21383
21414
  * Get comprehensive fee estimation for workflow deployment
21384
- * Provides detailed breakdown of gas fees, automation fees, and smart wallet creation costs
21385
- * @param {EstimateFeesRequest} params - The fee estimation request parameters
21386
- * @param {TriggerProps} params.trigger - Trigger configuration for the workflow
21387
- * @param {NodeProps[]} params.nodes - Array of workflow nodes
21388
- * @param {string} [params.runner] - Runner address (smart wallet) - optional if in inputVariables
21389
- * @param {Record<string, any>} [params.inputVariables] - Input variables including workflowContext
21390
- * @param {number} params.createdAt - Workflow creation timestamp (milliseconds)
21391
- * @param {number} params.expireAt - Workflow expiration timestamp (milliseconds)
21392
- * @param {RequestOptions} options - Request options
21393
- * @returns {Promise<EstimateFeesResponse>} - Comprehensive fee breakdown with gas, automation, and creation costs
21415
+ *
21416
+ * @param params - Fee estimation request parameters
21417
+ * @param options - Optional request options (auth key, timeout)
21418
+ * @returns Promise resolving to comprehensive fee breakdown
21394
21419
  */
21395
21420
  async estimateFees({
21396
21421
  trigger,
@@ -21442,7 +21467,7 @@ var Client = class extends BaseClient {
21442
21467
  gasUnits: operation.getGasUnits(),
21443
21468
  gasPrice: gasFees.getGasPriceGwei() || "",
21444
21469
  // Use parent gas price
21445
- totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(result.getChainId()),
21470
+ totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(),
21446
21471
  success: operation.getFee() ? parseFloat(operation.getFee().getNativeTokenAmount()) > 0 : false,
21447
21472
  // Check if operation has valid gas cost
21448
21473
  error: void 0
@@ -21458,14 +21483,13 @@ var Client = class extends BaseClient {
21458
21483
  const automationFees = result.getAutomationFees();
21459
21484
  if (automationFees) {
21460
21485
  const baseFee = automationFees.getBaseFee();
21461
- const monitoringFee = automationFees.getMonitoringFee();
21462
21486
  const executionFee = automationFees.getExecutionFee();
21463
- const totalFee = baseFee || this.createMockFeeAmount(result.getChainId());
21487
+ const totalFee = baseFee || this.createMockFeeAmount();
21464
21488
  response.automationFees = {
21465
21489
  triggerType: automationFees.getTriggerType(),
21466
21490
  durationMinutes: automationFees.getDurationMinutes(),
21467
- baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(result.getChainId()),
21468
- executionFee: executionFee ? this.convertFeeAmount(executionFee) : this.createZeroFeeAmount(result.getChainId()),
21491
+ baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(),
21492
+ executionFee: executionFee ? this.convertFeeAmount(executionFee) : this.createZeroFeeAmount(),
21469
21493
  estimatedExecutions: automationFees.getEstimatedExecutions(),
21470
21494
  totalFee: this.convertFeeAmount(totalFee),
21471
21495
  breakdown: []
@@ -21513,13 +21537,13 @@ var Client = class extends BaseClient {
21513
21537
  * Create a mock fee amount object that mimics protobuf FeeAmount interface
21514
21538
  * @private
21515
21539
  */
21516
- createMockFeeAmount(chainId) {
21517
- const getNativeTokenSymbol = (chainId2) => {
21540
+ createMockFeeAmount() {
21541
+ const getNativeTokenSymbol = () => {
21518
21542
  return "ETH";
21519
21543
  };
21520
21544
  return {
21521
21545
  getNativeTokenAmount: () => "0",
21522
- getNativeTokenSymbol: () => getNativeTokenSymbol(chainId),
21546
+ getNativeTokenSymbol: () => getNativeTokenSymbol(),
21523
21547
  getUsdAmount: () => "0",
21524
21548
  getApTokenAmount: () => "0"
21525
21549
  };
@@ -21528,13 +21552,13 @@ var Client = class extends BaseClient {
21528
21552
  * Create a zero fee amount
21529
21553
  * @private
21530
21554
  */
21531
- createZeroFeeAmount(chainId) {
21532
- const getNativeTokenSymbol = (chainId2) => {
21555
+ createZeroFeeAmount() {
21556
+ const getNativeTokenSymbol = () => {
21533
21557
  return "ETH";
21534
21558
  };
21535
21559
  return {
21536
21560
  nativeTokenAmount: "0",
21537
- nativeTokenSymbol: getNativeTokenSymbol(chainId),
21561
+ nativeTokenSymbol: getNativeTokenSymbol(),
21538
21562
  usdAmount: "0",
21539
21563
  apTokenAmount: "0"
21540
21564
  };
@@ -21576,7 +21600,6 @@ var Client = class extends BaseClient {
21576
21600
  RestAPINode,
21577
21601
  Secret,
21578
21602
  Step,
21579
- TimeoutPresets,
21580
21603
  Trigger,
21581
21604
  TriggerFactory,
21582
21605
  Workflow,
package/dist/index.mjs CHANGED
@@ -7262,6 +7262,7 @@ var require_avs_pb = __commonJS({
7262
7262
  name: jspb.Message.getFieldWithDefault(msg, 18, ""),
7263
7263
  success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
7264
7264
  error: jspb.Message.getFieldWithDefault(msg, 13, ""),
7265
+ errorCode: jspb.Message.getFieldWithDefault(msg, 31, 0),
7265
7266
  log: jspb.Message.getFieldWithDefault(msg, 12, ""),
7266
7267
  inputsList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? void 0 : f,
7267
7268
  config: (f = msg.getConfig()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
@@ -7340,6 +7341,13 @@ var require_avs_pb = __commonJS({
7340
7341
  );
7341
7342
  msg.setError(value);
7342
7343
  break;
7344
+ case 31:
7345
+ var value = (
7346
+ /** @type {!proto.aggregator.ErrorCode} */
7347
+ reader.readEnum()
7348
+ );
7349
+ msg.setErrorCode(value);
7350
+ break;
7343
7351
  case 12:
7344
7352
  var value = (
7345
7353
  /** @type {string} */
@@ -7523,6 +7531,13 @@ var require_avs_pb = __commonJS({
7523
7531
  f
7524
7532
  );
7525
7533
  }
7534
+ f = message.getErrorCode();
7535
+ if (f !== 0) {
7536
+ writer.writeEnum(
7537
+ 31,
7538
+ f
7539
+ );
7540
+ }
7526
7541
  f = message.getLog();
7527
7542
  if (f.length > 0) {
7528
7543
  writer.writeString(
@@ -7754,6 +7769,15 @@ var require_avs_pb = __commonJS({
7754
7769
  proto.aggregator.Execution.Step.prototype.setError = function(value) {
7755
7770
  return jspb.Message.setProto3StringField(this, 13, value);
7756
7771
  };
7772
+ proto.aggregator.Execution.Step.prototype.getErrorCode = function() {
7773
+ return (
7774
+ /** @type {!proto.aggregator.ErrorCode} */
7775
+ jspb.Message.getFieldWithDefault(this, 31, 0)
7776
+ );
7777
+ };
7778
+ proto.aggregator.Execution.Step.prototype.setErrorCode = function(value) {
7779
+ return jspb.Message.setProto3EnumField(this, 31, value);
7780
+ };
7757
7781
  proto.aggregator.Execution.Step.prototype.getLog = function() {
7758
7782
  return (
7759
7783
  /** @type {string} */
@@ -18414,7 +18438,6 @@ function convertProtobufValueToJs(value) {
18414
18438
  }
18415
18439
  }
18416
18440
  function convertJSValueToProtobuf(value) {
18417
- console.log("\u{1F50D} [DEBUG] convertJSValueToProtobuf called with:", { value, type: typeof value });
18418
18441
  const protobufValue = new ProtobufValue();
18419
18442
  if (value === null || value === void 0) {
18420
18443
  protobufValue.setNullValue(0);
@@ -19923,6 +19946,13 @@ var Workflow = class _Workflow {
19923
19946
  (node) => factory_default2.fromResponse(node)
19924
19947
  );
19925
19948
  const edges = _3.map(obj.getEdgesList(), (edge) => edge_default.fromResponse(edge));
19949
+ const inputVariables = {};
19950
+ const inputVarsMap = obj.getInputVariablesMap();
19951
+ if (inputVarsMap && inputVarsMap.getLength() > 0) {
19952
+ inputVarsMap.forEach((value, key) => {
19953
+ inputVariables[key] = value.toJavaScript();
19954
+ });
19955
+ }
19926
19956
  const workflow = new _Workflow({
19927
19957
  id: obj.getId(),
19928
19958
  owner: obj.getOwner(),
@@ -19937,7 +19967,8 @@ var Workflow = class _Workflow {
19937
19967
  name: obj.getName(),
19938
19968
  status: convertStatusToString(obj.getStatus()),
19939
19969
  completedAt: obj.getCompletedAt(),
19940
- lastRanAt: obj.getLastRanAt()
19970
+ lastRanAt: obj.getLastRanAt(),
19971
+ inputVariables: Object.keys(inputVariables).length > 0 ? inputVariables : void 0
19941
19972
  });
19942
19973
  return workflow;
19943
19974
  }
@@ -19950,6 +19981,13 @@ var Workflow = class _Workflow {
19950
19981
  if (!trigger) {
19951
19982
  throw new Error("Trigger is undefined in fromListResponse()");
19952
19983
  }
19984
+ const inputVariables = {};
19985
+ const inputVarsMap = obj.getInputVariablesMap();
19986
+ if (inputVarsMap && inputVarsMap.getLength() > 0) {
19987
+ inputVarsMap.forEach((value, key) => {
19988
+ inputVariables[key] = value.toJavaScript();
19989
+ });
19990
+ }
19953
19991
  return new _Workflow({
19954
19992
  id: obj.getId(),
19955
19993
  owner: obj.getOwner(),
@@ -19964,7 +20002,8 @@ var Workflow = class _Workflow {
19964
20002
  completedAt: obj.getCompletedAt(),
19965
20003
  status: convertStatusToString(obj.getStatus()),
19966
20004
  name: obj.getName(),
19967
- lastRanAt: obj.getLastRanAt()
20005
+ lastRanAt: obj.getLastRanAt(),
20006
+ inputVariables: Object.keys(inputVariables).length > 0 ? inputVariables : void 0
19968
20007
  });
19969
20008
  }
19970
20009
  toRequest() {
@@ -20007,21 +20046,11 @@ var Workflow = class _Workflow {
20007
20046
  if (this.name) {
20008
20047
  request.setName(this.name);
20009
20048
  }
20010
- console.log("\u{1F50D} [DEBUG] Workflow.toRequest() inputVariables check:", {
20011
- hasInputVariables: !!this.inputVariables,
20012
- inputVariables: this.inputVariables,
20013
- inputVariablesType: typeof this.inputVariables,
20014
- inputVariablesKeys: this.inputVariables ? Object.keys(this.inputVariables) : []
20015
- });
20016
20049
  if (this.inputVariables) {
20017
20050
  const inputVarsMap = request.getInputVariablesMap();
20018
20051
  for (const [key, value] of Object.entries(this.inputVariables)) {
20019
- console.log("\u{1F50D} [DEBUG] Converting inputVariable:", { key, value, valueType: typeof value });
20020
20052
  inputVarsMap.set(key, convertJSValueToProtobuf(value));
20021
20053
  }
20022
- console.log("\u{1F50D} [DEBUG] Final inputVarsMap size:", inputVarsMap.getLength());
20023
- } else {
20024
- console.log("\u{1F50D} [DEBUG] No inputVariables to add to request");
20025
20054
  }
20026
20055
  return request;
20027
20056
  }
@@ -20064,6 +20093,7 @@ var Step = class _Step {
20064
20093
  this.name = props.name;
20065
20094
  this.success = props.success;
20066
20095
  this.error = props.error;
20096
+ this.errorCode = props.errorCode;
20067
20097
  this.log = props.log;
20068
20098
  this.inputsList = props.inputsList;
20069
20099
  this.config = props.config;
@@ -20087,6 +20117,7 @@ var Step = class _Step {
20087
20117
  name: this.name,
20088
20118
  success: this.success,
20089
20119
  error: this.error,
20120
+ errorCode: this.errorCode,
20090
20121
  log: this.log,
20091
20122
  inputsList: this.inputsList,
20092
20123
  config: this.config,
@@ -20210,6 +20241,7 @@ var Step = class _Step {
20210
20241
  const getName = () => typeof step.getName === "function" ? step.getName() : step.name;
20211
20242
  const getSuccess = () => typeof step.getSuccess === "function" ? step.getSuccess() : step.success;
20212
20243
  const getError = () => typeof step.getError === "function" ? step.getError() : step.error;
20244
+ const getErrorCode = () => typeof step.getErrorCode === "function" ? step.getErrorCode() : step.errorCode;
20213
20245
  const getLog = () => typeof step.getLog === "function" ? step.getLog() : step.log;
20214
20246
  const getInputsList = () => typeof step.getInputsList === "function" ? step.getInputsList() : step.inputsList || [];
20215
20247
  const getStartAt = () => typeof step.getStartAt === "function" ? step.getStartAt() : step.startAt;
@@ -20245,6 +20277,7 @@ var Step = class _Step {
20245
20277
  name: getName(),
20246
20278
  success: getSuccess(),
20247
20279
  error: getError(),
20280
+ errorCode: getErrorCode(),
20248
20281
  log: getLog(),
20249
20282
  inputsList: getInputsList(),
20250
20283
  config: configData,
@@ -20365,9 +20398,6 @@ import {
20365
20398
  ExecutionStatus as ExecutionStatus3
20366
20399
  } from "@avaprotocol/types";
20367
20400
  import * as google_protobuf_struct_pb4 from "google-protobuf/google/protobuf/struct_pb";
20368
- import {
20369
- TimeoutPresets as TimeoutPresets2
20370
- } from "@avaprotocol/types";
20371
20401
  function convertProtobufExecutionStatus(protobufStatus) {
20372
20402
  switch (protobufStatus) {
20373
20403
  case import_avs_pb.ExecutionStatus.EXECUTION_STATUS_PENDING:
@@ -21399,16 +21429,10 @@ var Client = class extends BaseClient {
21399
21429
  }
21400
21430
  /**
21401
21431
  * Get comprehensive fee estimation for workflow deployment
21402
- * Provides detailed breakdown of gas fees, automation fees, and smart wallet creation costs
21403
- * @param {EstimateFeesRequest} params - The fee estimation request parameters
21404
- * @param {TriggerProps} params.trigger - Trigger configuration for the workflow
21405
- * @param {NodeProps[]} params.nodes - Array of workflow nodes
21406
- * @param {string} [params.runner] - Runner address (smart wallet) - optional if in inputVariables
21407
- * @param {Record<string, any>} [params.inputVariables] - Input variables including workflowContext
21408
- * @param {number} params.createdAt - Workflow creation timestamp (milliseconds)
21409
- * @param {number} params.expireAt - Workflow expiration timestamp (milliseconds)
21410
- * @param {RequestOptions} options - Request options
21411
- * @returns {Promise<EstimateFeesResponse>} - Comprehensive fee breakdown with gas, automation, and creation costs
21432
+ *
21433
+ * @param params - Fee estimation request parameters
21434
+ * @param options - Optional request options (auth key, timeout)
21435
+ * @returns Promise resolving to comprehensive fee breakdown
21412
21436
  */
21413
21437
  async estimateFees({
21414
21438
  trigger,
@@ -21460,7 +21484,7 @@ var Client = class extends BaseClient {
21460
21484
  gasUnits: operation.getGasUnits(),
21461
21485
  gasPrice: gasFees.getGasPriceGwei() || "",
21462
21486
  // Use parent gas price
21463
- totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(result.getChainId()),
21487
+ totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(),
21464
21488
  success: operation.getFee() ? parseFloat(operation.getFee().getNativeTokenAmount()) > 0 : false,
21465
21489
  // Check if operation has valid gas cost
21466
21490
  error: void 0
@@ -21476,14 +21500,13 @@ var Client = class extends BaseClient {
21476
21500
  const automationFees = result.getAutomationFees();
21477
21501
  if (automationFees) {
21478
21502
  const baseFee = automationFees.getBaseFee();
21479
- const monitoringFee = automationFees.getMonitoringFee();
21480
21503
  const executionFee = automationFees.getExecutionFee();
21481
- const totalFee = baseFee || this.createMockFeeAmount(result.getChainId());
21504
+ const totalFee = baseFee || this.createMockFeeAmount();
21482
21505
  response.automationFees = {
21483
21506
  triggerType: automationFees.getTriggerType(),
21484
21507
  durationMinutes: automationFees.getDurationMinutes(),
21485
- baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(result.getChainId()),
21486
- executionFee: executionFee ? this.convertFeeAmount(executionFee) : this.createZeroFeeAmount(result.getChainId()),
21508
+ baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(),
21509
+ executionFee: executionFee ? this.convertFeeAmount(executionFee) : this.createZeroFeeAmount(),
21487
21510
  estimatedExecutions: automationFees.getEstimatedExecutions(),
21488
21511
  totalFee: this.convertFeeAmount(totalFee),
21489
21512
  breakdown: []
@@ -21531,13 +21554,13 @@ var Client = class extends BaseClient {
21531
21554
  * Create a mock fee amount object that mimics protobuf FeeAmount interface
21532
21555
  * @private
21533
21556
  */
21534
- createMockFeeAmount(chainId) {
21535
- const getNativeTokenSymbol = (chainId2) => {
21557
+ createMockFeeAmount() {
21558
+ const getNativeTokenSymbol = () => {
21536
21559
  return "ETH";
21537
21560
  };
21538
21561
  return {
21539
21562
  getNativeTokenAmount: () => "0",
21540
- getNativeTokenSymbol: () => getNativeTokenSymbol(chainId),
21563
+ getNativeTokenSymbol: () => getNativeTokenSymbol(),
21541
21564
  getUsdAmount: () => "0",
21542
21565
  getApTokenAmount: () => "0"
21543
21566
  };
@@ -21546,13 +21569,13 @@ var Client = class extends BaseClient {
21546
21569
  * Create a zero fee amount
21547
21570
  * @private
21548
21571
  */
21549
- createZeroFeeAmount(chainId) {
21550
- const getNativeTokenSymbol = (chainId2) => {
21572
+ createZeroFeeAmount() {
21573
+ const getNativeTokenSymbol = () => {
21551
21574
  return "ETH";
21552
21575
  };
21553
21576
  return {
21554
21577
  nativeTokenAmount: "0",
21555
- nativeTokenSymbol: getNativeTokenSymbol(chainId),
21578
+ nativeTokenSymbol: getNativeTokenSymbol(),
21556
21579
  usdAmount: "0",
21557
21580
  apTokenAmount: "0"
21558
21581
  };
@@ -21593,7 +21616,6 @@ export {
21593
21616
  restApi_default as RestAPINode,
21594
21617
  secret_default as Secret,
21595
21618
  step_default as Step,
21596
- TimeoutPresets2 as TimeoutPresets,
21597
21619
  Trigger,
21598
21620
  factory_default as TriggerFactory,
21599
21621
  workflow_default as Workflow,
@@ -6,6 +6,7 @@ declare class Step implements StepProps {
6
6
  name: string;
7
7
  success: boolean;
8
8
  error: string;
9
+ errorCode: number;
9
10
  log: string;
10
11
  inputsList: string[];
11
12
  config?: any;
@@ -1 +1 @@
1
- {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/models/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAMhD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EA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,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEV,KAAK,EAAE,SAAS;IAoB5B;;;OAGG;IACH,MAAM,IAAI,SAAS;IAsBnB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,eAAe;IAoC9D,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAiEhC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAkChC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI;CA2HvD;AAED,eAAe,IAAI,CAAC"}
@@ -7,6 +7,7 @@ class Step {
7
7
  this.name = props.name;
8
8
  this.success = props.success;
9
9
  this.error = props.error;
10
+ this.errorCode = props.errorCode;
10
11
  this.log = props.log;
11
12
  this.inputsList = props.inputsList;
12
13
  this.config = props.config;
@@ -30,6 +31,7 @@ class Step {
30
31
  name: this.name,
31
32
  success: this.success,
32
33
  error: this.error,
34
+ errorCode: this.errorCode,
33
35
  log: this.log,
34
36
  inputsList: this.inputsList,
35
37
  config: this.config,
@@ -205,6 +207,9 @@ class Step {
205
207
  const getError = () => typeof step.getError === "function"
206
208
  ? step.getError()
207
209
  : step.error;
210
+ const getErrorCode = () => typeof step.getErrorCode === "function"
211
+ ? step.getErrorCode()
212
+ : step.errorCode;
208
213
  const getLog = () => typeof step.getLog === "function" ? step.getLog() : step.log;
209
214
  const getInputsList = () => typeof step.getInputsList === "function"
210
215
  ? step.getInputsList()
@@ -258,6 +263,7 @@ class Step {
258
263
  name: getName(),
259
264
  success: getSuccess(),
260
265
  error: getError(),
266
+ errorCode: getErrorCode(),
261
267
  log: getLog(),
262
268
  inputsList: getInputsList(),
263
269
  config: configData,
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/models/workflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAInF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,UAAU,GACxB,cAAc,CAUhB;AAED,cAAM,QAAS,YAAW,aAAa;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IAGrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;OAGG;gBACS,KAAK,EAAE,aAAa;IAwBhC;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IAkC/C;;;OAGG;IACH,MAAM,CAAC,gBAAgB,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CAAC,IAAI,GAAG,QAAQ;IA4C/C;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IAmCnD,SAAS,IAAI,MAAM,CAAC,aAAa;IA8DjC;;;OAGG;IACH,MAAM,IAAI,aAAa;CAmBxB;AAED,eAAe,QAAQ,CAAC"}
@@ -55,6 +55,14 @@ class Workflow {
55
55
  }
56
56
  const nodes = _.map(obj.getNodesList(), (node) => NodeFactory.fromResponse(node));
57
57
  const edges = _.map(obj.getEdgesList(), (edge) => Edge.fromResponse(edge));
58
+ // Convert inputVariables from protobuf map back to JavaScript object
59
+ const inputVariables = {};
60
+ const inputVarsMap = obj.getInputVariablesMap();
61
+ if (inputVarsMap && inputVarsMap.getLength() > 0) {
62
+ inputVarsMap.forEach((value, key) => {
63
+ inputVariables[key] = value.toJavaScript();
64
+ });
65
+ }
58
66
  const workflow = new Workflow({
59
67
  id: obj.getId(),
60
68
  owner: obj.getOwner(),
@@ -70,6 +78,7 @@ class Workflow {
70
78
  status: convertStatusToString(obj.getStatus()),
71
79
  completedAt: obj.getCompletedAt(),
72
80
  lastRanAt: obj.getLastRanAt(),
81
+ inputVariables: Object.keys(inputVariables).length > 0 ? inputVariables : undefined,
73
82
  });
74
83
  return workflow;
75
84
  }
@@ -82,6 +91,14 @@ class Workflow {
82
91
  if (!trigger) {
83
92
  throw new Error("Trigger is undefined in fromListResponse()");
84
93
  }
94
+ // Convert inputVariables from protobuf map back to JavaScript object
95
+ const inputVariables = {};
96
+ const inputVarsMap = obj.getInputVariablesMap();
97
+ if (inputVarsMap && inputVarsMap.getLength() > 0) {
98
+ inputVarsMap.forEach((value, key) => {
99
+ inputVariables[key] = value.toJavaScript();
100
+ });
101
+ }
85
102
  return new Workflow({
86
103
  id: obj.getId(),
87
104
  owner: obj.getOwner(),
@@ -97,6 +114,7 @@ class Workflow {
97
114
  status: convertStatusToString(obj.getStatus()),
98
115
  name: obj.getName(),
99
116
  lastRanAt: obj.getLastRanAt(),
117
+ inputVariables: Object.keys(inputVariables).length > 0 ? inputVariables : undefined,
100
118
  });
101
119
  }
102
120
  toRequest() {
@@ -148,22 +166,11 @@ class Workflow {
148
166
  request.setName(this.name);
149
167
  }
150
168
  // Add input variables if provided
151
- console.log('🔍 [DEBUG] Workflow.toRequest() inputVariables check:', {
152
- hasInputVariables: !!this.inputVariables,
153
- inputVariables: this.inputVariables,
154
- inputVariablesType: typeof this.inputVariables,
155
- inputVariablesKeys: this.inputVariables ? Object.keys(this.inputVariables) : [],
156
- });
157
169
  if (this.inputVariables) {
158
170
  const inputVarsMap = request.getInputVariablesMap();
159
171
  for (const [key, value] of Object.entries(this.inputVariables)) {
160
- console.log('🔍 [DEBUG] Converting inputVariable:', { key, value, valueType: typeof value });
161
172
  inputVarsMap.set(key, convertJSValueToProtobuf(value));
162
173
  }
163
- console.log('🔍 [DEBUG] Final inputVarsMap size:', inputVarsMap.getLength());
164
- }
165
- else {
166
- console.log('🔍 [DEBUG] No inputVariables to add to request');
167
174
  }
168
175
  return request;
169
176
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,aAAa,EAGvB,MAAM,2CAA2C,CAAC;AAGnD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,GAAG,CAiCnE;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,GAAG,GAAG,aAAa,CA8BlE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,CAatD;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAkB5E;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MA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AAM,EAAE,GAAG,CAAC,GAC1B,aAAa,GAAG,SAAS,CAK3B;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/C,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAiCjC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAsB7D"}
package/dist/utils.js CHANGED
@@ -55,7 +55,6 @@ export function convertProtobufValueToJs(value) {
55
55
  * @returns The protobuf Value object
56
56
  */
57
57
  export function convertJSValueToProtobuf(value) {
58
- console.log('🔍 [DEBUG] convertJSValueToProtobuf called with:', { value, type: typeof value });
59
58
  const protobufValue = new ProtobufValue();
60
59
  if (value === null || value === undefined) {
61
60
  protobufValue.setNullValue(0); // NULL_VALUE = 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "2.7.5-dev.0",
3
+ "version": "2.8.0",
4
4
  "description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "prepare": "node ../../scripts/prepare-package.js"
32
32
  },
33
33
  "dependencies": {
34
- "@avaprotocol/types": "^2.5.4",
34
+ "@avaprotocol/types": "2.6.0",
35
35
  "@grpc/grpc-js": "^1.11.3",
36
36
  "@grpc/proto-loader": "^0.7.13",
37
37
  "dotenv": "^16.4.5",