@indexing/jiti 0.0.77 → 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/dist/module.js CHANGED
@@ -896,20 +896,41 @@ const $8860a67278817de8$export$893111d8d332e195 = {
896
896
  return acc + val;
897
897
  }, BigInt(0));
898
898
  const transactionFee = sumInputs + BigInt(sumOutputs);
899
+ const absFee = transactionFee < 0 ? -transactionFee : transactionFee;
900
+ const blockNumber = block.block_identifier.index;
899
901
  for (const out of outputs){
902
+ const toAddress = out.account?.address || "";
903
+ // ADA (native) transfer
900
904
  const rawValue = out.amount?.value || "0";
901
905
  const absoluteValue = BigInt(rawValue);
902
906
  transfers.push({
903
907
  amount: absoluteValue < 0 ? -absoluteValue : absoluteValue,
904
- blockNumber: block.block_identifier.index,
908
+ blockNumber: blockNumber,
905
909
  from: fromAddress,
906
910
  timestamp: blockTimestamp,
907
- to: out.account?.address || "",
911
+ to: toAddress,
908
912
  token: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? null : out.amount?.currency?.symbol,
909
913
  tokenType: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? "NATIVE" : "TOKEN",
910
- transactionGasFee: transactionFee < 0 ? -transactionFee : transactionFee,
914
+ transactionGasFee: absFee,
911
915
  transactionHash: transactionHash
912
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
+ }
913
934
  }
914
935
  }
915
936
  return transfers;
@@ -935,6 +956,59 @@ const $8860a67278817de8$export$893111d8d332e195 = {
935
956
  transactionHash: "261c42ba9124f55d8e169ebb692cd3759d796a54369acb316ee449b546e79309"
936
957
  }
937
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
+ ]
938
1012
  }
939
1013
  ]
940
1014
  };