@0dotxyz/p0-ts-sdk 2.2.0-beta.0 → 2.2.0-beta.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/index.cjs +23 -1454
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.js +21 -1452
- package/dist/index.js.map +1 -1
- package/dist/vendor.cjs +3 -1434
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.js +1 -1432
- package/dist/vendor.js.map +1 -1
- package/package.json +2 -7
package/dist/index.d.cts
CHANGED
|
@@ -14738,8 +14738,6 @@ interface BankType {
|
|
|
14738
14738
|
group: PublicKey;
|
|
14739
14739
|
mint: PublicKey;
|
|
14740
14740
|
mintDecimals: number;
|
|
14741
|
-
mintRate: number | null;
|
|
14742
|
-
mintPrice: number;
|
|
14743
14741
|
assetShareValue: BigNumber$1;
|
|
14744
14742
|
liabilityShareValue: BigNumber$1;
|
|
14745
14743
|
liquidityVault: PublicKey;
|
|
@@ -15096,10 +15094,7 @@ interface BankMetadata$2 {
|
|
|
15096
15094
|
tokenName: string;
|
|
15097
15095
|
tokenSymbol: string;
|
|
15098
15096
|
}
|
|
15099
|
-
declare function parseBankRaw(address: PublicKey, accountParsed: BankRaw, bankMetadata?: BankMetadata$2
|
|
15100
|
-
mintRate: number | null;
|
|
15101
|
-
mintPrice: number;
|
|
15102
|
-
}): BankType;
|
|
15097
|
+
declare function parseBankRaw(address: PublicKey, accountParsed: BankRaw, bankMetadata?: BankMetadata$2): BankType;
|
|
15103
15098
|
declare function dtoToBank(bankDto: BankTypeDto): BankType;
|
|
15104
15099
|
declare function dtoToEmodeSettings(emodeSettingsDto: EmodeSettingsDto): EmodeSettingsType;
|
|
15105
15100
|
declare function dtoToBankConfig(bankConfigDto: BankConfigDto): BankConfigType;
|
|
@@ -15600,6 +15595,7 @@ interface SwapQuoteResult {
|
|
|
15600
15595
|
priceImpactPct?: string;
|
|
15601
15596
|
contextSlot?: number;
|
|
15602
15597
|
timeTaken?: number;
|
|
15598
|
+
provider?: SwapProvider;
|
|
15603
15599
|
}
|
|
15604
15600
|
interface SwapIxsResult {
|
|
15605
15601
|
swapInstructions: TransactionInstruction[];
|
|
@@ -18206,7 +18202,7 @@ declare function computeMaxLeverage(depositBank: BankType, borrowBank: BankType,
|
|
|
18206
18202
|
* );
|
|
18207
18203
|
* ```
|
|
18208
18204
|
*/
|
|
18209
|
-
declare function computeLoopingParams(principal: Amount, targetLeverage: number, depositBank: BankType, borrowBank: BankType,
|
|
18205
|
+
declare function computeLoopingParams(principal: Amount, targetLeverage: number, depositBank: BankType, borrowBank: BankType, depositPriceUsd: number, borrowPriceUsd: number, opts?: {
|
|
18210
18206
|
assetWeightInit?: BigNumber$1;
|
|
18211
18207
|
liabilityWeightInit?: BigNumber$1;
|
|
18212
18208
|
}): {
|
|
@@ -18878,8 +18874,6 @@ declare class Bank implements BankType {
|
|
|
18878
18874
|
readonly mint: PublicKey;
|
|
18879
18875
|
readonly mintDecimals: number;
|
|
18880
18876
|
readonly group: PublicKey;
|
|
18881
|
-
readonly mintRate: number | null;
|
|
18882
|
-
readonly mintPrice: number;
|
|
18883
18877
|
readonly assetShareValue: BigNumber$1;
|
|
18884
18878
|
readonly liabilityShareValue: BigNumber$1;
|
|
18885
18879
|
readonly liquidityVault: PublicKey;
|
|
@@ -18926,7 +18920,7 @@ declare class Bank implements BankType {
|
|
|
18926
18920
|
readonly lendingPositionCount?: BigNumber$1 | undefined;
|
|
18927
18921
|
readonly borrowingPositionCount?: BigNumber$1 | undefined;
|
|
18928
18922
|
readonly tokenSymbol?: string | undefined;
|
|
18929
|
-
constructor(address: PublicKey, mint: PublicKey, mintDecimals: number, group: PublicKey,
|
|
18923
|
+
constructor(address: PublicKey, mint: PublicKey, mintDecimals: number, group: PublicKey, assetShareValue: BigNumber$1, liabilityShareValue: BigNumber$1, liquidityVault: PublicKey, liquidityVaultBump: number, liquidityVaultAuthorityBump: number, insuranceVault: PublicKey, insuranceVaultBump: number, insuranceVaultAuthorityBump: number, collectedInsuranceFeesOutstanding: BigNumber$1, feeVault: PublicKey, feeVaultBump: number, feeVaultAuthorityBump: number, collectedGroupFeesOutstanding: BigNumber$1, lastUpdate: number, config: BankConfig, totalAssetShares: BigNumber$1, totalLiabilityShares: BigNumber$1, emissionsActiveBorrowing: boolean, emissionsActiveLending: boolean, emissionsRate: number, emissionsMint: PublicKey, emissionsRemaining: BigNumber$1, oracleKey: PublicKey, emode: EmodeSettings, kaminoIntegrationAccounts?: {
|
|
18930
18924
|
kaminoReserve: PublicKey;
|
|
18931
18925
|
kaminoObligation: PublicKey;
|
|
18932
18926
|
} | undefined, driftIntegrationAccounts?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -14738,8 +14738,6 @@ interface BankType {
|
|
|
14738
14738
|
group: PublicKey;
|
|
14739
14739
|
mint: PublicKey;
|
|
14740
14740
|
mintDecimals: number;
|
|
14741
|
-
mintRate: number | null;
|
|
14742
|
-
mintPrice: number;
|
|
14743
14741
|
assetShareValue: BigNumber$1;
|
|
14744
14742
|
liabilityShareValue: BigNumber$1;
|
|
14745
14743
|
liquidityVault: PublicKey;
|
|
@@ -15096,10 +15094,7 @@ interface BankMetadata$2 {
|
|
|
15096
15094
|
tokenName: string;
|
|
15097
15095
|
tokenSymbol: string;
|
|
15098
15096
|
}
|
|
15099
|
-
declare function parseBankRaw(address: PublicKey, accountParsed: BankRaw, bankMetadata?: BankMetadata$2
|
|
15100
|
-
mintRate: number | null;
|
|
15101
|
-
mintPrice: number;
|
|
15102
|
-
}): BankType;
|
|
15097
|
+
declare function parseBankRaw(address: PublicKey, accountParsed: BankRaw, bankMetadata?: BankMetadata$2): BankType;
|
|
15103
15098
|
declare function dtoToBank(bankDto: BankTypeDto): BankType;
|
|
15104
15099
|
declare function dtoToEmodeSettings(emodeSettingsDto: EmodeSettingsDto): EmodeSettingsType;
|
|
15105
15100
|
declare function dtoToBankConfig(bankConfigDto: BankConfigDto): BankConfigType;
|
|
@@ -15600,6 +15595,7 @@ interface SwapQuoteResult {
|
|
|
15600
15595
|
priceImpactPct?: string;
|
|
15601
15596
|
contextSlot?: number;
|
|
15602
15597
|
timeTaken?: number;
|
|
15598
|
+
provider?: SwapProvider;
|
|
15603
15599
|
}
|
|
15604
15600
|
interface SwapIxsResult {
|
|
15605
15601
|
swapInstructions: TransactionInstruction[];
|
|
@@ -18206,7 +18202,7 @@ declare function computeMaxLeverage(depositBank: BankType, borrowBank: BankType,
|
|
|
18206
18202
|
* );
|
|
18207
18203
|
* ```
|
|
18208
18204
|
*/
|
|
18209
|
-
declare function computeLoopingParams(principal: Amount, targetLeverage: number, depositBank: BankType, borrowBank: BankType,
|
|
18205
|
+
declare function computeLoopingParams(principal: Amount, targetLeverage: number, depositBank: BankType, borrowBank: BankType, depositPriceUsd: number, borrowPriceUsd: number, opts?: {
|
|
18210
18206
|
assetWeightInit?: BigNumber$1;
|
|
18211
18207
|
liabilityWeightInit?: BigNumber$1;
|
|
18212
18208
|
}): {
|
|
@@ -18878,8 +18874,6 @@ declare class Bank implements BankType {
|
|
|
18878
18874
|
readonly mint: PublicKey;
|
|
18879
18875
|
readonly mintDecimals: number;
|
|
18880
18876
|
readonly group: PublicKey;
|
|
18881
|
-
readonly mintRate: number | null;
|
|
18882
|
-
readonly mintPrice: number;
|
|
18883
18877
|
readonly assetShareValue: BigNumber$1;
|
|
18884
18878
|
readonly liabilityShareValue: BigNumber$1;
|
|
18885
18879
|
readonly liquidityVault: PublicKey;
|
|
@@ -18926,7 +18920,7 @@ declare class Bank implements BankType {
|
|
|
18926
18920
|
readonly lendingPositionCount?: BigNumber$1 | undefined;
|
|
18927
18921
|
readonly borrowingPositionCount?: BigNumber$1 | undefined;
|
|
18928
18922
|
readonly tokenSymbol?: string | undefined;
|
|
18929
|
-
constructor(address: PublicKey, mint: PublicKey, mintDecimals: number, group: PublicKey,
|
|
18923
|
+
constructor(address: PublicKey, mint: PublicKey, mintDecimals: number, group: PublicKey, assetShareValue: BigNumber$1, liabilityShareValue: BigNumber$1, liquidityVault: PublicKey, liquidityVaultBump: number, liquidityVaultAuthorityBump: number, insuranceVault: PublicKey, insuranceVaultBump: number, insuranceVaultAuthorityBump: number, collectedInsuranceFeesOutstanding: BigNumber$1, feeVault: PublicKey, feeVaultBump: number, feeVaultAuthorityBump: number, collectedGroupFeesOutstanding: BigNumber$1, lastUpdate: number, config: BankConfig, totalAssetShares: BigNumber$1, totalLiabilityShares: BigNumber$1, emissionsActiveBorrowing: boolean, emissionsActiveLending: boolean, emissionsRate: number, emissionsMint: PublicKey, emissionsRemaining: BigNumber$1, oracleKey: PublicKey, emode: EmodeSettings, kaminoIntegrationAccounts?: {
|
|
18930
18924
|
kaminoReserve: PublicKey;
|
|
18931
18925
|
kaminoObligation: PublicKey;
|
|
18932
18926
|
} | undefined, driftIntegrationAccounts?: {
|