I want to convert bytes into string address. I have only two options because of Junction limitation: bytes32 or bytes20.

pub enum Junction {
   AccountId32 { network: Option<NetworkId>, id: [u8; 32] },
   AccountKey20 { network: Option<NetworkId>, key: [u8; 20] },

I want to convert bytes32 into bech32 string address:


But there is no no_std library. Is the anyway to do it?

1 Answer 1


dependency for pallet or any code that compiled to wasm [dependencies] bech32 = { package = "bech32", version = "0.9.1", default-features = false, features = [ "strict", ] }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.