@ibgib/core-gib 0.1.3 → 0.1.4
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/dist/witness/space/inner-space/inner-space-v1.respec.mjs +4 -5
- package/dist/witness/space/inner-space/inner-space-v1.respec.mjs.map +1 -1
- package/package.json +4 -4
- package/src/witness/space/inner-space/inner-space-v1.respec.mts +4 -6
- package/dist/witness/keystone/keystone-base-v1.d.mts +0 -177
- package/dist/witness/keystone/keystone-base-v1.d.mts.map +0 -1
- package/dist/witness/keystone/keystone-base-v1.mjs +0 -397
- package/dist/witness/keystone/keystone-base-v1.mjs.map +0 -1
- package/dist/witness/keystone/keystone-constants.d.mts +0 -2
- package/dist/witness/keystone/keystone-constants.d.mts.map +0 -1
- package/dist/witness/keystone/keystone-constants.mjs +0 -2
- package/dist/witness/keystone/keystone-constants.mjs.map +0 -1
- package/dist/witness/keystone/keystone-helper.d.mts +0 -9
- package/dist/witness/keystone/keystone-helper.d.mts.map +0 -1
- package/dist/witness/keystone/keystone-helper.mjs +0 -53
- package/dist/witness/keystone/keystone-helper.mjs.map +0 -1
- package/dist/witness/keystone/keystone-types.d.mts +0 -164
- package/dist/witness/keystone/keystone-types.d.mts.map +0 -1
- package/dist/witness/keystone/keystone-types.mjs +0 -46
- package/dist/witness/keystone/keystone-types.mjs.map +0 -1
- package/dist/witness/keystone/keystone.d.mts +0 -2
- package/dist/witness/keystone/keystone.d.mts.map +0 -1
- package/dist/witness/keystone/keystone.mjs +0 -2
- package/dist/witness/keystone/keystone.mjs.map +0 -1
- package/dist/witness/keystone/keystone.respec.d.mts +0 -11
- package/dist/witness/keystone/keystone.respec.d.mts.map +0 -1
- package/dist/witness/keystone/keystone.respec.mjs +0 -11
- package/dist/witness/keystone/keystone.respec.mjs.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-constants.d.mts +0 -2
- package/dist/witness/keystone/math-keystone/math-keystone-constants.d.mts.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-constants.mjs +0 -2
- package/dist/witness/keystone/math-keystone/math-keystone-constants.mjs.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-helper.d.mts +0 -13
- package/dist/witness/keystone/math-keystone/math-keystone-helper.d.mts.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-helper.mjs +0 -41
- package/dist/witness/keystone/math-keystone/math-keystone-helper.mjs.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-types.d.mts +0 -80
- package/dist/witness/keystone/math-keystone/math-keystone-types.d.mts.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-types.mjs +0 -9
- package/dist/witness/keystone/math-keystone/math-keystone-types.mjs.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-v1.d.mts +0 -34
- package/dist/witness/keystone/math-keystone/math-keystone-v1.d.mts.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone-v1.mjs +0 -119
- package/dist/witness/keystone/math-keystone/math-keystone-v1.mjs.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone.respec.d.mts +0 -20
- package/dist/witness/keystone/math-keystone/math-keystone.respec.d.mts.map +0 -1
- package/dist/witness/keystone/math-keystone/math-keystone.respec.mjs +0 -76
- package/dist/witness/keystone/math-keystone/math-keystone.respec.mjs.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-constants.d.mts +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-constants.d.mts.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-constants.mjs +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-constants.mjs.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-helper.d.mts +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-helper.d.mts.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-helper.mjs +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-helper.mjs.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-types.d.mts +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-types.d.mts.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-types.mjs +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-types.mjs.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-v1.d.mts +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-v1.d.mts.map +0 -1
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-v1.mjs +0 -2
- package/dist/witness/keystone/zkp-keystone/zkp-keystone-v1.mjs.map +0 -1
- package/src/witness/keystone/keystone-base-v1.mts +0 -450
- package/src/witness/keystone/keystone-constants.mts +0 -0
- package/src/witness/keystone/keystone-helper.mts +0 -56
- package/src/witness/keystone/keystone-types.mts +0 -200
- package/src/witness/keystone/keystone.mts +0 -0
- package/src/witness/keystone/keystone.respec.mts +0 -9
- package/src/witness/keystone/math-keystone/math-keystone-constants.mts +0 -0
- package/src/witness/keystone/math-keystone/math-keystone-helper.mts +0 -45
- package/src/witness/keystone/math-keystone/math-keystone-types.mts +0 -115
- package/src/witness/keystone/math-keystone/math-keystone-v1.mts +0 -139
- package/src/witness/keystone/math-keystone/math-keystone.respec.mts +0 -122
- package/src/witness/keystone/zkp-keystone/zkp-keystone-constants.mts +0 -0
- package/src/witness/keystone/zkp-keystone/zkp-keystone-helper.mts +0 -0
- package/src/witness/keystone/zkp-keystone/zkp-keystone-types.mts +0 -0
- package/src/witness/keystone/zkp-keystone/zkp-keystone-v1.mts +0 -0
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module keystone-types
|
|
3
|
-
*/
|
|
4
|
-
// import { IbGibSpaceOptionsData } from '@ibgib/core-gib/dist/witness/space/space-types.mjs';
|
|
5
|
-
import { GLOBAL_LOG_A_LOT } from '../../core-constants.mjs';
|
|
6
|
-
/**
|
|
7
|
-
* use for verbose logging.
|
|
8
|
-
*/
|
|
9
|
-
const logalot = GLOBAL_LOG_A_LOT;
|
|
10
|
-
/** Cmds for interacting with ibgib spaces. */
|
|
11
|
-
export const KeystoneCmd = {
|
|
12
|
-
/**
|
|
13
|
-
* it's more like a grunt that is intepreted by context from the robbot.
|
|
14
|
-
*
|
|
15
|
-
* my initial use of this will be to extend a keystone.
|
|
16
|
-
*/
|
|
17
|
-
ib: 'ib',
|
|
18
|
-
/**
|
|
19
|
-
* it's more like a grunt that is intepreted by context from the robbot.
|
|
20
|
-
*
|
|
21
|
-
* my initial use of this will be to validate a keystone.
|
|
22
|
-
*/
|
|
23
|
-
gib: 'gib',
|
|
24
|
-
/**
|
|
25
|
-
* third placeholder command.
|
|
26
|
-
*
|
|
27
|
-
* my initial use of this will be to finalize a keystone.
|
|
28
|
-
*/
|
|
29
|
-
ibgib: 'ibgib',
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Flags to affect the command's interpretation.
|
|
33
|
-
*/
|
|
34
|
-
export const KeystoneCmdModifier = {
|
|
35
|
-
/**
|
|
36
|
-
* If final, then the cmd will be the last of the stone.
|
|
37
|
-
*
|
|
38
|
-
* ## notes
|
|
39
|
-
*
|
|
40
|
-
* I think this may just signal the beginning of the end, there may actually
|
|
41
|
-
* technically be more commands executed by the witness. but they would be
|
|
42
|
-
* cleanup commands. the point is that after this option
|
|
43
|
-
*/
|
|
44
|
-
final: 'final',
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=keystone-types.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keystone-types.mjs","sourceRoot":"","sources":["../../../src/witness/keystone/keystone-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,8FAA8F;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;GAEG;AACH,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAuEjC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB;;;;OAIG;IACH,EAAE,EAAE,IAAmB;IACvB;;;;OAIG;IACH,GAAG,EAAE,KAAoB;IACzB;;;;OAIG;IACH,KAAK,EAAE,OAAsB;CAChC,CAAA;AAOD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B;;;;;;;;OAQG;IACH,KAAK,EAAE,OAA8B;CACxC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keystone.d.mts","sourceRoot":"","sources":["../../../src/witness/keystone/keystone.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keystone.mjs","sourceRoot":"","sources":["../../../src/witness/keystone/keystone.mts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* @module keystone.respec.mts
|
|
4
|
-
*
|
|
5
|
-
* @see {@link './math-keystone/math-keystone.respec.mts'}
|
|
6
|
-
*
|
|
7
|
-
* In order to test the keystone at the base class, you have to create a mock.
|
|
8
|
-
* I've gone ahead and made a simplistic keystone at ./math-keystone which acts
|
|
9
|
-
* as this base keystone test.
|
|
10
|
-
*/
|
|
11
|
-
//# sourceMappingURL=keystone.respec.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keystone.respec.d.mts","sourceRoot":"","sources":["../../../src/witness/keystone/keystone.respec.mts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* @module keystone.respec.mts
|
|
4
|
-
*
|
|
5
|
-
* @see {@link './math-keystone/math-keystone.respec.mts'}
|
|
6
|
-
*
|
|
7
|
-
* In order to test the keystone at the base class, you have to create a mock.
|
|
8
|
-
* I've gone ahead and made a simplistic keystone at ./math-keystone which acts
|
|
9
|
-
* as this base keystone test.
|
|
10
|
-
*/
|
|
11
|
-
//# sourceMappingURL=keystone.respec.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keystone.respec.mjs","sourceRoot":"","sources":["../../../src/witness/keystone/keystone.respec.mts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-constants.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-constants.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-constants.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-constants.mts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MathChallengeInfo, MathChallengeType } from "./math-keystone-types.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* creates a new simple math challenge. only does 'add' atow.
|
|
4
|
-
*
|
|
5
|
-
* @returns math challenge info
|
|
6
|
-
*/
|
|
7
|
-
export declare function getMathChallenge({ challengeType, }: {
|
|
8
|
-
/**
|
|
9
|
-
* If provided, will create this type of challenge.
|
|
10
|
-
*/
|
|
11
|
-
challengeType?: MathChallengeType;
|
|
12
|
-
}): Promise<MathChallengeInfo>;
|
|
13
|
-
//# sourceMappingURL=math-keystone-helper.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-helper.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-helper.mts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAAE,iBAAiB,EACvC,MAAM,2BAA2B,CAAC;AAQnC;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,EACnC,aAAa,GAChB,EAAE;IACC;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACrC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsB7B"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { GLOBAL_LOG_A_LOT } from '../../../core-constants.mjs';
|
|
2
|
-
/**
|
|
3
|
-
* use for verbose logging.
|
|
4
|
-
*/
|
|
5
|
-
const logalot = GLOBAL_LOG_A_LOT;
|
|
6
|
-
/**
|
|
7
|
-
* creates a new simple math challenge. only does 'add' atow.
|
|
8
|
-
*
|
|
9
|
-
* @returns math challenge info
|
|
10
|
-
*/
|
|
11
|
-
export async function getMathChallenge({ challengeType, }) {
|
|
12
|
-
const lc = `[${getMathChallenge.name}]`;
|
|
13
|
-
try {
|
|
14
|
-
if (logalot) {
|
|
15
|
-
console.log(`${lc} starting... (I: 75a805603968ca8a4b076caa2cf9bd23)`);
|
|
16
|
-
}
|
|
17
|
-
if (challengeType && challengeType !== 'add') {
|
|
18
|
-
throw new Error(`only 'add' implemented atow (E: 1e5bc2395395b8d48d61135b63a77923)`);
|
|
19
|
-
}
|
|
20
|
-
// add
|
|
21
|
-
const x = Math.ceil(Math.random() * 999999);
|
|
22
|
-
const y = Math.ceil(Math.random() * 999999);
|
|
23
|
-
const challenge = {
|
|
24
|
-
id: 'hmm',
|
|
25
|
-
op: 'add',
|
|
26
|
-
a: x,
|
|
27
|
-
b: y,
|
|
28
|
-
};
|
|
29
|
-
return challenge;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
console.error(`${lc} ${error.message}`);
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
finally {
|
|
36
|
-
if (logalot) {
|
|
37
|
-
console.log(`${lc} complete.`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=math-keystone-helper.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-helper.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-helper.mts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;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oneOptionsData, KeystoneOptionsRel8ns, KeystoneOptionsIbGib, KeystoneResultData, KeystoneResultRel8ns, KeystoneResultIbGib } from '../keystone-types.mjs';
|
|
6
|
-
export interface MathKeystoneData_V1 extends KeystoneData_V1<MathChallengeInfo[], MathSolutionInfo[]> {
|
|
7
|
-
challengeAtom: 'math';
|
|
8
|
-
}
|
|
9
|
-
export interface MathKeystoneRel8ns_V1 extends KeystoneRel8ns_V1 {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* needed? yagni?
|
|
13
|
-
*/
|
|
14
|
-
export interface MathKeystoneAddlMetadata {
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* keystone for math problem challenges.
|
|
18
|
-
*
|
|
19
|
-
* I'm using this largely as a test implementation, which both gives me a chance
|
|
20
|
-
* to futz around and learn, as well as help corroborate that unit tests are
|
|
21
|
-
* properly scoped.
|
|
22
|
-
*/
|
|
23
|
-
export interface MathKeystoneIbGib_V1<MathKeystoneData_V1 extends IbGibData_V1, MathKeystoneRel8ns_V1 extends IbGibRel8ns_V1> extends IbGib_V1<MathKeystoneData_V1, MathKeystoneRel8ns_V1> {
|
|
24
|
-
}
|
|
25
|
-
export interface MathKeystoneOptionsData extends KeystoneOptionsData {
|
|
26
|
-
}
|
|
27
|
-
export interface MathKeystoneOptionsRel8ns extends KeystoneOptionsRel8ns {
|
|
28
|
-
}
|
|
29
|
-
export interface MathKeystoneOptionsIbGib extends KeystoneOptionsIbGib {
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @see {@link WitnessResultData}
|
|
33
|
-
*/
|
|
34
|
-
export interface MathKeystoneResultData extends KeystoneResultData {
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
*/
|
|
38
|
-
export interface MathKeystoneResultRel8ns extends KeystoneResultRel8ns {
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Shape of result ibgib if used for a robbot.
|
|
42
|
-
*
|
|
43
|
-
* I'm not sure what to do with this atm, so I'm just stubbing out...
|
|
44
|
-
*/
|
|
45
|
-
export interface MathKeystoneResultIbGib extends KeystoneResultIbGib<IbGib_V1, MathKeystoneResultData, MathKeystoneResultRel8ns> {
|
|
46
|
-
}
|
|
47
|
-
export type MathChallengeOperation = 'add' | 'subtract';
|
|
48
|
-
/**
|
|
49
|
-
* info about our (simple atow) math challenge.
|
|
50
|
-
*/
|
|
51
|
-
export interface MathChallengeInfo {
|
|
52
|
-
/**
|
|
53
|
-
* operation to be performed on number's `a` and `b`.
|
|
54
|
-
*/
|
|
55
|
-
op: MathChallengeOperation;
|
|
56
|
-
/**
|
|
57
|
-
* id of the challenge
|
|
58
|
-
*/
|
|
59
|
-
id: string;
|
|
60
|
-
/**
|
|
61
|
-
* left hand side of math challenge expression.
|
|
62
|
-
*/
|
|
63
|
-
a: number;
|
|
64
|
-
/**
|
|
65
|
-
* right hande side of math challenge expression.
|
|
66
|
-
*/
|
|
67
|
-
b: number;
|
|
68
|
-
}
|
|
69
|
-
export interface MathChallengeInfo_Add extends MathChallengeInfo {
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* info about our (simple atow) math challenge's solution.
|
|
73
|
-
*/
|
|
74
|
-
export interface MathSolutionInfo {
|
|
75
|
-
challengeId: string;
|
|
76
|
-
solution: number;
|
|
77
|
-
}
|
|
78
|
-
export interface MathChallengeType {
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=math-keystone-types.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-types.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAGzF,OAAO,EACH,eAAe,EAAE,iBAAiB,EAClC,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAChE,kBAAkB,EAAE,oB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AiB;CAEjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-types.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D;;GAEG;AACH,MAAM,OAAO,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { MathKeystoneOptionsData, MathKeystoneOptionsIbGib, MathKeystoneOptionsRel8ns, MathKeystoneResultData, MathKeystoneResultIbGib, MathKeystoneResultRel8ns, MathKeystoneData_V1, MathKeystoneRel8ns_V1, MathChallengeInfo, MathSolutionInfo } from "./math-keystone-types.mjs";
|
|
2
|
-
import { KeystoneBase_V1 } from "../keystone-base-v1.mjs";
|
|
3
|
-
/**
|
|
4
|
-
* witness for keystones that have math problems as the challenges.
|
|
5
|
-
*
|
|
6
|
-
* @see {@link MathKeystoneIbGib_V1}
|
|
7
|
-
*/
|
|
8
|
-
export declare class MathKeystoneWitness_V1 extends KeystoneBase_V1<MathChallengeInfo[], MathSolutionInfo[], MathKeystoneOptionsData, MathKeystoneOptionsRel8ns, MathKeystoneOptionsIbGib, MathKeystoneResultData, MathKeystoneResultRel8ns, MathKeystoneResultIbGib, MathKeystoneData_V1, MathKeystoneRel8ns_V1> {
|
|
9
|
-
protected parseAddlMetadataString<TParseResult>({ ib }: {
|
|
10
|
-
ib: string;
|
|
11
|
-
}): TParseResult;
|
|
12
|
-
/**
|
|
13
|
-
* this is the primary command handler when extending a keystone, i.e. when
|
|
14
|
-
* signing some payload.
|
|
15
|
-
*/
|
|
16
|
-
protected extend({ arg, }: {
|
|
17
|
-
arg: MathKeystoneOptionsIbGib;
|
|
18
|
-
}): Promise<MathKeystoneResultIbGib>;
|
|
19
|
-
/**
|
|
20
|
-
* chooses the next challenge infos in order to extend the keystone
|
|
21
|
-
* timeline.
|
|
22
|
-
*/
|
|
23
|
-
getNextChallenges({ arg, }: {
|
|
24
|
-
arg: MathKeystoneOptionsIbGib;
|
|
25
|
-
}): Promise<MathChallengeInfo[]>;
|
|
26
|
-
getNextSolutions({ arg, nextChallenges, }: {
|
|
27
|
-
arg: MathKeystoneOptionsIbGib;
|
|
28
|
-
nextChallenges: MathChallengeInfo[];
|
|
29
|
-
}): Promise<MathSolutionInfo[]>;
|
|
30
|
-
validateNextSolutions({ arg, }: {
|
|
31
|
-
arg: MathKeystoneOptionsIbGib;
|
|
32
|
-
}): Promise<string[]>;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=math-keystone-v1.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-v1.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-v1.mts"],"names":[],"mappings":"AAEA,OAAO,EACH,uBAAuB,EAAE,wBAAwB,EAAE,yBAAyB,EAC5E,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EACzE,mBAAmB,EAAE,qBAAqB,EAE1C,iBAAiB,EAAE,gBAAgB,EACtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAK1D;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,eAAe,CACvD,iBAAiB,EAAE,EAAE,gBAAgB,EAAE,EACvC,uBAAuB,EAAE,yBAAyB,EAAE,wBAAwB,EAC5E,sBAAsB,EAAE,wBAAwB,EAAE,uBAAuB,EACzE,mBAAmB,EAAE,qBAAqB,CAAC;IAE3C,SAAS,CAAC,uBAAuB,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;KAAE,GAAG,YAAY;IActF;;;OAGG;cACa,MAAM,CAAC,EACnB,GAAG,GACN,EAAE;QACC,GAAG,EAAE,wBAAwB,CAAC;KACjC,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA6BpC;;;OAGG;IACG,iBAAiB,CAAC,EACpB,GAAG,GACN,EAAE;QACC,GAAG,EAAE,wBAAwB,CAAC;KACjC,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAe1B,gBAAgB,CAAC,EACnB,GAAG,EACH,cAAc,GACjB,EAAE;QACC,GAAG,EAAE,wBAAwB,CAAC;QAC9B,cAAc,EAAE,iBAAiB,EAAE,CAAC;KACvC,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAczB,qBAAqB,CAAC,EACxB,GAAG,GACN,EAAE;QACC,GAAG,EAAE,wBAAwB,CAAC;KACjC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAexB"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { KeystoneBase_V1 } from "../keystone-base-v1.mjs";
|
|
2
|
-
import { GLOBAL_LOG_A_LOT } from '../../../core-constants.mjs';
|
|
3
|
-
const logalot = GLOBAL_LOG_A_LOT;
|
|
4
|
-
/**
|
|
5
|
-
* witness for keystones that have math problems as the challenges.
|
|
6
|
-
*
|
|
7
|
-
* @see {@link MathKeystoneIbGib_V1}
|
|
8
|
-
*/
|
|
9
|
-
export class MathKeystoneWitness_V1 extends KeystoneBase_V1 {
|
|
10
|
-
parseAddlMetadataString({ ib }) {
|
|
11
|
-
// const addlMetadataText = `${atom}_${classnameIsh}_${nameIsh}_${idIsh}`;
|
|
12
|
-
if (!ib) {
|
|
13
|
-
throw new Error(`ib required (E: f3883d3ce90c4c15907dffa1c46e77d6)`);
|
|
14
|
-
}
|
|
15
|
-
const lc = `[${this.parseAddlMetadataString.name}]`;
|
|
16
|
-
try {
|
|
17
|
-
const [atom, classnameIsh, nameIsh, idIsh] = ib.split('_');
|
|
18
|
-
const result = { atom, classnameIsh, nameIsh, idIsh, };
|
|
19
|
-
return result; // i'm not liking the TParseResult...hmm
|
|
20
|
-
}
|
|
21
|
-
catch (error) {
|
|
22
|
-
console.error(`${lc} ${error.message}`);
|
|
23
|
-
throw error;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* this is the primary command handler when extending a keystone, i.e. when
|
|
28
|
-
* signing some payload.
|
|
29
|
-
*/
|
|
30
|
-
async extend({ arg, }) {
|
|
31
|
-
const lc = `${this.lc}[${this.extend.name}]`;
|
|
32
|
-
try {
|
|
33
|
-
if (logalot) {
|
|
34
|
-
console.log(`${lc} starting...`);
|
|
35
|
-
}
|
|
36
|
-
// 1 .look at the specs for the keystone
|
|
37
|
-
// 2. determine requirements for keystone extension
|
|
38
|
-
// * for now, this is just the default (i.e. we skip these steps)
|
|
39
|
-
let nextChallenges = await this.getNextChallenges({ arg });
|
|
40
|
-
// get the next challenges to solve
|
|
41
|
-
// prompt user (if required) solve challenges
|
|
42
|
-
let nextSolutions = await this.getNextSolutions({ arg, nextChallenges });
|
|
43
|
-
throw new Error(`not impl (E: 470834fb2562dd33b49b8ec6c9be9423)`);
|
|
44
|
-
// validate nextSolutions
|
|
45
|
-
// await this.validateNextSolutions({ arg, nextChallenges, nextSolutions });
|
|
46
|
-
// perform keystone graph extension
|
|
47
|
-
// now that we have solutions
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
console.error(`${lc} ${error.message}`);
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
finally {
|
|
54
|
-
if (logalot) {
|
|
55
|
-
console.log(`${lc} complete.`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* chooses the next challenge infos in order to extend the keystone
|
|
61
|
-
* timeline.
|
|
62
|
-
*/
|
|
63
|
-
async getNextChallenges({ arg, }) {
|
|
64
|
-
const lc = `${this.lc}[${this.getNextChallenges.name}]`;
|
|
65
|
-
try {
|
|
66
|
-
if (logalot) {
|
|
67
|
-
console.log(`${lc} starting... (I: e5cf6a884a093eddc1f297b2a63dd123)`);
|
|
68
|
-
}
|
|
69
|
-
throw new Error(`not impl (E: 602bdd6bfa38db5acbd798e60c861623)`);
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
console.error(`${lc} ${error.message}`);
|
|
73
|
-
throw error;
|
|
74
|
-
}
|
|
75
|
-
finally {
|
|
76
|
-
if (logalot) {
|
|
77
|
-
console.log(`${lc} complete.`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
async getNextSolutions({ arg, nextChallenges, }) {
|
|
82
|
-
const lc = `${this.lc}[${this.getNextSolutions.name}]`;
|
|
83
|
-
try {
|
|
84
|
-
if (logalot) {
|
|
85
|
-
console.log(`${lc} starting... (I: f77696f021a32ec474de3ebc2c7d7823)`);
|
|
86
|
-
}
|
|
87
|
-
throw new Error(`not impl (E: d727a9e378da4ddcb90d0be3a995daeb)`);
|
|
88
|
-
}
|
|
89
|
-
catch (error) {
|
|
90
|
-
console.error(`${lc} ${error.message}`);
|
|
91
|
-
throw error;
|
|
92
|
-
}
|
|
93
|
-
finally {
|
|
94
|
-
if (logalot) {
|
|
95
|
-
console.log(`${lc} complete.`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
async validateNextSolutions({ arg, }) {
|
|
100
|
-
const lc = `${this.lc}[${this.validateNextSolutions.name}]`;
|
|
101
|
-
let errors = [];
|
|
102
|
-
try {
|
|
103
|
-
if (logalot) {
|
|
104
|
-
console.log(`${lc} starting... (I: 49fda11783ede527b64bf20e8a9feb23)`);
|
|
105
|
-
}
|
|
106
|
-
throw new Error(`not impl (E: 5407f3d0b3d9729ee361a64cd411ea23)`);
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
console.error(`${lc} ${error.message}`);
|
|
110
|
-
throw error;
|
|
111
|
-
}
|
|
112
|
-
finally {
|
|
113
|
-
if (logalot) {
|
|
114
|
-
console.log(`${lc} complete.`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
//# sourceMappingURL=math-keystone-v1.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone-v1.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone-v1.mts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAEjC;;;;GAIG;AACH,MAAM,OAAO,sBAAuB,SAAQ,eAIG;IAEjC,uBAAuB,CAAe,EAAE,EAAE,EAAmB;QACnE,0EAA0E;QAC1E,IAAI,CAAC,EAAE,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;SAAE;QAClF,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,uBAAuB,CAAC,IAAI,GAAG,CAAC;QACpD,IAAI;YACA,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC3D,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,GAA+B,CAAC;YACnF,OAAO,MAAsB,CAAC,CAAC,wCAAwC;SAC1E;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxC,MAAM,KAAK,CAAC;SACf;IACL,CAAC;IAED;;;OAGG;IACO,KAAK,CAAC,MAAM,CAAC,EACnB,GAAG,GAGN;QACG,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;QAC7C,IAAI;YACA,IAAI,OAAO,EAAE;gBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;a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types.mjs';
|
|
2
|
-
import { IbGibKeystoneAny } from '../keystone-base-v1.mjs';
|
|
3
|
-
export declare function createKeystone(): Promise<IbGibKeystoneAny>;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @returns validation error if any, else returns null
|
|
7
|
-
*/
|
|
8
|
-
export declare function validateKeystone({ keystoneLatest, }: {
|
|
9
|
-
/**
|
|
10
|
-
* the latest (i.e. "head") keystone in the keystone's timeline.
|
|
11
|
-
*/
|
|
12
|
-
keystoneLatest?: IbGibKeystoneAny;
|
|
13
|
-
/**
|
|
14
|
-
* keystones are a graph, and the idea is
|
|
15
|
-
*/
|
|
16
|
-
dependencyGraph?: {
|
|
17
|
-
[addr: string]: IbGib_V1;
|
|
18
|
-
};
|
|
19
|
-
}): Promise<string[] | null>;
|
|
20
|
-
//# sourceMappingURL=math-keystone.respec.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone.respec.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone.respec.mts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAwB3D,wBAAsB,cAAc,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAahE;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,EACnC,cAAc,GACjB,EAAE;IACC;;OAEG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC;;OAEG;IACH,eAAe,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,CAAC;CAClD,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAQ3B"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import * as pathUtils from 'path';
|
|
2
|
-
import { ifWe, respecfully, } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
|
|
3
|
-
const maam = `[${import.meta.url}]`, sir = maam;
|
|
4
|
-
import { GLOBAL_LOG_A_LOT } from '../../../core-constants.mjs';
|
|
5
|
-
import { WitnessWithContextBase_V1 } from '../../witness-with-context/witness-with-context-base-v1.mjs';
|
|
6
|
-
const logalot = GLOBAL_LOG_A_LOT;
|
|
7
|
-
const lcFile = `[${pathUtils.basename(import.meta.url)}]`;
|
|
8
|
-
export async function createKeystone() {
|
|
9
|
-
const lc = `[${createKeystone.name}]`;
|
|
10
|
-
try {
|
|
11
|
-
if (logalot) {
|
|
12
|
-
console.log(`${lc} starting... (I: ba9c092ad0b19a7fd1c5d98fb27b5923)`);
|
|
13
|
-
}
|
|
14
|
-
throw new Error(`not impl (E: db37bc8b249841397316812a006bc223)`);
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
console.error(`${lc} ${error.message}`);
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
finally {
|
|
21
|
-
if (logalot) {
|
|
22
|
-
console.log(`${lc} complete.`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @returns validation error if any, else returns null
|
|
29
|
-
*/
|
|
30
|
-
export async function validateKeystone({ keystoneLatest, }) {
|
|
31
|
-
const lc = `[${validateKeystone.name}]`;
|
|
32
|
-
try {
|
|
33
|
-
throw new Error(`not imple yet (E: 2a80e8b2e6934b10a27df67395402c29)`);
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
console.error(`${lc} ${error.message}`);
|
|
37
|
-
throw error;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
// #endregion math mock/test helper functions/types
|
|
41
|
-
/**
|
|
42
|
-
* witness for keystones that have math problems as the challenges.
|
|
43
|
-
*/
|
|
44
|
-
class MathKeystoneWitness_V1 extends WitnessWithContextBase_V1 {
|
|
45
|
-
parseAddlMetadataString({ ib }) {
|
|
46
|
-
// const addlMetadataText = `${atom}_${classnameIsh}_${nameIsh}_${idIsh}`;
|
|
47
|
-
if (!ib) {
|
|
48
|
-
throw new Error(`ib required (E: f3883d3ce90c4c15907dffa1c46e77d6)`);
|
|
49
|
-
}
|
|
50
|
-
const lc = `[${this.parseAddlMetadataString.name}]`;
|
|
51
|
-
try {
|
|
52
|
-
const [atom, classnameIsh, nameIsh, idIsh] = ib.split('_');
|
|
53
|
-
const result = { atom, classnameIsh, nameIsh, idIsh, };
|
|
54
|
-
return result; // i'm not liking the TParseResult...hmm
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
console.error(`${lc} ${error.message}`);
|
|
58
|
-
throw error;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
witnessImpl(arg) {
|
|
62
|
-
throw new Error('Method not implemented.');
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
await respecfully(maam, lcFile, async () => {
|
|
66
|
-
let lc = lcFile.concat();
|
|
67
|
-
await respecfully(maam, `simple keystones (not composite)`, async () => {
|
|
68
|
-
await ifWe(maam, `createKeystone`, async () => {
|
|
69
|
-
});
|
|
70
|
-
await ifWe(maam, `validateKeystone`, async () => { });
|
|
71
|
-
await ifWe(maam, `iterateKeystone`, async () => { });
|
|
72
|
-
await ifWe(maam, `createKeystoneChallenge`, async () => { });
|
|
73
|
-
await ifWe(maam, `createKeystoneChallenge`, async () => { });
|
|
74
|
-
});
|
|
75
|
-
}, { logalot: !!logalot });
|
|
76
|
-
//# sourceMappingURL=math-keystone.respec.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math-keystone.respec.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/math-keystone/math-keystone.respec.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,MAAM,CAAC;AAElC,OAAO,EACsB,IAAI,EACN,WAAW,GACrC,MAAM,kDAAkD,CAAC;AAC1D,MAAM,IAAI,GAAG,IAAI,MA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BAAyB,EAAE,KAAK,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;QAC7D,MAAM,IAAI,CAAC,IAAI,EAAE,yBAAyB,EAAE,KAAK,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IAEjE,CAAC,CAAC,CAAC;AAEP,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-constants.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-constants.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-constants.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-constants.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-helper.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-helper.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-helper.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-helper.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-types.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-types.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-types.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-types.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-v1.d.mts","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-v1.mts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zkp-keystone-v1.mjs","sourceRoot":"","sources":["../../../../src/witness/keystone/zkp-keystone/zkp-keystone-v1.mts"],"names":[],"mappings":""}
|