External Key Lock unspent asset

+1 vote
Is it possible to lock unspent asset for External Key?

If yes please teach me how.


Thank you very much!
asked May 15, 2018 by arkmeje

1 Answer

0 votes
The locked status of a UTXO (unspent transaction output) is not a blockchain-level event but rather just a status which is managed within the node's wallet. Any locked output will not be used when automatically selecting outputs to create a new transaction. So there's nothing to prevent you unlocking an output which belongs to an external private key.
answered May 15, 2018 by MultiChain
I tried to use preparelockunspent using external address. I got this error
    "result": null,
    "error": {
        "code": -709,
        "message": "Private key for from-address is not found in this wallet"
    "id": null

What I am looking for is a way to input the private key without importing it in the node.
If you're using an external private key toy need to replace preparelockunspent with createrawsendfrom, preparing a transaction to send the desired quantity back to the same address, then using signrawtransaction+sendrawtransaction to sign and broadcast it. There is an extensive tutorial on this in the "Exchanging with external private keys" section of this page: https://www.multichain.com/developers/atomic-exchange-transactions/