@mainsail/crypto-messages 0.0.1-rc.7 → 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 +2 -6
- package/distribution/deserializer.d.ts.map +1 -1
- package/distribution/deserializer.js +16 -102
- package/distribution/deserializer.js.map +1 -1
- package/distribution/factory.d.ts +4 -15
- package/distribution/factory.d.ts.map +1 -1
- package/distribution/factory.js +18 -116
- 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/message.d.ts +16 -0
- package/distribution/message.d.ts.map +1 -0
- package/distribution/{prevote.js → message.js} +7 -23
- package/distribution/message.js.map +1 -0
- package/distribution/schemas.d.ts +2 -2
- package/distribution/schemas.d.ts.map +1 -1
- package/distribution/schemas.js +6 -55
- 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 +3 -9
- package/distribution/serializer.d.ts.map +1 -1
- package/distribution/serializer.js +12 -168
- 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 -22
- 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 -18
- package/distribution/precommit.d.ts.map +0 -1
- package/distribution/precommit.js +0 -66
- package/distribution/precommit.js.map +0 -1
- package/distribution/prevote.d.ts +0 -18
- 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 -101
- package/distribution/proposal.js.map +0 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { Contracts } from "@mainsail/contracts";
|
|
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
|
-
|
|
10
|
+
import { Identifiers } from "@mainsail/constants";
|
|
11
11
|
import { inject, injectable } from "@mainsail/container";
|
|
12
|
-
import {
|
|
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
|
-
import { Contracts } from "@mainsail/contracts";
|
|
2
|
-
export declare class
|
|
1
|
+
import type { Contracts } from "@mainsail/contracts";
|
|
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
|
@@ -7,112 +7,26 @@ 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
|
+
import { Identifiers } from "@mainsail/constants";
|
|
10
11
|
import { inject, injectable } from "@mainsail/container";
|
|
11
|
-
import { Contracts, Identifiers } from "@mainsail/contracts";
|
|
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 header = await this.#getBlockHeaderFromProposedData(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
|
-
blockNumber: header.number,
|
|
45
|
-
dataSerialized: proposalData.data.serialized,
|
|
46
|
-
serialized,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
async makeProposedDataFromBytes(bytes) {
|
|
50
|
-
const buffer = ByteBuffer.fromBuffer(bytes);
|
|
51
|
-
const lockProofLength = buffer.readUint8();
|
|
52
|
-
let lockProof;
|
|
53
|
-
if (lockProofLength > 0) {
|
|
54
|
-
const lockProofBuffer = buffer.readBytes(lockProofLength);
|
|
55
|
-
lockProof = await this.deserializer.deserializeLockProof(lockProofBuffer);
|
|
56
|
-
}
|
|
57
|
-
const block = await this.blockFactory.fromBytes(buffer.getRemainder());
|
|
58
|
-
return {
|
|
59
|
-
block,
|
|
60
|
-
lockProof,
|
|
61
|
-
serialized: bytes.toString("hex"),
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
async makePrevote(data, keyPair) {
|
|
65
|
-
const worker = await this.workerPool.getWorker();
|
|
66
|
-
const bytes = await this.serializer.serializePrevoteForSignature({
|
|
67
|
-
blockHash: data.blockHash,
|
|
68
|
-
blockNumber: data.blockNumber,
|
|
69
|
-
round: data.round,
|
|
70
|
-
type: data.type,
|
|
71
|
-
});
|
|
72
|
-
const signature = await worker.consensusSignature("sign", bytes, Buffer.from(keyPair.privateKey, "hex"));
|
|
73
|
-
const serialized = await this.serializer.serializePrevote({ ...data, signature });
|
|
74
|
-
return this.makePrevoteFromBytes(serialized);
|
|
75
|
-
}
|
|
76
|
-
async makePrevoteFromBytes(bytes) {
|
|
77
|
-
const data = await this.deserializer.deserializePrevote(bytes);
|
|
78
|
-
return this.makePrevoteFromData(data, bytes);
|
|
79
|
-
}
|
|
80
|
-
async makePrevoteFromData(data, serialized) {
|
|
81
|
-
this.#applySchema("prevote", data);
|
|
82
|
-
if (!serialized) {
|
|
83
|
-
serialized = await this.serializer.serializePrevote(data);
|
|
84
|
-
}
|
|
85
|
-
return new Prevote({ ...data, serialized });
|
|
86
|
-
}
|
|
87
|
-
async makePrecommit(data, keyPair) {
|
|
88
|
-
const worker = await this.workerPool.getWorker();
|
|
89
|
-
const bytes = await this.serializer.serializePrecommitForSignature({
|
|
90
|
-
blockHash: data.blockHash,
|
|
91
|
-
blockNumber: data.blockNumber,
|
|
92
|
-
round: data.round,
|
|
93
|
-
type: data.type,
|
|
94
|
-
});
|
|
95
|
-
const signature = await worker.consensusSignature("sign", bytes, Buffer.from(keyPair.privateKey, "hex"));
|
|
96
|
-
const serialized = await this.serializer.serializePrecommit({ ...data, signature });
|
|
97
|
-
return this.makePrecommitFromBytes(serialized);
|
|
98
|
-
}
|
|
99
|
-
async makePrecommitFromBytes(bytes) {
|
|
100
|
-
const data = await this.deserializer.deserializePrecommit(bytes);
|
|
101
|
-
return this.makePrecommitFromData(data, bytes);
|
|
102
|
-
}
|
|
103
|
-
async makePrecommitFromData(data, serialized) {
|
|
104
|
-
this.#applySchema("precommit", data);
|
|
105
|
-
if (!serialized) {
|
|
106
|
-
serialized = await this.serializer.serializePrecommit(data);
|
|
107
|
-
}
|
|
108
|
-
return new Precommit({ ...data, serialized });
|
|
109
|
-
}
|
|
110
|
-
// Performance can be improved by returning only a block height
|
|
111
|
-
async #getBlockHeaderFromProposedData(bytes) {
|
|
112
|
-
const buffer = ByteBuffer.fromBuffer(bytes);
|
|
113
|
-
const lockProofLength = buffer.readUint8();
|
|
114
|
-
buffer.skip(lockProofLength);
|
|
115
|
-
return this.blockDeserializer.deserializeHeader(buffer.getRemainder());
|
|
26
|
+
async makeMessageFromBytes(bytes) {
|
|
27
|
+
const data = await this.deserializer.deserializeMessage(bytes);
|
|
28
|
+
this.#applySchema("message", data);
|
|
29
|
+
return new Message({ ...data, serialized: bytes });
|
|
116
30
|
}
|
|
117
31
|
#applySchema(schema, data) {
|
|
118
32
|
const result = this.validator.validate(schema, data);
|
|
@@ -122,36 +36,24 @@ let MessageFactory = class MessageFactory {
|
|
|
122
36
|
throw new MessageSchemaError(schema, result.error);
|
|
123
37
|
}
|
|
124
38
|
};
|
|
125
|
-
__decorate([
|
|
126
|
-
inject(Identifiers.Application.Instance),
|
|
127
|
-
__metadata("design:type", Object)
|
|
128
|
-
], MessageFactory.prototype, "app", void 0);
|
|
129
39
|
__decorate([
|
|
130
40
|
inject(Identifiers.Cryptography.Message.Serializer),
|
|
131
41
|
__metadata("design:type", Object)
|
|
132
|
-
],
|
|
42
|
+
], Factory.prototype, "serializer", void 0);
|
|
133
43
|
__decorate([
|
|
134
44
|
inject(Identifiers.Cryptography.Message.Deserializer),
|
|
135
45
|
__metadata("design:type", Object)
|
|
136
|
-
],
|
|
137
|
-
__decorate([
|
|
138
|
-
inject(Identifiers.Cryptography.Block.Factory),
|
|
139
|
-
__metadata("design:type", Object)
|
|
140
|
-
], MessageFactory.prototype, "blockFactory", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
inject(Identifiers.Cryptography.Block.Deserializer),
|
|
143
|
-
__metadata("design:type", Object)
|
|
144
|
-
], MessageFactory.prototype, "blockDeserializer", void 0);
|
|
46
|
+
], Factory.prototype, "deserializer", void 0);
|
|
145
47
|
__decorate([
|
|
146
48
|
inject(Identifiers.Cryptography.Validator),
|
|
147
49
|
__metadata("design:type", Object)
|
|
148
|
-
],
|
|
50
|
+
], Factory.prototype, "validator", void 0);
|
|
149
51
|
__decorate([
|
|
150
52
|
inject(Identifiers.CryptoWorker.WorkerPool),
|
|
151
53
|
__metadata("design:type", Object)
|
|
152
|
-
],
|
|
153
|
-
|
|
54
|
+
], Factory.prototype, "workerPool", void 0);
|
|
55
|
+
Factory = __decorate([
|
|
154
56
|
injectable()
|
|
155
|
-
],
|
|
156
|
-
export {
|
|
57
|
+
], Factory);
|
|
58
|
+
export { Factory };
|
|
157
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 { injectable } from "@mainsail/container";
|
|
8
|
-
import { Identifiers } from "@mainsail/contracts";
|
|
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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Contracts } from "@mainsail/contracts";
|
|
2
|
+
export declare class Message implements Contracts.Crypto.Message {
|
|
3
|
+
#private;
|
|
4
|
+
constructor({ blockHash, blockNumber, round, serialized, signature, type, validatorIndex, }: Contracts.Crypto.MessageData & {
|
|
5
|
+
serialized: Buffer;
|
|
6
|
+
});
|
|
7
|
+
get type(): Contracts.Crypto.MessageType;
|
|
8
|
+
get blockNumber(): number;
|
|
9
|
+
get round(): number;
|
|
10
|
+
get blockHash(): string | undefined;
|
|
11
|
+
get validatorIndex(): number;
|
|
12
|
+
get signature(): string;
|
|
13
|
+
get serialized(): Buffer;
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
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,26 +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
|
-
toData() {
|
|
56
|
-
return {
|
|
57
|
-
blockHash: this.#blockHash,
|
|
58
|
-
blockNumber: this.#blockNumber,
|
|
59
|
-
round: this.#round,
|
|
60
|
-
signature: this.#signature,
|
|
61
|
-
type: this.type,
|
|
62
|
-
validatorIndex: this.#validatorIndex,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
49
|
}
|
|
66
|
-
//# 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
|
-
import { AnySchemaObject } from "ajv";
|
|
2
|
-
export declare const schemas: Record<"
|
|
1
|
+
import type { AnySchemaObject } from "ajv";
|
|
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
|
-
import {
|
|
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: [
|
|
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: [Contracts.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
|