@huma-finance/widgets 0.0.62-beta.633 → 0.0.62-beta.634

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.
Files changed (43) hide show
  1. package/API.md +195 -0
  2. package/dist/cjs/index.cjs +1871 -299
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/index.d.ts +138 -2
  5. package/dist/index.js +1869 -302
  6. package/dist/index.js.map +1 -1
  7. package/package.json +18 -8
  8. package/src/components/CreditLine/paymentV2/1-ChooseAmount.tsx +1 -0
  9. package/src/components/CreditLine/solanaBorrow/1-ChooseAmount.tsx +67 -0
  10. package/src/components/CreditLine/solanaBorrow/2-Transfer.tsx +159 -0
  11. package/src/components/CreditLine/solanaBorrow/3-Done.tsx +38 -0
  12. package/src/components/CreditLine/solanaBorrow/index.tsx +93 -0
  13. package/src/components/CreditLine/solanaPayment/1-ChooseAmount.tsx +75 -0
  14. package/src/components/CreditLine/solanaPayment/2-Transfer.tsx +92 -0
  15. package/src/components/CreditLine/solanaPayment/3-Done.tsx +60 -0
  16. package/src/components/CreditLine/solanaPayment/index.tsx +86 -0
  17. package/src/components/InputAmountModal.tsx +13 -2
  18. package/src/components/Lend/{supplyV2/components → components}/PersonaEvaluation.tsx +19 -13
  19. package/src/components/Lend/{supplyV2/components → components}/SecuritizeEvaluation.tsx +7 -8
  20. package/src/components/Lend/solanaAddRedemption/1-ChooseTranche.tsx +114 -0
  21. package/src/components/Lend/solanaAddRedemption/2-ChooseAmount.tsx +183 -0
  22. package/src/components/Lend/solanaAddRedemption/3-Transfer.tsx +102 -0
  23. package/src/components/Lend/solanaAddRedemption/4-Done.tsx +29 -0
  24. package/src/components/Lend/solanaAddRedemption/index.tsx +155 -0
  25. package/src/components/Lend/solanaCancelRedemption/1-ChooseTranche.tsx +114 -0
  26. package/src/components/Lend/solanaCancelRedemption/2-Transfer.tsx +99 -0
  27. package/src/components/Lend/solanaCancelRedemption/3-Done.tsx +55 -0
  28. package/src/components/Lend/solanaCancelRedemption/index.tsx +162 -0
  29. package/src/components/Lend/solanaSupply/1-Evaluation.tsx +43 -0
  30. package/src/components/Lend/solanaSupply/2-ChooseTranche.tsx +116 -0
  31. package/src/components/Lend/solanaSupply/3-ChooseAmount.tsx +131 -0
  32. package/src/components/Lend/solanaSupply/4-Transfer.tsx +137 -0
  33. package/src/components/Lend/solanaSupply/5-Success.tsx +52 -0
  34. package/src/components/Lend/solanaSupply/index.tsx +155 -0
  35. package/src/components/Lend/supplyV2/2-Evaluation.tsx +4 -3
  36. package/src/components/Lend/supplyV2/6-Success.tsx +3 -3
  37. package/src/components/SolanaTxDoneModal.tsx +119 -0
  38. package/src/components/SolanaTxSendModal.tsx +61 -0
  39. package/src/components/SolanaViewOnExplorer.tsx +29 -0
  40. package/src/components/WidgetWrapper.tsx +6 -4
  41. package/src/index.tsx +139 -0
  42. package/src/store/widgets.reducers.ts +5 -0
  43. package/src/store/widgets.store.ts +1 -0
package/API.md CHANGED
@@ -38,6 +38,16 @@ To be used when re-enabling autopay and other pool actions that require allowanc
38
38
  <dd><p>Receivable backed credit line borrow widget V2</p></dd>
39
39
  <dt><a href="#ReceivableBackedCreditLinePaymentWidgetV2">ReceivableBackedCreditLinePaymentWidgetV2(props)</a> ⇒</dt>
40
40
  <dd><p>Receivable backed credit line payment widget V2</p></dd>
41
+ <dt><a href="#SolanaLendSupplyWidget">SolanaLendSupplyWidget(props)</a></dt>
42
+ <dd><p>Lend pool supply widget for Solana pools</p></dd>
43
+ <dt><a href="#SolanaLendAddRedemptionWidget">SolanaLendAddRedemptionWidget(props)</a></dt>
44
+ <dd><p>Lend pool supply widget for Solana pools</p></dd>
45
+ <dt><a href="#SolanaLendCancelRedemptionWidget">SolanaLendCancelRedemptionWidget(props)</a></dt>
46
+ <dd><p>Lend pool supply widget for Solana pools</p></dd>
47
+ <dt><a href="#SolanaBorrowWidget">SolanaBorrowWidget(props)</a></dt>
48
+ <dd><p>Lend pool supply widget for Solana pools</p></dd>
49
+ <dt><a href="#SolanaPaymentWidget">SolanaPaymentWidget(props)</a></dt>
50
+ <dd><p>Lend pool supply widget for Solana pools</p></dd>
41
51
  </dl>
42
52
 
43
53
  ## Typedefs
@@ -55,6 +65,10 @@ To be used when re-enabling autopay and other pool actions that require allowanc
55
65
  <dd><p>Credit line pool payment props</p></dd>
56
66
  <dt><a href="#CreditLinePaymentPropsV2">CreditLinePaymentPropsV2</a> : <code>Object</code></dt>
57
67
  <dd><p>Credit line pool payment props V2</p></dd>
68
+ <dt><a href="#SolanaBorrowProps">SolanaBorrowProps</a> : <code>Object</code></dt>
69
+ <dd><p>Lend pool supply props</p></dd>
70
+ <dt><a href="#SolanaPaymentProps">SolanaPaymentProps</a> : <code>Object</code></dt>
71
+ <dd><p>Lend pool supply props</p></dd>
58
72
  <dt><a href="#SupplyFirstLossCoverProps">SupplyFirstLossCoverProps</a> : <code>Object</code></dt>
59
73
  <dd><p>Supply first loss cover props</p></dd>
60
74
  <dt><a href="#InvoiceFactoringBorrowProps">InvoiceFactoringBorrowProps</a> : <code>Object</code></dt>
@@ -65,6 +79,12 @@ To be used when re-enabling autopay and other pool actions that require allowanc
65
79
  <dd><p>Lend pool add redemption props</p></dd>
66
80
  <dt><a href="#CancelRedemptionPropsV2">CancelRedemptionPropsV2</a> : <code>Object</code></dt>
67
81
  <dd><p>Lend pool cancel redemption request props</p></dd>
82
+ <dt><a href="#SolanaLendAddRedemptionProps">SolanaLendAddRedemptionProps</a> : <code>Object</code></dt>
83
+ <dd><p>Lend pool supply props</p></dd>
84
+ <dt><a href="#SolanaLendCancelRedemptionProps">SolanaLendCancelRedemptionProps</a> : <code>Object</code></dt>
85
+ <dd><p>Lend pool supply props</p></dd>
86
+ <dt><a href="#SolanaLendSupplyProps">SolanaLendSupplyProps</a> : <code>Object</code></dt>
87
+ <dd><p>Lend pool supply props</p></dd>
68
88
  <dt><a href="#LendSupplyProps">LendSupplyProps</a> : <code>Object</code></dt>
69
89
  <dd><p>Lend pool supply props</p></dd>
70
90
  <dt><a href="#LendSupplyPropsV2">LendSupplyPropsV2</a> : <code>Object</code></dt>
@@ -115,6 +135,18 @@ To be used when re-enabling autopay and other pool actions that require allowanc
115
135
  <dd><p>Receivable backed credit line pool borrow widget props V2</p></dd>
116
136
  <dt><a href="#ReceivableBackedCreditLinePaymentWidgetPropsV2">ReceivableBackedCreditLinePaymentWidgetPropsV2</a> : <code>Object</code></dt>
117
137
  <dd><p>Receivable backed credit line pool payment widget props V2</p></dd>
138
+ <dt><a href="#SolanaWidgetProps">SolanaWidgetProps</a> : <code>Object</code></dt>
139
+ <dd><p>Object representing the props passed to Solana widgets</p></dd>
140
+ <dt><a href="#SolanaLendSupplyWidgetProps">SolanaLendSupplyWidgetProps</a> : <code>Object</code></dt>
141
+ <dd><p>Lend pool supply widget props for Solana pools</p></dd>
142
+ <dt><a href="#SolanaLendAddRedemptionWidgetProps">SolanaLendAddRedemptionWidgetProps</a> : <code>Object</code></dt>
143
+ <dd><p>Lend pool supply widget props for Solana pools</p></dd>
144
+ <dt><a href="#SolanaLendCancelRedemptionWidgetProps">SolanaLendCancelRedemptionWidgetProps</a> : <code>Object</code></dt>
145
+ <dd><p>Lend pool supply widget props for Solana pools</p></dd>
146
+ <dt><a href="#SolanaBorrowWidgetProps">SolanaBorrowWidgetProps</a> : <code>Object</code></dt>
147
+ <dd><p>Lend pool supply widget props for Solana pools</p></dd>
148
+ <dt><a href="#SolanaPaymentWidgetProps">SolanaPaymentWidgetProps</a> : <code>Object</code></dt>
149
+ <dd><p>Lend pool supply widget props for Solana pools</p></dd>
118
150
  </dl>
119
151
 
120
152
  <a name="InvoiceFactoringBorrowWidget"></a>
@@ -334,6 +366,61 @@ To be used when re-enabling autopay and other pool actions that require allowanc
334
366
  | --- | --- | --- |
335
367
  | props | [<code>ReceivableBackedCreditLinePaymentWidgetPropsV2</code>](#ReceivableBackedCreditLinePaymentWidgetPropsV2) | <p>The receivable backed credit line pool payment widget props V2.</p> |
336
368
 
369
+ <a name="SolanaLendSupplyWidget"></a>
370
+
371
+ ## SolanaLendSupplyWidget(props)
372
+ <p>Lend pool supply widget for Solana pools</p>
373
+
374
+ **Kind**: global function
375
+
376
+ | Param | Type | Description |
377
+ | --- | --- | --- |
378
+ | props | [<code>SolanaLendSupplyWidgetProps</code>](#SolanaLendSupplyWidgetProps) | <p>Widget props</p> |
379
+
380
+ <a name="SolanaLendAddRedemptionWidget"></a>
381
+
382
+ ## SolanaLendAddRedemptionWidget(props)
383
+ <p>Lend pool supply widget for Solana pools</p>
384
+
385
+ **Kind**: global function
386
+
387
+ | Param | Type | Description |
388
+ | --- | --- | --- |
389
+ | props | [<code>SolanaLendAddRedemptionWidgetProps</code>](#SolanaLendAddRedemptionWidgetProps) | <p>Widget props</p> |
390
+
391
+ <a name="SolanaLendCancelRedemptionWidget"></a>
392
+
393
+ ## SolanaLendCancelRedemptionWidget(props)
394
+ <p>Lend pool supply widget for Solana pools</p>
395
+
396
+ **Kind**: global function
397
+
398
+ | Param | Type | Description |
399
+ | --- | --- | --- |
400
+ | props | [<code>SolanaLendCancelRedemptionWidgetProps</code>](#SolanaLendCancelRedemptionWidgetProps) | <p>Widget props</p> |
401
+
402
+ <a name="SolanaBorrowWidget"></a>
403
+
404
+ ## SolanaBorrowWidget(props)
405
+ <p>Lend pool supply widget for Solana pools</p>
406
+
407
+ **Kind**: global function
408
+
409
+ | Param | Type | Description |
410
+ | --- | --- | --- |
411
+ | props | [<code>SolanaBorrowWidgetProps</code>](#SolanaBorrowWidgetProps) | <p>Widget props</p> |
412
+
413
+ <a name="SolanaPaymentWidget"></a>
414
+
415
+ ## SolanaPaymentWidget(props)
416
+ <p>Lend pool supply widget for Solana pools</p>
417
+
418
+ **Kind**: global function
419
+
420
+ | Param | Type | Description |
421
+ | --- | --- | --- |
422
+ | props | [<code>SolanaPaymentWidgetProps</code>](#SolanaPaymentWidgetProps) | <p>Widget props</p> |
423
+
337
424
  <a name="CreditLineApproveProps"></a>
338
425
 
339
426
  ## CreditLineApproveProps : <code>Object</code>
@@ -423,6 +510,33 @@ To be used when re-enabling autopay and other pool actions that require allowanc
423
510
  | handleClose | <code>function</code> | <p>Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
424
511
  | handleSuccess | <code>function</code> | <p>Optional function to notify that the credit line pool payment action is successful.</p> |
425
512
 
513
+ <a name="SolanaBorrowProps"></a>
514
+
515
+ ## SolanaBorrowProps : <code>Object</code>
516
+ <p>Lend pool supply props</p>
517
+
518
+ **Kind**: global typedef
519
+ **Properties**
520
+
521
+ | Name | Type | Description |
522
+ | --- | --- | --- |
523
+ | poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
524
+ | poolState | <code>SolanaPoolState</code> | <p>The current state config of the pool. * @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
525
+ | handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
526
+
527
+ <a name="SolanaPaymentProps"></a>
528
+
529
+ ## SolanaPaymentProps : <code>Object</code>
530
+ <p>Lend pool supply props</p>
531
+
532
+ **Kind**: global typedef
533
+ **Properties**
534
+
535
+ | Name | Type | Description |
536
+ | --- | --- | --- |
537
+ | poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
538
+ | handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
539
+
426
540
  <a name="SupplyFirstLossCoverProps"></a>
427
541
 
428
542
  ## SupplyFirstLossCoverProps : <code>Object</code>
@@ -498,6 +612,51 @@ To be used when re-enabling autopay and other pool actions that require allowanc
498
612
  | handleClose | <code>function</code> | <p>Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
499
613
  | handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool withdraw action is successful.</p> |
500
614
 
615
+ <a name="SolanaLendAddRedemptionProps"></a>
616
+
617
+ ## SolanaLendAddRedemptionProps : <code>Object</code>
618
+ <p>Lend pool supply props</p>
619
+
620
+ **Kind**: global typedef
621
+ **Properties**
622
+
623
+ | Name | Type | Description |
624
+ | --- | --- | --- |
625
+ | poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
626
+ | poolState | <code>SolanaPoolState</code> | <p>The current state config of the pool. * @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
627
+ | tranche | <code>POOL\_NTrancheTypeAME</code> | <p>The tranche type.</p> |
628
+ | handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
629
+
630
+ <a name="SolanaLendCancelRedemptionProps"></a>
631
+
632
+ ## SolanaLendCancelRedemptionProps : <code>Object</code>
633
+ <p>Lend pool supply props</p>
634
+
635
+ **Kind**: global typedef
636
+ **Properties**
637
+
638
+ | Name | Type | Description |
639
+ | --- | --- | --- |
640
+ | poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
641
+ | poolState | <code>SolanaPoolState</code> | <p>The current state config of the pool. * @property {function():void} handleClose Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
642
+ | handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
643
+
644
+ <a name="SolanaLendSupplyProps"></a>
645
+
646
+ ## SolanaLendSupplyProps : <code>Object</code>
647
+ <p>Lend pool supply props</p>
648
+
649
+ **Kind**: global typedef
650
+ **Properties**
651
+
652
+ | Name | Type | Description |
653
+ | --- | --- | --- |
654
+ | poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
655
+ | poolState | <code>SolanaPoolState</code> | <p>The current state config of the pool.</p> |
656
+ | pointsTestnetExperience | <code>boolean</code> | <p>If the user is in the testnet experience.</p> |
657
+ | handleClose | <code>function</code> | <p>Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
658
+ | handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
659
+
501
660
  <a name="LendSupplyProps"></a>
502
661
 
503
662
  ## LendSupplyProps : <code>Object</code>
@@ -836,3 +995,39 @@ To be used when re-enabling autopay and other pool actions that require allowanc
836
995
  | ReceivableBackedCreditLinePaymentPropsV2 | <code>ReceivableBackedCreditLinePaymentPropsV2</code> | <p>Receivable backed credit line pool payment props V2.</p> |
837
996
  | WidgetProps | [<code>WidgetProps</code>](#WidgetProps) | <p>Widget general props.</p> |
838
997
 
998
+ <a name="SolanaWidgetProps"></a>
999
+
1000
+ ## SolanaWidgetProps : <code>Object</code>
1001
+ <p>Object representing the props passed to Solana widgets</p>
1002
+
1003
+ **Kind**: global typedef
1004
+ <a name="SolanaLendSupplyWidgetProps"></a>
1005
+
1006
+ ## SolanaLendSupplyWidgetProps : <code>Object</code>
1007
+ <p>Lend pool supply widget props for Solana pools</p>
1008
+
1009
+ **Kind**: global typedef
1010
+ <a name="SolanaLendAddRedemptionWidgetProps"></a>
1011
+
1012
+ ## SolanaLendAddRedemptionWidgetProps : <code>Object</code>
1013
+ <p>Lend pool supply widget props for Solana pools</p>
1014
+
1015
+ **Kind**: global typedef
1016
+ <a name="SolanaLendCancelRedemptionWidgetProps"></a>
1017
+
1018
+ ## SolanaLendCancelRedemptionWidgetProps : <code>Object</code>
1019
+ <p>Lend pool supply widget props for Solana pools</p>
1020
+
1021
+ **Kind**: global typedef
1022
+ <a name="SolanaBorrowWidgetProps"></a>
1023
+
1024
+ ## SolanaBorrowWidgetProps : <code>Object</code>
1025
+ <p>Lend pool supply widget props for Solana pools</p>
1026
+
1027
+ **Kind**: global typedef
1028
+ <a name="SolanaPaymentWidgetProps"></a>
1029
+
1030
+ ## SolanaPaymentWidgetProps : <code>Object</code>
1031
+ <p>Lend pool supply widget props for Solana pools</p>
1032
+
1033
+ **Kind**: global typedef