@0dotxyz/p0-ts-sdk 2.4.1 → 2.4.2
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/{dto-rate-model.types-CfqbDcgG.d.cts → dto-rate-model.types-IT8wckYH.d.cts} +7 -38
- package/dist/{dto-rate-model.types-CfqbDcgG.d.ts → dto-rate-model.types-IT8wckYH.d.ts} +7 -38
- package/dist/index.cjs +4 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -32
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +2 -2
- package/dist/instructions.d.ts +2 -2
- package/dist/{types-BnW15JjT.d.cts → types-BkXrDBCr.d.cts} +1 -1
- package/dist/{types-CviIoob4.d.ts → types-Ci3ayYQ2.d.ts} +1 -1
- package/dist/vendor.cjs +4 -32
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +2 -2
- package/dist/vendor.d.ts +2 -2
- package/dist/vendor.js +4 -32
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as superstruct from 'superstruct';
|
|
2
2
|
import { Infer } from 'superstruct';
|
|
3
|
-
import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRaw, p as BankRateLimiterRaw, q as EmodeSettingsRaw, r as MarginfiIdlType, s as BankRateLimiterType, t as OraclePrice, P as PriceWithConfidence, u as PriceBias, v as OraclePriceDto, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as Amount, C as BankIntegrationMetadataMap, T as TypedAmount, D as BalanceType, F as HealthCacheType, G as EmodePair, J as ActiveEmodePair, K as ActionEmodeImpact, L as MarginRequirementType, N as EmodeImpactStatus, Q as BankVaultType, S as BankIntegrationMetadataMapDto, U as BankIntegrationMetadataDto, V as BankIntegrationMetadata, X as Bank, Y as Environment, Z as Project0Config, _ as MintData } from './types-
|
|
4
|
-
export { ax as AccountType, aC as AmountType, aw as BankAddress, $ as BankConfig, B as BankConfigCompactRaw, az as BankMap, av as BankMetadata, a2 as BankMetadataRaw, ao as ComputeAssetUsdValueParams, am as ComputeLiabilityUsdValueParams, ak as ComputeUsdValueParams, a7 as EmodeConfigRaw, ab as EmodeEntry, ad as EmodeImpact, a0 as EmodeSettings, af as GetAssetWeightParams, a4 as InterestRateConfigCompactRaw, a9 as InterestRateConfigOpt, a5 as InterestRateConfigOptRaw, ay as KaminoStates, as as MARGINFI_IDL, aB as MintDataMap, ac as OracleConfigOpt, a6 as OracleConfigOptRaw, aA as OraclePriceMap, ar as PriceWithConfidenceDto, at as Program, a1 as RateLimitWindowRaw, aa as RateLimitWindowType, a8 as RatePoint, a3 as RatePointRaw, au as Wallet, ap as computeAssetUsdValue, an as computeLiabilityUsdValue, aj as computeLoopingParams, ai as computeMaxLeverage, aq as computeTvl, al as computeUsdValue, ag as getAssetWeight, ah as getLiabilityWeight, ae as isWeightedPrice, aD as resolveAmount } from './types-
|
|
3
|
+
import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRaw, p as BankRateLimiterRaw, q as EmodeSettingsRaw, r as MarginfiIdlType, s as BankRateLimiterType, t as OraclePrice, P as PriceWithConfidence, u as PriceBias, v as OraclePriceDto, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as Amount, C as BankIntegrationMetadataMap, T as TypedAmount, D as BalanceType, F as HealthCacheType, G as EmodePair, J as ActiveEmodePair, K as ActionEmodeImpact, L as MarginRequirementType, N as EmodeImpactStatus, Q as BankVaultType, S as BankIntegrationMetadataMapDto, U as BankIntegrationMetadataDto, V as BankIntegrationMetadata, X as Bank, Y as Environment, Z as Project0Config, _ as MintData } from './types-BkXrDBCr.cjs';
|
|
4
|
+
export { ax as AccountType, aC as AmountType, aw as BankAddress, $ as BankConfig, B as BankConfigCompactRaw, az as BankMap, av as BankMetadata, a2 as BankMetadataRaw, ao as ComputeAssetUsdValueParams, am as ComputeLiabilityUsdValueParams, ak as ComputeUsdValueParams, a7 as EmodeConfigRaw, ab as EmodeEntry, ad as EmodeImpact, a0 as EmodeSettings, af as GetAssetWeightParams, a4 as InterestRateConfigCompactRaw, a9 as InterestRateConfigOpt, a5 as InterestRateConfigOptRaw, ay as KaminoStates, as as MARGINFI_IDL, aB as MintDataMap, ac as OracleConfigOpt, a6 as OracleConfigOptRaw, aA as OraclePriceMap, ar as PriceWithConfidenceDto, at as Program, a1 as RateLimitWindowRaw, aa as RateLimitWindowType, a8 as RatePoint, a3 as RatePointRaw, au as Wallet, ap as computeAssetUsdValue, an as computeLiabilityUsdValue, aj as computeLoopingParams, ai as computeMaxLeverage, aq as computeTvl, al as computeUsdValue, ag as getAssetWeight, ah as getLiabilityWeight, ae as isWeightedPrice, aD as resolveAmount } from './types-BkXrDBCr.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, AnchorProvider, Address } from '@coral-xyz/anchor';
|
|
8
8
|
import BN from 'bn.js';
|
|
9
9
|
import BigNumber$1 from 'bignumber.js';
|
|
10
|
-
import { K as KaminoReserve, D as DriftSpotMarket, d as DriftRewards, J as JupLendingState, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, a as KaminoObligation, b as KaminoFarmState, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, c as DriftUser, e as DriftUserStats, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel } from './dto-rate-model.types-
|
|
10
|
+
import { K as KaminoReserve, D as DriftSpotMarket, d as DriftRewards, J as JupLendingState, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, a as KaminoObligation, b as KaminoFarmState, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, c as DriftUser, e as DriftUserStats, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel } from './dto-rate-model.types-IT8wckYH.cjs';
|
|
11
11
|
import { JupiterClientConfig, QuoteGetRequest, QuoteResponse } from './jupiter.cjs';
|
|
12
12
|
import { F as FeedResponse } from './index-BDDVBMdM.cjs';
|
|
13
13
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as superstruct from 'superstruct';
|
|
2
2
|
import { Infer } from 'superstruct';
|
|
3
|
-
import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRaw, p as BankRateLimiterRaw, q as EmodeSettingsRaw, r as MarginfiIdlType, s as BankRateLimiterType, t as OraclePrice, P as PriceWithConfidence, u as PriceBias, v as OraclePriceDto, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as Amount, C as BankIntegrationMetadataMap, T as TypedAmount, D as BalanceType, F as HealthCacheType, G as EmodePair, J as ActiveEmodePair, K as ActionEmodeImpact, L as MarginRequirementType, N as EmodeImpactStatus, Q as BankVaultType, S as BankIntegrationMetadataMapDto, U as BankIntegrationMetadataDto, V as BankIntegrationMetadata, X as Bank, Y as Environment, Z as Project0Config, _ as MintData } from './types-
|
|
4
|
-
export { ax as AccountType, aC as AmountType, aw as BankAddress, $ as BankConfig, B as BankConfigCompactRaw, az as BankMap, av as BankMetadata, a2 as BankMetadataRaw, ao as ComputeAssetUsdValueParams, am as ComputeLiabilityUsdValueParams, ak as ComputeUsdValueParams, a7 as EmodeConfigRaw, ab as EmodeEntry, ad as EmodeImpact, a0 as EmodeSettings, af as GetAssetWeightParams, a4 as InterestRateConfigCompactRaw, a9 as InterestRateConfigOpt, a5 as InterestRateConfigOptRaw, ay as KaminoStates, as as MARGINFI_IDL, aB as MintDataMap, ac as OracleConfigOpt, a6 as OracleConfigOptRaw, aA as OraclePriceMap, ar as PriceWithConfidenceDto, at as Program, a1 as RateLimitWindowRaw, aa as RateLimitWindowType, a8 as RatePoint, a3 as RatePointRaw, au as Wallet, ap as computeAssetUsdValue, an as computeLiabilityUsdValue, aj as computeLoopingParams, ai as computeMaxLeverage, aq as computeTvl, al as computeUsdValue, ag as getAssetWeight, ah as getLiabilityWeight, ae as isWeightedPrice, aD as resolveAmount } from './types-
|
|
3
|
+
import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRaw, p as BankRateLimiterRaw, q as EmodeSettingsRaw, r as MarginfiIdlType, s as BankRateLimiterType, t as OraclePrice, P as PriceWithConfidence, u as PriceBias, v as OraclePriceDto, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as Amount, C as BankIntegrationMetadataMap, T as TypedAmount, D as BalanceType, F as HealthCacheType, G as EmodePair, J as ActiveEmodePair, K as ActionEmodeImpact, L as MarginRequirementType, N as EmodeImpactStatus, Q as BankVaultType, S as BankIntegrationMetadataMapDto, U as BankIntegrationMetadataDto, V as BankIntegrationMetadata, X as Bank, Y as Environment, Z as Project0Config, _ as MintData } from './types-Ci3ayYQ2.js';
|
|
4
|
+
export { ax as AccountType, aC as AmountType, aw as BankAddress, $ as BankConfig, B as BankConfigCompactRaw, az as BankMap, av as BankMetadata, a2 as BankMetadataRaw, ao as ComputeAssetUsdValueParams, am as ComputeLiabilityUsdValueParams, ak as ComputeUsdValueParams, a7 as EmodeConfigRaw, ab as EmodeEntry, ad as EmodeImpact, a0 as EmodeSettings, af as GetAssetWeightParams, a4 as InterestRateConfigCompactRaw, a9 as InterestRateConfigOpt, a5 as InterestRateConfigOptRaw, ay as KaminoStates, as as MARGINFI_IDL, aB as MintDataMap, ac as OracleConfigOpt, a6 as OracleConfigOptRaw, aA as OraclePriceMap, ar as PriceWithConfidenceDto, at as Program, a1 as RateLimitWindowRaw, aa as RateLimitWindowType, a8 as RatePoint, a3 as RatePointRaw, au as Wallet, ap as computeAssetUsdValue, an as computeLiabilityUsdValue, aj as computeLoopingParams, ai as computeMaxLeverage, aq as computeTvl, al as computeUsdValue, ag as getAssetWeight, ah as getLiabilityWeight, ae as isWeightedPrice, aD as resolveAmount } from './types-Ci3ayYQ2.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, AnchorProvider, Address } from '@coral-xyz/anchor';
|
|
8
8
|
import BN from 'bn.js';
|
|
9
9
|
import BigNumber$1 from 'bignumber.js';
|
|
10
|
-
import { K as KaminoReserve, D as DriftSpotMarket, d as DriftRewards, J as JupLendingState, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, a as KaminoObligation, b as KaminoFarmState, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, c as DriftUser, e as DriftUserStats, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel } from './dto-rate-model.types-
|
|
10
|
+
import { K as KaminoReserve, D as DriftSpotMarket, d as DriftRewards, J as JupLendingState, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, a as KaminoObligation, b as KaminoFarmState, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, c as DriftUser, e as DriftUserStats, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel } from './dto-rate-model.types-IT8wckYH.js';
|
|
11
11
|
import { JupiterClientConfig, QuoteGetRequest, QuoteResponse } from './jupiter.js';
|
|
12
12
|
import { F as FeedResponse } from './index-BDDVBMdM.js';
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -43672,41 +43672,27 @@ function jupLendingStateRawToDto(raw) {
|
|
|
43672
43672
|
function jupTokenReserveRawToDto(raw) {
|
|
43673
43673
|
return {
|
|
43674
43674
|
pubkey: raw.pubkey.toBase58(),
|
|
43675
|
-
mint: raw.mint.toBase58(),
|
|
43676
|
-
vault: raw.vault.toBase58(),
|
|
43677
43675
|
borrowRate: raw.borrowRate,
|
|
43678
43676
|
feeOnInterest: raw.feeOnInterest,
|
|
43679
43677
|
lastUtilization: raw.lastUtilization,
|
|
43680
|
-
lastUpdateTimestamp: raw.lastUpdateTimestamp.toString(),
|
|
43681
43678
|
supplyExchangePrice: raw.supplyExchangePrice.toString(),
|
|
43682
43679
|
borrowExchangePrice: raw.borrowExchangePrice.toString(),
|
|
43683
|
-
maxUtilization: raw.maxUtilization,
|
|
43684
43680
|
totalSupplyWithInterest: raw.totalSupplyWithInterest.toString(),
|
|
43685
43681
|
totalSupplyInterestFree: raw.totalSupplyInterestFree.toString(),
|
|
43686
43682
|
totalBorrowWithInterest: raw.totalBorrowWithInterest.toString(),
|
|
43687
|
-
totalBorrowInterestFree: raw.totalBorrowInterestFree.toString()
|
|
43688
|
-
totalClaimAmount: raw.totalClaimAmount.toString(),
|
|
43689
|
-
interactingProtocol: raw.interactingProtocol.toBase58(),
|
|
43690
|
-
interactingTimestamp: raw.interactingTimestamp.toString(),
|
|
43691
|
-
interactingBalance: raw.interactingBalance.toString()
|
|
43683
|
+
totalBorrowInterestFree: raw.totalBorrowInterestFree.toString()
|
|
43692
43684
|
};
|
|
43693
43685
|
}
|
|
43694
43686
|
function jupLendingRewardsRateModelRawToDto(raw) {
|
|
43695
43687
|
return {
|
|
43696
|
-
pubkey: raw.pubkey.toBase58(),
|
|
43697
|
-
mint: raw.mint.toBase58(),
|
|
43698
43688
|
startTvl: raw.startTvl.toString(),
|
|
43699
43689
|
duration: raw.duration.toString(),
|
|
43700
43690
|
startTime: raw.startTime.toString(),
|
|
43701
|
-
yearlyReward: raw.yearlyReward.toString()
|
|
43702
|
-
nextDuration: raw.nextDuration.toString(),
|
|
43703
|
-
nextRewardAmount: raw.nextRewardAmount.toString()
|
|
43691
|
+
yearlyReward: raw.yearlyReward.toString()
|
|
43704
43692
|
};
|
|
43705
43693
|
}
|
|
43706
43694
|
function jupRateModelRawToDto(raw) {
|
|
43707
43695
|
return {
|
|
43708
|
-
pubkey: raw.pubkey.toBase58(),
|
|
43709
|
-
mint: raw.mint.toBase58(),
|
|
43710
43696
|
version: raw.version,
|
|
43711
43697
|
rateAtZero: raw.rateAtZero,
|
|
43712
43698
|
kink1Utilization: raw.kink1Utilization,
|
|
@@ -43863,41 +43849,27 @@ function dtoToJupLendingStateRaw(dto) {
|
|
|
43863
43849
|
function dtoToJupTokenReserveRaw(dto) {
|
|
43864
43850
|
return {
|
|
43865
43851
|
pubkey: new PublicKey(dto.pubkey),
|
|
43866
|
-
mint: new PublicKey(dto.mint),
|
|
43867
|
-
vault: new PublicKey(dto.vault),
|
|
43868
43852
|
borrowRate: dto.borrowRate,
|
|
43869
43853
|
feeOnInterest: dto.feeOnInterest,
|
|
43870
43854
|
lastUtilization: dto.lastUtilization,
|
|
43871
|
-
lastUpdateTimestamp: new BN8(dto.lastUpdateTimestamp),
|
|
43872
43855
|
supplyExchangePrice: new BN8(dto.supplyExchangePrice),
|
|
43873
43856
|
borrowExchangePrice: new BN8(dto.borrowExchangePrice),
|
|
43874
|
-
maxUtilization: dto.maxUtilization,
|
|
43875
43857
|
totalSupplyWithInterest: new BN8(dto.totalSupplyWithInterest),
|
|
43876
43858
|
totalSupplyInterestFree: new BN8(dto.totalSupplyInterestFree),
|
|
43877
43859
|
totalBorrowWithInterest: new BN8(dto.totalBorrowWithInterest),
|
|
43878
|
-
totalBorrowInterestFree: new BN8(dto.totalBorrowInterestFree)
|
|
43879
|
-
totalClaimAmount: new BN8(dto.totalClaimAmount),
|
|
43880
|
-
interactingProtocol: new PublicKey(dto.interactingProtocol),
|
|
43881
|
-
interactingTimestamp: new BN8(dto.interactingTimestamp),
|
|
43882
|
-
interactingBalance: new BN8(dto.interactingBalance)
|
|
43860
|
+
totalBorrowInterestFree: new BN8(dto.totalBorrowInterestFree)
|
|
43883
43861
|
};
|
|
43884
43862
|
}
|
|
43885
43863
|
function dtoToJupLendingRewardsRateModelRaw(dto) {
|
|
43886
43864
|
return {
|
|
43887
|
-
pubkey: new PublicKey(dto.pubkey),
|
|
43888
|
-
mint: new PublicKey(dto.mint),
|
|
43889
43865
|
startTvl: new BN8(dto.startTvl),
|
|
43890
43866
|
duration: new BN8(dto.duration),
|
|
43891
43867
|
startTime: new BN8(dto.startTime),
|
|
43892
|
-
yearlyReward: new BN8(dto.yearlyReward)
|
|
43893
|
-
nextDuration: new BN8(dto.nextDuration),
|
|
43894
|
-
nextRewardAmount: new BN8(dto.nextRewardAmount)
|
|
43868
|
+
yearlyReward: new BN8(dto.yearlyReward)
|
|
43895
43869
|
};
|
|
43896
43870
|
}
|
|
43897
43871
|
function dtoToJupRateModelRaw(dto) {
|
|
43898
43872
|
return {
|
|
43899
|
-
pubkey: new PublicKey(dto.pubkey),
|
|
43900
|
-
mint: new PublicKey(dto.mint),
|
|
43901
43873
|
version: dto.version,
|
|
43902
43874
|
rateAtZero: dto.rateAtZero,
|
|
43903
43875
|
kink1Utilization: dto.kink1Utilization,
|