hedge-web3 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
- export declare const HEDGE_PROGRAM_ID = "HedgeiSAoDWrgfyJ9z8XVsxhcCY2D9aHq1o3kTEbG1C1";
2
+ export declare const HEDGE_PROGRAM_ID = "HedgeEohwU6RqokrvPU4Hb6XKPub8NuKbnPmY7FoMMtN";
3
3
  export declare const HEDGE_PROGRAM_PUBLICKEY: PublicKey;
4
4
  export declare const CHAINLINK_SOL_USD_ID = "FmAmfoyPXiA8Vhhe6MZTr3U6rZfEZ1ctEHay1ysqCqcf";
5
5
  export declare const CHAINLINK_SOL_USD_PUBLICKEY: PublicKey;
@@ -1774,7 +1774,7 @@ export declare type Vault = {
1774
1774
  "type": {
1775
1775
  "array": [
1776
1776
  "u128",
1777
- 32
1777
+ 128
1778
1778
  ];
1779
1779
  };
1780
1780
  },
@@ -1855,7 +1855,7 @@ export declare type Vault = {
1855
1855
  "type": {
1856
1856
  "array": [
1857
1857
  "u128",
1858
- 32
1858
+ 128
1859
1859
  ];
1860
1860
  };
1861
1861
  },
@@ -1864,7 +1864,7 @@ export declare type Vault = {
1864
1864
  "type": {
1865
1865
  "array": [
1866
1866
  "u128",
1867
- 32
1867
+ 128
1868
1868
  ];
1869
1869
  };
1870
1870
  },
@@ -1955,7 +1955,7 @@ export declare type Vault = {
1955
1955
  "type": {
1956
1956
  "array": [
1957
1957
  "u128",
1958
- 32
1958
+ 128
1959
1959
  ];
1960
1960
  };
1961
1961
  },
@@ -1964,7 +1964,7 @@ export declare type Vault = {
1964
1964
  "type": {
1965
1965
  "array": [
1966
1966
  "u128",
1967
- 32
1967
+ 128
1968
1968
  ];
1969
1969
  };
1970
1970
  },
@@ -2052,7 +2052,7 @@ export declare type Vault = {
2052
2052
  "type": {
2053
2053
  "array": [
2054
2054
  "u128",
2055
- 32
2055
+ 128
2056
2056
  ];
2057
2057
  };
2058
2058
  },
@@ -2269,18 +2269,6 @@ export declare type Vault = {
2269
2269
  "type": {
2270
2270
  "option": "publicKey";
2271
2271
  };
2272
- },
2273
- {
2274
- "name": "deprecated";
2275
- "type": "bool";
2276
- },
2277
- {
2278
- "name": "totalFeesAccumulatedUsh";
2279
- "type": "u128";
2280
- },
2281
- {
2282
- "name": "totalFeesAccumulatedCollateral";
2283
- "type": "u128";
2284
2272
  }
2285
2273
  ];
2286
2274
  };
@@ -2819,22 +2807,22 @@ export declare type Vault = {
2819
2807
  "msg": "New Max debt extended value is less than the current debt!";
2820
2808
  },
2821
2809
  {
2822
- "code": 6025;
2810
+ "code": 6026;
2823
2811
  "name": "UpdateVaultTypeNoEnabledOracles";
2824
2812
  "msg": "No Enabled Oracles!";
2825
2813
  },
2826
2814
  {
2827
- "code": 6026;
2815
+ "code": 6027;
2828
2816
  "name": "UpdateVaultTypeDuplicateOraclePriorities";
2829
2817
  "msg": "Duplicate Oracle Priorities";
2830
2818
  },
2831
2819
  {
2832
- "code": 6027;
2820
+ "code": 6028;
2833
2821
  "name": "UpdateVaultTypeInvalidOraclePriority";
2834
2822
  "msg": "Invalid Oracle Priority";
2835
2823
  },
2836
2824
  {
2837
- "code": 6028;
2825
+ "code": 6029;
2838
2826
  "name": "OracleUpdateFailed";
2839
2827
  "msg": "OracleUpdateFailed";
2840
2828
  }
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_PROGRAM_ID = 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 = 'HedgeiSAoDWrgfyJ9z8XVsxhcCY2D9aHq1o3kTEbG1C1';
15
+ exports.HEDGE_PROGRAM_ID = 'HedgeEohwU6RqokrvPU4Hb6XKPub8NuKbnPmY7FoMMtN';
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);
package/lib/idl/vault.js CHANGED
@@ -1777,7 +1777,7 @@ exports.IDL = {
1777
1777
  "type": {
1778
1778
  "array": [
1779
1779
  "u128",
1780
- 32
1780
+ 128
1781
1781
  ]
1782
1782
  }
1783
1783
  },
@@ -1858,7 +1858,7 @@ exports.IDL = {
1858
1858
  "type": {
1859
1859
  "array": [
1860
1860
  "u128",
1861
- 32
1861
+ 128
1862
1862
  ]
1863
1863
  }
1864
1864
  },
@@ -1867,7 +1867,7 @@ exports.IDL = {
1867
1867
  "type": {
1868
1868
  "array": [
1869
1869
  "u128",
1870
- 32
1870
+ 128
1871
1871
  ]
1872
1872
  }
1873
1873
  },
@@ -1958,7 +1958,7 @@ exports.IDL = {
1958
1958
  "type": {
1959
1959
  "array": [
1960
1960
  "u128",
1961
- 32
1961
+ 128
1962
1962
  ]
1963
1963
  }
1964
1964
  },
@@ -1967,7 +1967,7 @@ exports.IDL = {
1967
1967
  "type": {
1968
1968
  "array": [
1969
1969
  "u128",
1970
- 32
1970
+ 128
1971
1971
  ]
1972
1972
  }
1973
1973
  },
@@ -2055,7 +2055,7 @@ exports.IDL = {
2055
2055
  "type": {
2056
2056
  "array": [
2057
2057
  "u128",
2058
- 32
2058
+ 128
2059
2059
  ]
2060
2060
  }
2061
2061
  },
@@ -2272,18 +2272,6 @@ exports.IDL = {
2272
2272
  "type": {
2273
2273
  "option": "publicKey"
2274
2274
  }
2275
- },
2276
- {
2277
- "name": "deprecated",
2278
- "type": "bool"
2279
- },
2280
- {
2281
- "name": "totalFeesAccumulatedUsh",
2282
- "type": "u128"
2283
- },
2284
- {
2285
- "name": "totalFeesAccumulatedCollateral",
2286
- "type": "u128"
2287
2275
  }
2288
2276
  ]
2289
2277
  }
@@ -2822,22 +2810,22 @@ exports.IDL = {
2822
2810
  "msg": "New Max debt extended value is less than the current debt!"
2823
2811
  },
2824
2812
  {
2825
- "code": 6025,
2813
+ "code": 6026,
2826
2814
  "name": "UpdateVaultTypeNoEnabledOracles",
2827
2815
  "msg": "No Enabled Oracles!"
2828
2816
  },
2829
2817
  {
2830
- "code": 6026,
2818
+ "code": 6027,
2831
2819
  "name": "UpdateVaultTypeDuplicateOraclePriorities",
2832
2820
  "msg": "Duplicate Oracle Priorities"
2833
2821
  },
2834
2822
  {
2835
- "code": 6027,
2823
+ "code": 6028,
2836
2824
  "name": "UpdateVaultTypeInvalidOraclePriority",
2837
2825
  "msg": "Invalid Oracle Priority"
2838
2826
  },
2839
2827
  {
2840
- "code": 6028,
2828
+ "code": 6029,
2841
2829
  "name": "OracleUpdateFailed",
2842
2830
  "msg": "OracleUpdateFailed"
2843
2831
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedge-web3",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Hedge Javascript Web3 API",
5
5
  "main": "lib/index.js",
6
6
  "types": "declarations/index.d.ts",
package/src/Constants.ts CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from '@solana/spl-token'
5
5
  import { PublicKey } from '@solana/web3.js'
6
6
 
7
- export const HEDGE_PROGRAM_ID = 'HedgeiSAoDWrgfyJ9z8XVsxhcCY2D9aHq1o3kTEbG1C1'
7
+ export const HEDGE_PROGRAM_ID = 'HedgeEohwU6RqokrvPU4Hb6XKPub8NuKbnPmY7FoMMtN'
8
8
  export const HEDGE_PROGRAM_PUBLICKEY = new PublicKey(HEDGE_PROGRAM_ID)
9
9
 
10
10
  export const CHAINLINK_SOL_USD_ID =
package/src/idl/vault.ts CHANGED
@@ -1774,7 +1774,7 @@ export type Vault = {
1774
1774
  "type": {
1775
1775
  "array": [
1776
1776
  "u128",
1777
- 32
1777
+ 128
1778
1778
  ]
1779
1779
  }
1780
1780
  },
@@ -1855,7 +1855,7 @@ export type Vault = {
1855
1855
  "type": {
1856
1856
  "array": [
1857
1857
  "u128",
1858
- 32
1858
+ 128
1859
1859
  ]
1860
1860
  }
1861
1861
  },
@@ -1864,7 +1864,7 @@ export type Vault = {
1864
1864
  "type": {
1865
1865
  "array": [
1866
1866
  "u128",
1867
- 32
1867
+ 128
1868
1868
  ]
1869
1869
  }
1870
1870
  },
@@ -1955,7 +1955,7 @@ export type Vault = {
1955
1955
  "type": {
1956
1956
  "array": [
1957
1957
  "u128",
1958
- 32
1958
+ 128
1959
1959
  ]
1960
1960
  }
1961
1961
  },
@@ -1964,7 +1964,7 @@ export type Vault = {
1964
1964
  "type": {
1965
1965
  "array": [
1966
1966
  "u128",
1967
- 32
1967
+ 128
1968
1968
  ]
1969
1969
  }
1970
1970
  },
@@ -2052,7 +2052,7 @@ export type Vault = {
2052
2052
  "type": {
2053
2053
  "array": [
2054
2054
  "u128",
2055
- 32
2055
+ 128
2056
2056
  ]
2057
2057
  }
2058
2058
  },
@@ -2269,18 +2269,6 @@ export type Vault = {
2269
2269
  "type": {
2270
2270
  "option": "publicKey"
2271
2271
  }
2272
- },
2273
- {
2274
- "name": "deprecated",
2275
- "type": "bool"
2276
- },
2277
- {
2278
- "name": "totalFeesAccumulatedUsh",
2279
- "type": "u128"
2280
- },
2281
- {
2282
- "name": "totalFeesAccumulatedCollateral",
2283
- "type": "u128"
2284
2272
  }
2285
2273
  ]
2286
2274
  }
@@ -2819,22 +2807,22 @@ export type Vault = {
2819
2807
  "msg": "New Max debt extended value is less than the current debt!"
2820
2808
  },
2821
2809
  {
2822
- "code": 6025,
2810
+ "code": 6026,
2823
2811
  "name": "UpdateVaultTypeNoEnabledOracles",
2824
2812
  "msg": "No Enabled Oracles!"
2825
2813
  },
2826
2814
  {
2827
- "code": 6026,
2815
+ "code": 6027,
2828
2816
  "name": "UpdateVaultTypeDuplicateOraclePriorities",
2829
2817
  "msg": "Duplicate Oracle Priorities"
2830
2818
  },
2831
2819
  {
2832
- "code": 6027,
2820
+ "code": 6028,
2833
2821
  "name": "UpdateVaultTypeInvalidOraclePriority",
2834
2822
  "msg": "Invalid Oracle Priority"
2835
2823
  },
2836
2824
  {
2837
- "code": 6028,
2825
+ "code": 6029,
2838
2826
  "name": "OracleUpdateFailed",
2839
2827
  "msg": "OracleUpdateFailed"
2840
2828
  }
@@ -4617,7 +4605,7 @@ export const IDL: Vault = {
4617
4605
  "type": {
4618
4606
  "array": [
4619
4607
  "u128",
4620
- 32
4608
+ 128
4621
4609
  ]
4622
4610
  }
4623
4611
  },
@@ -4698,7 +4686,7 @@ export const IDL: Vault = {
4698
4686
  "type": {
4699
4687
  "array": [
4700
4688
  "u128",
4701
- 32
4689
+ 128
4702
4690
  ]
4703
4691
  }
4704
4692
  },
@@ -4707,7 +4695,7 @@ export const IDL: Vault = {
4707
4695
  "type": {
4708
4696
  "array": [
4709
4697
  "u128",
4710
- 32
4698
+ 128
4711
4699
  ]
4712
4700
  }
4713
4701
  },
@@ -4798,7 +4786,7 @@ export const IDL: Vault = {
4798
4786
  "type": {
4799
4787
  "array": [
4800
4788
  "u128",
4801
- 32
4789
+ 128
4802
4790
  ]
4803
4791
  }
4804
4792
  },
@@ -4807,7 +4795,7 @@ export const IDL: Vault = {
4807
4795
  "type": {
4808
4796
  "array": [
4809
4797
  "u128",
4810
- 32
4798
+ 128
4811
4799
  ]
4812
4800
  }
4813
4801
  },
@@ -4895,7 +4883,7 @@ export const IDL: Vault = {
4895
4883
  "type": {
4896
4884
  "array": [
4897
4885
  "u128",
4898
- 32
4886
+ 128
4899
4887
  ]
4900
4888
  }
4901
4889
  },
@@ -5112,18 +5100,6 @@ export const IDL: Vault = {
5112
5100
  "type": {
5113
5101
  "option": "publicKey"
5114
5102
  }
5115
- },
5116
- {
5117
- "name": "deprecated",
5118
- "type": "bool"
5119
- },
5120
- {
5121
- "name": "totalFeesAccumulatedUsh",
5122
- "type": "u128"
5123
- },
5124
- {
5125
- "name": "totalFeesAccumulatedCollateral",
5126
- "type": "u128"
5127
5103
  }
5128
5104
  ]
5129
5105
  }
@@ -5662,22 +5638,22 @@ export const IDL: Vault = {
5662
5638
  "msg": "New Max debt extended value is less than the current debt!"
5663
5639
  },
5664
5640
  {
5665
- "code": 6025,
5641
+ "code": 6026,
5666
5642
  "name": "UpdateVaultTypeNoEnabledOracles",
5667
5643
  "msg": "No Enabled Oracles!"
5668
5644
  },
5669
5645
  {
5670
- "code": 6026,
5646
+ "code": 6027,
5671
5647
  "name": "UpdateVaultTypeDuplicateOraclePriorities",
5672
5648
  "msg": "Duplicate Oracle Priorities"
5673
5649
  },
5674
5650
  {
5675
- "code": 6027,
5651
+ "code": 6028,
5676
5652
  "name": "UpdateVaultTypeInvalidOraclePriority",
5677
5653
  "msg": "Invalid Oracle Priority"
5678
5654
  },
5679
5655
  {
5680
- "code": 6028,
5656
+ "code": 6029,
5681
5657
  "name": "OracleUpdateFailed",
5682
5658
  "msg": "OracleUpdateFailed"
5683
5659
  }