|
1 | 1 | # Getting started with publishing via pyth-client
|
2 | 2 |
|
3 |
| -The pyth-client repo consists of a C++ library (libpc.a), two command-line administration tools (pyth & pyth_admin), a json/websocket-based server (pythd) and a gateway/proxy server for price publishing (pyth_tx). |
| 3 | +The pyth-client repo consists of two command-line administration tools (pyth & pyth_admin), a json/websocket-based server (pythd) and a gateway/proxy server for price publishing (pyth_tx). |
4 | 4 |
|
5 |
| -You can integrate with libpc directly in your application. See `pctest/test_publish.cpp` for an example. Or, you can integrate with the pythd server via json/websockets. See `pctest/test_publish.py` for an example. |
| 5 | +You can integrate with the pythd server via json/websockets. See `pctest/test_publish.py` for an example. |
6 | 6 |
|
7 | 7 | Before doing this you need to setup a *key-store* directory. A key-store is a collection of cryptographic keys for interracting with the solana block-chain. This can be done via the pyth command-line tool. First, build the project by following the instructions in the README.md file and cd to the build directory, then run the following:
|
8 | 8 |
|
@@ -43,23 +43,17 @@ KENV=devnet # or testnet, mainnet
|
43 | 43 |
|
44 | 44 | This creates two files: `$KDIR/mapping_key.json` and `$KDIR/program_key.json`.
|
45 | 45 |
|
46 |
| -Once permissioned, you can test your setup by running the test_publish.cpp example program for publishing and subscribing to two test symbols. To test publishing on devnet you need to run: |
| 46 | +Once permissioned, you can test your setup by running the test_publish.py example program against pythd for publishing and subscribing to a test symbol. To test publishing on devnet you first need to run an instance of the pythd server: |
47 | 47 |
|
48 | 48 |
|
49 | 49 | ```
|
50 | 50 | RHOST=api.devnet.solana.com
|
51 | 51 | THOST=<your_pyth_tx_host>
|
52 |
| -./test_publish -k $KDIR -r $RHOST -t $THOST |
| 52 | +./pythd -k $KDIR -r $RHOST -t $THOST |
53 | 53 | ```
|
54 | 54 |
|
55 | 55 | The -r and -t options correspond to the locations of required solana validator and pyth_tx server instances.
|
56 | 56 |
|
57 |
| -You can also publish to solana using the pythd server. Start up the server using the same key-store directory and host specification: |
58 |
| - |
59 |
| -``` |
60 |
| -./pythd -k $KDIR -r $RHOST -t $THOST |
61 |
| -``` |
62 |
| - |
63 | 57 | Run the test_publish.py example program on the same host to connect to the pythd server:
|
64 | 58 |
|
65 | 59 | ```
|
|
0 commit comments