@0dotxyz/p0-ts-sdk 1.0.0 → 1.0.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/README.md CHANGED
@@ -1,12 +1,15 @@
1
1
  # Project 0 TypeScript SDK
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@0dotxyz/p0-ts-sdk.svg)](https://www.npmjs.com/package/@0dotxyz/p0-ts-sdk)
4
- [![npm downloads](https://img.shields.io/npm/dm/@0dotxyz/p0-ts-sdk.svg)](https://www.npmjs.com/package/@0dotxyz/p0-ts-sdk)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
3
+ [![npm version](https://img.shields.io/npm/v/@0dotxyz/p0-ts-sdk.svg?style=flat-square)](https://www.npmjs.com/package/@0dotxyz/p0-ts-sdk)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@0dotxyz/p0-ts-sdk.svg?style=flat-square)](https://www.npmjs.com/package/@0dotxyz/p0-ts-sdk)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg?style=flat-square)](https://www.typescriptlang.org/)
7
+ [![GitHub](https://img.shields.io/badge/GitHub-0dotxyz%2Fp0--ts--sdk-181717.svg?style=flat-square&logo=github)](https://github.com/0dotxyz/p0-ts-sdk)
7
8
 
8
9
  A modern, type-safe TypeScript SDK for interacting with the P0 Protocol on Solana. Lend, borrow, and manage leveraged DeFi positions with a clean, developer-friendly API.
9
10
 
11
+ 📖 **[Read the Full Documentation](https://docs.0.xyz/docs/typescript-sdk/getting-started)**
12
+
10
13
  ## Features
11
14
 
12
15
  - 🔒 **Type-safe**: Full TypeScript support with comprehensive type definitions
@@ -1,6 +1,6 @@
1
- import { BN, BorshCoder, Provider, Program } from '@coral-xyz/anchor';
1
+ import { BorshCoder, Provider, Program } from '@coral-xyz/anchor';
2
+ import BN from 'bn.js';
2
3
  import { PublicKey } from '@solana/web3.js';
3
- import BN$1 from 'bn.js';
4
4
 
5
5
  declare const SWITCHBOARD_ONDEMANDE_PRICE_PRECISION = 18;
6
6
  interface CurrentResult {
@@ -47,7 +47,7 @@ declare function decodeSwitchboardPullFeedData(data: Buffer): PullFeedAccountDat
47
47
 
48
48
  interface LastUpdateFields {
49
49
  /** Last slot when updated */
50
- slot: BN$1;
50
+ slot: BN;
51
51
  /** True when marked stale, false when slot updated */
52
52
  stale: number;
53
53
  /** Status of the prices used to calculate the last update */
@@ -55,8 +55,8 @@ interface LastUpdateFields {
55
55
  placeholder: Array<number>;
56
56
  }
57
57
  interface BigFractionBytesFields {
58
- value: Array<BN$1>;
59
- padding: Array<BN$1>;
58
+ value: Array<BN>;
59
+ padding: Array<BN>;
60
60
  }
61
61
 
62
62
  interface LastUpdateJSON {
@@ -75,7 +75,7 @@ interface BigFractionBytesJSON {
75
75
 
76
76
  interface ReserveRaw {
77
77
  /** Version of the reserve */
78
- version: BN$1;
78
+ version: BN;
79
79
  /** Last slot when supply and rates updated */
80
80
  lastUpdate: LastUpdateFields;
81
81
  /** Lending market address */
@@ -84,20 +84,20 @@ interface ReserveRaw {
84
84
  farmDebt: PublicKey;
85
85
  /** Reserve liquidity */
86
86
  liquidity: ReserveLiquidityFields;
87
- reserveLiquidityPadding: Array<BN$1>;
87
+ reserveLiquidityPadding: Array<BN>;
88
88
  /** Reserve collateral */
89
89
  collateral: ReserveCollateralFields;
90
- reserveCollateralPadding: Array<BN$1>;
90
+ reserveCollateralPadding: Array<BN>;
91
91
  /** Reserve configuration values */
92
92
  config: ReserveConfigFields;
93
- configPadding: Array<BN$1>;
94
- borrowedAmountOutsideElevationGroup: BN$1;
93
+ configPadding: Array<BN>;
94
+ borrowedAmountOutsideElevationGroup: BN;
95
95
  /**
96
96
  * Amount of token borrowed in lamport of debt asset in the given
97
97
  * elevation group when this reserve is part of the collaterals.
98
98
  */
99
- borrowedAmountsAgainstThisReserveInElevationGroups: Array<BN$1>;
100
- padding: Array<BN$1>;
99
+ borrowedAmountsAgainstThisReserveInElevationGroups: Array<BN>;
100
+ padding: Array<BN>;
101
101
  }
102
102
  interface ReserveLiquidityFields {
103
103
  /** Reserve liquidity mint address */
@@ -107,49 +107,49 @@ interface ReserveLiquidityFields {
107
107
  /** Reserve liquidity fee collection address */
108
108
  feeVault: PublicKey;
109
109
  /** Reserve liquidity available */
110
- availableAmount: BN$1;
110
+ availableAmount: BN;
111
111
  /** Reserve liquidity borrowed (scaled fraction) */
112
- borrowedAmountSf: BN$1;
112
+ borrowedAmountSf: BN;
113
113
  /** Reserve liquidity market price in quote currency (scaled fraction) */
114
- marketPriceSf: BN$1;
114
+ marketPriceSf: BN;
115
115
  /** Unix timestamp of the market price (from the oracle) */
116
- marketPriceLastUpdatedTs: BN$1;
116
+ marketPriceLastUpdatedTs: BN;
117
117
  /** Reserve liquidity mint decimals */
118
- mintDecimals: BN$1;
118
+ mintDecimals: BN;
119
119
  /**
120
120
  * Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.
121
121
  * If the threshold is not crossed, then the timestamp is set to 0
122
122
  */
123
- depositLimitCrossedTimestamp: BN$1;
123
+ depositLimitCrossedTimestamp: BN;
124
124
  /**
125
125
  * Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.
126
126
  * If the threshold is not crossed, then the timestamp is set to 0
127
127
  */
128
- borrowLimitCrossedTimestamp: BN$1;
128
+ borrowLimitCrossedTimestamp: BN;
129
129
  /** Reserve liquidity cumulative borrow rate (scaled fraction) */
130
130
  cumulativeBorrowRateBsf: BigFractionBytesFields;
131
131
  /** Reserve cumulative protocol fees (scaled fraction) */
132
- accumulatedProtocolFeesSf: BN$1;
132
+ accumulatedProtocolFeesSf: BN;
133
133
  /** Reserve cumulative referrer fees (scaled fraction) */
134
- accumulatedReferrerFeesSf: BN$1;
134
+ accumulatedReferrerFeesSf: BN;
135
135
  /** Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction) */
136
- pendingReferrerFeesSf: BN$1;
136
+ pendingReferrerFeesSf: BN;
137
137
  /** Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction) */
138
- absoluteReferralRateSf: BN$1;
138
+ absoluteReferralRateSf: BN;
139
139
  /** Token program of the liquidity mint */
140
140
  tokenProgram: PublicKey;
141
- padding2: Array<BN$1>;
142
- padding3: Array<BN$1>;
141
+ padding2: Array<BN>;
142
+ padding3: Array<BN>;
143
143
  }
144
144
  interface ReserveCollateralFields {
145
145
  /** Reserve collateral mint address */
146
146
  mintPubkey: PublicKey;
147
147
  /** Reserve collateral mint supply, used for exchange rate */
148
- mintTotalSupply: BN$1;
148
+ mintTotalSupply: BN;
149
149
  /** Reserve collateral supply address */
150
150
  supplyVault: PublicKey;
151
- padding1: Array<BN$1>;
152
- padding2: Array<BN$1>;
151
+ padding1: Array<BN>;
152
+ padding2: Array<BN>;
153
153
  }
154
154
  interface ReserveConfigFields {
155
155
  /** Status of the reserve Active/Obsolete/Hidden */
@@ -189,22 +189,22 @@ interface ReserveConfigFields {
189
189
  * crossed.
190
190
  * Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case.
191
191
  */
192
- deleveragingMarginCallPeriodSecs: BN$1;
192
+ deleveragingMarginCallPeriodSecs: BN;
193
193
  /**
194
194
  * The rate at which the deleveraging threshold decreases, in bps per day.
195
195
  * Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case.
196
196
  */
197
- deleveragingThresholdDecreaseBpsPerDay: BN$1;
197
+ deleveragingThresholdDecreaseBpsPerDay: BN;
198
198
  /** Program owner fees assessed, separate from gains due to interest accrual */
199
199
  fees: ReserveFeesFields;
200
200
  /** Borrow rate curve based on utilization */
201
201
  borrowRateCurve: BorrowRateCurveFields;
202
202
  /** Borrow factor in percentage - used for risk adjustment */
203
- borrowFactorPct: BN$1;
203
+ borrowFactorPct: BN;
204
204
  /** Maximum deposit limit of liquidity in native units, u64::MAX for inf */
205
- depositLimit: BN$1;
205
+ depositLimit: BN;
206
206
  /** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */
207
- borrowLimit: BN$1;
207
+ borrowLimit: BN;
208
208
  /** Token id from TokenInfos struct */
209
209
  tokenInfo: TokenInfoFields$1;
210
210
  /** Deposit withdrawal caps - deposit & redeem */
@@ -229,19 +229,19 @@ interface ReserveConfigFields {
229
229
  * - u64::MAX for inf
230
230
  * - 0 to disable borrows outside elevation groups
231
231
  */
232
- borrowLimitOutsideElevationGroup: BN$1;
232
+ borrowLimitOutsideElevationGroup: BN;
233
233
  /**
234
234
  * Defines the maximum amount (in lamports of elevation group debt asset)
235
235
  * that can be borrowed when this reserve is used as collateral.
236
236
  * - u64::MAX for inf
237
237
  * - 0 to disable borrows in this elevation group (expected value for the debt asset)
238
238
  */
239
- borrowLimitAgainstThisCollateralInElevationGroup: Array<BN$1>;
239
+ borrowLimitAgainstThisCollateralInElevationGroup: Array<BN>;
240
240
  /**
241
241
  * The rate at which the deleveraging-related liquidation bonus increases, in bps per day.
242
242
  * Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case.
243
243
  */
244
- deleveragingBonusIncreaseBpsPerDay: BN$1;
244
+ deleveragingBonusIncreaseBpsPerDay: BN;
245
245
  }
246
246
  interface ReserveFeesFields {
247
247
  /**
@@ -252,12 +252,12 @@ interface ReserveFeesFields {
252
252
  * 0.01% (1 basis point) = 115292150460685
253
253
  * 0.00001% (Aave borrow fee) = 115292150461
254
254
  */
255
- borrowFeeSf: BN$1;
255
+ borrowFeeSf: BN;
256
256
  /**
257
257
  * Fee for flash loan, expressed as scaled fraction.
258
258
  * 0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541
259
259
  */
260
- flashLoanFeeSf: BN$1;
260
+ flashLoanFeeSf: BN;
261
261
  /** Used for allignment */
262
262
  padding: Array<number>;
263
263
  }
@@ -274,9 +274,9 @@ interface TokenInfoFields$1 {
274
274
  /** Heuristics limits of acceptable price */
275
275
  heuristic: PriceHeuristicFields;
276
276
  /** Max divergence between twap and price in bps */
277
- maxTwapDivergenceBps: BN$1;
278
- maxAgePriceSeconds: BN$1;
279
- maxAgeTwapSeconds: BN$1;
277
+ maxTwapDivergenceBps: BN;
278
+ maxAgePriceSeconds: BN;
279
+ maxAgeTwapSeconds: BN;
280
280
  /** Scope price configuration */
281
281
  scopeConfiguration: ScopeConfigurationFields;
282
282
  /** Switchboard configuration */
@@ -285,15 +285,15 @@ interface TokenInfoFields$1 {
285
285
  pythConfiguration: PythConfigurationFields;
286
286
  blockPriceUsage: number;
287
287
  reserved: Array<number>;
288
- padding: Array<BN$1>;
288
+ padding: Array<BN>;
289
289
  }
290
290
  interface PriceHeuristicFields {
291
291
  /** Lower value of acceptable price */
292
- lower: BN$1;
292
+ lower: BN;
293
293
  /** Upper value of acceptable price */
294
- upper: BN$1;
294
+ upper: BN;
295
295
  /** Number of decimals of the previously defined values */
296
- exp: BN$1;
296
+ exp: BN;
297
297
  }
298
298
  interface ScopeConfigurationFields {
299
299
  /** Pubkey of the scope price feed (disabled if `null` or `default`) */
@@ -313,10 +313,10 @@ interface PythConfigurationFields {
313
313
  price: PublicKey;
314
314
  }
315
315
  interface WithdrawalCapsFields {
316
- configCapacity: BN$1;
317
- currentTotal: BN$1;
318
- lastIntervalStartTimestamp: BN$1;
319
- configIntervalLengthSeconds: BN$1;
316
+ configCapacity: BN;
317
+ currentTotal: BN;
318
+ lastIntervalStartTimestamp: BN;
319
+ configIntervalLengthSeconds: BN;
320
320
  }
321
321
 
322
322
  interface ReserveJSON {
@@ -746,7 +746,7 @@ interface ObligationOrderJSON {
746
746
 
747
747
  interface ObligationRaw {
748
748
  /** Version of the struct */
749
- tag: BN$1;
749
+ tag: BN;
750
750
  /** Last update to collateral, liquidity, or their market values */
751
751
  lastUpdate: LastUpdateFields;
752
752
  /** Lending market address */
@@ -756,19 +756,19 @@ interface ObligationRaw {
756
756
  /** Deposited collateral for the obligation, unique by deposit reserve address */
757
757
  deposits: Array<ObligationCollateralFields>;
758
758
  /** Worst LTV for the collaterals backing the loan, represented as a percentage */
759
- lowestReserveDepositLiquidationLtv: BN$1;
759
+ lowestReserveDepositLiquidationLtv: BN;
760
760
  /** Market value of deposits (scaled fraction) */
761
- depositedValueSf: BN$1;
761
+ depositedValueSf: BN;
762
762
  /** Borrowed liquidity for the obligation, unique by borrow reserve address */
763
763
  borrows: Array<ObligationLiquidityFields>;
764
764
  /** Risk adjusted market value of borrows/debt (sum of price * borrowed_amount * borrow_factor) (scaled fraction) */
765
- borrowFactorAdjustedDebtValueSf: BN$1;
765
+ borrowFactorAdjustedDebtValueSf: BN;
766
766
  /** Market value of borrows - used for max_liquidatable_borrowed_amount (scaled fraction) */
767
- borrowedAssetsMarketValueSf: BN$1;
767
+ borrowedAssetsMarketValueSf: BN;
768
768
  /** The maximum borrow value at the weighted average loan to value ratio (scaled fraction) */
769
- allowedBorrowValueSf: BN$1;
769
+ allowedBorrowValueSf: BN;
770
770
  /** The dangerous borrow value at the weighted average liquidation threshold (scaled fraction) */
771
- unhealthyBorrowValueSf: BN$1;
771
+ unhealthyBorrowValueSf: BN;
772
772
  /** The asset tier of the deposits */
773
773
  depositsAssetTiers: Array<number>;
774
774
  /** The asset tier of the borrows */
@@ -793,50 +793,50 @@ interface ObligationRaw {
793
793
  /** The number of obsolete reserves the obligation has a borrow in */
794
794
  numOfObsoleteBorrowReserves: number;
795
795
  reserved: Array<number>;
796
- highestBorrowFactorPct: BN$1;
796
+ highestBorrowFactorPct: BN;
797
797
  /**
798
798
  * A timestamp at which the risk council most-recently marked this obligation for deleveraging.
799
799
  * Zero if not currently subject to deleveraging.
800
800
  */
801
- autodeleverageMarginCallStartedTimestamp: BN$1;
801
+ autodeleverageMarginCallStartedTimestamp: BN;
802
802
  /**
803
803
  * Owner-defined, liquidator-executed orders applicable to this obligation.
804
804
  * Typical use-cases would be a stop-loss and a take-profit (possibly co-existing).
805
805
  */
806
806
  orders: Array<ObligationOrderFields>;
807
- padding3: Array<BN$1>;
807
+ padding3: Array<BN>;
808
808
  }
809
809
  interface ObligationCollateralFields {
810
810
  /** Reserve collateral is deposited to */
811
811
  depositReserve: PublicKey;
812
812
  /** Amount of collateral deposited */
813
- depositedAmount: BN$1;
813
+ depositedAmount: BN;
814
814
  /** Collateral market value in quote currency (scaled fraction) */
815
- marketValueSf: BN$1;
815
+ marketValueSf: BN;
816
816
  /**
817
817
  * Debt amount (lamport) taken against this collateral.
818
818
  * (only meaningful if this obligation is part of an elevation group, otherwise 0)
819
819
  * This is only indicative of the debt computed on the last refresh obligation.
820
820
  * If the obligation have multiple collateral this value is the same for all of them.
821
821
  */
822
- borrowedAmountAgainstThisCollateralInElevationGroup: BN$1;
823
- padding: Array<BN$1>;
822
+ borrowedAmountAgainstThisCollateralInElevationGroup: BN;
823
+ padding: Array<BN>;
824
824
  }
825
825
  interface ObligationLiquidityFields {
826
826
  /** Reserve liquidity is borrowed from */
827
827
  borrowReserve: PublicKey;
828
828
  /** Borrow rate used for calculating interest (big scaled fraction) */
829
829
  cumulativeBorrowRateBsf: BigFractionBytesFields;
830
- padding: BN$1;
830
+ padding: BN;
831
831
  /** Amount of liquidity borrowed plus interest (scaled fraction) */
832
- borrowedAmountSf: BN$1;
832
+ borrowedAmountSf: BN;
833
833
  /** Liquidity market value in quote currency (scaled fraction) */
834
- marketValueSf: BN$1;
834
+ marketValueSf: BN;
835
835
  /** Risk adjusted liquidity market value in quote currency - DEBUG ONLY - use market_value instead */
836
- borrowFactorAdjustedMarketValueSf: BN$1;
836
+ borrowFactorAdjustedMarketValueSf: BN;
837
837
  /** Amount of liquidity borrowed outside of an elevation group */
838
- borrowedAmountOutsideElevationGroups: BN$1;
839
- padding2: Array<BN$1>;
838
+ borrowedAmountOutsideElevationGroups: BN;
839
+ padding2: Array<BN>;
840
840
  }
841
841
  interface ObligationOrderFields {
842
842
  /**
@@ -852,7 +852,7 @@ interface ObligationOrderFields {
852
852
  * means that the order is active only when the BTC-SOL price is greater than `491.3` (i.e.
853
853
  * > 491.3 SOL per BTC).
854
854
  */
855
- conditionThresholdSf: BN$1;
855
+ conditionThresholdSf: BN;
856
856
  /**
857
857
  * A configuration parameter used by the opportunity (scaled [Fraction]).
858
858
  * The exact meaning depends on the specific [Self::opportunity_type].
@@ -867,7 +867,7 @@ interface ObligationOrderFields {
867
867
  * The only allowed value in this case is [Fraction::MAX] (to emphasize that *all* debt
868
868
  * should be repaid).
869
869
  */
870
- opportunityParameterSf: BN$1;
870
+ opportunityParameterSf: BN;
871
871
  /**
872
872
  * A *minimum* additional fraction of collateral transferred to the liquidator, in bps.
873
873
  *
@@ -920,7 +920,7 @@ interface ObligationOrderFields {
920
920
  * End padding.
921
921
  * The total size of a single instance is 8*u128 = 128 bytes.
922
922
  */
923
- padding2: Array<BN$1>;
923
+ padding2: Array<BN>;
924
924
  }
925
925
 
926
926
  interface FarmStateRaw {
@@ -928,17 +928,17 @@ interface FarmStateRaw {
928
928
  globalConfig: PublicKey;
929
929
  token: TokenInfoFields;
930
930
  rewardInfos: Array<RewardInfoFields>;
931
- numRewardTokens: BN$1;
931
+ numRewardTokens: BN;
932
932
  /** Data used to calculate the rewards of the user */
933
- numUsers: BN$1;
933
+ numUsers: BN;
934
934
  /**
935
935
  * The number of token in the `farm_vault` staked (getting rewards and fees)
936
936
  * Set such as `farm_vault.amount = total_staked_amount + total_pending_amount`
937
937
  */
938
- totalStakedAmount: BN$1;
938
+ totalStakedAmount: BN;
939
939
  farmVault: PublicKey;
940
940
  farmVaultsAuthority: PublicKey;
941
- farmVaultsAuthorityBump: BN$1;
941
+ farmVaultsAuthorityBump: BN;
942
942
  /**
943
943
  * Only used for delegate farms
944
944
  * Set to `default()` otherwise
@@ -973,59 +973,59 @@ interface FarmStateRaw {
973
973
  /** Delay between a user unstake and the ability to withdraw his deposit. */
974
974
  withdrawalCooldownPeriod: number;
975
975
  /** Total active stake of tokens in the farm (scaled from `Decimal` representation). */
976
- totalActiveStakeScaled: BN$1;
976
+ totalActiveStakeScaled: BN;
977
977
  /**
978
978
  * Total pending stake of tokens in the farm (scaled from `Decimal` representation).
979
979
  * (can be used by `withdraw_authority` but don't get rewards or fees)
980
980
  */
981
- totalPendingStakeScaled: BN$1;
981
+ totalPendingStakeScaled: BN;
982
982
  /** Total pending amount of tokens in the farm */
983
- totalPendingAmount: BN$1;
983
+ totalPendingAmount: BN;
984
984
  /** Slashed amounts from early withdrawal */
985
- slashedAmountCurrent: BN$1;
986
- slashedAmountCumulative: BN$1;
985
+ slashedAmountCurrent: BN;
986
+ slashedAmountCumulative: BN;
987
987
  slashedAmountSpillAddress: PublicKey;
988
988
  /** Locking stake */
989
- lockingMode: BN$1;
990
- lockingStartTimestamp: BN$1;
991
- lockingDuration: BN$1;
992
- lockingEarlyWithdrawalPenaltyBps: BN$1;
993
- depositCapAmount: BN$1;
989
+ lockingMode: BN;
990
+ lockingStartTimestamp: BN;
991
+ lockingDuration: BN;
992
+ lockingEarlyWithdrawalPenaltyBps: BN;
993
+ depositCapAmount: BN;
994
994
  scopePrices: PublicKey;
995
- scopeOraclePriceId: BN$1;
996
- scopeOracleMaxAge: BN$1;
995
+ scopeOraclePriceId: BN;
996
+ scopeOracleMaxAge: BN;
997
997
  pendingFarmAdmin: PublicKey;
998
998
  strategyId: PublicKey;
999
999
  delegatedRpsAdmin: PublicKey;
1000
1000
  vaultId: PublicKey;
1001
1001
  secondDelegatedAuthority: PublicKey;
1002
- padding: Array<BN$1>;
1002
+ padding: Array<BN>;
1003
1003
  }
1004
1004
  interface TokenInfoFields {
1005
1005
  mint: PublicKey;
1006
- decimals: BN$1;
1006
+ decimals: BN;
1007
1007
  tokenProgram: PublicKey;
1008
- padding: Array<BN$1>;
1008
+ padding: Array<BN>;
1009
1009
  }
1010
1010
  interface RewardInfoFields {
1011
1011
  token: TokenInfoFields;
1012
1012
  rewardsVault: PublicKey;
1013
- rewardsAvailable: BN$1;
1013
+ rewardsAvailable: BN;
1014
1014
  rewardScheduleCurve: RewardScheduleCurveFields;
1015
- minClaimDurationSeconds: BN$1;
1016
- lastIssuanceTs: BN$1;
1017
- rewardsIssuedUnclaimed: BN$1;
1018
- rewardsIssuedCumulative: BN$1;
1019
- rewardPerShareScaled: BN$1;
1020
- placeholder0: BN$1;
1015
+ minClaimDurationSeconds: BN;
1016
+ lastIssuanceTs: BN;
1017
+ rewardsIssuedUnclaimed: BN;
1018
+ rewardsIssuedCumulative: BN;
1019
+ rewardPerShareScaled: BN;
1020
+ placeholder0: BN;
1021
1021
  rewardType: number;
1022
1022
  rewardsPerSecondDecimals: number;
1023
1023
  padding0: Array<number>;
1024
- padding1: Array<BN$1>;
1024
+ padding1: Array<BN>;
1025
1025
  }
1026
1026
  interface RewardPerTimeUnitPointFields {
1027
- tsStart: BN$1;
1028
- rewardPerTimeUnit: BN$1;
1027
+ tsStart: BN;
1028
+ rewardPerTimeUnit: BN;
1029
1029
  }
1030
1030
  interface RewardScheduleCurveFields {
1031
1031
  /**