@indexing/jiti 0.0.56 → 0.0.58

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 CHANGED
@@ -1,5 +1,5 @@
1
- var $8zHUo$viem = require("viem");
2
1
  var $8zHUo$buffer = require("buffer");
2
+ var $8zHUo$viem = require("viem");
3
3
  var $8zHUo$tronweb = require("tronweb");
4
4
  var $8zHUo$cosmjsprotosigning = require("@cosmjs/proto-signing");
5
5
  var $8zHUo$cosmjsstargate = require("@cosmjs/stargate");
@@ -39,9 +39,9 @@ var $faefaad95e5fcca0$exports = {};
39
39
 
40
40
 
41
41
  var $d7167569386d0d4c$exports = {};
42
- var $b8691f253b6baa6e$exports = {};
42
+ var $56acd58307ebf8e6$exports = {};
43
43
 
44
- $parcel$export($b8691f253b6baa6e$exports, "blockToTimestamp", () => $b8691f253b6baa6e$export$ec64f6024312bb14);
44
+ $parcel$export($56acd58307ebf8e6$exports, "blockToBeat", () => $56acd58307ebf8e6$export$363ea1acea6aebd6);
45
45
  var $6bd2ca253e883278$exports = {};
46
46
 
47
47
  $parcel$export($6bd2ca253e883278$exports, "blockToVM", () => $6bd2ca253e883278$export$ae001c77434c5340);
@@ -113,6 +113,122 @@ function $6bd2ca253e883278$export$ae001c77434c5340(block) {
113
113
  }
114
114
 
115
115
 
116
+ function $56acd58307ebf8e6$export$363ea1acea6aebd6(block) {
117
+ const vm = (0, $6bd2ca253e883278$export$ae001c77434c5340)(block);
118
+ switch(vm){
119
+ case "APTOS":
120
+ return parseInt(block.block_height, 10);
121
+ case "CARDANO":
122
+ return block.block_identifier.index;
123
+ case "COSMOS":
124
+ {
125
+ const typedBlock = block;
126
+ return Number(typedBlock.block.header.height);
127
+ }
128
+ case "EVM":
129
+ return block.number;
130
+ case "FILECOIN":
131
+ return block.Height;
132
+ case "RIPPLE":
133
+ return parseInt(block.ledger_index, 10);
134
+ case "STARKNET":
135
+ return block.block_number;
136
+ case "STELLAR":
137
+ return block.sequence;
138
+ case "SUBSTRATE":
139
+ return block.blockNumber;
140
+ case "SUI":
141
+ return parseInt(block.sequence, 10);
142
+ case "SVM":
143
+ return block.blockHeight;
144
+ case "TON":
145
+ return block.seqno;
146
+ case "UTXO":
147
+ return block.height;
148
+ }
149
+ return null;
150
+ }
151
+
152
+
153
+ var $77809331c5210b08$exports = {};
154
+
155
+ $parcel$export($77809331c5210b08$exports, "blockToTransactionHashes", () => $77809331c5210b08$export$eda46897866e27cc);
156
+
157
+
158
+
159
+ var $77809331c5210b08$require$Buffer = $8zHUo$buffer.Buffer;
160
+ function $77809331c5210b08$export$eda46897866e27cc(block) {
161
+ const vm = (0, $6bd2ca253e883278$export$ae001c77434c5340)(block);
162
+ const hashes = new Set();
163
+ try {
164
+ switch(vm){
165
+ case "APTOS":
166
+ for (const tx of block.transactions || [])hashes.add(tx.hash);
167
+ break;
168
+ case "CARDANO":
169
+ for (const tx of block.transactions || []){
170
+ const typedTx = tx;
171
+ hashes.add(typedTx.transaction_identifier?.hash);
172
+ }
173
+ break;
174
+ case "COSMOS":
175
+ {
176
+ const typedBlock = block;
177
+ for (const txRaw of typedBlock.block.data.txs || []){
178
+ const txHash = (0, $8zHUo$viem.sha256)(new Uint8Array($77809331c5210b08$require$Buffer.from(txRaw, "base64")));
179
+ hashes.add(txHash.slice(2).toUpperCase());
180
+ }
181
+ break;
182
+ }
183
+ case "EVM":
184
+ for (const tx of block.transactions)hashes.add(tx.hash);
185
+ break;
186
+ case "FILECOIN":
187
+ {
188
+ const typedBlock = block;
189
+ for (const msgGroup of typedBlock.messages){
190
+ const secpkMessages = msgGroup.blockMessages.SecpkMessages || [];
191
+ for (const msg of secpkMessages)hashes.add(msg.CID["/"]);
192
+ }
193
+ break;
194
+ }
195
+ case "RIPPLE":
196
+ for (const tx of block.transactions || [])hashes.add(tx.hash);
197
+ break;
198
+ case "STARKNET":
199
+ for (const tx of block.transactions || [])hashes.add(tx.transaction_hash);
200
+ break;
201
+ case "STELLAR":
202
+ for (const tx of block.transactions || [])hashes.add(tx.hash);
203
+ break;
204
+ case "SUBSTRATE":
205
+ for (const extrinsic of block.extrinsics)hashes.add(extrinsic.hash);
206
+ break;
207
+ case "SUI":
208
+ for (const tx of block.transactions || [])hashes.add(tx.digest);
209
+ break;
210
+ case "SVM":
211
+ for (const tx of block.transactions || [])hashes.add(tx.transaction.signatures[0]);
212
+ break;
213
+ case "TON":
214
+ for (const shard of block.shards || [])for (const tx of shard.transactions || [])hashes.add(tx.transacion_id.hash);
215
+ break;
216
+ case "UTXO":
217
+ for (const tx of block.tx)hashes.add(tx.txid);
218
+ break;
219
+ }
220
+ return Array.from(hashes).filter((v)=>v?.length);
221
+ } catch (e) {
222
+ console.error(e);
223
+ return [];
224
+ }
225
+ }
226
+
227
+
228
+ var $b8691f253b6baa6e$exports = {};
229
+
230
+ $parcel$export($b8691f253b6baa6e$exports, "blockToTimestamp", () => $b8691f253b6baa6e$export$ec64f6024312bb14);
231
+
116
232
  function $b8691f253b6baa6e$export$ec64f6024312bb14(block) {
117
233
  const vm = (0, $6bd2ca253e883278$export$ae001c77434c5340)(block);
118
234
  switch(vm){
@@ -452,6 +568,8 @@ function $7fd98ef3967673b0$export$146821f89c094be4(evt) {
452
568
  }
453
569
 
454
570
 
571
+ $parcel$exportWildcard($d7167569386d0d4c$exports, $56acd58307ebf8e6$exports);
572
+ $parcel$exportWildcard($d7167569386d0d4c$exports, $77809331c5210b08$exports);
455
573
  $parcel$exportWildcard($d7167569386d0d4c$exports, $b8691f253b6baa6e$exports);
456
574
  $parcel$exportWildcard($d7167569386d0d4c$exports, $6bd2ca253e883278$exports);
457
575
  $parcel$exportWildcard($d7167569386d0d4c$exports, $596a656635c74d50$exports);
@@ -781,15 +899,16 @@ const $f9ab50a3e879ac1c$export$b5fd4920e8b7d913 = {
781
899
  ].includes(message.typeUrl)) {
782
900
  const decodedMsg = registry.decode(message);
783
901
  transfers.push({
902
+ amount: BigInt(decodedMsg.token?.amount || decodedMsg.amount?.find((a)=>a?.amount)?.amount || 0),
784
903
  blockNumber: blockNumber,
785
904
  from: decodedMsg.sender || decodedMsg.fromAddress,
905
+ memo: decodedMsg.memo,
906
+ timestamp: blockTimestamp,
786
907
  to: decodedMsg.receiver || decodedMsg.toAddress,
787
- amount: BigInt(decodedMsg.token?.amount || decodedMsg.amount?.find((a)=>a?.amount)?.amount || 0),
788
908
  token: decodedMsg.token?.denom || decodedMsg.amount?.find((a)=>a?.denom)?.denom,
789
909
  tokenType: "NATIVE",
790
- timestamp: blockTimestamp,
791
- transactionHash: txHash.slice(2).toUpperCase(),
792
- transactionGasFee: transactionGasFee
910
+ transactionGasFee: transactionGasFee,
911
+ transactionHash: txHash.slice(2).toUpperCase()
793
912
  });
794
913
  }
795
914
  }
@@ -799,21 +918,21 @@ const $f9ab50a3e879ac1c$export$b5fd4920e8b7d913 = {
799
918
  {
800
919
  params: {
801
920
  network: "COSMOS",
802
- walletAddress: "cosmos1x4qvmtcfc02pklttfgxzdccxcsyzklrxavteyz",
803
- contractAddress: "ibc/F663521BF1836B00F5F177680F74BFB9A8B5654A694D0D2BC249E03CF2509013"
921
+ walletAddress: "cosmos1q9d0rjr687a37lckllujf6dmtnympx9g5ca37u"
804
922
  },
805
- payload: "https://jiti.indexing.co/networks/cosmos/24419691",
923
+ payload: "https://jiti.indexing.co/networks/cosmos/28168958",
806
924
  output: [
807
925
  {
808
- blockNumber: 24419691,
809
- from: "cosmos1x4qvmtcfc02pklttfgxzdccxcsyzklrxavteyz",
810
- to: "noble1x4qvmtcfc02pklttfgxzdccxcsyzklrx4073uv",
811
- amount: 500000n,
812
- token: "ibc/F663521BF1836B00F5F177680F74BFB9A8B5654A694D0D2BC249E03CF2509013",
926
+ amount: 31684895n,
927
+ blockNumber: 28168958,
928
+ from: "cosmos1q9d0rjr687a37lckllujf6dmtnympx9g5ca37u",
929
+ memo: '{"wasm":{"contract":"neutron1zvesudsdfxusz06jztpph4d3h5x6veglqsspxns2v2jqml9nhywskcc923","msg":{"swap_and_action":{"user_swap":{"swap_exact_asset_in":{"swap_venue_name":"neutron-duality","operations":[{"pool":"564172","denom_in":"ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9","denom_out":"ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81"},{"pool":"495849","denom_in":"ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81","denom_out":"ibc/376222D6D9DAE23092E29740E56B758580935A6D77C24C2ABD57A6A78A1F3955"}]}},"min_asset":{"native":{"denom":"ibc/376222D6D9DAE23092E29740E56B758580935A6D77C24C2ABD57A6A78A1F3955","amount":"817899530"}},"timeout_timestamp":1761673107828834380,"post_swap_action":{"ibc_transfer":{"ibc_info":{"source_channel":"channel-10","receiver":"osmo1q9d0rjr687a37lckllujf6dmtnympx9gurwpgw","fee":{"recv_fee":[],"ack_fee":[{"denom":"untrn","amount":"100000"}],"timeout_fee":[{"denom":"untrn","amount":"100000"}]},"memo":"","recover_address":"neutron1q9d0rjr687a37lckllujf6dmtnympx9gs85nym"},"fee_swap":{"swap_venue_name":"neutron-duality","operations":[{"pool":"2769551","denom_in":"ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9","denom_out":"ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81"},{"pool":"717963","denom_in":"ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81","denom_out":"untrn"}],"refund_address":"neutron1q9d0rjr687a37lckllujf6dmtnympx9gs85nym"}}},"affiliates":[{"basis_points_fee":"60","address":"neutron15tw0qy5sspq2sgef77vhhykhtphlrv57ju78e4"},{"basis_points_fee":"15","address":"neutron14gf6xslwe9phn2z965t4dcu7vchhthfgqw99g3"}]}}}}',
930
+ timestamp: "2025-10-28T17:33:35.080Z",
931
+ to: "neutron1zvesudsdfxusz06jztpph4d3h5x6veglqsspxns2v2jqml9nhywskcc923",
932
+ token: "uatom",
813
933
  tokenType: "NATIVE",
814
- timestamp: "2025-02-14T21:48:22.809Z",
815
- transactionHash: "963D4D7BB59C1280F58A7ECA2F1934E2AA005109A989193C815C7B98EDCD7445",
816
- transactionGasFee: 4860n
934
+ transactionGasFee: 2201n,
935
+ transactionHash: "DA3680301DEB2C5D4F12F695C252CB75612792952AD12A699C80B261E8A029E3"
817
936
  }
818
937
  ]
819
938
  }
@@ -1073,6 +1192,7 @@ const $2e46ec862e47c14f$export$400f08bfae9ee97f = {
1073
1192
  amount: parsedAmount,
1074
1193
  blockNumber: parseInt(block.ledger_index, 10),
1075
1194
  from: typedTx.Account ?? "UNKNOWN",
1195
+ memo: typedTx.DestinationTag,
1076
1196
  timestamp: block.close_time_iso ? block.close_time_iso : null,
1077
1197
  to: typedTx.Destination ?? "UNKNOWN",
1078
1198
  token: tokenSymbol,
@@ -1087,21 +1207,22 @@ const $2e46ec862e47c14f$export$400f08bfae9ee97f = {
1087
1207
  {
1088
1208
  params: {
1089
1209
  network: "RIPPLE",
1090
- walletAddress: "rUUgoiJmjTPEbxfZ4RsS9pVS9Kv813Wpui",
1210
+ walletAddress: "rnDGxzUM2snx58Bvyn72xhJKqvkDxo2tQm",
1091
1211
  contractAddress: ""
1092
1212
  },
1093
1213
  payload: "https://jiti.indexing.co/networks/ripple/88104659",
1094
1214
  output: [
1095
1215
  {
1096
- amount: 238n,
1216
+ amount: 43110000n,
1097
1217
  blockNumber: 88104659,
1098
- from: "rMAGnTv4eMWktZnhKa5cHcDiY84ZiKUaQm",
1218
+ from: "rMvCasZ9cohYrSZRNYPTZfoaaSUQMfgQ8G",
1219
+ memo: 30195674,
1099
1220
  timestamp: "2024-05-19T22:18:52Z",
1100
- to: "rUUgoiJmjTPEbxfZ4RsS9pVS9Kv813Wpui",
1221
+ to: "rnDGxzUM2snx58Bvyn72xhJKqvkDxo2tQm",
1101
1222
  token: "XRP",
1102
1223
  tokenType: "NATIVE",
1103
- transactionGasFee: 15n,
1104
- transactionHash: "03564E6109261CDE73FCC5062C2A0A70F365CB1A0F9408C065B60EC3E94E4DBF"
1224
+ transactionGasFee: 10000n,
1225
+ transactionHash: "B32A6A5455777283212407FBD8CCA701505C654E5F4ADFFBE9D4D22F00889D87"
1105
1226
  }
1106
1227
  ]
1107
1228
  }
@@ -1726,6 +1847,7 @@ const $3478cd776d185339$export$681f497010b17679 = {
1726
1847
  amount: BigInt(op.amount.replace(".", "")),
1727
1848
  blockNumber: block.sequence,
1728
1849
  from: op.from,
1850
+ memo: typedTx.memo,
1729
1851
  timestamp: typedTx.created_at,
1730
1852
  to: op.to,
1731
1853
  token: op.asset_type === "native" ? null : op.asset_issuer,
@@ -1740,21 +1862,33 @@ const $3478cd776d185339$export$681f497010b17679 = {
1740
1862
  {
1741
1863
  params: {
1742
1864
  network: "STELLAR",
1743
- walletAddress: "GA5KLTNAWV27IOTBX5PKUOMVWFMLX4X7CPMQJ4QLR3G266MMVL7NMA4X",
1744
- contractAddress: "GC4Z2TDXU4GXVLHOS5P5SU6HKBCP7NKN4TJ5ZGTVRBW7MCBZTU7SNUSA"
1865
+ walletAddress: "GC5HUFIKZBK5XRNOBPXR4PBR3PWR26GP5UFRKSCOOOIENYVSF3NMA23U"
1745
1866
  },
1746
- payload: "https://jiti.indexing.co/networks/stellar/51720546",
1867
+ payload: "https://jiti.indexing.co/networks/stellar/59592273",
1747
1868
  output: [
1748
1869
  {
1749
- amount: 150000n,
1750
- blockNumber: 51720546,
1751
- from: "GA5KLTNAWV27IOTBX5PKUOMVWFMLX4X7CPMQJ4QLR3G266MMVL7NMA4X",
1752
- timestamp: "2024-05-18T04:41:39Z",
1753
- to: "GC4Z2TDXU4GXVLHOS5P5SU6HKBCP7NKN4TJ5ZGTVRBW7MCBZTU7SNUSA",
1754
- token: "GC4Z2TDXU4GXVLHOS5P5SU6HKBCP7NKN4TJ5ZGTVRBW7MCBZTU7SNUSA",
1870
+ amount: 651200000n,
1871
+ blockNumber: 59592273,
1872
+ from: "GC5HUFIKZBK5XRNOBPXR4PBR3PWR26GP5UFRKSCOOOIENYVSF3NMA23U",
1873
+ memo: "315004227",
1874
+ timestamp: "2025-10-28T17:24:17Z",
1875
+ to: "GABFQIK63R2NETJM7T673EAMZN4RJLLGP3OFUEJU5SZVTGWUKULZJNL6",
1876
+ token: "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
1877
+ tokenType: "TOKEN",
1878
+ transactionGasFee: 200n,
1879
+ transactionHash: "a0e5f0cbc64a13816db1d8428c4e2f849ed9ec475b80d4cbd23a8119b1b1c010"
1880
+ },
1881
+ {
1882
+ amount: 4445100000n,
1883
+ blockNumber: 59592273,
1884
+ from: "GAUA7XL5K54CC2DDGP77FJ2YBHRJLT36CPZDXWPM6MP7MANOGG77PNJU",
1885
+ memo: undefined,
1886
+ timestamp: "2025-10-28T17:24:17Z",
1887
+ to: "GC5HUFIKZBK5XRNOBPXR4PBR3PWR26GP5UFRKSCOOOIENYVSF3NMA23U",
1888
+ token: "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
1755
1889
  tokenType: "TOKEN",
1756
- transactionGasFee: 100n,
1757
- transactionHash: "4fb2441210cbe87f5003abdfa86f03bafa54f789ed041feccbda0bd054297c4d"
1890
+ transactionGasFee: 300n,
1891
+ transactionHash: "c554aed41145304e03c0877c9de526cdcb8a8255c9bf156ff0dec202ab12e20d"
1758
1892
  }
1759
1893
  ]
1760
1894
  }