This paper proposes a general and interoperable Web of Things (WoT)-oriented architecture to support a distributed storage application. In particular, the focus is on a distributed ledger service dedicated to machine-to-machine (M2M) transactions occurring in an intelligent ecosystem. For this purpose, the basic functional modules have been characterized and integrated into a comprehensive framework relying on an IOTA approach. Furthermore, a general protocol that is built upon an underlying publish-and-subscribe framework is proposed to support all the application phases. The proposed approach has been validated by a simulation campaign targeting the achievable latency and throughput and, further, by a qualitative analysis of high-level metrics, both pointing out several advantages in terms of interoperability, scalability, and mobility support, together with addressing some constraints affecting service availability and security.