Bitcoin Forum
May 04, 2024, 08:18:03 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: spend BTC from contract  (Read 180 times)
louisdm31 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 1


View Profile
November 07, 2018, 09:19:20 AM
Merited by LoyceV (1)
 #1

Hi everybody,

Some time ago, I bought some stuff on openbazaar.org using moderated bitcoin payment (basically, it means that the payment is temporary sent in a kind-of time-locked 2of3 multisig wallet (see below), then sent back to the seller). Due to a bug while performing the transaction, the payment are still locked in the contract at bc1qn5kcksql85vzgm62za4l9fdqeqatkgx7jjxfg9kr4vdclsswu2gq7rwkzs, whose script is :

OP_IF
OP_2
pubkey1 : 0278a5f340830f529a7be55407b1e79afb67ec048368c52d512509802b82d69f66
pubkey2 : 03f1d527824a97316e9a4e78c62fce50e758f7cb271cfdcf249d5e970dae51cbc4
pubkey3 : 03a21186b3cce30cd037b14cba036fd02dcde7ca362d0e56cd8a939d8fc551f926
OP_3
OP_CHECKMULTISIG
OP_ELSE
5019
OP_NOP3
OP_DROP
pubkey2 : 03f1d527824a97316e9a4e78c62fce50e758f7cb271cfdcf249d5e970dae51cbc4
OP_CHECKSIG
OP_ENDIF

The pubkey2 is controlled by my partner, and one of the two other by myself. The 5019 timelock is over, so only the ELSE part matters. Does anybody know a software which could make advanced transaction with custom inputs and outputs, and sign it, knowing that the contract address is bech32 ?

Thanks in advance !
1714853883
Hero Member
*
Offline Offline

Posts: 1714853883

View Profile Personal Message (Offline)

Ignore
1714853883
Reply with quote  #2

1714853883
Report to moderator
1714853883
Hero Member
*
Offline Offline

Posts: 1714853883

View Profile Personal Message (Offline)

Ignore
1714853883
Reply with quote  #2

1714853883
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714853883
Hero Member
*
Offline Offline

Posts: 1714853883

View Profile Personal Message (Offline)

Ignore
1714853883
Reply with quote  #2

1714853883
Report to moderator
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
November 07, 2018, 09:35:38 AM
 #2

Who holds the 3rd private key? I assume some kind of an escrow ?

You need 2 out of 3 keys signing the transaction. So if the seller refuses to sign the transaction, you need the 3rd key holder to sign it (escrow?).


Does anybody know a software which could make advanced transaction with custom inputs and outputs, and sign it

A lot of tools can do that.

But this won't help you at all since you'd need the private keys to sign the transaction (which you don't have).

You have 2 options. Either (1) get the seller to sign the transaction or (2) get the 3rd keyholder to sign the transaction.

louisdm31 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 1


View Profile
November 07, 2018, 09:46:58 AM
 #3

Thanks for your answer,

In fact my goal is to make the seller recover his funds, so he will accept to cooperate. He is not a technical user at all, that's why I am managing the issue.
If I understand the contract, the only signature of the seller will work given that the time-lock is expired.

The scriptsig should be something like :

<signature from pubkey2> OP_FALSE
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!