View Source ExIpfs.Multibase (Elixir IPFS v0.1.8)
ExIpfs.Multibase is where the multibase commands of the IPFS API reside.
Summary
Functions
Decode a multibase encoded string.
Encode a string to a multibase encoded string.
List available multibase encodings.
Transcode a multibase encoded string.
Types
@type codec() :: %ExIpfs.MultibaseCodec{ code: non_neg_integer(), description: binary(), name: binary(), prefix: binary() }
A multibase codec.
@type encoding() :: %ExIpfs.MultibaseEncoding{code: non_neg_integer(), name: binary()}
A multibase encoding.
Functions
@spec decode(binary()) :: {:ok, binary()} | ExIpfs.Api.error_response()
@spec decode(list()) :: {:ok, list()} | ExIpfs.Api.error_response()
@spec decode!(binary()) :: any() | ExIpfs.Api.error_response()
Decode a multibase encoded string.
Parameters
data
- Data to decode.
@spec encode(binary(), list()) :: {:ok, binary()} | ExIpfs.Api.error_response()
@spec encode!(binary(), list()) :: binary() | ExIpfs.Api.error_response()
Encode a string to a multibase encoded string.
Parameters
data
- File to encode.
Options
b
- Multibase encoding to use.
@spec list(list()) :: {:ok, [codec()]} | ExIpfs.Api.error_response()
List available multibase encodings.
Options
prefix - Only list encodings with the given prefix. numeric - Only list encodings with the given numeric code.
@spec transcode(binary(), list()) :: {:ok, any()} | ExIpfs.Api.error_response()
Transcode a multibase encoded string.
https://docs.ipfs.io/reference/http/api/#api-v0-multibase-transcode
Parameters
data
- Data to transcode.
Options
b
- Multibase encoding to use