Is this true?

A safe walletURL is of the form safe://+exactly 70 lowercase alphanumeric chars

A public key is always exactly 97 hex chars long

Can someone confirm/deny and for bonus points, give me a hint where to look in the source, please?


for i in {0..100}; do safe wallet create --dry-run; done

example output:


All wallets are 69 chars, 62 chars when safe:// is excluded

An xorname will always be 64 hex chars, ie 32 bytes, ie 256 bits. Even with leading or trailing 0s there will never be truncation. But the tricky part is converting an xorname to an xorurl depends on what other metadata is encoded into the xorurl, eg type_tag and content_type.

A bls public public key is always 96 hex chars, ie 48 bytes, ie 384 bits. In sn_dbc (which is what a wallet uses) the public key is a bls public key.

But again, converting this to an xorurl depends on what other metadata is included with it.

A wallet is a multimap, see L66

A multimap is a register, see L32

The register is converted to a safeurl, see L46 and safeurl/ L545

The creation of safeurl is pretty complex with lots of conditionals so I didn’t go any further than this in the code.


So basically you are saying I can’t count ? :rofl: :rofl: :rofl: :rofl:

Seriously, thank you for the explanation :+1: