Pages:
Author

Topic: [Userscript] print balance of address - v0.4 (Read 624 times)

legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
ok
thank you for your report

we have
- fix problem with large element (like pgp signature)
- fix problem with bcxxx address
- fix problem with a href
HCP
legendary
Activity: 2086
Merit: 4361
Script doesn't seem to be working 100%

Check this thread: https://bitcointalksearch.org/topic/help-with-bitcoin-transaction-5159518

For some reason it is detecting the beginning of the transactionID: e7a3e5b1a2f7c2aa5fa9ebf1cc31c123a83367502c7648dfb6c1baa0ff3e8436 as a bitcoin address and attempting to generate the balance image for it??!?

This is what I see:



Also, from looking at the "Stake Your Address" thread, it is breaking URLs with addresses in them, for instance Block Explorer links:
So, this URL:

is actually encoded as:
https://www.blockchain.com/btc/address/384pXJVj7H49Sp9p9v5RnkbozM3ioVcgnL%20%3Cimg%20src='https://btc.ninjastic.space/balance/384pXJVj7H49Sp9p9v5RnkbozM3ioVcgnL/ff0000'/%3E


and it is also struggling with large blocks of "hex"... like GPG keys etc:


and Signed Messages:



Not sure if this is a Chrome/Tampermonkey specific issue.
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Code:
https://btc.ninjastic.space/balance/ADDRESS/COLOR
(color is optional)

Quote

With color:

Quote

Perfect
I will use your service instead heroku app

Let me code the diff, and release v0.4
Thank you
legendary
Activity: 2758
Merit: 6830
I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Images aren't displayed.
Hmm... it’s working here. Can you try opening it directly?
hero member
Activity: 1358
Merit: 851
I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Images aren't displayed.
legendary
Activity: 2758
Merit: 6830
I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Code:
https://btc.ninjastic.space/balance/ADDRESS/COLOR
(color is optional)

Quote

With color:

Quote
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
legendary
Activity: 3472
Merit: 10611
regex is not enough since it can only check validity of characters. i don't know how JavaScript works but basically you need to add a function instead of that one liner to decode the strings using Base58 encode/decode technique which would mean converting it to its numerical value then hashing the byte array using SHA256 twice and taking 4 bytes of it as checksum then see if it is correct. then pass it to get the balance. more info: https://en.bitcoin.it/wiki/Base58Check_encoding

i didn't mention Bech32 since the btc-priceimg and the blockchain.info API it uses don't support them but here is the link to its documentation: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
try this one:
Code:
^([13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[ac-hj-np-zAC-HJ-NP-Z02-9]{11,71})$
I found it here:
http://mokagio.github.io/tech-journal/2014/11/21/regex-bitcoin.html

You can also verify whether the address is valid or not by checking its checksum.


thank you so much, today i dont have spare time for update it, i'll try tomorrow
is a simple regex sobstitution for catch bc1xxxx address

and after i'll study a method for TX
legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
Transactions? Do you have a regex ready?
try this one:
Code:
^([13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[ac-hj-np-zAC-HJ-NP-Z02-9]{11,71})$
I found it here:
http://mokagio.github.io/tech-journal/2014/11/21/regex-bitcoin.html

You can also verify whether the address is valid or not by checking its checksum.
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
you might want to add some more encoding checks (base58 and bech32 if you could add it) to the values you capture as "addresses" instead of a simple regex check for characters. right now it seems like it is possible to catch something like a transaction ID that starts with 1 or 3 (32 byte and having 0-9 and a-f) as an address.

We can
Transactions? Do you have a regex ready?
Today i'll fix and ehance it
legendary
Activity: 3472
Merit: 10611
you might want to add some more encoding checks (base58 and bech32 if you could add it) to the values you capture as "addresses" instead of a simple regex check for characters. right now it seems like it is possible to catch something like a transaction ID that starts with 1 or 3 (32 byte and having 0-9 and a-f) as an address.
legendary
Activity: 2828
Merit: 2472
https://JetCash.com
Thank goodness I use multiple addresses and wallets.
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
SegWit addresses don't work  Sad




ok thank you for your issue
tomorrow i will fix it and release 0.3

thank you
legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
SegWit addresses don't work  Sad
Because the script uses blockchain.info's API which does not support segwit.
staff
Activity: 2436
Merit: 2347
SegWit addresses don't work  Sad

legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
legendary
Activity: 3696
Merit: 4343
The hacker spirit breaks any spell
i found little bug when you send reply
i fix asap with a little trick, i place 'post reply' in blacklist of script (script not work)

let me work on it
legendary
Activity: 2044
Merit: 1018
Not your keys, not your coins!
Thank you, and welcome to my list.
Added newest userscript.
TopicDatewritten bySectionMerit
_________________________________________________________________________________________________________________________
print balance of address - v0.125/6/2019babocheck address balance0+
Pages:
Jump to: