Off-Chain Signature Mechanism (OSM)
The off-chain signature mechanism aims to provide a secure way for signing transactions without using browser wallet.
Flow
The Off-chain Signature Mechanism is aiming to abstract the interactions between the user and any blockchain in order to achieve better accessibility of the technology, better UX, and security.
Instead of having the user sign blockchain transactions with Metamask or another wallet provider, the SkillWallet tie together the NFT ID and the mobile phone of the user.
When the SkillWallet mobile app is downloaded, it generates a public/private key pair that is used for secure authentication. The public key gets associated with this tokenID on-chain.
After the SW is activated and tied to the mobile app, the user can use it to sign transactions and verify their identity, by signing with their private key and verifying with the Chainlink EA.
Every contract that implements ISWActionExecutor can take advantage of the OSM.
How it works is that the user scans a QR code, that has encoded action, parameters, and a nonce. The mobile app signs the payload and sends it via HTTP to a backend proxy server that has the only purpose to call the Off-chain signature mechanism contract for verifying the signature. The OSM contract calls the Chainlink External Adapter, it verifies the signature and returns true/false results to the contract. The callback of the chainlink external adapter, calls the execute function from the contract that corresponds to the action.
The OSM is highly abstracted, customizable, and reusable and it can very easily be integrated into external smart contracts. It is built to be integratable in any contracts and to be used for any actions. In order not to put limitations on the parameters sent, the function accepts arrays with int, string, and address parameters.
Integrate into your contract
Install the SkillWallet npm package.
2. Import the ISWActionExecutor.sol
in your contract
3. Inherit the interface and implement the execute
function
4. Contact the SkillWallet team to define your actions and your contract address in the SkillWallet contract
5. Use our web component for generating the QR codes with encoded actions and parameters. (TBD)
Last updated