diff --git a/docs/USAGE.md b/docs/USAGE.md index 474d74e..d0fe187 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -382,7 +382,11 @@ Here is an example: (jmvenv)$ python sendpayment.py wallet.jmdat 5000000 mprGzBA9rQk82Ly41TsmpQGa8UPpZb2w8c -This sends 5000000 satoshi (0.05btc) to the address *mprGzBA9rQk82Ly41TsmpQGa8UPpZb2w8c* (testnet), with the default 5-7 (randomized) other parties from the default 0-th mixing depth from the wallet contained in the file *wallet.jmdat*. This will take some time, since Joinmarket will connect to remote messaging servers and do end to end encrypted communication with other bots, and also you will be paying some fees (more on this later in this section). +Or you can use BIP21 bitcoin payment URI: + + (jmvenv)$ python sendpayment.py wallet.jmdat bitcoin:mprGzBA9rQk82Ly41TsmpQGa8UPpZb2w8c?amount=0.05 + +These send 5000000 satoshi (0.05btc) to the address *mprGzBA9rQk82Ly41TsmpQGa8UPpZb2w8c* (testnet), with the default 5-7 (randomized) other parties from the default 0-th mixing depth from the wallet contained in the file *wallet.jmdat*. This will take some time, since Joinmarket will connect to remote messaging servers and do end to end encrypted communication with other bots, and also you will be paying some fees (more on this later in this section). diff --git a/jmbitcoin/jmbitcoin/__init__.py b/jmbitcoin/jmbitcoin/__init__.py index 7db6dc1..784673a 100644 --- a/jmbitcoin/jmbitcoin/__init__.py +++ b/jmbitcoin/jmbitcoin/__init__.py @@ -5,4 +5,5 @@ from jmbitcoin.secp256k1_deterministic import * from jmbitcoin.btscript import * from jmbitcoin.bech32 import * from jmbitcoin.amount import * +from jmbitcoin.bip21 import * diff --git a/jmbitcoin/jmbitcoin/bip21.py b/jmbitcoin/jmbitcoin/bip21.py new file mode 100644 index 0000000..58a726d --- /dev/null +++ b/jmbitcoin/jmbitcoin/bip21.py @@ -0,0 +1,41 @@ +# https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki +# bitcoin:
[?amount=][?label=