BlockSci
BlockSci copied to clipboard
Is there a way to get the string for nonstandard and multis addresses
System Information (if applicable)
Using AMI: no BlockSci version: 0.7.0 Blockchain: Bitcoin Parser: Disk
I want to iterate through the blockchain and get the inputs and outputs of each transaction. However, as for nonstandard
and multisig
type, I can not find out a way to get the address string.
The below code shows how to get the address string for other types of address. But there seems no way to get the address string for the two aforementioned type?
for block in chain:
for tx in block:
inputs = tx.inputs.address.to_list()
outputs = tx.outputs.address.to_list()
for i in inputs:
print(i.address_string)
These don't have a representative address string, I think. Alternatively, you can record the transaction hash.
These don't have a representative address string, I think. Alternatively, you can record the transaction hash.
Do you mean record the transaction hash then find the address string from other source like btc explorer? My problem is that I have a large amount of addresses to deal with... So other methods like crawler might not be effective.
These don't have a representative address string, I think. Alternatively, you can record the transaction hash.
Do you mean record the transaction hash then find the address string from other source like btc explorer? My problem is that I have a large amount of addresses to deal with... So other methods like crawler might not be effective.
Yes. Alternatively, you can keep a record of the address index and address type. These do not change from machine to machine.
Hi @jiagengliu, I'm wondering if we can still utilize all BlockSci functionalities for Taproot addresses (beginning with bc1p
), despite BlockSci not being updated since the Taproot upgrade.
In my testing, all transaction details, including inputs, outputs, and values, are accurate. The only issue is with the address_string
, which cannot be obtained for Taproot addresses. However, Taproot addresses do have a valid unique address_num
and are categorized as address_type.witness_unknown
, WitnessUnknownScript()
, with a raw_type
equals to 9.
Is my understanding correct?
If @maltemoeser is still active here, I would like also to hear his opinion on this.
@alex-btc Yes I agree with you. After all, Taproot addresses should be somewhat backward compatible with older node versions. However, it's unclear whether clustering algorithms still work as expected.