hedge-web3 0.1.8 → 0.1.12
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.
- package/lib/index.js +80 -31
- package/lib/index.js.map +1 -1
- package/lib/types/src/Constants.d.ts +2 -1
- package/lib/types/src/Constants.d.ts.map +1 -1
- package/lib/types/src/index.d.ts +1 -0
- package/lib/types/src/index.d.ts.map +1 -1
- package/lib/types/src/instructions/liquidateVault.d.ts +2 -2
- package/lib/types/src/instructions/liquidateVault.d.ts.map +1 -1
- package/lib/types/src/instructions/loanVault.d.ts +2 -2
- package/lib/types/src/instructions/loanVault.d.ts.map +1 -1
- package/lib/types/src/instructions/redeemVault.d.ts +2 -2
- package/lib/types/src/instructions/redeemVault.d.ts.map +1 -1
- package/lib/types/src/instructions/refreshOraclePrice.d.ts +11 -0
- package/lib/types/src/instructions/refreshOraclePrice.d.ts.map +1 -0
- package/lib/types/src/instructions/withdrawStakingPool.d.ts.map +1 -1
- package/lib/types/src/instructions/withdrawVault.d.ts +2 -2
- package/lib/types/src/instructions/withdrawVault.d.ts.map +1 -1
- package/lib/types/src/state/VaultAccount.d.ts +0 -2
- package/lib/types/src/state/VaultAccount.d.ts.map +1 -1
- package/lib/types/tsconfig.base.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/Constants.ts +6 -7
- package/src/index.ts +1 -0
- package/src/instructions/liquidateVault.ts +8 -11
- package/src/instructions/loanVault.ts +7 -10
- package/src/instructions/redeemVault.ts +4 -7
- package/src/instructions/refreshOraclePrice.ts +71 -0
- package/src/instructions/withdrawStakingPool.ts +2 -0
- package/src/instructions/withdrawVault.ts +10 -13
- package/src/state/VaultAccount.ts +0 -4
@@ -21,9 +21,6 @@ export class VaultAccount {
|
|
21
21
|
/** The minimum collateral ratio this vault must maintain to not be subject to liquidation. */
|
22
22
|
minCollateralRatio: Decimal
|
23
23
|
|
24
|
-
/** The SOL/USD price at which this vault is subject to liquidation */
|
25
|
-
liquidationPrice: number
|
26
|
-
|
27
24
|
/** Current State of the vautl ("Open", "Closed", "Liquidated") */
|
28
25
|
vaultStatus: string
|
29
26
|
|
@@ -33,7 +30,6 @@ export class VaultAccount {
|
|
33
30
|
this.debt = vault.debt.toNumber()
|
34
31
|
this.deposited = vault.deposited.toNumber()
|
35
32
|
this.minCollateralRatio = DecimalFromU128(vault.minCollateralRatio)
|
36
|
-
this.liquidationPrice = vault.liquidationPrice.toNumber()
|
37
33
|
this.vaultStatus = Object.keys(vault.vaultStatus)[0]
|
38
34
|
}
|
39
35
|
|