Skip to content

Latest commit

 

History

History
executable file
·
29 lines (25 loc) · 1.12 KB

README.md

File metadata and controls

executable file
·
29 lines (25 loc) · 1.12 KB

BitcoinScript

Code is not functional yet

Objectives

Create a transaction should look somehow like this:

$transactionBuilder->addOutput($amountInSatoshi,
                               $scriptBuilder->addData('HELLO') //TxOut script
                                             ->addOpCode($OpCodes::OP_DUP)
                                             ->addData('HELLO2')
                                             ->addOpCode($OpCodes::OP_EQUAL)
                                             ->getRawScript()
                               )
                   ->addInput($outputTransactionHash,
                              $outputIndex,
                              $scriptBuilder->addData('HELLO') //sig Script
                                            ->addOpCode($OpCodes::OP_DUP)
                                            ->addData('HELLO2')
                                            ->addOpCode($OpCodes::OP_EQUAL)
                                            ->getRawScript()
                              )
                   )
                   
                   ->getRawTransaction();