@actuallyfair/verifier 0.0.1 → 0.0.3

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.
@@ -0,0 +1,28 @@
1
+ name: Publish Package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "master"
7
+
8
+ permissions:
9
+ id-token: write
10
+ contents: read
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: "24"
22
+ registry-url: "https://registry.npmjs.org"
23
+
24
+ - name: Install protoc
25
+ run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
26
+
27
+ - run: npm ci
28
+ - run: npm publish
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const context_1 = require("../generated/context");
4
+ function isMode(value) {
5
+ return value === "decode" || value === "encode";
6
+ }
7
+ function normalizeBase64(input) {
8
+ const cleaned = input.replace(/\s+/g, "").replace(/-/g, "+").replace(/_/g, "/");
9
+ const padding = cleaned.length % 4;
10
+ return padding === 0 ? cleaned : `${cleaned}${"=".repeat(4 - padding)}`;
11
+ }
12
+ function readStdin() {
13
+ return new Promise((resolve, reject) => {
14
+ let data = "";
15
+ process.stdin.setEncoding("utf8");
16
+ process.stdin.on("data", (chunk) => {
17
+ data += chunk;
18
+ });
19
+ process.stdin.on("end", () => resolve(data));
20
+ process.stdin.on("error", reject);
21
+ });
22
+ }
23
+ async function readInput(args) {
24
+ if (args.length > 0) {
25
+ return args.join(" ").trim();
26
+ }
27
+ if (process.stdin.isTTY) {
28
+ return "";
29
+ }
30
+ const data = await readStdin();
31
+ return data.trim();
32
+ }
33
+ function usage(mode) {
34
+ if (mode === "decode") {
35
+ return ["Usage: npm run decode -- <base64>", " cat context.b64 | npm run decode"];
36
+ }
37
+ if (mode === "encode") {
38
+ return ["Usage: npm run encode -- '<json>'", " cat context.json | npm run encode"];
39
+ }
40
+ return [
41
+ "Usage: npm run decode -- <base64>",
42
+ " npm run encode -- '<json>'",
43
+ " cat context.b64 | npm run decode",
44
+ " cat context.json | npm run encode",
45
+ ];
46
+ }
47
+ function printUsage(mode) {
48
+ for (const line of usage(mode)) {
49
+ console.error(line);
50
+ }
51
+ }
52
+ function errorMessage(error) {
53
+ if (error instanceof Error) {
54
+ return error.message;
55
+ }
56
+ return String(error);
57
+ }
58
+ async function main() {
59
+ const [modeRaw, ...rest] = process.argv.slice(2);
60
+ if (!isMode(modeRaw)) {
61
+ printUsage();
62
+ process.exit(1);
63
+ return;
64
+ }
65
+ const input = await readInput(rest);
66
+ if (!input) {
67
+ printUsage(modeRaw);
68
+ process.exit(1);
69
+ return;
70
+ }
71
+ try {
72
+ if (modeRaw === "decode") {
73
+ const base64 = normalizeBase64(input);
74
+ const bytes = Buffer.from(base64, "base64");
75
+ const message = context_1.Context.decode(bytes);
76
+ const json = context_1.Context.toJSON(message);
77
+ process.stdout.write(`${JSON.stringify(json, null, 2)}\n`);
78
+ return;
79
+ }
80
+ const parsed = JSON.parse(input);
81
+ const message = context_1.Context.fromJSON(parsed);
82
+ const encoded = context_1.Context.encode(message).finish();
83
+ process.stdout.write(`${Buffer.from(encoded).toString("base64")}\n`);
84
+ }
85
+ catch (error) {
86
+ console.error(`Failed to ${modeRaw} context: ${errorMessage(error)}`);
87
+ process.exit(1);
88
+ }
89
+ }
90
+ void main();
@@ -1,6 +1,8 @@
1
1
  import { Currency } from "./generated/currency";
2
2
  import { FairCoinToss, FairCoinToss_Choice } from "./generated/context/fair-coin-toss";
3
+ import { CrashDice } from "./generated/context/crash-dice";
3
4
  import { MultiRoulette } from "./generated/context/multi-roulette";
5
+ import { Plinko } from "./generated/context/plinko";
4
6
  export declare function computeFairCoinTossResult(sig: Uint8Array): FairCoinToss_Choice.HEADS | FairCoinToss_Choice.TAILS;
5
7
  export declare function computeFairCoinTossOutcome(sig: Uint8Array, w: FairCoinToss): {
6
8
  result: FairCoinToss_Choice;
@@ -11,7 +13,13 @@ export declare function computeFairCoinTossOutcome(sig: Uint8Array, w: FairCoinT
11
13
  };
12
14
  export declare function computeCrashResult(vxSignature: Uint8Array, gameHash: Uint8Array, // This is the hash of the next from the hash chain
13
15
  houseEdge?: number): number;
14
- export declare function computeCrashDiceResult(sig: Uint8Array, houseEdge: number): number;
16
+ export type CrashDiceOutcome = {
17
+ multiplier: number;
18
+ target: number;
19
+ win: boolean;
20
+ };
21
+ export declare function computeCrashDiceResult(hash: Uint8Array, clientSeed: string): number;
22
+ export declare function computeCrashDiceOutcome(hash: Uint8Array, clientSeed: string, bet: CrashDice): CrashDiceOutcome;
15
23
  export declare function computeMultiRouletteResult(vxSignature: Uint8Array, bet: MultiRoulette): number | undefined;
16
24
  export declare function computeMineLocations(vxSignature: Uint8Array, revealedCells: Set<number>, // tiles we know are safe
17
25
  cells: number, // how many cells in total
@@ -25,4 +33,10 @@ export declare function computePinkoPossibilityIndexFromPath(path: PlinkoPath):
25
33
  export declare function computePlinkoPath(vxSignature: Uint8Array, possibilities: number): PlinkoPath;
26
34
  export declare function computePlinkoPascalsProbabilities(rowNumber: number): number[];
27
35
  export declare function computePlinkoHouseEdge(possibilities: number[]): number;
36
+ export type PlinkoResult = {
37
+ slot: number;
38
+ multiplier: number;
39
+ win: boolean;
40
+ };
41
+ export declare function computePlinkoResult(hash: Uint8Array, clientSeed: string, bet: Plinko): PlinkoResult;
28
42
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.computePlinkoHouseEdge = exports.computePlinkoPascalsProbabilities = exports.computePlinkoPath = exports.computePinkoPossibilityIndexFromPath = exports.computeMinesMultiplier = exports.computeMineLocations = exports.computeMultiRouletteResult = exports.computeCrashDiceResult = exports.computeCrashResult = exports.computeFairCoinTossOutcome = exports.computeFairCoinTossResult = void 0;
3
+ exports.computePlinkoResult = exports.computePlinkoHouseEdge = exports.computePlinkoPascalsProbabilities = exports.computePlinkoPath = exports.computePinkoPossibilityIndexFromPath = exports.computeMinesMultiplier = exports.computeMineLocations = exports.computeMultiRouletteResult = exports.computeCrashDiceOutcome = exports.computeCrashDiceResult = exports.computeCrashResult = exports.computeFairCoinTossOutcome = exports.computeFairCoinTossResult = void 0;
4
4
  const sha256_1 = require("@noble/hashes/sha256");
5
5
  const hmac_1 = require("@noble/hashes/hmac");
6
6
  const utils_1 = require("@noble/curves/abstract/utils");
@@ -46,10 +46,21 @@ houseEdge = 0) {
46
46
  return doComputeCrashResult((0, hmac_1.hmac)(sha256_1.sha256, vxSignature, gameHash), houseEdge);
47
47
  }
48
48
  exports.computeCrashResult = computeCrashResult;
49
- function computeCrashDiceResult(sig, houseEdge) {
50
- return doComputeCrashResult((0, sha256_1.sha256)(sig), houseEdge);
49
+ function computeCrashDiceResult(hash, clientSeed) {
50
+ const rollHash = hmacSha256(hash, clientSeed);
51
+ return multiplierFromHash(rollHash);
51
52
  }
52
53
  exports.computeCrashDiceResult = computeCrashDiceResult;
54
+ function computeCrashDiceOutcome(hash, clientSeed, bet) {
55
+ const multiplier = computeCrashDiceResult(hash, clientSeed);
56
+ const target = bet.target;
57
+ return {
58
+ multiplier,
59
+ target,
60
+ win: multiplier >= target,
61
+ };
62
+ }
63
+ exports.computeCrashDiceOutcome = computeCrashDiceOutcome;
53
64
  // returns the index of which roulette outcome was picked
54
65
  function computeMultiRouletteResult(vxSignature, bet) {
55
66
  const hash = (0, sha256_1.sha256)(vxSignature);
@@ -190,3 +201,52 @@ function computePlinkoHouseEdge(possibilities) {
190
201
  return ev;
191
202
  }
192
203
  exports.computePlinkoHouseEdge = computePlinkoHouseEdge;
204
+ function computePlinkoResult(hash, clientSeed, bet) {
205
+ const possibilities = bet.possibilities;
206
+ if (possibilities.length < 2) {
207
+ throw new Error("invalid possibilities ");
208
+ }
209
+ const probabilities = computePlinkoPascalsProbabilities(possibilities.length);
210
+ const rollHash = hmacSha256(hash, clientSeed);
211
+ const roll = uniformFromHash(rollHash);
212
+ const slot = pickSlot(probabilities, roll);
213
+ const multiplier = possibilities[slot] ?? 0;
214
+ return {
215
+ slot,
216
+ multiplier,
217
+ win: multiplier >= 1,
218
+ };
219
+ }
220
+ exports.computePlinkoResult = computePlinkoResult;
221
+ function hmacSha256(key, message) {
222
+ const data = new TextEncoder().encode(message);
223
+ return (0, hmac_1.hmac)(sha256_1.sha256, key, data);
224
+ }
225
+ function multiplierFromHash(hash) {
226
+ if (hash.length < 4) {
227
+ throw new Error("Hash must be at least 4 bytes.");
228
+ }
229
+ const value = (hash[0] << 24) | (hash[1] << 16) | (hash[2] << 8) | hash[3];
230
+ const normalized = value >>> 0;
231
+ const max = 2 ** 32;
232
+ const multiplierTimes100 = Math.floor((100 * max) / (max - normalized));
233
+ return multiplierTimes100 / 100;
234
+ }
235
+ function uniformFromHash(hash) {
236
+ if (hash.length < 4) {
237
+ throw new Error("Hash must be at least 4 bytes.");
238
+ }
239
+ const value = (hash[0] << 24) | (hash[1] << 16) | (hash[2] << 8) | hash[3];
240
+ const normalized = value >>> 0;
241
+ return normalized / 2 ** 32;
242
+ }
243
+ function pickSlot(probabilities, roll) {
244
+ let cumulative = 0;
245
+ for (let i = 0; i < probabilities.length; i += 1) {
246
+ cumulative += probabilities[i];
247
+ if (roll <= cumulative) {
248
+ return i;
249
+ }
250
+ }
251
+ return probabilities.length - 1;
252
+ }
@@ -16,25 +16,10 @@ export interface Context {
16
16
  mines?: Mines | undefined;
17
17
  tower?: Tower | undefined;
18
18
  plinko?: Plinko | undefined;
19
- }
20
- export interface PosthashContext {
21
19
  init?: PosthashInit | undefined;
22
- dice?: PosthashDice | undefined;
23
- plinko?: PosthashPlinko | undefined;
24
20
  }
25
21
  export interface PosthashInit {
26
22
  }
27
- export interface PosthashDice {
28
- target: number;
29
- clientSeed: string;
30
- hashchainServerHash: Uint8Array;
31
- }
32
- export interface PosthashPlinko {
33
- rows: number;
34
- riskLevel: string;
35
- clientSeed: string;
36
- hashchainServerHash: Uint8Array;
37
- }
38
23
  export declare const Context: {
39
24
  encode(message: Context, writer?: _m0.Writer): _m0.Writer;
40
25
  decode(input: _m0.Reader | Uint8Array, length?: number): Context;
@@ -121,6 +106,7 @@ export declare const Context: {
121
106
  } | undefined;
122
107
  possibilities?: number[] | undefined;
123
108
  } | undefined;
109
+ init?: {} | undefined;
124
110
  } & {
125
111
  fairCoinToss?: ({
126
112
  playerChoice?: import("./fair-coin-toss").FairCoinToss_Choice | undefined;
@@ -374,7 +360,8 @@ export declare const Context: {
374
360
  } & { [K_22 in Exclude<keyof I["plinko"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
375
361
  possibilities?: (number[] & number[] & { [K_23 in Exclude<keyof I["plinko"]["possibilities"], keyof number[]>]: never; }) | undefined;
376
362
  } & { [K_24 in Exclude<keyof I["plinko"], keyof Plinko>]: never; }) | undefined;
377
- } & { [K_25 in Exclude<keyof I, keyof Context>]: never; }>(base?: I | undefined): Context;
363
+ init?: ({} & {} & { [K_25 in Exclude<keyof I["init"], never>]: never; }) | undefined;
364
+ } & { [K_26 in Exclude<keyof I, keyof Context>]: never; }>(base?: I | undefined): Context;
378
365
  fromPartial<I_1 extends {
379
366
  fairCoinToss?: {
380
367
  playerChoice?: import("./fair-coin-toss").FairCoinToss_Choice | undefined;
@@ -456,17 +443,18 @@ export declare const Context: {
456
443
  } | undefined;
457
444
  possibilities?: number[] | undefined;
458
445
  } | undefined;
446
+ init?: {} | undefined;
459
447
  } & {
460
448
  fairCoinToss?: ({
461
449
  playerChoice?: import("./fair-coin-toss").FairCoinToss_Choice | undefined;
462
450
  } & {
463
451
  playerChoice?: import("./fair-coin-toss").FairCoinToss_Choice | undefined;
464
- } & { [K_26 in Exclude<keyof I_1["fairCoinToss"], "playerChoice">]: never; }) | undefined;
452
+ } & { [K_27 in Exclude<keyof I_1["fairCoinToss"], "playerChoice">]: never; }) | undefined;
465
453
  crash?: ({
466
454
  houseEdge?: number | undefined;
467
455
  } & {
468
456
  houseEdge?: number | undefined;
469
- } & { [K_27 in Exclude<keyof I_1["crash"], "houseEdge">]: never; }) | undefined;
457
+ } & { [K_28 in Exclude<keyof I_1["crash"], "houseEdge">]: never; }) | undefined;
470
458
  hilo?: ({
471
459
  start?: {
472
460
  amount?: {
@@ -493,17 +481,17 @@ export declare const Context: {
493
481
  } & {
494
482
  currency?: import("../currency").Currency | undefined;
495
483
  value?: number | undefined;
496
- } & { [K_28 in Exclude<keyof I_1["hilo"]["start"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
484
+ } & { [K_29 in Exclude<keyof I_1["hilo"]["start"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
497
485
  startingCard?: import("./hilo").Card | undefined;
498
- } & { [K_29 in Exclude<keyof I_1["hilo"]["start"], keyof import("./hilo").HiLoStart>]: never; }) | undefined;
486
+ } & { [K_30 in Exclude<keyof I_1["hilo"]["start"], keyof import("./hilo").HiLoStart>]: never; }) | undefined;
499
487
  move?: ({
500
488
  playerChoice?: import("./hilo").HiLoMove_Choice | undefined;
501
489
  moveIndex?: number | undefined;
502
490
  } & {
503
491
  playerChoice?: import("./hilo").HiLoMove_Choice | undefined;
504
492
  moveIndex?: number | undefined;
505
- } & { [K_30 in Exclude<keyof I_1["hilo"]["move"], keyof import("./hilo").HiLoMove>]: never; }) | undefined;
506
- } & { [K_31 in Exclude<keyof I_1["hilo"], keyof HiLo>]: never; }) | undefined;
493
+ } & { [K_31 in Exclude<keyof I_1["hilo"]["move"], keyof import("./hilo").HiLoMove>]: never; }) | undefined;
494
+ } & { [K_32 in Exclude<keyof I_1["hilo"], keyof HiLo>]: never; }) | undefined;
507
495
  crashDice?: ({
508
496
  amount?: {
509
497
  currency?: import("../currency").Currency | undefined;
@@ -518,10 +506,10 @@ export declare const Context: {
518
506
  } & {
519
507
  currency?: import("../currency").Currency | undefined;
520
508
  value?: number | undefined;
521
- } & { [K_32 in Exclude<keyof I_1["crashDice"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
509
+ } & { [K_33 in Exclude<keyof I_1["crashDice"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
522
510
  target?: number | undefined;
523
511
  houseEdge?: number | undefined;
524
- } & { [K_33 in Exclude<keyof I_1["crashDice"], keyof CrashDice>]: never; }) | undefined;
512
+ } & { [K_34 in Exclude<keyof I_1["crashDice"], keyof CrashDice>]: never; }) | undefined;
525
513
  multiRoulette?: ({
526
514
  outcomes?: {
527
515
  multiplier?: number | undefined;
@@ -581,8 +569,8 @@ export declare const Context: {
581
569
  } & {
582
570
  currency?: import("../currency").Currency | undefined;
583
571
  value?: number | undefined;
584
- } & { [K_34 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number]["bets"][number]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
585
- } & { [K_35 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number]["bets"][number], keyof import("./multi-roulette").MultiRoulette_Bet>]: never; })[] & { [K_36 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number]["bets"], keyof {
572
+ } & { [K_35 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number]["bets"][number]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
573
+ } & { [K_36 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number]["bets"][number], keyof import("./multi-roulette").MultiRoulette_Bet>]: never; })[] & { [K_37 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number]["bets"], keyof {
586
574
  uname?: string | undefined;
587
575
  amount?: {
588
576
  currency?: import("../currency").Currency | undefined;
@@ -590,7 +578,7 @@ export declare const Context: {
590
578
  } | undefined;
591
579
  }[]>]: never; }) | undefined;
592
580
  name?: string | undefined;
593
- } & { [K_37 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number], keyof import("./multi-roulette").MultiRoulette_Outcome>]: never; })[] & { [K_38 in Exclude<keyof I_1["multiRoulette"]["outcomes"], keyof {
581
+ } & { [K_38 in Exclude<keyof I_1["multiRoulette"]["outcomes"][number], keyof import("./multi-roulette").MultiRoulette_Outcome>]: never; })[] & { [K_39 in Exclude<keyof I_1["multiRoulette"]["outcomes"], keyof {
594
582
  multiplier?: number | undefined;
595
583
  probability?: number | undefined;
596
584
  bets?: {
@@ -602,7 +590,7 @@ export declare const Context: {
602
590
  }[] | undefined;
603
591
  name?: string | undefined;
604
592
  }[]>]: never; }) | undefined;
605
- } & { [K_39 in Exclude<keyof I_1["multiRoulette"], "outcomes">]: never; }) | undefined;
593
+ } & { [K_40 in Exclude<keyof I_1["multiRoulette"], "outcomes">]: never; }) | undefined;
606
594
  mines?: ({
607
595
  start?: {
608
596
  amount?: {
@@ -635,19 +623,19 @@ export declare const Context: {
635
623
  } & {
636
624
  currency?: import("../currency").Currency | undefined;
637
625
  value?: number | undefined;
638
- } & { [K_40 in Exclude<keyof I_1["mines"]["start"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
626
+ } & { [K_41 in Exclude<keyof I_1["mines"]["start"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
639
627
  cells?: number | undefined;
640
628
  mines?: number | undefined;
641
629
  cellLineBreak?: number | undefined;
642
630
  houseEdge?: number | undefined;
643
- } & { [K_41 in Exclude<keyof I_1["mines"]["start"], keyof import("./mines").MinesStart>]: never; }) | undefined;
631
+ } & { [K_42 in Exclude<keyof I_1["mines"]["start"], keyof import("./mines").MinesStart>]: never; }) | undefined;
644
632
  move?: ({
645
633
  cell?: number | undefined;
646
634
  } & {
647
635
  cell?: number | undefined;
648
- } & { [K_42 in Exclude<keyof I_1["mines"]["move"], "cell">]: never; }) | undefined;
636
+ } & { [K_43 in Exclude<keyof I_1["mines"]["move"], "cell">]: never; }) | undefined;
649
637
  cashout?: boolean | undefined;
650
- } & { [K_43 in Exclude<keyof I_1["mines"], keyof Mines>]: never; }) | undefined;
638
+ } & { [K_44 in Exclude<keyof I_1["mines"], keyof Mines>]: never; }) | undefined;
651
639
  tower?: ({
652
640
  start?: {
653
641
  amount?: {
@@ -680,19 +668,19 @@ export declare const Context: {
680
668
  } & {
681
669
  currency?: import("../currency").Currency | undefined;
682
670
  value?: number | undefined;
683
- } & { [K_44 in Exclude<keyof I_1["tower"]["start"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
671
+ } & { [K_45 in Exclude<keyof I_1["tower"]["start"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
684
672
  levels?: number | undefined;
685
673
  choicesPerLevel?: number | undefined;
686
674
  minesPerLevel?: number | undefined;
687
675
  houseEdge?: number | undefined;
688
- } & { [K_45 in Exclude<keyof I_1["tower"]["start"], keyof import("./tower").TowerStart>]: never; }) | undefined;
676
+ } & { [K_46 in Exclude<keyof I_1["tower"]["start"], keyof import("./tower").TowerStart>]: never; }) | undefined;
689
677
  move?: ({
690
678
  choice?: number | undefined;
691
679
  } & {
692
680
  choice?: number | undefined;
693
- } & { [K_46 in Exclude<keyof I_1["tower"]["move"], "choice">]: never; }) | undefined;
681
+ } & { [K_47 in Exclude<keyof I_1["tower"]["move"], "choice">]: never; }) | undefined;
694
682
  cashout?: boolean | undefined;
695
- } & { [K_47 in Exclude<keyof I_1["tower"], keyof Tower>]: never; }) | undefined;
683
+ } & { [K_48 in Exclude<keyof I_1["tower"], keyof Tower>]: never; }) | undefined;
696
684
  plinko?: ({
697
685
  amount?: {
698
686
  currency?: import("../currency").Currency | undefined;
@@ -706,88 +694,11 @@ export declare const Context: {
706
694
  } & {
707
695
  currency?: import("../currency").Currency | undefined;
708
696
  value?: number | undefined;
709
- } & { [K_48 in Exclude<keyof I_1["plinko"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
710
- possibilities?: (number[] & number[] & { [K_49 in Exclude<keyof I_1["plinko"]["possibilities"], keyof number[]>]: never; }) | undefined;
711
- } & { [K_50 in Exclude<keyof I_1["plinko"], keyof Plinko>]: never; }) | undefined;
712
- } & { [K_51 in Exclude<keyof I_1, keyof Context>]: never; }>(object: I_1): Context;
713
- };
714
- export declare const PosthashContext: {
715
- encode(message: PosthashContext, writer?: _m0.Writer): _m0.Writer;
716
- decode(input: _m0.Reader | Uint8Array, length?: number): PosthashContext;
717
- fromJSON(object: any): PosthashContext;
718
- toJSON(message: PosthashContext): unknown;
719
- create<I extends {
720
- init?: {} | undefined;
721
- dice?: {
722
- target?: number | undefined;
723
- clientSeed?: string | undefined;
724
- hashchainServerHash?: Uint8Array | undefined;
725
- } | undefined;
726
- plinko?: {
727
- rows?: number | undefined;
728
- riskLevel?: string | undefined;
729
- clientSeed?: string | undefined;
730
- hashchainServerHash?: Uint8Array | undefined;
731
- } | undefined;
732
- } & {
733
- init?: ({} & {} & { [K in Exclude<keyof I["init"], never>]: never; }) | undefined;
734
- dice?: ({
735
- target?: number | undefined;
736
- clientSeed?: string | undefined;
737
- hashchainServerHash?: Uint8Array | undefined;
738
- } & {
739
- target?: number | undefined;
740
- clientSeed?: string | undefined;
741
- hashchainServerHash?: Uint8Array | undefined;
742
- } & { [K_1 in Exclude<keyof I["dice"], keyof PosthashDice>]: never; }) | undefined;
743
- plinko?: ({
744
- rows?: number | undefined;
745
- riskLevel?: string | undefined;
746
- clientSeed?: string | undefined;
747
- hashchainServerHash?: Uint8Array | undefined;
748
- } & {
749
- rows?: number | undefined;
750
- riskLevel?: string | undefined;
751
- clientSeed?: string | undefined;
752
- hashchainServerHash?: Uint8Array | undefined;
753
- } & { [K_2 in Exclude<keyof I["plinko"], keyof PosthashPlinko>]: never; }) | undefined;
754
- } & { [K_3 in Exclude<keyof I, keyof PosthashContext>]: never; }>(base?: I | undefined): PosthashContext;
755
- fromPartial<I_1 extends {
756
- init?: {} | undefined;
757
- dice?: {
758
- target?: number | undefined;
759
- clientSeed?: string | undefined;
760
- hashchainServerHash?: Uint8Array | undefined;
761
- } | undefined;
762
- plinko?: {
763
- rows?: number | undefined;
764
- riskLevel?: string | undefined;
765
- clientSeed?: string | undefined;
766
- hashchainServerHash?: Uint8Array | undefined;
767
- } | undefined;
768
- } & {
769
- init?: ({} & {} & { [K_4 in Exclude<keyof I_1["init"], never>]: never; }) | undefined;
770
- dice?: ({
771
- target?: number | undefined;
772
- clientSeed?: string | undefined;
773
- hashchainServerHash?: Uint8Array | undefined;
774
- } & {
775
- target?: number | undefined;
776
- clientSeed?: string | undefined;
777
- hashchainServerHash?: Uint8Array | undefined;
778
- } & { [K_5 in Exclude<keyof I_1["dice"], keyof PosthashDice>]: never; }) | undefined;
779
- plinko?: ({
780
- rows?: number | undefined;
781
- riskLevel?: string | undefined;
782
- clientSeed?: string | undefined;
783
- hashchainServerHash?: Uint8Array | undefined;
784
- } & {
785
- rows?: number | undefined;
786
- riskLevel?: string | undefined;
787
- clientSeed?: string | undefined;
788
- hashchainServerHash?: Uint8Array | undefined;
789
- } & { [K_6 in Exclude<keyof I_1["plinko"], keyof PosthashPlinko>]: never; }) | undefined;
790
- } & { [K_7 in Exclude<keyof I_1, keyof PosthashContext>]: never; }>(object: I_1): PosthashContext;
697
+ } & { [K_49 in Exclude<keyof I_1["plinko"]["amount"], keyof import("../amount").Amount>]: never; }) | undefined;
698
+ possibilities?: (number[] & number[] & { [K_50 in Exclude<keyof I_1["plinko"]["possibilities"], keyof number[]>]: never; }) | undefined;
699
+ } & { [K_51 in Exclude<keyof I_1["plinko"], keyof Plinko>]: never; }) | undefined;
700
+ init?: ({} & {} & { [K_52 in Exclude<keyof I_1["init"], never>]: never; }) | undefined;
701
+ } & { [K_53 in Exclude<keyof I_1, keyof Context>]: never; }>(object: I_1): Context;
791
702
  };
792
703
  export declare const PosthashInit: {
793
704
  encode(_: PosthashInit, writer?: _m0.Writer): _m0.Writer;
@@ -797,55 +708,3 @@ export declare const PosthashInit: {
797
708
  create<I extends {} & {} & { [K in Exclude<keyof I, never>]: never; }>(base?: I | undefined): PosthashInit;
798
709
  fromPartial<I_1 extends {} & {} & { [K_1 in Exclude<keyof I_1, never>]: never; }>(_: I_1): PosthashInit;
799
710
  };
800
- export declare const PosthashDice: {
801
- encode(message: PosthashDice, writer?: _m0.Writer): _m0.Writer;
802
- decode(input: _m0.Reader | Uint8Array, length?: number): PosthashDice;
803
- fromJSON(object: any): PosthashDice;
804
- toJSON(message: PosthashDice): unknown;
805
- create<I extends {
806
- target?: number | undefined;
807
- clientSeed?: string | undefined;
808
- hashchainServerHash?: Uint8Array | undefined;
809
- } & {
810
- target?: number | undefined;
811
- clientSeed?: string | undefined;
812
- hashchainServerHash?: Uint8Array | undefined;
813
- } & { [K in Exclude<keyof I, keyof PosthashDice>]: never; }>(base?: I | undefined): PosthashDice;
814
- fromPartial<I_1 extends {
815
- target?: number | undefined;
816
- clientSeed?: string | undefined;
817
- hashchainServerHash?: Uint8Array | undefined;
818
- } & {
819
- target?: number | undefined;
820
- clientSeed?: string | undefined;
821
- hashchainServerHash?: Uint8Array | undefined;
822
- } & { [K_1 in Exclude<keyof I_1, keyof PosthashDice>]: never; }>(object: I_1): PosthashDice;
823
- };
824
- export declare const PosthashPlinko: {
825
- encode(message: PosthashPlinko, writer?: _m0.Writer): _m0.Writer;
826
- decode(input: _m0.Reader | Uint8Array, length?: number): PosthashPlinko;
827
- fromJSON(object: any): PosthashPlinko;
828
- toJSON(message: PosthashPlinko): unknown;
829
- create<I extends {
830
- rows?: number | undefined;
831
- riskLevel?: string | undefined;
832
- clientSeed?: string | undefined;
833
- hashchainServerHash?: Uint8Array | undefined;
834
- } & {
835
- rows?: number | undefined;
836
- riskLevel?: string | undefined;
837
- clientSeed?: string | undefined;
838
- hashchainServerHash?: Uint8Array | undefined;
839
- } & { [K in Exclude<keyof I, keyof PosthashPlinko>]: never; }>(base?: I | undefined): PosthashPlinko;
840
- fromPartial<I_1 extends {
841
- rows?: number | undefined;
842
- riskLevel?: string | undefined;
843
- clientSeed?: string | undefined;
844
- hashchainServerHash?: Uint8Array | undefined;
845
- } & {
846
- rows?: number | undefined;
847
- riskLevel?: string | undefined;
848
- clientSeed?: string | undefined;
849
- hashchainServerHash?: Uint8Array | undefined;
850
- } & { [K_1 in Exclude<keyof I_1, keyof PosthashPlinko>]: never; }>(object: I_1): PosthashPlinko;
851
- };