Da2ce7:New Transaction: Difference between revisions

From Bitcoin Wiki
Jump to navigation Jump to search
Da2ce7 (talk | contribs)
spelling
Da2ce7 (talk | contribs)
big update
Line 1: Line 1:
''make new transaction''
''make new transaction''


  commands:
''txnumber'' is a random string given to every transaction for identification purposes.<br />
''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.
 
Please not this draft doesn't include all possible error responses.
 
== commands: ==
    
    
   newtransaction ({name})
   /// make a new transaction (1 override)
   response: {txnumber}
   newtransaction
  newtransaction {name}
    
    
   addinput {txnumber} {txid} {pubkey} ({comment})
   response {txnumber}
  response:  {txnumber} {inid}
 
    
    
   addoutput {txnumber} {address} {amount} ({comment})
   /// add an input to the transaction. (1 overrides)
   response:  {txnumber} {outid}
  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}]
   addoutputlist {txnumber} [{address},{amount}]
  response: {txnumber}  [{outid}]
    
    
   remove: {txnumber} [inid] [{outid}]
   response {txnumber}  [{outid}]
   response: {txnumber} droped: [{inid}] [{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)]
            out: [{outid},{address},{amount},(comment)]
            fee: {amount}
            state: {building:ready:done:submitted}
 
  shownewtransaction {txid} (1 override)
 
   response {txid}
            in: [{inid},{address},{amount},(comment)]
            out: [{outid},{address},{amount},(comment)]
            fee: {amount}
            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 (1 override)
  exporttransaction {txnumber}
  exporttransaction {txid}
 
  response {binary data base 64 (or 58?) encoded}
 
 
  /// import a binary encoded transition
  exporttransaction {binary data base 64 (or 58?) encoded}
 
  response {txnumber}
 
 
  /// check and complete ''build'' translation
  reddytransaction {txnumber}
 
  response {txnumber} {has made changes:no changes needed:not enough coins:invalid transaction}
 
    
    
   addtxfee {txnumber} {amount} {forced:suggested:optional}
   /// sign ''ready'' transaction
  signtransaction {txnumber}
    
    
  setnewtransaction {txnumber} {building:ready:done}
   response {txnumber} {done:failed}
   response: {txnumber} {building:ready:done:submitted}
 
    
    
   shownewtransaction {txnumber}
   /// publish a ''done'' transaction to peers
   response: {txnumber} in: [{address},{amount}] out: [{address},{amount}] fee: {txid} {amount} state: {building:ready:done:submitted}
  submittransaction {txnumber}
   response {txnumber} {txid}
 
    
    
   submitnewtransaction {txnumber}
   /// delete a transaction from local client
   response: {txnumber} {txid}
   droptransaction {txnumber}
    
    
  clearnewtransaction {txnumber}
   responce dropped: {txnumber}
   responce: dropped: {txnumber}

Revision as of 14:35, 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.

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)]
           out: [{outid},{address},{amount},(comment)]
           fee: {amount}
           state: {building:ready:done:submitted}
 
 shownewtransaction {txid} (1 override)
 
 response {txid}
           in: [{inid},{address},{amount},(comment)]
           out: [{outid},{address},{amount},(comment)]
           fee: {amount}
           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 (1 override)
 exporttransaction {txnumber}
 exporttransaction {txid}
 
 response {binary data base 64 (or 58?) encoded}


 /// import a binary encoded transition
 exporttransaction {binary data base 64 (or 58?) encoded}
 
 response {txnumber}


 /// check and complete build translation
 reddytransaction {txnumber}
 
 response {txnumber} {has made changes:no changes needed:not enough coins:invalid transaction}


 /// sign ready transaction
 signtransaction {txnumber}
 
 response {txnumber} {done:failed}


 /// publish a done transaction to peers
 submittransaction {txnumber}
 response {txnumber} {txid}


 /// delete a transaction from local client
 droptransaction {txnumber}
 
 responce dropped: {txnumber}