github.com/palcoin-project/palcd@v1.0.0/rpcclient/examples/btcwalletwebsockets/README.md (about) 1 btcwallet Websockets Example 2 ============================ 3 4 This example shows how to use the rpcclient package to connect to a btcwallet 5 RPC server using TLS-secured websockets, register for notifications about 6 changes to account balances, and get a list of unspent transaction outputs 7 (utxos) the wallet can sign. 8 9 This example also sets a timer to shutdown the client after 10 seconds to 10 demonstrate clean shutdown. 11 12 ## Running the Example 13 14 The first step is to use `go get` to download and install the rpcclient package: 15 16 ```bash 17 $ go get github.com/btcsuite/btcd/rpcclient 18 ``` 19 20 Next, modify the `main.go` source to specify the correct RPC username and 21 password for the RPC server: 22 23 ```Go 24 User: "yourrpcuser", 25 Pass: "yourrpcpass", 26 ``` 27 28 Finally, navigate to the example's directory and run it with: 29 30 ```bash 31 $ cd $GOPATH/src/github.com/btcsuite/btcd/rpcclient/examples/btcwalletwebsockets 32 $ go run *.go 33 ``` 34 35 ## License 36 37 This example is licensed under the [copyfree](http://copyfree.org) ISC License.