| 218 | implements HasDynoOut<"uint"> |
| 219 | { |
| 220 | constructor({ value }: { value: DynoVal<T> }) { |
| 221 | super({ |
| 222 | inTypes: { value: valType(value) }, |
| 223 | outTypes: { hash: "uint" }, |
| 224 | inputs: { value }, |
| 225 | construct: ({ value }) => { |
| 226 | if (!value) { |
| 227 | throw new Error("value is required"); |
| 228 | } |
| 229 | let state = new PcgMix({ value: value }).outputs.state; |
| 230 | state = new PcgNext({ state }).outputs.state; |
| 231 | return new PcgHash({ state }).outputs; |
| 232 | }, |
| 233 | }); |
| 234 | } |
| 235 | dynoOut(): DynoValue<"uint"> { |
| 236 | return new DynoOutput(this, "hash"); |
| 237 | } |