@railgun-community/shared-models 6.2.2 → 6.2.5

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.
@@ -38,6 +38,7 @@ export declare enum POIEventType {
38
38
  export type POIEventLengths = Record<POIEventType, number>;
39
39
  export type POIListStatus = {
40
40
  poiEventLengths: POIEventLengths;
41
+ listProviderPOIEventQueueLength: number;
41
42
  pendingTransactProofs: number;
42
43
  blockedShields: number;
43
44
  historicalMerklerootsLength: number;
@@ -1 +1 @@
1
- {"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAmCA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,iDAAiC,CAAA;AACnC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA2DD,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACvB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAoCD,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,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS;AAC3C,QAAA,2BAA2B,GAAG,UAAU,CAAC;AACzC,QAAA,+BAA+B,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY;AACtD,QAAA,oCAAoC,GAAG,cAAc,CAAC;AAEnE,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AASY,QAAA,kBAAkB,GAAc;IAC3C;QACE,GAAG,EAAE,kEAAkE;QACvE,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,gCAAgC;QACtC,WAAW,EACT,2KAA2K;KAC9K;CACF,CAAC","sourcesContent":["import { TXIDVersion } from './engine';\nimport { NetworkName } from './network-config';\nimport { PreTransactionPOIsPerTxidLeafPerList } from './response-types';\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 historicalMerklerootsLength: number;\n latestHistoricalMerkleroot: string;\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 SingleCommitmentProofsData = {\n commitment: string;\n npk: string;\n utxoTreeIn: number;\n utxoTreeOut: number;\n utxoPositionOut: number;\n railgunTxid: string;\n pois: PreTransactionPOIsPerTxidLeafPerList;\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 type SubmitSingleCommitmentProofsParams = {\n txidVersion: TXIDVersion;\n singleCommitmentProofsData: SingleCommitmentProofsData;\n};\n\nexport enum BlindedCommitmentType {\n Shield = 'Shield',\n Transact = 'Transact',\n Unshield = 'Unshield',\n}\n\nexport type ValidatePOIMerklerootsParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n poiMerkleroots: string[];\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 = 60 * 60; // 1 hour\nexport const POI_SHIELD_PENDING_SEC_TEXT = 'One hour';\nexport const POI_SHIELD_PENDING_SEC_TEST_NET = 5 * 60; // 5 minutes\nexport const POI_SHIELD_PENDING_SEC_TEST_NET_TEXT = 'Five minutes';\n\nexport enum POIListType {\n Active = 'Active',\n Gather = 'Gather',\n}\n\nexport type POIList = {\n key: string;\n type: POIListType;\n name: string;\n description: string;\n};\n\nexport const POI_REQUIRED_LISTS: POIList[] = [\n {\n key: 'efc6ddb59c098a13fb2b618fdae94c1c3a807abc8fb1837c93620c9143ee9e88',\n type: POIListType.Active,\n name: 'Chainalysis OFAC Sanctions API',\n description:\n 'API which is used to restrict bad actors designated by the US Department of the Treasury. See: https://www.chainalysis.com/free-cryptocurrency-sanctions-screening-tools.',\n },\n];\n"]}
1
+ {"version":3,"file":"proof-of-innocence.js","sourceRoot":"","sources":["../../src/models/proof-of-innocence.ts"],"names":[],"mappings":";;;AAmCA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,iDAAiC,CAAA;AACnC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA4DD,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACvB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAoCD,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,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS;AAC3C,QAAA,2BAA2B,GAAG,UAAU,CAAC;AACzC,QAAA,+BAA+B,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY;AACtD,QAAA,oCAAoC,GAAG,cAAc,CAAC;AAEnE,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AASY,QAAA,kBAAkB,GAAc;IAC3C;QACE,GAAG,EAAE,kEAAkE;QACvE,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,gCAAgC;QACtC,WAAW,EACT,2KAA2K;KAC9K;CACF,CAAC","sourcesContent":["import { TXIDVersion } from './engine';\nimport { NetworkName } from './network-config';\nimport { PreTransactionPOIsPerTxidLeafPerList } from './response-types';\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 listProviderPOIEventQueueLength: number;\n pendingTransactProofs: number;\n blockedShields: number;\n historicalMerklerootsLength: number;\n latestHistoricalMerkleroot: string;\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 SingleCommitmentProofsData = {\n commitment: string;\n npk: string;\n utxoTreeIn: number;\n utxoTreeOut: number;\n utxoPositionOut: number;\n railgunTxid: string;\n pois: PreTransactionPOIsPerTxidLeafPerList;\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 type SubmitSingleCommitmentProofsParams = {\n txidVersion: TXIDVersion;\n singleCommitmentProofsData: SingleCommitmentProofsData;\n};\n\nexport enum BlindedCommitmentType {\n Shield = 'Shield',\n Transact = 'Transact',\n Unshield = 'Unshield',\n}\n\nexport type ValidatePOIMerklerootsParams = {\n txidVersion: TXIDVersion;\n listKey: string;\n poiMerkleroots: string[];\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 = 60 * 60; // 1 hour\nexport const POI_SHIELD_PENDING_SEC_TEXT = 'One hour';\nexport const POI_SHIELD_PENDING_SEC_TEST_NET = 5 * 60; // 5 minutes\nexport const POI_SHIELD_PENDING_SEC_TEST_NET_TEXT = 'Five minutes';\n\nexport enum POIListType {\n Active = 'Active',\n Gather = 'Gather',\n}\n\nexport type POIList = {\n key: string;\n type: POIListType;\n name: string;\n description: string;\n};\n\nexport const POI_REQUIRED_LISTS: POIList[] = [\n {\n key: 'efc6ddb59c098a13fb2b618fdae94c1c3a807abc8fb1837c93620c9143ee9e88',\n type: POIListType.Active,\n name: 'Chainalysis OFAC Sanctions API',\n description:\n 'API which is used to restrict bad actors designated by the US Department of the Treasury. See: https://www.chainalysis.com/free-cryptocurrency-sanctions-screening-tools.',\n },\n];\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railgun-community/shared-models",
3
- "version": "6.2.2",
3
+ "version": "6.2.5",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [