11import { Cluster , clusterApiUrl , PublicKey } from '@solana/web3.js'
22
3- export type PythCluster = Cluster | 'pythtest' | 'pythnet' | 'localnet' | 'pythdev '
3+ export type PythCluster = Cluster | 'pythtest-conformance ' | 'pythnet' | 'localnet' | 'pythtest-crosschain '
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' ,
9- 'pythdev ' : `gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s` ,
9+ 'pythtest-crosschain ' : `gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s` ,
1010 testnet : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
11- pythtest : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
11+ ' pythtest-conformance' : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
1212 pythnet : 'FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH' ,
1313 localnet : 'gMYYig2utAxVoXnM9UhtTWrt8e7x2SVBZqsWZJeT5Gw' ,
1414}
@@ -29,8 +29,8 @@ export function getPythProgramKeyForCluster(cluster: PythCluster): PublicKey {
2929/** Retrieves the RPC API URL for the specified Pyth cluster */
3030export function getPythClusterApiUrl ( cluster : PythCluster ) : string {
3131 // TODO: Add pythnet when it's ready
32- if ( cluster === 'pythtest' || cluster === 'pythdev ' ) {
33- return 'https://api.pythtest.pyth.network'
32+ if ( cluster === 'pythtest-conformance ' || cluster === 'pythtest-crosschain ' ) {
33+ return 'https://api.pythtest-conformance .pyth.network'
3434 } else if ( cluster === 'pythnet' ) {
3535 return 'https://pythnet.rpcpool.com'
3636 } else if ( cluster === 'localnet' ) {
0 commit comments