Comments (1)
That's actually relatively easy, but requires Deeplink support.
We can rely here on SRC22, i.e. using the generic URL format
action: "sign"
payload: "36b2444574328410c27..." (unsigned transaction bytes)
According to SRC22 the payload needs to be encoded in base64 (although knowing that unsignedBytes is already hex and compatible with network transport).
An url would look like this:
signum://v1?action=sign&payload=MDAyMDM1MWUzYTEyM2MwMDQ5N2Q1NTlkMThkOTg5YjhlMmQ3MjllYjZmNjliNzBjMWRkYzNlNTU0Zjc1YmVmM2VkMjcxNmE0YjIxMjE5MDIwODIyZWIwN2I3Nzc1NzIxMDBlMWY1MDUwMDAwMDAwMDQwNDIwZjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMTAwMDAwMGMxMzIwYTAwMmY4YTMzZmQyOWI0N2Q5NDA0Y2ZlMTUzMWI1NDNjN2MwMTExMDAwMDgwNTM2ZjZkNjUyMDU0NjU3Mzc0MjA0ZDY1NzM3MzYxNjc2NQ==
SignumJS already supports this in Methods:
createDeeplink
and parseDeeplink
https://signum-network.github.io/signumjs/modules/util.html#createdeeplink
So the flow is:
- Get unsigendTransactionBytes (generate Tx using the senders public key only)
- The dApp generates the deeplink for signing (createDeeplink)
- Using the deeplink would open the Mobile Wallet
- Mobile wallet needs to parse the incoming link -> support for two actions:
pay
(to be compatible with phoenix codes) andsign
- Mobile wallet navigates to Signing Screen (if action=sign)
- Gets the unsigned bytes and parses it using node function
parseTransactionBytes
- Shows data and asks for confirmation
Bonus: the dApp can check the blockchain pending bytes for signed transaction.
from signum-mobile-wallet.
Related Issues (20)
- Transfer Funds Wizard
- Transfer Wizard Form Setup
- Recipient Selection
- Holdings Selection
- Transaction memo/content assignment HOT 1
- Fee selection
- Transfer confirmation screens
- Setup EAS
- Dark Mode Support
- About App Screen
- Subscriptions Support
- Show account Avatar
- Invoice Generation HOT 1
- Aliases TLD support HOT 2
- Send and read encrypted attachment
- Show token avatar
- Full offline support
- Fingerprint Login settings
- Manage commitment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from signum-mobile-wallet.