@huma-finance/widgets 0.0.62-beta.597 → 0.0.62-beta.611
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/API.md +185 -0
- package/dist/cjs/index.cjs +1490 -268
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.d.ts +117 -2
- package/dist/index.js +1489 -271
- package/dist/index.js.map +1 -1
- package/package.json +11 -6
- package/src/components/CreditLine/solanaBorrow/1-ChooseAmount.tsx +86 -0
- package/src/components/CreditLine/solanaBorrow/2-ApproveAllowance.tsx +87 -0
- package/src/components/CreditLine/solanaBorrow/index.tsx +96 -0
- package/src/components/InputAmountModal.tsx +12 -2
- package/src/components/Lend/solanaAddRedemption/1-ChooseTranche.tsx +114 -0
- package/src/components/Lend/solanaAddRedemption/2-ChooseAmount.tsx +183 -0
- package/src/components/Lend/solanaAddRedemption/3-Transfer.tsx +102 -0
- package/src/components/Lend/solanaAddRedemption/4-Done.tsx +29 -0
- package/src/components/Lend/solanaAddRedemption/index.tsx +140 -0
- package/src/components/Lend/solanaCancelRedemption/1-ChooseTranche.tsx +114 -0
- package/src/components/Lend/solanaCancelRedemption/2-Transfer.tsx +99 -0
- package/src/components/Lend/solanaCancelRedemption/3-Done.tsx +55 -0
- package/src/components/Lend/solanaCancelRedemption/index.tsx +152 -0
- package/src/components/Lend/solanaSupply/1-ChooseTranche.tsx +116 -0
- package/src/components/Lend/solanaSupply/2-Evaluation.tsx +0 -0
- package/src/components/Lend/solanaSupply/3-ChooseAmount.tsx +130 -0
- package/src/components/Lend/solanaSupply/4-Transfer.tsx +89 -0
- package/src/components/Lend/solanaSupply/5-Success.tsx +50 -0
- package/src/components/Lend/solanaSupply/index.tsx +143 -0
- package/src/components/SolanaTxDoneModal.tsx +115 -0
- package/src/components/SolanaTxSendModal.tsx +61 -0
- package/src/components/SolanaViewOnExplorer.tsx +29 -0
- package/src/components/WidgetWrapper.tsx +6 -4
- package/src/index.tsx +124 -0
- package/src/store/widgets.reducers.ts +5 -0
- package/src/store/widgets.store.ts +1 -0
package/API.md
CHANGED
|
@@ -38,6 +38,14 @@ 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>
|
|
41
49
|
</dl>
|
|
42
50
|
|
|
43
51
|
## Typedefs
|
|
@@ -55,6 +63,8 @@ To be used when re-enabling autopay and other pool actions that require allowanc
|
|
|
55
63
|
<dd><p>Credit line pool payment props</p></dd>
|
|
56
64
|
<dt><a href="#CreditLinePaymentPropsV2">CreditLinePaymentPropsV2</a> : <code>Object</code></dt>
|
|
57
65
|
<dd><p>Credit line pool payment props V2</p></dd>
|
|
66
|
+
<dt><a href="#SolanaBorrowProps">SolanaBorrowProps</a> : <code>Object</code></dt>
|
|
67
|
+
<dd><p>Lend pool supply props</p></dd>
|
|
58
68
|
<dt><a href="#SupplyFirstLossCoverProps">SupplyFirstLossCoverProps</a> : <code>Object</code></dt>
|
|
59
69
|
<dd><p>Supply first loss cover props</p></dd>
|
|
60
70
|
<dt><a href="#InvoiceFactoringBorrowProps">InvoiceFactoringBorrowProps</a> : <code>Object</code></dt>
|
|
@@ -65,6 +75,12 @@ To be used when re-enabling autopay and other pool actions that require allowanc
|
|
|
65
75
|
<dd><p>Lend pool add redemption props</p></dd>
|
|
66
76
|
<dt><a href="#CancelRedemptionPropsV2">CancelRedemptionPropsV2</a> : <code>Object</code></dt>
|
|
67
77
|
<dd><p>Lend pool cancel redemption request props</p></dd>
|
|
78
|
+
<dt><a href="#SolanaLendAddRedemptionProps">SolanaLendAddRedemptionProps</a> : <code>Object</code></dt>
|
|
79
|
+
<dd><p>Lend pool supply props</p></dd>
|
|
80
|
+
<dt><a href="#SolanaLendCancelRedemptionProps">SolanaLendCancelRedemptionProps</a> : <code>Object</code></dt>
|
|
81
|
+
<dd><p>Lend pool supply props</p></dd>
|
|
82
|
+
<dt><a href="#SolanaLendSupplyProps">SolanaLendSupplyProps</a> : <code>Object</code></dt>
|
|
83
|
+
<dd><p>Lend pool supply props</p></dd>
|
|
68
84
|
<dt><a href="#LendSupplyProps">LendSupplyProps</a> : <code>Object</code></dt>
|
|
69
85
|
<dd><p>Lend pool supply props</p></dd>
|
|
70
86
|
<dt><a href="#LendSupplyPropsV2">LendSupplyPropsV2</a> : <code>Object</code></dt>
|
|
@@ -115,6 +131,16 @@ To be used when re-enabling autopay and other pool actions that require allowanc
|
|
|
115
131
|
<dd><p>Receivable backed credit line pool borrow widget props V2</p></dd>
|
|
116
132
|
<dt><a href="#ReceivableBackedCreditLinePaymentWidgetPropsV2">ReceivableBackedCreditLinePaymentWidgetPropsV2</a> : <code>Object</code></dt>
|
|
117
133
|
<dd><p>Receivable backed credit line pool payment widget props V2</p></dd>
|
|
134
|
+
<dt><a href="#SolanaWidgetProps">SolanaWidgetProps</a> : <code>Object</code></dt>
|
|
135
|
+
<dd><p>Object representing the props passed to Solana widgets</p></dd>
|
|
136
|
+
<dt><a href="#SolanaLendSupplyWidgetProps">SolanaLendSupplyWidgetProps</a> : <code>Object</code></dt>
|
|
137
|
+
<dd><p>Lend pool supply widget props for Solana pools</p></dd>
|
|
138
|
+
<dt><a href="#SolanaLendAddRedemptionWidgetProps">SolanaLendAddRedemptionWidgetProps</a> : <code>Object</code></dt>
|
|
139
|
+
<dd><p>Lend pool supply widget props for Solana pools</p></dd>
|
|
140
|
+
<dt><a href="#SolanaLendCancelRedemptionWidgetProps">SolanaLendCancelRedemptionWidgetProps</a> : <code>Object</code></dt>
|
|
141
|
+
<dd><p>Lend pool supply widget props for Solana pools</p></dd>
|
|
142
|
+
<dt><a href="#SolanaBorrowWidgetProps">SolanaBorrowWidgetProps</a> : <code>Object</code></dt>
|
|
143
|
+
<dd><p>Lend pool supply widget props for Solana pools</p></dd>
|
|
118
144
|
</dl>
|
|
119
145
|
|
|
120
146
|
<a name="InvoiceFactoringBorrowWidget"></a>
|
|
@@ -334,6 +360,50 @@ To be used when re-enabling autopay and other pool actions that require allowanc
|
|
|
334
360
|
| --- | --- | --- |
|
|
335
361
|
| props | [<code>ReceivableBackedCreditLinePaymentWidgetPropsV2</code>](#ReceivableBackedCreditLinePaymentWidgetPropsV2) | <p>The receivable backed credit line pool payment widget props V2.</p> |
|
|
336
362
|
|
|
363
|
+
<a name="SolanaLendSupplyWidget"></a>
|
|
364
|
+
|
|
365
|
+
## SolanaLendSupplyWidget(props)
|
|
366
|
+
<p>Lend pool supply widget for Solana pools</p>
|
|
367
|
+
|
|
368
|
+
**Kind**: global function
|
|
369
|
+
|
|
370
|
+
| Param | Type | Description |
|
|
371
|
+
| --- | --- | --- |
|
|
372
|
+
| props | [<code>SolanaLendSupplyWidgetProps</code>](#SolanaLendSupplyWidgetProps) | <p>Widget props</p> |
|
|
373
|
+
|
|
374
|
+
<a name="SolanaLendAddRedemptionWidget"></a>
|
|
375
|
+
|
|
376
|
+
## SolanaLendAddRedemptionWidget(props)
|
|
377
|
+
<p>Lend pool supply widget for Solana pools</p>
|
|
378
|
+
|
|
379
|
+
**Kind**: global function
|
|
380
|
+
|
|
381
|
+
| Param | Type | Description |
|
|
382
|
+
| --- | --- | --- |
|
|
383
|
+
| props | [<code>SolanaLendAddRedemptionWidgetProps</code>](#SolanaLendAddRedemptionWidgetProps) | <p>Widget props</p> |
|
|
384
|
+
|
|
385
|
+
<a name="SolanaLendCancelRedemptionWidget"></a>
|
|
386
|
+
|
|
387
|
+
## SolanaLendCancelRedemptionWidget(props)
|
|
388
|
+
<p>Lend pool supply widget for Solana pools</p>
|
|
389
|
+
|
|
390
|
+
**Kind**: global function
|
|
391
|
+
|
|
392
|
+
| Param | Type | Description |
|
|
393
|
+
| --- | --- | --- |
|
|
394
|
+
| props | [<code>SolanaLendCancelRedemptionWidgetProps</code>](#SolanaLendCancelRedemptionWidgetProps) | <p>Widget props</p> |
|
|
395
|
+
|
|
396
|
+
<a name="SolanaBorrowWidget"></a>
|
|
397
|
+
|
|
398
|
+
## SolanaBorrowWidget(props)
|
|
399
|
+
<p>Lend pool supply widget for Solana pools</p>
|
|
400
|
+
|
|
401
|
+
**Kind**: global function
|
|
402
|
+
|
|
403
|
+
| Param | Type | Description |
|
|
404
|
+
| --- | --- | --- |
|
|
405
|
+
| props | [<code>SolanaBorrowWidgetProps</code>](#SolanaBorrowWidgetProps) | <p>Widget props</p> |
|
|
406
|
+
|
|
337
407
|
<a name="CreditLineApproveProps"></a>
|
|
338
408
|
|
|
339
409
|
## CreditLineApproveProps : <code>Object</code>
|
|
@@ -423,6 +493,20 @@ To be used when re-enabling autopay and other pool actions that require allowanc
|
|
|
423
493
|
| handleClose | <code>function</code> | <p>Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
|
|
424
494
|
| handleSuccess | <code>function</code> | <p>Optional function to notify that the credit line pool payment action is successful.</p> |
|
|
425
495
|
|
|
496
|
+
<a name="SolanaBorrowProps"></a>
|
|
497
|
+
|
|
498
|
+
## SolanaBorrowProps : <code>Object</code>
|
|
499
|
+
<p>Lend pool supply props</p>
|
|
500
|
+
|
|
501
|
+
**Kind**: global typedef
|
|
502
|
+
**Properties**
|
|
503
|
+
|
|
504
|
+
| Name | Type | Description |
|
|
505
|
+
| --- | --- | --- |
|
|
506
|
+
| poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
|
|
507
|
+
| 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> |
|
|
508
|
+
| handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
|
|
509
|
+
|
|
426
510
|
<a name="SupplyFirstLossCoverProps"></a>
|
|
427
511
|
|
|
428
512
|
## SupplyFirstLossCoverProps : <code>Object</code>
|
|
@@ -498,6 +582,49 @@ To be used when re-enabling autopay and other pool actions that require allowanc
|
|
|
498
582
|
| handleClose | <code>function</code> | <p>Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
|
|
499
583
|
| handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool withdraw action is successful.</p> |
|
|
500
584
|
|
|
585
|
+
<a name="SolanaLendAddRedemptionProps"></a>
|
|
586
|
+
|
|
587
|
+
## SolanaLendAddRedemptionProps : <code>Object</code>
|
|
588
|
+
<p>Lend pool supply props</p>
|
|
589
|
+
|
|
590
|
+
**Kind**: global typedef
|
|
591
|
+
**Properties**
|
|
592
|
+
|
|
593
|
+
| Name | Type | Description |
|
|
594
|
+
| --- | --- | --- |
|
|
595
|
+
| poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
|
|
596
|
+
| 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> |
|
|
597
|
+
| handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
|
|
598
|
+
|
|
599
|
+
<a name="SolanaLendCancelRedemptionProps"></a>
|
|
600
|
+
|
|
601
|
+
## SolanaLendCancelRedemptionProps : <code>Object</code>
|
|
602
|
+
<p>Lend pool supply props</p>
|
|
603
|
+
|
|
604
|
+
**Kind**: global typedef
|
|
605
|
+
**Properties**
|
|
606
|
+
|
|
607
|
+
| Name | Type | Description |
|
|
608
|
+
| --- | --- | --- |
|
|
609
|
+
| poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
|
|
610
|
+
| 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> |
|
|
611
|
+
| handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
|
|
612
|
+
|
|
613
|
+
<a name="SolanaLendSupplyProps"></a>
|
|
614
|
+
|
|
615
|
+
## SolanaLendSupplyProps : <code>Object</code>
|
|
616
|
+
<p>Lend pool supply props</p>
|
|
617
|
+
|
|
618
|
+
**Kind**: global typedef
|
|
619
|
+
**Properties**
|
|
620
|
+
|
|
621
|
+
| Name | Type | Description |
|
|
622
|
+
| --- | --- | --- |
|
|
623
|
+
| poolInfo | <code>SolanaPoolInfo</code> | <p>The metadata of the pool.</p> |
|
|
624
|
+
| poolState | <code>SolanaPoolState</code> | <p>The current state config of the pool.</p> |
|
|
625
|
+
| handleClose | <code>function</code> | <p>Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
|
|
626
|
+
| handleSuccess | <code>function</code> | <p>Optional function to notify that the lending pool supply action is successful.</p> |
|
|
627
|
+
|
|
501
628
|
<a name="LendSupplyProps"></a>
|
|
502
629
|
|
|
503
630
|
## LendSupplyProps : <code>Object</code>
|
|
@@ -836,3 +963,61 @@ To be used when re-enabling autopay and other pool actions that require allowanc
|
|
|
836
963
|
| ReceivableBackedCreditLinePaymentPropsV2 | <code>ReceivableBackedCreditLinePaymentPropsV2</code> | <p>Receivable backed credit line pool payment props V2.</p> |
|
|
837
964
|
| WidgetProps | [<code>WidgetProps</code>](#WidgetProps) | <p>Widget general props.</p> |
|
|
838
965
|
|
|
966
|
+
<a name="SolanaWidgetProps"></a>
|
|
967
|
+
|
|
968
|
+
## SolanaWidgetProps : <code>Object</code>
|
|
969
|
+
<p>Object representing the props passed to Solana widgets</p>
|
|
970
|
+
|
|
971
|
+
**Kind**: global typedef
|
|
972
|
+
<a name="SolanaLendSupplyWidgetProps"></a>
|
|
973
|
+
|
|
974
|
+
## SolanaLendSupplyWidgetProps : <code>Object</code>
|
|
975
|
+
<p>Lend pool supply widget props for Solana pools</p>
|
|
976
|
+
|
|
977
|
+
**Kind**: global typedef
|
|
978
|
+
**Properties**
|
|
979
|
+
|
|
980
|
+
| Name | Type | Description |
|
|
981
|
+
| --- | --- | --- |
|
|
982
|
+
| SolanaLendSupplyProps | [<code>SolanaLendSupplyProps</code>](#SolanaLendSupplyProps) | <p>Specific widget props</p> |
|
|
983
|
+
| SolanaWidgetProps | [<code>SolanaWidgetProps</code>](#SolanaWidgetProps) | <p>Widget general props.</p> |
|
|
984
|
+
|
|
985
|
+
<a name="SolanaLendAddRedemptionWidgetProps"></a>
|
|
986
|
+
|
|
987
|
+
## SolanaLendAddRedemptionWidgetProps : <code>Object</code>
|
|
988
|
+
<p>Lend pool supply widget props for Solana pools</p>
|
|
989
|
+
|
|
990
|
+
**Kind**: global typedef
|
|
991
|
+
**Properties**
|
|
992
|
+
|
|
993
|
+
| Name | Type | Description |
|
|
994
|
+
| --- | --- | --- |
|
|
995
|
+
| SolanaLendSupplyProps | [<code>SolanaLendSupplyProps</code>](#SolanaLendSupplyProps) | <p>Specific widget props</p> |
|
|
996
|
+
| SolanaWidgetProps | [<code>SolanaWidgetProps</code>](#SolanaWidgetProps) | <p>Widget general props.</p> |
|
|
997
|
+
|
|
998
|
+
<a name="SolanaLendCancelRedemptionWidgetProps"></a>
|
|
999
|
+
|
|
1000
|
+
## SolanaLendCancelRedemptionWidgetProps : <code>Object</code>
|
|
1001
|
+
<p>Lend pool supply widget props for Solana pools</p>
|
|
1002
|
+
|
|
1003
|
+
**Kind**: global typedef
|
|
1004
|
+
**Properties**
|
|
1005
|
+
|
|
1006
|
+
| Name | Type | Description |
|
|
1007
|
+
| --- | --- | --- |
|
|
1008
|
+
| SolanaLendSupplyProps | [<code>SolanaLendSupplyProps</code>](#SolanaLendSupplyProps) | <p>Specific widget props</p> |
|
|
1009
|
+
| SolanaWidgetProps | [<code>SolanaWidgetProps</code>](#SolanaWidgetProps) | <p>Widget general props.</p> |
|
|
1010
|
+
|
|
1011
|
+
<a name="SolanaBorrowWidgetProps"></a>
|
|
1012
|
+
|
|
1013
|
+
## SolanaBorrowWidgetProps : <code>Object</code>
|
|
1014
|
+
<p>Lend pool supply widget props for Solana pools</p>
|
|
1015
|
+
|
|
1016
|
+
**Kind**: global typedef
|
|
1017
|
+
**Properties**
|
|
1018
|
+
|
|
1019
|
+
| Name | Type | Description |
|
|
1020
|
+
| --- | --- | --- |
|
|
1021
|
+
| SolanaLendSupplyProps | [<code>SolanaLendSupplyProps</code>](#SolanaLendSupplyProps) | <p>Specific widget props</p> |
|
|
1022
|
+
| SolanaWidgetProps | [<code>SolanaWidgetProps</code>](#SolanaWidgetProps) | <p>Widget general props.</p> |
|
|
1023
|
+
|