@latticexyz/services 2.0.0-alpha.1 → 2.0.0-alpha.1.100
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/README.md +94 -0
- package/bin/ecs-relay +0 -0
- package/bin/ecs-snapshot +0 -0
- package/bin/ecs-stream +0 -0
- package/bin/faucet +0 -0
- package/dist/ecs-relay.js +683 -0
- package/dist/ecs-relay.js.map +1 -0
- package/dist/ecs-snapshot.js +810 -0
- package/dist/ecs-snapshot.js.map +1 -0
- package/dist/ecs-stream.js +391 -0
- package/dist/ecs-stream.js.map +1 -0
- package/dist/faucet.js +935 -0
- package/dist/faucet.js.map +1 -0
- package/dist/mode.js +1484 -0
- package/dist/mode.js.map +1 -0
- package/package.json +42 -14
- package/protobuf/go/ecs-relay/ecs-relay.pb.go +1 -1
- package/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go +35 -21
- package/protobuf/go/ecs-snapshot/ecs-snapshot.pb.go +1 -1
- package/protobuf/go/ecs-snapshot/ecs-snapshot_grpc.pb.go +24 -13
- package/protobuf/go/ecs-stream/ecs-stream.pb.go +1 -1
- package/protobuf/go/ecs-stream/ecs-stream_grpc.pb.go +6 -2
- package/protobuf/go/faucet/faucet.pb.go +1 -1
- package/protobuf/go/faucet/faucet_grpc.pb.go +28 -17
- package/protobuf/go/mode/mode.pb.go +1 -1
- package/protobuf/go/mode/mode_grpc.pb.go +14 -7
- package/protobuf/ts/ecs-relay/ecs-relay.ts +1 -1
- package/protobuf/ts/ecs-snapshot/ecs-snapshot.ts +1 -1
- package/protobuf/ts/ecs-stream/ecs-stream.ts +1 -1
- package/protobuf/ts/faucet/faucet.ts +1 -1
- package/protobuf/ts/mode/google/protobuf/any.ts +191 -0
- package/protobuf/ts/mode/mode.ts +1 -1
package/README.md
CHANGED
|
@@ -92,6 +92,100 @@ After the initial setup, to quickly re-build and run the MODE service, you can u
|
|
|
92
92
|
make mode run-mode
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
+
#### MODE and MUD
|
|
96
|
+
|
|
97
|
+
Certain parts of MODE depend on MUD, specifically the `storecore` package of MODE which allows us to work with data coming from MUD and perfom encoding/decodings between MUD SchemaTypes, Go types, and Postgres types when the data is store in the DB. If modifications are made to MUD StoreCore, MODE `storecore.go` needs to be re-generated. To do this, perform these steps:
|
|
98
|
+
|
|
99
|
+
1. Get the latest MUD StoreCore abi and save it to a file, e.g. `storecore.json` or `storecore.abi`. It should look something like this
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
[
|
|
103
|
+
{
|
|
104
|
+
"anonymous": false,
|
|
105
|
+
"inputs": [
|
|
106
|
+
{
|
|
107
|
+
"indexed": false,
|
|
108
|
+
"internalType": "bytes32",
|
|
109
|
+
"name": "tableId",
|
|
110
|
+
"type": "bytes32"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"indexed": false,
|
|
114
|
+
"internalType": "bytes32[]",
|
|
115
|
+
"name": "key",
|
|
116
|
+
"type": "bytes32[]"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"name": "StoreDeleteRecord",
|
|
120
|
+
"type": "event"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"anonymous": false,
|
|
124
|
+
"inputs": [
|
|
125
|
+
{
|
|
126
|
+
"indexed": false,
|
|
127
|
+
"internalType": "bytes32",
|
|
128
|
+
"name": "tableId",
|
|
129
|
+
"type": "bytes32"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"indexed": false,
|
|
133
|
+
"internalType": "bytes32[]",
|
|
134
|
+
"name": "key",
|
|
135
|
+
"type": "bytes32[]"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"indexed": false,
|
|
139
|
+
"internalType": "uint8",
|
|
140
|
+
"name": "schemaIndex",
|
|
141
|
+
"type": "uint8"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"indexed": false,
|
|
145
|
+
"internalType": "bytes",
|
|
146
|
+
"name": "data",
|
|
147
|
+
"type": "bytes"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"name": "StoreSetField",
|
|
151
|
+
"type": "event"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"anonymous": false,
|
|
155
|
+
"inputs": [
|
|
156
|
+
{
|
|
157
|
+
"indexed": false,
|
|
158
|
+
"internalType": "bytes32",
|
|
159
|
+
"name": "tableId",
|
|
160
|
+
"type": "bytes32"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"indexed": false,
|
|
164
|
+
"internalType": "bytes32[]",
|
|
165
|
+
"name": "key",
|
|
166
|
+
"type": "bytes32[]"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"indexed": false,
|
|
170
|
+
"internalType": "bytes",
|
|
171
|
+
"name": "data",
|
|
172
|
+
"type": "bytes"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"name": "StoreSetRecord",
|
|
176
|
+
"type": "event"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
2. Run the following command to generate the MODE `storecore.go` file:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
abigen --abi storecore.abi --pkg storecore --out storecore.go
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
3. Copy the generated `storecore.go` file to the MODE `storecore` package. Alternatively, run the command in the storecore package directory and the file will overwrite the existing one.
|
|
188
|
+
|
|
95
189
|
## V1 Services
|
|
96
190
|
|
|
97
191
|
### [📄 Docs](./README.v1.md)
|
package/bin/ecs-relay
CHANGED
|
Binary file
|
package/bin/ecs-snapshot
CHANGED
|
Binary file
|
package/bin/ecs-stream
CHANGED
|
Binary file
|
package/bin/faucet
CHANGED
|
Binary file
|