Compare commits

..

No commits in common. "38682864169df79e69b87a5409693e103f9946d6" and "0c51da781ebf85db8143fa7defbff42434d6b60d" have entirely different histories.

4 changed files with 22 additions and 4 deletions

View File

@ -8,7 +8,7 @@
"build": "rimraf dist && tsc"
},
"devDependencies": {
"@lumeweb/relay-types": "git+https://git.lumeweb.com/LumeWeb/relay-types.git",
"@lumeweb/relay-types": "https://git.lumeweb.com/LumeWeb/relay-types.git",
"@types/b4a": "^1.6.0",
"@types/express": "^4.17.14",
"@types/node": "^18.0.0",
@ -18,7 +18,7 @@
},
"dependencies": {
"@hyperswarm/dht": "^6.0.1",
"@lumeweb/rpc": "git+https://git.lumeweb.com/LumeWeb/rpc.git",
"@lumeweb/rpc": "https://git.lumeweb.com/LumeWeb/rpc.git",
"b4a": "^1.6.1",
"json-stringify-deterministic": "^1.0.7",
"libskynet": "^0.0.61",

View File

@ -1,4 +1,7 @@
import { clearTimeout, setTimeout } from "timers";
import { pack, unpack } from "msgpackr";
import { Buffer } from "buffer";
import { isPromise } from "../util.js";
import RpcNetwork from "../network.js";
import { RpcQueryOptions } from "../types.js";
import type {
@ -6,6 +9,8 @@ import type {
RPCRequest,
RPCResponse,
} from "@lumeweb/relay-types";
import RPC from "@lumeweb/rpc";
import { RPCBroadcastRequest } from "@lumeweb/relay-types";
export default abstract class RpcQueryBase {
protected _network: RpcNetwork;

View File

@ -1,8 +1,19 @@
import RpcNetwork from "../network.js";
import { ClientRPCRequest, RPCResponse } from "@lumeweb/relay-types";
import {
ClientRPCRequest,
RPCBroadcastRequest,
RPCRequest,
RPCResponse,
} from "@lumeweb/relay-types";
import { RpcQueryOptions } from "../types.js";
import { clearTimeout, setTimeout } from "timers";
import b4a from "b4a";
import { hashQuery, isPromise, validateTimestampedResponse } from "../util.js";
import {
hashQuery,
isPromise,
validateResponse,
validateTimestampedResponse,
} from "../util.js";
import RPC from "@lumeweb/rpc";
import { ERR_INVALID_SIGNATURE } from "../error.js";
import RpcQueryBase from "./base.js";

View File

@ -1,5 +1,6 @@
import {
ClientRPCRequest,
RPCBroadcastRequest,
RPCBroadcastResponse,
RPCRequest,
RPCResponse,
@ -8,6 +9,7 @@ import { clearTimeout } from "timers";
import b4a from "b4a";
import {
flatten,
isPromise,
validateResponse,
validateTimestampedResponse,
} from "../util.js";