Skip to Content
IntegrationsPSBT & Offline Signing

PSBT and Offline Signing

Tidecoin keeps the standard PSBT container and adds Tidecoin proprietary records for PQHD origin metadata. These records let an offline signer connect a visible public key to a PQHD seed ID and hardened derivation path without exposing the master seed to the online machine.

This page is the PSBT integration reference. It is not the full wallet API reference; see RPC Reference for exact command arguments.

Proprietary record

Tidecoin PQHD origin metadata is encoded as a PSBT proprietary record:

FieldValue
Proprietary identifierASCII tidecoin.
Subtype0x01.
Map scopeInput or output proprietary map.
Key dataSerialized Tidecoin PQ public key.
ValueSeed ID plus six hardened path elements.

The serialized public key in key data is the Tidecoin PQ public key:

scheme_prefix || raw_scheme_public_key

The scheme prefix in the public key must match the scheme element in the PQHD path.

Value layout

The proprietary value stores:

seed_id32 || compact_size(path_len) || path_element[0] || ... || path_element[5]
ComponentEncodingRequirement
seed_id3232 bytesPQHD SeedID32.
path_lenCompactSizeMust be 6.
Path elementsSix little-endian uint32 valuesEvery element must be hardened.

The path must validate as PQHD v1:

10007h / 6868h / schemeh / accounth / changeh / indexh

changeh must be 0h or 1h. The scheme element must be one of the registered PQ scheme prefixes.

Decoded RPC display

When Tidecoin Core decodes a PSBT and recognizes PQHD origin records, it exposes them as pqhd_origins objects on inputs or outputs:

FieldMeaning
pubkeyTidecoin PQ public key bytes, hex encoded.
seed_idPQHD SeedID32, hex encoded.
pathHardened derivation path formatted like an HD keypath.

The raw proprietary record is still preserved in the normal proprietary array.

Creating PSBTs with PQHD origins

Wallet RPCs suppress PQHD origin metadata by default for privacy. Include it only when a signing workflow needs it.

Commands that support the option expose it as include_pqhd_origins:

tidecoin-cli -rpcwallet="watch" walletprocesspsbt "<psbt>" false ALL true true

For commands that accept an options object, set:

{ "include_pqhd_origins": true }

Exact argument positions vary by command. Check help <command> or RPC Reference before wiring a production client.

Offline signing flow

A conservative offline signing flow is:

  1. Online watch wallet builds an unsigned or partially signed PSBT.
  2. Online wallet includes PQHD origin records for inputs that require offline signing.
  3. Operator transfers the PSBT to the offline signer.
  4. Offline signer decodes the PSBT and validates every PQHD origin record.
  5. Offline signer checks destination addresses, amounts, fees, and change.
  6. Offline signer derives leaf keys from local PQHD seed material and signs.
  7. Offline signer finalizes or returns a partially signed PSBT.
  8. Online broadcaster runs testmempoolaccept.
  9. Online broadcaster submits the final transaction.

The offline signer should refuse to sign if the PQHD path is non-hardened, has the wrong purpose or coin type, has a scheme mismatch, references an unknown seed ID, or asks for a scheme not active on the target network.

Validation checklist

Before accepting a PQHD origin record:

CheckRequirement
IdentifierExactly tidecoin.
SubtypeExactly 0x01.
Public keyValid Tidecoin PQ public key.
Seed IDPresent and known to the signer.
Path lengthExactly six elements.
Hardened bitsEvery path element is hardened.
Purpose and coin type10007h and 6868h.
Scheme matchPath scheme equals public-key prefix.
Change branch0h or 1h.

Unknown Tidecoin proprietary subtypes should be preserved during PSBT processing, but they should not be interpreted as signing authorization.

Privacy boundary

PQHD origin records are not private keys, but they do reveal wallet structure: seed IDs, account paths, change branches, and public keys. Do not include them in PSBTs sent to counterparties or public services unless the recipient genuinely needs them.

Source of truth

TopicSource
Proprietary identifier and subtype../tidecoin/src/psbt.h
PQHD origin encode/decode../tidecoin/src/psbt.cpp
Wallet PSBT origin insertion../tidecoin/src/wallet/scriptpubkeyman.cpp
RPC decoded pqhd_origins display../tidecoin/src/rpc/rawtransaction.cpp
PQHD descriptor/path rulesPQHD Integration

See also: Wallet Integration, Protocol / PQHD, Wallets / Import and Export.

Last updated on