@degenerate/sharedata 0.4.0 → 0.7.0
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/library/apply-library-function-transaction.d.ts +60 -0
- package/dist/library/apply-library-function-transaction.d.ts.map +1 -0
- package/dist/library/apply-library-function-transaction.js +73 -0
- package/dist/manager/share-data-manager.d.ts +6 -2
- package/dist/manager/share-data-manager.d.ts.map +1 -1
- package/dist/manager/share-data-manager.js +7 -3
- package/dist/persistence/deserialize-share-data.d.ts +8 -1
- package/dist/persistence/deserialize-share-data.d.ts.map +1 -1
- package/dist/persistence/deserialize-share-data.js +14 -2
- package/dist/persistence/file-share-data-repository.d.ts +8 -2
- package/dist/persistence/file-share-data-repository.d.ts.map +1 -1
- package/dist/persistence/file-share-data-repository.js +9 -3
- package/dist/persistence/firestore-share-data-repository.d.ts +3 -2
- package/dist/persistence/firestore-share-data-repository.d.ts.map +1 -1
- package/dist/persistence/firestore-share-data-repository.js +4 -3
- package/dist/persistence/in-memory-share-data-repository.d.ts +8 -1
- package/dist/persistence/in-memory-share-data-repository.d.ts.map +1 -1
- package/dist/persistence/in-memory-share-data-repository.js +9 -3
- package/dist/share-data/creation/create-share-data-initial-crypto.d.ts +4 -5
- package/dist/share-data/creation/create-share-data-initial-crypto.d.ts.map +1 -1
- package/dist/share-data/creation/create-share-data-initial-crypto.js +6 -7
- package/dist/share-data/helpers/config/default-share-data-string.config.d.ts.map +1 -1
- package/dist/share-data/helpers/config/default-share-data-string.config.js +5 -0
- package/dist/share-data/proofs/creation/build-transaction-proposal-signer.d.ts +5 -10
- package/dist/share-data/proofs/creation/build-transaction-proposal-signer.d.ts.map +1 -1
- package/dist/share-data/proofs/creation/build-transaction-proposal-signer.js +1 -3
- package/dist/share-data/proofs/creation/create-share-data-proposal-proof.d.ts +3 -4
- package/dist/share-data/proofs/creation/create-share-data-proposal-proof.d.ts.map +1 -1
- package/dist/share-data/proofs/creation/create-share-data-proposal-proof.js +5 -6
- package/dist/share-data/proofs/creation/create-transaction-proposal-proof.d.ts +3 -4
- package/dist/share-data/proofs/creation/create-transaction-proposal-proof.d.ts.map +1 -1
- package/dist/share-data/proofs/creation/create-transaction-proposal-proof.js +5 -6
- package/dist/share-data/proofs/testing/test-proof-signer.d.ts +8 -8
- package/dist/share-data/proofs/testing/test-proof-signer.d.ts.map +1 -1
- package/dist/share-data/proofs/testing/test-proof-signer.js +17 -19
- package/dist/share-data/proofs/verification/verify-share-data-proposal-proof.d.ts +4 -6
- package/dist/share-data/proofs/verification/verify-share-data-proposal-proof.d.ts.map +1 -1
- package/dist/share-data/proofs/verification/verify-share-data-proposal-proof.js +8 -57
- package/dist/share-data/proofs/verification/verify-transaction-proposal-proof.d.ts +4 -4
- package/dist/share-data/proofs/verification/verify-transaction-proposal-proof.d.ts.map +1 -1
- package/dist/share-data/proofs/verification/verify-transaction-proposal-proof.js +8 -54
- package/dist/share-data/share-data.d.ts +41 -7
- package/dist/share-data/share-data.d.ts.map +1 -1
- package/dist/share-data/share-data.js +93 -11
- package/package.json +4 -4
|
@@ -7,23 +7,22 @@ const get_previous_hash_from_share_data_1 = require("../helpers/get-previous-has
|
|
|
7
7
|
const create_share_data_string_to_sign_1 = require("../helpers/create-share-data-string-to-sign");
|
|
8
8
|
/**
|
|
9
9
|
* This function creates a share data proposal proof.
|
|
10
|
-
* @param privateKey the
|
|
10
|
+
* @param privateKey the 32-byte Ed25519 secret seed (hex) to sign the proof with
|
|
11
11
|
* @param shareData the share data object
|
|
12
12
|
* @param additionalValuesToInclude the additional values to include in the share data string
|
|
13
|
-
* @param ellipticalCurve the elliptical curve to use for signing
|
|
14
13
|
* @returns
|
|
15
14
|
*/
|
|
16
|
-
const createShareDataProposalProof = (privateKey, shareData, additionalValuesToInclude
|
|
17
|
-
const
|
|
15
|
+
const createShareDataProposalProof = (privateKey, shareData, additionalValuesToInclude) => {
|
|
16
|
+
const publicKey = (0, generic_1.getEd25519PublicKeyFromPrivateKey)(privateKey);
|
|
18
17
|
const shareDataString = (0, calculate_share_data_string_1.calculateShareDataString)(shareData, undefined, additionalValuesToInclude);
|
|
19
18
|
const shareDataPreviousHash = (0, get_previous_hash_from_share_data_1.getPreviousHashFromShareData)(shareData);
|
|
20
19
|
const shareDataHash = (0, generic_1.calculateHash)(shareDataString);
|
|
21
20
|
const currentTimestamp = Date.now();
|
|
22
21
|
// calculate the current signature for the share data proof
|
|
23
22
|
const shareDataSignatureString = (0, create_share_data_string_to_sign_1.createShareDataStringToSign)(shareDataHash, shareDataPreviousHash, currentTimestamp);
|
|
24
|
-
const shareDataSignature = (0, generic_1.
|
|
23
|
+
const shareDataSignature = (0, generic_1.createEd25519Signature)(privateKey, shareDataSignatureString);
|
|
25
24
|
const shareDataCryptoProof = {
|
|
26
|
-
publicKey
|
|
25
|
+
publicKey,
|
|
27
26
|
shareDataHash,
|
|
28
27
|
shareDataPreviousHash,
|
|
29
28
|
shareDataSignature,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IShareData, IShareDataCryptoProof } from '@degenerate/generic';
|
|
2
2
|
import { ShareData } from '../../share-data';
|
|
3
3
|
/**
|
|
4
4
|
* Mint a transaction proposal proof: a signed attestation that the holder of
|
|
@@ -17,11 +17,10 @@ import { ShareData } from '../../share-data';
|
|
|
17
17
|
* state it is handed at apply time, so it never needs to be stored in the
|
|
18
18
|
* proof — keeping the wire / persistence / history shape unchanged.
|
|
19
19
|
*
|
|
20
|
-
* @param privateKey
|
|
20
|
+
* @param privateKey 32-byte Ed25519 secret seed (hex) authorized for this share-data
|
|
21
21
|
* @param shareData the share-data the transaction will mutate
|
|
22
22
|
* @param proposedState the exact state the function proposes to apply
|
|
23
23
|
* @param functionId stable id of the function producing `proposedState`
|
|
24
|
-
* @param ellipticalCurve the signing curve (defaults to Curve25519)
|
|
25
24
|
*/
|
|
26
|
-
export declare const createTransactionProposalProof: (privateKey: string, shareData: ShareData, proposedState: IShareData, functionId: string
|
|
25
|
+
export declare const createTransactionProposalProof: (privateKey: string, shareData: ShareData, proposedState: IShareData, functionId: string) => IShareDataCryptoProof;
|
|
27
26
|
//# sourceMappingURL=create-transaction-proposal-proof.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-transaction-proposal-proof.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/creation/create-transaction-proposal-proof.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,
|
|
1
|
+
{"version":3,"file":"create-transaction-proposal-proof.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/creation/create-transaction-proposal-proof.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,UAAU,EACV,qBAAqB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,8BAA8B,GACvC,YAAY,MAAM,EAClB,WAAW,SAAS,EACpB,eAAe,UAAU,EACzB,YAAY,MAAM,KACnB,qBAkCF,CAAC"}
|
|
@@ -23,17 +23,16 @@ const hash_proposed_state_1 = require("../helpers/hash-proposed-state");
|
|
|
23
23
|
* state it is handed at apply time, so it never needs to be stored in the
|
|
24
24
|
* proof — keeping the wire / persistence / history shape unchanged.
|
|
25
25
|
*
|
|
26
|
-
* @param privateKey
|
|
26
|
+
* @param privateKey 32-byte Ed25519 secret seed (hex) authorized for this share-data
|
|
27
27
|
* @param shareData the share-data the transaction will mutate
|
|
28
28
|
* @param proposedState the exact state the function proposes to apply
|
|
29
29
|
* @param functionId stable id of the function producing `proposedState`
|
|
30
|
-
* @param ellipticalCurve the signing curve (defaults to Curve25519)
|
|
31
30
|
*/
|
|
32
|
-
const createTransactionProposalProof = (privateKey, shareData, proposedState, functionId
|
|
31
|
+
const createTransactionProposalProof = (privateKey, shareData, proposedState, functionId) => {
|
|
33
32
|
if (typeof functionId !== 'string' || functionId.length < 1) {
|
|
34
33
|
throw new Error('createTransactionProposalProof: functionId is required and must be a non-empty string');
|
|
35
34
|
}
|
|
36
|
-
const
|
|
35
|
+
const publicKey = (0, generic_1.getEd25519PublicKeyFromPrivateKey)(privateKey);
|
|
37
36
|
// Current-state hash uses functionId as the purpose, mirroring how the
|
|
38
37
|
// verifier recomputes it from `proof.purpose`.
|
|
39
38
|
const currentString = (0, calculate_share_data_string_1.calculateShareDataString)(shareData, undefined, { purpose: functionId });
|
|
@@ -42,11 +41,11 @@ const createTransactionProposalProof = (privateKey, shareData, proposedState, fu
|
|
|
42
41
|
const previousHash = (0, get_previous_hash_from_share_data_1.getPreviousHashFromShareData)(shareData);
|
|
43
42
|
const timestamp = Date.now();
|
|
44
43
|
const signedString = (0, create_transaction_proposal_string_to_sign_1.createTransactionProposalStringToSign)(currentHash, proposedStateHash, functionId, previousHash, timestamp);
|
|
45
|
-
const signature = (0, generic_1.
|
|
44
|
+
const signature = (0, generic_1.createEd25519Signature)(privateKey, signedString);
|
|
46
45
|
// Field order mirrors IShareDataCryptoProofSchema exactly — load-bearing,
|
|
47
46
|
// see the schema docs in share-data-crypto-models.ts.
|
|
48
47
|
const proof = {
|
|
49
|
-
publicKey
|
|
48
|
+
publicKey,
|
|
50
49
|
shareDataHash: currentHash,
|
|
51
50
|
shareDataPreviousHash: previousHash,
|
|
52
51
|
shareDataSignature: signature,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IShareData, IShareDataCryptoProof } from '@degenerate/generic';
|
|
2
2
|
import { ShareData } from '../../share-data';
|
|
3
3
|
/**
|
|
4
|
-
* Generate a fresh
|
|
5
|
-
* in tests. Returns the hex-encoded private and public
|
|
6
|
-
* can use the public half as the ShareData's `creationPublicKey` and the
|
|
4
|
+
* Generate a fresh Ed25519 (EdDSA) keypair suitable for signing ShareData
|
|
5
|
+
* proofs in tests. Returns the hex-encoded private seed and public key so the
|
|
6
|
+
* caller can use the public half as the ShareData's `creationPublicKey` and the
|
|
7
7
|
* private half to mint real signed proofs.
|
|
8
8
|
*
|
|
9
9
|
* Test-only helper — not exported from the package barrel. Real signing
|
|
10
10
|
* keys must come from a key manager in production.
|
|
11
11
|
*/
|
|
12
|
-
export declare const generateTestSigningKey: (
|
|
12
|
+
export declare const generateTestSigningKey: () => {
|
|
13
13
|
privateKey: string;
|
|
14
14
|
publicKey: string;
|
|
15
15
|
};
|
|
@@ -24,7 +24,7 @@ export declare const generateTestSigningKey: (curve?: EllipticalCurvesSigning) =
|
|
|
24
24
|
* `buildEllipticalCurvesProofFor` from `@degenerate/shareblock` which
|
|
25
25
|
* handles the same plumbing through a documented public API.
|
|
26
26
|
*/
|
|
27
|
-
export declare const createTestProofFor: (privateKey: string
|
|
27
|
+
export declare const createTestProofFor: (privateKey: string) => (purpose: string, shareData: ShareData) => IShareDataCryptoProof;
|
|
28
28
|
/**
|
|
29
29
|
* Build a `(proposedState, functionId, shareData) => IShareDataCryptoProof`
|
|
30
30
|
* callback that mints a *transaction* proposal proof (binds the proposed
|
|
@@ -36,7 +36,7 @@ export declare const createTestProofFor: (privateKey: string, curve?: Elliptical
|
|
|
36
36
|
*
|
|
37
37
|
* Test-only helper. Production flows mint these from a key manager.
|
|
38
38
|
*/
|
|
39
|
-
export declare const createTestTransactionProofFor: (privateKey: string
|
|
39
|
+
export declare const createTestTransactionProofFor: (privateKey: string) => (proposedState: IShareData, functionId: string, shareData: ShareData) => IShareDataCryptoProof;
|
|
40
40
|
/**
|
|
41
41
|
* Convenience wrapper: generate a fresh signing keypair AND return a
|
|
42
42
|
* matching proof signer in one call. Returns both so the test can use the
|
|
@@ -44,7 +44,7 @@ export declare const createTestTransactionProofFor: (privateKey: string, curve?:
|
|
|
44
44
|
* structural proofs (addFunction/addRule); `transactionProofFor` mints
|
|
45
45
|
* runtime transaction proposal proofs.
|
|
46
46
|
*/
|
|
47
|
-
export declare const generateTestSigner: (
|
|
47
|
+
export declare const generateTestSigner: () => {
|
|
48
48
|
privateKey: string;
|
|
49
49
|
publicKey: string;
|
|
50
50
|
proofFor: ReturnType<typeof createTestProofFor>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-proof-signer.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/testing/test-proof-signer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-proof-signer.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/testing/test-proof-signer.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,UAAU,EACV,qBAAqB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,QAAO;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAMhF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,MACzC,SAAS,MAAM,EAAE,WAAW,SAAS,KAAG,qBAOnD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,GAAI,YAAY,MAAM,MAExD,eAAe,UAAU,EACzB,YAAY,MAAM,EAClB,WAAW,SAAS,KACrB,qBAEN,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,QAAO;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAChD,mBAAmB,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;CASzE,CAAC"}
|
|
@@ -34,27 +34,25 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.generateTestSigner = exports.createTestTransactionProofFor = exports.createTestProofFor = exports.generateTestSigningKey = void 0;
|
|
37
|
-
|
|
38
|
-
const elliptic = __importStar(require("elliptic"));
|
|
37
|
+
const crypto = __importStar(require("crypto"));
|
|
39
38
|
const generic_1 = require("@degenerate/generic");
|
|
40
39
|
const create_share_data_initial_crypto_1 = require("../../creation/create-share-data-initial-crypto");
|
|
41
40
|
const create_share_data_proposal_proof_1 = require("../creation/create-share-data-proposal-proof");
|
|
42
41
|
const create_transaction_proposal_proof_1 = require("../creation/create-transaction-proposal-proof");
|
|
43
42
|
/**
|
|
44
|
-
* Generate a fresh
|
|
45
|
-
* in tests. Returns the hex-encoded private and public
|
|
46
|
-
* can use the public half as the ShareData's `creationPublicKey` and the
|
|
43
|
+
* Generate a fresh Ed25519 (EdDSA) keypair suitable for signing ShareData
|
|
44
|
+
* proofs in tests. Returns the hex-encoded private seed and public key so the
|
|
45
|
+
* caller can use the public half as the ShareData's `creationPublicKey` and the
|
|
47
46
|
* private half to mint real signed proofs.
|
|
48
47
|
*
|
|
49
48
|
* Test-only helper — not exported from the package barrel. Real signing
|
|
50
49
|
* keys must come from a key manager in production.
|
|
51
50
|
*/
|
|
52
|
-
const generateTestSigningKey = (
|
|
53
|
-
const
|
|
54
|
-
const keyPair = ec.genKeyPair();
|
|
51
|
+
const generateTestSigningKey = () => {
|
|
52
|
+
const privateKey = crypto.randomBytes(32).toString('hex');
|
|
55
53
|
return {
|
|
56
|
-
privateKey
|
|
57
|
-
publicKey:
|
|
54
|
+
privateKey,
|
|
55
|
+
publicKey: (0, generic_1.getEd25519PublicKeyFromPrivateKey)(privateKey),
|
|
58
56
|
};
|
|
59
57
|
};
|
|
60
58
|
exports.generateTestSigningKey = generateTestSigningKey;
|
|
@@ -69,13 +67,13 @@ exports.generateTestSigningKey = generateTestSigningKey;
|
|
|
69
67
|
* `buildEllipticalCurvesProofFor` from `@degenerate/shareblock` which
|
|
70
68
|
* handles the same plumbing through a documented public API.
|
|
71
69
|
*/
|
|
72
|
-
const createTestProofFor = (privateKey
|
|
70
|
+
const createTestProofFor = (privateKey) => {
|
|
73
71
|
return (purpose, shareData) => {
|
|
74
72
|
if (!shareData.creationHash && shareData.structuralProofs.length === 0) {
|
|
75
|
-
const initialCrypto = (0, create_share_data_initial_crypto_1.createShareDataInitialCrypto)(privateKey, shareData
|
|
73
|
+
const initialCrypto = (0, create_share_data_initial_crypto_1.createShareDataInitialCrypto)(privateKey, shareData);
|
|
76
74
|
shareData.initializeCrypto(initialCrypto);
|
|
77
75
|
}
|
|
78
|
-
return (0, create_share_data_proposal_proof_1.createShareDataProposalProof)(privateKey, shareData, { purpose }
|
|
76
|
+
return (0, create_share_data_proposal_proof_1.createShareDataProposalProof)(privateKey, shareData, { purpose });
|
|
79
77
|
};
|
|
80
78
|
};
|
|
81
79
|
exports.createTestProofFor = createTestProofFor;
|
|
@@ -90,8 +88,8 @@ exports.createTestProofFor = createTestProofFor;
|
|
|
90
88
|
*
|
|
91
89
|
* Test-only helper. Production flows mint these from a key manager.
|
|
92
90
|
*/
|
|
93
|
-
const createTestTransactionProofFor = (privateKey
|
|
94
|
-
return (proposedState, functionId, shareData) => (0, create_transaction_proposal_proof_1.createTransactionProposalProof)(privateKey, shareData, proposedState, functionId
|
|
91
|
+
const createTestTransactionProofFor = (privateKey) => {
|
|
92
|
+
return (proposedState, functionId, shareData) => (0, create_transaction_proposal_proof_1.createTransactionProposalProof)(privateKey, shareData, proposedState, functionId);
|
|
95
93
|
};
|
|
96
94
|
exports.createTestTransactionProofFor = createTestTransactionProofFor;
|
|
97
95
|
/**
|
|
@@ -101,13 +99,13 @@ exports.createTestTransactionProofFor = createTestTransactionProofFor;
|
|
|
101
99
|
* structural proofs (addFunction/addRule); `transactionProofFor` mints
|
|
102
100
|
* runtime transaction proposal proofs.
|
|
103
101
|
*/
|
|
104
|
-
const generateTestSigner = (
|
|
105
|
-
const { privateKey, publicKey } = (0, exports.generateTestSigningKey)(
|
|
102
|
+
const generateTestSigner = () => {
|
|
103
|
+
const { privateKey, publicKey } = (0, exports.generateTestSigningKey)();
|
|
106
104
|
return {
|
|
107
105
|
privateKey,
|
|
108
106
|
publicKey,
|
|
109
|
-
proofFor: (0, exports.createTestProofFor)(privateKey
|
|
110
|
-
transactionProofFor: (0, exports.createTestTransactionProofFor)(privateKey
|
|
107
|
+
proofFor: (0, exports.createTestProofFor)(privateKey),
|
|
108
|
+
transactionProofFor: (0, exports.createTestTransactionProofFor)(privateKey),
|
|
111
109
|
};
|
|
112
110
|
};
|
|
113
111
|
exports.generateTestSigner = generateTestSigner;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IShareDataCryptoProof } from '@degenerate/generic';
|
|
2
2
|
import { ShareData } from '../../share-data';
|
|
3
3
|
/**
|
|
4
4
|
* Verifies that an `IShareDataCryptoProof` is a faithful attestation of the
|
|
@@ -12,10 +12,8 @@ import { ShareData } from '../../share-data';
|
|
|
12
12
|
* requires the private key).
|
|
13
13
|
*
|
|
14
14
|
* Synchronous on purpose — `addFunction` / `addRule` are synchronous and we
|
|
15
|
-
* don't want to cascade-async every caller in the codebase.
|
|
16
|
-
* `
|
|
17
|
-
* project's existing `verifyCryptoSignatureByHash` wrapper is `async` only
|
|
18
|
-
* cosmetically.
|
|
15
|
+
* don't want to cascade-async every caller in the codebase. `@noble/ed25519`'s
|
|
16
|
+
* `verify` is itself synchronous (backed by a synchronous SHA-512 hook).
|
|
19
17
|
*
|
|
20
18
|
* Verification proceeds in this order:
|
|
21
19
|
* 1. Recompute the canonical share-data string + hash, folding in
|
|
@@ -36,5 +34,5 @@ import { ShareData } from '../../share-data';
|
|
|
36
34
|
* `(hash, previousHash, timestamp)` triple, not that the hash matches
|
|
37
35
|
* anything real.
|
|
38
36
|
*/
|
|
39
|
-
export declare const verifyShareDataProposalProof: (proof: IShareDataCryptoProof, shareData: ShareData
|
|
37
|
+
export declare const verifyShareDataProposalProof: (proof: IShareDataCryptoProof, shareData: ShareData) => true;
|
|
40
38
|
//# sourceMappingURL=verify-share-data-proposal-proof.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-share-data-proposal-proof.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/verification/verify-share-data-proposal-proof.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-share-data-proposal-proof.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/verification/verify-share-data-proposal-proof.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,qBAAqB,EAGxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,4BAA4B,GACrC,OAAO,qBAAqB,EAC5B,WAAW,SAAS,KACrB,IAwCF,CAAC"}
|
|
@@ -1,40 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.verifyShareDataProposalProof = void 0;
|
|
37
|
-
const elliptic = __importStar(require("elliptic"));
|
|
38
4
|
const generic_1 = require("@degenerate/generic");
|
|
39
5
|
const calculate_share_data_string_1 = require("../../helpers/calculate-share-data-string");
|
|
40
6
|
const get_previous_hash_from_share_data_1 = require("../helpers/get-previous-hash-from-share-data");
|
|
@@ -51,10 +17,8 @@ const create_share_data_string_to_sign_1 = require("../helpers/create-share-data
|
|
|
51
17
|
* requires the private key).
|
|
52
18
|
*
|
|
53
19
|
* Synchronous on purpose — `addFunction` / `addRule` are synchronous and we
|
|
54
|
-
* don't want to cascade-async every caller in the codebase.
|
|
55
|
-
* `
|
|
56
|
-
* project's existing `verifyCryptoSignatureByHash` wrapper is `async` only
|
|
57
|
-
* cosmetically.
|
|
20
|
+
* don't want to cascade-async every caller in the codebase. `@noble/ed25519`'s
|
|
21
|
+
* `verify` is itself synchronous (backed by a synchronous SHA-512 hook).
|
|
58
22
|
*
|
|
59
23
|
* Verification proceeds in this order:
|
|
60
24
|
* 1. Recompute the canonical share-data string + hash, folding in
|
|
@@ -75,7 +39,7 @@ const create_share_data_string_to_sign_1 = require("../helpers/create-share-data
|
|
|
75
39
|
* `(hash, previousHash, timestamp)` triple, not that the hash matches
|
|
76
40
|
* anything real.
|
|
77
41
|
*/
|
|
78
|
-
const verifyShareDataProposalProof = (proof, shareData
|
|
42
|
+
const verifyShareDataProposalProof = (proof, shareData) => {
|
|
79
43
|
// Step 1: hash of current state matches what the proof claims. The
|
|
80
44
|
// purpose comes from the proof itself, so a tampered purpose produces
|
|
81
45
|
// a different hash and gets caught here.
|
|
@@ -101,24 +65,11 @@ const verifyShareDataProposalProof = (proof, shareData, ellipticalCurve = generi
|
|
|
101
65
|
// Step 3: signature verifies against the proof's publicKey for the
|
|
102
66
|
// (now-validated) hash + previousHash + timestamp triple.
|
|
103
67
|
const signedString = (0, create_share_data_string_to_sign_1.createShareDataStringToSign)(proof.shareDataHash, proof.shareDataPreviousHash, proof.timestamp);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
// so the verifier sees the same fixed-size 256-bit digest the signer
|
|
110
|
-
// operated on. Without this, elliptic's ECDSA on ed25519 silently
|
|
111
|
-
// truncates inputs longer than ~253 bits and the signature stops
|
|
112
|
-
// binding the trailing bytes (timestamp, tail of previousHash).
|
|
113
|
-
const digest = (0, generic_1.calculateHash)(signedString);
|
|
114
|
-
signatureValid = key.verify(digest, proof.shareDataSignature);
|
|
115
|
-
}
|
|
116
|
-
catch {
|
|
117
|
-
// elliptic throws on malformed signature/key strings rather than
|
|
118
|
-
// returning false — normalize to a single rejection mode.
|
|
119
|
-
throw new generic_1.ShareDataStructuralProofFailedError(shareData.id);
|
|
120
|
-
}
|
|
121
|
-
if (!signatureValid) {
|
|
68
|
+
// EdDSA signs the message bytes directly (Ed25519 hashes internally with
|
|
69
|
+
// SHA-512), so no SHA-256 pre-hash here — the signer didn't pre-hash either.
|
|
70
|
+
// `verifyEd25519Signature` already normalizes malformed key/signature hex
|
|
71
|
+
// to a `false` return rather than throwing.
|
|
72
|
+
if (!(0, generic_1.verifyEd25519Signature)(proof.publicKey, signedString, proof.shareDataSignature)) {
|
|
122
73
|
throw new generic_1.ShareDataStructuralProofFailedError(shareData.id);
|
|
123
74
|
}
|
|
124
75
|
return true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IShareData, IShareDataCryptoProof } from '@degenerate/generic';
|
|
2
2
|
import { ShareData } from '../../share-data';
|
|
3
3
|
/**
|
|
4
4
|
* Verify a transaction proposal proof against the live `shareData` and the
|
|
@@ -30,8 +30,8 @@ import { ShareData } from '../../share-data';
|
|
|
30
30
|
* hash, a structural proof's signature can never satisfy this check — the two
|
|
31
31
|
* proof kinds are non-interchangeable.
|
|
32
32
|
*
|
|
33
|
-
* Synchronous to match the rest of the proof pipeline;
|
|
34
|
-
* is itself synchronous.
|
|
33
|
+
* Synchronous to match the rest of the proof pipeline; `@noble/ed25519`'s
|
|
34
|
+
* `verify` is itself synchronous.
|
|
35
35
|
*/
|
|
36
|
-
export declare const verifyTransactionProposalProof: (proof: IShareDataCryptoProof, shareData: ShareData, proposedState: IShareData
|
|
36
|
+
export declare const verifyTransactionProposalProof: (proof: IShareDataCryptoProof, shareData: ShareData, proposedState: IShareData) => true;
|
|
37
37
|
//# sourceMappingURL=verify-transaction-proposal-proof.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-transaction-proposal-proof.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/verification/verify-transaction-proposal-proof.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-transaction-proposal-proof.d.ts","sourceRoot":"","sources":["../../../../src/share-data/proofs/verification/verify-transaction-proposal-proof.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,UAAU,EACV,qBAAqB,EAGxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,8BAA8B,GACvC,OAAO,qBAAqB,EAC5B,WAAW,SAAS,EACpB,eAAe,UAAU,KAC1B,IA6CF,CAAC"}
|
|
@@ -1,40 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.verifyTransactionProposalProof = void 0;
|
|
37
|
-
const elliptic = __importStar(require("elliptic"));
|
|
38
4
|
const generic_1 = require("@degenerate/generic");
|
|
39
5
|
const calculate_share_data_string_1 = require("../../helpers/calculate-share-data-string");
|
|
40
6
|
const get_previous_hash_from_share_data_1 = require("../helpers/get-previous-hash-from-share-data");
|
|
@@ -70,10 +36,10 @@ const hash_proposed_state_1 = require("../helpers/hash-proposed-state");
|
|
|
70
36
|
* hash, a structural proof's signature can never satisfy this check — the two
|
|
71
37
|
* proof kinds are non-interchangeable.
|
|
72
38
|
*
|
|
73
|
-
* Synchronous to match the rest of the proof pipeline;
|
|
74
|
-
* is itself synchronous.
|
|
39
|
+
* Synchronous to match the rest of the proof pipeline; `@noble/ed25519`'s
|
|
40
|
+
* `verify` is itself synchronous.
|
|
75
41
|
*/
|
|
76
|
-
const verifyTransactionProposalProof = (proof, shareData, proposedState
|
|
42
|
+
const verifyTransactionProposalProof = (proof, shareData, proposedState) => {
|
|
77
43
|
// Step 1: current-state hash matches what the proof claims. The purpose
|
|
78
44
|
// (functionId) comes from the proof itself, so a tampered purpose
|
|
79
45
|
// produces a different hash and is caught here.
|
|
@@ -101,23 +67,11 @@ const verifyTransactionProposalProof = (proof, shareData, proposedState, ellipti
|
|
|
101
67
|
// Step 4: signature verifies over the full transaction payload (which
|
|
102
68
|
// includes the proposed-state hash and the `tx:` discriminator).
|
|
103
69
|
const signedString = (0, create_transaction_proposal_string_to_sign_1.createTransactionProposalStringToSign)(proof.shareDataHash, proposedStateHash, proof.purpose, proof.shareDataPreviousHash, proof.timestamp);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
// so the verifier operates on the same fixed-size digest the signer
|
|
110
|
-
// did. Without this, elliptic's ECDSA on ed25519 silently truncates
|
|
111
|
-
// long inputs and stops binding the trailing bytes.
|
|
112
|
-
const digest = (0, generic_1.calculateHash)(signedString);
|
|
113
|
-
signatureValid = key.verify(digest, proof.shareDataSignature);
|
|
114
|
-
}
|
|
115
|
-
catch {
|
|
116
|
-
// elliptic throws on malformed signature/key strings rather than
|
|
117
|
-
// returning false — normalize to a single rejection mode.
|
|
118
|
-
throw new generic_1.ShareDataTransactionProofFailedError(shareData.id);
|
|
119
|
-
}
|
|
120
|
-
if (!signatureValid) {
|
|
70
|
+
// EdDSA signs the message bytes directly (Ed25519 hashes internally with
|
|
71
|
+
// SHA-512), so no SHA-256 pre-hash here — the signer didn't pre-hash either.
|
|
72
|
+
// `verifyEd25519Signature` already normalizes malformed key/signature hex
|
|
73
|
+
// to a `false` return rather than throwing.
|
|
74
|
+
if (!(0, generic_1.verifyEd25519Signature)(proof.publicKey, signedString, proof.shareDataSignature)) {
|
|
121
75
|
throw new generic_1.ShareDataTransactionProofFailedError(shareData.id);
|
|
122
76
|
}
|
|
123
77
|
return true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IShareData, IShareDataEvent, IShareFunction, IShareRuleApplied, IShareRuleEvalutionResult, IShareDataTransactionHistory, IShareDataCryptoProof, EllipticalCurvesSigning, IShareDataInitialCryptoData, IAuthorizedSigner } from '@degenerate/generic';
|
|
1
|
+
import { IShareData, IShareDataEvent, IShareFunction, IShareRuleApplied, IShareRuleEvalutionResult, IShareDataTransactionHistory, IShareDataCryptoProof, EllipticalCurvesSigning, IShareDataInitialCryptoData, IAuthorizedSigner, ILibraryRuleReferenceBinding, LibraryStore } from '@degenerate/generic';
|
|
2
2
|
/**
|
|
3
3
|
* This contains the interface for the share data object
|
|
4
4
|
*/
|
|
@@ -19,6 +19,9 @@ export declare class ShareData {
|
|
|
19
19
|
private _lastUpdated;
|
|
20
20
|
private _structuralProofs;
|
|
21
21
|
private _authorizedSigners;
|
|
22
|
+
private _ruleReferences;
|
|
23
|
+
private _libraryStore?;
|
|
24
|
+
private _hydratedReferenceRules?;
|
|
22
25
|
/**
|
|
23
26
|
* This is the constructor for the share data object
|
|
24
27
|
* @param id the id of the share data
|
|
@@ -99,6 +102,12 @@ export declare class ShareData {
|
|
|
99
102
|
* NOT listed here.
|
|
100
103
|
*/
|
|
101
104
|
get authorizedSigners(): IAuthorizedSigner[];
|
|
105
|
+
/**
|
|
106
|
+
* The library rule references governing this block. Each binding pairs a
|
|
107
|
+
* library reference (id + pinned `currentHash`) with the root property it
|
|
108
|
+
* governs. Frozen after `initialize()` like rules/functions.
|
|
109
|
+
*/
|
|
110
|
+
get ruleReferences(): ILibraryRuleReferenceBinding[];
|
|
102
111
|
/**
|
|
103
112
|
* This gets the transaction history for the share block
|
|
104
113
|
*/
|
|
@@ -122,6 +131,31 @@ export declare class ShareData {
|
|
|
122
131
|
* @param rule the rule to add to the share block
|
|
123
132
|
*/
|
|
124
133
|
addRule(rule: IShareRuleApplied, cryptoProof: IShareDataCryptoProof): void;
|
|
134
|
+
/**
|
|
135
|
+
* Registers a library rule reference governing this block. The reference
|
|
136
|
+
* (id + pinned `currentHash`) plus the governed `targettedProperty` are
|
|
137
|
+
* folded into the signed structure, so a tampered snapshot cannot add or
|
|
138
|
+
* retarget a rule reference without breaking the hash chain. Creation-time
|
|
139
|
+
* only (rejected once locked); verified against the pre-append state,
|
|
140
|
+
* mirroring `addRule` / `addFunction`.
|
|
141
|
+
*/
|
|
142
|
+
addRuleReference(binding: ILibraryRuleReferenceBinding, cryptoProof: IShareDataCryptoProof): void;
|
|
143
|
+
/**
|
|
144
|
+
* Injects the library store used to resolve this block's rule references at
|
|
145
|
+
* change time. This is runtime infrastructure — it is NOT folded into the
|
|
146
|
+
* canonical hash or the signed structure, so setting it does not affect any
|
|
147
|
+
* proof. Replacing the store clears the resolved-rule cache.
|
|
148
|
+
*/
|
|
149
|
+
setLibraryStore(store: LibraryStore): void;
|
|
150
|
+
/**
|
|
151
|
+
* Resolves `_ruleReferences` into executable applied rules via the library
|
|
152
|
+
* store, materializing the lean "reference" block into the rules needed to
|
|
153
|
+
* evaluate a change. The result is cached (references are pinned to
|
|
154
|
+
* content-addressed versions, so the resolution is stable). Fail-closed: if
|
|
155
|
+
* references exist but no store was injected, evaluation refuses to proceed
|
|
156
|
+
* rather than silently dropping the governing rules.
|
|
157
|
+
*/
|
|
158
|
+
private resolveReferenceRules;
|
|
125
159
|
/**
|
|
126
160
|
* Delegates `signerPublicKey` the right to propose runtime transactions for
|
|
127
161
|
* the given `functionIds` (and ONLY those — least privilege). Creation-time
|
|
@@ -193,10 +227,10 @@ export declare class ShareData {
|
|
|
193
227
|
* @param proposedData the proposed data
|
|
194
228
|
* @param transactionFunction the function that was attempted
|
|
195
229
|
*/
|
|
196
|
-
addTransactionNotValidated(proposedData: IShareData, transactionFunction: IShareFunction<any, (...args: any[]) => any, any>): {
|
|
230
|
+
addTransactionNotValidated(proposedData: IShareData, transactionFunction: IShareFunction<any, (...args: any[]) => any, any>): Promise<{
|
|
197
231
|
accepted: boolean;
|
|
198
232
|
transactionId: string;
|
|
199
|
-
}
|
|
233
|
+
}>;
|
|
200
234
|
/**
|
|
201
235
|
* Signed runtime mutation path. Verifies that `proof` cryptographically
|
|
202
236
|
* authorizes applying `transactionFunction` to move this share-data to
|
|
@@ -230,10 +264,10 @@ export declare class ShareData {
|
|
|
230
264
|
* @param transactionFunction the function producing `proposedData`
|
|
231
265
|
* @param proof the transaction proposal proof authorizing the change
|
|
232
266
|
*/
|
|
233
|
-
addTransaction(proposedData: IShareData, transactionFunction: IShareFunction<any, (...args: any[]) => any, any>, proof: IShareDataCryptoProof): {
|
|
267
|
+
addTransaction(proposedData: IShareData, transactionFunction: IShareFunction<any, (...args: any[]) => any, any>, proof: IShareDataCryptoProof): Promise<{
|
|
234
268
|
accepted: boolean;
|
|
235
269
|
transactionId: string;
|
|
236
|
-
}
|
|
270
|
+
}>;
|
|
237
271
|
/**
|
|
238
272
|
* Shared rule-evaluate → apply-if-valid → record path used by both
|
|
239
273
|
* {@link addTransactionNotValidated} (no proof) and {@link addTransaction}
|
|
@@ -258,7 +292,7 @@ export declare class ShareData {
|
|
|
258
292
|
* success; throws `ShareDataStructuralProofFailedError` on any mismatch
|
|
259
293
|
* (hash, previousHash, signature, or purpose).
|
|
260
294
|
*/
|
|
261
|
-
verifyStructuralProof(proof: IShareDataCryptoProof
|
|
295
|
+
verifyStructuralProof(proof: IShareDataCryptoProof): true;
|
|
262
296
|
/**
|
|
263
297
|
* Verifies that `proof` authorizes applying a transaction that moves this
|
|
264
298
|
* share-data to exactly `proposedData`. Unlike {@link verifyStructuralProof}
|
|
@@ -267,7 +301,7 @@ export declare class ShareData {
|
|
|
267
301
|
* verify against any other. Returns `true`; throws
|
|
268
302
|
* `ShareDataTransactionProofFailedError` on any mismatch.
|
|
269
303
|
*/
|
|
270
|
-
verifyTransactionProof(proof: IShareDataCryptoProof, proposedData: IShareData
|
|
304
|
+
verifyTransactionProof(proof: IShareDataCryptoProof, proposedData: IShareData): true;
|
|
271
305
|
/**
|
|
272
306
|
* This adds a structure proof to the share data
|
|
273
307
|
* @param proof the structure proof to add
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-data.d.ts","sourceRoot":"","sources":["../../src/share-data/share-data.ts"],"names":[],"mappings":"AACA,OAAO,EACH,UAAU,EACV,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,4BAA4B,EAG5B,qBAAqB,EAErB,uBAAuB,EACvB,2BAA2B,EAK3B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"share-data.d.ts","sourceRoot":"","sources":["../../src/share-data/share-data.ts"],"names":[],"mappings":"AACA,OAAO,EACH,UAAU,EACV,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,4BAA4B,EAG5B,qBAAqB,EAErB,uBAAuB,EACvB,2BAA2B,EAK3B,iBAAiB,EAGjB,4BAA4B,EAE5B,YAAY,EAGf,MAAM,qBAAqB,CAAC;AAI7B;;GAEG;AACH,qBAAa,SAAS;IAClB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,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