public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] bitcoind json API (gettx/raw) (newbie questions #2)
@ 2014-02-18  0:01 Denis Andrejew
  2014-02-18  8:17 ` Odinn Cyberguerrilla
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Andrejew @ 2014-02-18  0:01 UTC (permalink / raw)
  To: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

Hey everybody,

here's another question that I have:

I'd like a small bit of clarification about the gettx / getrawtransaction
(decoded) api call. I understand that I can find the address that a
transaction output is directed at / available to for future use sits in the
vout array in the scriptPubKey.addresses array. I'm a little uncertain as
to why that piece of information would be typed as an array when all it
ever seems to contain is one (not more, not less) address(es).

Are there any cases of transactions right now that don't contain exactly 1
item in that array, i.e. more or less than a single address (per single
vout element, not per tx)? Or is the thinking behind this array to somehow
make the data structure more extensible for potential future use? But then
I can't think of any use cases where it appears to make any sense to put
more than 1 address there...

Or am I even asking the wrong questions? For spending those coins, i.e.
using them in a future transaction it's all about owning the public/private
key that is contained in the vout script, right? So the address doesn't
really matter and it could be 2 or more (or none at all?) addresses in
there, and what matters is just that the next guy has the key to spending
those coins... ?

Once again I'm coming to these questions from a project where I'm trying to
calculate unspent outputs and from that balances for all accounts and I'm
not sure yet what other special cases there might be in the blockchain that
I need to be aware of and handle properly in order to (re-)produce accurate
data!

Thanks for your help, much appreciated!
- Denis

"Be the change you want to see in the world." (Mahatma Gandhi)

[-- Attachment #2: Type: text/html, Size: 1965 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bitcoin-development] bitcoind json API (gettx/raw) (newbie questions #2)
  2014-02-18  0:01 [Bitcoin-development] bitcoind json API (gettx/raw) (newbie questions #2) Denis Andrejew
@ 2014-02-18  8:17 ` Odinn Cyberguerrilla
  0 siblings, 0 replies; 2+ messages in thread
From: Odinn Cyberguerrilla @ 2014-02-18  8:17 UTC (permalink / raw)
  To: Denis Andrejew; +Cc: bitcoin-development

> Hey everybody,
>
> here's another question that I have:
>
> I'd like a small bit of clarification about the gettx / getrawtransaction
> (decoded) api call. I understand that I can find the address that a
> transaction output is directed at / available to for future use sits in
> the
> vout array in the scriptPubKey.addresses array. I'm a little uncertain as
> to why that piece of information would be typed as an array when all it
> ever seems to contain is one (not more, not less) address(es).
>
> Are there any cases of transactions right now that don't contain exactly 1
> item in that array, i.e. more or less than a single address (per single
> vout element, not per tx)? Or is the thinking behind this array to somehow
> make the data structure more extensible for potential future use? But then
> I can't think of any use cases where it appears to make any sense to put
> more than 1 address there...

This might be such a use case, just maybe --> https://coinb.in/multisig
Also I recommend checking out http://abis.io
These may be things you are thinking about in the context of this.

> Or am I even asking the wrong questions? For spending those coins, i.e.
> using them in a future transaction it's all about owning the
> public/private
> key that is contained in the vout script, right? So the address doesn't
> really matter and it could be 2 or more (or none at all?) addresses in
> there, and what matters is just that the next guy has the key to spending
> those coins... ?
>
> Once again I'm coming to these questions from a project where I'm trying
> to
> calculate unspent outputs and from that balances for all accounts and I'm
> not sure yet what other special cases there might be in the blockchain
> that
> I need to be aware of and handle properly in order to (re-)produce
> accurate
> data!
>
> Thanks for your help, much appreciated!
> - Denis
>
> "Be the change you want to see in the world." (Mahatma Gandhi)
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk_______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-18  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-18  0:01 [Bitcoin-development] bitcoind json API (gettx/raw) (newbie questions #2) Denis Andrejew
2014-02-18  8:17 ` Odinn Cyberguerrilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox