Gavin Andresen | 14 Jun 2012 15:22
Picon
Gravatar

Raw Transaction RPC calls for bitcoind

I submitted a pull request yesterday that implements low-level "raw"
transaction, and am looking for feedback on the API and help with
trying to test/break it.

Design doc:  https://gist.github.com/2839617
Pull request: https://github.com/bitcoin/bitcoin/pull/1456
Test plan: https://secure.bettermeans.com/projects/4180/wiki/Raw_Transaction_RPC_Test_Plan

Playing around with this API on the command line I'm pretty happy with
the level of abstraction and the way it interacts with existing RPC
commands; for example, "createrawtx" is just like "sendmany" in the
way outputs are specified.

The signrawtx method is the key new method; it takes a raw
transaction, signs as many inputs as it can, and returns the same raw
transaction with signatures. Typical usage would be:

Funds are sitting in a multisignature transaction output, and it is
time to gather signatures and spend them.

Assumption: you know the multisignature transaction's [txid,
outputNumber, amount].

Create a raw transaction to spend, using createrawtx.
Use signrawtx to add your signatures (after unlocking the wallet, if necessary).
Give the transaction to the other person(s) to sign.
You or they submit the transaction to the network using sendrawtx.
I don't imagine anybody but very-early-adopters or ultra-geeks will do
this by calling these RPC methods at a command-line. They are really
intended for people writing services on top of bitcoind. The service
(Continue reading)

Peter Vessenes | 14 Jun 2012 16:37
Favicon
Gravatar

Re: Raw Transaction RPC calls for bitcoind

This is super cool! 


I have a feature request: it would be awesome to be able to provide private keys at the command line with the signature, turning the client into a wallet-less signature machine.

Peter


On Thu, Jun 14, 2012 at 9:22 AM, Gavin Andresen <gavinandresen <at> gmail.com> wrote:
I submitted a pull request yesterday that implements low-level "raw"
transaction, and am looking for feedback on the API and help with
trying to test/break it.
...
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bitcoin-development mailing list
Bitcoin-development <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development
Gavin Andresen | 14 Jun 2012 22:00
Picon
Gravatar

Re: Raw Transaction RPC calls for bitcoind

On Thu, Jun 14, 2012 at 10:37 AM, Peter Vessenes <peter <at> coinlab.com> wrote:
> This is super cool!
>
> I have a feature request: it would be awesome to be able to provide private
> keys at the command line with the signature, turning the client into a
> wallet-less signature machine.

I like that idea.

A third argument that is an array of private keys (in the same format
as the dumpprivkey RPC call) should be easy to support, assuming the
semantics are:

+ If third argument given, do not require that the wallet be unlocked,
and only sign using the private key(s) given (ignore the bitcoind
wallet entirely).
+ Private keys would stay in bitcoind memory only for the duration of
the RPC call.

--

-- 
--
Gavin Andresen

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane