Get the outpoint value by looking up the tx hash Returns the amount in satoshi
(self, testnet=False)
| 449 | return TxFetcher.fetch(self.prev_tx.hex(), testnet=testnet) |
| 450 | |
| 451 | def value(self, testnet=False): |
| 452 | '''Get the outpoint value by looking up the tx hash |
| 453 | Returns the amount in satoshi |
| 454 | ''' |
| 455 | # use self.fetch_tx to get the transaction |
| 456 | tx = self.fetch_tx(testnet=testnet) |
| 457 | # get the output at self.prev_index |
| 458 | # return the amount property |
| 459 | return tx.tx_outs[self.prev_index].amount |
| 460 | |
| 461 | def script_pubkey(self, testnet=False): |
| 462 | '''Get the ScriptPubKey by looking up the tx hash |