WASM Hash from code

@ggreif , @claudio,

I saw ExperimentalInternetComputer.subnet : () → Principal was added in 14.4 which is great! I was wondering if it would be possible to also have an accessor for the currently installed wasm hash? This would greatly simplify some upcoming libraries I have and let me get rid of a block.

I’m not sure if rust already has access to these or not, so if there are any rusties that come across this and can answer, it would be helpful.

Thanks!

2 Likes

I think a controller (and the canister itself) can ask the management canister about the hash.

Yes…but this is an async action so I have to delay recording the wasm hash until after the initialization of an actor. It looked like this subnet call was synchronous and so I was hoping the module hash might be accessible as well. I already have the other pathway written, I was just hoping to avoid some edge cases by making it all syncrynous.

1 Like

I think you meant synchronous