/build/rpc / assets / raw_attach
rawtxattachzkchunk
rawtxattachzkchunk "hex" vout "asset_id" "vk_hash" chunk_index chunk_count "data" Attach a ZK_PARAMS_CHUNK TLV to the specified vout of a raw transaction. ZK chunks carry cryptographic verification key parameters for ZK proof validation. Arguments: 1. hex (string, required) Raw transaction hex 2. vout (numeric, required) Output index 3. asset_id (string, required) 32-byte asset id hex (no 0x) 4. vk_hash (string, required) 32-byte verification key hash (matches IssuerReg.vk_commitment) 5. chunk_index (numeric, required) Chunk index (0-based, u16) 6. chunk_count (numeric, required) Total chunk count (u16, max 8) 7. data (string, required) Chunk data (raw hex bytes) Result: "hex" (string) Modified hex Examples: > bitcoin-cli rawtxattachzkchunk "<hex>" 0 "<asset_id>" "<vk_hash>" 0 1 "<data_hex>"
Signature
rawtxattachzkchunk(hex: string, vout: number, asset_id: string, vk_hash: string, chunk_index: number, chunk_count: number, data: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"rawtxattachzkchunk","params":["\"<hex>\"",0,"\"<asset_id>\"","\"<vk_hash>\"",0,0,"\"<data>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| hex | string | yes | Raw transaction hex |
| vout | number | yes | Output index |
| asset_id | string | yes | 32-byte asset id hex (no 0x) |
| vk_hash | string | yes | 32-byte verification key hash (matches IssuerReg.vk_commitment) |
| chunk_index | number | yes | Chunk index (0-based, u16) |
| chunk_count | number | yes | Total chunk count (u16, max 8) |
| data | string | yes | Chunk data (raw hex bytes) |
Result
Type: any
"hex" (string) Modified hex
Source: services/core-node/bcore/src/rpc/rawtransaction.cpp:792
C++ symbol: rawtxattachzkchunk