Skip to content

Add elements_getunblindedurl endpoint for Liquid explorer URLs with blinding data #359

@BullishNode

Description

@BullishNode

Summary

Add a new Cyphernode endpoint elements_getunblindedurl that returns a fully constructed Liquid explorer URL with unblinded transaction data.

Background

When viewing Liquid transactions in block explorers, confidential transaction details (amounts, assets) are hidden unless the viewer has the blinding factors. The explorer URL can include a #blinded= fragment with the unblinding data to allow viewing the full transaction details.

Requirements

New Endpoint: elements_getunblindedurl

Input:

  • txid - The Liquid transaction ID
  • baseUrl (optional) - The explorer base URL (default: configured value)

Output:

{
  "url": "https://liquid.bullbitcoin.com/tx/{txid}#blinded={amount},{asset},{amountblinder},{assetblinder},...",
  "txid": "{txid}"
}

Implementation Details

  1. Call gettransaction RPC to get transaction details with blinding data
  2. Extract amountblinder, assetblinder, asset, and amount from each relevant output
  3. Construct the URL with #blinded= fragment containing comma-separated output data
  4. Return the full URL

URL Format

{baseUrl}/tx/{txid}#blinded={amount},{asset},{value_blinder},{asset_blinder}[,{amount2},{asset2},{value_blinder2},{asset_blinder2},...]

Related Issues

  • SatoshiPortal/LiquidNode#144 - Parent issue
  • Will be consumed by LiquidNode, API-Orders, BB-Admin, BB-Exchange

Files to Modify

  • proxy_docker/app/script/elements_walletoperations.sh - Add function
  • proxy_docker/app/script/requesthandler.sh - Add endpoint handler
  • cyphernodeconf_docker/templates/gatekeeper/api.properties - Add permission

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions