sigil_weftPublish
Publish a hex-encoded payload into the local Weft store.
Method
sigil_weftPublish is registered in the canonical JSON-RPC catalog. Use POST /rpc, Content-Type: application/json, JSON-RPC 2.0 and a caller-controlled request id. Node RPC profile, build feature and runtime activation checks still apply.
Publish a hex-encoded payload into the local Weft store.
Request binding
Source handler: rpc_server::handle_weft_publish in sigil/node/sigil-node/src/rpc_server.rs, line 1090.
The handler directly reads these named fields: bytes_hex, payload_hex. Additional typed parsing, aliases and nested validation are defined by its request types. Field presence alone does not establish optionality.
Parsing excerpt
These source excerpts show binding and validation; they are not runnable client code.
.or_else(|| req.params.get("payload_hex"))
.and_then(|v| v.as_str())
{
Some(value) => value.strip_prefix("0x").unwrap_or(value),
None => return RpcResponse::error(req.id.clone(), -32602, "missing 'bytes_hex' parameter"),
};
let metadata = match parse_weft_metadata(&req.params) {
Ok(metadata) => metadata,
Err(e) => return RpcResponse::error(req.id.clone(), -32602, e),
};
let chunk_size = match parse_weft_chunk_size(&req.params) {
Ok(chunk_size) => chunk_size,
Err(e) => return RpcResponse::error(req.id.clone(), -32602, e),
};Responses and failures
Check HTTP status, parse the JSON-RPC envelope, reject error, and require result on success. Preserve large base-unit integers without floating-point rounding. A catalog method does not bypass authentication, capability, policy or activation requirements.