o1-labs / o1js

TypeScript framework for zk-SNARKs and zkApps
https://docs.minaprotocol.com/en/zkapps/how-to-write-a-zkapp
Apache License 2.0
475 stars 105 forks source link

`Symbol.iterator` for `MerkleList` #1605

Closed Trivo25 closed 2 months ago

Trivo25 commented 2 months ago

maybe?

mitschabaude commented 2 months ago

the same convenience would also be achieved if we have a .toArray(length) method on MerkleList which returns a static-sized array. And that would be more secure because we could call assertAtEnd() before returning the array