Waldrop SDK · Recipe
Bundle multiple files into one blob
Pack N files into a tar, upload as a single Walrus blob — one publisher
PUT, one on-chain register tx, no matter how many files. Filenames are
preserved inside the tar so unpackTar recovers the originals on read.
Bundle vs. per-file uploads
Bundle is the right call when files travel together — archives, datasets,
static-site builds, lecture series. If files need independent sharing,
expiry, or replacement, upload each one separately so they get distinct
blob_ids and BlobRef rows.
Upload
Download + unpack
unpackTar filters out malformed/empty entries silently — compare
entries.length against the upload's files.length if you want to detect
partial parses.
What you get for free
01
Filename preservation
Each file keeps its name in the tar header — recovered on unpack.
02
MIME inference
unpackTar guesses content-type from extension (csv, json, md, png, …).03
One tx, one gas spend
Bundling 50 files costs the same gas as uploading 1.
04
Encryption works the same
Pass
encrypted: true — the whole tar gets SEAL-encrypted as one blob.Tar format details
- No compression — Walrus storage is efficient, gzip-in-the-browser adds
a slow read-path step. Switch to
application/x-tar+gziplater if needed. - Library:
nanotar— same as the Waldrop dapp's bundle strategy. Filenames + mtime preserved; default mode is0o644.
Power-user
packFilesAsTar is exported standalone if you want to upload the bundle
through your own pipeline:
Waldrop · 2026cryptokarigar