The escrow program behind Hashlock Markets on Solana: a hash time-locked
contract for native SOL and SPL tokens. One escrow account per swap; the recipient, amount, fee and
timelock are fixed when it is funded. claim pays the recipient against the sha256 preimage of the
hashlock; after the timelock, refund returns the funds to the funder.
Program id: 721JrU7NUvaRBSz3JGyuJQMZMgKrT28aonEGxzngMemf (mainnet-beta and devnet).
Audited by QuillAudits (three rounds).
The program is built reproducibly in the Solana Foundation's verifiable-build image:
cargo install solana-verify
solana-verify build --base-image solanafoundation/solana-verifiable-build:4.2.2 \
--library-name hashlock_htlc "$PWD"
solana-verify get-executable-hash target/deploy/hashlock_htlc.so
solana-verify get-program-hash -u mainnet-beta 721JrU7NUvaRBSz3JGyuJQMZMgKrT28aonEGxzngMemfThe two hashes are equal.
cargo test --locked --manifest-path programs/hashlock-htlc/Cargo.tomlThe integration tests in programs/hashlock-htlc/tests run the built program
(target/deploy/hashlock_htlc.so) in LiteSVM, so build first.
programs/hashlock-htlc/src/lib.rs— the programidl/hashlock_htlc.json— its Anchor IDLCargo.lock— the pinned dependency set the build uses
MIT