@avaprotocol/sdk-js 2.7.5-dev.10 → 2.8.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @avaprotocol/sdk-js
2
2
 
3
+ ## 2.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 7eb5023: Replace inputVariables workflowContext with settings, and fix dev test github actions
8
+ - Updated dependencies [7eb5023]
9
+ - @avaprotocol/types@2.6.1
10
+
11
+ ## 2.8.0
12
+
13
+ ### Minor Changes
14
+
15
+ - c74b912: Added fee estimation interface and gas cost to execution.step
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [c74b912]
20
+ - @avaprotocol/types@2.6.0
21
+
3
22
  ## 2.7.4
4
23
 
5
24
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import Step from "./models/step";
7
7
  import NodeFactory from "./models/node/factory";
8
8
  import TriggerFactory from "./models/trigger/factory";
9
9
  import Secret from "./models/secret";
10
- import { ErrorCode, type WorkflowProps, type GetKeyResponse, type RequestOptions, type ClientOption, type SmartWallet, type GetWalletRequest, type GetExecutionsOptions, type GetWorkflowsOptions, type GetSignatureFormatResponse, type RunNodeWithInputsRequest, type RunNodeWithInputsResponse, type RunTriggerRequest, type RunTriggerResponse, type SecretProps, type PageInfo, type GetSecretsOptions, type SecretOptions, type TriggerDataProps, type SimulateWorkflowRequest, type ExecutionProps, type GetTokenMetadataRequest, type GetTokenMetadataResponse, type TimeoutConfig, type CreateSecretResponse, type UpdateSecretResponse, type DeleteSecretResponse, type CancelTaskResponse, type DeleteTaskResponse, type GetExecutionStatsResponse, type GetExecutionStatsOptions, ExecutionStatus, type TriggerWorkflowResponse, type WithdrawFundsRequest, type WithdrawFundsResponse } from "@avaprotocol/types";
10
+ import { ErrorCode, type WorkflowProps, type GetKeyResponse, type RequestOptions, type ClientOption, type SmartWallet, type GetWalletRequest, type GetExecutionsOptions, type GetWorkflowsOptions, type GetSignatureFormatResponse, type RunNodeWithInputsRequest, type RunNodeWithInputsResponse, type RunTriggerRequest, type RunTriggerResponse, type SecretProps, type PageInfo, type GetSecretsOptions, type SecretOptions, type TriggerDataProps, type SimulateWorkflowRequest, type ExecutionProps, type GetTokenMetadataRequest, type GetTokenMetadataResponse, type TimeoutConfig, type CreateSecretResponse, type UpdateSecretResponse, type DeleteSecretResponse, type CancelTaskResponse, type DeleteTaskResponse, type GetExecutionStatsResponse, type GetExecutionStatsOptions, ExecutionStatus, type TriggerWorkflowResponse, type WithdrawFundsRequest, type WithdrawFundsResponse, type EstimateFeesRequest, type EstimateFeesResponse } from "@avaprotocol/types";
11
11
  import { cleanGrpcErrorMessage } from "./utils";
12
12
  declare class BaseClient {
13
13
  readonly endpoint: string;
@@ -353,8 +353,15 @@ 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
- * TEMPORARILY DISABLED: Fee estimation types are not synchronized between branches
357
- * TODO: Re-enable when types package includes fee estimation types
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
360
+ */
361
+ estimateFees({ trigger, nodes, runner, inputVariables, createdAt, expireAt, }: EstimateFeesRequest, options?: RequestOptions): Promise<EstimateFeesResponse>;
362
+ /**
363
+ * Convert protobuf EstimateFeesResp to TypeScript EstimateFeesResponse
364
+ * @private
358
365
  */
359
366
  private convertEstimateFeesResponse;
360
367
  /**
@@ -376,6 +383,4 @@ declare class Client extends BaseClient {
376
383
  export * from "./models/node/factory";
377
384
  export * from "./models/trigger/factory";
378
385
  export { Client, Workflow, Edge, Execution, Step, NodeFactory, TriggerFactory, Secret, ErrorCode, cleanGrpcErrorMessage, };
379
- export type { TokenMetadata, GetTokenMetadataRequest, GetTokenMetadataResponse, TokenSource, WithdrawFundsRequest, WithdrawFundsResponse, } from "@avaprotocol/types";
380
- export { TimeoutPresets, type TimeoutConfig, type TimeoutError, } from "@avaprotocol/types";
381
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,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAE7B,KAAK,aAAa,EAIlB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,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,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,
@@ -18631,7 +18654,7 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
18631
18654
  if (queryData.maxEventsPerBlock !== void 0) {
18632
18655
  query.setMaxEventsPerBlock(queryData.maxEventsPerBlock);
18633
18656
  }
18634
- if (queryData.contractAbi) {
18657
+ if (queryData.contractAbi !== void 0) {
18635
18658
  if (!Array.isArray(queryData.contractAbi)) {
18636
18659
  throw new Error("contractAbi must be an array of ABI elements");
18637
18660
  }
@@ -20063,6 +20086,7 @@ var Step = class _Step {
20063
20086
  this.name = props.name;
20064
20087
  this.success = props.success;
20065
20088
  this.error = props.error;
20089
+ this.errorCode = props.errorCode;
20066
20090
  this.log = props.log;
20067
20091
  this.inputsList = props.inputsList;
20068
20092
  this.config = props.config;
@@ -20086,6 +20110,7 @@ var Step = class _Step {
20086
20110
  name: this.name,
20087
20111
  success: this.success,
20088
20112
  error: this.error,
20113
+ errorCode: this.errorCode,
20089
20114
  log: this.log,
20090
20115
  inputsList: this.inputsList,
20091
20116
  config: this.config,
@@ -20209,6 +20234,7 @@ var Step = class _Step {
20209
20234
  const getName = () => typeof step.getName === "function" ? step.getName() : step.name;
20210
20235
  const getSuccess = () => typeof step.getSuccess === "function" ? step.getSuccess() : step.success;
20211
20236
  const getError = () => typeof step.getError === "function" ? step.getError() : step.error;
20237
+ const getErrorCode = () => typeof step.getErrorCode === "function" ? step.getErrorCode() : step.errorCode;
20212
20238
  const getLog = () => typeof step.getLog === "function" ? step.getLog() : step.log;
20213
20239
  const getInputsList = () => typeof step.getInputsList === "function" ? step.getInputsList() : step.inputsList || [];
20214
20240
  const getStartAt = () => typeof step.getStartAt === "function" ? step.getStartAt() : step.startAt;
@@ -20244,6 +20270,7 @@ var Step = class _Step {
20244
20270
  name: getName(),
20245
20271
  success: getSuccess(),
20246
20272
  error: getError(),
20273
+ errorCode: getErrorCode(),
20247
20274
  log: getLog(),
20248
20275
  inputsList: getInputsList(),
20249
20276
  config: configData,
@@ -20354,7 +20381,6 @@ var secret_default = Secret;
20354
20381
  var import_types21 = require("@avaprotocol/types");
20355
20382
  var import_avs_pb = __toESM(require_avs_pb());
20356
20383
  var google_protobuf_struct_pb4 = __toESM(require("google-protobuf/google/protobuf/struct_pb"));
20357
- var import_types22 = require("@avaprotocol/types");
20358
20384
  function convertProtobufExecutionStatus(protobufStatus) {
20359
20385
  switch (protobufStatus) {
20360
20386
  case import_avs_pb.ExecutionStatus.EXECUTION_STATUS_PENDING:
@@ -21386,66 +21412,45 @@ var Client = class extends BaseClient {
21386
21412
  }
21387
21413
  /**
21388
21414
  * Get comprehensive fee estimation for workflow deployment
21389
- * TEMPORARILY DISABLED: Fee estimation types are not synchronized between branches
21390
- * TODO: Re-enable when types package includes fee estimation types
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
21419
+ */
21420
+ async estimateFees({
21421
+ trigger,
21422
+ nodes,
21423
+ runner,
21424
+ inputVariables = {},
21425
+ createdAt,
21426
+ expireAt
21427
+ }, options) {
21428
+ const request = new avs_pb23.EstimateFeesReq();
21429
+ const triggerSdk = factory_default.create(trigger);
21430
+ request.setTrigger(triggerSdk.toRequest());
21431
+ const nodeMessages = nodes.map((node) => {
21432
+ const nodeSdk = factory_default2.create(node);
21433
+ return nodeSdk.toRequest();
21434
+ });
21435
+ request.setNodesList(nodeMessages);
21436
+ if (runner) {
21437
+ request.setRunner(runner);
21438
+ }
21439
+ if (inputVariables && Object.keys(inputVariables).length > 0) {
21440
+ const inputVarsMap = request.getInputVariablesMap();
21441
+ for (const [key, value] of Object.entries(inputVariables)) {
21442
+ inputVarsMap.set(key, convertJSValueToProtobuf(value));
21443
+ }
21444
+ }
21445
+ request.setCreatedAt(createdAt);
21446
+ request.setExpireAt(expireAt);
21447
+ const result = await this.sendGrpcRequest("estimateFees", request, options);
21448
+ return this.convertEstimateFeesResponse(result);
21449
+ }
21450
+ /**
21451
+ * Convert protobuf EstimateFeesResp to TypeScript EstimateFeesResponse
21452
+ * @private
21391
21453
  */
21392
- /*
21393
- async estimateFees(
21394
- {
21395
- trigger,
21396
- nodes,
21397
- runner,
21398
- inputVariables = {},
21399
- createdAt,
21400
- expireAt,
21401
- }: EstimateFeesRequest,
21402
- options?: RequestOptions
21403
- ): Promise<EstimateFeesResponse> {
21404
- // Create the protobuf request
21405
- const request = new avs_pb.EstimateFeesReq();
21406
-
21407
- // Convert trigger to protobuf
21408
- const triggerSdk = TriggerFactory.create(trigger as any);
21409
- request.setTrigger(triggerSdk.toRequest());
21410
-
21411
- // Convert nodes to protobuf
21412
- const nodeMessages = nodes.map((node: any) => {
21413
- const nodeSdk = NodeFactory.create(node as any);
21414
- return nodeSdk.toRequest();
21415
- });
21416
- request.setNodesList(nodeMessages);
21417
-
21418
- // Set runner if provided
21419
- if (runner) {
21420
- request.setRunner(runner);
21421
- }
21422
-
21423
- // Set input variables
21424
- if (inputVariables && Object.keys(inputVariables).length > 0) {
21425
- const inputVarsMap = request.getInputVariablesMap();
21426
- for (const [key, value] of Object.entries(inputVariables)) {
21427
- inputVarsMap.set(key, convertJSValueToProtobuf(value));
21428
- }
21429
- }
21430
-
21431
- // Set timestamps
21432
- request.setCreatedAt(createdAt);
21433
- request.setExpireAt(expireAt);
21434
-
21435
- // Send the request
21436
- const result = await this.sendGrpcRequest<
21437
- avs_pb.EstimateFeesResp,
21438
- avs_pb.EstimateFeesReq
21439
- >("estimateFees", request, options);
21440
-
21441
- // Convert protobuf response to TypeScript interface
21442
- return this.convertEstimateFeesResponse(result);
21443
- }
21444
-
21445
- /**
21446
- * Convert protobuf EstimateFeesResp to TypeScript EstimateFeesResponse
21447
- * @private
21448
- */
21449
21454
  convertEstimateFeesResponse(result) {
21450
21455
  const response = {
21451
21456
  success: result.getSuccess(),
@@ -21462,7 +21467,7 @@ var Client = class extends BaseClient {
21462
21467
  gasUnits: operation.getGasUnits(),
21463
21468
  gasPrice: gasFees.getGasPriceGwei() || "",
21464
21469
  // Use parent gas price
21465
- totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(result.getChainId()),
21470
+ totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(),
21466
21471
  success: operation.getFee() ? parseFloat(operation.getFee().getNativeTokenAmount()) > 0 : false,
21467
21472
  // Check if operation has valid gas cost
21468
21473
  error: void 0
@@ -21478,14 +21483,13 @@ var Client = class extends BaseClient {
21478
21483
  const automationFees = result.getAutomationFees();
21479
21484
  if (automationFees) {
21480
21485
  const baseFee = automationFees.getBaseFee();
21481
- const monitoringFee = automationFees.getMonitoringFee();
21482
21486
  const executionFee = automationFees.getExecutionFee();
21483
- const totalFee = baseFee || this.createMockFeeAmount(result.getChainId());
21487
+ const totalFee = baseFee || this.createMockFeeAmount();
21484
21488
  response.automationFees = {
21485
21489
  triggerType: automationFees.getTriggerType(),
21486
21490
  durationMinutes: automationFees.getDurationMinutes(),
21487
- baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(result.getChainId()),
21488
- 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(),
21489
21493
  estimatedExecutions: automationFees.getEstimatedExecutions(),
21490
21494
  totalFee: this.convertFeeAmount(totalFee),
21491
21495
  breakdown: []
@@ -21533,13 +21537,13 @@ var Client = class extends BaseClient {
21533
21537
  * Create a mock fee amount object that mimics protobuf FeeAmount interface
21534
21538
  * @private
21535
21539
  */
21536
- createMockFeeAmount(chainId) {
21537
- const getNativeTokenSymbol = (chainId2) => {
21540
+ createMockFeeAmount() {
21541
+ const getNativeTokenSymbol = () => {
21538
21542
  return "ETH";
21539
21543
  };
21540
21544
  return {
21541
21545
  getNativeTokenAmount: () => "0",
21542
- getNativeTokenSymbol: () => getNativeTokenSymbol(chainId),
21546
+ getNativeTokenSymbol: () => getNativeTokenSymbol(),
21543
21547
  getUsdAmount: () => "0",
21544
21548
  getApTokenAmount: () => "0"
21545
21549
  };
@@ -21548,13 +21552,13 @@ var Client = class extends BaseClient {
21548
21552
  * Create a zero fee amount
21549
21553
  * @private
21550
21554
  */
21551
- createZeroFeeAmount(chainId) {
21552
- const getNativeTokenSymbol = (chainId2) => {
21555
+ createZeroFeeAmount() {
21556
+ const getNativeTokenSymbol = () => {
21553
21557
  return "ETH";
21554
21558
  };
21555
21559
  return {
21556
21560
  nativeTokenAmount: "0",
21557
- nativeTokenSymbol: getNativeTokenSymbol(chainId),
21561
+ nativeTokenSymbol: getNativeTokenSymbol(),
21558
21562
  usdAmount: "0",
21559
21563
  apTokenAmount: "0"
21560
21564
  };
@@ -21596,7 +21600,6 @@ var Client = class extends BaseClient {
21596
21600
  RestAPINode,
21597
21601
  Secret,
21598
21602
  Step,
21599
- TimeoutPresets,
21600
21603
  Trigger,
21601
21604
  TriggerFactory,
21602
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} */
@@ -18610,7 +18634,7 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
18610
18634
  if (queryData.maxEventsPerBlock !== void 0) {
18611
18635
  query.setMaxEventsPerBlock(queryData.maxEventsPerBlock);
18612
18636
  }
18613
- if (queryData.contractAbi) {
18637
+ if (queryData.contractAbi !== void 0) {
18614
18638
  if (!Array.isArray(queryData.contractAbi)) {
18615
18639
  throw new Error("contractAbi must be an array of ABI elements");
18616
18640
  }
@@ -20069,6 +20093,7 @@ var Step = class _Step {
20069
20093
  this.name = props.name;
20070
20094
  this.success = props.success;
20071
20095
  this.error = props.error;
20096
+ this.errorCode = props.errorCode;
20072
20097
  this.log = props.log;
20073
20098
  this.inputsList = props.inputsList;
20074
20099
  this.config = props.config;
@@ -20092,6 +20117,7 @@ var Step = class _Step {
20092
20117
  name: this.name,
20093
20118
  success: this.success,
20094
20119
  error: this.error,
20120
+ errorCode: this.errorCode,
20095
20121
  log: this.log,
20096
20122
  inputsList: this.inputsList,
20097
20123
  config: this.config,
@@ -20215,6 +20241,7 @@ var Step = class _Step {
20215
20241
  const getName = () => typeof step.getName === "function" ? step.getName() : step.name;
20216
20242
  const getSuccess = () => typeof step.getSuccess === "function" ? step.getSuccess() : step.success;
20217
20243
  const getError = () => typeof step.getError === "function" ? step.getError() : step.error;
20244
+ const getErrorCode = () => typeof step.getErrorCode === "function" ? step.getErrorCode() : step.errorCode;
20218
20245
  const getLog = () => typeof step.getLog === "function" ? step.getLog() : step.log;
20219
20246
  const getInputsList = () => typeof step.getInputsList === "function" ? step.getInputsList() : step.inputsList || [];
20220
20247
  const getStartAt = () => typeof step.getStartAt === "function" ? step.getStartAt() : step.startAt;
@@ -20250,6 +20277,7 @@ var Step = class _Step {
20250
20277
  name: getName(),
20251
20278
  success: getSuccess(),
20252
20279
  error: getError(),
20280
+ errorCode: getErrorCode(),
20253
20281
  log: getLog(),
20254
20282
  inputsList: getInputsList(),
20255
20283
  config: configData,
@@ -20370,9 +20398,6 @@ import {
20370
20398
  ExecutionStatus as ExecutionStatus3
20371
20399
  } from "@avaprotocol/types";
20372
20400
  import * as google_protobuf_struct_pb4 from "google-protobuf/google/protobuf/struct_pb";
20373
- import {
20374
- TimeoutPresets as TimeoutPresets2
20375
- } from "@avaprotocol/types";
20376
20401
  function convertProtobufExecutionStatus(protobufStatus) {
20377
20402
  switch (protobufStatus) {
20378
20403
  case import_avs_pb.ExecutionStatus.EXECUTION_STATUS_PENDING:
@@ -21404,66 +21429,45 @@ var Client = class extends BaseClient {
21404
21429
  }
21405
21430
  /**
21406
21431
  * Get comprehensive fee estimation for workflow deployment
21407
- * TEMPORARILY DISABLED: Fee estimation types are not synchronized between branches
21408
- * TODO: Re-enable when types package includes fee estimation types
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
21436
+ */
21437
+ async estimateFees({
21438
+ trigger,
21439
+ nodes,
21440
+ runner,
21441
+ inputVariables = {},
21442
+ createdAt,
21443
+ expireAt
21444
+ }, options) {
21445
+ const request = new avs_pb23.EstimateFeesReq();
21446
+ const triggerSdk = factory_default.create(trigger);
21447
+ request.setTrigger(triggerSdk.toRequest());
21448
+ const nodeMessages = nodes.map((node) => {
21449
+ const nodeSdk = factory_default2.create(node);
21450
+ return nodeSdk.toRequest();
21451
+ });
21452
+ request.setNodesList(nodeMessages);
21453
+ if (runner) {
21454
+ request.setRunner(runner);
21455
+ }
21456
+ if (inputVariables && Object.keys(inputVariables).length > 0) {
21457
+ const inputVarsMap = request.getInputVariablesMap();
21458
+ for (const [key, value] of Object.entries(inputVariables)) {
21459
+ inputVarsMap.set(key, convertJSValueToProtobuf(value));
21460
+ }
21461
+ }
21462
+ request.setCreatedAt(createdAt);
21463
+ request.setExpireAt(expireAt);
21464
+ const result = await this.sendGrpcRequest("estimateFees", request, options);
21465
+ return this.convertEstimateFeesResponse(result);
21466
+ }
21467
+ /**
21468
+ * Convert protobuf EstimateFeesResp to TypeScript EstimateFeesResponse
21469
+ * @private
21409
21470
  */
21410
- /*
21411
- async estimateFees(
21412
- {
21413
- trigger,
21414
- nodes,
21415
- runner,
21416
- inputVariables = {},
21417
- createdAt,
21418
- expireAt,
21419
- }: EstimateFeesRequest,
21420
- options?: RequestOptions
21421
- ): Promise<EstimateFeesResponse> {
21422
- // Create the protobuf request
21423
- const request = new avs_pb.EstimateFeesReq();
21424
-
21425
- // Convert trigger to protobuf
21426
- const triggerSdk = TriggerFactory.create(trigger as any);
21427
- request.setTrigger(triggerSdk.toRequest());
21428
-
21429
- // Convert nodes to protobuf
21430
- const nodeMessages = nodes.map((node: any) => {
21431
- const nodeSdk = NodeFactory.create(node as any);
21432
- return nodeSdk.toRequest();
21433
- });
21434
- request.setNodesList(nodeMessages);
21435
-
21436
- // Set runner if provided
21437
- if (runner) {
21438
- request.setRunner(runner);
21439
- }
21440
-
21441
- // Set input variables
21442
- if (inputVariables && Object.keys(inputVariables).length > 0) {
21443
- const inputVarsMap = request.getInputVariablesMap();
21444
- for (const [key, value] of Object.entries(inputVariables)) {
21445
- inputVarsMap.set(key, convertJSValueToProtobuf(value));
21446
- }
21447
- }
21448
-
21449
- // Set timestamps
21450
- request.setCreatedAt(createdAt);
21451
- request.setExpireAt(expireAt);
21452
-
21453
- // Send the request
21454
- const result = await this.sendGrpcRequest<
21455
- avs_pb.EstimateFeesResp,
21456
- avs_pb.EstimateFeesReq
21457
- >("estimateFees", request, options);
21458
-
21459
- // Convert protobuf response to TypeScript interface
21460
- return this.convertEstimateFeesResponse(result);
21461
- }
21462
-
21463
- /**
21464
- * Convert protobuf EstimateFeesResp to TypeScript EstimateFeesResponse
21465
- * @private
21466
- */
21467
21471
  convertEstimateFeesResponse(result) {
21468
21472
  const response = {
21469
21473
  success: result.getSuccess(),
@@ -21480,7 +21484,7 @@ var Client = class extends BaseClient {
21480
21484
  gasUnits: operation.getGasUnits(),
21481
21485
  gasPrice: gasFees.getGasPriceGwei() || "",
21482
21486
  // Use parent gas price
21483
- totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(result.getChainId()),
21487
+ totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(),
21484
21488
  success: operation.getFee() ? parseFloat(operation.getFee().getNativeTokenAmount()) > 0 : false,
21485
21489
  // Check if operation has valid gas cost
21486
21490
  error: void 0
@@ -21496,14 +21500,13 @@ var Client = class extends BaseClient {
21496
21500
  const automationFees = result.getAutomationFees();
21497
21501
  if (automationFees) {
21498
21502
  const baseFee = automationFees.getBaseFee();
21499
- const monitoringFee = automationFees.getMonitoringFee();
21500
21503
  const executionFee = automationFees.getExecutionFee();
21501
- const totalFee = baseFee || this.createMockFeeAmount(result.getChainId());
21504
+ const totalFee = baseFee || this.createMockFeeAmount();
21502
21505
  response.automationFees = {
21503
21506
  triggerType: automationFees.getTriggerType(),
21504
21507
  durationMinutes: automationFees.getDurationMinutes(),
21505
- baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(result.getChainId()),
21506
- 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(),
21507
21510
  estimatedExecutions: automationFees.getEstimatedExecutions(),
21508
21511
  totalFee: this.convertFeeAmount(totalFee),
21509
21512
  breakdown: []
@@ -21551,13 +21554,13 @@ var Client = class extends BaseClient {
21551
21554
  * Create a mock fee amount object that mimics protobuf FeeAmount interface
21552
21555
  * @private
21553
21556
  */
21554
- createMockFeeAmount(chainId) {
21555
- const getNativeTokenSymbol = (chainId2) => {
21557
+ createMockFeeAmount() {
21558
+ const getNativeTokenSymbol = () => {
21556
21559
  return "ETH";
21557
21560
  };
21558
21561
  return {
21559
21562
  getNativeTokenAmount: () => "0",
21560
- getNativeTokenSymbol: () => getNativeTokenSymbol(chainId),
21563
+ getNativeTokenSymbol: () => getNativeTokenSymbol(),
21561
21564
  getUsdAmount: () => "0",
21562
21565
  getApTokenAmount: () => "0"
21563
21566
  };
@@ -21566,13 +21569,13 @@ var Client = class extends BaseClient {
21566
21569
  * Create a zero fee amount
21567
21570
  * @private
21568
21571
  */
21569
- createZeroFeeAmount(chainId) {
21570
- const getNativeTokenSymbol = (chainId2) => {
21572
+ createZeroFeeAmount() {
21573
+ const getNativeTokenSymbol = () => {
21571
21574
  return "ETH";
21572
21575
  };
21573
21576
  return {
21574
21577
  nativeTokenAmount: "0",
21575
- nativeTokenSymbol: getNativeTokenSymbol(chainId),
21578
+ nativeTokenSymbol: getNativeTokenSymbol(),
21576
21579
  usdAmount: "0",
21577
21580
  apTokenAmount: "0"
21578
21581
  };
@@ -21613,7 +21616,6 @@ export {
21613
21616
  restApi_default as RestAPINode,
21614
21617
  secret_default as Secret,
21615
21618
  step_default as Step,
21616
- TimeoutPresets2 as TimeoutPresets,
21617
21619
  Trigger,
21618
21620
  factory_default as TriggerFactory,
21619
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,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,gBAAgB,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,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,
@@ -87,7 +87,7 @@ class EventTrigger extends Trigger {
87
87
  query.setMaxEventsPerBlock(queryData.maxEventsPerBlock);
88
88
  }
89
89
  // Set contractAbi if provided - must be an array like ContractRead
90
- if (queryData.contractAbi) {
90
+ if (queryData.contractAbi !== undefined) {
91
91
  // Strictly require array format (no string support)
92
92
  if (!Array.isArray(queryData.contractAbi)) {
93
93
  throw new Error("contractAbi must be an array of ABI elements");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "2.7.5-dev.10",
3
+ "version": "2.8.1",
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.5-dev.9",
34
+ "@avaprotocol/types": "2.6.1",
35
35
  "@grpc/grpc-js": "^1.11.3",
36
36
  "@grpc/proto-loader": "^0.7.13",
37
37
  "dotenv": "^16.4.5",