Multibase

Ayrıca şöyle anılır multibase encoding, z-prefix, base58btc encoding

Bir araya getirildiYayında

Multibase solves a small problem that causes large bugs: given a string of encoded bytes, which base was used? Multibase answers by putting the answer in the first character.

Why decentralized identity adopted it

A DID document travels to software that has never met its issuer. Every field that requires out-of-band knowledge to interpret is a field that will eventually be interpreted wrongly. Self-describing encodings remove one class of that problem entirely.

The half that is easy to miss

For key material, the base is not enough. A verifier also needs to know which algorithm the key belongs to, and that is carried by a multicodec prefix on the bytes themselves, before the base encoding is applied. A value with the right base and no multicodec prefix looks correct, decodes cleanly, and is not what the specification asks for.

Where Solidus stands

Emitting the base correctly and the multicodec prefix not at all, in the conversion path that produces W3C-form DID documents. Stated here rather than left for a third-party resolver to discover.

Nereden geliyor

Bunu başkası belirtti. Solidus bir araya getiriyor.

A self-describing encoding convention from the Multiformats family, used across decentralized identity so that a byte string carries its own base. A single leading character names the base, with z meaning base58btc. W3C DID Core and the Ed25519VerificationKey2020 suite use it to express public keys inside DID documents.

Bunu nasıl doğrularsınız

Bugün üretimde çalışıyor.

Readable at the call site: packages/@solidus/sdk/src/chain/did.ts, in mapToW3CDIDDocument, where the value is constructed as a z prefix concatenated with the base58 encoding. Decode any published did:solidus key and compare the leading bytes with the multicodec table.

İlgili

Multibase · Solidus Lexicon