@railgun-community/shared-models 5.5.2 → 5.5.3
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.
|
@@ -22,8 +22,17 @@ export type MerkleProof = {
|
|
|
22
22
|
indices: string;
|
|
23
23
|
root: string;
|
|
24
24
|
};
|
|
25
|
-
export type
|
|
26
|
-
|
|
25
|
+
export type ShieldQueueStatus = {
|
|
26
|
+
pending: number;
|
|
27
|
+
allowed: number;
|
|
28
|
+
blocked: number;
|
|
29
|
+
addedPOI: number;
|
|
30
|
+
latestPendingShield: Optional<string>;
|
|
31
|
+
};
|
|
32
|
+
export type POIListStatus = {
|
|
33
|
+
poiEvents: number;
|
|
34
|
+
pendingTransactProofs: number;
|
|
35
|
+
blockedShields: number;
|
|
27
36
|
};
|
|
28
37
|
export type GetTransactProofsParams = {
|
|
29
38
|
bloomFilterSerialized: string;
|
|
@@ -88,5 +97,6 @@ export type NodeStatusAllNetworks = {
|
|
|
88
97
|
};
|
|
89
98
|
export type NodeStatusForNetwork = {
|
|
90
99
|
txidStatus: RailgunTxidStatus;
|
|
91
|
-
|
|
100
|
+
shieldQueueStatus: ShieldQueueStatus;
|
|
101
|
+
listStatuses: Record<string, POIListStatus>;
|
|
92
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAEA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;
|
|
1
|
+
{"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAEA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAkDD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AAuBD,IAAY,SAWX;AAXD,WAAY,SAAS;IACnB,6BAA6B;IAC7B,4BAAe,CAAA;IACf,iDAAiD;IACjD,4CAA+B,CAAA;IAC/B,iBAAiB;IACjB,4CAA+B,CAAA;IAC/B,kDAAkD;IAClD,8DAAiD,CAAA;IACjD,WAAW;IACX,gCAAmB,CAAA;AACrB,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB","sourcesContent":["import { NetworkName } from './network-config';\n\nexport enum POINetworkStatus {\n Screen = 'Screen',\n Gather = 'Gather',\n}\n\nexport type TransactProofData = {\n snarkProof: SnarkProof;\n poiMerkleroots: string[];\n txidMerkleroot: string;\n txidMerklerootIndex: number;\n blindedCommitmentOutputs: string[];\n};\n\nexport type SnarkProof = {\n pi_a: [string, string];\n pi_b: [[string, string], [string, string]];\n pi_c: [string, string];\n};\n\nexport type MerkleProof = {\n leaf: string; // hash of commitment\n elements: string[];\n indices: string;\n root: string;\n};\n\nexport type ShieldQueueStatus = {\n pending: number;\n allowed: number;\n blocked: number;\n addedPOI: number;\n latestPendingShield: Optional<string>;\n};\n\nexport type POIListStatus = {\n poiEvents: number;\n pendingTransactProofs: number;\n blockedShields: number;\n};\n\nexport type GetTransactProofsParams = {\n bloomFilterSerialized: string;\n};\n\nexport type GetBlockedShieldsParams = {\n bloomFilterSerialized: string;\n};\n\nexport type SubmitTransactProofParams = {\n listKey: string;\n transactProofData: TransactProofData;\n};\n\nexport enum BlindedCommitmentType {\n Shield = 'Shield',\n Transact = 'Transact',\n}\n\nexport type BlindedCommitmentData = {\n blindedCommitment: string;\n type: BlindedCommitmentType;\n};\n\nexport type GetPOIsPerListParams = {\n listKeys: string[];\n blindedCommitmentDatas: BlindedCommitmentData[];\n};\n\nexport type GetMerkleProofsParams = {\n listKey: string;\n blindedCommitments: string[];\n};\n\nexport type ValidateTxidMerklerootParams = {\n tree: number;\n index: number;\n merkleroot: string;\n};\n\nexport enum POIStatus {\n // POI valdated in event list\n Valid = 'Valid',\n // Shield indexed, but not allowed or blocked yet\n ShieldPending = 'ShieldPending',\n // Shield blocked\n ShieldBlocked = 'ShieldBlocked',\n // Transact proof submitted, but not validated yet\n TransactProofSubmitted = 'TransactProofSubmitted',\n // No proof\n Missing = 'Missing',\n}\n\nexport type POIStatusListMap = {\n [listKey: string]: POIStatus[];\n};\n\nexport type TxidMerkletreeSyncStatus = {\n currentTxidIndex: number;\n currentMerkleroot: string;\n validatedTxidIndex: number;\n validatedMerkleroot: string;\n};\n\nexport type RailgunTxidStatus = {\n currentTxidIndex: Optional<number>;\n currentMerkleroot: Optional<string>;\n validatedTxidIndex: Optional<number>;\n validatedMerkleroot: Optional<string>;\n};\n\nexport type ValidatedRailgunTxidStatus = {\n validatedTxidIndex: Optional<number>;\n validatedMerkleroot: Optional<string>;\n};\n\nexport type NodeStatusAllNetworks = {\n listKeys: string[];\n forNetwork: Partial<Record<NetworkName, NodeStatusForNetwork>>;\n};\n\nexport type NodeStatusForNetwork = {\n txidStatus: RailgunTxidStatus;\n shieldQueueStatus: ShieldQueueStatus;\n listStatuses: Record<string, POIListStatus>;\n};\n"]}
|