@0dotxyz/p0-ts-sdk 2.5.2 → 2.5.4
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 +13 -0
- 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 +13 -0
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/jupiter.d.cts +7 -0
- package/dist/jupiter.d.ts +7 -0
- package/dist/{types-Bv7AjHar.d.ts → types-D1QBbDkU.d.ts} +4 -1
- package/dist/{types-f-ZjRBYz.d.cts → types-DrxdJJIi.d.cts} +4 -1
- 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 { 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 BankRateLimiterType, p as BankRaw, q as BankRateLimiterRaw, r as EmodeSettingsRaw, s as MarginfiIdlType, 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 BankRateLimiterType, p as BankRaw, q as BankRateLimiterRaw, r as EmodeSettingsRaw, s as MarginfiIdlType, 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-DrxdJJIi.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-DrxdJJIi.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';
|
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 { 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 BankRateLimiterType, p as BankRaw, q as BankRateLimiterRaw, r as EmodeSettingsRaw, s as MarginfiIdlType, 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 BankRateLimiterType, p as BankRaw, q as BankRateLimiterRaw, r as EmodeSettingsRaw, s as MarginfiIdlType, 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-D1QBbDkU.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-D1QBbDkU.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';
|
package/dist/index.js
CHANGED
|
@@ -19875,6 +19875,7 @@ var EmodeFlags = /* @__PURE__ */ ((EmodeFlags3) => {
|
|
|
19875
19875
|
var EmodeTag = /* @__PURE__ */ ((EmodeTag3) => {
|
|
19876
19876
|
EmodeTag3[EmodeTag3["UNSET"] = 0] = "UNSET";
|
|
19877
19877
|
EmodeTag3[EmodeTag3["SOL"] = 501] = "SOL";
|
|
19878
|
+
EmodeTag3[EmodeTag3["SOL_T2"] = 502] = "SOL_T2";
|
|
19878
19879
|
EmodeTag3[EmodeTag3["LST_T1"] = 1571] = "LST_T1";
|
|
19879
19880
|
EmodeTag3[EmodeTag3["LST_T2"] = 1572] = "LST_T2";
|
|
19880
19881
|
EmodeTag3[EmodeTag3["LST_PT"] = 15787] = "LST_PT";
|
|
@@ -19883,6 +19884,8 @@ var EmodeTag = /* @__PURE__ */ ((EmodeTag3) => {
|
|
|
19883
19884
|
EmodeTag3[EmodeTag3["STABLE_T2"] = 57482] = "STABLE_T2";
|
|
19884
19885
|
EmodeTag3[EmodeTag3["BTC_T1"] = 871] = "BTC_T1";
|
|
19885
19886
|
EmodeTag3[EmodeTag3["BTC_T2"] = 872] = "BTC_T2";
|
|
19887
|
+
EmodeTag3[EmodeTag3["HYUSD"] = 47050] = "HYUSD";
|
|
19888
|
+
EmodeTag3[EmodeTag3["PT_HYUSD"] = 8747] = "PT_HYUSD";
|
|
19886
19889
|
return EmodeTag3;
|
|
19887
19890
|
})(EmodeTag || {});
|
|
19888
19891
|
var EmodeImpactStatus = /* @__PURE__ */ ((EmodeImpactStatus3) => {
|
|
@@ -21706,6 +21709,8 @@ function parseEmodeTag(emodeTagRaw) {
|
|
|
21706
21709
|
switch (emodeTagRaw) {
|
|
21707
21710
|
case 501:
|
|
21708
21711
|
return 501 /* SOL */;
|
|
21712
|
+
case 502:
|
|
21713
|
+
return 502 /* SOL_T2 */;
|
|
21709
21714
|
case 1571:
|
|
21710
21715
|
return 1571 /* LST_T1 */;
|
|
21711
21716
|
case 1572:
|
|
@@ -21722,6 +21727,10 @@ function parseEmodeTag(emodeTagRaw) {
|
|
|
21722
21727
|
return 871 /* BTC_T1 */;
|
|
21723
21728
|
case 872:
|
|
21724
21729
|
return 872 /* BTC_T2 */;
|
|
21730
|
+
case 47050:
|
|
21731
|
+
return 47050 /* HYUSD */;
|
|
21732
|
+
case 8747:
|
|
21733
|
+
return 8747 /* PT_HYUSD */;
|
|
21725
21734
|
case 0:
|
|
21726
21735
|
default:
|
|
21727
21736
|
return 0 /* UNSET */;
|
|
@@ -65901,6 +65910,10 @@ async function buildCandidates(req, apiConfig) {
|
|
|
65901
65910
|
mode: "fast",
|
|
65902
65911
|
maxAccounts,
|
|
65903
65912
|
wrapAndUnwrapSol: false,
|
|
65913
|
+
// The swap engine always executes inside a Jito bundle; without this
|
|
65914
|
+
// the Router may route through DEXes whose swaps lock vote accounts,
|
|
65915
|
+
// which Jito rejects ("bundles cannot lock any vote accounts").
|
|
65916
|
+
forJitoBundle: true,
|
|
65904
65917
|
destinationTokenAccount: req.destinationTokenAccount.toBase58(),
|
|
65905
65918
|
platformFeeBps: useFee ? req.platformFeeBps : void 0,
|
|
65906
65919
|
feeAccount: useFee ? feeAccount : void 0
|