@0dotxyz/p0-ts-sdk 2.4.0 → 2.4.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/{dto-rate-model.types-DWB7J91n.d.cts → dto-rate-model.types-CfqbDcgG.d.cts} +9 -0
- package/dist/{dto-rate-model.types-DWB7J91n.d.ts → dto-rate-model.types-CfqbDcgG.d.ts} +9 -0
- package/dist/index.cjs +9 -2
- 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 +9 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +2 -2
- package/dist/instructions.d.ts +2 -2
- package/dist/{types-DDP4jEc9.d.cts → types-BnW15JjT.d.cts} +1 -1
- package/dist/{types-rBQYamIi.d.ts → types-CviIoob4.d.ts} +1 -1
- package/dist/vendor.cjs +9 -2
- 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 +9 -2
- 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-BnW15JjT.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-BnW15JjT.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-CfqbDcgG.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-CviIoob4.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-CviIoob4.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-CfqbDcgG.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
|
@@ -36465,6 +36465,8 @@ function kaminoReserveToDto(reserve) {
|
|
|
36465
36465
|
config: {
|
|
36466
36466
|
protocolTakeRatePct: reserve.config.protocolTakeRatePct,
|
|
36467
36467
|
hostFixedInterestRateBps: reserve.config.hostFixedInterestRateBps,
|
|
36468
|
+
depositLimit: reserve.config.depositLimit.toString(),
|
|
36469
|
+
borrowLimit: reserve.config.borrowLimit.toString(),
|
|
36468
36470
|
borrowRateCurve: {
|
|
36469
36471
|
points: reserve.config.borrowRateCurve.points.map((item) => ({
|
|
36470
36472
|
utilizationRateBps: item.utilizationRateBps,
|
|
@@ -42985,12 +42987,13 @@ function dtoToKaminoObligation(obligationDto) {
|
|
|
42985
42987
|
return {
|
|
42986
42988
|
lendingMarket: new PublicKey(obligationDto.lendingMarket),
|
|
42987
42989
|
owner: new PublicKey(obligationDto.owner),
|
|
42988
|
-
|
|
42990
|
+
// Hosted endpoints may prune empty position arrays from the payload
|
|
42991
|
+
deposits: (obligationDto.deposits ?? []).map((item) => ({
|
|
42989
42992
|
depositReserve: new PublicKey(item.depositReserve),
|
|
42990
42993
|
depositedAmount: new BN8(item.depositedAmount),
|
|
42991
42994
|
marketValueSf: new BN8(item.marketValueSf)
|
|
42992
42995
|
})),
|
|
42993
|
-
borrows: obligationDto.borrows.map((item) => ({
|
|
42996
|
+
borrows: (obligationDto.borrows ?? []).map((item) => ({
|
|
42994
42997
|
borrowReserve: new PublicKey(item.borrowReserve),
|
|
42995
42998
|
borrowedAmountSf: new BN8(item.borrowedAmountSf),
|
|
42996
42999
|
marketValueSf: new BN8(item.marketValueSf)
|
|
@@ -43023,6 +43026,8 @@ function dtoToKaminoReserve(reserveDto) {
|
|
|
43023
43026
|
config: {
|
|
43024
43027
|
protocolTakeRatePct: reserveDto.config.protocolTakeRatePct,
|
|
43025
43028
|
hostFixedInterestRateBps: reserveDto.config.hostFixedInterestRateBps,
|
|
43029
|
+
depositLimit: new BN8(reserveDto.config.depositLimit),
|
|
43030
|
+
borrowLimit: new BN8(reserveDto.config.borrowLimit),
|
|
43026
43031
|
borrowRateCurve: {
|
|
43027
43032
|
points: reserveDto.config.borrowRateCurve.points.map((item) => ({
|
|
43028
43033
|
utilizationRateBps: item.utilizationRateBps,
|
|
@@ -57876,6 +57881,7 @@ function kaminoFarmStateToDto(farmState) {
|
|
|
57876
57881
|
mint: item.token.mint.toBase58(),
|
|
57877
57882
|
decimals: item.token.decimals.toString()
|
|
57878
57883
|
},
|
|
57884
|
+
rewardsAvailable: item.rewardsAvailable.toString(),
|
|
57879
57885
|
rewardsPerSecondDecimals: item.rewardsPerSecondDecimals,
|
|
57880
57886
|
rewardScheduleCurve: {
|
|
57881
57887
|
points: item.rewardScheduleCurve.points.map((p) => ({
|
|
@@ -57989,6 +57995,7 @@ function dtoToKaminoFarmState(dto) {
|
|
|
57989
57995
|
mint: new PublicKey(item.token.mint),
|
|
57990
57996
|
decimals: new BN8(item.token.decimals)
|
|
57991
57997
|
},
|
|
57998
|
+
rewardsAvailable: new BN8(item.rewardsAvailable),
|
|
57992
57999
|
rewardsPerSecondDecimals: item.rewardsPerSecondDecimals,
|
|
57993
58000
|
rewardScheduleCurve: {
|
|
57994
58001
|
points: item.rewardScheduleCurve.points.map((p) => ({
|