This is a Drupal 8 module that can be placed in the /modules/contrib folder and installed like other modules.

Unlock Protocol provides the ability to show/hide content based on whether the content has been "unlocked" by a payment with digital currency. This payment uses a browser-based extension wallet, and hence a "subscription" can be determined.

The premium content is simply hidden and shown in the DOM in this module, illustrating the capabilities.