@0dotxyz/p0-ts-sdk 2.11.0 → 2.11.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.
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/{types-BO-ZFk04.d.cts → types-BOPERR6x.d.cts} +4 -0
- package/dist/{types-DgVpJ2nB.d.ts → types-D2GhlUZp.d.ts} +4 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as superstruct from 'superstruct';
|
|
2
2
|
import { Infer } from 'superstruct';
|
|
3
|
-
import { c as BankType, R as RiskTier, A as AssetTag, d as BankConfigFlag, e as OperationalState, f as OracleSetup, E as EmodeTag, g as EmodeEntryFlags, h as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, i as OperationalStateRaw, j as OracleSetupRaw, k as RiskTierRaw, M as MarginfiProgram, l as InterestRateConfig, m as BankConfigType, n as BankConfigRaw, o as BankConfigOpt, p as BankConfigOptRaw, q as EmodeSettingsType, r as BankRateLimiterType, s as BankRaw, t as BankRateLimiterRaw, u as EmodeSettingsRaw, v as MarginfiIdlType, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as OraclePrice, P as PriceWithConfidence, C as PriceBias, D as OraclePriceDto, F as BankIntegrationMetadataMap, G as OrderType, J as BalanceType, K as HealthCacheType, L as EmodePair, N as ActiveEmodePair, Q as ActionEmodeImpact, S as MarginRequirementType, a as BankConfigFastRaw, b as BankConfigGovRaw, T as Amount, U as EmodeImpactStatus, O as OrderTrigger, V as TypedAmount, X as BankVaultType, Y as RateLimitWindowType, Z as BankIntegrationMetadataMapDto, _ as BankIntegrationMetadataDto, $ as BankIntegrationMetadata, a0 as Bank, a1 as Environment, a2 as Project0Config, a3 as MintData } from './types-
|
|
4
|
-
export { aC as AccountType, aH as AmountType, aB as BankAddress, a4 as BankConfig, B as BankConfigCompactRaw, aE as BankMap, aA as BankMetadata, a7 as BankMetadataRaw, as as ComputeAssetUsdValueParams, aq as ComputeLiabilityUsdValueParams, ao as ComputeUsdValueParams, ac as EmodeConfigRaw, af as EmodeEntry, ah as EmodeImpact, a5 as EmodeSettings, aj as GetAssetWeightParams, a9 as InterestRateConfigCompactRaw, ae as InterestRateConfigOpt, aa as InterestRateConfigOptRaw, aD as KaminoStates, ax as MARGINFI_IDL, aG as MintDataMap, ag as OracleConfigOpt, ab as OracleConfigOptRaw, aF as OraclePriceMap, av as OrderTriggerKind, aw as PriceWithConfidenceDto, ay as Program, a6 as RateLimitWindowRaw, ad as RatePoint, a8 as RatePointRaw, az as Wallet, at as computeAssetUsdValue, ar as computeLiabilityUsdValue, an as computeLoopingParams, am as computeMaxLeverage, au as computeTvl, ap as computeUsdValue, ak as getAssetWeight, al as getLiabilityWeight, ai as isWeightedPrice, aI as resolveAmount } from './types-
|
|
3
|
+
import { c as BankType, R as RiskTier, A as AssetTag, d as BankConfigFlag, e as OperationalState, f as OracleSetup, E as EmodeTag, g as EmodeEntryFlags, h as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, i as OperationalStateRaw, j as OracleSetupRaw, k as RiskTierRaw, M as MarginfiProgram, l as InterestRateConfig, m as BankConfigType, n as BankConfigRaw, o as BankConfigOpt, p as BankConfigOptRaw, q as EmodeSettingsType, r as BankRateLimiterType, s as BankRaw, t as BankRateLimiterRaw, u as EmodeSettingsRaw, v as MarginfiIdlType, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as OraclePrice, P as PriceWithConfidence, C as PriceBias, D as OraclePriceDto, F as BankIntegrationMetadataMap, G as OrderType, J as BalanceType, K as HealthCacheType, L as EmodePair, N as ActiveEmodePair, Q as ActionEmodeImpact, S as MarginRequirementType, a as BankConfigFastRaw, b as BankConfigGovRaw, T as Amount, U as EmodeImpactStatus, O as OrderTrigger, V as TypedAmount, X as BankVaultType, Y as RateLimitWindowType, Z as BankIntegrationMetadataMapDto, _ as BankIntegrationMetadataDto, $ as BankIntegrationMetadata, a0 as Bank, a1 as Environment, a2 as Project0Config, a3 as MintData } from './types-BOPERR6x.cjs';
|
|
4
|
+
export { aC as AccountType, aH as AmountType, aB as BankAddress, a4 as BankConfig, B as BankConfigCompactRaw, aE as BankMap, aA as BankMetadata, a7 as BankMetadataRaw, as as ComputeAssetUsdValueParams, aq as ComputeLiabilityUsdValueParams, ao as ComputeUsdValueParams, ac as EmodeConfigRaw, af as EmodeEntry, ah as EmodeImpact, a5 as EmodeSettings, aj as GetAssetWeightParams, a9 as InterestRateConfigCompactRaw, ae as InterestRateConfigOpt, aa as InterestRateConfigOptRaw, aD as KaminoStates, ax as MARGINFI_IDL, aG as MintDataMap, ag as OracleConfigOpt, ab as OracleConfigOptRaw, aF as OraclePriceMap, av as OrderTriggerKind, aw as PriceWithConfidenceDto, ay as Program, a6 as RateLimitWindowRaw, ad as RatePoint, a8 as RatePointRaw, az as Wallet, at as computeAssetUsdValue, ar as computeLiabilityUsdValue, an as computeLoopingParams, am as computeMaxLeverage, au as computeTvl, ap as computeUsdValue, ak as getAssetWeight, al as getLiabilityWeight, ai as isWeightedPrice, aI as resolveAmount } from './types-BOPERR6x.cjs';
|
|
5
5
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
6
6
|
import { VersionedTransaction, Transaction, PublicKey, TransactionError, TransactionInstruction, Keypair, Signer, AddressLookupTableAccount, Blockhash, TransactionMessage, Connection, AccountInfo } from '@solana/web3.js';
|
|
7
7
|
import { Idl, Instruction, Address } from '@coral-xyz/anchor';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as superstruct from 'superstruct';
|
|
2
2
|
import { Infer } from 'superstruct';
|
|
3
|
-
import { c as BankType, R as RiskTier, A as AssetTag, d as BankConfigFlag, e as OperationalState, f as OracleSetup, E as EmodeTag, g as EmodeEntryFlags, h as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, i as OperationalStateRaw, j as OracleSetupRaw, k as RiskTierRaw, M as MarginfiProgram, l as InterestRateConfig, m as BankConfigType, n as BankConfigRaw, o as BankConfigOpt, p as BankConfigOptRaw, q as EmodeSettingsType, r as BankRateLimiterType, s as BankRaw, t as BankRateLimiterRaw, u as EmodeSettingsRaw, v as MarginfiIdlType, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as OraclePrice, P as PriceWithConfidence, C as PriceBias, D as OraclePriceDto, F as BankIntegrationMetadataMap, G as OrderType, J as BalanceType, K as HealthCacheType, L as EmodePair, N as ActiveEmodePair, Q as ActionEmodeImpact, S as MarginRequirementType, a as BankConfigFastRaw, b as BankConfigGovRaw, T as Amount, U as EmodeImpactStatus, O as OrderTrigger, V as TypedAmount, X as BankVaultType, Y as RateLimitWindowType, Z as BankIntegrationMetadataMapDto, _ as BankIntegrationMetadataDto, $ as BankIntegrationMetadata, a0 as Bank, a1 as Environment, a2 as Project0Config, a3 as MintData } from './types-
|
|
4
|
-
export { aC as AccountType, aH as AmountType, aB as BankAddress, a4 as BankConfig, B as BankConfigCompactRaw, aE as BankMap, aA as BankMetadata, a7 as BankMetadataRaw, as as ComputeAssetUsdValueParams, aq as ComputeLiabilityUsdValueParams, ao as ComputeUsdValueParams, ac as EmodeConfigRaw, af as EmodeEntry, ah as EmodeImpact, a5 as EmodeSettings, aj as GetAssetWeightParams, a9 as InterestRateConfigCompactRaw, ae as InterestRateConfigOpt, aa as InterestRateConfigOptRaw, aD as KaminoStates, ax as MARGINFI_IDL, aG as MintDataMap, ag as OracleConfigOpt, ab as OracleConfigOptRaw, aF as OraclePriceMap, av as OrderTriggerKind, aw as PriceWithConfidenceDto, ay as Program, a6 as RateLimitWindowRaw, ad as RatePoint, a8 as RatePointRaw, az as Wallet, at as computeAssetUsdValue, ar as computeLiabilityUsdValue, an as computeLoopingParams, am as computeMaxLeverage, au as computeTvl, ap as computeUsdValue, ak as getAssetWeight, al as getLiabilityWeight, ai as isWeightedPrice, aI as resolveAmount } from './types-
|
|
3
|
+
import { c as BankType, R as RiskTier, A as AssetTag, d as BankConfigFlag, e as OperationalState, f as OracleSetup, E as EmodeTag, g as EmodeEntryFlags, h as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, i as OperationalStateRaw, j as OracleSetupRaw, k as RiskTierRaw, M as MarginfiProgram, l as InterestRateConfig, m as BankConfigType, n as BankConfigRaw, o as BankConfigOpt, p as BankConfigOptRaw, q as EmodeSettingsType, r as BankRateLimiterType, s as BankRaw, t as BankRateLimiterRaw, u as EmodeSettingsRaw, v as MarginfiIdlType, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as OraclePrice, P as PriceWithConfidence, C as PriceBias, D as OraclePriceDto, F as BankIntegrationMetadataMap, G as OrderType, J as BalanceType, K as HealthCacheType, L as EmodePair, N as ActiveEmodePair, Q as ActionEmodeImpact, S as MarginRequirementType, a as BankConfigFastRaw, b as BankConfigGovRaw, T as Amount, U as EmodeImpactStatus, O as OrderTrigger, V as TypedAmount, X as BankVaultType, Y as RateLimitWindowType, Z as BankIntegrationMetadataMapDto, _ as BankIntegrationMetadataDto, $ as BankIntegrationMetadata, a0 as Bank, a1 as Environment, a2 as Project0Config, a3 as MintData } from './types-D2GhlUZp.js';
|
|
4
|
+
export { aC as AccountType, aH as AmountType, aB as BankAddress, a4 as BankConfig, B as BankConfigCompactRaw, aE as BankMap, aA as BankMetadata, a7 as BankMetadataRaw, as as ComputeAssetUsdValueParams, aq as ComputeLiabilityUsdValueParams, ao as ComputeUsdValueParams, ac as EmodeConfigRaw, af as EmodeEntry, ah as EmodeImpact, a5 as EmodeSettings, aj as GetAssetWeightParams, a9 as InterestRateConfigCompactRaw, ae as InterestRateConfigOpt, aa as InterestRateConfigOptRaw, aD as KaminoStates, ax as MARGINFI_IDL, aG as MintDataMap, ag as OracleConfigOpt, ab as OracleConfigOptRaw, aF as OraclePriceMap, av as OrderTriggerKind, aw as PriceWithConfidenceDto, ay as Program, a6 as RateLimitWindowRaw, ad as RatePoint, a8 as RatePointRaw, az as Wallet, at as computeAssetUsdValue, ar as computeLiabilityUsdValue, an as computeLoopingParams, am as computeMaxLeverage, au as computeTvl, ap as computeUsdValue, ak as getAssetWeight, al as getLiabilityWeight, ai as isWeightedPrice, aI as resolveAmount } from './types-D2GhlUZp.js';
|
|
5
5
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
6
6
|
import { VersionedTransaction, Transaction, PublicKey, TransactionError, TransactionInstruction, Keypair, Signer, AddressLookupTableAccount, Blockhash, TransactionMessage, Connection, AccountInfo } from '@solana/web3.js';
|
|
7
7
|
import { Idl, Instruction, Address } from '@coral-xyz/anchor';
|
package/dist/index.js
CHANGED
|
@@ -86157,9 +86157,16 @@ async function simulateAccountHealthCacheWithFallback(params) {
|
|
|
86157
86157
|
marginfiAccount,
|
|
86158
86158
|
bankIntegrationMap
|
|
86159
86159
|
});
|
|
86160
|
-
|
|
86161
|
-
|
|
86162
|
-
|
|
86160
|
+
const simulated = parseMarginfiAccountRaw(params.marginfiAccount.address, simulatedAccount);
|
|
86161
|
+
marginfiAccount = {
|
|
86162
|
+
...simulated,
|
|
86163
|
+
healthCache: {
|
|
86164
|
+
...simulated.healthCache,
|
|
86165
|
+
assetValueEquity,
|
|
86166
|
+
liabilityValueEquity,
|
|
86167
|
+
simulationStatus: 1 /* ONCHAIN */
|
|
86168
|
+
}
|
|
86169
|
+
};
|
|
86163
86170
|
} catch (e) {
|
|
86164
86171
|
console.log("e", e);
|
|
86165
86172
|
const { assets: assetValueMaint, liabilities: liabilityValueMaint } = computeHealthComponentsFromBalances({
|