wao 0.37.9 → 0.38.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/cjs/ao.js CHANGED
@@ -113,7 +113,12 @@ var AO = /*#__PURE__*/function () {
113
113
  _opt$in_memory = _opt.in_memory,
114
114
  in_memory = _opt$in_memory === void 0 ? false : _opt$in_memory,
115
115
  port = _opt.port;
116
- if (_hb) this.hb = new _hb2["default"]();
116
+ if (_hb) {
117
+ this.format = _hb === "ans104" ? _hb : "httpsig";
118
+ this.hb = new _hb2["default"]({
119
+ format: this.format
120
+ });
121
+ }
117
122
  if (!_port && port) _port = port;
118
123
  if (!aoconnect && _port) aoconnect = (0, _utils.optAO)(_port);
119
124
  if (!ar && _port) ar = {
package/cjs/hb.js CHANGED
@@ -1063,12 +1063,10 @@ var HB = /*#__PURE__*/function () {
1063
1063
  "Data-Protocol": "ao",
1064
1064
  Variant: "ao.TN.1",
1065
1065
  Authority: this.operator,
1066
+ Scheduler: this.operator,
1066
1067
  Module: module !== null && module !== void 0 ? module : "ISShJH1ij-hPPt9St5UFFr_8Ys3Kj5cyg7zrMGt7H9s",
1067
1068
  device: "process@1.0",
1068
- "execution-device": "stack@1.0",
1069
- "push-device": "push@1.0",
1070
- "device-stack": ["genesis-wasm@1.0", "patch@1.0"],
1071
- "patch-from": "/results/outbox"
1069
+ "execution-device": "genesis-wasm@1.0"
1072
1070
  });
1073
1071
  }
1074
1072
  if (data) t.data = data;
package/esm/ao.js CHANGED
@@ -95,7 +95,10 @@ class AO {
95
95
  in_memory = false,
96
96
  port,
97
97
  } = opt
98
- if (_hb) this.hb = new HB()
98
+ if (_hb) {
99
+ this.format = _hb === "ans104" ? _hb : "httpsig"
100
+ this.hb = new HB({ format: this.format })
101
+ }
99
102
  if (!_port && port) _port = port
100
103
  if (!aoconnect && _port) aoconnect = optAO(_port)
101
104
  if (!ar && _port) ar = { port: _port }
package/esm/hb.js CHANGED
@@ -174,6 +174,7 @@ class HB {
174
174
  })
175
175
  return { slot: res.out.slot, res, pid }
176
176
  }
177
+
177
178
  async send104({ path = "/~process@1.0/schedule", item }) {
178
179
  let res = await fetch(`${this.url}${path}`, {
179
180
  method: "POST",
@@ -185,6 +186,7 @@ class HB {
185
186
  })
186
187
  return await result(res)
187
188
  }
189
+
188
190
  async post104({
189
191
  path = "/~process@1.0/schedule",
190
192
  tags = {},
@@ -319,12 +321,10 @@ class HB {
319
321
  "Data-Protocol": "ao",
320
322
  Variant: "ao.TN.1",
321
323
  Authority: this.operator,
324
+ Scheduler: this.operator,
322
325
  Module: module ?? "ISShJH1ij-hPPt9St5UFFr_8Ys3Kj5cyg7zrMGt7H9s",
323
326
  device: "process@1.0",
324
- "execution-device": "stack@1.0",
325
- "push-device": "push@1.0",
326
- "device-stack": ["genesis-wasm@1.0", "patch@1.0"],
327
- "patch-from": "/results/outbox",
327
+ "execution-device": "genesis-wasm@1.0",
328
328
  })
329
329
  }
330
330
  if (data) t.data = data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wao",
3
- "version": "0.37.9",
3
+ "version": "0.38.0",
4
4
  "bin": {
5
5
  "wao": "./cjs/cli.js",
6
6
  "wao-esm": "./esm/cli.js"