@eclesia/indexer-engine 2.7.7 → 2.8.0
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/dist/_virtual/rolldown_runtime.cjs +34 -0
- package/dist/_virtual/rolldown_runtime.js +13 -0
- package/dist/emitter/index.cjs +57 -0
- package/dist/emitter/index.cjs.map +1 -0
- package/dist/emitter/index.d.cts +21 -0
- package/dist/emitter/index.d.cts.map +1 -0
- package/dist/emitter/index.d.ts +19 -15
- package/dist/emitter/index.d.ts.map +1 -1
- package/dist/emitter/index.js +54 -73
- package/dist/emitter/index.js.map +1 -0
- package/dist/index.cjs +23 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -44
- package/dist/indexer/index.cjs +570 -0
- package/dist/indexer/index.cjs.map +1 -0
- package/dist/indexer/index.d.cts +54 -0
- package/dist/indexer/index.d.cts.map +1 -0
- package/dist/indexer/index.d.ts +50 -46
- package/dist/indexer/index.d.ts.map +1 -1
- package/dist/indexer/index.js +551 -724
- package/dist/indexer/index.js.map +1 -0
- package/dist/promise-queue/index.cjs +140 -0
- package/dist/promise-queue/index.cjs.map +1 -0
- package/dist/promise-queue/index.d.cts +39 -0
- package/dist/promise-queue/index.d.cts.map +1 -0
- package/dist/promise-queue/index.d.ts +36 -33
- package/dist/promise-queue/index.d.ts.map +1 -1
- package/dist/promise-queue/index.js +138 -172
- package/dist/promise-queue/index.js.map +1 -0
- package/dist/types/index.cjs +12 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +102 -0
- package/dist/types/index.d.cts.map +1 -0
- package/dist/types/index.d.ts +88 -83
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -2
- package/dist/types/index.js.map +1 -0
- package/dist/utils/bech32.cjs +27 -0
- package/dist/utils/bech32.cjs.map +1 -0
- package/dist/utils/bech32.d.cts +7 -0
- package/dist/utils/bech32.d.cts.map +1 -0
- package/dist/utils/bech32.d.ts +3 -1
- package/dist/utils/bech32.d.ts.map +1 -1
- package/dist/utils/bech32.js +17 -21
- package/dist/utils/bech32.js.map +1 -0
- package/dist/utils/bigint.cjs +9 -0
- package/dist/utils/bigint.cjs.map +1 -0
- package/dist/utils/bigint.d.cts +5 -0
- package/dist/utils/bigint.d.cts.map +1 -0
- package/dist/utils/bigint.d.ts +3 -1
- package/dist/utils/bigint.d.ts.map +1 -1
- package/dist/utils/bigint.js +6 -5
- package/dist/utils/bigint.js.map +1 -0
- package/dist/utils/index.cjs +22 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +11 -0
- package/dist/utils/index.d.cts.map +1 -0
- package/dist/utils/index.d.ts +10 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +17 -19
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/text.cjs +11 -0
- package/dist/utils/text.cjs.map +1 -0
- package/dist/utils/text.d.cts +5 -0
- package/dist/utils/text.d.cts.map +1 -0
- package/dist/utils/text.d.ts +4 -1
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/utils/text.js +8 -13
- package/dist/utils/text.js.map +1 -0
- package/package.json +24 -6
- package/dist/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/types/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAoBY,oBAAA;;;;;gCAKoB;;;;;;;;eAQjB;0BACW;uCACa;AAfvC,CAAA;AAAgC,KAkBpB,cAAA,GAAiB,cAlBG,CAAA,CAkBa,aAlBb,EAkB4B,oBAlB5B,EAkBkD,UAlBlD,CAAA,CAAA;AAKA,KAcpB,iBAAA,GAAoB,cAdA,CAAA,CAcgB,aAdhB,EAc+B,oBAd/B,CAAA,CAAA;AAQjB,KAOH,UAAA,GAAa,cAPV,GAO2B,iBAP3B;AACW,KAOd,iBAPc,CAAA,CAAA,CAAA,GAAA,QACa,MAOzB,CAPyB,GAOrB,CAPqB,CAOnB,CAPmB,CAAA,GAAA;EAAO,IAAA,CAAA,EAAA,MAAA;EAGlC,MAAA,CAAA,EAAA,MAAc;EAAA,SAAA,CAAA,EAAA,MAAA;;AAAwD,KAUtE,QAVsE,CAAA,UAAA,MAU7C,iBAV6C,CAU3B,QAV2B,CAAA,CAAA,GAAA,CAAA,CAAA,EAW7E,CAX6E,EAAA,CAAA,EAY7E,iBAZ6E,CAY3D,QAZ2D,CAAA,CAYjD,CAZiD,CAAA,EAAA,GAa7E,OAb6E,CAAA,IAAA,GAAA,IAAA,EAAA,CAAA;AAArD,KAejB,QAAA,GAfiB;EAAc,IAAA,EAAA,KAAA,GAAA,MAAA,GAAA,SAAA,GAAA,OAAA,GAAA,SAAA,GAAA,WAAA;EAC/B,OAAA,EAAA,MAAA;CAAiB;AAAmB,KAkBpC,SAAA,GAlBoC;MAAe,EAAA,MAAA;OAA/B,CAAA,EAAA,MAAA;EAAc,MAAA,EAAA,OAAA;AAC9C,CAAA;AAAsB,KAsBV,MAAA,GAtBU;KAAG,EAuBlB,QAvBkB;MAAiB,EAwBlC,SAxBkC;EAAiB,WAAA,EAAA;IAC/C,KAAA,EAAA;MAAiB,MAAA,EA0Bf,oBA1Be,CAAA,kBAAA,CAAA;MACf,UAAA,EA0BI,SA1BJ,EAAA,GAAA,SAAA;IAAI,CAAA;;EAAG,KAAA,EAAA;IAMT,KAAA,EAAQ;MAAA,KAAA,EA0BP,aA1BO;MAAmC,aAAA,EA2BlC,oBA3BkC;IAAlB,CAAA;;WAEd,EAAA;IAAlB,KAAA,EA6BM,oBA7BN,CAAA,gBAAA,CAAA;;WACA,EAAA;IAAO,KAAA,EA+BD,oBA/BC,CAAA,SAAA,CAAA;EAEA,CAAA;EAIA,OAAA,EAAA;IAKA,KAAM,EAAA;MAAA,MAAA,EAAA,MAAA;MACX,MAAA,EAwBO,MAxBP;IACC,CAAA;;YAIU,EAAA;IAML,IAAA,EAAA,MAAA;IACQ,KAAA,EAAA,OAAA;;eAOV,EAAA;IAKG,KAAA,EAAA,IAAA;EAAM,CAAA;EAiBR,cAAQ,EAAA;IAAA,KAAA,EAAA,IAAA;;iBAEV,EAAA;IAAK,KAAA,EAAA,IAAA;EAGE,CAAA;CAAc;AACpB,KANC,QAMD,CAAA,CAAA,CAAA,GAAA;MALL,CASS;EAAO,MAAA,EARZ,KAQY,EAAA;;UALL,cAAA;WACN;;;;eAII"}
|
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/types/index.ts"],"sourcesContent":["import {\n BlockResponse, BlockResultsResponse,\n} from \"@cosmjs/tendermint-rpc\";\nimport {\n Event,\n} from \"@cosmjs/tendermint-rpc/build/comet38/responses\";\nimport {\n Validator,\n} from \"cosmjs-types/cosmos/staking/v1beta1/staking\";\nimport {\n TxBody,\n} from \"cosmjs-types/cosmos/tx/v1beta1/tx\";\n\nimport {\n EcleciaIndexer,\n} from \"../indexer\";\nimport {\n CircularBuffer,\n} from \"../promise-queue\";\n\nexport type EcleciaIndexerConfig = {\n startHeight?: number\n endHeight?: number\n batchSize: number\n modules: string[]\n getNextHeight: () => number | PromiseLike<number>\n logLevel: \"error\" | \"warn\" | \"info\" | \"http\" | \"verbose\" | \"debug\" | \"silly\"\n rpcUrl: string\n processGenesis?: boolean\n genesisPath?: string\n usePolling?: boolean\n pollingInterval?: number\n minimal?: boolean\n init?: () => Promise<void>\n beginTransaction: () => Promise<void>\n endTransaction: (status: boolean) => Promise<void>\n};\n\nexport type FullBlockQueue = CircularBuffer<[BlockResponse, BlockResultsResponse, Uint8Array]>;\nexport type MinimalBlockQueue = CircularBuffer<[BlockResponse, BlockResultsResponse]>;\nexport type BlockQueue = FullBlockQueue | MinimalBlockQueue;\nexport type WithHeightAndUUID<T> = {\n [K in keyof T]: T[K] & {\n uuid?: string\n height?: number\n timestamp?: string\n };\n};\nexport type EmitFunc<K extends keyof WithHeightAndUUID<EventMap>> = (\n t: K,\n e: WithHeightAndUUID<EventMap>[K]\n) => Promise<void | void[]>;\n\nexport type LogEvent = {\n type: \"log\" | \"info\" | \"warning\" | \"error\" | \"verbose\" | \"transient\"\n message: string\n};\nexport type UUIDEvent = {\n uuid: string\n error?: string\n status: boolean\n};\nexport type Events = {\n log: LogEvent\n uuid: UUIDEvent\n begin_block: {\n value: {\n events: BlockResultsResponse[\"beginBlockEvents\"]\n validators: Validator[] | undefined\n }\n }\n\n block: {\n value: {\n block: BlockResponse\n block_results: BlockResultsResponse\n }\n }\n end_block: {\n value: BlockResultsResponse[\"endBlockEvents\"]\n }\n tx_events: {\n value: BlockResultsResponse[\"results\"]\n }\n tx_memo: {\n value: {\n txHash: string\n txBody: TxBody\n }\n }\n _unhandled: {\n type: string\n event: unknown\n }\n \"periodic/50\": {\n value: null\n }\n \"periodic/100\": {\n value: null\n }\n \"periodic/1000\": {\n value: null\n }\n};\nexport type TxResult<T> = {\n tx: T\n events: Event[]\n};\n\nexport interface IndexingModule {\n indexer: EcleciaIndexer\n name: string\n depends: string[]\n provides: string[]\n setup: () => Promise<void>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n init: (...args: any[]) => void\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let bech32 = require("bech32");
|
|
3
|
+
bech32 = require_rolldown_runtime.__toESM(bech32);
|
|
4
|
+
|
|
5
|
+
//#region src/utils/bech32.ts
|
|
6
|
+
function toHexString(byteArray) {
|
|
7
|
+
return Array.prototype.map.call(byteArray, (byte) => {
|
|
8
|
+
return ("0" + (byte & 255).toString(16)).slice(-2);
|
|
9
|
+
}).join("");
|
|
10
|
+
}
|
|
11
|
+
function keyHashfromAddress(address) {
|
|
12
|
+
try {
|
|
13
|
+
return toHexString(bech32.bech32.fromWords(bech32.bech32.decode(address).words));
|
|
14
|
+
} catch (_e) {
|
|
15
|
+
throw new Error("Could not decode address");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function chainAddressfromKeyhash(prefix, keyhash) {
|
|
19
|
+
const words = bech32.bech32.toWords(Buffer.from(keyhash, "hex"));
|
|
20
|
+
return keyhash !== "" ? bech32.bech32.encode(prefix, words) : "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.chainAddressfromKeyhash = chainAddressfromKeyhash;
|
|
25
|
+
exports.keyHashfromAddress = keyHashfromAddress;
|
|
26
|
+
exports.toHexString = toHexString;
|
|
27
|
+
//# sourceMappingURL=bech32.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bech32.cjs","names":[],"sources":["../../src/utils/bech32.ts"],"sourcesContent":["import {\n bech32,\n} from \"bech32\";\n\nfunction toHexString(byteArray: number[]) {\n return Array.prototype.map\n .call(\n byteArray, (byte) => {\n return (\"0\" + (byte & 0xff).toString(16)).slice(-2);\n },\n )\n .join(\"\");\n}\nfunction keyHashfromAddress(address: string): string {\n try {\n return toHexString(bech32.fromWords(bech32.decode(address).words));\n }\n catch (_e) {\n throw new Error(\"Could not decode address\");\n }\n}\nfunction chainAddressfromKeyhash(prefix: string, keyhash: string) {\n const words = bech32.toWords(Buffer.from(\n keyhash, \"hex\",\n ));\n\n return keyhash !== \"\"\n ? bech32.encode(\n prefix, words,\n )\n : \"\";\n}\n\nexport {\n chainAddressfromKeyhash, keyHashfromAddress, toHexString,\n};\n"],"mappings":";;;;;AAIA,SAAS,YAAY,WAAqB;AACxC,QAAO,MAAM,UAAU,IACpB,KACC,YAAY,SAAS;AACnB,UAAQ,OAAO,OAAO,KAAM,SAAS,GAAG,EAAE,MAAM,GAAG;GAEtD,CACA,KAAK,GAAG;;AAEb,SAAS,mBAAmB,SAAyB;AACnD,KAAI;AACF,SAAO,YAAY,cAAO,UAAU,cAAO,OAAO,QAAQ,CAAC,MAAM,CAAC;UAE7D,IAAI;AACT,QAAM,IAAI,MAAM,2BAA2B;;;AAG/C,SAAS,wBAAwB,QAAgB,SAAiB;CAChE,MAAM,QAAQ,cAAO,QAAQ,OAAO,KAClC,SAAS,MACV,CAAC;AAEF,QAAO,YAAY,KACf,cAAO,OACP,QAAQ,MACT,GACC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/utils/bech32.d.ts
|
|
2
|
+
declare function toHexString(byteArray: number[]): string;
|
|
3
|
+
declare function keyHashfromAddress(address: string): string;
|
|
4
|
+
declare function chainAddressfromKeyhash(prefix: string, keyhash: string): string;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { chainAddressfromKeyhash, keyHashfromAddress, toHexString };
|
|
7
|
+
//# sourceMappingURL=bech32.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bech32.d.cts","names":[],"sources":["../../src/utils/bech32.ts"],"sourcesContent":[],"mappings":";iBAIS,WAAA;iBASA,kBAAA,CATW,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;AAAA,iBAiBX,uBAAA,CARkB,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA"}
|
package/dist/utils/bech32.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
//#region src/utils/bech32.d.ts
|
|
1
2
|
declare function toHexString(byteArray: number[]): string;
|
|
2
3
|
declare function keyHashfromAddress(address: string): string;
|
|
3
4
|
declare function chainAddressfromKeyhash(prefix: string, keyhash: string): string;
|
|
4
|
-
|
|
5
|
+
//#endregion
|
|
6
|
+
export { chainAddressfromKeyhash, keyHashfromAddress, toHexString };
|
|
5
7
|
//# sourceMappingURL=bech32.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bech32.d.ts","
|
|
1
|
+
{"version":3,"file":"bech32.d.ts","names":[],"sources":["../../src/utils/bech32.ts"],"sourcesContent":[],"mappings":";iBAIS,WAAA;iBASA,kBAAA,CATW,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;AAAA,iBAiBX,uBAAA,CARkB,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA"}
|
package/dist/utils/bech32.js
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.keyHashfromAddress = keyHashfromAddress;
|
|
5
|
-
exports.toHexString = toHexString;
|
|
6
|
-
const bech32_1 = require("bech32");
|
|
1
|
+
import { bech32 } from "bech32";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/bech32.ts
|
|
7
4
|
function toHexString(byteArray) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
.join("");
|
|
5
|
+
return Array.prototype.map.call(byteArray, (byte) => {
|
|
6
|
+
return ("0" + (byte & 255).toString(16)).slice(-2);
|
|
7
|
+
}).join("");
|
|
13
8
|
}
|
|
14
9
|
function keyHashfromAddress(address) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
10
|
+
try {
|
|
11
|
+
return toHexString(bech32.fromWords(bech32.decode(address).words));
|
|
12
|
+
} catch (_e) {
|
|
13
|
+
throw new Error("Could not decode address");
|
|
14
|
+
}
|
|
21
15
|
}
|
|
22
16
|
function chainAddressfromKeyhash(prefix, keyhash) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
? bech32_1.bech32.encode(prefix, words)
|
|
26
|
-
: "";
|
|
17
|
+
const words = bech32.toWords(Buffer.from(keyhash, "hex"));
|
|
18
|
+
return keyhash !== "" ? bech32.encode(prefix, words) : "";
|
|
27
19
|
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { chainAddressfromKeyhash, keyHashfromAddress, toHexString };
|
|
23
|
+
//# sourceMappingURL=bech32.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bech32.js","names":[],"sources":["../../src/utils/bech32.ts"],"sourcesContent":["import {\n bech32,\n} from \"bech32\";\n\nfunction toHexString(byteArray: number[]) {\n return Array.prototype.map\n .call(\n byteArray, (byte) => {\n return (\"0\" + (byte & 0xff).toString(16)).slice(-2);\n },\n )\n .join(\"\");\n}\nfunction keyHashfromAddress(address: string): string {\n try {\n return toHexString(bech32.fromWords(bech32.decode(address).words));\n }\n catch (_e) {\n throw new Error(\"Could not decode address\");\n }\n}\nfunction chainAddressfromKeyhash(prefix: string, keyhash: string) {\n const words = bech32.toWords(Buffer.from(\n keyhash, \"hex\",\n ));\n\n return keyhash !== \"\"\n ? bech32.encode(\n prefix, words,\n )\n : \"\";\n}\n\nexport {\n chainAddressfromKeyhash, keyHashfromAddress, toHexString,\n};\n"],"mappings":";;;AAIA,SAAS,YAAY,WAAqB;AACxC,QAAO,MAAM,UAAU,IACpB,KACC,YAAY,SAAS;AACnB,UAAQ,OAAO,OAAO,KAAM,SAAS,GAAG,EAAE,MAAM,GAAG;GAEtD,CACA,KAAK,GAAG;;AAEb,SAAS,mBAAmB,SAAyB;AACnD,KAAI;AACF,SAAO,YAAY,OAAO,UAAU,OAAO,OAAO,QAAQ,CAAC,MAAM,CAAC;UAE7D,IAAI;AACT,QAAM,IAAI,MAAM,2BAA2B;;;AAG/C,SAAS,wBAAwB,QAAgB,SAAiB;CAChE,MAAM,QAAQ,OAAO,QAAQ,OAAO,KAClC,SAAS,MACV,CAAC;AAEF,QAAO,YAAY,KACf,OAAO,OACP,QAAQ,MACT,GACC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/bigint.ts
|
|
3
|
+
const toPlainObject = (obj) => {
|
|
4
|
+
return JSON.parse(JSON.stringify(obj, (key, value) => typeof value === "bigint" ? value.toString() : value));
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.toPlainObject = toPlainObject;
|
|
9
|
+
//# sourceMappingURL=bigint.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigint.cjs","names":[],"sources":["../../src/utils/bigint.ts"],"sourcesContent":["const toPlainObject = (obj: unknown) => {\n return JSON.parse(JSON.stringify(obj,\n (key, value) => (typeof value === \"bigint\" ? value.toString() : value), // return everything else unchanged\n ));\n};\nexport {\n toPlainObject,\n};\n"],"mappings":";;AAAA,MAAM,iBAAiB,QAAiB;AACtC,QAAO,KAAK,MAAM,KAAK,UAAU,MAC9B,KAAK,UAAW,OAAO,UAAU,WAAW,MAAM,UAAU,GAAG,MACjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigint.d.cts","names":[],"sources":["../../src/utils/bigint.ts"],"sourcesContent":[],"mappings":";cAAM"}
|
package/dist/utils/bigint.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.d.ts","
|
|
1
|
+
{"version":3,"file":"bigint.d.ts","names":[],"sources":["../../src/utils/bigint.ts"],"sourcesContent":[],"mappings":";cAAM"}
|
package/dist/utils/bigint.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toPlainObject = void 0;
|
|
1
|
+
//#region src/utils/bigint.ts
|
|
4
2
|
const toPlainObject = (obj) => {
|
|
5
|
-
|
|
3
|
+
return JSON.parse(JSON.stringify(obj, (key, value) => typeof value === "bigint" ? value.toString() : value));
|
|
6
4
|
};
|
|
7
|
-
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { toPlainObject };
|
|
8
|
+
//# sourceMappingURL=bigint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigint.js","names":[],"sources":["../../src/utils/bigint.ts"],"sourcesContent":["const toPlainObject = (obj: unknown) => {\n return JSON.parse(JSON.stringify(obj,\n (key, value) => (typeof value === \"bigint\" ? value.toString() : value), // return everything else unchanged\n ));\n};\nexport {\n toPlainObject,\n};\n"],"mappings":";AAAA,MAAM,iBAAiB,QAAiB;AACtC,QAAO,KAAK,MAAM,KAAK,UAAU,MAC9B,KAAK,UAAW,OAAO,UAAU,WAAW,MAAM,UAAU,GAAG,MACjE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_bech32 = require('./bech32.cjs');
|
|
3
|
+
const require_bigint = require('./bigint.cjs');
|
|
4
|
+
const require_text = require('./text.cjs');
|
|
5
|
+
|
|
6
|
+
//#region src/utils/index.ts
|
|
7
|
+
var utils_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
8
|
+
chainAddressfromKeyhash: () => require_bech32.chainAddressfromKeyhash,
|
|
9
|
+
decodeAttr: () => require_text.decodeAttr,
|
|
10
|
+
keyHashfromAddress: () => require_bech32.keyHashfromAddress,
|
|
11
|
+
toHexString: () => require_bech32.toHexString,
|
|
12
|
+
toPlainObject: () => require_bigint.toPlainObject
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
Object.defineProperty(exports, 'utils_exports', {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return utils_exports;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from \"./bech32\";\nexport * from \"./bigint\";\nexport * from \"./text\";\n"],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { chainAddressfromKeyhash, keyHashfromAddress, toHexString } from "./bech32.cjs";
|
|
2
|
+
import { toPlainObject } from "./bigint.cjs";
|
|
3
|
+
import { decodeAttr } from "./text.cjs";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/index.d.ts
|
|
6
|
+
declare namespace index_d_exports {
|
|
7
|
+
export { chainAddressfromKeyhash, decodeAttr, keyHashfromAddress, toHexString, toPlainObject };
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { index_d_exports };
|
|
11
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":[],"mappings":""}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { chainAddressfromKeyhash, keyHashfromAddress, toHexString } from "./bech32.js";
|
|
2
|
+
import { toPlainObject } from "./bigint.js";
|
|
3
|
+
import { decodeAttr } from "./text.js";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/index.d.ts
|
|
6
|
+
declare namespace index_d_exports {
|
|
7
|
+
export { chainAddressfromKeyhash, decodeAttr, keyHashfromAddress, toHexString, toPlainObject };
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { index_d_exports };
|
|
4
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":[],"mappings":""}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./bigint"), exports);
|
|
19
|
-
__exportStar(require("./text"), exports);
|
|
1
|
+
import { __export } from "../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { chainAddressfromKeyhash, keyHashfromAddress, toHexString } from "./bech32.js";
|
|
3
|
+
import { toPlainObject } from "./bigint.js";
|
|
4
|
+
import { decodeAttr } from "./text.js";
|
|
5
|
+
|
|
6
|
+
//#region src/utils/index.ts
|
|
7
|
+
var utils_exports = /* @__PURE__ */ __export({
|
|
8
|
+
chainAddressfromKeyhash: () => chainAddressfromKeyhash,
|
|
9
|
+
decodeAttr: () => decodeAttr,
|
|
10
|
+
keyHashfromAddress: () => keyHashfromAddress,
|
|
11
|
+
toHexString: () => toHexString,
|
|
12
|
+
toPlainObject: () => toPlainObject
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { utils_exports };
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from \"./bech32\";\nexport * from \"./bigint\";\nexport * from \"./text\";\n"],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/text.ts
|
|
3
|
+
const decodeAttr = (x) => {
|
|
4
|
+
if (typeof x === "string") return x;
|
|
5
|
+
else if (x instanceof Uint8Array) return Buffer.from(x).toString();
|
|
6
|
+
else return "";
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.decodeAttr = decodeAttr;
|
|
11
|
+
//# sourceMappingURL=text.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.cjs","names":[],"sources":["../../src/utils/text.ts"],"sourcesContent":["export const decodeAttr = (x: Uint8Array | string) => {\n if (typeof x === \"string\") {\n return x;\n }\n else if (x instanceof Uint8Array) {\n return Buffer.from(x).toString();\n }\n else {\n return \"\";\n }\n};\n"],"mappings":";;AAAA,MAAa,cAAc,MAA2B;AACpD,KAAI,OAAO,MAAM,SACf,QAAO;UAEA,aAAa,WACpB,QAAO,OAAO,KAAK,EAAE,CAAC,UAAU;KAGhC,QAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.cts","names":[],"sources":["../../src/utils/text.ts"],"sourcesContent":[],"mappings":";cAAa,gBAAiB"}
|
package/dist/utils/text.d.ts
CHANGED
package/dist/utils/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","
|
|
1
|
+
{"version":3,"file":"text.d.ts","names":[],"sources":["../../src/utils/text.ts"],"sourcesContent":[],"mappings":";cAAa,gBAAiB"}
|
package/dist/utils/text.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeAttr = void 0;
|
|
1
|
+
//#region src/utils/text.ts
|
|
4
2
|
const decodeAttr = (x) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
else if (x instanceof Uint8Array) {
|
|
9
|
-
return Buffer.from(x).toString();
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return "";
|
|
13
|
-
}
|
|
3
|
+
if (typeof x === "string") return x;
|
|
4
|
+
else if (x instanceof Uint8Array) return Buffer.from(x).toString();
|
|
5
|
+
else return "";
|
|
14
6
|
};
|
|
15
|
-
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { decodeAttr };
|
|
10
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","names":[],"sources":["../../src/utils/text.ts"],"sourcesContent":["export const decodeAttr = (x: Uint8Array | string) => {\n if (typeof x === \"string\") {\n return x;\n }\n else if (x instanceof Uint8Array) {\n return Buffer.from(x).toString();\n }\n else {\n return \"\";\n }\n};\n"],"mappings":";AAAA,MAAa,cAAc,MAA2B;AACpD,KAAI,OAAO,MAAM,SACf,QAAO;UAEA,aAAa,WACpB,QAAO,OAAO,KAAK,EAAE,CAAC,UAAU;KAGhC,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclesia/indexer-engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Core eclesia indexer engine",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
5
|
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
6
|
+
"build": "tsc --noEmit && tsdown",
|
|
9
7
|
"lint": "eslint",
|
|
10
8
|
"lint:fix": "eslint --fix",
|
|
11
9
|
"test": "vitest",
|
|
12
|
-
"start": "node
|
|
10
|
+
"start": "node dist/index.mjs"
|
|
13
11
|
},
|
|
14
12
|
"files": [
|
|
15
13
|
"dist/",
|
|
16
14
|
"scripts/",
|
|
17
15
|
"templates"
|
|
18
16
|
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=20"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
19
21
|
"keywords": [],
|
|
20
22
|
"contributors": [
|
|
21
23
|
"Alex M.<alex.megalokonomos@tendermint.com>"
|
|
22
24
|
],
|
|
23
25
|
"license": "Apache-2.0",
|
|
24
26
|
"devDependencies": {
|
|
27
|
+
"@arethetypeswrong/core": "^0.18.2",
|
|
25
28
|
"@eslint/js": "^9.35.0",
|
|
26
29
|
"@stylistic/eslint-plugin": "^5.3.1",
|
|
27
30
|
"@types/node": "^22.14.0",
|
|
@@ -30,6 +33,7 @@
|
|
|
30
33
|
"@types/uuid": "^11.0.0",
|
|
31
34
|
"eslint": "^9.35.0",
|
|
32
35
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
36
|
+
"tsdown": "^0.15.2",
|
|
33
37
|
"typescript": "^5.9.2",
|
|
34
38
|
"typescript-eslint": "^8.44.0",
|
|
35
39
|
"vitest": "^3.2.4"
|
|
@@ -48,5 +52,19 @@
|
|
|
48
52
|
"uuid": "^13.0.0",
|
|
49
53
|
"winston": "^3.17.0"
|
|
50
54
|
},
|
|
51
|
-
"
|
|
55
|
+
"main": "dist/index.cjs",
|
|
56
|
+
"module": "dist/index.js",
|
|
57
|
+
"types": "dist/index.d.cts",
|
|
58
|
+
"exports": {
|
|
59
|
+
".": {
|
|
60
|
+
"import": {
|
|
61
|
+
"types": "./dist/index.d.ts",
|
|
62
|
+
"default": "./dist/index.js"
|
|
63
|
+
},
|
|
64
|
+
"require": "./dist/index.cjs",
|
|
65
|
+
"types": "./dist/index.d.ts",
|
|
66
|
+
"default": "./dist/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./package.json": "./package.json"
|
|
69
|
+
}
|
|
52
70
|
}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|