[x] 1. GraphQL (GQL from here on) endpoint for users to initiate send (I (sender) want to send x eth to receiver) #3.
[x] 2. Check user balance is enough #3.
[x] a. Create a SQL table user_bal: (address, balance)
[x] b. Query that sender.balance >= x #3 .
[ ] 3. Find relevant leaves in state merkle tree: Given sender and x eth, find the leaves owner by sender in merkle tree that have total balance >= x eth.
[ ] 4. Prepare message for sender authorization and reply to the GQL request with these messages.
[x] 5. Send API to receive the leaf, coin and receiver info along with signature from sender #5 #7.
System design: https://excalidraw.com/#json=curpA9Oidkvos4QTQHqET,KHZ4Y8j9aN3HbSmJ6N-kyw
Send flow
sender
) want to sendx
eth toreceiver
) #3.user_bal
: (address, balance)sender.balance >= x
#3 .state merkle tree
: Givensender
andx
eth, find the leaves owner bysender
in merkle tree that have total balance >=x
eth.sender
authorization and reply to the GQL request with these messages.n
messages from queue and batch prove them.n
messages.Mint flow
Withdraw flow
Proving remains a blocker.