starknet-io / starknet.js

JavaScript library for StarkNet
https://www.starknetjs.com
MIT License
1.21k stars 706 forks source link

fix: remove default from computeHintedClassHash to be able to export #1142

Closed PhilippeR26 closed 1 month ago

PhilippeR26 commented 1 month ago

Motivation and Resolution

Solves issue #1135 hash/computeHintedClassHash is now accessible for users

Usage related changes

This code is now accessible to users :

const compiledCairo0 = json.parse(fs.readFileSync("./cairo0contract.json").toString("ascii"));
const result=hash.computeHintedClassHash(compiledCairo0);
// result = "0x293eabb06955c0a1e55557014675aa4e7a1fd69896147382b29b2b6b166a2ac"

Development related changes

Just removed default from the export.

Checklist: