@indexing/jiti 0.0.44 → 0.0.45
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/main.js +15 -14
- package/dist/main.js.map +1 -1
- package/dist/module.js +15 -14
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -79,7 +79,7 @@ const $6bd2ca253e883278$var$PARTIAL_VM_TO_NETWORK_MAP = {
|
|
|
79
79
|
"TON"
|
|
80
80
|
],
|
|
81
81
|
UTXO: [
|
|
82
|
-
"
|
|
82
|
+
"BITCOIN",
|
|
83
83
|
"BITCOIN_TESTNET",
|
|
84
84
|
"DOGECOIN",
|
|
85
85
|
"LITECOIN"
|
|
@@ -93,7 +93,8 @@ const $6bd2ca253e883278$var$PARTIAL_NETWORK_TO_VM_MAP = Object.entries($6bd2ca25
|
|
|
93
93
|
}), {});
|
|
94
94
|
function $6bd2ca253e883278$export$ae001c77434c5340(block) {
|
|
95
95
|
if (!block) return null;
|
|
96
|
-
|
|
96
|
+
const network = block._network.toUpperCase();
|
|
97
|
+
if ($6bd2ca253e883278$var$PARTIAL_NETWORK_TO_VM_MAP[network]) return $6bd2ca253e883278$var$PARTIAL_NETWORK_TO_VM_MAP[network];
|
|
97
98
|
if (!!block.block) return "COSMOS";
|
|
98
99
|
// "safe" default
|
|
99
100
|
return "EVM";
|
|
@@ -105,7 +106,7 @@ const $25d5bdd23cba31eb$export$ace043a4f2efe476 = {
|
|
|
105
106
|
match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "APTOS",
|
|
106
107
|
transform (block) {
|
|
107
108
|
let transfers = [];
|
|
108
|
-
for (const tx of block.transactions){
|
|
109
|
+
for (const tx of block.transactions || []){
|
|
109
110
|
if (!tx?.events || !Array.isArray(tx.events)) continue;
|
|
110
111
|
const timestamp = tx.timestamp ? new Date(parseInt(tx.timestamp, 10) / 1000).toISOString() : null;
|
|
111
112
|
const gasUsed = BigInt(tx.gas_used || "0");
|
|
@@ -320,7 +321,7 @@ const $60d24c82dc5feb2e$export$893111d8d332e195 = {
|
|
|
320
321
|
transform (block) {
|
|
321
322
|
let transfers = [];
|
|
322
323
|
const blockTimestamp = new Date(block.timestamp * 1000).toISOString();
|
|
323
|
-
for (const tx of block.transactions){
|
|
324
|
+
for (const tx of block.transactions || []){
|
|
324
325
|
const typedTx = tx;
|
|
325
326
|
if (!Array.isArray(typedTx.operations)) continue;
|
|
326
327
|
const transactionHash = typedTx.transaction_identifier?.hash || "";
|
|
@@ -645,7 +646,7 @@ function $414c83047563e72e$export$685b7dc2197cd06c(rawBlock) {
|
|
|
645
646
|
for (const k of [
|
|
646
647
|
"miner"
|
|
647
648
|
])rawBlock[k] = (0, $596a656635c74d50$export$db81f9ea057ab646)(rawBlock[k]);
|
|
648
|
-
rawBlock.transactions = rawBlock.transactions.map((tx)=>{
|
|
649
|
+
rawBlock.transactions = (rawBlock.transactions || []).map((tx)=>{
|
|
649
650
|
for (const k of [
|
|
650
651
|
"blockNumber",
|
|
651
652
|
"cumulativeGasUsed",
|
|
@@ -708,7 +709,7 @@ const $8deaea1ef39b6485$export$5beebc5708fabf3c = {
|
|
|
708
709
|
transform (block, _ctx) {
|
|
709
710
|
const TOKEN_TYPES = _ctx.params.tokenTypes || [];
|
|
710
711
|
let transfers = [];
|
|
711
|
-
for (const tx of block.transactions){
|
|
712
|
+
for (const tx of block.transactions || []){
|
|
712
713
|
if (!tx.receipt) continue;
|
|
713
714
|
const timestamp = new Date(block.timestamp * 1000).toISOString();
|
|
714
715
|
const transactionGasFee = BigInt(tx.receipt.gasUsed) * BigInt(tx.receipt.effectiveGasPrice);
|
|
@@ -934,7 +935,7 @@ const $2e46ec862e47c14f$export$400f08bfae9ee97f = {
|
|
|
934
935
|
transform (block) {
|
|
935
936
|
let transfers = [];
|
|
936
937
|
if (!Array.isArray(block.transactions)) return [];
|
|
937
|
-
for (const rawTx of block.transactions){
|
|
938
|
+
for (const rawTx of block.transactions || []){
|
|
938
939
|
const typedTx = rawTx;
|
|
939
940
|
if (typedTx.TransactionType !== "Payment") continue;
|
|
940
941
|
const deliveredOrAmount = typedTx.metaData?.delivered_amount ?? typedTx.Amount ?? "0";
|
|
@@ -1098,7 +1099,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
|
|
|
1098
1099
|
match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "SVM",
|
|
1099
1100
|
transform (block) {
|
|
1100
1101
|
let transfers = [];
|
|
1101
|
-
for (const tx of block.transactions){
|
|
1102
|
+
for (const tx of block.transactions || []){
|
|
1102
1103
|
const svmTx = tx;
|
|
1103
1104
|
const txHash = svmTx.transaction.signatures[0];
|
|
1104
1105
|
const timestamp = block.blockTime ? new Date(block.blockTime * 1000).toISOString() : null;
|
|
@@ -1511,7 +1512,7 @@ const $fc745f3cb8eb3f52$export$36783fc9701281c6 = {
|
|
|
1511
1512
|
transform (block) {
|
|
1512
1513
|
let transfers = [];
|
|
1513
1514
|
if (!Array.isArray(block.transactions)) return [];
|
|
1514
|
-
for (const tx of block.transactions){
|
|
1515
|
+
for (const tx of block.transactions || []){
|
|
1515
1516
|
const typedTx = tx;
|
|
1516
1517
|
const timestamp = block.timestamp ? new Date(block.timestamp * 1000).toISOString() : null;
|
|
1517
1518
|
let transactionGasFee = BigInt(0);
|
|
@@ -1569,7 +1570,7 @@ const $3478cd776d185339$export$681f497010b17679 = {
|
|
|
1569
1570
|
match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "STELLAR",
|
|
1570
1571
|
transform (block) {
|
|
1571
1572
|
let transfers = [];
|
|
1572
|
-
for (const tx of block.transactions){
|
|
1573
|
+
for (const tx of block.transactions || []){
|
|
1573
1574
|
const typedTx = tx;
|
|
1574
1575
|
for (const op of typedTx.operations)if (op.type === "payment") transfers.push({
|
|
1575
1576
|
amount: BigInt(op.amount.replace(".", "")),
|
|
@@ -1887,7 +1888,7 @@ const $9af31dbb692f94e3$var$filterValuesTemplate = {
|
|
|
1887
1888
|
case "APTOS":
|
|
1888
1889
|
{
|
|
1889
1890
|
const values = new Set();
|
|
1890
|
-
for (const tx of block.transactions){
|
|
1891
|
+
for (const tx of block.transactions || []){
|
|
1891
1892
|
values.add(tx.sender);
|
|
1892
1893
|
if (!Array.isArray(tx.events)) continue;
|
|
1893
1894
|
for (const evt of tx.events)values.add(evt.guid?.account_address);
|
|
@@ -1977,7 +1978,7 @@ const $9af31dbb692f94e3$var$filterValuesTemplate = {
|
|
|
1977
1978
|
case "STELLAR":
|
|
1978
1979
|
{
|
|
1979
1980
|
const values = new Set();
|
|
1980
|
-
for (const tx of block.transactions){
|
|
1981
|
+
for (const tx of block.transactions || []){
|
|
1981
1982
|
values.add(tx.source_account);
|
|
1982
1983
|
tx.operations?.forEach((op)=>{
|
|
1983
1984
|
values.add(op.from);
|
|
@@ -2005,7 +2006,7 @@ const $9af31dbb692f94e3$var$filterValuesTemplate = {
|
|
|
2005
2006
|
case "SUI":
|
|
2006
2007
|
{
|
|
2007
2008
|
const values = new Set();
|
|
2008
|
-
for (const tx of block.transactions){
|
|
2009
|
+
for (const tx of block.transactions || []){
|
|
2009
2010
|
values.add(tx.sender);
|
|
2010
2011
|
tx.balanceChanges?.forEach((bc)=>{
|
|
2011
2012
|
values.add(bc.owner);
|
|
@@ -2018,7 +2019,7 @@ const $9af31dbb692f94e3$var$filterValuesTemplate = {
|
|
|
2018
2019
|
case "SVM":
|
|
2019
2020
|
{
|
|
2020
2021
|
const values = new Set();
|
|
2021
|
-
for (const tx of block.transactions){
|
|
2022
|
+
for (const tx of block.transactions || []){
|
|
2022
2023
|
tx.transaction.message.accountKeys.forEach((a)=>values.add(typeof a === "string" ? a : a.pubkey));
|
|
2023
2024
|
tx.meta.postTokenBalances.concat(tx.meta.preTokenBalances).forEach((tb)=>{
|
|
2024
2025
|
values.add(tb.owner);
|