MetacoSA / QBitNinja

An Open Source and powerful blockchain API
MIT License
68 stars 42 forks source link

Query by Address #95

Closed clebermacieski closed 5 years ago

clebermacieski commented 5 years ago

Hi. Is there a way to query a tx_id based on the address of a transaction? I figure out that iterating over the list retrieved by the code below, in the last position, I get the tx_id, but still doesn't understand if this is the right way to do this.

client.GetBalance(bitcoinSecret.GetAddress()).Result.Operations;

The purpose of this is, given an private key only, query the transaction generate to the address related with the public key of this private key, to spend this transaction... Thank you very much.

NicolasDorier commented 5 years ago

I don't understand your question. A transaction does not have an address. If you want to query just a txid use client.GetTransaction