Skip to content
🏷 A better way to share your Bitcoin address.
HTML JavaScript
Branch: master
Clone or download
Latest commit 7cb299b Sep 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media Logo Sep 9, 2019
modules Log datetime and ip Sep 12, 2019
static Load vendor deps from own server Aug 29, 2019
views Fix initial state Sep 17, 2019
.env.dev
.env.prod Fix .env samples Aug 29, 2019
.gitignore Address generation Aug 28, 2019
LICENSE Initial commit Aug 25, 2019
README.md Note about caching Sep 14, 2019
check.js Address generation Aug 28, 2019
index.js Retrieving IP from proxies Sep 12, 2019
package.json Watch hbs templates in dev Sep 13, 2019
stats.js Add Stats helper Aug 29, 2019
wallets.js.sample Address Cache Sep 12, 2019
yarn.lock Retrieving IP from proxies Sep 12, 2019

README.md

One-Time Address

A better way to share your Bitcoin address


One-Time Address is a self-hosted, open-source service which turns your Bitcoin wallets into webpages and embeddable widgets that instantly provide an address with a QR code whenever someone wants to send you Bitcoin.

One-Time Address never shows the same address twice and thus helps to prevent address reuse. You should not reuse addresses because it abuses the privacy and security of the participants of the transactions as well as future holders of their value.

Note #1: If the same visitor requests an address multiple times within a short period, he might see an address generated for him last time instead of a new one. This prevents wallets from bloating with repetitive requests.

Note #2: It is not intended for use in e-commerce. One-Time Address is for accepting donations in Bitcoin and other cases when you don't need invoices, pre-defined amounts, email inputs, fiat calculations, countdowns, etc. Just instant access to a one-time Bitcoin address for sending a custom amount and nothing else. If you need an invoicing system, then consider using BTCPay Server.

Live Demo

Demo webpage: https://donate.alexkaul.com/one-time-address

Installing

# clone repo
git clone https://github.com/alexk111/One-Time-Address

# navigate to it
cd One-Time-Address

# install dependencies
yarn install

# add env variables
cp .env.prod .env

# add wallets config
cp wallets.js.sample wallets.js

Edit .env:

  • Update SERVER_HOST and SERVER_PORT if needed

Edit wallets.js:

  • Enter info for your wallets

Checking wallets

# check if your BTC wallet is generating the same addresses
yarn run check my-wallet

Running

# running http server
yarn start

Getting stats

# get stats on how many addresses have been already used
yarn run stats my-wallet

Address Cache

One-Time Address keeps generated addresses and visitor IPs in the cache for up to N minutes (5 by default). If the same visitor refreshes the same wallet page within the interval, an address will be returned from the cache instead of generating a new one. This prevents wallets from being bloated with repetitive or automated requests. The interval can be edited with addrIPCacheMins in wallets.js file. Set 0 to disable the cache.

Gap Limit Issue

Since One-Time Address provides every visitor with a new Bitcoin address, you might find yourself in a situation where more than 20 addresses in a row will have zero transactions. This will cause an Account Discovery issue when received funds don't appear in your Bitcoin wallet. Available workarounds:

Using HD Wallet Scanner

HD Wallet Scanner finds all used addresses in your Bitcoin HD wallets bypassing gap limits. Then you might use Bitcoin Core + HWI (if you use a hardware wallet) to import child keys derived with their indexes.

Using Electrum wallet

Electrum wallet allows increasing Gap Limit. Open the Console tab and use the following commands at prompt: wallet.change_gap_limit(200) and press enter at your keyboard, wallet.storage.write() and press enter again. Then restart the client. To view/verify the current gap limit, type the following in the console: wallet.gap_limit.

Using Wasabi wallet

If you are showing bech32 addresses, then you might use Wasabi wallet. It also allows increasing Gap Limit. The wallet file can be modified from File/Open/Wallet Folder. To change the gap limit, update MinGapLimit json property in the wallet file.

πŸ’ Donations are always appreciated!

Donate Bitcoin: https://donate.alexkaul.com/one-time-address

License

MIT Β© Alex Kaul

You can’t perform that action at this time.