A two-tier blockchain framework to increase protection and autonomy of smart objects in the IoT