Litecoin to Bitcoin address?

litecoin

#61

have you tried
signrawtransaction (tx hex) ?

the tx hex that getrawtransaction (txid) returns


#62

or have you tried:
unlock([{“txid”:"(txid)",“vout”:n},…) ?


#63

“error”: “Input not found or already spent”


#64


unlock([{1cad1a200d63604ff27be68e28d3d9bb964e7c929d4fdb9791e178aefde3a2b2:"(1cad1a200d63604ff27be68e28d3d9bb964e7c929d4fdb9791e178aefde3a2b2)",“vout”:n},…)


Method not found (code -32601)


#65

it would be:
unlock ([{“txid”:“1cad1a200d63604ff27be68e28d3d9bb964e7c929d4fdb9791e178aefde3a2b2”,“vout”:0}])

or

unlock ([{“txid”:“1cad1a200d63604ff27be68e28d3d9bb964e7c929d4fdb9791e178aefde3a2b2”,“vout”:0,“356NuZUn1rwUjj1vv5mP8TaMWJ46SbQS4X”}])

not to sure on that one but its worth a a shot…make sure the “vout” is set correctly


#66

method was not found because you did not set your vout at all

change the “n” to what its suppose to be…usually 0 but might be different in your case


#67

ok. I didn’t do anything about vout so far.


#68

Method not found (code -32601)


#69

I am pretty sure I know what the issue is here…you need to create a raw P2WSH or P2SH transaction sending the funds to an L address in your wallet if you cannot unlock it in your wallet with the 3 address somehow…
P2SH transactions usually are not seen by wallets and are just hashes that refer to previous transactions to be spent at a later time to a new address…

the coins are in the 3 address…u can see them on the blockchain…and so long as you have the pubkey to the 3 address you can redeem the coins by sending them to an L address with a raw P2SH transaction

u do know that wallets are not actually wallets right?..they are key chains that unlock transactions on the blockchain…the blockchain is the coins…


#70

do I need the public key of the 3-address? I haven’t used that anywhere so far.


#71

u should already have it…the address that create the # address is the same pubkey as the one that created the M address …they are all cypto-graphically calculated from the same private public key pair


#72

I can find the public key of the 3-address. let’s say I have it, how would I use it?


#73

by createing a raw transaction and signing it with the sciprtsig and pubkey that belongs to the private public key pair that created all your address…all your address belonging to the L address that created the 3 address the coins were sent to that is…if you are the one who created the M address you would have a redeem script as well…but you can get this with getrawtransaction…you do have the pub key if you have the private key

or have the address and have created a signature in the past you can redeem the pubkey by referencing the blockchain with an RPC call ( similar to what pywallet does)


#74

it basically works like this…the scriptsig unlocks the scriptPubkey

the scriptPubkey is a list of commands in script format to verify ownership of the transaction to spend the value attached to it…

your scriptsig is created from your public key and signature(signature is derived from private key)


#75

thanks for all this information. but I am assuming I should run some more code on the console, correct? if so, what code should I run?


#76

yes run it in console…

quick question…when you run addwitnessaddress "3"address
does it return the same M address that converted tot eh 3 address? or a different one?

if its a different one then you need to get the pubkey for the different M address
maybe even import all pubkeys belonging to all M address even…
you will only get the pub key if
validateaddress returns that the address is yours or in your wallet so the address must be imported with importaddress(address) or import pubkey (pubkey)

if the keys do not match your keys then they will be watch only when imported however…so dont do this if you know you do not want to watch the address that you know is not in your wallet
(importpubkey first before import address)

the idea here is if your private keys are there and not showing coins in your wallet because you have not imported the address belonging to the 3 address and corresponding private key…so importing the correct pubkey and address’ should fill the gap so your wallet will see the coins on the chain

if not then creating a raw P2SH/P2WSH transaction to send the coins to a new “L” addressis your best bet


#77

addwitnessaddress "356NuZUn1rwUjj1vv5mP8TaMWJ46SbQS4X"
MBJXDStjxynuYEHq1xkix6pkpzeYP9cW2c

that is the same M-address. what now?


#78

just to be clear here…
public/private key cryptography like what bitocin and litecoin uses take a single private key and makes your public key using the elliptic curve…then your L address is calculated form that…so are all your M address and the 3 address…that one private key and public key pair will view your coins on the chain as long as all parameters set by the scriptPub key are met…

the issue I see here is if you run addwitnessaddress on a 3 address it should return an error…

so you need to import the one publickey to your wallet that made the L address that made the M address that mad e the 3 address

or create a raw P2SH transaction sending the coins to a new L address/key


#79

I think I know what might work…

other than
reindex rescan (have you tried this yet?)
do this…in console type:
getaccount MBJXDStjxynuYEHq1xkix6pkpzeYP9cW2c
or
getaccountaddress MBJXDStjxynuYEHq1xkix6pkpzeYP9cW2c

if this gives you an “L” account address then do this type:
validateaddress (“L” account address)

this will show you a pubkey for the account address
if not then you need to get the account address belonging to the L address that made the M address and the 3 address

once you have your pubkey type:

addmultisigaddress 1 [“pubkey”] (“account address”)

make sure to use the correct account address that belongs to the l address that the M and 3 address containing the coins was created by

basically the order of address creation should go privatekey : publickey : account address : Laddress created by account address : M address : 3 address

Good luck…hope this helps

btw in console type:
help
and you will get a list of all available options…
also see “command line options” under “help tab” as well for more options
(command line options cannot be run in console and must be run from command prompt…u shouldnt need to use these options though)


#80

hope u got my last edit…have you tried
rescan
or
reindex
then
rescan
in console?

this may be all you need to do in the first place if you have not done it already

however I still think all you should have to so is sign the transaction that funded the 3 address like this:
signtransaciton (txid)