Skip to main content
Glama

build_op_return_transaction

Constructs OP_RETURN output data for embedding information in Bitcoin transactions, preparing the script for inclusion without creating or broadcasting the transaction.

Instructions

Construct OP_RETURN output data for a transaction.

This prepares the data for inclusion in a transaction but does not create or broadcast the transaction itself. Args: data: Data to embed encoding: Data encoding ('utf-8' or 'hex') use_envelope: Whether to wrap in BTCD envelope format envelope_type: Envelope type if use_envelope is True ('raw', 'text', 'json', 'hash', 'token', 'file') Returns: Dictionary with 'script_hex' for the OP_RETURN output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
encodingNoutf-8
use_envelopeNo
envelope_typeNoraw

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EricGrill/mcp-bitcoin-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server