Comments (7)
I would start at this: https://github.com/Bit-Wasp/bitcoin-lib-php/blob/master/examples/raw_transaction.php get the information about the transaction, then create/sign it.
Then do:
$rpc = new JsonRpcClient(array("url"=>"bitcoinrpc:[email protected]:port")); $sentTxid = $rpc->sendrawtransaction($transactionHex);
BTW odds are if your transaction is rejected (error code -25? but no message) you had passed a tx with an 'insanely high fee'. You can override this check by doing sendrawtransaction($transactionHex, true)
I think..
bitcoin-cli help
will probably help here, all the RPC functions are as described on that page.
from bitcoin-lib-php.
thanks for reply,
I need to know, how to use this library with my own altcoin,
what the parameters i should change,
from bitcoin-lib-php.
thanks, it works,
but there is another issue,
my balance: 5 coin.
when i create transaction to send for example .5 coin.
the system take fees = 4.5 the rest of my balance??
how to resolve the transaction fees problem.
from bitcoin-lib-php.
@coingeek you need to add a 'change output' yourself sending the other 4.5 coin back to your own address or to a new address of yourself
from bitcoin-lib-php.
Yeah you need to be explicit about the amounts that you're moving.
When you make a transaction, there is actually nothing in the tx that restricts it to a network. so to answer what parameters you need to change, just be sure you explicitly set your version bytes address/p2sh, and if you're creating a coin please stick to the convention of the private key being AddressVersion + 128. There is a reason it's done that way in bitcoin, and this library depends on that to derive the private key's WIF.
from bitcoin-lib-php.
I Generate the same public key from my private key using your library, so i think it is ok,
but the problem when i generate the tx, it, the network report it as (error -22),
from bitcoin-lib-php.
I'm going to close this, think the problems are mainly due to using an older altcoin.
from bitcoin-lib-php.
Related Issues (20)
- How to use createrawtransaction and set fees? HOT 18
- electrum HOT 1
- decode fails to read a vout HOT 2
- RawTransaction::decode will fail on version numbers that are not equal to 1.
- Support OP_RETURN transaction ?
- Unnecessary cast in toBTC()
- implement BIP173 - SegWit HOT 5
- Generating change address from publicKey Bip44, Bip43
- Function mcrypt_create_iv() is deprecated HOT 1
- Namespace Issue HOT 3
- Is it possible to create Segwit addresses? HOT 1
- Ignore - Delete
- other coins wallet
- Hire someone for make this library works to my altcoin HOT 4
- How i can list unspent transaction for any private key of address. HOT 5
- Electrum 2.0 xpub HOT 3
- parse error HOT 4
- installation problem HOT 2
- bits -> difficulty? HOT 2
- Feature Request: capability to derive all (used) wallet keys from public master key. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitcoin-lib-php.