@railgun-community/shared-models 5.5.0 → 5.5.2

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.
@@ -4,11 +4,6 @@ export declare enum POINetworkStatus {
4
4
  Screen = "Screen",
5
5
  Gather = "Gather"
6
6
  }
7
- export type ShieldProofData = {
8
- snarkProof: SnarkProof;
9
- commitmentHash: string;
10
- blindedCommitment: string;
11
- };
12
7
  export type TransactProofData = {
13
8
  snarkProof: SnarkProof;
14
9
  poiMerkleroots: string[];
@@ -30,22 +25,27 @@ export type MerkleProof = {
30
25
  export type POIEventListStatus = {
31
26
  length: number;
32
27
  };
33
- export type GetShieldProofsParams = {
34
- bloomFilterSerialized: string;
35
- };
36
28
  export type GetTransactProofsParams = {
37
29
  bloomFilterSerialized: string;
38
30
  };
39
- export type SubmitShieldProofParams = {
40
- shieldProofData: ShieldProofData;
31
+ export type GetBlockedShieldsParams = {
32
+ bloomFilterSerialized: string;
41
33
  };
42
34
  export type SubmitTransactProofParams = {
43
35
  listKey: string;
44
36
  transactProofData: TransactProofData;
45
37
  };
38
+ export declare enum BlindedCommitmentType {
39
+ Shield = "Shield",
40
+ Transact = "Transact"
41
+ }
42
+ export type BlindedCommitmentData = {
43
+ blindedCommitment: string;
44
+ type: BlindedCommitmentType;
45
+ };
46
46
  export type GetPOIsPerListParams = {
47
47
  listKeys: string[];
48
- blindedCommitments: string[];
48
+ blindedCommitmentDatas: BlindedCommitmentData[];
49
49
  };
50
50
  export type GetMerkleProofsParams = {
51
51
  listKey: string;
@@ -58,7 +58,9 @@ export type ValidateTxidMerklerootParams = {
58
58
  };
59
59
  export declare enum POIStatus {
60
60
  Valid = "Valid",
61
- Pending = "Pending",
61
+ ShieldPending = "ShieldPending",
62
+ ShieldBlocked = "ShieldBlocked",
63
+ TransactProofSubmitted = "TransactProofSubmitted",
62
64
  Missing = "Missing"
63
65
  }
64
66
  export type POIStatusListMap = {
@@ -1,17 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.POIStatus = exports.POINetworkStatus = void 0;
3
+ exports.POIStatus = exports.BlindedCommitmentType = exports.POINetworkStatus = void 0;
4
4
  var POINetworkStatus;
5
5
  (function (POINetworkStatus) {
6
6
  POINetworkStatus["Screen"] = "Screen";
7
7
  POINetworkStatus["Gather"] = "Gather";
8
8
  })(POINetworkStatus || (exports.POINetworkStatus = POINetworkStatus = {}));
9
+ var BlindedCommitmentType;
10
+ (function (BlindedCommitmentType) {
11
+ BlindedCommitmentType["Shield"] = "Shield";
12
+ BlindedCommitmentType["Transact"] = "Transact";
13
+ })(BlindedCommitmentType || (exports.BlindedCommitmentType = BlindedCommitmentType = {}));
9
14
  var POIStatus;
10
15
  (function (POIStatus) {
11
16
  // POI valdated in event list
12
17
  POIStatus["Valid"] = "Valid";
13
- // Proof submitted, but not validated yet
14
- POIStatus["Pending"] = "Pending";
18
+ // Shield indexed, but not allowed or blocked yet
19
+ POIStatus["ShieldPending"] = "ShieldPending";
20
+ // Shield blocked
21
+ POIStatus["ShieldBlocked"] = "ShieldBlocked";
22
+ // Transact proof submitted, but not validated yet
23
+ POIStatus["TransactProofSubmitted"] = "TransactProofSubmitted";
15
24
  // No proof
16
25
  POIStatus["Missing"] = "Missing";
17
26
  })(POIStatus || (exports.POIStatus = POIStatus = {}));
@@ -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;AAkED,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,6BAA6B;IAC7B,4BAAe,CAAA;IACf,yCAAyC;IACzC,gCAAmB,CAAA;IACnB,WAAW;IACX,gCAAmB,CAAA;AACrB,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB","sourcesContent":["import { NetworkName } from './network-config';\n\nexport enum POINetworkStatus {\n Screen = 'Screen',\n Gather = 'Gather',\n}\n\nexport type ShieldProofData = {\n snarkProof: SnarkProof;\n commitmentHash: string;\n blindedCommitment: string;\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 POIEventListStatus = {\n length: number;\n};\n\nexport type GetShieldProofsParams = {\n bloomFilterSerialized: string;\n};\n\nexport type GetTransactProofsParams = {\n bloomFilterSerialized: string;\n};\n\nexport type SubmitShieldProofParams = {\n shieldProofData: ShieldProofData;\n};\n\nexport type SubmitTransactProofParams = {\n listKey: string;\n transactProofData: TransactProofData;\n};\n\nexport type GetPOIsPerListParams = {\n listKeys: string[];\n blindedCommitments: string[];\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 // Proof submitted, but not validated yet\n Pending = 'Pending',\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 eventListStatuses: Record<string, POIEventListStatus>;\n};\n"]}
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;AAwCD,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 POIEventListStatus = {\n length: 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 eventListStatuses: Record<string, POIEventListStatus>;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railgun-community/shared-models",
3
- "version": "5.5.0",
3
+ "version": "5.5.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [