lbcwallet/README.md

97 lines
3.1 KiB
Markdown
Raw Normal View History

2021-09-06 19:54:38 +02:00
# lbcwallet
2013-08-21 16:37:30 +02:00
2022-11-01 05:21:24 +01:00
lbcwallet implements HD Wallet functionality which conforms to
[BIP0032](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki),
[BIP0043](https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki),
and [BIP0044](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki).
2015-03-02 23:22:59 +01:00
2021-09-06 19:54:38 +02:00
## Security
2021-09-06 19:54:38 +02:00
We take security seriously. Please contact [security](mailto:security@lbry.com) regarding any security issues.
Our PGP key is [here](https://lbry.com/faq/pgp-key) if you need it.
2022-11-01 05:21:24 +01:00
## Build from Source Code
2022-11-01 05:21:24 +01:00
Requires [Go](http://golang.org) 1.19 or newer. Install Go according to its [installation instructions](http://golang.org/doc/install).
2016-04-19 20:48:09 +02:00
2021-09-06 19:54:38 +02:00
``` sh
git clone https://github.com/lbryio/lbcwallet
cd lbcwallet
go build .
2016-04-19 20:48:09 +02:00
```
2022-11-01 05:21:24 +01:00
## **lbcd** & **lbcwallet**
2021-09-06 19:54:38 +02:00
2022-11-01 05:21:24 +01:00
`lbcwallet` is not an SPV client and requires connecting to a `lbcd` node for asynchronous blockchain queries and notifications over websockets.
2016-04-19 20:48:09 +02:00
2022-11-01 05:21:24 +01:00
lbcwallet can serve wallet related RPCs and proxy lbcd RPCs to the assocated lbcd. It's sufficient for a user to connect just the **lbcwallet** instead of both.
2022-11-01 05:21:24 +01:00
``` mermaid
sequenceDiagram
actor C as lbcctl
participant W as lbcwallet (port: 9244)
participant D as lbcd (port: 9245)
rect rgb(200,200,200)
Note over C,W: lbcctl --wallet balance
C ->>+ W: getbalance
W -->>- C: response
end
rect rgb(200,200,200)
Note over C,D: lbcctl --wallet getblockcount (lbcd RPC service proxied by lbcwallet)
C ->>+ W: getblockcount
W ->>+ D: getblockcount
D -->>- W: response
W -->>- C: response
end
2016-04-19 20:48:09 +02:00
```
2021-09-06 19:54:38 +02:00
## Getting Started
2016-04-19 20:48:09 +02:00
2022-11-01 05:21:24 +01:00
Create a new wallet with a randomly generated seed or an existing one.
2016-04-19 20:48:09 +02:00
2021-09-06 19:54:38 +02:00
``` sh
2022-11-01 05:21:24 +01:00
lbcwallet --create
Do you have an existing wallet seed you want to use? (n/no/y/yes) [no]: no
Your wallet generation seed is: 3d005498ad5e9b7439b857249e328ec34e21845b7d1a7d2a5641d4050c02d0da
2021-09-06 19:54:38 +02:00
```
2016-04-19 20:48:09 +02:00
2022-11-01 05:21:24 +01:00
The created wallet protects the seed with a default passphrase (`"passphrase"`), which can be override with `-p` option:
2016-04-19 20:48:09 +02:00
2021-09-06 19:54:38 +02:00
``` sh
2022-11-01 05:21:24 +01:00
lbcwallet --create -p my-passphrase
2013-10-29 01:29:53 +01:00
```
2022-11-01 05:21:24 +01:00
Start wallet server, and connect it to a lbcd instance.
2013-10-29 01:29:53 +01:00
2022-11-01 05:21:24 +01:00
``` sh
lbcwallet --rpcuser=rpcuser --rpcpass=rpcpass # --rpcconnect=localhost:9245
```
2022-11-01 05:21:24 +01:00
At startup, the wallet will try to unlock itself with the default passphrase (`passphrase`) or an user provided one (using `-p` option).
2013-08-21 16:37:30 +02:00
2022-11-01 05:21:24 +01:00
If the passphrase does not match, the wallet remains locked. User can lock/unlock the wallet using `walletlock` and `walletpassphrase` RPCs.
2013-08-21 16:37:30 +02:00
2021-09-06 19:54:38 +02:00
``` sh
2022-11-01 05:21:24 +01:00
lbcwallet --rpcuser=rpcuser --rpcpass=rpcpass -p my_passphrase
2021-09-06 19:54:38 +02:00
```
## Contributing
2013-08-21 16:37:30 +02:00
2021-09-06 19:54:38 +02:00
Contributions to this project are welcome, encouraged, and compensated.
The [integrated github issue tracker](https://github.com/lbryio/lbcwallet/issues)
is used for this project. All pull requests will be considered.
<!-- ## Release Verification
Please see our [documentation on the current build/verification
process](https://github.com/lbryio/lbcwallet/tree/master/release) for all our
releases for information on how to verify the integrity of published releases
using our reproducible build system.
-->
2013-08-21 16:37:30 +02:00
## License
lbcwallet is licensed under the liberal ISC License.