LDWM and XMSS are both stateful hash-based signatures. Signing reads a private key and a message and generates a signature but also generates an updated private key. Make sure to update the back-up private key before shutdown the program. You can use String() method to serialize a key and ParseXXX() to recover the key from a string.
The merkle tree traversal algorithm used in LDWM and XMSS are in log space and time according to Szydlo04.
The runtimes of some high security signature types in LDWM and XMSS are very long. However, weaker security signature types such as LMSSHA256M32H10 in LDWM-LMS and XMSSSHA2H16W256 in XMSS-XMSS are enough for security consideration.
TODO
implement the stateless hash-based signatures scheme SPHINCS