buildDestination

Build a TimeLockVaultDestination for the current index at blockHeight and cache it as destination. Derived at Otoplo's BIP-44 path m / 44' / coinType' / [contractIndex]' / 0 / [index], with coinType from account.addressDerivationCoin.

blockHeight is a visible arg in the locking script, so it changes the vault address but not the signing key. Re-deriving the same (seed, contractIndex, index, blockHeight) reproduces the same address, which is also the recovery path.

Re-points the CURRENT leaf rather than allocating a vault — advance with nextDestination or pass a fresh index to the overload. A re-pointed vault is not lost: it stays tracked through the receiving map and its tagged UTXOs (knownVaults).


Jump the cursor to index and buildDestination there, keeping the LOCKTIME_THRESHOLD ceiling — use this to create a vault at a chosen leaf. Moving the cursor always rebuilds destination in the same step, so the two cannot drift apart.

To re-derive an existing on-chain vault during recovery — where the committed unlock value is dictated by the chain and may exceed the ceiling — use recoverDestination instead.