@my-packages-changeit/watcher-data-extractor 13.0.10
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/CHANGELOG.md +394 -0
- package/README.md +74 -0
- package/dist/actions/collateralAction.d.ts +25 -0
- package/dist/actions/collateralAction.d.ts.map +1 -0
- package/dist/actions/collateralAction.js +34 -0
- package/dist/actions/commitmentAction.d.ts +43 -0
- package/dist/actions/commitmentAction.d.ts.map +1 -0
- package/dist/actions/commitmentAction.js +138 -0
- package/dist/actions/eventTriggerAction.d.ts +29 -0
- package/dist/actions/eventTriggerAction.d.ts.map +1 -0
- package/dist/actions/eventTriggerAction.js +101 -0
- package/dist/actions/permitAction.d.ts +73 -0
- package/dist/actions/permitAction.d.ts.map +1 -0
- package/dist/actions/permitAction.js +187 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +4 -0
- package/dist/entities/collateralEntity.d.ts +8 -0
- package/dist/entities/collateralEntity.d.ts.map +1 -0
- package/dist/entities/collateralEntity.js +34 -0
- package/dist/entities/commitmentEntity.d.ts +19 -0
- package/dist/entities/commitmentEntity.d.ts.map +1 -0
- package/dist/entities/commitmentEntity.js +93 -0
- package/dist/entities/eventTriggerEntity.d.ts +24 -0
- package/dist/entities/eventTriggerEntity.d.ts.map +1 -0
- package/dist/entities/eventTriggerEntity.js +113 -0
- package/dist/entities/permitEntity.d.ts +14 -0
- package/dist/entities/permitEntity.d.ts.map +1 -0
- package/dist/entities/permitEntity.js +68 -0
- package/dist/extractor/collateralExtractor.d.ts +31 -0
- package/dist/extractor/collateralExtractor.d.ts.map +1 -0
- package/dist/extractor/collateralExtractor.js +72 -0
- package/dist/extractor/commitmentExtractor.d.ts +46 -0
- package/dist/extractor/commitmentExtractor.d.ts.map +1 -0
- package/dist/extractor/commitmentExtractor.js +125 -0
- package/dist/extractor/eventTriggerExtractor.d.ts +57 -0
- package/dist/extractor/eventTriggerExtractor.d.ts.map +1 -0
- package/dist/extractor/eventTriggerExtractor.js +215 -0
- package/dist/extractor/permitExtractor.d.ts +150 -0
- package/dist/extractor/permitExtractor.d.ts.map +1 -0
- package/dist/extractor/permitExtractor.js +235 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/interfaces/extractedCollateral.d.ts +9 -0
- package/dist/interfaces/extractedCollateral.d.ts.map +1 -0
- package/dist/interfaces/extractedCollateral.js +2 -0
- package/dist/interfaces/extractedCommitment.d.ts +11 -0
- package/dist/interfaces/extractedCommitment.d.ts.map +1 -0
- package/dist/interfaces/extractedCommitment.js +2 -0
- package/dist/interfaces/extractedEventTrigger.d.ts +22 -0
- package/dist/interfaces/extractedEventTrigger.d.ts.map +1 -0
- package/dist/interfaces/extractedEventTrigger.js +2 -0
- package/dist/interfaces/extractedPermit.d.ts +12 -0
- package/dist/interfaces/extractedPermit.d.ts.map +1 -0
- package/dist/interfaces/extractedPermit.js +2 -0
- package/dist/interfaces/types.d.ts +25 -0
- package/dist/interfaces/types.d.ts.map +1 -0
- package/dist/interfaces/types.js +2 -0
- package/dist/migrations/index.d.ts +7 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +45 -0
- package/dist/migrations/postgres/1688554842087-migration.d.ts +7 -0
- package/dist/migrations/postgres/1688554842087-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1688554842087-migration.js +82 -0
- package/dist/migrations/postgres/1689175974257-migration.d.ts +7 -0
- package/dist/migrations/postgres/1689175974257-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1689175974257-migration.js +50 -0
- package/dist/migrations/postgres/1699874447928-migration.d.ts +7 -0
- package/dist/migrations/postgres/1699874447928-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1699874447928-migration.js +36 -0
- package/dist/migrations/postgres/1706610773315-migration.d.ts +7 -0
- package/dist/migrations/postgres/1706610773315-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1706610773315-migration.js +69 -0
- package/dist/migrations/postgres/1709388482275-migration.d.ts +7 -0
- package/dist/migrations/postgres/1709388482275-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1709388482275-migration.js +29 -0
- package/dist/migrations/postgres/1737785036299-migration.d.ts +7 -0
- package/dist/migrations/postgres/1737785036299-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1737785036299-migration.js +32 -0
- package/dist/migrations/postgres/1746354253000-migration.d.ts +7 -0
- package/dist/migrations/postgres/1746354253000-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1746354253000-migration.js +15 -0
- package/dist/migrations/postgres/1758958886549-migration.d.ts +7 -0
- package/dist/migrations/postgres/1758958886549-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1758958886549-migration.js +30 -0
- package/dist/migrations/postgres/1766843825000-migration.d.ts +7 -0
- package/dist/migrations/postgres/1766843825000-migration.d.ts.map +1 -0
- package/dist/migrations/postgres/1766843825000-migration.js +42 -0
- package/dist/migrations/sqlite/1688555766601-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1688555766601-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1688555766601-migration.js +79 -0
- package/dist/migrations/sqlite/1689175103163-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1689175103163-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1689175103163-migration.js +392 -0
- package/dist/migrations/sqlite/1699872205117-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1699872205117-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1699872205117-migration.js +192 -0
- package/dist/migrations/sqlite/1706610773176-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1706610773176-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1706610773176-migration.js +421 -0
- package/dist/migrations/sqlite/1709388134975-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1709388134975-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1709388134975-migration.js +28 -0
- package/dist/migrations/sqlite/1737547743177-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1737547743177-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1737547743177-migration.js +204 -0
- package/dist/migrations/sqlite/1746354254000-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1746354254000-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1746354254000-migration.js +15 -0
- package/dist/migrations/sqlite/1761774736153-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1761774736153-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1761774736153-migration.js +204 -0
- package/dist/migrations/sqlite/1762768664031-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1762768664031-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1762768664031-migration.js +204 -0
- package/dist/migrations/sqlite/1766843824000-migration.d.ts +7 -0
- package/dist/migrations/sqlite/1766843824000-migration.d.ts.map +1 -0
- package/dist/migrations/sqlite/1766843824000-migration.js +109 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/utils.d.ts +25 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +29 -0
- package/package.json +50 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,UAAU,eAAe;CAC1B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var EventResult;
|
|
2
|
+
(function (EventResult) {
|
|
3
|
+
EventResult["unknown"] = "unknown";
|
|
4
|
+
EventResult["fraud"] = "fraud";
|
|
5
|
+
EventResult["successful"] = "successful";
|
|
6
|
+
})(EventResult || (EventResult = {}));
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9saWIvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksV0FJWDtBQUpELFdBQVksV0FBVztJQUNyQixrQ0FBbUIsQ0FBQTtJQUNuQiw4QkFBZSxDQUFBO0lBQ2Ysd0NBQXlCLENBQUE7QUFDM0IsQ0FBQyxFQUpXLFdBQVcsS0FBWCxXQUFXLFFBSXRCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gRXZlbnRSZXN1bHQge1xuICB1bmtub3duID0gJ3Vua25vd24nLFxuICBmcmF1ZCA9ICdmcmF1ZCcsXG4gIHN1Y2Nlc3NmdWwgPSAnc3VjY2Vzc2Z1bCcsXG59XG4iXX0=
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const JsonBI: {
|
|
2
|
+
parse: (text: string, reviver?: (this: any, key: string, value: any) => any) => any;
|
|
3
|
+
stringify: {
|
|
4
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
5
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* converts hex string to Uint8Array bytes
|
|
10
|
+
*
|
|
11
|
+
* @param {Uint8Array} bytes
|
|
12
|
+
* @return {string}
|
|
13
|
+
*/
|
|
14
|
+
export declare const uint8ArrayToHex: (bytes: Uint8Array) => string;
|
|
15
|
+
/**
|
|
16
|
+
* calculates hash of WIDs
|
|
17
|
+
* @param WIDs
|
|
18
|
+
* @returns returns WIDsHash with it's count
|
|
19
|
+
*/
|
|
20
|
+
declare const getWidInfo: (WIDs: string) => {
|
|
21
|
+
WIDsHash: string;
|
|
22
|
+
WIDsCount: number;
|
|
23
|
+
};
|
|
24
|
+
export { JsonBI, getWidInfo };
|
|
25
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../lib/utils.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,MAAM;;;;;;CAEV,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,UAAU,KAAG,MAEnD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,UAAU,GAAI,MAAM,MAAM;;;CAU/B,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { blake2b } from 'blakejs';
|
|
2
|
+
import { JsonBigIntFactory } from '@rosen-bridge/json-bigint';
|
|
3
|
+
const JsonBI = JsonBigIntFactory({
|
|
4
|
+
useNativeBigInt: true,
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* converts hex string to Uint8Array bytes
|
|
8
|
+
*
|
|
9
|
+
* @param {Uint8Array} bytes
|
|
10
|
+
* @return {string}
|
|
11
|
+
*/
|
|
12
|
+
export const uint8ArrayToHex = (bytes) => {
|
|
13
|
+
return Buffer.from(bytes).toString('hex');
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* calculates hash of WIDs
|
|
17
|
+
* @param WIDs
|
|
18
|
+
* @returns returns WIDsHash with it's count
|
|
19
|
+
*/
|
|
20
|
+
const getWidInfo = (WIDs) => {
|
|
21
|
+
const WIDsArray = WIDs.split(',');
|
|
22
|
+
const hash = Buffer.from(blake2b(Buffer.from(WIDsArray.join(''), 'hex'), undefined, 32)).toString('hex');
|
|
23
|
+
return {
|
|
24
|
+
WIDsHash: hash,
|
|
25
|
+
WIDsCount: WIDsArray.length,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export { JsonBI, getWidInfo };
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,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cnJheS5sZW5ndGgsXG4gIH07XG59O1xuXG5leHBvcnQgeyBKc29uQkksIGdldFdpZEluZm8gfTtcbiJdfQ==
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@my-packages-changeit/watcher-data-extractor",
|
|
3
|
+
"version": "13.0.10",
|
|
4
|
+
"description": "Extractor for rosen specific boxes on ergo blockchain",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/rosen-bridge/scanner.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": "Rosen Team",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"CHANGELOG.md"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc --build tsconfig.build.json",
|
|
20
|
+
"clean": "rimraf dist && rimraf tsconfig.build.tsbuildinfo",
|
|
21
|
+
"coverage": "npm run test -- --coverage",
|
|
22
|
+
"lint": "eslint --fix . && npm run prettify",
|
|
23
|
+
"lint:check": "eslint . && npm run prettify:check",
|
|
24
|
+
"prettify": "prettier --write . --ignore-path ../../.gitignore",
|
|
25
|
+
"prettify:check": "prettier --check . --ignore-path ../../.gitignore",
|
|
26
|
+
"release": "npm run test -- --run && npm run clean && npm run build && npm publish --access public",
|
|
27
|
+
"test": "NODE_OPTIONS='--import tsx' vitest",
|
|
28
|
+
"type-check": "tsc --noEmit"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@rosen-bridge/abstract-extractor": "^3.2.3",
|
|
32
|
+
"@rosen-bridge/abstract-logger": "^4.0.0",
|
|
33
|
+
"@rosen-bridge/extended-typeorm": "^1.1.0",
|
|
34
|
+
"@rosen-bridge/json-bigint": "^1.1.0",
|
|
35
|
+
"@rosen-bridge/scanner-interfaces": "^1.0.0",
|
|
36
|
+
"@rosen-bridge/tokens": "^6.0.2",
|
|
37
|
+
"@rosen-clients/ergo-explorer": "^2.1.3",
|
|
38
|
+
"@types/lodash-es": "^4.17.6",
|
|
39
|
+
"blakejs": "^1.2.1",
|
|
40
|
+
"ergo-lib-wasm-nodejs": "^0.24.1",
|
|
41
|
+
"lodash-es": "^4.17.21"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@rosen-bridge/abstract-scanner": "^2.0.3"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=22.18.0",
|
|
48
|
+
"npm": "11.6.2"
|
|
49
|
+
}
|
|
50
|
+
}
|