@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/instructions.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
2
|
import { PublicKey, AccountMeta } from '@solana/web3.js';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
|
-
import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-
|
|
4
|
+
import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-BnW15JjT.cjs';
|
|
5
5
|
import '@coral-xyz/anchor';
|
|
6
6
|
import 'bignumber.js';
|
|
7
|
-
import './dto-rate-model.types-
|
|
7
|
+
import './dto-rate-model.types-CfqbDcgG.cjs';
|
|
8
8
|
|
|
9
9
|
declare function makeInitMarginfiAccountIx(mfProgram: MarginfiProgram, accounts: {
|
|
10
10
|
marginfiGroup: PublicKey;
|
package/dist/instructions.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
2
|
import { PublicKey, AccountMeta } from '@solana/web3.js';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
|
-
import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-
|
|
4
|
+
import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-CviIoob4.js';
|
|
5
5
|
import '@coral-xyz/anchor';
|
|
6
6
|
import 'bignumber.js';
|
|
7
|
-
import './dto-rate-model.types-
|
|
7
|
+
import './dto-rate-model.types-CfqbDcgG.js';
|
|
8
8
|
|
|
9
9
|
declare function makeInitMarginfiAccountIx(mfProgram: MarginfiProgram, accounts: {
|
|
10
10
|
marginfiGroup: PublicKey;
|
|
@@ -2,7 +2,7 @@ import { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
|
2
2
|
import { Idl, Program as Program$1, AnchorProvider } from '@coral-xyz/anchor';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
4
|
import BigNumber$1 from 'bignumber.js';
|
|
5
|
-
import { K as KaminoReserve, a as KaminoObligation, b as KaminoFarmState, D as DriftSpotMarket, c as DriftUser, d as DriftRewards, e as DriftUserStats, J as JupLendingState, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON } from './dto-rate-model.types-
|
|
5
|
+
import { K as KaminoReserve, a as KaminoObligation, b as KaminoFarmState, D as DriftSpotMarket, c as DriftUser, d as DriftRewards, e as DriftUserStats, J as JupLendingState, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON } from './dto-rate-model.types-CfqbDcgG.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
@@ -2,7 +2,7 @@ import { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
|
2
2
|
import { Idl, Program as Program$1, AnchorProvider } from '@coral-xyz/anchor';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
4
|
import BigNumber$1 from 'bignumber.js';
|
|
5
|
-
import { K as KaminoReserve, a as KaminoObligation, b as KaminoFarmState, D as DriftSpotMarket, c as DriftUser, d as DriftRewards, e as DriftUserStats, J as JupLendingState, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON } from './dto-rate-model.types-
|
|
5
|
+
import { K as KaminoReserve, a as KaminoObligation, b as KaminoFarmState, D as DriftSpotMarket, c as DriftUser, d as DriftRewards, e as DriftUserStats, J as JupLendingState, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON } from './dto-rate-model.types-CfqbDcgG.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Program IDL in camelCase format in order to be used in JS/TS.
|
package/dist/vendor.cjs
CHANGED
|
@@ -4101,6 +4101,8 @@ function kaminoReserveToDto(reserve) {
|
|
|
4101
4101
|
config: {
|
|
4102
4102
|
protocolTakeRatePct: reserve.config.protocolTakeRatePct,
|
|
4103
4103
|
hostFixedInterestRateBps: reserve.config.hostFixedInterestRateBps,
|
|
4104
|
+
depositLimit: reserve.config.depositLimit.toString(),
|
|
4105
|
+
borrowLimit: reserve.config.borrowLimit.toString(),
|
|
4104
4106
|
borrowRateCurve: {
|
|
4105
4107
|
points: reserve.config.borrowRateCurve.points.map((item) => ({
|
|
4106
4108
|
utilizationRateBps: item.utilizationRateBps,
|
|
@@ -12408,12 +12410,13 @@ function dtoToKaminoObligation(obligationDto) {
|
|
|
12408
12410
|
return {
|
|
12409
12411
|
lendingMarket: new web3_js.PublicKey(obligationDto.lendingMarket),
|
|
12410
12412
|
owner: new web3_js.PublicKey(obligationDto.owner),
|
|
12411
|
-
|
|
12413
|
+
// Hosted endpoints may prune empty position arrays from the payload
|
|
12414
|
+
deposits: (obligationDto.deposits ?? []).map((item) => ({
|
|
12412
12415
|
depositReserve: new web3_js.PublicKey(item.depositReserve),
|
|
12413
12416
|
depositedAmount: new BN5__default.default(item.depositedAmount),
|
|
12414
12417
|
marketValueSf: new BN5__default.default(item.marketValueSf)
|
|
12415
12418
|
})),
|
|
12416
|
-
borrows: obligationDto.borrows.map((item) => ({
|
|
12419
|
+
borrows: (obligationDto.borrows ?? []).map((item) => ({
|
|
12417
12420
|
borrowReserve: new web3_js.PublicKey(item.borrowReserve),
|
|
12418
12421
|
borrowedAmountSf: new BN5__default.default(item.borrowedAmountSf),
|
|
12419
12422
|
marketValueSf: new BN5__default.default(item.marketValueSf)
|
|
@@ -12446,6 +12449,8 @@ function dtoToKaminoReserve(reserveDto) {
|
|
|
12446
12449
|
config: {
|
|
12447
12450
|
protocolTakeRatePct: reserveDto.config.protocolTakeRatePct,
|
|
12448
12451
|
hostFixedInterestRateBps: reserveDto.config.hostFixedInterestRateBps,
|
|
12452
|
+
depositLimit: new BN5__default.default(reserveDto.config.depositLimit),
|
|
12453
|
+
borrowLimit: new BN5__default.default(reserveDto.config.borrowLimit),
|
|
12449
12454
|
borrowRateCurve: {
|
|
12450
12455
|
points: reserveDto.config.borrowRateCurve.points.map((item) => ({
|
|
12451
12456
|
utilizationRateBps: item.utilizationRateBps,
|
|
@@ -12860,6 +12865,7 @@ function kaminoFarmStateToDto(farmState) {
|
|
|
12860
12865
|
mint: item.token.mint.toBase58(),
|
|
12861
12866
|
decimals: item.token.decimals.toString()
|
|
12862
12867
|
},
|
|
12868
|
+
rewardsAvailable: item.rewardsAvailable.toString(),
|
|
12863
12869
|
rewardsPerSecondDecimals: item.rewardsPerSecondDecimals,
|
|
12864
12870
|
rewardScheduleCurve: {
|
|
12865
12871
|
points: item.rewardScheduleCurve.points.map((p) => ({
|
|
@@ -12973,6 +12979,7 @@ function dtoToKaminoFarmState(dto) {
|
|
|
12973
12979
|
mint: new web3_js.PublicKey(item.token.mint),
|
|
12974
12980
|
decimals: new BN5__default.default(item.token.decimals)
|
|
12975
12981
|
},
|
|
12982
|
+
rewardsAvailable: new BN5__default.default(item.rewardsAvailable),
|
|
12976
12983
|
rewardsPerSecondDecimals: item.rewardsPerSecondDecimals,
|
|
12977
12984
|
rewardScheduleCurve: {
|
|
12978
12985
|
points: item.rewardScheduleCurve.points.map((p) => ({
|