Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

test-npm-den

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-npm-den - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

3

lib/config/index.d.ts
import { PublicKey, Connection } from '@solana/web3.js';
export declare type ClusterType = "mainnet-beta" | "testnet";
export declare class ESolConfig {

@@ -11,3 +12,3 @@ eSOLProgramId: PublicKey;

publicKey: PublicKey | null;
constructor(configOverrides?: Partial<ESolConfig>);
constructor(clusterType: ClusterType);
}
import { PublicKey, Connection } from '@solana/web3.js';
const DEFAULT_PROVIDER_URL = 'https://api.testnet.solana.com';
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 {
constructor(configOverrides = {}) {
this.eSOLProgramId = new PublicKey('CgymamZFh5aVZhoSRtV2QrEZ58X4N1o2H5ZQPF4L5jj8');
this.eSOLStakePoolAddress = new PublicKey('4QRsVADHap1AgtpryYB2vz4htG3ysJcaXFkcFqkGjaF1');
constructor(clusterType) {
this.seedPrefixDaoState = 'dao_state';

@@ -13,4 +15,15 @@ this.seedPrefixCommunityToken = 'community_token';

this.publicKey = null;
Object.assign(this, configOverrides);
switch (clusterType) {
case "testnet":
this.eSOLStakePoolAddress = new PublicKey(TESTNET_STAKEPOOL_ACCOUNT);
this.eSOLProgramId = new PublicKey(TESTNET_STAKEPOOL_PROGRAM_ID);
break;
case "mainnet-beta":
this.eSOLStakePoolAddress = new PublicKey(MAINNET_STAKEPOOL_ACCOUNT);
this.eSOLProgramId = new PublicKey(MAINNET_STAKEPOOL_PROGRAM_ID);
break;
default:
throw new Error("clusterType must be specified");
}
}
}

@@ -1,7 +0,7 @@

import { ESolConfig } from './config';
import { ESolConfig, ClusterType } from './config';
import { PublicKey, Transaction } from '@solana/web3.js';
export declare class ESol {
readonly config: ESolConfig;
constructor(config?: ESolConfig);
constructor(clusterType?: ClusterType);
depositSol(userAddress: PublicKey, lamports: number, poolTokenReceiverAccount?: PublicKey, daoCommunityTokenReceiverAccount?: PublicKey, referrerTokenAccount?: PublicKey): Promise<Transaction>;
}

@@ -8,4 +8,4 @@ import { ESolConfig } from './config';

export class ESol {
constructor(config = new ESolConfig()) {
this.config = config;
constructor(clusterType = 'testnet') {
this.config = new ESolConfig(clusterType);
}

@@ -24,4 +24,4 @@ async depositSol(userAddress, lamports, poolTokenReceiverAccount, daoCommunityTokenReceiverAccount, referrerTokenAccount) {

// Check user balance
const feeCostInBlockchain = 3000000;
let needForTransaction = feeCostInBlockchain;
const lamportsToLeftInWallet = 3000000;
let needForTransaction = lamportsToLeftInWallet;
const daoCommunityTokenReceiverAccountRentSpace = await CONNECTION.getMinimumBalanceForRentExemption(165);

@@ -28,0 +28,0 @@ if (!daoCommunityTokenReceiverAccount) {

{
"name": "test-npm-den",
"version": "1.0.14",
"version": "1.0.15",
"description": "Test",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc