@indexing/jiti 0.0.75 → 0.0.78
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/CLAUDE.md +69 -0
- package/README.md +128 -6
- package/dist/main.js +83 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +83 -3
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -275,6 +275,7 @@ function $42564d9f228fe302$export$db81f9ea057ab646(address) {
|
|
|
275
275
|
var $68871103c7bc00cf$exports = {};
|
|
276
276
|
|
|
277
277
|
$parcel$export($68871103c7bc00cf$exports, "evmChainToId", () => $68871103c7bc00cf$export$f93b8abed77a4120);
|
|
278
|
+
$parcel$export($68871103c7bc00cf$exports, "evmIdToChain", () => $68871103c7bc00cf$export$88f733cc92705522);
|
|
278
279
|
const $68871103c7bc00cf$var$CHAIN_ID = {
|
|
279
280
|
"0G": 16661,
|
|
280
281
|
ABSTRACT: 2741,
|
|
@@ -400,6 +401,11 @@ const $68871103c7bc00cf$var$CHAIN_ID = {
|
|
|
400
401
|
function $68871103c7bc00cf$export$f93b8abed77a4120(chain) {
|
|
401
402
|
return $68871103c7bc00cf$var$CHAIN_ID[chain?.toUpperCase()];
|
|
402
403
|
}
|
|
404
|
+
const $68871103c7bc00cf$var$ID_TO_CHAIN = {};
|
|
405
|
+
for (const [chain, id] of Object.entries($68871103c7bc00cf$var$CHAIN_ID))if (!(id in $68871103c7bc00cf$var$ID_TO_CHAIN)) $68871103c7bc00cf$var$ID_TO_CHAIN[id] = chain;
|
|
406
|
+
function $68871103c7bc00cf$export$88f733cc92705522(id) {
|
|
407
|
+
return $68871103c7bc00cf$var$ID_TO_CHAIN[typeof id === "string" ? Number(id) : id];
|
|
408
|
+
}
|
|
403
409
|
|
|
404
410
|
|
|
405
411
|
var $cfa23334cbdf9391$exports = {};
|
|
@@ -890,20 +896,41 @@ const $8860a67278817de8$export$893111d8d332e195 = {
|
|
|
890
896
|
return acc + val;
|
|
891
897
|
}, BigInt(0));
|
|
892
898
|
const transactionFee = sumInputs + BigInt(sumOutputs);
|
|
899
|
+
const absFee = transactionFee < 0 ? -transactionFee : transactionFee;
|
|
900
|
+
const blockNumber = block.block_identifier.index;
|
|
893
901
|
for (const out of outputs){
|
|
902
|
+
const toAddress = out.account?.address || "";
|
|
903
|
+
// ADA (native) transfer
|
|
894
904
|
const rawValue = out.amount?.value || "0";
|
|
895
905
|
const absoluteValue = BigInt(rawValue);
|
|
896
906
|
transfers.push({
|
|
897
907
|
amount: absoluteValue < 0 ? -absoluteValue : absoluteValue,
|
|
898
|
-
blockNumber:
|
|
908
|
+
blockNumber: blockNumber,
|
|
899
909
|
from: fromAddress,
|
|
900
910
|
timestamp: blockTimestamp,
|
|
901
|
-
to:
|
|
911
|
+
to: toAddress,
|
|
902
912
|
token: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? null : out.amount?.currency?.symbol,
|
|
903
913
|
tokenType: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? "NATIVE" : "TOKEN",
|
|
904
|
-
transactionGasFee:
|
|
914
|
+
transactionGasFee: absFee,
|
|
905
915
|
transactionHash: transactionHash
|
|
906
916
|
});
|
|
917
|
+
// Native tokens from tokenBundle metadata
|
|
918
|
+
if (out.metadata?.tokenBundle) {
|
|
919
|
+
for (const bundle of out.metadata.tokenBundle)for (const tkn of bundle.tokens){
|
|
920
|
+
const tokenValue = BigInt(tkn.value);
|
|
921
|
+
transfers.push({
|
|
922
|
+
amount: tokenValue < 0 ? -tokenValue : tokenValue,
|
|
923
|
+
blockNumber: blockNumber,
|
|
924
|
+
from: fromAddress,
|
|
925
|
+
timestamp: blockTimestamp,
|
|
926
|
+
to: toAddress,
|
|
927
|
+
token: `${bundle.policyId}.${tkn.currency.symbol}`,
|
|
928
|
+
tokenType: "TOKEN",
|
|
929
|
+
transactionGasFee: absFee,
|
|
930
|
+
transactionHash: transactionHash
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
}
|
|
907
934
|
}
|
|
908
935
|
}
|
|
909
936
|
return transfers;
|
|
@@ -929,6 +956,59 @@ const $8860a67278817de8$export$893111d8d332e195 = {
|
|
|
929
956
|
transactionHash: "261c42ba9124f55d8e169ebb692cd3759d796a54369acb316ee449b546e79309"
|
|
930
957
|
}
|
|
931
958
|
]
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
params: {
|
|
962
|
+
network: "CARDANO",
|
|
963
|
+
transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
|
|
964
|
+
},
|
|
965
|
+
payload: "https://jiti.indexing.co/networks/cardano/13119492",
|
|
966
|
+
output: [
|
|
967
|
+
{
|
|
968
|
+
amount: 1159390n,
|
|
969
|
+
blockNumber: 13119492,
|
|
970
|
+
from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
|
|
971
|
+
timestamp: "2026-03-05T09:34:59.000Z",
|
|
972
|
+
to: "addr1qxvhvz9860r2qzcmx0qz55gzdt58etren35hhn9etpe3j5yewcy2057x5q93kv7q9fgsy6hg0jk8n8rf00xtjkrnr9gq7mz2sz",
|
|
973
|
+
token: null,
|
|
974
|
+
tokenType: "NATIVE",
|
|
975
|
+
transactionGasFee: 178481n,
|
|
976
|
+
transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
amount: 100000000n,
|
|
980
|
+
blockNumber: 13119492,
|
|
981
|
+
from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
|
|
982
|
+
timestamp: "2026-03-05T09:34:59.000Z",
|
|
983
|
+
to: "addr1qxvhvz9860r2qzcmx0qz55gzdt58etren35hhn9etpe3j5yewcy2057x5q93kv7q9fgsy6hg0jk8n8rf00xtjkrnr9gq7mz2sz",
|
|
984
|
+
token: "0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa.4e49474854",
|
|
985
|
+
tokenType: "TOKEN",
|
|
986
|
+
transactionGasFee: 178481n,
|
|
987
|
+
transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
amount: 172823143n,
|
|
991
|
+
blockNumber: 13119492,
|
|
992
|
+
from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
|
|
993
|
+
timestamp: "2026-03-05T09:34:59.000Z",
|
|
994
|
+
to: "addr1q8dusprx8fr89xkl88g3gq5kya46s9r4fcnwyx5yhdp3rx8rzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s8728d0",
|
|
995
|
+
token: null,
|
|
996
|
+
tokenType: "NATIVE",
|
|
997
|
+
transactionGasFee: 178481n,
|
|
998
|
+
transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
amount: 204930000n,
|
|
1002
|
+
blockNumber: 13119492,
|
|
1003
|
+
from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
|
|
1004
|
+
timestamp: "2026-03-05T09:34:59.000Z",
|
|
1005
|
+
to: "addr1q8dusprx8fr89xkl88g3gq5kya46s9r4fcnwyx5yhdp3rx8rzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s8728d0",
|
|
1006
|
+
token: "0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa.4e49474854",
|
|
1007
|
+
tokenType: "TOKEN",
|
|
1008
|
+
transactionGasFee: 178481n,
|
|
1009
|
+
transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
|
|
1010
|
+
}
|
|
1011
|
+
]
|
|
932
1012
|
}
|
|
933
1013
|
]
|
|
934
1014
|
};
|