hedge-web3 0.1.26 → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
package/lib/Constants.js CHANGED
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.findAssociatedTokenAddress = exports.findVaultAddress = exports.getVaultTypeOracleAccountPublicKey = exports.getVaultTypeAccountPublicKey = exports.getPoolPublicKeyForMint = exports.getHedgeMintPublicKey = exports.getVaultSystemStatePublicKey = exports.getUshMintPublicKey = exports.getLiquidationPoolUshAccountPublicKey = exports.getLiquidationPoolStatePublicKey = exports.CHAINLINK_SOL_USD_PUBLICKEY = exports.CHAINLINK_SOL_USD_ID = exports.HEDGE_PROGRAM_PUBLICKEY = exports.HEDGE_PROGRAM_ID = void 0;
13
13
  const spl_token_1 = require("@solana/spl-token");
14
14
  const web3_js_1 = require("@solana/web3.js");
15
- exports.HEDGE_PROGRAM_ID = 'HDG1wzAC1G1XEHRBoQZGJBW4rVmxLZrPbk5ZHRxPWbXi';
15
+ exports.HEDGE_PROGRAM_ID = 'HDG2DRczYGkTuYTwTYy1UUhXXucT2Ujede2j4bWEoE6p';
16
16
  exports.HEDGE_PROGRAM_PUBLICKEY = new web3_js_1.PublicKey(exports.HEDGE_PROGRAM_ID);
17
17
  exports.CHAINLINK_SOL_USD_ID = 'FmAmfoyPXiA8Vhhe6MZTr3U6rZfEZ1ctEHay1ysqCqcf';
18
18
  exports.CHAINLINK_SOL_USD_PUBLICKEY = new web3_js_1.PublicKey(exports.CHAINLINK_SOL_USD_ID);
@@ -54,7 +54,7 @@ function getHedgeMintPublicKey() {
54
54
  exports.getHedgeMintPublicKey = getHedgeMintPublicKey;
55
55
  function getPoolPublicKeyForMint(mintPublicKey) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const strToEncode = (mintPublicKey.toString().substring(0, 12));
57
+ const strToEncode = mintPublicKey.toString().substring(0, 12);
58
58
  const [publicKey, bump] = yield web3_js_1.PublicKey.findProgramAddress([enc.encode(strToEncode)], exports.HEDGE_PROGRAM_PUBLICKEY);
59
59
  return [publicKey, bump, strToEncode];
60
60
  });
@@ -86,7 +86,7 @@ function findAssociatedTokenAddress(walletAddress, tokenMintAddress) {
86
86
  return (yield web3_js_1.PublicKey.findProgramAddress([
87
87
  walletAddress.toBuffer(),
88
88
  spl_token_1.TOKEN_PROGRAM_ID.toBuffer(),
89
- tokenMintAddress.toBuffer()
89
+ tokenMintAddress.toBuffer(),
90
90
  ], spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID))[0];
91
91
  });
92
92
  }