Skip to content

Commit 5a9377d

Browse files
committed
2 parents 630956c + 307ca11 commit 5a9377d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cluster.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { Cluster, clusterApiUrl, PublicKey } from '@solana/web3.js'
22

3-
export type PythCluster = Cluster | 'pythtest'
3+
export type PythCluster = Cluster | 'pythtest' | 'pythnet'
44

55
/** Mapping from solana clusters to the public key of the pyth program. */
66
const clusterToPythProgramKey: Record<PythCluster, string> = {
77
'mainnet-beta': 'FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH',
88
devnet: 'gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s',
99
testnet: '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz',
1010
pythtest: '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz',
11+
pythnet: 'FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH',
1112
}
1213

1314
/** Gets the public key of the Pyth program running on the given cluster. */
@@ -28,6 +29,8 @@ export function getPythClusterApiUrl(cluster: PythCluster): string {
2829
// TODO: Add pythnet when it's ready
2930
if (cluster === 'pythtest') {
3031
return 'https://api.pythtest.pyth.network'
32+
} else if (cluster === 'pythnet') {
33+
return 'https://pythnet.rpcpool.com'
3134
} else {
3235
return clusterApiUrl(cluster)
3336
}

0 commit comments

Comments
 (0)