Get the outpoint value by looking up the tx hash Returns the amount in satoshi
(self, testnet=False)
| 296 | return TxFetcher.fetch(self.prev_tx.hex(), testnet=testnet) |
| 297 | |
| 298 | def value(self, testnet=False): |
| 299 | '''Get the outpoint value by looking up the tx hash |
| 300 | Returns the amount in satoshi |
| 301 | ''' |
| 302 | # use self.fetch_tx to get the transaction |
| 303 | tx = self.fetch_tx(testnet=testnet) |
| 304 | # get the output at self.prev_index |
| 305 | # return the amount property |
| 306 | return tx.tx_outs[self.prev_index].amount |
| 307 | |
| 308 | def script_pubkey(self, testnet=False): |
| 309 | '''Get the ScriptPubKey by looking up the tx hash |