Da2ce7:New Transaction: Difference between revisions
formating |
added lists for processing |
||
Line 32: | Line 32: | ||
/// add outputs to the transaction (6 overrides) | /// add outputs to the transaction (6 overrides) | ||
/// add fee to transaction | /// add fee to transaction | ||
addoutput {txnumber} {amount} {forced | addoutput {txnumber} {amount} {forced|suggested|optional} | ||
addoutput {txnumber} {amount} {forced | addoutput {txnumber} {amount} {forced|suggested|optional} {comment} | ||
// add change address to transaction | // add change address to transaction | ||
Line 68: | Line 68: | ||
out total: {amount} | out total: {amount} | ||
fee: {amount} | fee: {amount} | ||
size: {readytxn bit} | |||
state: {building:ready:done:submitted} | state: {building:ready:done:submitted} | ||
Line 78: | Line 79: | ||
out total: {amount} | out total: {amount} | ||
fee: {amount} | fee: {amount} | ||
size: {readytxn bit} | |||
block: {block number} | block: {block number} | ||
Line 83: | Line 85: | ||
/// demote a transaction (1 override) | /// demote a transaction (1 override) | ||
demotetransaction {txnumber} | demotetransaction {txnumber} | ||
demotetransaction {txnumber} {build | demotetransaction {txnumber} {build|ready|done} | ||
response {txnumber} {building | response {txnumber} {building|ready|done} | ||
/// exports a binary encoded transition ( | /// exports a binary encoded transition (4 override) | ||
exporttransaction {txnumber} | exporttransaction {txnumber} | ||
exporttransaction [txnumber] | |||
exporttransaction {txid} | exporttransaction {txid} | ||
exporttransaction [txid] | |||
response {binary data | response {binary data} | ||
/// import | /// import binary encoded transition(s) (1 override) | ||
inporttransaction {binary data} | |||
inporttransaction [{binary data}] | |||
response {txnumber} | response [{txnumber}] | ||
/// check and complete ''build'' translation | /// check and complete ''build'' translation (1 override) | ||
reddytransaction {txnumber} | reddytransaction {txnumber} | ||
reddytransaction [{txnumber}] | |||
response {txnumber} {has made changes | response [{txnumber}] {has made changes|no changes needed|not enough coins|invalid transaction} | ||
/// sign ''ready'' transaction | /// sign ''ready'' transaction (4 override) | ||
signtransaction {txnumber} | signtransaction {txnumber} | ||
signtransaction [{txnumber}] | |||
// calls reddytransaction before hand if needed | // calls reddytransaction before hand if needed | ||
signtransaction -r {txnumber} | signtransaction -r {txnumber} | ||
signtransaction -r [{txnumber}] | |||
response {txnumber} {done | response [{txnumber},{done|failed}] | ||
/// publish a ''done'' transaction to peers | /// publish a ''done'' transaction to peers (2 override) | ||
// submits all 'done' transactions | |||
submittransaction -a | |||
// submits a single 'done' transaction | |||
submittransaction {txnumber} | submittransaction {txnumber} | ||
response {txnumber} {txid} | // submits a list of 'done' transaction | ||
submittransaction [{txnumber}] | |||
response [{txnumber},{txid}] | |||
/// complete transaction from any stage and publish it | /// complete transaction from any stage and publish it (1 override) | ||
completeransaction {txnumber} | completeransaction {txnumber} | ||
Revision as of 15:31, 25 July 2011
make new transaction
txnumber is a random string given to every transaction for identification purposes.
pubkey is assumed to be owned by the client that preforms the 'readying' of the transition (build > ready states)
States:
build this state a transaction doesn't need to fulfil any rules. The user just defines what she wants in the transaction.
ready this state is after a client that has (or knows of the), private keys checks the transaction, checking and adding more inputs or change output if necessary.
done the transaction has been signed by and all the inputs are vaild.
submited the transaction has successfully publicly announced.
This entire processing is lazy! Bitcoin will automatically fill-out everything just as it dose at-the-moment with the readytransaction stage.
Please not this draft doesn't include all possible error responses.
commands:
/// make a new transaction (1 override) newtransaction newtransaction {name} response {txnumber}
/// add an input to the transaction. (1 overrides) addinput {txnumber} {txid} {pubkey} addinput {txnumber} {txid} {pubkey} {comment} response {txnumber} {inid}
/// add outputs to the transaction (6 overrides) /// add fee to transaction addoutput {txnumber} {amount} {forced|suggested|optional} addoutput {txnumber} {amount} {forced|suggested|optional} {comment} // add change address to transaction addoutput {txnumber} {pubkey} addoutput {txnumber} {pubkey} {comment} // add send outputs addoutput {txnumber} {address} {amount} addoutput {txnumber} {address} {amount} {comment} response {txnumber} {outid} // add many send outputs addoutputlist {txnumber} [{address},{amount}] response {txnumber} [{outid}]
/// remove input or outpus (1 override) remove {txnumber} {inid or outid} remove {txnumber} [{inid or outid}] response {txnumber} droped: {inid or outid} response {txnumber} droped: [{inid or outid}]
/// prints out human readable information about the tranaction shownewtransaction {txnumber} (1 override) response {txnumber} in: [{inid},{address},{amount},(comment)] in total: {amount} out: [{outid},{address},{amount},(comment)] out total: {amount} fee: {amount} size: {readytxn bit} state: {building:ready:done:submitted} shownewtransaction {txid} (1 override) response {txid} in: [{inid},{address},{amount},(comment)] in total: {amount} out: [{outid},{address},{amount},(comment)] out total: {amount} fee: {amount} size: {readytxn bit} block: {block number}
/// demote a transaction (1 override) demotetransaction {txnumber} demotetransaction {txnumber} {build|ready|done} response {txnumber} {building|ready|done}
/// exports a binary encoded transition (4 override) exporttransaction {txnumber} exporttransaction [txnumber] exporttransaction {txid} exporttransaction [txid] response {binary data}
/// import binary encoded transition(s) (1 override) inporttransaction {binary data} inporttransaction [{binary data}] response [{txnumber}]
/// check and complete build translation (1 override) reddytransaction {txnumber} reddytransaction [{txnumber}] response [{txnumber}] {has made changes|no changes needed|not enough coins|invalid transaction}
/// sign ready transaction (4 override) signtransaction {txnumber} signtransaction [{txnumber}] // calls reddytransaction before hand if needed signtransaction -r {txnumber} signtransaction -r [{txnumber}] response [{txnumber},{done|failed}]
/// publish a done transaction to peers (2 override) // submits all 'done' transactions submittransaction -a // submits a single 'done' transaction submittransaction {txnumber} // submits a list of 'done' transaction submittransaction [{txnumber}] response [{txnumber},{txid}]
/// complete transaction from any stage and publish it (1 override) completeransaction {txnumber} response {txnumber} {txid}
/// delete a transaction from local client droptransaction {txnumber} responce dropped: {txnumber}