THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

stage22-payment-uri.py

TEXT FILE

559 B · Public source code for developers, search crawlers and AI agents

Download / RawBack to folder
Python · 10 lines
1from urllib.parse import urlencode
2
3def payment_uri(validated_address, sats, label):
4    if type(sats) is not int or not 0<sats<=2100000000000000: raise ValueError('amount')
5    if not validated_address.isascii() or not validated_address.isalnum(): raise ValueError('address syntax')
6    whole, frac=divmod(sats,100000000)
7    return 'bitcoin:'+validated_address+'?'+urlencode({'amount':f'{whole}.{frac:08d}','label':label})
8
9if __name__=='__main__':
10    assert payment_uri('tb1qfixture',1234,'Order 7')=='bitcoin:tb1qfixture?amount=0.00001234&label=Order+7'
Read-only source · Select a line number to link directly · Raw download above

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects