-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Overview
Enable SMS controlled Mini-wallet operator functionality for pay and transfer triggered by SMS messages from the user.
See this Internal demo
Description
This enhancement enables mini-wallet functionality via the API's. Including operator functionality (pay and transfer) as well as end user functionality (deposit, withdraw, authorize). Users can trigger pay and transfer functionality by sending SMS messages to the operators twilio managed phone number.
Simple Process Flow
We will start with the native token flow and then add other tokens in a separate issue.
- User Deposits funds into the miniWallet
- User Approves Funds funds for a creator(developer) in the MiniWallet
- User Receives a request for Payment for Funds to a creator.
- User Pays the creator(developer)
Assumptions
a. All user interactions can (and probably will) also be implemented using
i. From Creator Apps integrating with the sms-wallet client approve screen as explained in the demo
ii. By additional client functionality for deposit, approve and payment (to be developed separately).
b. Request for Payment will handled separately.
Technical Description
The focus for this enhancement is triggering a payment by the user to the creator via SMS (item 4) above. Specifically creating the foundational building blocks which can then be further enhanced.
Technical Flow
- User sends an sms to the operator phone number to trigger payment
- Twilio server receives the message and triggers a call to the sms-wallet-server via webhook
- The server validates the signature of the request is from twilio.
- The server reads the payload to decide which action should be taken
Technical Components
Following is an overview of the technical components to be implemented
- min-wallet support: simple instantiation of AssetManager contract and helper functions for operators to interact with pay and transfer functionality
- Twilio Configuration: To receive SMS messages and forward them to the sms-wallet server
- Server API supporting messages forwarded from twilio
- Twilio Signature Authentication: to ensure that only trusted api calls from twilio are processed.
- Parsing Logic: To interpret the message and perform the appropriate operator actions.
- Localhost testing: We can test locally using the twilio cli to enable a proxy using ngrok.
Approach
We will start with a minimum viable product (MVP) to ensure the infrastructure is in place, parsing logic will be added later.
The mvp will upon receiving a message from a user the operator will pay an amount on their behalf to an approved recipient.
Go Live Checklist (for discussion)
Optional Enhancements
- NFT Minting Capabilities
- Transfer Functionality
- MiniWallet Page on https://demo.smswallet.xyz (preloads deposit, approve and withdraw)
- Additional (non-sms) API's for balance and payment receiving JSON
- Batch APIs allowing creators to request and transfer funds from multiple users
- Utility API's for getting Approval Amounts for Users and for Creators
- Creator CLI Used to generate URL's
Standalone Local Environment
- MiniWallet Contract priority tasks completed MiniWallet Smart Contracts Testing and Deployment #3
- MiniServer deployed integrating with Local Ganache Instance
- Twilio Accounts setup (user, creator)
- GCP DataStore Setup
- Test Suite covering all positive and negative use cases
- Docs Updated
- Swagger Docs
- API Client
- Creator Tutorial on https://docs.smswallet.xyz
- Creator Tutorial video internal example
Harmony Testnet Environment
Harmony Mainnet Environment