An embedded software development kit (SDK) is an essential component in an IoT ecosystem. The existing embedded SDKs, while facilitating developers to build centralized, cloud-native IoT applications, are not able to meet the increasing requirements of connecting smart devices to Web3, in particular decentralized physical infrastructure networks (DePINs). To close this gap, we present a universal, open-source embedded SDK called ioConnect in this paper. Built upon the emerging technologies such as the platform security architecture (PSA) and self-sovereign identity (SSI), ioConnect is the first embedded SD K that allows developers to connect smart devices to a decentralized network and create rich and trustworthy device-to-device and device-to-person relationships. ioConnect is designed with a layered architecture coupled with a flexible configuration utility and is able to support a wide range of smart devices with different processing capabilities and memory footprints. Our extensive performance evaluations on two resource-constrained smart devices demonstrate viability and effectiveness of ioConnect when used in practice.