Skip to main content

Crate hns_swap

Crate hns_swap 

Source
Expand description

HIP-0001 name swaps, signed marketplace listings, and HNS HTLC primitives.

Structs§

DutchAuction
DutchStep
FixedPriceListing
A signed, expiring publication envelope around one fixed-price Shakedex presign. The embedded SwapProof remains the sole authority for the name, owner outpoint, lock script, seller key, price, network, and genesis hash.
HnsHtlc
Runtime-independent descriptor for a native Handshake absolute-timelock HTLC. The lock script has a receiver-signed SHA-256 preimage branch and a refund-owner-signed OP_CHECKLOCKTIMEVERIFY branch.
HnsHtlcPreimage
HsdTimeLock
An HSD median-time lock encoded at 512-second consensus granularity.
ListingCancellation
A signed, expiring tombstone for one exact fixed-price listing.
NetworkBinding
ShakedexLockDescriptor
Listing-independent identity and recovery authority for one Shakedex name lock.
SwapProof

Enums§

HnsHtlcSpend
ShakedexSpendKind
Canonical spend branches of a HIP-0001/Shakedex v2 name lock.
SwapError

Constants§

COMPACT_SIGNATURE_SIZE
FIXED_PRICE_LISTING_VERSION
HNS_HTLC_HASHLOCK_SIZE
HNS_HTLC_PREIMAGE_SIZE
HNS_HTLC_SIGHASH
The only signature-hash mode admitted by native HNS HTLC helpers.
HNS_HTLC_VERSION
HSD_LOCKTIME_MULTIPLIER
LISTING_CANCELLATION_VERSION
MARKETPLACE_SIGNATURE_SIZE
MAX_AUCTION_BUNDLE_SIZE
MAX_AUCTION_STEPS
MAX_FIXED_PRICE_LISTING_SIZE
MAX_HNS_HTLC_DESCRIPTOR_SIZE
MAX_HSD_TIME_LOCK
MAX_LISTING_CANCELLATION_SIZE
MAX_SWAP_PROOF_SIZE
SHAKEDEX_PROTOCOL_VERSION
SHAKEDEX_RECOVERY_SIGHASH
Seller hash mode for transferring a locked name to an explicit recovery recipient before its later consensus FINALIZE.
SWAP_LOCK_SCRIPT_SIZE

Functions§

canonical_reverse_dutch_schedule
create_lock_script
encode_time_lock
encode_time_lock_not_before
Encode a safety deadline so the represented HSD median time is never earlier than seconds.
lock_script_hash