Binary Data for TurboWarp

Store project-scoped named bytes and expose replayable raw body snapshots without converting data to base64 or text.

Enable the MVP

Set globalThis.BINARY_DATA_MVP = true before loading the unsandboxed extension.

Blocks

Create binary data from UTF-8 text, test and delete names, and inspect MIME type, byte length, and SHA-256.

Integration

The JavaScript API accepts ArrayBuffer and Uint8Array. The Named Data provider exposes project-scoped raw snapshots for HTTP responses.

Binary Data: complete block reference

All 6 blocks are documented below, including compatibility blocks and blocks available through optional features. Select a block to read its behavior, arguments, default values, and menu choices. Each block has a permanent link.

store UTF-8 [TEXT] as binary [NAME] with MIME [MIME]

Copies UTF-8 encoded text into a project-scoped named binary value.

Block type: COMMAND. Opcode: createUtf8. Permanent link

ArgumentTypeDefault valueMenu choices
TEXTSTRINGHello
NAMESTRINGmessage
MIMESTRINGtext/plain; charset=utf-8

binary [NAME] exists?

Reports whether a project-scoped named binary value exists.

Block type: BOOLEAN. Opcode: hasBinary. Permanent link

ArgumentTypeDefault valueMenu choices
NAMESTRINGmessage

delete binary [NAME]

Deletes a project-scoped named binary value.

Block type: COMMAND. Opcode: deleteBinary. Permanent link

ArgumentTypeDefault valueMenu choices
NAMESTRINGmessage

MIME type of binary [NAME]

Returns the MIME type of a named binary value.

Block type: REPORTER. Opcode: mimeType. Permanent link

ArgumentTypeDefault valueMenu choices
NAMESTRINGmessage

byte length of binary [NAME]

Returns the byte length of a named binary value.

Block type: REPORTER. Opcode: byteLength. Permanent link

ArgumentTypeDefault valueMenu choices
NAMESTRINGmessage

SHA-256 of binary [NAME]

Returns the SHA-256 digest of a named binary value.

Block type: REPORTER. Opcode: sha256. Permanent link

ArgumentTypeDefault valueMenu choices
NAMESTRINGmessage

Repository guide and examples