wao 0.26.2 → 0.27.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/cjs/encode.js +1522 -0
- package/cjs/hb.js +14 -6
- package/cjs/hyperbeam.js +88 -16
- package/cjs/send.js +187 -0
- package/cjs/signer.js +36 -822
- package/cjs/workspace/test/hyperbeam.js +6 -9
- package/esm/encode.js +1199 -0
- package/esm/hb.js +6 -3
- package/esm/hyperbeam.js +58 -10
- package/esm/send.js +126 -0
- package/esm/signer.js +5 -651
- package/esm/workspace/test/hyperbeam.js +6 -9
- package/package.json +1 -1
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import assert from "assert"
|
|
2
2
|
import { describe, it, before, after, beforeEach } from "node:test"
|
|
3
|
-
import { wait, toAddr } from "wao/test"
|
|
4
|
-
import {
|
|
3
|
+
import { HyperBEAM, wait, toAddr } from "wao/test"
|
|
4
|
+
import { HB } from "wao"
|
|
5
5
|
import { resolve } from "path"
|
|
6
6
|
import { readFileSync } from "fs"
|
|
7
7
|
|
|
8
|
-
const cwd = "
|
|
8
|
+
const cwd = "../dev/wao/HyperBEAM"
|
|
9
9
|
const wallet = ".wallet.json"
|
|
10
10
|
|
|
11
11
|
describe("HyperBEAM", function () {
|
|
12
12
|
let hbeam, hb, jwk
|
|
13
13
|
|
|
14
14
|
before(async () => {
|
|
15
|
-
hbeam = new HyperBEAM({ cwd, wallet })
|
|
16
|
-
jwk = JSON.parse(
|
|
17
|
-
readFileSync(resolve(import.meta.dirname, cwd, wallet), "utf8")
|
|
18
|
-
)
|
|
19
|
-
await wait(5000)
|
|
15
|
+
hbeam = await new HyperBEAM({ c: "12", cmake: "3.5", cwd, wallet }).ready()
|
|
16
|
+
jwk = JSON.parse(readFileSync(resolve(process.cwd(), cwd, wallet), "utf8"))
|
|
20
17
|
})
|
|
21
18
|
|
|
22
19
|
beforeEach(async () => (hb = await new HB({}).init(jwk)))
|
|
@@ -24,7 +21,7 @@ describe("HyperBEAM", function () {
|
|
|
24
21
|
after(async () => hbeam.kill())
|
|
25
22
|
|
|
26
23
|
it("should run a HyperBEAM node", async () => {
|
|
27
|
-
const info = await hb.meta.info
|
|
24
|
+
const info = await hb.getJSON({ path: "/~meta@1.0/info" })
|
|
28
25
|
assert.equal(info.address, toAddr(jwk.n))
|
|
29
26
|
})
|
|
30
27
|
})
|