File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11import { 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. */
66const 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 }
You can’t perform that action at this time.
0 commit comments