@0dotxyz/p0-ts-sdk 2.3.3 → 2.4.0
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 +860 -0
- package/dist/dto-rate-model.types-DWB7J91n.d.ts +860 -0
- package/dist/index.cjs +266 -732
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +264 -730
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +2 -2
- package/dist/instructions.d.ts +2 -2
- package/dist/{types-Cxl2AUvk.d.ts → types-DDP4jEc9.d.cts} +10 -10
- package/dist/{types-DtUR-yHt.d.cts → types-rBQYamIi.d.ts} +10 -10
- package/dist/vendor.cjs +256 -722
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +605 -26
- package/dist/vendor.d.ts +605 -26
- package/dist/vendor.js +247 -713
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
- package/dist/dto-rate-model.types-DveIB9Ll.d.cts +0 -1726
- package/dist/dto-rate-model.types-DveIB9Ll.d.ts +0 -1726
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-DDP4jEc9.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-DDP4jEc9.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 {
|
|
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-DWB7J91n.cjs';
|
|
11
11
|
import { JupiterClientConfig, QuoteGetRequest, QuoteResponse } from './jupiter.cjs';
|
|
12
12
|
import { F as FeedResponse } from './index-BDDVBMdM.cjs';
|
|
13
13
|
|
|
@@ -973,7 +973,7 @@ interface MakeKaminoDepositIxParams {
|
|
|
973
973
|
accountAddress: PublicKey;
|
|
974
974
|
authority: PublicKey;
|
|
975
975
|
group: PublicKey;
|
|
976
|
-
reserve:
|
|
976
|
+
reserve: KaminoReserve;
|
|
977
977
|
isSync?: boolean;
|
|
978
978
|
opts?: MakeDepositIxOpts;
|
|
979
979
|
}
|
|
@@ -1051,7 +1051,7 @@ interface MakeKaminoWithdrawIxParams {
|
|
|
1051
1051
|
cTokenAmount: Amount;
|
|
1052
1052
|
marginfiAccount: MarginfiAccountType;
|
|
1053
1053
|
authority: PublicKey;
|
|
1054
|
-
reserve:
|
|
1054
|
+
reserve: KaminoReserve;
|
|
1055
1055
|
bankMetadataMap: BankIntegrationMetadataMap;
|
|
1056
1056
|
isSync?: boolean;
|
|
1057
1057
|
withdrawAll?: boolean;
|
|
@@ -4349,21 +4349,21 @@ interface FetchBankIntegrationMetadataOptions {
|
|
|
4349
4349
|
declare function fetchBankIntegrationMetadata(options: FetchBankIntegrationMetadataOptions): Promise<BankIntegrationMetadataMap>;
|
|
4350
4350
|
|
|
4351
4351
|
type KaminoStateJsonByBank = Record<string, {
|
|
4352
|
-
reserveState:
|
|
4353
|
-
obligationState:
|
|
4354
|
-
farmState?:
|
|
4352
|
+
reserveState: KaminoReserveJSON;
|
|
4353
|
+
obligationState: KaminoObligationJSON;
|
|
4354
|
+
farmState?: KaminoFarmStateJSON;
|
|
4355
4355
|
}>;
|
|
4356
4356
|
type KaminoStateByBank = Record<string, {
|
|
4357
|
-
reserveState:
|
|
4358
|
-
obligationState:
|
|
4359
|
-
farmState?:
|
|
4357
|
+
reserveState: KaminoReserve;
|
|
4358
|
+
obligationState: KaminoObligation;
|
|
4359
|
+
farmState?: KaminoFarmState;
|
|
4360
4360
|
}>;
|
|
4361
4361
|
|
|
4362
4362
|
interface KaminoMetadata {
|
|
4363
4363
|
kaminoStates: {
|
|
4364
|
-
reserveState:
|
|
4365
|
-
obligationState:
|
|
4366
|
-
farmState?:
|
|
4364
|
+
reserveState: KaminoReserve;
|
|
4365
|
+
obligationState: KaminoObligation;
|
|
4366
|
+
farmState?: KaminoFarmState;
|
|
4367
4367
|
};
|
|
4368
4368
|
}
|
|
4369
4369
|
interface FetchKaminoMetadataOptions {
|
|
@@ -4392,7 +4392,7 @@ interface KaminoBankInput {
|
|
|
4392
4392
|
declare function getKaminoMetadata(options: FetchKaminoMetadataOptions): Promise<Map<string, KaminoMetadata>>;
|
|
4393
4393
|
declare function getKaminoStatesDto(connection: Connection, kaminoBanks: KaminoBankInput[]): Promise<KaminoStateJsonByBank>;
|
|
4394
4394
|
|
|
4395
|
-
declare function getKaminoCTokenMultiplier(reserve:
|
|
4395
|
+
declare function getKaminoCTokenMultiplier(reserve: KaminoReserve): BigNumber$1;
|
|
4396
4396
|
|
|
4397
4397
|
type DriftStateJsonByBank = Record<string, {
|
|
4398
4398
|
driftSpotMarketState: DriftSpotMarketJSON;
|
|
@@ -5933,7 +5933,7 @@ declare class MarginfiAccountWrapper {
|
|
|
5933
5933
|
* @param opts - Optional configuration
|
|
5934
5934
|
* @returns Promise resolving to an ExtendedV0Transaction
|
|
5935
5935
|
*/
|
|
5936
|
-
makeKaminoDepositTx(bankAddress: PublicKey, amount: Amount, reserve:
|
|
5936
|
+
makeKaminoDepositTx(bankAddress: PublicKey, amount: Amount, reserve: KaminoReserve, opts?: MakeDepositIxOpts): Promise<ExtendedV0Transaction>;
|
|
5937
5937
|
/**
|
|
5938
5938
|
* Creates a borrow transaction with auto-injected client data.
|
|
5939
5939
|
*
|
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-rBQYamIi.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-rBQYamIi.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 {
|
|
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-DWB7J91n.js';
|
|
11
11
|
import { JupiterClientConfig, QuoteGetRequest, QuoteResponse } from './jupiter.js';
|
|
12
12
|
import { F as FeedResponse } from './index-BDDVBMdM.js';
|
|
13
13
|
|
|
@@ -973,7 +973,7 @@ interface MakeKaminoDepositIxParams {
|
|
|
973
973
|
accountAddress: PublicKey;
|
|
974
974
|
authority: PublicKey;
|
|
975
975
|
group: PublicKey;
|
|
976
|
-
reserve:
|
|
976
|
+
reserve: KaminoReserve;
|
|
977
977
|
isSync?: boolean;
|
|
978
978
|
opts?: MakeDepositIxOpts;
|
|
979
979
|
}
|
|
@@ -1051,7 +1051,7 @@ interface MakeKaminoWithdrawIxParams {
|
|
|
1051
1051
|
cTokenAmount: Amount;
|
|
1052
1052
|
marginfiAccount: MarginfiAccountType;
|
|
1053
1053
|
authority: PublicKey;
|
|
1054
|
-
reserve:
|
|
1054
|
+
reserve: KaminoReserve;
|
|
1055
1055
|
bankMetadataMap: BankIntegrationMetadataMap;
|
|
1056
1056
|
isSync?: boolean;
|
|
1057
1057
|
withdrawAll?: boolean;
|
|
@@ -4349,21 +4349,21 @@ interface FetchBankIntegrationMetadataOptions {
|
|
|
4349
4349
|
declare function fetchBankIntegrationMetadata(options: FetchBankIntegrationMetadataOptions): Promise<BankIntegrationMetadataMap>;
|
|
4350
4350
|
|
|
4351
4351
|
type KaminoStateJsonByBank = Record<string, {
|
|
4352
|
-
reserveState:
|
|
4353
|
-
obligationState:
|
|
4354
|
-
farmState?:
|
|
4352
|
+
reserveState: KaminoReserveJSON;
|
|
4353
|
+
obligationState: KaminoObligationJSON;
|
|
4354
|
+
farmState?: KaminoFarmStateJSON;
|
|
4355
4355
|
}>;
|
|
4356
4356
|
type KaminoStateByBank = Record<string, {
|
|
4357
|
-
reserveState:
|
|
4358
|
-
obligationState:
|
|
4359
|
-
farmState?:
|
|
4357
|
+
reserveState: KaminoReserve;
|
|
4358
|
+
obligationState: KaminoObligation;
|
|
4359
|
+
farmState?: KaminoFarmState;
|
|
4360
4360
|
}>;
|
|
4361
4361
|
|
|
4362
4362
|
interface KaminoMetadata {
|
|
4363
4363
|
kaminoStates: {
|
|
4364
|
-
reserveState:
|
|
4365
|
-
obligationState:
|
|
4366
|
-
farmState?:
|
|
4364
|
+
reserveState: KaminoReserve;
|
|
4365
|
+
obligationState: KaminoObligation;
|
|
4366
|
+
farmState?: KaminoFarmState;
|
|
4367
4367
|
};
|
|
4368
4368
|
}
|
|
4369
4369
|
interface FetchKaminoMetadataOptions {
|
|
@@ -4392,7 +4392,7 @@ interface KaminoBankInput {
|
|
|
4392
4392
|
declare function getKaminoMetadata(options: FetchKaminoMetadataOptions): Promise<Map<string, KaminoMetadata>>;
|
|
4393
4393
|
declare function getKaminoStatesDto(connection: Connection, kaminoBanks: KaminoBankInput[]): Promise<KaminoStateJsonByBank>;
|
|
4394
4394
|
|
|
4395
|
-
declare function getKaminoCTokenMultiplier(reserve:
|
|
4395
|
+
declare function getKaminoCTokenMultiplier(reserve: KaminoReserve): BigNumber$1;
|
|
4396
4396
|
|
|
4397
4397
|
type DriftStateJsonByBank = Record<string, {
|
|
4398
4398
|
driftSpotMarketState: DriftSpotMarketJSON;
|
|
@@ -5933,7 +5933,7 @@ declare class MarginfiAccountWrapper {
|
|
|
5933
5933
|
* @param opts - Optional configuration
|
|
5934
5934
|
* @returns Promise resolving to an ExtendedV0Transaction
|
|
5935
5935
|
*/
|
|
5936
|
-
makeKaminoDepositTx(bankAddress: PublicKey, amount: Amount, reserve:
|
|
5936
|
+
makeKaminoDepositTx(bankAddress: PublicKey, amount: Amount, reserve: KaminoReserve, opts?: MakeDepositIxOpts): Promise<ExtendedV0Transaction>;
|
|
5937
5937
|
/**
|
|
5938
5938
|
* Creates a borrow transaction with auto-injected client data.
|
|
5939
5939
|
*
|