cryptoaddrcheck : Format-check Monero and Bitcoin addresses before you paste them
| script karma |
Rating 0/0,
Downloaded by 0 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Silent eSIM |
| |
| script type |
| utility |
| |
| description |
A quick format check for Monero and Bitcoin addresses, for anyone who keeps payment notes, invoices or wallet lists in Vim. Most bad crypto payments I have seen come from a paste that lost a few characters, or a testnet address copied from the wrong window, and those are easy to catch before you hit send.
:AddrCheck looks at the address under the cursor (or a visual selection) and tells you what it is: Monero standard address (95 chars, starts with 4), Monero subaddress (95 chars, starts with 8), Monero integrated address (106 chars), Bitcoin native SegWit (bc1q, 42 or 62 chars), Taproot (bc1p, 62 chars) or legacy 1... / 3... addresses. It warns about truncated pastes, testnet or stagenet addresses, mixed-case bech32, and characters that base58 or bech32 never use (0, O, I, l, and 1, b, i, o after bc1).
:AddrCheckLine checks every address-length word on the current line, which is handy for a line like "pay to bc1q... or 44AF...".
:AddrMask shows the first 6 and last 6 characters with the length, because that is what people actually compare against the wallet screen.
Be clear about the limit: this is a format check only. It does not compute the Monero Keccak checksum or the bech32 checksum, so your wallet still has the final word. It just catches the dumb mistakes early.
Pure Vimscript, no external tools, works in Vim 8 and 9. I wrote it while putting together a walkthrough of paying for a travel eSIM with XMR, which is here if it's useful: https://silentesim.io/monero-esim?utm_source=vim.org&utm_medium=script&utm_campaign=sg-20261126-vim (disclosure: that is our own shop).
Bug reports and ideas welcome through the vim.org page.
|
| |
| install details |
Copy cryptoaddrcheck.vim into ~/.vim/plugin/ (or ~/vimfiles/plugin/ on Windows) and restart Vim. With a plugin manager, put it in its own plugin/ folder. Then try :AddrCheck on any address.
|
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.217.33
|