@huma-finance/widgets 0.0.62-beta.719 → 0.0.62-beta.721

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.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import { JsonRpcProvider } from '@ethersproject/providers';
3
3
  import { Provider } from '@web3-react/types';
4
- import { POOL_NAME, POOL_TYPE, TrancheType, CloseModalOptions, SolanaPoolInfo } from '@huma-finance/shared';
4
+ import { POOL_NAME, POOL_TYPE, TrancheType, CloseModalOptions, SolanaPoolInfo, StellarPoolInfo } from '@huma-finance/shared';
5
5
  import { BigNumberish, BigNumber } from 'ethers';
6
- import { SolanaPoolState } from '@huma-finance/web-shared';
6
+ import { SolanaPoolState, StellarPoolState } from '@huma-finance/web-shared';
7
7
  import React from 'react';
8
8
 
9
9
  /**
@@ -338,6 +338,21 @@ interface SolanaPaymentProps {
338
338
  handleSuccess?: () => void;
339
339
  }
340
340
 
341
+ /**
342
+ * Lend pool supply props
343
+ * @typedef {Object} StellarLendSupplyProps
344
+ * @property {StellarPoolInfo} poolInfo The metadata of the pool.
345
+ * @property {StellarPoolState} poolState The current state config of the pool.
346
+ * @property {function((CloseModalOptions|undefined)):void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.
347
+ * @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
348
+ */
349
+ interface StellarLendSupplyProps {
350
+ poolInfo: StellarPoolInfo;
351
+ poolState: StellarPoolState;
352
+ handleClose: (options?: CloseModalOptions) => void;
353
+ handleSuccess?: () => void;
354
+ }
355
+
341
356
  /**
342
357
  * Lend pool supply props
343
358
  * @typedef {Object} SolanaEnableAutoRedemptionProps
@@ -628,16 +643,16 @@ type ReceivableBackedCreditLinePaymentWidgetPropsV2 = ReceivableBackedCreditLine
628
643
  declare function ReceivableBackedCreditLinePaymentWidgetV2(props: ReceivableBackedCreditLinePaymentWidgetPropsV2): _emotion_react_jsx_runtime.JSX.Element;
629
644
  /**
630
645
  * Object representing the props passed to Solana widgets
631
- * @typedef {Object} SolanaWidgetProps
646
+ * @typedef {Object} GenericWidgetProps
632
647
  */
633
- type SolanaWidgetProps = {
648
+ type GenericWidgetProps = {
634
649
  handleClose?: () => void;
635
650
  };
636
651
  /**
637
652
  * Lend pool supply widget props for Solana pools
638
653
  * @typedef {Object} SolanaLendSupplyWidgetProps
639
654
  */
640
- type SolanaLendSupplyWidgetProps = SolanaLendSupplyProps & SolanaWidgetProps;
655
+ type SolanaLendSupplyWidgetProps = SolanaLendSupplyProps & GenericWidgetProps;
641
656
  /**
642
657
  * Lend pool supply widget for Solana pools
643
658
  *
@@ -648,7 +663,7 @@ declare function SolanaLendSupplyWidget(props: SolanaLendSupplyWidgetProps): _em
648
663
  * Lend pool supply widget props for Solana pools
649
664
  * @typedef {Object} SolanaLendAddRedemptionWidgetProps
650
665
  */
651
- type SolanaLendAddRedemptionWidgetProps = SolanaLendAddRedemptionProps & SolanaWidgetProps;
666
+ type SolanaLendAddRedemptionWidgetProps = SolanaLendAddRedemptionProps & GenericWidgetProps;
652
667
  /**
653
668
  * Lend pool supply widget for Solana pools
654
669
  *
@@ -659,7 +674,7 @@ declare function SolanaLendAddRedemptionWidget(props: SolanaLendAddRedemptionWid
659
674
  * Lend pool supply widget props for Solana pools
660
675
  * @typedef {Object} SolanaLendCancelRedemptionWidgetProps
661
676
  */
662
- type SolanaLendCancelRedemptionWidgetProps = SolanaLendCancelRedemptionProps & SolanaWidgetProps;
677
+ type SolanaLendCancelRedemptionWidgetProps = SolanaLendCancelRedemptionProps & GenericWidgetProps;
663
678
  /**
664
679
  * Lend pool supply widget for Solana pools
665
680
  *
@@ -670,7 +685,7 @@ declare function SolanaLendCancelRedemptionWidget(props: SolanaLendCancelRedempt
670
685
  * Lend pool supply widget props for Solana pools
671
686
  * @typedef {Object} SolanaBorrowWidgetProps
672
687
  */
673
- type SolanaBorrowWidgetProps = SolanaBorrowProps & SolanaWidgetProps;
688
+ type SolanaBorrowWidgetProps = SolanaBorrowProps & GenericWidgetProps;
674
689
  /**
675
690
  * Lend pool supply widget for Solana pools
676
691
  *
@@ -681,18 +696,29 @@ declare function SolanaBorrowWidget(props: SolanaBorrowWidgetProps): _emotion_re
681
696
  * Lend pool supply widget props for Solana pools
682
697
  * @typedef {Object} SolanaPaymentWidgetProps
683
698
  */
684
- type SolanaPaymentWidgetProps = SolanaPaymentProps & SolanaWidgetProps;
699
+ type SolanaPaymentWidgetProps = SolanaPaymentProps & GenericWidgetProps;
685
700
  /**
686
701
  * Lend pool supply widget for Solana pools
687
702
  *
688
703
  * @param {SolanaPaymentWidgetProps} props - Widget props
689
704
  */
690
705
  declare function SolanaPaymentWidget(props: SolanaPaymentWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
706
+ /**
707
+ * Lend pool supply widget props for Stellar pools
708
+ * @typedef {Object} StellarLendSupplyWidgetProps
709
+ */
710
+ type StellarLendSupplyWidgetProps = StellarLendSupplyProps & GenericWidgetProps;
711
+ /**
712
+ * Lend pool supply widget for Stellar pools
713
+ *
714
+ * @param {StellarLendSupplyWidgetProps} props - Widget props
715
+ */
716
+ declare function StellarLendSupplyWidget(props: StellarLendSupplyWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
691
717
  /**
692
718
  * Lend pool supply widget props for Solana pools
693
719
  * @typedef {Object} SolanaEnableAutoRedemptionWidgetProps
694
720
  */
695
- type SolanaEnableAutoRedemptionWidgetProps = SolanaEnableAutoRedemptionProps & SolanaWidgetProps;
721
+ type SolanaEnableAutoRedemptionWidgetProps = SolanaEnableAutoRedemptionProps & GenericWidgetProps;
696
722
  /**
697
723
  * Lend pool supply widget for Solana pools
698
724
  *
@@ -700,4 +726,4 @@ type SolanaEnableAutoRedemptionWidgetProps = SolanaEnableAutoRedemptionProps & S
700
726
  */
701
727
  declare function SolanaEnableAutoRedemptionWidget(props: SolanaEnableAutoRedemptionWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
702
728
 
703
- export { AddRedemptionWidgetV2, AutoPaybackWidgetV2, CancelRedemptionWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget, LendSupplyWidget, LendSupplyWidgetV2, LendWithdrawWidget, LendWithdrawWidgetV2, NotifiContextWrapper, ReceivableBackedCreditLineBorrowWidgetV2, ReceivableBackedCreditLinePaymentWidgetV2, SolanaBorrowWidget, SolanaEnableAutoRedemptionWidget, SolanaLendAddRedemptionWidget, SolanaLendCancelRedemptionWidget, SolanaLendSupplyWidget, SolanaPaymentWidget, SuperfluidFactoringWidget, SupplyFirstLossCoverWidget };
729
+ export { AddRedemptionWidgetV2, AutoPaybackWidgetV2, CancelRedemptionWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget, LendSupplyWidget, LendSupplyWidgetV2, LendWithdrawWidget, LendWithdrawWidgetV2, NotifiContextWrapper, ReceivableBackedCreditLineBorrowWidgetV2, ReceivableBackedCreditLinePaymentWidgetV2, SolanaBorrowWidget, SolanaEnableAutoRedemptionWidget, SolanaLendAddRedemptionWidget, SolanaLendCancelRedemptionWidget, SolanaLendSupplyWidget, SolanaPaymentWidget, StellarLendSupplyWidget, SuperfluidFactoringWidget, SupplyFirstLossCoverWidget };