@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 +169 -35
- package/dist/main.js.map +1 -1
- package/dist/module.js +169 -35
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {keccak256 as $hgUW1$keccak256, decodeEventLog as $hgUW1$decodeEventLog, parseAbi as $hgUW1$parseAbi, sha256 as $hgUW1$sha256} from "viem";
|
|
2
1
|
import {Buffer as $hgUW1$Buffer} from "buffer";
|
|
2
|
+
import {sha256 as $hgUW1$sha256, keccak256 as $hgUW1$keccak256, decodeEventLog as $hgUW1$decodeEventLog, parseAbi as $hgUW1$parseAbi} from "viem";
|
|
3
3
|
import $hgUW1$tronweb from "tronweb";
|
|
4
4
|
import {decodeTxRaw as $hgUW1$decodeTxRaw, Registry as $hgUW1$Registry} from "@cosmjs/proto-signing";
|
|
5
5
|
import {defaultRegistryTypes as $hgUW1$defaultRegistryTypes} from "@cosmjs/stargate";
|
|
@@ -29,9 +29,9 @@ var $81c1b644006d48ec$exports = {};
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var $fde9406d76ec24a9$exports = {};
|
|
32
|
-
var $
|
|
32
|
+
var $82293038337e7b3f$exports = {};
|
|
33
33
|
|
|
34
|
-
$parcel$export($
|
|
34
|
+
$parcel$export($82293038337e7b3f$exports, "blockToBeat", () => $82293038337e7b3f$export$363ea1acea6aebd6);
|
|
35
35
|
var $09654dffcb68affa$exports = {};
|
|
36
36
|
|
|
37
37
|
$parcel$export($09654dffcb68affa$exports, "blockToVM", () => $09654dffcb68affa$export$ae001c77434c5340);
|
|
@@ -103,6 +103,122 @@ function $09654dffcb68affa$export$ae001c77434c5340(block) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
function $82293038337e7b3f$export$363ea1acea6aebd6(block) {
|
|
107
|
+
const vm = (0, $09654dffcb68affa$export$ae001c77434c5340)(block);
|
|
108
|
+
switch(vm){
|
|
109
|
+
case "APTOS":
|
|
110
|
+
return parseInt(block.block_height, 10);
|
|
111
|
+
case "CARDANO":
|
|
112
|
+
return block.block_identifier.index;
|
|
113
|
+
case "COSMOS":
|
|
114
|
+
{
|
|
115
|
+
const typedBlock = block;
|
|
116
|
+
return Number(typedBlock.block.header.height);
|
|
117
|
+
}
|
|
118
|
+
case "EVM":
|
|
119
|
+
return block.number;
|
|
120
|
+
case "FILECOIN":
|
|
121
|
+
return block.Height;
|
|
122
|
+
case "RIPPLE":
|
|
123
|
+
return parseInt(block.ledger_index, 10);
|
|
124
|
+
case "STARKNET":
|
|
125
|
+
return block.block_number;
|
|
126
|
+
case "STELLAR":
|
|
127
|
+
return block.sequence;
|
|
128
|
+
case "SUBSTRATE":
|
|
129
|
+
return block.blockNumber;
|
|
130
|
+
case "SUI":
|
|
131
|
+
return parseInt(block.sequence, 10);
|
|
132
|
+
case "SVM":
|
|
133
|
+
return block.blockHeight;
|
|
134
|
+
case "TON":
|
|
135
|
+
return block.seqno;
|
|
136
|
+
case "UTXO":
|
|
137
|
+
return block.height;
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
var $e23c2d0dc0ca1317$exports = {};
|
|
144
|
+
|
|
145
|
+
$parcel$export($e23c2d0dc0ca1317$exports, "blockToTransactionHashes", () => $e23c2d0dc0ca1317$export$eda46897866e27cc);
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
var $e23c2d0dc0ca1317$require$Buffer = $hgUW1$Buffer;
|
|
150
|
+
function $e23c2d0dc0ca1317$export$eda46897866e27cc(block) {
|
|
151
|
+
const vm = (0, $09654dffcb68affa$export$ae001c77434c5340)(block);
|
|
152
|
+
const hashes = new Set();
|
|
153
|
+
try {
|
|
154
|
+
switch(vm){
|
|
155
|
+
case "APTOS":
|
|
156
|
+
for (const tx of block.transactions || [])hashes.add(tx.hash);
|
|
157
|
+
break;
|
|
158
|
+
case "CARDANO":
|
|
159
|
+
for (const tx of block.transactions || []){
|
|
160
|
+
const typedTx = tx;
|
|
161
|
+
hashes.add(typedTx.transaction_identifier?.hash);
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
164
|
+
case "COSMOS":
|
|
165
|
+
{
|
|
166
|
+
const typedBlock = block;
|
|
167
|
+
for (const txRaw of typedBlock.block.data.txs || []){
|
|
168
|
+
const txHash = (0, $hgUW1$sha256)(new Uint8Array($e23c2d0dc0ca1317$require$Buffer.from(txRaw, "base64")));
|
|
169
|
+
hashes.add(txHash.slice(2).toUpperCase());
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
case "EVM":
|
|
174
|
+
for (const tx of block.transactions)hashes.add(tx.hash);
|
|
175
|
+
break;
|
|
176
|
+
case "FILECOIN":
|
|
177
|
+
{
|
|
178
|
+
const typedBlock = block;
|
|
179
|
+
for (const msgGroup of typedBlock.messages){
|
|
180
|
+
const secpkMessages = msgGroup.blockMessages.SecpkMessages || [];
|
|
181
|
+
for (const msg of secpkMessages)hashes.add(msg.CID["/"]);
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
case "RIPPLE":
|
|
186
|
+
for (const tx of block.transactions || [])hashes.add(tx.hash);
|
|
187
|
+
break;
|
|
188
|
+
case "STARKNET":
|
|
189
|
+
for (const tx of block.transactions || [])hashes.add(tx.transaction_hash);
|
|
190
|
+
break;
|
|
191
|
+
case "STELLAR":
|
|
192
|
+
for (const tx of block.transactions || [])hashes.add(tx.hash);
|
|
193
|
+
break;
|
|
194
|
+
case "SUBSTRATE":
|
|
195
|
+
for (const extrinsic of block.extrinsics)hashes.add(extrinsic.hash);
|
|
196
|
+
break;
|
|
197
|
+
case "SUI":
|
|
198
|
+
for (const tx of block.transactions || [])hashes.add(tx.digest);
|
|
199
|
+
break;
|
|
200
|
+
case "SVM":
|
|
201
|
+
for (const tx of block.transactions || [])hashes.add(tx.transaction.signatures[0]);
|
|
202
|
+
break;
|
|
203
|
+
case "TON":
|
|
204
|
+
for (const shard of block.shards || [])for (const tx of shard.transactions || [])hashes.add(tx.transacion_id.hash);
|
|
205
|
+
break;
|
|
206
|
+
case "UTXO":
|
|
207
|
+
for (const tx of block.tx)hashes.add(tx.txid);
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
return Array.from(hashes).filter((v)=>v?.length);
|
|
211
|
+
} catch (e) {
|
|
212
|
+
console.error(e);
|
|
213
|
+
return [];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
var $cc5213c20a6615f3$exports = {};
|
|
219
|
+
|
|
220
|
+
$parcel$export($cc5213c20a6615f3$exports, "blockToTimestamp", () => $cc5213c20a6615f3$export$ec64f6024312bb14);
|
|
221
|
+
|
|
106
222
|
function $cc5213c20a6615f3$export$ec64f6024312bb14(block) {
|
|
107
223
|
const vm = (0, $09654dffcb68affa$export$ae001c77434c5340)(block);
|
|
108
224
|
switch(vm){
|
|
@@ -442,6 +558,8 @@ function $8331f131029dede8$export$146821f89c094be4(evt) {
|
|
|
442
558
|
}
|
|
443
559
|
|
|
444
560
|
|
|
561
|
+
$parcel$exportWildcard($fde9406d76ec24a9$exports, $82293038337e7b3f$exports);
|
|
562
|
+
$parcel$exportWildcard($fde9406d76ec24a9$exports, $e23c2d0dc0ca1317$exports);
|
|
445
563
|
$parcel$exportWildcard($fde9406d76ec24a9$exports, $cc5213c20a6615f3$exports);
|
|
446
564
|
$parcel$exportWildcard($fde9406d76ec24a9$exports, $09654dffcb68affa$exports);
|
|
447
565
|
$parcel$exportWildcard($fde9406d76ec24a9$exports, $42564d9f228fe302$exports);
|
|
@@ -771,15 +889,16 @@ const $8d6646508fb2fa58$export$b5fd4920e8b7d913 = {
|
|
|
771
889
|
].includes(message.typeUrl)) {
|
|
772
890
|
const decodedMsg = registry.decode(message);
|
|
773
891
|
transfers.push({
|
|
892
|
+
amount: BigInt(decodedMsg.token?.amount || decodedMsg.amount?.find((a)=>a?.amount)?.amount || 0),
|
|
774
893
|
blockNumber: blockNumber,
|
|
775
894
|
from: decodedMsg.sender || decodedMsg.fromAddress,
|
|
895
|
+
memo: decodedMsg.memo,
|
|
896
|
+
timestamp: blockTimestamp,
|
|
776
897
|
to: decodedMsg.receiver || decodedMsg.toAddress,
|
|
777
|
-
amount: BigInt(decodedMsg.token?.amount || decodedMsg.amount?.find((a)=>a?.amount)?.amount || 0),
|
|
778
898
|
token: decodedMsg.token?.denom || decodedMsg.amount?.find((a)=>a?.denom)?.denom,
|
|
779
899
|
tokenType: "NATIVE",
|
|
780
|
-
|
|
781
|
-
transactionHash: txHash.slice(2).toUpperCase()
|
|
782
|
-
transactionGasFee: transactionGasFee
|
|
900
|
+
transactionGasFee: transactionGasFee,
|
|
901
|
+
transactionHash: txHash.slice(2).toUpperCase()
|
|
783
902
|
});
|
|
784
903
|
}
|
|
785
904
|
}
|
|
@@ -789,21 +908,21 @@ const $8d6646508fb2fa58$export$b5fd4920e8b7d913 = {
|
|
|
789
908
|
{
|
|
790
909
|
params: {
|
|
791
910
|
network: "COSMOS",
|
|
792
|
-
walletAddress: "
|
|
793
|
-
contractAddress: "ibc/F663521BF1836B00F5F177680F74BFB9A8B5654A694D0D2BC249E03CF2509013"
|
|
911
|
+
walletAddress: "cosmos1q9d0rjr687a37lckllujf6dmtnympx9g5ca37u"
|
|
794
912
|
},
|
|
795
|
-
payload: "https://jiti.indexing.co/networks/cosmos/
|
|
913
|
+
payload: "https://jiti.indexing.co/networks/cosmos/28168958",
|
|
796
914
|
output: [
|
|
797
915
|
{
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
916
|
+
amount: 31684895n,
|
|
917
|
+
blockNumber: 28168958,
|
|
918
|
+
from: "cosmos1q9d0rjr687a37lckllujf6dmtnympx9g5ca37u",
|
|
919
|
+
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"}]}}}}',
|
|
920
|
+
timestamp: "2025-10-28T17:33:35.080Z",
|
|
921
|
+
to: "neutron1zvesudsdfxusz06jztpph4d3h5x6veglqsspxns2v2jqml9nhywskcc923",
|
|
922
|
+
token: "uatom",
|
|
803
923
|
tokenType: "NATIVE",
|
|
804
|
-
|
|
805
|
-
transactionHash: "
|
|
806
|
-
transactionGasFee: 4860n
|
|
924
|
+
transactionGasFee: 2201n,
|
|
925
|
+
transactionHash: "DA3680301DEB2C5D4F12F695C252CB75612792952AD12A699C80B261E8A029E3"
|
|
807
926
|
}
|
|
808
927
|
]
|
|
809
928
|
}
|
|
@@ -1063,6 +1182,7 @@ const $07b3982e2fc4c8b2$export$400f08bfae9ee97f = {
|
|
|
1063
1182
|
amount: parsedAmount,
|
|
1064
1183
|
blockNumber: parseInt(block.ledger_index, 10),
|
|
1065
1184
|
from: typedTx.Account ?? "UNKNOWN",
|
|
1185
|
+
memo: typedTx.DestinationTag,
|
|
1066
1186
|
timestamp: block.close_time_iso ? block.close_time_iso : null,
|
|
1067
1187
|
to: typedTx.Destination ?? "UNKNOWN",
|
|
1068
1188
|
token: tokenSymbol,
|
|
@@ -1077,21 +1197,22 @@ const $07b3982e2fc4c8b2$export$400f08bfae9ee97f = {
|
|
|
1077
1197
|
{
|
|
1078
1198
|
params: {
|
|
1079
1199
|
network: "RIPPLE",
|
|
1080
|
-
walletAddress: "
|
|
1200
|
+
walletAddress: "rnDGxzUM2snx58Bvyn72xhJKqvkDxo2tQm",
|
|
1081
1201
|
contractAddress: ""
|
|
1082
1202
|
},
|
|
1083
1203
|
payload: "https://jiti.indexing.co/networks/ripple/88104659",
|
|
1084
1204
|
output: [
|
|
1085
1205
|
{
|
|
1086
|
-
amount:
|
|
1206
|
+
amount: 43110000n,
|
|
1087
1207
|
blockNumber: 88104659,
|
|
1088
|
-
from: "
|
|
1208
|
+
from: "rMvCasZ9cohYrSZRNYPTZfoaaSUQMfgQ8G",
|
|
1209
|
+
memo: 30195674,
|
|
1089
1210
|
timestamp: "2024-05-19T22:18:52Z",
|
|
1090
|
-
to: "
|
|
1211
|
+
to: "rnDGxzUM2snx58Bvyn72xhJKqvkDxo2tQm",
|
|
1091
1212
|
token: "XRP",
|
|
1092
1213
|
tokenType: "NATIVE",
|
|
1093
|
-
transactionGasFee:
|
|
1094
|
-
transactionHash: "
|
|
1214
|
+
transactionGasFee: 10000n,
|
|
1215
|
+
transactionHash: "B32A6A5455777283212407FBD8CCA701505C654E5F4ADFFBE9D4D22F00889D87"
|
|
1095
1216
|
}
|
|
1096
1217
|
]
|
|
1097
1218
|
}
|
|
@@ -1716,6 +1837,7 @@ const $725699ccb951d76d$export$681f497010b17679 = {
|
|
|
1716
1837
|
amount: BigInt(op.amount.replace(".", "")),
|
|
1717
1838
|
blockNumber: block.sequence,
|
|
1718
1839
|
from: op.from,
|
|
1840
|
+
memo: typedTx.memo,
|
|
1719
1841
|
timestamp: typedTx.created_at,
|
|
1720
1842
|
to: op.to,
|
|
1721
1843
|
token: op.asset_type === "native" ? null : op.asset_issuer,
|
|
@@ -1730,21 +1852,33 @@ const $725699ccb951d76d$export$681f497010b17679 = {
|
|
|
1730
1852
|
{
|
|
1731
1853
|
params: {
|
|
1732
1854
|
network: "STELLAR",
|
|
1733
|
-
walletAddress: "
|
|
1734
|
-
contractAddress: "GC4Z2TDXU4GXVLHOS5P5SU6HKBCP7NKN4TJ5ZGTVRBW7MCBZTU7SNUSA"
|
|
1855
|
+
walletAddress: "GC5HUFIKZBK5XRNOBPXR4PBR3PWR26GP5UFRKSCOOOIENYVSF3NMA23U"
|
|
1735
1856
|
},
|
|
1736
|
-
payload: "https://jiti.indexing.co/networks/stellar/
|
|
1857
|
+
payload: "https://jiti.indexing.co/networks/stellar/59592273",
|
|
1737
1858
|
output: [
|
|
1738
1859
|
{
|
|
1739
|
-
amount:
|
|
1740
|
-
blockNumber:
|
|
1741
|
-
from: "
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1860
|
+
amount: 651200000n,
|
|
1861
|
+
blockNumber: 59592273,
|
|
1862
|
+
from: "GC5HUFIKZBK5XRNOBPXR4PBR3PWR26GP5UFRKSCOOOIENYVSF3NMA23U",
|
|
1863
|
+
memo: "315004227",
|
|
1864
|
+
timestamp: "2025-10-28T17:24:17Z",
|
|
1865
|
+
to: "GABFQIK63R2NETJM7T673EAMZN4RJLLGP3OFUEJU5SZVTGWUKULZJNL6",
|
|
1866
|
+
token: "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
|
|
1867
|
+
tokenType: "TOKEN",
|
|
1868
|
+
transactionGasFee: 200n,
|
|
1869
|
+
transactionHash: "a0e5f0cbc64a13816db1d8428c4e2f849ed9ec475b80d4cbd23a8119b1b1c010"
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
amount: 4445100000n,
|
|
1873
|
+
blockNumber: 59592273,
|
|
1874
|
+
from: "GAUA7XL5K54CC2DDGP77FJ2YBHRJLT36CPZDXWPM6MP7MANOGG77PNJU",
|
|
1875
|
+
memo: undefined,
|
|
1876
|
+
timestamp: "2025-10-28T17:24:17Z",
|
|
1877
|
+
to: "GC5HUFIKZBK5XRNOBPXR4PBR3PWR26GP5UFRKSCOOOIENYVSF3NMA23U",
|
|
1878
|
+
token: "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
|
|
1745
1879
|
tokenType: "TOKEN",
|
|
1746
|
-
transactionGasFee:
|
|
1747
|
-
transactionHash: "
|
|
1880
|
+
transactionGasFee: 300n,
|
|
1881
|
+
transactionHash: "c554aed41145304e03c0877c9de526cdcb8a8255c9bf156ff0dec202ab12e20d"
|
|
1748
1882
|
}
|
|
1749
1883
|
]
|
|
1750
1884
|
}
|