1
1
import { Cluster , clusterApiUrl , PublicKey } from '@solana/web3.js'
2
2
3
- export type PythCluster = Cluster | 'pythtest' | 'pythnet' | 'localnet'
3
+ export type PythCluster = Cluster | 'pythtest-conformance ' | 'pythnet' | 'localnet' | 'pythtest-crosschain '
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
+ 'pythtest-crosschain' : `gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s` ,
9
10
testnet : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
10
- pythtest : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
11
+ ' pythtest-conformance' : '8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz' ,
11
12
pythnet : 'FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH' ,
12
13
localnet : 'gMYYig2utAxVoXnM9UhtTWrt8e7x2SVBZqsWZJeT5Gw' ,
13
14
}
@@ -28,7 +29,7 @@ export function getPythProgramKeyForCluster(cluster: PythCluster): PublicKey {
28
29
/** Retrieves the RPC API URL for the specified Pyth cluster */
29
30
export function getPythClusterApiUrl ( cluster : PythCluster ) : string {
30
31
// TODO: Add pythnet when it's ready
31
- if ( cluster === 'pythtest' ) {
32
+ if ( cluster === 'pythtest-conformance' || cluster === 'pythtest-crosschain ') {
32
33
return 'https://api.pythtest.pyth.network'
33
34
} else if ( cluster === 'pythnet' ) {
34
35
return 'https://pythnet.rpcpool.com'
0 commit comments