DIY Physical Backed NFTs

EIP-5791 Physical Backed Tokens using ESP32 and BLE


About the ESP-5791 project memory

The concept of Physical Backed Tokens (PBTs) allows one to bind a NFT permanently to a physical object, using a small chip that can generate cryptographic keys and sign messages. The signature obtained from a device like this can be used to interact with a smart contract to transfer the linked NFT to one's wallet.

Some folks smarter than me put together the specification for EIP-5791 on how to make this work both on the smart contract- and hardware-side, in a way that it's safe to use and no one involved in the process can cheat. We've implemented this standard using the ESP32 microcontroller with Bluetooth Low Energy, available freely and at low cost in form of various hardware development boards.

ESP-5791 on Github code

ESP32 favorite EIP-5791 ESP32 favorite EIP-5791

Batteries included view_in_ar

The ESP-5791 project is fully free and open source (MIT licensed), complies with the EIP-5791 standard, and includes

Key advantages of PBTs

One small chip, endless applications.

dataset

Deploy Token Contract

The first step to get your PBT project going. You'll only need your wallet to deploy the smart contract directly from the browser.

Don't have wallet yet? Get MetaMask for Desktop or Mobile.

  • datasetDeploy PBT Contract

    First we'll need to deploy a Physical Backed Token to the blockchain. You can use Remix IDE with the button below to deploy your own instance of our ready-made PBT smart contract directly from the browser.

    Deploy with Remix open_in_new

    If you prefer to use a local development environment, the ESP-5791 repository contains a complete Hardhat project to get you started.

Ready for your project: chip software, smart contracts and tools.

radar

Scan & Link Chips

Collect your chips' addresses and link them to the NFTs in your PBT smart contract.

Don't have an ESP-5791 device yet? Make your own, it's free and open source!

  • radar1) Scan Chip Addresses

    Bulk scan ESP-5791 devices around you and fetch their chip addresses. When prompted, select a device you want to scan. Click again to scan another device.

    Works in Chrome on Desktop only. Due to limitations with Web Bluetooth, you'll have to select each device you want to scan individually.

    You may skip this step if you're using this tool with hardware other than ESP-5791, or prefer to enter your addresses manually in step 4.

  • wallet2) Connect Wallet

    Connect your wallet so you we can link your chip addresses to token ids in step 4:

  • edit_location3) Token Contract

    Enter the contract address of your deployed PBT contract here:

    edit_location

  • dataset_linked4) Link Chip Addresses

    One last step to go! Assign Token IDs to your Chip addresses in your smart contract here.

100% free and open source software (MIT license).

bluetooth_connected

Claim Physical Backed Token

Connect to your gadget directly from the browser via Web Bluetooth and get your signature to claim the connected NFT.

Don't have an ESP-5791 device yet? Make your own, it's free and open source!

  • wallet1) Connect Wallet

    Connect your wallet so we can send your generated signature directly to your selected PBT contract in step 4:

  • edit_location2) Token Contract

    Enter the contract address of your PBT contract here:

    edit_location

    - or -
    * (Demo contract is deployed to Goerli testnet)
  • verified3) Get Signature

    Connect to your device via Bluetooth to get a recent signature.

    Works in Chrome on Desktop only. You may skip this step if you're using this tool with hardware other than ESP-5791, or prefer to enter your signature manually.

  • diamond4) Claim Token

    The final step! Send your signature to the smart contract to transfer the linked PBT into your wallet.

Connect the physical world to the digital one.