@ibgib/core-gib 0.1.2 → 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/common/other/other-helper.respec.mjs +1 -1
- package/dist/common/other/other-helper.respec.mjs.map +1 -1
- package/dist/common/pubsub/observable/observable-helper.mjs +1 -1
- package/dist/common/pubsub/observable/observable-helper.mjs.map +1 -1
- package/dist/common/pubsub/subject/subject-helper.mjs +1 -1
- package/dist/common/pubsub/subject/subject-helper.mjs.map +1 -1
- package/dist/common/pubsub/subscription/subscription-helper.mjs +1 -1
- package/dist/common/pubsub/subscription/subscription-helper.mjs.map +1 -1
- 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/dist/witness/space/space-helper.mjs +1 -1
- package/dist/witness/space/space-helper.mjs.map +1 -1
- package/package.json +4 -4
- package/src/common/other/other-helper.respec.mts +1 -1
- package/src/common/pubsub/observable/observable-helper.mts +1 -1
- package/src/common/pubsub/subject/subject-helper.mts +1 -1
- package/src/common/pubsub/subscription/subscription-helper.mts +1 -1
- package/src/witness/space/inner-space/inner-space-v1.respec.mts +4 -6
- package/src/witness/space/space-helper.mts +1 -1
- 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,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":[],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;YACA,IAAI,OAAO,EAAE;gBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,oDAAoD,CAAC,CAAC;aAAE;YAExF,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACrE;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxC,MAAM,KAAK,CAAC;SACf;gBAAS;YACN,IAAI,OAAO,EAAE;gBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;aAAE;SACnD;IACL,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,EACxB,GAAG,GAGN;QACG,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,qBAAqB,CAAC,IAAI,GAAG,CAAC;QAC5D,IAAI,MAAM,GAAa,EAAE,CAAC;QAC1B,IAAI;YACA,IAAI,OAAO,EAAE;gBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,oDAAoD,CAAC,CAAC;aAAE;YAExF,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SAErE;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxC,MAAM,KAAK,CAAC;SACf;gBAAS;YACN,IAAI,OAAO,EAAE;gBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;aAAE;SACnD;IACL,CAAC;CACJ"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/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,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;AAQhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EA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;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":""}
|