bitcoin-php
bitcoin-php copied to clipboard
1 Page Transaction Builder
there are lot of problems on windows with dependent lib, best way to implement below code in single page without any dependices.
require DIR . "/../vendor/autoload.php"; use BitWasp\Bitcoin\Address\AddressCreator; use BitWasp\Bitcoin\Transaction\TransactionFactory; $addrCreator = new AddressCreator(); $transaction = TransactionFactory::build() ->input('99fe5212e4e52e2d7b35ec0098ae37881a7adaf889a7d46683d3fbb473234c28', 0) ->payToAddress(29890000, $addrCreator->fromString('19SokJG7fgk8iTjemJ2obfMj14FM16nqzj')) ->payToAddress(100000, $addrCreator->fromString('1CzcTWMAgBNdU7K8Bjj6s6ezm2dAQfUU9a')) ->get(); echo $transaction->getHex() . PHP_EOL;
Please copy/paste a snippet of the error, or at least tell me what dependency you have the trouble with.
You could put it together with strrev() and pack(), see https://en.bitcoin.it/wiki/Transaction / https://en.bitcoin.it/wiki/Protocol_documentation#tx
But really, just getting the library would be a hell of a lot easier!
can you please try to do it, as your system environment is already stetted up
it would be favour, leave me your btc address ill tip if it works.
I don't understand why you don't just use the library, or tell me whats wrong with it?
link to your documentation broken, in simple how do we sig transaction from unspent inputs ?
https://github.com/Bit-Wasp/bitcoin-php/blob/master/examples/tx.spend.p2wpkh.php Check out the other tx.spend* examples as well.
link to your documentation broken,
huh?
Documentation Check out the beginnings of the documentation for the library: [Introduction]
check this link its broken https://github.com/Bit-Wasp/bitcoin-php/blob/master/doc/Introduction.md
My bad, I'll update the readme! I moved the one deeper recently https://github.com/Bit-Wasp/bitcoin-php/tree/master/doc/documentation
so how do we build a transaction using unspent inputs from here 👍
https://blockexplorer.com/api/addr/1JfHxhhZnkhZtPJrU2juLbyeokzHaaZcNT/utxo
sorry but your documentation is very complex !
Sorry, don't have a lot of time to help. Did you get this working in the end?