@latticexyz/services 2.0.0-next.4 → 2.0.0-next.5
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/bin/faucet +0 -0
- package/bin/mode +0 -0
- package/package.json +2 -1
- package/ts/faucet/createFaucetService.ts +14 -0
- package/ts/faucet/index.ts +2 -0
package/bin/faucet
CHANGED
Binary file
|
package/bin/mode
CHANGED
Binary file
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@latticexyz/services",
|
3
|
-
"version": "2.0.0-next.
|
3
|
+
"version": "2.0.0-next.5",
|
4
4
|
"description": "MUD services for enhanced interactions with on-chain ECS state",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -53,6 +53,7 @@
|
|
53
53
|
"build:protobuf": "make protoc-ts && prettier --write protobuf/ts/**/*.ts",
|
54
54
|
"dev": "tsup --watch",
|
55
55
|
"test": "pnpm run test:go",
|
56
|
+
"test:ci": "pnpm run test",
|
56
57
|
"test:go": "go test -v ./..."
|
57
58
|
}
|
58
59
|
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FaucetServiceDefinition } from "../../protobuf/ts/faucet/faucet";
|
2
|
+
import { createChannel, createClient, RawClient } from "nice-grpc-web";
|
3
|
+
import { FromTsProtoServiceDefinition } from "nice-grpc-web/lib/service-definitions/ts-proto";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Create a FaucetServiceClient
|
7
|
+
* @param url FaucetService URL
|
8
|
+
* @returns FaucetServiceClient
|
9
|
+
*/
|
10
|
+
export function createFaucetService(
|
11
|
+
url: string
|
12
|
+
): RawClient<FromTsProtoServiceDefinition<typeof FaucetServiceDefinition>> {
|
13
|
+
return createClient(FaucetServiceDefinition, createChannel(url));
|
14
|
+
}
|