API reference / Devices, signing & primitives / Protobuf encode

Protobuf encode

Encode numbered field maps into raw protobuf hex and base64 wire frames.

POSTapi.tikultra.com/v1/crypto/protobuf/encodePrimitive · 2 credits
Upstream
local · protobuf encoder
Access
Every plan
Runs on
Primitive
Billing
Failed calls are free
Older path
/v1/tools/protobuf-encode

Authorization & parameters

x-api-keyheader · stringrequired

Your API key. Create one in API keys.

Body

Send JSON with content-type: application/json.

fieldsobjectrequired

Map of protobuf field numbers to integers, UTF-8 strings, hex bytes or nested objects. For example {"1":12,"2":"test"}.

Client and egress

Runs locally on the protocol primitive layer with deterministic codec / cryptographic state. See Devices, signing & primitives.

Response

A 200 returns JSON with stable field names. Every response carries x-credits-cost, x-credits-tier and x-credits-remaining.

Response fields

Key top-level and nested fields decoded from the mobile upstream payload:

byte_lengthinteger

Decoded byte length value.

hexstring

Decoded hex value.

base64string

Decoded base64 value.

field_countinteger

Total field count.

Errors

Errors return a JSON body with a stable code and cost 0 credits. See Errors and retries.