polymorpher / sms-wallet

SMS Wallet - non-custodial wallet bound to phone number
https://smswallet.xyz
6 stars 4 forks source link

MiniWallet NFTs : Minting NFT for users when registering #10

Closed johnwhitton closed 2 years ago

johnwhitton commented 2 years ago

MiniWallet NFTs

Proposed Flow

Proposed Technical Components

polymorpher commented 2 years ago

A semi-protected API can be added on miniwallet server for this. The API can be called by the client, but the client should provide its address and a valid signature. The miniwallet server can then call the server backend (or simply lookup from datastore) and verify the address is indeed a registered user, before issuing the NFT.

johnwhitton commented 2 years ago

Have created this NFTID.md

Overview

When registering their phone number for sms-wallet we would like to issue an NFT to users and creators which they can use later for identity Verification.

In terms of Decentralized Identity. SMS-Wallet is attesting to the digital identity of the creators and users.

Registration Flow

A semi-protected API can be added on miniwallet server for this. The API can be called by the client, but the client should provide its address and a valid signature. The miniwallet server can then call the server backend (or simply lookup from datastore) and verify the address is indeed a registered user, before issuing the NFT. comment is here

Alternate approach (validating signature optional) When registering the server calls the miniserver endpoint apicreate with the phone number of the registered user. Miniserver queries the datastore to get the address of the user. It checks that the user does not have an existing NFTId (tokensOfOwner(address) = 0). Generates Metadata and Persist an image. Mints a new token to the address.

Airdrop Flow

All registered users are read from the datastore. There addresses are collected. Metadata and Images are persisted for each address. A multicall CommunityMint is called to iterate through the users minting tokens.

Technical Components

Frontend

Contract

Contract Configuration

NAME=MiniID
SYMBOL=NFTID
TEST_MINI721_DEPLOY_SALES_IS_ACTIVE=false
TEST_MINI721_DEPLOY_METADATA_FROZEN=false
TEST_MINI721_DEPLOY_PROVENANCE_FROZEN=false
TEST_MINI721_DEPLOY_MAX721_TOKENS=1000000000000
TEST_MINI721_DEPLOY_MINT_PRICE=0
TEST_MINI721_DEPLOY_MAX_PER_MINT=1
TEST_MINI721_DEPLOY_BASE_URI=ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/
TEST_MINI721_DEPLOY_CONTRACT_URI=ipfs://Qmezo5wDKz7kHwAPRUSJby96rnCfvhqgVqDD7Zorx9rqy8

Metadata

Image/Avatar

(Options to generate images include)

Persistence

MiniServer

References

johnwhitton commented 2 years ago

Closing this issue as it will be worked on under #13