Sign a message with Metamask

Metamask signed signatures

MetaMask is a browser extension and mobile application that functions as a cryptocurrency wallet and gateway to blockchain-based decentralized applications (dApps). Atomicrails make use of the Metamask Signature functionality by signing a message to verify the owner of the wallet address.

Supporting Ethereum and Ethereum-compatible networks, MetaMask allows users to manage their digital assets, sign transactions, and interact with dApps, all from within their browsers or mobile device. The application has become an indispensable tool for millions of users across the globe.

Why Atomicrails need signed signatures

To optimize the user experience Atomicrails has integrated MetaMask into its platform. This integration allows users to leverage the security and versatility of MetaMask while taking advantage of the features offered by AtomicRails.

The Atomicrails protocol needs to interact with your NFT gift cards at various points and utilizes Metamask signatures to ensure that you are the rightful owner of the NFT gift card.

When to sign signatures

When claiming the NFT gift card on AtomicRails

When a user claims an NFT gift card, they are prompted to sign a transaction on their MetaMask wallet to verify their ownership of the address. Following this process, the AtomicRails protocol can send the NFT gift card to the user’s address, with the assurance that the owner of the address had previously signed the transaction. This operation doesn’t incur any cost for the user since the gas fee for the NFT transfer is covered by AtomicRails.

“Technically speaking, the ‘eth_signTypedData_v4’ method is utilized here to enable the user to sign the transaction. This method provides the most human-readable signatures, which are efficient to process on-chain. It adheres to the EIP-712 specification, enabling users to sign typed structured data that can be verified on-chain. It presents the structured data in a user-friendly way, such as displaying known account names instead of addresses.”

Spending the NFT gift card on Cryptorefills

When the user intends to spend their NFT gift card balance on CryptoRefills, they must interact with the MetaMask wallet twice. 

Initially, the user is required to sign a transaction on their MetaMask wallet to verify their address’s ownership, using the ‘eth_signTypedData_v4’ method of the previous AtomicRails operation. 

Subsequently, the user is asked to approve a transaction that enables CryptoRefills, the payment processor (spender), to spend the NFT gift card balance.

Get started with blockchain gift cards