Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.train.tech/llms.txt

Use this file to discover all available pages before exploring further.

The core of the protocol relies on the HTLC contract. This contract is responsible for locking and unlocking funds based on specific conditions.

Core Functions

lock ()

Creates an HTLC on the source chain with a derived hashlock from the recoverable secret generation mechanism.

reveal ()

Reveals the derived secret to unlock HTLCs across all participating chains.

redeem ()

Reveals the secret to claim locked funds.

refund ()

Allows the original sender to reclaim their locked funds after the timelock expires if the exchange wasn’t completed.