@0dotxyz/p0-ts-sdk 2.3.0-alpha.5 → 2.3.0-alpha.6

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.
@@ -14274,208 +14274,6 @@ type Marginfi = {
14274
14274
  declare const MARGINFI_IDL: MarginfiIdlType;
14275
14275
  type MarginfiIdlType = Marginfi;
14276
14276
 
14277
- interface BankRaw {
14278
- group: PublicKey;
14279
- mint: PublicKey;
14280
- mintDecimals: number;
14281
- assetShareValue: WrappedI80F48;
14282
- liabilityShareValue: WrappedI80F48;
14283
- liquidityVault: PublicKey;
14284
- liquidityVaultBump: number;
14285
- liquidityVaultAuthorityBump: number;
14286
- insuranceVault: PublicKey;
14287
- insuranceVaultBump: number;
14288
- insuranceVaultAuthorityBump: number;
14289
- collectedInsuranceFeesOutstanding: WrappedI80F48;
14290
- feeVault: PublicKey;
14291
- feeVaultBump: number;
14292
- feeVaultAuthorityBump: number;
14293
- collectedGroupFeesOutstanding: WrappedI80F48;
14294
- lastUpdate: BN;
14295
- config: BankConfigRaw;
14296
- totalLiabilityShares: WrappedI80F48;
14297
- totalAssetShares: WrappedI80F48;
14298
- flags: BN;
14299
- emissionsRate: BN;
14300
- emissionsRemaining: WrappedI80F48;
14301
- emissionsMint: PublicKey;
14302
- /**
14303
- * Integration account slot 1 (default Pubkey for non-integrations).
14304
- * - Kamino: reserve
14305
- * - Drift: spot market
14306
- * - Solend: reserve
14307
- */
14308
- integrationAcc1: PublicKey;
14309
- /**
14310
- * Integration account slot 2 (default Pubkey for non-integrations).
14311
- * - Kamino: obligation
14312
- * - Drift: user
14313
- * - Solend: obligation
14314
- */
14315
- integrationAcc2: PublicKey;
14316
- /**
14317
- * Integration account slot 3 (default Pubkey for non-integrations).
14318
- * - Drift: user stats
14319
- */
14320
- integrationAcc3: PublicKey;
14321
- emode: EmodeSettingsRaw;
14322
- feesDestinationAccount?: PublicKey;
14323
- cache?: BankCacheRaw;
14324
- lendingPositionCount?: number;
14325
- borrowingPositionCount?: number;
14326
- }
14327
- interface BankCacheRaw {
14328
- baseRate: number;
14329
- lendingRate: number;
14330
- borrowingRate: number;
14331
- interestAccumulatedFor: number;
14332
- accumulatedSinceLastUpdate: WrappedI80F48;
14333
- }
14334
- interface BankConfigRaw {
14335
- assetWeightInit: WrappedI80F48;
14336
- assetWeightMaint: WrappedI80F48;
14337
- liabilityWeightInit: WrappedI80F48;
14338
- liabilityWeightMaint: WrappedI80F48;
14339
- depositLimit: BN;
14340
- interestRateConfig: InterestRateConfigRaw;
14341
- operationalState: OperationalStateRaw;
14342
- oracleSetup: OracleSetupRaw;
14343
- oracleKeys: PublicKey[];
14344
- borrowLimit: BN;
14345
- riskTier: RiskTierRaw;
14346
- assetTag: number;
14347
- configFlags?: number;
14348
- totalAssetValueInitLimit: BN;
14349
- oracleMaxAge: number;
14350
- oracleMaxConfidence: number;
14351
- fixedPrice: WrappedI80F48;
14352
- }
14353
- interface BankConfigOptRaw {
14354
- assetWeightInit: WrappedI80F48 | null;
14355
- assetWeightMaint: WrappedI80F48 | null;
14356
- liabilityWeightInit: WrappedI80F48 | null;
14357
- liabilityWeightMaint: WrappedI80F48 | null;
14358
- depositLimit: BN | null;
14359
- borrowLimit: BN | null;
14360
- operationalState: OperationalStateRaw | null;
14361
- interestRateConfig: InterestRateConfigOptRaw | null;
14362
- riskTier: RiskTierRaw | null;
14363
- assetTag: number | null;
14364
- totalAssetValueInitLimit: BN | null;
14365
- oracleMaxConfidence: number | null;
14366
- oracleMaxAge: number | null;
14367
- permissionlessBadDebtSettlement: boolean | null;
14368
- freezeSettings: boolean | null;
14369
- tokenlessRepaymentsAllowed: boolean | null;
14370
- }
14371
- interface BankConfigCompactRaw extends Omit<BankConfigRaw, "oracleKeys" | "oracleSetup" | "fixedPrice" | "interestRateConfig"> {
14372
- interestRateConfig: InterestRateConfigCompactRaw;
14373
- }
14374
- type RiskTierRaw = {
14375
- collateral: {};
14376
- } | {
14377
- isolated: {};
14378
- };
14379
- type OperationalStateRaw = {
14380
- paused: {};
14381
- } | {
14382
- operational: {};
14383
- } | {
14384
- reduceOnly: {};
14385
- } | {
14386
- killedByBankruptcy: {};
14387
- };
14388
- interface RatePointRaw {
14389
- util: number;
14390
- rate: number;
14391
- }
14392
- interface InterestRateConfigRaw {
14393
- optimalUtilizationRate: WrappedI80F48;
14394
- plateauInterestRate: WrappedI80F48;
14395
- maxInterestRate: WrappedI80F48;
14396
- insuranceFeeFixedApr: WrappedI80F48;
14397
- insuranceIrFee: WrappedI80F48;
14398
- protocolFixedFeeApr: WrappedI80F48;
14399
- protocolIrFee: WrappedI80F48;
14400
- protocolOriginationFee: WrappedI80F48;
14401
- zeroUtilRate: number;
14402
- hundredUtilRate: number;
14403
- points: RatePointRaw[];
14404
- curveType: number;
14405
- }
14406
- interface InterestRateConfigCompactRaw extends Omit<InterestRateConfigRaw, "optimalUtilizationRate" | "plateauInterestRate" | "maxInterestRate" | "curveType"> {
14407
- }
14408
- interface InterestRateConfigOptRaw extends InterestRateConfigCompactRaw {
14409
- }
14410
- type OracleSetupRaw = {
14411
- none: {};
14412
- } | {
14413
- pythLegacy: {};
14414
- } | {
14415
- switchboardV2: {};
14416
- } | {
14417
- pythPushOracle: {};
14418
- } | {
14419
- switchboardPull: {};
14420
- } | {
14421
- stakedWithPythPush: {};
14422
- } | {
14423
- kaminoPythPush: {};
14424
- } | {
14425
- kaminoSwitchboardPull: {};
14426
- } | {
14427
- fixed: {};
14428
- } | {
14429
- driftPythPull: {};
14430
- } | {
14431
- driftSwitchboardPull: {};
14432
- } | {
14433
- solendPythPull: {};
14434
- } | {
14435
- solendSwitchboardPull: {};
14436
- } | {
14437
- fixedKamino: {};
14438
- } | {
14439
- fixedDrift: {};
14440
- } | {
14441
- juplendPythPull: {};
14442
- } | {
14443
- juplendSwitchboardPull: {};
14444
- } | {
14445
- fixedJuplend: {};
14446
- };
14447
- interface OracleConfigOptRaw {
14448
- setup: OracleSetupRaw;
14449
- keys: PublicKey[];
14450
- }
14451
- interface BankMetadataRaw {
14452
- bank: PublicKey;
14453
- placeholder: BN;
14454
- ticker: number[];
14455
- description: number[];
14456
- dataBlob: number[];
14457
- endDescriptionByte: number;
14458
- endDataBlob: number;
14459
- endTickerByte: number;
14460
- bump: number;
14461
- pad0: number[];
14462
- }
14463
- interface EmodeEntryRaw {
14464
- collateralBankEmodeTag: number;
14465
- flags: number;
14466
- assetWeightInit: WrappedI80F48;
14467
- assetWeightMaint: WrappedI80F48;
14468
- }
14469
- interface EmodeSettingsRaw {
14470
- emodeTag: number;
14471
- timestamp: BN;
14472
- flags: BN;
14473
- emodeConfig: EmodeConfigRaw;
14474
- }
14475
- interface EmodeConfigRaw {
14476
- entries: EmodeEntryRaw[];
14477
- }
14478
-
14479
14277
  declare enum RiskTier {
14480
14278
  Collateral = "Collateral",
14481
14279
  Isolated = "Isolated"
@@ -14727,6 +14525,208 @@ declare enum BankVaultType {
14727
14525
  FeeVault = 2
14728
14526
  }
14729
14527
 
14528
+ interface BankRaw {
14529
+ group: PublicKey;
14530
+ mint: PublicKey;
14531
+ mintDecimals: number;
14532
+ assetShareValue: WrappedI80F48;
14533
+ liabilityShareValue: WrappedI80F48;
14534
+ liquidityVault: PublicKey;
14535
+ liquidityVaultBump: number;
14536
+ liquidityVaultAuthorityBump: number;
14537
+ insuranceVault: PublicKey;
14538
+ insuranceVaultBump: number;
14539
+ insuranceVaultAuthorityBump: number;
14540
+ collectedInsuranceFeesOutstanding: WrappedI80F48;
14541
+ feeVault: PublicKey;
14542
+ feeVaultBump: number;
14543
+ feeVaultAuthorityBump: number;
14544
+ collectedGroupFeesOutstanding: WrappedI80F48;
14545
+ lastUpdate: BN;
14546
+ config: BankConfigRaw;
14547
+ totalLiabilityShares: WrappedI80F48;
14548
+ totalAssetShares: WrappedI80F48;
14549
+ flags: BN;
14550
+ emissionsRate: BN;
14551
+ emissionsRemaining: WrappedI80F48;
14552
+ emissionsMint: PublicKey;
14553
+ /**
14554
+ * Integration account slot 1 (default Pubkey for non-integrations).
14555
+ * - Kamino: reserve
14556
+ * - Drift: spot market
14557
+ * - Solend: reserve
14558
+ */
14559
+ integrationAcc1: PublicKey;
14560
+ /**
14561
+ * Integration account slot 2 (default Pubkey for non-integrations).
14562
+ * - Kamino: obligation
14563
+ * - Drift: user
14564
+ * - Solend: obligation
14565
+ */
14566
+ integrationAcc2: PublicKey;
14567
+ /**
14568
+ * Integration account slot 3 (default Pubkey for non-integrations).
14569
+ * - Drift: user stats
14570
+ */
14571
+ integrationAcc3: PublicKey;
14572
+ emode: EmodeSettingsRaw;
14573
+ feesDestinationAccount?: PublicKey;
14574
+ cache?: BankCacheRaw;
14575
+ lendingPositionCount?: number;
14576
+ borrowingPositionCount?: number;
14577
+ }
14578
+ interface BankCacheRaw {
14579
+ baseRate: number;
14580
+ lendingRate: number;
14581
+ borrowingRate: number;
14582
+ interestAccumulatedFor: number;
14583
+ accumulatedSinceLastUpdate: WrappedI80F48;
14584
+ }
14585
+ interface BankConfigRaw {
14586
+ assetWeightInit: WrappedI80F48;
14587
+ assetWeightMaint: WrappedI80F48;
14588
+ liabilityWeightInit: WrappedI80F48;
14589
+ liabilityWeightMaint: WrappedI80F48;
14590
+ depositLimit: BN;
14591
+ interestRateConfig: InterestRateConfigRaw;
14592
+ operationalState: OperationalStateRaw;
14593
+ oracleSetup: OracleSetupRaw;
14594
+ oracleKeys: PublicKey[];
14595
+ borrowLimit: BN;
14596
+ riskTier: RiskTierRaw;
14597
+ assetTag: number;
14598
+ configFlags?: number;
14599
+ totalAssetValueInitLimit: BN;
14600
+ oracleMaxAge: number;
14601
+ oracleMaxConfidence: number;
14602
+ fixedPrice: WrappedI80F48;
14603
+ }
14604
+ interface BankConfigOptRaw {
14605
+ assetWeightInit: WrappedI80F48 | null;
14606
+ assetWeightMaint: WrappedI80F48 | null;
14607
+ liabilityWeightInit: WrappedI80F48 | null;
14608
+ liabilityWeightMaint: WrappedI80F48 | null;
14609
+ depositLimit: BN | null;
14610
+ borrowLimit: BN | null;
14611
+ operationalState: OperationalStateRaw | null;
14612
+ interestRateConfig: InterestRateConfigOptRaw | null;
14613
+ riskTier: RiskTierRaw | null;
14614
+ assetTag: number | null;
14615
+ totalAssetValueInitLimit: BN | null;
14616
+ oracleMaxConfidence: number | null;
14617
+ oracleMaxAge: number | null;
14618
+ permissionlessBadDebtSettlement: boolean | null;
14619
+ freezeSettings: boolean | null;
14620
+ tokenlessRepaymentsAllowed: boolean | null;
14621
+ }
14622
+ interface BankConfigCompactRaw extends Omit<BankConfigRaw, "oracleKeys" | "oracleSetup" | "fixedPrice" | "interestRateConfig"> {
14623
+ interestRateConfig: InterestRateConfigCompactRaw;
14624
+ }
14625
+ type RiskTierRaw = {
14626
+ collateral: {};
14627
+ } | {
14628
+ isolated: {};
14629
+ };
14630
+ type OperationalStateRaw = {
14631
+ paused: {};
14632
+ } | {
14633
+ operational: {};
14634
+ } | {
14635
+ reduceOnly: {};
14636
+ } | {
14637
+ killedByBankruptcy: {};
14638
+ };
14639
+ interface RatePointRaw {
14640
+ util: number;
14641
+ rate: number;
14642
+ }
14643
+ interface InterestRateConfigRaw {
14644
+ optimalUtilizationRate: WrappedI80F48;
14645
+ plateauInterestRate: WrappedI80F48;
14646
+ maxInterestRate: WrappedI80F48;
14647
+ insuranceFeeFixedApr: WrappedI80F48;
14648
+ insuranceIrFee: WrappedI80F48;
14649
+ protocolFixedFeeApr: WrappedI80F48;
14650
+ protocolIrFee: WrappedI80F48;
14651
+ protocolOriginationFee: WrappedI80F48;
14652
+ zeroUtilRate: number;
14653
+ hundredUtilRate: number;
14654
+ points: RatePointRaw[];
14655
+ curveType: number;
14656
+ }
14657
+ interface InterestRateConfigCompactRaw extends Omit<InterestRateConfigRaw, "optimalUtilizationRate" | "plateauInterestRate" | "maxInterestRate" | "curveType"> {
14658
+ }
14659
+ interface InterestRateConfigOptRaw extends InterestRateConfigCompactRaw {
14660
+ }
14661
+ type OracleSetupRaw = {
14662
+ none: {};
14663
+ } | {
14664
+ pythLegacy: {};
14665
+ } | {
14666
+ switchboardV2: {};
14667
+ } | {
14668
+ pythPushOracle: {};
14669
+ } | {
14670
+ switchboardPull: {};
14671
+ } | {
14672
+ stakedWithPythPush: {};
14673
+ } | {
14674
+ kaminoPythPush: {};
14675
+ } | {
14676
+ kaminoSwitchboardPull: {};
14677
+ } | {
14678
+ fixed: {};
14679
+ } | {
14680
+ driftPythPull: {};
14681
+ } | {
14682
+ driftSwitchboardPull: {};
14683
+ } | {
14684
+ solendPythPull: {};
14685
+ } | {
14686
+ solendSwitchboardPull: {};
14687
+ } | {
14688
+ fixedKamino: {};
14689
+ } | {
14690
+ fixedDrift: {};
14691
+ } | {
14692
+ juplendPythPull: {};
14693
+ } | {
14694
+ juplendSwitchboardPull: {};
14695
+ } | {
14696
+ fixedJuplend: {};
14697
+ };
14698
+ interface OracleConfigOptRaw {
14699
+ setup: OracleSetupRaw;
14700
+ keys: PublicKey[];
14701
+ }
14702
+ interface BankMetadataRaw {
14703
+ bank: PublicKey;
14704
+ placeholder: BN;
14705
+ ticker: number[];
14706
+ description: number[];
14707
+ dataBlob: number[];
14708
+ endDescriptionByte: number;
14709
+ endDataBlob: number;
14710
+ endTickerByte: number;
14711
+ bump: number;
14712
+ pad0: number[];
14713
+ }
14714
+ interface EmodeEntryRaw {
14715
+ collateralBankEmodeTag: number;
14716
+ flags: number;
14717
+ assetWeightInit: WrappedI80F48;
14718
+ assetWeightMaint: WrappedI80F48;
14719
+ }
14720
+ interface EmodeSettingsRaw {
14721
+ emodeTag: number;
14722
+ timestamp: BN;
14723
+ flags: BN;
14724
+ emodeConfig: EmodeConfigRaw;
14725
+ }
14726
+ interface EmodeConfigRaw {
14727
+ entries: EmodeEntryRaw[];
14728
+ }
14729
+
14730
14730
  interface PriceWithConfidence {
14731
14731
  price: BigNumber$1;
14732
14732
  confidence: BigNumber$1;
@@ -15389,4 +15389,4 @@ declare function resolveAmount(amount: Amount | TypedAmount): {
15389
15389
  type: AmountType;
15390
15390
  };
15391
15391
 
15392
- export { type BankMetadataRaw as $, AssetTag as A, type BankConfigCompactRaw as B, type HealthCacheType as C, type EmodePair as D, EmodeTag as E, type ActiveEmodePair as F, type ActionEmodeImpact as G, HealthCacheFlags as H, type InterestRateConfigRaw as I, MarginRequirementType as J, EmodeImpactStatus as K, BankVaultType as L, type MarginfiProgram as M, type BankIntegrationMetadataMapDto as N, OperationalState as O, type PriceWithConfidence as P, type BankIntegrationMetadataDto as Q, RiskTier as R, type BankIntegrationMetadata as S, type TypedAmount as T, Bank as U, type Environment as V, type WrappedI80F48 as W, type Project0Config as X, type MintData as Y, BankConfig as Z, EmodeSettings as _, type BankConfigOptRaw as a, type RatePointRaw as a0, type InterestRateConfigCompactRaw as a1, type InterestRateConfigOptRaw as a2, type OracleConfigOptRaw as a3, type EmodeConfigRaw as a4, type RatePoint as a5, type InterestRateConfigOpt as a6, type EmodeEntry as a7, type OracleConfigOpt as a8, type EmodeImpact as a9, isWeightedPrice as aa, type GetAssetWeightParams as ab, getAssetWeight as ac, getLiabilityWeight as ad, computeMaxLeverage as ae, computeLoopingParams as af, type ComputeUsdValueParams as ag, computeUsdValue as ah, type ComputeLiabilityUsdValueParams as ai, computeLiabilityUsdValue as aj, type ComputeAssetUsdValueParams as ak, computeAssetUsdValue as al, computeTvl as am, type PriceWithConfidenceDto as an, MARGINFI_IDL as ao, type Program as ap, type Wallet as aq, type BankMetadata as ar, type BankAddress as as, AccountType as at, type KaminoStates as au, type BankMap as av, type OraclePriceMap as aw, type MintDataMap as ax, type AmountType as ay, resolveAmount as az, BankConfigFlag as b, OracleSetup as c, EmodeEntryFlags as d, EmodeFlags as e, type OperationalStateRaw as f, type OracleSetupRaw as g, type RiskTierRaw as h, type BankConfigOpt as i, type InterestRateConfig as j, type BankConfigType as k, type BankConfigRaw as l, type BankType as m, type EmodeSettingsType as n, type BankRaw as o, type EmodeSettingsRaw as p, type MarginfiIdlType as q, type OraclePrice as r, PriceBias as s, type OraclePriceDto as t, HealthCacheStatus as u, AccountFlags as v, type MarginfiAccountType as w, type Amount as x, type BankIntegrationMetadataMap as y, type BalanceType as z };
15392
+ export { type BankMetadataRaw as $, AssetTag as A, type BankConfigCompactRaw as B, type HealthCacheType as C, type EmodePair as D, EmodeTag as E, type ActiveEmodePair as F, type ActionEmodeImpact as G, HealthCacheFlags as H, type InterestRateConfigRaw as I, MarginRequirementType as J, EmodeImpactStatus as K, BankVaultType as L, type MarginfiProgram as M, type BankIntegrationMetadataMapDto as N, OperationalState as O, type PriceWithConfidence as P, type BankIntegrationMetadataDto as Q, RiskTier as R, type BankIntegrationMetadata as S, type TypedAmount as T, Bank as U, type Environment as V, type WrappedI80F48 as W, type Project0Config as X, type MintData as Y, BankConfig as Z, EmodeSettings as _, type BankConfigOptRaw as a, type RatePointRaw as a0, type InterestRateConfigCompactRaw as a1, type InterestRateConfigOptRaw as a2, type OracleConfigOptRaw as a3, type EmodeConfigRaw as a4, type RatePoint as a5, type InterestRateConfigOpt as a6, type EmodeEntry as a7, type OracleConfigOpt as a8, type EmodeImpact as a9, isWeightedPrice as aa, type GetAssetWeightParams as ab, getAssetWeight as ac, getLiabilityWeight as ad, computeMaxLeverage as ae, computeLoopingParams as af, type ComputeUsdValueParams as ag, computeUsdValue as ah, type ComputeLiabilityUsdValueParams as ai, computeLiabilityUsdValue as aj, type ComputeAssetUsdValueParams as ak, computeAssetUsdValue as al, computeTvl as am, type PriceWithConfidenceDto as an, MARGINFI_IDL as ao, type Program as ap, type Wallet as aq, type BankMetadata as ar, type BankAddress as as, AccountType as at, type KaminoStates as au, type BankMap as av, type OraclePriceMap as aw, type MintDataMap as ax, type AmountType as ay, resolveAmount as az, type BankType as b, BankConfigFlag as c, OracleSetup as d, EmodeEntryFlags as e, EmodeFlags as f, type OperationalStateRaw as g, type OracleSetupRaw as h, type RiskTierRaw as i, type BankConfigOpt as j, type InterestRateConfig as k, type BankConfigType as l, type BankConfigRaw as m, type EmodeSettingsType as n, type BankRaw as o, type EmodeSettingsRaw as p, type MarginfiIdlType as q, type OraclePrice as r, PriceBias as s, type OraclePriceDto as t, HealthCacheStatus as u, AccountFlags as v, type MarginfiAccountType as w, type Amount as x, type BankIntegrationMetadataMap as y, type BalanceType as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0dotxyz/p0-ts-sdk",
3
- "version": "2.3.0-alpha.5",
3
+ "version": "2.3.0-alpha.6",
4
4
  "packageManager": "pnpm@10.32.1",
5
5
  "description": "TypeScript SDK for P0 Protocol - A Solana DeFi lending protocol",
6
6
  "type": "module",