Search code examples
blockchainblockchain.info-api

How to sign a transaction in multichain?


I want to know the sequence of API commands or cli commands to sign a transaction in multichain ?


Solution

  • Here is the list of commands you have to call in order to sign a transaction in multichain. SO first in order to sign a transaction you need to have an address so to generate address on multichain node. you have to call : 1.) createkeypairs- it will give you three key value pairs : a) publick key b) public address 3.) privkey

    Then you have to import this address to the node using : 2.) importaddress ( address )

    After importing the address you have to call createrawsendfrom which will give you a hex. 3.) createrawsendfrom

    After createrawsendfrom you have to call signrawtransaction and pass the hex obtained from createrawsendfrom. 4.) signrawtransaction ( hex obtained from createrawsenfrom)

    After signrawtransaction, call sendrawtransaction and pass the hex obtained from signrawtransaction and it will give you the transaction succcesful and txid. Your transaction can be seen on explorer after this.

    5.) sendrawtransaction ( hex obtained from signrawtransaction)