@avaprotocol/sdk-js 2.6.13 → 2.7.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.
@@ -0,0 +1,21 @@
1
+ import * as avs_pb from "@/grpc_codegen/avs_pb";
2
+ import { ExecutionProps } from "@avaprotocol/types";
3
+ import Step from "./step";
4
+ declare class Execution implements ExecutionProps {
5
+ id: string;
6
+ startAt: number;
7
+ endAt: number;
8
+ success: boolean;
9
+ error: string;
10
+ index: number;
11
+ steps: Step[];
12
+ constructor(props: ExecutionProps);
13
+ /**
14
+ * Convert Execution instance to plain object (ExecutionProps)
15
+ * This is useful for serialization, especially with Next.js Server Components
16
+ */
17
+ toJson(): ExecutionProps;
18
+ static fromResponse(execution: avs_pb.Execution): Execution;
19
+ }
20
+ export default Execution;
21
+ //# sourceMappingURL=execution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/models/execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAqC,cAAc,EAAa,MAAM,oBAAoB,CAAC;AAClG,OAAO,IAAI,MAAM,QAAQ,CAAC;AAI1B,cAAM,SAAU,YAAW,cAAc;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;gBAEF,KAAK,EAAE,cAAc;IASjC;;;OAGG;IACH,MAAM,IAAI,cAAc;IAWxB,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,GAAG,SAAS;CAc5D;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/models/execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAqC,cAAc,EAAa,MAAM,oBAAoB,CAAC;AAClG,OAAO,IAAI,MAAM,QAAQ,CAAC;AAI1B,cAAM,SAAU,YAAW,cAAc;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;gBAEF,KAAK,EAAE,cAAc;IAUjC;;;OAGG;IACH,MAAM,IAAI,cAAc;IAYxB,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,GAAG,SAAS;CAe5D;AAED,eAAe,SAAS,CAAC"}
@@ -6,6 +6,7 @@ class Execution {
6
6
  this.endAt = props.endAt;
7
7
  this.success = props.success;
8
8
  this.error = props.error;
9
+ this.index = props.index;
9
10
  this.steps = props.steps.map(s => new Step(s));
10
11
  }
11
12
  /**
@@ -19,6 +20,7 @@ class Execution {
19
20
  endAt: this.endAt,
20
21
  success: this.success,
21
22
  error: this.error,
23
+ index: this.index,
22
24
  steps: this.steps.map(step => step.toJson()),
23
25
  };
24
26
  }
@@ -29,6 +31,7 @@ class Execution {
29
31
  endAt: execution.getEndAt(),
30
32
  success: execution.getSuccess(),
31
33
  error: execution.getError(),
34
+ index: execution.getIndex(),
32
35
  steps: execution
33
36
  .getStepsList()
34
37
  .map((step) => Step.fromResponse(step)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "2.6.13",
3
+ "version": "2.7.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.4.11",
34
+ "@avaprotocol/types": "^2.5.1",
35
35
  "@grpc/grpc-js": "^1.11.3",
36
36
  "@grpc/proto-loader": "^0.7.13",
37
37
  "dotenv": "^16.4.5",