spacebudz / lucid

Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.
https://lucid.spacebudz.io
MIT License
336 stars 133 forks source link

Fix #235: Update in Maestro provider to correctly parse for large integers in response #236

Closed sourabhxyz closed 8 months ago

sourabhxyz commented 8 months ago

Tokens in Cardano could be minted with amounts as large as $2^{63} - 1$ (maximum of what signed 64 bit can support) which is larger than what could be safely represented for in JS. Standard JSON parser for JS would not be making use of bigint, consequently, this PR makes use of amounts-as-strings header attribute when making request to get amounts as strings instead, to cast later as bigint.

Closes #235.