Open ipr0310 opened 3 months ago
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
createDeeplink
parseDeeplink
https://signum-network.github.io/signumjs/modules/util.html#createdeeplink
So the flow is:
pay
sign
parseTransactionBytes
Bonus: the dApp can check the blockchain pending bytes for signed transaction.
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:
SignumJS already supports this in Methods:
createDeeplink
andparseDeeplink
https://signum-network.github.io/signumjs/modules/util.html#createdeeplink
So the flow is:
pay
(to be compatible with phoenix codes) andsign
parseTransactionBytes
Bonus: the dApp can check the blockchain pending bytes for signed transaction.