Hi there,
I have a client A that uses the JavaSDK to produce a multisig address composed by the account A and B and a signed transaction. The transaction is signed by A only.
A wants to send the transaction to the backend B, so B can sign it and send to the blockchain.
A sends to B this JSON:
{“multiSigAccount”:{
“publicKeys”:[“wFJi8oEISKHen0LDeEk+yXD3zHQNeultuTF+xVbnQzw=”,
“dRQsIsSYbCE4YhxNGMFV0ykS1WBvrl5O7vX+3SvjDy0=”],
“threshold”:2,
“version”:1},
“signedTransaction”:{
“msig”:{
“subsig”:[{“pk”:“wFJi8oEISKHen0LDeEk+yXD3zHQNeultuTF+xVbnQzw=”,
“s”:“jNxed0mD+7jPAP7sGBIEq0hBoVk5RJ8+l9GxMypISMI+dKwWeiGGNse2vsCBjrqR860sfJsuC4py23dxDdUFBg==”},{“pk”:“dRQsIsSYbCE4YhxNGMFV0ykS1WBvrl5O7vX+3SvjDy0=”,
“s”:“AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==”}],
“thr”:2,
“v”:1},
“txn”:{“close”:“NcSelNBbzNvQC5PSu0I8yJvwTjdPxlSerO8UI+5T6Ic=”,
“fee”:1000,
“fv”:9061117,
“gen”:“testnet-v1.0”,
“gh”:“SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=”,
“lv”:9062117,
“note”:“2VB7ImRpYWdub3Npc0tleXMiOlsiWUJKR0Y0VUJCQkVLRFhVN0lMQlhRU0o2WkZZUFBURFVCVjVPUzNOWkdGN01LVlhISU02RUxNWUxZVSJdfQ==”,
“rcv”:“NcSelNBbzNvQC5PSu0I8yJvwTjdPxlSerO8UI+5T6Ic=”,
“snd”:“bQFchr8rr7rK8BjoH3qAmh3oQYq1ELXjZSIfkQeLRII=”,
“type”:“pay”}}}
Now B has to parse the json to reconstruct all the objects he needs to complete the transaction and send it to the blockchain.
How can i achieve this in JavascriptSDK? Is there some JSON parser that i can use? Thanks!