@mainsail/crypto-messages 0.0.1-rc.8 → 0.0.1-rc.9
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/distribution/deserializer.d.ts +1 -5
- package/distribution/deserializer.d.ts.map +1 -1
- package/distribution/deserializer.js +15 -101
- package/distribution/deserializer.js.map +1 -1
- package/distribution/factory.d.ts +3 -14
- package/distribution/factory.d.ts.map +1 -1
- package/distribution/factory.js +17 -120
- package/distribution/factory.js.map +1 -1
- package/distribution/index.d.ts +1 -6
- package/distribution/index.d.ts.map +1 -1
- package/distribution/index.js +1 -35
- package/distribution/index.js.map +1 -1
- package/distribution/{prevote.d.ts → message.d.ts} +3 -4
- package/distribution/message.d.ts.map +1 -0
- package/distribution/{prevote.js → message.js} +7 -13
- package/distribution/message.js.map +1 -0
- package/distribution/schemas.d.ts +1 -1
- package/distribution/schemas.d.ts.map +1 -1
- package/distribution/schemas.js +5 -54
- package/distribution/schemas.js.map +1 -1
- package/distribution/serializer-schemas.d.ts +4 -0
- package/distribution/serializer-schemas.d.ts.map +1 -0
- package/distribution/serializer-schemas.js +25 -0
- package/distribution/serializer-schemas.js.map +1 -0
- package/distribution/serializer.d.ts +2 -8
- package/distribution/serializer.d.ts.map +1 -1
- package/distribution/serializer.js +11 -167
- package/distribution/serializer.js.map +1 -1
- package/distribution/service-provider.d.ts +6 -0
- package/distribution/service-provider.d.ts.map +1 -0
- package/distribution/service-provider.js +31 -0
- package/distribution/service-provider.js.map +1 -0
- package/package.json +25 -23
- package/distribution/keywords.d.ts +0 -7
- package/distribution/keywords.d.ts.map +0 -1
- package/distribution/keywords.js +0 -80
- package/distribution/keywords.js.map +0 -1
- package/distribution/precommit.d.ts +0 -17
- package/distribution/precommit.d.ts.map +0 -1
- package/distribution/precommit.js +0 -56
- package/distribution/precommit.js.map +0 -1
- package/distribution/prevote.d.ts.map +0 -1
- package/distribution/prevote.js.map +0 -1
- package/distribution/proposal.d.ts +0 -23
- package/distribution/proposal.d.ts.map +0 -1
- package/distribution/proposal.js +0 -107
- package/distribution/proposal.js.map +0 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { Contracts } from "@mainsail/contracts";
|
|
2
2
|
export declare class Deserializer implements Contracts.Crypto.MessageDeserializer {
|
|
3
3
|
private readonly serializer;
|
|
4
|
-
|
|
5
|
-
deserializeProposal(serialized: Buffer): Promise<Contracts.Crypto.ProposalData>;
|
|
6
|
-
deserializePrecommit(serialized: Buffer): Promise<Contracts.Crypto.PrecommitData>;
|
|
7
|
-
deserializePrevote(serialized: Buffer): Promise<Contracts.Crypto.PrevoteData>;
|
|
8
|
-
deserializeLockProof(serialized: Buffer): Promise<Contracts.Crypto.AggregatedSignature>;
|
|
4
|
+
deserializeMessage(serialized: Buffer): Promise<Contracts.Crypto.MessageData>;
|
|
9
5
|
}
|
|
10
6
|
//# sourceMappingURL=deserializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../source/deserializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../source/deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AASrD,qBACa,YAAa,YAAW,SAAS,CAAC,MAAM,CAAC,mBAAmB;IAExE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAEjD,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC;CAqB1F"}
|
|
@@ -7,119 +7,33 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
11
10
|
import { Identifiers } from "@mainsail/constants";
|
|
12
11
|
import { inject, injectable } from "@mainsail/container";
|
|
12
|
+
import { MessageDeserializationError } from "@mainsail/exceptions";
|
|
13
13
|
import { ByteBuffer } from "@mainsail/utils";
|
|
14
|
+
import { schema } from "./serializer-schemas.js";
|
|
14
15
|
let Deserializer = class Deserializer {
|
|
15
16
|
serializer;
|
|
16
|
-
|
|
17
|
-
async deserializeProposal(serialized) {
|
|
18
|
-
const proposal = {};
|
|
17
|
+
async deserializeMessage(serialized) {
|
|
19
18
|
const buffer = ByteBuffer.fromBuffer(serialized);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
validatorIndex: {
|
|
33
|
-
type: "uint8",
|
|
34
|
-
},
|
|
35
|
-
signature: {
|
|
36
|
-
type: "consensusSignature",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
return proposal;
|
|
41
|
-
}
|
|
42
|
-
async deserializePrecommit(serialized) {
|
|
43
|
-
const precommit = {};
|
|
44
|
-
const buffer = ByteBuffer.fromBuffer(serialized);
|
|
45
|
-
await this.serializer.deserialize(buffer, precommit, {
|
|
46
|
-
schema: {
|
|
47
|
-
type: {
|
|
48
|
-
type: "uint8",
|
|
49
|
-
},
|
|
50
|
-
blockNumber: {
|
|
51
|
-
type: "uint32",
|
|
52
|
-
},
|
|
53
|
-
round: {
|
|
54
|
-
type: "uint32",
|
|
55
|
-
},
|
|
56
|
-
blockHash: {
|
|
57
|
-
type: "blockHash",
|
|
58
|
-
optional: true,
|
|
59
|
-
},
|
|
60
|
-
validatorIndex: {
|
|
61
|
-
type: "uint8",
|
|
62
|
-
},
|
|
63
|
-
signature: {
|
|
64
|
-
type: "consensusSignature",
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
return precommit;
|
|
69
|
-
}
|
|
70
|
-
async deserializePrevote(serialized) {
|
|
71
|
-
const prevote = {};
|
|
72
|
-
const buffer = ByteBuffer.fromBuffer(serialized);
|
|
73
|
-
await this.serializer.deserialize(buffer, prevote, {
|
|
74
|
-
schema: {
|
|
75
|
-
type: {
|
|
76
|
-
type: "uint8",
|
|
77
|
-
},
|
|
78
|
-
blockNumber: {
|
|
79
|
-
type: "uint32",
|
|
80
|
-
},
|
|
81
|
-
round: {
|
|
82
|
-
type: "uint32",
|
|
83
|
-
},
|
|
84
|
-
blockHash: {
|
|
85
|
-
type: "blockHash",
|
|
86
|
-
optional: true,
|
|
87
|
-
},
|
|
88
|
-
validatorIndex: {
|
|
89
|
-
type: "uint8",
|
|
90
|
-
},
|
|
91
|
-
signature: {
|
|
92
|
-
type: "consensusSignature",
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
return prevote;
|
|
97
|
-
}
|
|
98
|
-
async deserializeLockProof(serialized) {
|
|
99
|
-
const buffer = ByteBuffer.fromBuffer(serialized);
|
|
100
|
-
const commit = {};
|
|
101
|
-
await this.serializer.deserialize(buffer, commit, {
|
|
102
|
-
length: this.messageSerializer.lockProofSize(),
|
|
103
|
-
schema: {
|
|
104
|
-
signature: {
|
|
105
|
-
type: "consensusSignature",
|
|
106
|
-
},
|
|
107
|
-
validators: {
|
|
108
|
-
type: "validatorSet",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
return commit;
|
|
19
|
+
try {
|
|
20
|
+
const result = await this.serializer.deserialize(buffer, {}, {
|
|
21
|
+
schema,
|
|
22
|
+
});
|
|
23
|
+
if (buffer.getRemainderLength() === 0) {
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
throw new MessageDeserializationError(error instanceof Error ? error.message : "");
|
|
29
|
+
}
|
|
30
|
+
throw new MessageDeserializationError(`${buffer.getRemainderLength()} bytes remaining`);
|
|
113
31
|
}
|
|
114
32
|
};
|
|
115
33
|
__decorate([
|
|
116
34
|
inject(Identifiers.Cryptography.Serializer),
|
|
117
35
|
__metadata("design:type", Object)
|
|
118
36
|
], Deserializer.prototype, "serializer", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
inject(Identifiers.Cryptography.Message.Serializer),
|
|
121
|
-
__metadata("design:type", Object)
|
|
122
|
-
], Deserializer.prototype, "messageSerializer", void 0);
|
|
123
37
|
Deserializer = __decorate([
|
|
124
38
|
injectable()
|
|
125
39
|
], Deserializer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../source/deserializer.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../source/deserializer.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG1C,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEP,UAAU,CAAmC;IAEvD,KAAK,CAAC,kBAAkB,CAAC,UAAkB;QACjD,MAAM,MAAM,GAAe,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAE7D,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAC/C,MAAM,EACN,EAAE,EACF;gBACC,MAAM;aACN,CACD,CAAC;YAEF,IAAI,MAAM,CAAC,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC;gBACvC,OAAO,MAAM,CAAC;YACf,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,2BAA2B,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACpF,CAAC;QAED,MAAM,IAAI,2BAA2B,CAAC,GAAG,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IACzF,CAAC;CACD,CAAA;AAvBiB;IADhB,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC;;gDACkB;AAFlD,YAAY;IADxB,UAAU,EAAE;GACA,YAAY,CAyBxB"}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import type { Contracts } from "@mainsail/contracts";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class Factory implements Contracts.Crypto.MessageFactory {
|
|
3
3
|
#private;
|
|
4
|
-
private readonly app;
|
|
5
4
|
private readonly serializer;
|
|
6
5
|
private readonly deserializer;
|
|
7
|
-
private readonly blockFactory;
|
|
8
|
-
private readonly blockDeserializer;
|
|
9
6
|
private readonly validator;
|
|
10
7
|
private readonly workerPool;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
makeProposalFromData(proposalData: Contracts.Crypto.ProposalData, serialized?: Buffer): Promise<Contracts.Crypto.Proposal>;
|
|
14
|
-
makeProposedDataFromBytes(bytes: Buffer): Promise<Contracts.Crypto.ProposedData>;
|
|
15
|
-
makePrevote(data: Contracts.Crypto.MakePrevoteData, keyPair: Contracts.Crypto.KeyPair): Promise<Contracts.Crypto.Prevote>;
|
|
16
|
-
makePrevoteFromBytes(bytes: Buffer): Promise<Contracts.Crypto.Precommit>;
|
|
17
|
-
makePrevoteFromData(data: Contracts.Crypto.PrevoteData, serialized?: Buffer): Promise<Contracts.Crypto.Prevote>;
|
|
18
|
-
makePrecommit(data: Contracts.Crypto.MakePrecommitData, keyPair: Contracts.Crypto.KeyPair): Promise<Contracts.Crypto.Precommit>;
|
|
19
|
-
makePrecommitFromBytes(bytes: Buffer): Promise<Contracts.Crypto.Precommit>;
|
|
20
|
-
makePrecommitFromData(data: Contracts.Crypto.PrecommitData, serialized?: Buffer): Promise<Contracts.Crypto.Precommit>;
|
|
8
|
+
makeMessage(data: Contracts.Crypto.MakeMessageData, keyPair: Contracts.Crypto.KeyPair): Promise<Contracts.Crypto.Message>;
|
|
9
|
+
makeMessageFromBytes(bytes: Buffer): Promise<Contracts.Crypto.Message>;
|
|
21
10
|
}
|
|
22
11
|
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../source/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../source/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAQrD,qBACa,OAAQ,YAAW,SAAS,CAAC,MAAM,CAAC,cAAc;;IAE9D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsC;IAGjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwC;IAGrE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IAGxD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAE7C,WAAW,CACvB,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,eAAe,EACtC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,OAAO,GAC/B,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAUvB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;CAgBnF"}
|
package/distribution/factory.js
CHANGED
|
@@ -10,114 +10,23 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { Identifiers } from "@mainsail/constants";
|
|
11
11
|
import { inject, injectable } from "@mainsail/container";
|
|
12
12
|
import { MessageSchemaError } from "@mainsail/exceptions";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { Prevote } from "./prevote.js";
|
|
16
|
-
import { Proposal } from "./proposal.js";
|
|
17
|
-
let MessageFactory = class MessageFactory {
|
|
18
|
-
app;
|
|
13
|
+
import { Message } from "./message.js";
|
|
14
|
+
let Factory = class Factory {
|
|
19
15
|
serializer;
|
|
20
16
|
deserializer;
|
|
21
|
-
blockFactory;
|
|
22
|
-
blockDeserializer;
|
|
23
17
|
validator;
|
|
24
18
|
workerPool;
|
|
25
|
-
async
|
|
19
|
+
async makeMessage(data, keyPair) {
|
|
26
20
|
const worker = await this.workerPool.getWorker();
|
|
27
|
-
const bytes = await this.serializer.
|
|
21
|
+
const bytes = await this.serializer.serializeMessageForSignature(data);
|
|
28
22
|
const signature = await worker.consensusSignature("sign", bytes, Buffer.from(keyPair.privateKey, "hex"));
|
|
29
|
-
const serialized =
|
|
30
|
-
return this.
|
|
23
|
+
const serialized = await this.serializer.serializeMessage({ ...data, signature });
|
|
24
|
+
return this.makeMessageFromBytes(serialized);
|
|
31
25
|
}
|
|
32
|
-
async
|
|
33
|
-
const data = await this.deserializer.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
async makeProposalFromData(proposalData, serialized) {
|
|
37
|
-
this.#applySchema("proposal", proposalData);
|
|
38
|
-
const { blockHeader, lockProof } = await this.#getLockProofAndBlockHeaderFromProposedData(Buffer.from(proposalData.data.serialized, "hex"));
|
|
39
|
-
if (!serialized) {
|
|
40
|
-
serialized = await this.serializer.serializeProposal(proposalData, { includeSignature: true });
|
|
41
|
-
}
|
|
42
|
-
return this.app.resolve(Proposal).initialize({
|
|
43
|
-
...proposalData,
|
|
44
|
-
blockHeader,
|
|
45
|
-
dataSerialized: proposalData.data.serialized,
|
|
46
|
-
lockProof,
|
|
47
|
-
serialized,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
async makeProposedDataFromBytes(bytes) {
|
|
51
|
-
const buffer = ByteBuffer.fromBuffer(bytes);
|
|
52
|
-
const lockProofLength = buffer.readUint8();
|
|
53
|
-
let lockProof;
|
|
54
|
-
if (lockProofLength > 0) {
|
|
55
|
-
const lockProofBuffer = buffer.readBytes(lockProofLength);
|
|
56
|
-
lockProof = await this.deserializer.deserializeLockProof(lockProofBuffer);
|
|
57
|
-
}
|
|
58
|
-
const block = await this.blockFactory.fromBytes(buffer.getRemainder());
|
|
59
|
-
return {
|
|
60
|
-
block,
|
|
61
|
-
lockProof,
|
|
62
|
-
serialized: bytes.toString("hex"),
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
async makePrevote(data, keyPair) {
|
|
66
|
-
const worker = await this.workerPool.getWorker();
|
|
67
|
-
const bytes = await this.serializer.serializePrevoteForSignature({
|
|
68
|
-
blockHash: data.blockHash,
|
|
69
|
-
blockNumber: data.blockNumber,
|
|
70
|
-
round: data.round,
|
|
71
|
-
type: data.type,
|
|
72
|
-
});
|
|
73
|
-
const signature = await worker.consensusSignature("sign", bytes, Buffer.from(keyPair.privateKey, "hex"));
|
|
74
|
-
const serialized = await this.serializer.serializePrevote({ ...data, signature });
|
|
75
|
-
return this.makePrevoteFromBytes(serialized);
|
|
76
|
-
}
|
|
77
|
-
async makePrevoteFromBytes(bytes) {
|
|
78
|
-
const data = await this.deserializer.deserializePrevote(bytes);
|
|
79
|
-
return this.makePrevoteFromData(data, bytes);
|
|
80
|
-
}
|
|
81
|
-
async makePrevoteFromData(data, serialized) {
|
|
82
|
-
this.#applySchema("prevote", data);
|
|
83
|
-
if (!serialized) {
|
|
84
|
-
serialized = await this.serializer.serializePrevote(data);
|
|
85
|
-
}
|
|
86
|
-
return new Prevote({ ...data, serialized });
|
|
87
|
-
}
|
|
88
|
-
async makePrecommit(data, keyPair) {
|
|
89
|
-
const worker = await this.workerPool.getWorker();
|
|
90
|
-
const bytes = await this.serializer.serializePrecommitForSignature({
|
|
91
|
-
blockHash: data.blockHash,
|
|
92
|
-
blockNumber: data.blockNumber,
|
|
93
|
-
round: data.round,
|
|
94
|
-
type: data.type,
|
|
95
|
-
});
|
|
96
|
-
const signature = await worker.consensusSignature("sign", bytes, Buffer.from(keyPair.privateKey, "hex"));
|
|
97
|
-
const serialized = await this.serializer.serializePrecommit({ ...data, signature });
|
|
98
|
-
return this.makePrecommitFromBytes(serialized);
|
|
99
|
-
}
|
|
100
|
-
async makePrecommitFromBytes(bytes) {
|
|
101
|
-
const data = await this.deserializer.deserializePrecommit(bytes);
|
|
102
|
-
return this.makePrecommitFromData(data, bytes);
|
|
103
|
-
}
|
|
104
|
-
async makePrecommitFromData(data, serialized) {
|
|
105
|
-
this.#applySchema("precommit", data);
|
|
106
|
-
if (!serialized) {
|
|
107
|
-
serialized = await this.serializer.serializePrecommit(data);
|
|
108
|
-
}
|
|
109
|
-
return new Precommit({ ...data, serialized });
|
|
110
|
-
}
|
|
111
|
-
async #getLockProofAndBlockHeaderFromProposedData(bytes) {
|
|
112
|
-
const buffer = ByteBuffer.fromBuffer(bytes);
|
|
113
|
-
const lockProofLength = buffer.readUint8();
|
|
114
|
-
let lockProof;
|
|
115
|
-
if (lockProofLength > 0) {
|
|
116
|
-
const lockProofBuffer = buffer.readBytes(lockProofLength);
|
|
117
|
-
lockProof = await this.deserializer.deserializeLockProof(lockProofBuffer);
|
|
118
|
-
}
|
|
119
|
-
const blockHeader = await this.blockDeserializer.deserializeHeader(buffer.getRemainder());
|
|
120
|
-
return { blockHeader, lockProof };
|
|
26
|
+
async makeMessageFromBytes(bytes) {
|
|
27
|
+
const data = await this.deserializer.deserializeMessage(bytes);
|
|
28
|
+
this.#applySchema("message", data);
|
|
29
|
+
return new Message({ ...data, serialized: bytes });
|
|
121
30
|
}
|
|
122
31
|
#applySchema(schema, data) {
|
|
123
32
|
const result = this.validator.validate(schema, data);
|
|
@@ -127,36 +36,24 @@ let MessageFactory = class MessageFactory {
|
|
|
127
36
|
throw new MessageSchemaError(schema, result.error);
|
|
128
37
|
}
|
|
129
38
|
};
|
|
130
|
-
__decorate([
|
|
131
|
-
inject(Identifiers.Application.Instance),
|
|
132
|
-
__metadata("design:type", Object)
|
|
133
|
-
], MessageFactory.prototype, "app", void 0);
|
|
134
39
|
__decorate([
|
|
135
40
|
inject(Identifiers.Cryptography.Message.Serializer),
|
|
136
41
|
__metadata("design:type", Object)
|
|
137
|
-
],
|
|
42
|
+
], Factory.prototype, "serializer", void 0);
|
|
138
43
|
__decorate([
|
|
139
44
|
inject(Identifiers.Cryptography.Message.Deserializer),
|
|
140
45
|
__metadata("design:type", Object)
|
|
141
|
-
],
|
|
142
|
-
__decorate([
|
|
143
|
-
inject(Identifiers.Cryptography.Block.Factory),
|
|
144
|
-
__metadata("design:type", Object)
|
|
145
|
-
], MessageFactory.prototype, "blockFactory", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
inject(Identifiers.Cryptography.Block.Deserializer),
|
|
148
|
-
__metadata("design:type", Object)
|
|
149
|
-
], MessageFactory.prototype, "blockDeserializer", void 0);
|
|
46
|
+
], Factory.prototype, "deserializer", void 0);
|
|
150
47
|
__decorate([
|
|
151
48
|
inject(Identifiers.Cryptography.Validator),
|
|
152
49
|
__metadata("design:type", Object)
|
|
153
|
-
],
|
|
50
|
+
], Factory.prototype, "validator", void 0);
|
|
154
51
|
__decorate([
|
|
155
52
|
inject(Identifiers.CryptoWorker.WorkerPool),
|
|
156
53
|
__metadata("design:type", Object)
|
|
157
|
-
],
|
|
158
|
-
|
|
54
|
+
], Factory.prototype, "workerPool", void 0);
|
|
55
|
+
Factory = __decorate([
|
|
159
56
|
injectable()
|
|
160
|
-
],
|
|
161
|
-
export {
|
|
57
|
+
], Factory);
|
|
58
|
+
export { Factory };
|
|
162
59
|
//# sourceMappingURL=factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../source/factory.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../source/factory.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGhC,IAAM,OAAO,GAAb,MAAM,OAAO;IAEF,UAAU,CAAsC;IAGhD,YAAY,CAAwC;IAGpD,SAAS,CAA8B;IAGvC,UAAU,CAA+B;IAEnD,KAAK,CAAC,WAAW,CACvB,IAAsC,EACtC,OAAiC;QAEjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QAEjD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QACzG,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QAElF,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,KAAa;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC/D,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAEnC,OAAO,IAAI,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,YAAY,CAAI,MAAc,EAAE,IAAO;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,MAAM,IAAI,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;CACD,CAAA;AAxCiB;IADhB,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC;;2CACa;AAGhD;IADhB,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC;;6CACe;AAGpD;IADhB,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC;;0CACa;AAGvC;IADhB,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC;;2CACc;AAX9C,OAAO;IADnB,UAAU,EAAE;GACA,OAAO,CA0CnB"}
|
package/distribution/index.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { Proposal } from "./proposal.js";
|
|
3
|
-
export declare class ServiceProvider extends Providers.ServiceProvider {
|
|
4
|
-
#private;
|
|
5
|
-
register(): Promise<void>;
|
|
6
|
-
}
|
|
1
|
+
export * from "./service-provider.js";
|
|
7
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
package/distribution/index.js
CHANGED
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Identifiers } from "@mainsail/constants";
|
|
8
|
-
import { injectable } from "@mainsail/container";
|
|
9
|
-
import { Providers } from "@mainsail/kernel";
|
|
10
|
-
import { Deserializer } from "./deserializer.js";
|
|
11
|
-
import { MessageFactory } from "./factory.js";
|
|
12
|
-
import { makeKeywords } from "./keywords.js";
|
|
13
|
-
import { schemas } from "./schemas.js";
|
|
14
|
-
import { Serializer } from "./serializer.js";
|
|
15
|
-
export { Proposal } from "./proposal.js";
|
|
16
|
-
let ServiceProvider = class ServiceProvider extends Providers.ServiceProvider {
|
|
17
|
-
async register() {
|
|
18
|
-
this.app.bind(Identifiers.Cryptography.Message.Serializer).to(Serializer).inSingletonScope();
|
|
19
|
-
this.app.bind(Identifiers.Cryptography.Message.Deserializer).to(Deserializer).inSingletonScope();
|
|
20
|
-
this.app.bind(Identifiers.Cryptography.Message.Factory).to(MessageFactory).inSingletonScope();
|
|
21
|
-
this.#registerValidation();
|
|
22
|
-
}
|
|
23
|
-
#registerValidation() {
|
|
24
|
-
for (const keyword of Object.values(makeKeywords(this.app.get(Identifiers.Cryptography.Configuration)))) {
|
|
25
|
-
this.app.get(Identifiers.Cryptography.Validator).addKeyword(keyword);
|
|
26
|
-
}
|
|
27
|
-
for (const schema of Object.values(schemas)) {
|
|
28
|
-
this.app.get(Identifiers.Cryptography.Validator).addSchema(schema);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
ServiceProvider = __decorate([
|
|
33
|
-
injectable()
|
|
34
|
-
], ServiceProvider);
|
|
35
|
-
export { ServiceProvider };
|
|
1
|
+
export * from "./service-provider.js";
|
|
36
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Contracts } from "@mainsail/contracts";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class Message implements Contracts.Crypto.Message {
|
|
3
3
|
#private;
|
|
4
|
-
constructor({ blockNumber, round,
|
|
4
|
+
constructor({ blockHash, blockNumber, round, serialized, signature, type, validatorIndex, }: Contracts.Crypto.MessageData & {
|
|
5
5
|
serialized: Buffer;
|
|
6
6
|
});
|
|
7
7
|
get type(): Contracts.Crypto.MessageType;
|
|
@@ -12,6 +12,5 @@ export declare class Prevote implements Contracts.Crypto.Prevote {
|
|
|
12
12
|
get signature(): string;
|
|
13
13
|
get serialized(): Buffer;
|
|
14
14
|
toString(): string;
|
|
15
|
-
toSignatureData(): Contracts.Crypto.SignaturePrevoteData;
|
|
16
15
|
}
|
|
17
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../source/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,OAAQ,YAAW,SAAS,CAAC,MAAM,CAAC,OAAO;;gBAS3C,EACX,SAAS,EACT,WAAW,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,IAAI,EACJ,cAAc,GACd,EAAE,SAAS,CAAC,MAAM,CAAC,WAAW,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;IAUxD,IAAI,IAAI,IAAI,SAAS,CAAC,MAAM,CAAC,WAAW,CAEvC;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,QAAQ,IAAI,MAAM;CAUlB"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export class Message {
|
|
2
|
+
#type;
|
|
3
3
|
#blockNumber;
|
|
4
4
|
#round;
|
|
5
5
|
#blockHash;
|
|
6
6
|
#validatorIndex;
|
|
7
7
|
#signature;
|
|
8
8
|
#serialized;
|
|
9
|
-
constructor({ blockNumber, round,
|
|
9
|
+
constructor({ blockHash, blockNumber, round, serialized, signature, type, validatorIndex, }) {
|
|
10
|
+
this.#type = type;
|
|
10
11
|
this.#blockNumber = blockNumber;
|
|
11
12
|
this.#round = round;
|
|
12
13
|
this.#blockHash = blockHash;
|
|
@@ -15,7 +16,7 @@ export class Prevote {
|
|
|
15
16
|
this.#serialized = serialized;
|
|
16
17
|
}
|
|
17
18
|
get type() {
|
|
18
|
-
return
|
|
19
|
+
return this.#type;
|
|
19
20
|
}
|
|
20
21
|
get blockNumber() {
|
|
21
22
|
return this.#blockNumber;
|
|
@@ -41,16 +42,9 @@ export class Prevote {
|
|
|
41
42
|
blockNumber: this.#blockNumber,
|
|
42
43
|
round: this.#round,
|
|
43
44
|
signature: this.#signature,
|
|
45
|
+
type: this.#type,
|
|
44
46
|
validatorIndex: this.#validatorIndex,
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
|
-
toSignatureData() {
|
|
48
|
-
return {
|
|
49
|
-
blockHash: this.#blockHash,
|
|
50
|
-
blockNumber: this.#blockNumber,
|
|
51
|
-
round: this.#round,
|
|
52
|
-
type: this.type,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
49
|
}
|
|
56
|
-
//# sourceMappingURL=
|
|
50
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../source/message.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IACnB,KAAK,CAA+B;IACpC,YAAY,CAAS;IACrB,MAAM,CAAS;IACf,UAAU,CAAqB;IAC/B,eAAe,CAAS;IACxB,UAAU,CAAS;IACnB,WAAW,CAAS;IAEpB,YAAY,EACX,SAAS,EACT,WAAW,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,IAAI,EACJ,cAAc,GACyC;QACvD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED,IAAI,cAAc;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC7B,CAAC;IAED,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,SAAS,CAAC;YACrB,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,cAAc,EAAE,IAAI,CAAC,eAAe;SACpC,CAAC,CAAC;IACJ,CAAC;CACD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AnySchemaObject } from "ajv";
|
|
2
|
-
export declare const schemas: Record<"
|
|
2
|
+
export declare const schemas: Record<"message", AnySchemaObject>;
|
|
3
3
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../source/schemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../source/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAI3C,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,eAAe,CAetD,CAAC"}
|
package/distribution/schemas.js
CHANGED
|
@@ -1,67 +1,18 @@
|
|
|
1
1
|
import { Enums } from "@mainsail/constants";
|
|
2
2
|
export const schemas = {
|
|
3
|
-
|
|
4
|
-
$id: "
|
|
3
|
+
message: {
|
|
4
|
+
$id: "message",
|
|
5
|
+
additionalProperties: false,
|
|
5
6
|
properties: {
|
|
6
7
|
blockHash: { $ref: "blockHash" },
|
|
7
8
|
blockNumber: { minimum: 1, type: "integer" },
|
|
8
9
|
round: { minimum: 0, type: "integer" },
|
|
9
10
|
signature: { $ref: "consensusSignature" },
|
|
10
|
-
type: { enum: [Enums.Crypto.MessageType.Precommit] },
|
|
11
|
-
validatorIndex: { isValidatorIndex: {} },
|
|
11
|
+
type: { enum: [Enums.Crypto.MessageType.Prevote, Enums.Crypto.MessageType.Precommit] },
|
|
12
|
+
validatorIndex: { isValidatorIndex: { blockNumberPath: "blockNumber" } },
|
|
12
13
|
},
|
|
13
14
|
required: ["type", "blockNumber", "round", "validatorIndex", "signature"],
|
|
14
15
|
type: "object",
|
|
15
16
|
},
|
|
16
|
-
prevote: {
|
|
17
|
-
$id: "prevote",
|
|
18
|
-
properties: {
|
|
19
|
-
blockHash: { $ref: "blockHash" },
|
|
20
|
-
blockNumber: { minimum: 1, type: "integer" },
|
|
21
|
-
round: { minimum: 0, type: "integer" },
|
|
22
|
-
signature: { $ref: "consensusSignature" },
|
|
23
|
-
type: { enum: [Enums.Crypto.MessageType.Prevote] },
|
|
24
|
-
validatorIndex: { isValidatorIndex: {} },
|
|
25
|
-
},
|
|
26
|
-
required: ["type", "blockNumber", "round", "validatorIndex", "signature"],
|
|
27
|
-
type: "object",
|
|
28
|
-
},
|
|
29
|
-
proposal: {
|
|
30
|
-
$id: "proposal",
|
|
31
|
-
properties: {
|
|
32
|
-
data: {
|
|
33
|
-
properties: {
|
|
34
|
-
serialized: { $ref: "hex" },
|
|
35
|
-
},
|
|
36
|
-
required: ["serialized"],
|
|
37
|
-
type: "object",
|
|
38
|
-
},
|
|
39
|
-
round: { minimum: 0, type: "integer" },
|
|
40
|
-
signature: { $ref: "consensusSignature" },
|
|
41
|
-
validRound: { minimum: 0, type: "integer" },
|
|
42
|
-
validatorIndex: { isValidatorIndex: {} },
|
|
43
|
-
},
|
|
44
|
-
required: ["round", "data", "validatorIndex", "signature"],
|
|
45
|
-
type: "object",
|
|
46
|
-
},
|
|
47
|
-
proposalLockProof: {
|
|
48
|
-
$id: "lockProof",
|
|
49
|
-
properties: {
|
|
50
|
-
signature: { $ref: "consensusSignature" },
|
|
51
|
-
validators: {
|
|
52
|
-
$ref: "validatorBitmap",
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
required: ["signature", "validators"],
|
|
56
|
-
type: "object",
|
|
57
|
-
},
|
|
58
|
-
validatorBitmap: {
|
|
59
|
-
$id: "validatorBitmap",
|
|
60
|
-
items: {
|
|
61
|
-
buffer: {},
|
|
62
|
-
},
|
|
63
|
-
limitToRoundValidators: {},
|
|
64
|
-
type: "array",
|
|
65
|
-
},
|
|
66
17
|
};
|
|
67
18
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../source/schemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../source/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,CAAC,MAAM,OAAO,GAAuC;IAC1D,OAAO,EAAE;QACR,GAAG,EAAE,SAAS;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACX,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;YAChC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE;YAC5C,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,SAAS,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE;YACzC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;YACtF,cAAc,EAAE,EAAE,gBAAgB,EAAE,EAAE,eAAe,EAAE,aAAa,EAAE,EAAE;SACxE;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,CAAC;QACzE,IAAI,EAAE,QAAQ;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Contracts } from "@mainsail/contracts";
|
|
2
|
+
export declare const schemaForSignature: Record<string, Contracts.Serializer.SerializationSchema>;
|
|
3
|
+
export declare const schema: Record<string, Contracts.Serializer.SerializationSchema>;
|
|
4
|
+
//# sourceMappingURL=serializer-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer-schemas.d.ts","sourceRoot":"","sources":["../source/serializer-schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAcvF,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAQ3E,CAAC"}
|