@railgun-community/shared-models 5.7.2 → 5.7.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.
@@ -96,9 +96,8 @@ export type GetLatestValidatedRailgunTxidParams = {
96
96
  };
97
97
  export declare enum POIStatus {
98
98
  Valid = "Valid",
99
- ShieldPending = "ShieldPending",
100
99
  ShieldBlocked = "ShieldBlocked",
101
- TransactProofSubmitted = "TransactProofSubmitted",
100
+ ProofSubmitted = "ProofSubmitted",
102
101
  Missing = "Missing"
103
102
  }
104
103
  export type POIsPerList = {
@@ -17,13 +17,11 @@ var POIStatus;
17
17
  (function (POIStatus) {
18
18
  // POI valdated in event list
19
19
  POIStatus["Valid"] = "Valid";
20
- // Shield indexed, but not allowed or blocked yet
21
- POIStatus["ShieldPending"] = "ShieldPending";
22
20
  // Shield blocked
23
21
  POIStatus["ShieldBlocked"] = "ShieldBlocked";
24
- // Transact proof submitted, but not validated yet
25
- POIStatus["TransactProofSubmitted"] = "TransactProofSubmitted";
26
- // No proof
22
+ // Transact/Unshield proof submitted, but not validated yet
23
+ POIStatus["ProofSubmitted"] = "ProofSubmitted";
24
+ // Missing internal/external transact/unshield proof, or ShieldPending
27
25
  POIStatus["Missing"] = "Missing";
28
26
  })(POIStatus || (exports.POIStatus = POIStatus = {}));
29
27
  exports.POI_SHIELD_PENDING_SEC = 3 * 24 * 60 * 60; // 3 days
@@ -1 +1 @@
1
- {"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAkCA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,iDAAiC,CAAA;AACnC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA0CD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AA8BD,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;AAyCY,QAAA,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS;AACpD,QAAA,+BAA+B,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS","sourcesContent":["import { TXIDVersion } from './engine';\nimport { NetworkName } from './network-config';\n\nexport type TransactProofData = {\n snarkProof: SnarkProof;\n poiMerkleroots: string[];\n txidMerkleroot: string;\n txidMerklerootIndex: number;\n blindedCommitmentsOut: string[];\n railgunTxidIfHasUnshield: 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 unknown: number;\n pending: number;\n allowed: number;\n blocked: number;\n addedPOI: number;\n latestShield: Optional<string>;\n};\n\nexport enum POIEventType {\n Shield = 'Shield',\n Transact = 'Transact',\n Unshield = 'Unshield',\n LegacyTransact = 'LegacyTransact',\n}\n\nexport type POIEventLengths = Record<POIEventType, number>;\n\nexport type POIListStatus = {\n poiEventLengths: POIEventLengths;\n pendingTransactProofs: number;\n blockedShields: number;\n};\n\nexport type GetTransactProofsParams = {\n txidVersion: TXIDVersion;\n bloomFilterSerialized: string;\n listKey: string;\n};\n\nexport type GetBlockedShieldsParams = {\n txidVersion: TXIDVersion;\n bloomFilterSerialized: string;\n listKey: string;\n};\n\nexport type LegacyTransactProofData = {\n txidIndex: string;\n npk: string;\n value: string;\n tokenHash: string;\n blindedCommitment: string;\n};\n\nexport type SubmitTransactProofParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n transactProofData: TransactProofData;\n};\n\nexport type SubmitLegacyTransactProofParams = {\n txidVersion: TXIDVersion;\n listKeys: string[];\n legacyTransactProofDatas: LegacyTransactProofData[];\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 txidVersion: TXIDVersion;\n listKeys: string[];\n blindedCommitmentDatas: BlindedCommitmentData[];\n};\n\nexport type GetMerkleProofsParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n blindedCommitments: string[];\n};\n\nexport type ValidateTxidMerklerootParams = {\n txidVersion: TXIDVersion;\n tree: number;\n index: number;\n merkleroot: string;\n};\n\nexport type GetLatestValidatedRailgunTxidParams = {\n txidVersion: TXIDVersion;\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 POIsPerList = {\n [listKey: string]: POIStatus;\n};\n\nexport type POIsPerListMap = {\n [blindedCommitment: string]: POIsPerList;\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 legacyTransactProofs: number;\n};\n\nexport const POI_SHIELD_PENDING_SEC = 3 * 24 * 60 * 60; // 3 days\nexport const POI_SHIELD_PENDING_SEC_TEST_NET = 5 * 60; // 3 days\n"]}
1
+ {"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAkCA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,iDAAiC,CAAA;AACnC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA0CD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AA8BD,IAAY,SASX;AATD,WAAY,SAAS;IACnB,6BAA6B;IAC7B,4BAAe,CAAA;IACf,iBAAiB;IACjB,4CAA+B,CAAA;IAC/B,2DAA2D;IAC3D,8CAAiC,CAAA;IACjC,sEAAsE;IACtE,gCAAmB,CAAA;AACrB,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB;AAyCY,QAAA,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS;AACpD,QAAA,+BAA+B,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS","sourcesContent":["import { TXIDVersion } from './engine';\nimport { NetworkName } from './network-config';\n\nexport type TransactProofData = {\n snarkProof: SnarkProof;\n poiMerkleroots: string[];\n txidMerkleroot: string;\n txidMerklerootIndex: number;\n blindedCommitmentsOut: string[];\n railgunTxidIfHasUnshield: 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 unknown: number;\n pending: number;\n allowed: number;\n blocked: number;\n addedPOI: number;\n latestShield: Optional<string>;\n};\n\nexport enum POIEventType {\n Shield = 'Shield',\n Transact = 'Transact',\n Unshield = 'Unshield',\n LegacyTransact = 'LegacyTransact',\n}\n\nexport type POIEventLengths = Record<POIEventType, number>;\n\nexport type POIListStatus = {\n poiEventLengths: POIEventLengths;\n pendingTransactProofs: number;\n blockedShields: number;\n};\n\nexport type GetTransactProofsParams = {\n txidVersion: TXIDVersion;\n bloomFilterSerialized: string;\n listKey: string;\n};\n\nexport type GetBlockedShieldsParams = {\n txidVersion: TXIDVersion;\n bloomFilterSerialized: string;\n listKey: string;\n};\n\nexport type LegacyTransactProofData = {\n txidIndex: string;\n npk: string;\n value: string;\n tokenHash: string;\n blindedCommitment: string;\n};\n\nexport type SubmitTransactProofParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n transactProofData: TransactProofData;\n};\n\nexport type SubmitLegacyTransactProofParams = {\n txidVersion: TXIDVersion;\n listKeys: string[];\n legacyTransactProofDatas: LegacyTransactProofData[];\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 txidVersion: TXIDVersion;\n listKeys: string[];\n blindedCommitmentDatas: BlindedCommitmentData[];\n};\n\nexport type GetMerkleProofsParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n blindedCommitments: string[];\n};\n\nexport type ValidateTxidMerklerootParams = {\n txidVersion: TXIDVersion;\n tree: number;\n index: number;\n merkleroot: string;\n};\n\nexport type GetLatestValidatedRailgunTxidParams = {\n txidVersion: TXIDVersion;\n};\n\nexport enum POIStatus {\n // POI valdated in event list\n Valid = 'Valid',\n // Shield blocked\n ShieldBlocked = 'ShieldBlocked',\n // Transact/Unshield proof submitted, but not validated yet\n ProofSubmitted = 'ProofSubmitted',\n // Missing internal/external transact/unshield proof, or ShieldPending\n Missing = 'Missing',\n}\n\nexport type POIsPerList = {\n [listKey: string]: POIStatus;\n};\n\nexport type POIsPerListMap = {\n [blindedCommitment: string]: POIsPerList;\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 legacyTransactProofs: number;\n};\n\nexport const POI_SHIELD_PENDING_SEC = 3 * 24 * 60 * 60; // 3 days\nexport const POI_SHIELD_PENDING_SEC_TEST_NET = 5 * 60; // 3 days\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railgun-community/shared-models",
3
- "version": "5.7.2",
3
+ "version": "5.7.3",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [