The address derived from the script
Unix timestamp (ms) when this contract was created
OptionalexpiresUnix timestamp (ms) when this contract expires (optional)
OptionallabelHuman-readable label for display purposes
OptionalmetadataOptional metadata for external integrations.
Type-specific parameters for constructing the VtxoScript. All values are serialized as strings (hex for bytes, string for bigint). The ContractHandler for this type knows how to interpret these.
The pkScript hex - unique identifier and primary key for contracts
Current state of the contract
Contract type identifier. Built-in types: "default", "vhtlc" Custom types can be registered via ContractHandler.
Represents a contract that can receive and manage VTXOs.
A contract is defined by its type and parameters, which together determine the VtxoScript (spending paths). The wallet's default receiving address is itself a contract of type "default".
External services (Boltz swaps, atomic swaps, etc.) create additional contracts with their own types and parameters.
Example