test-npm-den
Advanced tools
Comparing version 1.0.31 to 1.0.32
{ | ||
"name": "test-npm-den", | ||
"version": "1.0.31", | ||
"version": "1.0.32", | ||
"description": "Test", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import { PublicKey } from '@solana/web3.js'; | ||
export declare type ClusterType = "mainnet-beta" | "testnet"; | ||
export declare type ClusterType = 'mainnet-beta' | 'testnet'; | ||
export declare class ESolConfig { | ||
@@ -4,0 +4,0 @@ eSOLProgramId: PublicKey; |
import { PublicKey, Connection } from '@solana/web3.js'; | ||
import { StakePoolProgram } from '../service/stakepool-program'; | ||
const TESTNET_PROVIDER_URL = 'https://api.testnet.solana.com'; | ||
const MAINNET_PROVIDER_URL = 'https://api.mainnet-beta.solana.com'; | ||
const TESTNET_STAKEPOOL_ACCOUNT = "4QRsVADHap1AgtpryYB2vz4htG3ysJcaXFkcFqkGjaF1"; | ||
const MAINNET_STAKEPOOL_ACCOUNT = "GUAMR8ciiaijraJeLDEDrFVaueLm9YzWWY9R7CBPL9rA"; | ||
const TESTNET_STAKEPOOL_PROGRAM_ID = "CgymamZFh5aVZhoSRtV2QrEZ58X4N1o2H5ZQPF4L5jj8"; | ||
const MAINNET_STAKEPOOL_PROGRAM_ID = "EverSFw9uN5t1V8kS3ficHUcKffSjwpGzUSGd7mgmSks"; | ||
const TESTNET_STAKEPOOL_ACCOUNT = '4QRsVADHap1AgtpryYB2vz4htG3ysJcaXFkcFqkGjaF1'; | ||
const MAINNET_STAKEPOOL_ACCOUNT = 'GUAMR8ciiaijraJeLDEDrFVaueLm9YzWWY9R7CBPL9rA'; | ||
const TESTNET_STAKEPOOL_PROGRAM_ID = 'CgymamZFh5aVZhoSRtV2QrEZ58X4N1o2H5ZQPF4L5jj8'; | ||
const MAINNET_STAKEPOOL_PROGRAM_ID = 'EverSFw9uN5t1V8kS3ficHUcKffSjwpGzUSGd7mgmSks'; | ||
export class ESolConfig { | ||
@@ -16,3 +17,3 @@ constructor(clusterType) { | ||
switch (clusterType) { | ||
case "testnet": | ||
case 'testnet': | ||
this.eSOLStakePoolAddress = new PublicKey(TESTNET_STAKEPOOL_ACCOUNT); | ||
@@ -22,11 +23,12 @@ this.eSOLProgramId = new PublicKey(TESTNET_STAKEPOOL_PROGRAM_ID); | ||
break; | ||
case "mainnet-beta": | ||
case 'mainnet-beta': | ||
this.eSOLStakePoolAddress = new PublicKey(MAINNET_STAKEPOOL_ACCOUNT); | ||
this.eSOLProgramId = new PublicKey(MAINNET_STAKEPOOL_PROGRAM_ID); | ||
this.connection = new Connection(MAINNET_PROVIDER_URL); | ||
StakePoolProgram.changeProgramId('EverSFw9uN5t1V8kS3ficHUcKffSjwpGzUSGd7mgmSks'); | ||
break; | ||
default: | ||
throw new Error("clusterType must be specified"); | ||
throw new Error('clusterType must be specified'); | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104753
1998