@virtuals-protocol/acp-node 0.1.0-beta.13 → 0.1.0-beta.14

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/dist/index.js CHANGED
@@ -19,6 +19,9 @@ var __spreadValues = (a, b) => {
19
19
  }
20
20
  return a;
21
21
  };
22
+ var __commonJS = (cb, mod) => function __require() {
23
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
24
+ };
22
25
  var __export = (target, all) => {
23
26
  for (var name in all)
24
27
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -61,6 +64,41 @@ var __async = (__this, __arguments, generator) => {
61
64
  });
62
65
  };
63
66
 
67
+ // package.json
68
+ var require_package = __commonJS({
69
+ "package.json"(exports2, module2) {
70
+ module2.exports = {
71
+ name: "@virtuals-protocol/acp-node",
72
+ version: "0.1.0-beta.14",
73
+ main: "./dist/index.js",
74
+ module: "./dist/index.mjs",
75
+ types: "./dist/index.d.ts",
76
+ scripts: {
77
+ test: 'echo "Error: no test specified" && exit 1',
78
+ tsup: "tsup src/index.ts --dts --format cjs,esm --out-dir dist"
79
+ },
80
+ author: "",
81
+ license: "ISC",
82
+ description: "",
83
+ devDependencies: {
84
+ typescript: "^5.8.3"
85
+ },
86
+ dependencies: {
87
+ "@aa-sdk/core": "^4.30.0",
88
+ "@account-kit/infra": "^4.30.0",
89
+ "@account-kit/smart-contracts": "^4.30.0",
90
+ ajv: "^8.17.1",
91
+ "socket.io-client": "^4.8.1",
92
+ tsup: "^8.5.0",
93
+ viem: "^2.28.2"
94
+ },
95
+ files: [
96
+ "dist"
97
+ ]
98
+ };
99
+ }
100
+ });
101
+
64
102
  // src/index.ts
65
103
  var index_exports = {};
66
104
  __export(index_exports, {
@@ -1146,6 +1184,7 @@ var AcpJobOffering = class {
1146
1184
  var acpJobOffering_default = AcpJobOffering;
1147
1185
 
1148
1186
  // src/acpClient.ts
1187
+ var { version } = require_package();
1149
1188
  var AcpClient = class {
1150
1189
  constructor(options) {
1151
1190
  this.acpContractClient = options.acpContractClient;
@@ -1162,11 +1201,15 @@ var AcpClient = class {
1162
1201
  init() {
1163
1202
  return __async(this, null, function* () {
1164
1203
  const socket = (0, import_socket.io)(this.acpUrl, {
1165
- auth: __spreadValues(__spreadValues({}, this.onNewTask && {
1204
+ auth: __spreadValues({
1166
1205
  walletAddress: this.acpContractClient.walletAddress
1167
- }), this.onEvaluate !== this.defaultOnEvaluate && {
1206
+ }, this.onEvaluate !== this.defaultOnEvaluate && {
1168
1207
  evaluatorAddress: this.acpContractClient.walletAddress
1169
1208
  }),
1209
+ extraHeaders: {
1210
+ "x-sdk-version": version,
1211
+ "x-sdk-language": "node"
1212
+ },
1170
1213
  transports: ["websocket"]
1171
1214
  });
1172
1215
  socket.on("roomJoined" /* ROOM_JOINED */, (_, callback) => {
package/dist/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
3
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
5
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,6 +15,9 @@ var __spreadValues = (a, b) => {
14
15
  }
15
16
  return a;
16
17
  };
18
+ var __commonJS = (cb, mod) => function __require() {
19
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
20
+ };
17
21
  var __async = (__this, __arguments, generator) => {
18
22
  return new Promise((resolve, reject) => {
19
23
  var fulfilled = (value) => {
@@ -35,6 +39,41 @@ var __async = (__this, __arguments, generator) => {
35
39
  });
36
40
  };
37
41
 
42
+ // package.json
43
+ var require_package = __commonJS({
44
+ "package.json"(exports, module) {
45
+ module.exports = {
46
+ name: "@virtuals-protocol/acp-node",
47
+ version: "0.1.0-beta.14",
48
+ main: "./dist/index.js",
49
+ module: "./dist/index.mjs",
50
+ types: "./dist/index.d.ts",
51
+ scripts: {
52
+ test: 'echo "Error: no test specified" && exit 1',
53
+ tsup: "tsup src/index.ts --dts --format cjs,esm --out-dir dist"
54
+ },
55
+ author: "",
56
+ license: "ISC",
57
+ description: "",
58
+ devDependencies: {
59
+ typescript: "^5.8.3"
60
+ },
61
+ dependencies: {
62
+ "@aa-sdk/core": "^4.30.0",
63
+ "@account-kit/infra": "^4.30.0",
64
+ "@account-kit/smart-contracts": "^4.30.0",
65
+ ajv: "^8.17.1",
66
+ "socket.io-client": "^4.8.1",
67
+ tsup: "^8.5.0",
68
+ viem: "^2.28.2"
69
+ },
70
+ files: [
71
+ "dist"
72
+ ]
73
+ };
74
+ }
75
+ });
76
+
38
77
  // src/acpAbi.ts
39
78
  var ACP_ABI = [
40
79
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
@@ -1106,6 +1145,7 @@ var AcpJobOffering = class {
1106
1145
  var acpJobOffering_default = AcpJobOffering;
1107
1146
 
1108
1147
  // src/acpClient.ts
1148
+ var { version } = require_package();
1109
1149
  var AcpClient = class {
1110
1150
  constructor(options) {
1111
1151
  this.acpContractClient = options.acpContractClient;
@@ -1122,11 +1162,15 @@ var AcpClient = class {
1122
1162
  init() {
1123
1163
  return __async(this, null, function* () {
1124
1164
  const socket = io(this.acpUrl, {
1125
- auth: __spreadValues(__spreadValues({}, this.onNewTask && {
1165
+ auth: __spreadValues({
1126
1166
  walletAddress: this.acpContractClient.walletAddress
1127
- }), this.onEvaluate !== this.defaultOnEvaluate && {
1167
+ }, this.onEvaluate !== this.defaultOnEvaluate && {
1128
1168
  evaluatorAddress: this.acpContractClient.walletAddress
1129
1169
  }),
1170
+ extraHeaders: {
1171
+ "x-sdk-version": version,
1172
+ "x-sdk-language": "node"
1173
+ },
1130
1174
  transports: ["websocket"]
1131
1175
  });
1132
1176
  socket.on("roomJoined" /* ROOM_JOINED */, (_, callback) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virtuals-protocol/acp-node",
3
- "version": "0.1.0-beta.13",
3
+ "version": "0.1.0-beta.14",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",