MeshJS / mesh

An open-source library to advance Web3 development on Cardano

Home Page:https://meshjs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`'amounts-as-strings': 'true'` for Maestro provider endpoints

sourabhxyz opened this issue · comments

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.