Bytes to Multibase
Encodes bytes into self-describing Multibase string with format prefix
Overview
Encodes a raw byte array (Uint8Array) into a self-describing Multibase string by prepending the standard single-character Multibase format prefix to the encoded body.
Supported formats include base58btc (prefix z), base16 lowercase hex (prefix f), base16_upper uppercase hex (prefix F), base64 standard unpadded (prefix m), and base64url unpadded (prefix u).
When to Use
- Formatting DIDs (Decentralized Identifiers), multicodec public keys, or IPFS/libp2p CIDs that carry their own encoding identifier.
- Exchanging encoded binary payloads where the receiver uses Multibase to Bytes to auto-detect the base.
Parameter Configuration
| Parameter (ID) | Type & Default | Visibility Condition | Description & Options |
|---|---|---|---|
Multibase Formatbase |
selectDefault: base58btc |
Always visible | Selects the Multibase encoding scheme and single-character prefix (z, f, F, m, or u).
|
Port I/O Specification
See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.
Input Ports
Port Nature: Fixed Input Ports (1 total).
| Port Name | Port ID | Data Type | Required | Visibility Condition | Description |
|---|---|---|---|---|---|
Bytes In |
bytes |
Bytes |
Required | Always visible | Raw byte array (Uint8Array) to encode. |
Output Ports
Port Nature: Fixed Output Ports (1 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Multibase Out |
string |
String |
Always visible | Self-describing Multibase string (prefix character + encoded payload). |
Error Cases
This node has no runtime failure cases (errorProfile: none) and always succeeds for any valid typed input.
Examples
Creating a Base58BTC Multibase String (z-prefixed)
Encode a public key buffer with the Multibase z prefix.
- Connect your byte buffer to
Bytesand set Multibase Format toBase58BTC (prefix: z). - The
Multibase Stringoutput emits a string starting withz....