File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { Cluster , clusterApiUrl , PublicKey } from '@solana/web3.js'
2
2
3
- export type PythCluster = Cluster | 'pythtest'
3
+ export type PythCluster = Cluster | 'pythtest' | 'pythnet'
4
4
5
5
/** Mapping from solana clusters to the public key of the pyth program. */
6
6
const clusterToPythProgramKey : Record < PythCluster , string > = {
7
7
'mainnet-beta' : 'FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH' ,
8
8
devnet : 'gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s' ,
9
9
testnet : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
10
10
pythtest : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
11
+ pythnet : 'FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH' ,
11
12
}
12
13
13
14
/** Gets the public key of the Pyth program running on the given cluster. */
@@ -28,6 +29,8 @@ export function getPythClusterApiUrl(cluster: PythCluster): string {
28
29
// TODO: Add pythnet when it's ready
29
30
if ( cluster === 'pythtest' ) {
30
31
return 'https://api.pythtest.pyth.network'
32
+ } else if ( cluster === 'pythnet' ) {
33
+ return 'https://pythnet.rpcpool.com'
31
34
} else {
32
35
return clusterApiUrl ( cluster )
33
36
}
You can’t perform that action at this time.
0 commit comments