@0dotxyz/p0-ts-sdk 2.6.0-alpha.2 → 2.6.0-alpha.3
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 +15 -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 +15 -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) => {
|
|
@@ -21719,6 +21722,8 @@ function parseEmodeTag(emodeTagRaw) {
|
|
|
21719
21722
|
switch (emodeTagRaw) {
|
|
21720
21723
|
case 501:
|
|
21721
21724
|
return 501 /* SOL */;
|
|
21725
|
+
case 502:
|
|
21726
|
+
return 502 /* SOL_T2 */;
|
|
21722
21727
|
case 1571:
|
|
21723
21728
|
return 1571 /* LST_T1 */;
|
|
21724
21729
|
case 1572:
|
|
@@ -21735,6 +21740,10 @@ function parseEmodeTag(emodeTagRaw) {
|
|
|
21735
21740
|
return 871 /* BTC_T1 */;
|
|
21736
21741
|
case 872:
|
|
21737
21742
|
return 872 /* BTC_T2 */;
|
|
21743
|
+
case 47050:
|
|
21744
|
+
return 47050 /* HYUSD */;
|
|
21745
|
+
case 8747:
|
|
21746
|
+
return 8747 /* PT_HYUSD */;
|
|
21738
21747
|
case 0:
|
|
21739
21748
|
default:
|
|
21740
21749
|
return 0 /* UNSET */;
|
|
@@ -71233,6 +71242,7 @@ var getJupiterSwapIxsForFlashloan = async ({
|
|
|
71233
71242
|
// src/services/account/services/swap-engine/adapters/jupiter.adapter.ts
|
|
71234
71243
|
var JUPITER_MAX_ACCOUNTS_MARGIN = 4;
|
|
71235
71244
|
var JUPITER_MIN_MAX_ACCOUNTS = 16;
|
|
71245
|
+
var BUNDLE_INCOMPATIBLE_DEXES = ["GoonFi V2"];
|
|
71236
71246
|
function deserializeJupiterInstruction2(ix) {
|
|
71237
71247
|
return new TransactionInstruction({
|
|
71238
71248
|
programId: new PublicKey(ix.programId),
|
|
@@ -71294,6 +71304,11 @@ async function buildCandidates(req, apiConfig) {
|
|
|
71294
71304
|
mode: "fast",
|
|
71295
71305
|
maxAccounts,
|
|
71296
71306
|
wrapAndUnwrapSol: false,
|
|
71307
|
+
// The swap engine always executes inside a Jito bundle; without this
|
|
71308
|
+
// the Router may route through DEXes whose swaps lock vote accounts,
|
|
71309
|
+
// which Jito rejects ("bundles cannot lock any vote accounts").
|
|
71310
|
+
forJitoBundle: true,
|
|
71311
|
+
excludeDexes: BUNDLE_INCOMPATIBLE_DEXES,
|
|
71297
71312
|
destinationTokenAccount: req.destinationTokenAccount.toBase58(),
|
|
71298
71313
|
platformFeeBps: useFee ? req.platformFeeBps : void 0,
|
|
71299
71314
|
feeAccount: useFee ? feeAccount : void 0
|