module

Jalopy

Constants

BASE32 = "abcdefghijklmnopqrstuvwxyz234567"
BASE36 = "0123456789abcdefghijklmnopqrstuvwxyz"
BASE58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
MAX_SIZE_V0 = 262144
MAX_SIZE_V1 = 1048576

Class methods

base32(ary)
Source
cid(io, len = io.size, version = 1)

Computes the CID string (Base85-encoded multihash, suitable for IPFS) for a file. Files larger than MAX_SIZE will be split into chunks.

Source
cidns(ary)
Source
cidv0(ary)
Source
cidv1(ary)
Source
encode(ary, alpha, base = alpha.size)
Source
hash(codec : Int32, buf : IO::Memory, version = 1)
Source
node(io : String | IO, len : Number = io.size, version = 1, block : Bytes, IO -> | Nil = nil)

Builds a CID and UNIXFS node for some content.

Source
write_leb128(io : IO, n : UInt32)
Source

Nested types