Skip to content

Commit 02ccfe8

Browse files
author
Jeff Schroeder
committed
pythclient.solana: add testnet and mainnet urls
1 parent 8f7ade6 commit 02ccfe8

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

pythclient/solana.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,21 @@
1313
from .ratelimit import RateLimit
1414
from . import config
1515

16-
SOLANA_DEVNET_HTTP_ENDPOINT = "https://api.devnet.solana.com"
17-
SOLANA_DEVNET_WS_ENDPOINT = "wss://api.devnet.solana.com"
16+
WS_PREFIX = "wss"
17+
HTTP_PREFIX = "https"
18+
19+
DEVNET_ENDPOINT = "api.devnet.solana.com"
20+
TESTNET_ENDPOINT = "api.testnet.solana.com"
21+
MAINNET_ENDPOINT = "api.mainnet-beta.solana.com"
22+
23+
SOLANA_DEVNET_WS_ENDPOINT = WS_PREFIX + "://" + DEVNET_ENDPOINT
24+
SOLANA_DEVNET_HTTP_ENDPOINT = HTTP_PREFIX + "://" + DEVNET_ENDPOINT
25+
26+
SOLANA_TESTNET_WS_ENDPOINT = WS_PREFIX + "://" + TESTNET_ENDPOINT
27+
SOLANA_TESTNET_HTTP_ENDPOINT = HTTP_PREFIX + "://" + TESTNET_ENDPOINT
28+
29+
SOLANA_MAINNET_WS_ENDPOINT = WS_PREFIX + "://" + MAINNET_ENDPOINT
30+
SOLANA_MAINNET_HTTP_ENDPOINT = HTTP_PREFIX + "://" + MAINNET_ENDPOINT
1831

1932

2033
class SolanaPublicKey:

0 commit comments

Comments
 (0)