@fluent.xyz/connect 0.4.1 → 0.4.2
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/fluent-connect.css +1 -1
- package/dist/index.d.ts +59 -2
- package/dist/index.js +759 -195
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -2335,6 +2335,8 @@ type FluentTokenTransferOutcome = {
|
|
|
2335
2335
|
*/
|
|
2336
2336
|
type FluentPendingTransfer = {
|
|
2337
2337
|
id: string;
|
|
2338
|
+
/** `fluentTokenIdentity` of the token, so the row it fills in prices and filters like any other. */
|
|
2339
|
+
tokenIdentity: string;
|
|
2338
2340
|
symbol: string;
|
|
2339
2341
|
/** Decimal, unsigned: a pending transfer is always outgoing. */
|
|
2340
2342
|
amount: string;
|
|
@@ -2348,6 +2350,12 @@ type FluentPendingTransfer = {
|
|
|
2348
2350
|
* from the list for as long as the next refetch takes.
|
|
2349
2351
|
*/
|
|
2350
2352
|
hash?: Hash;
|
|
2353
|
+
/**
|
|
2354
|
+
* The stand-in row has given up waiting for the history to list this hash.
|
|
2355
|
+
* The details stay: the history may yet list the operation before the
|
|
2356
|
+
* transfer it carried, and they are what fills that row in.
|
|
2357
|
+
*/
|
|
2358
|
+
expired?: boolean;
|
|
2351
2359
|
};
|
|
2352
2360
|
/** What the wallet menu hands a form to actually move the money. */
|
|
2353
2361
|
type FluentTokenTransferSender = (request: FluentTokenTransferRequest) => Promise<FluentTokenTransferOutcome>;
|
|
@@ -2748,6 +2756,12 @@ interface FluentAccountDrawerProps {
|
|
|
2748
2756
|
*/
|
|
2749
2757
|
subPageTitle?: string | null;
|
|
2750
2758
|
onCloseSubPage?: () => void;
|
|
2759
|
+
/**
|
|
2760
|
+
* How the sub-page is left: `back` is a chevron on the left that walks up the
|
|
2761
|
+
* stack; `close` is an X on the right, for a page that stands alone, such as
|
|
2762
|
+
* a review the user is answering.
|
|
2763
|
+
*/
|
|
2764
|
+
subPageDismiss?: "back" | "close";
|
|
2751
2765
|
/** @deprecated Pass `subPageTitle="Settings"` and `onCloseSubPage` instead. */
|
|
2752
2766
|
settingsOpen?: boolean;
|
|
2753
2767
|
/** @deprecated Renamed to `onCloseSubPage`. */
|
|
@@ -2766,7 +2780,7 @@ interface FluentAccountDrawerProps {
|
|
|
2766
2780
|
* disconnect), and a slot (`children`) for the wallet menu card. Rendered
|
|
2767
2781
|
* whenever the widget has a connected account.
|
|
2768
2782
|
*/
|
|
2769
|
-
declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, subPageTitle, onCloseSubPage, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, defaultLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
|
|
2783
|
+
declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, subPageTitle, onCloseSubPage, subPageDismiss, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, defaultLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
|
|
2770
2784
|
|
|
2771
2785
|
/** Colour scheme and design tokens for the widget's own UI — never around host content. */
|
|
2772
2786
|
declare const WIDGET_STYLE_SCOPE = "fluent-root dark contents text-foreground";
|
|
@@ -2804,6 +2818,31 @@ type FluentAnalyticsTrack = {
|
|
|
2804
2818
|
live?: boolean;
|
|
2805
2819
|
};
|
|
2806
2820
|
|
|
2821
|
+
type FluentUsdnrMintOutcome = {
|
|
2822
|
+
status: "minted";
|
|
2823
|
+
hash: Hash;
|
|
2824
|
+
}
|
|
2825
|
+
/** The person dismissed the review. Not a failure, and nothing to report. */
|
|
2826
|
+
| {
|
|
2827
|
+
status: "rejected";
|
|
2828
|
+
} | {
|
|
2829
|
+
status: "failed";
|
|
2830
|
+
message: string;
|
|
2831
|
+
}
|
|
2832
|
+
/**
|
|
2833
|
+
* The press built nothing, because a mint was already in flight. Its own
|
|
2834
|
+
* status rather than a silent `undefined`: a caller counting operations — the
|
|
2835
|
+
* double-press this guards against — needs to see that one was refused.
|
|
2836
|
+
*/
|
|
2837
|
+
| {
|
|
2838
|
+
status: "skipped";
|
|
2839
|
+
};
|
|
2840
|
+
/**
|
|
2841
|
+
* What the wallet menu's Get USDnr button runs on testnet. The widget hands one
|
|
2842
|
+
* in; the card holds no execution of its own.
|
|
2843
|
+
*/
|
|
2844
|
+
type FluentUsdnrMinter = (recipient: Address) => Promise<FluentUsdnrMintOutcome>;
|
|
2845
|
+
|
|
2807
2846
|
interface WalletMenuActionCardProps {
|
|
2808
2847
|
track: FluentAnalyticsTrack;
|
|
2809
2848
|
session: FluentWidgetSession | null;
|
|
@@ -2868,6 +2907,24 @@ interface WalletMenuActionCardProps {
|
|
|
2868
2907
|
onSendToken?: FluentTokenTransferSender;
|
|
2869
2908
|
/** Transfers sent from here that have not settled yet, listed in Activity. */
|
|
2870
2909
|
pendingTransfers?: readonly FluentPendingTransfer[];
|
|
2910
|
+
/**
|
|
2911
|
+
* Mints testnet USDnr into this account. On a faucet network Get USDnr runs
|
|
2912
|
+
* this instead of opening the Swapper Finance on-ramp, which has nothing to
|
|
2913
|
+
* sell on a testnet, and the USDnr contract there mints to whoever asks.
|
|
2914
|
+
*
|
|
2915
|
+
* Absent where nothing can execute — the preview harnesses render this card
|
|
2916
|
+
* outside the widget — and Get USDnr then opens the on-ramp on both networks,
|
|
2917
|
+
* under the on-ramp's own rule.
|
|
2918
|
+
*/
|
|
2919
|
+
onMintUsdnr?: FluentUsdnrMinter;
|
|
2920
|
+
/**
|
|
2921
|
+
* True while a mint is in flight, and the one thing that disables Get USDnr
|
|
2922
|
+
* on the mint path. An address that has not arrived yet does not: a press
|
|
2923
|
+
* reports it in the status line, the way Send does, which says more than a
|
|
2924
|
+
* button nothing explains. Held by the widget rather than here, because the
|
|
2925
|
+
* review modal closes the drawer and unmounts this card mid-mint.
|
|
2926
|
+
*/
|
|
2927
|
+
mintUsdnrBusy?: boolean;
|
|
2871
2928
|
/**
|
|
2872
2929
|
* Brings the account drawer back up. A transaction review closes it on its
|
|
2873
2930
|
* way in, so without this a transfer that settles has nowhere to report
|
|
@@ -2887,7 +2944,7 @@ interface WalletMenuActionCardProps {
|
|
|
2887
2944
|
sponsorshipAvailable: boolean;
|
|
2888
2945
|
};
|
|
2889
2946
|
}
|
|
2890
|
-
declare function WalletMenuActionCard({ track, session, smartAccountAddress, faucetBusy, onFaucet, config, tokens, gasPaymentToken, onGasPaymentTokenChange, silentSigningEnabled, onSilentSigningChange, onDisconnect, onConnectWithX, tab, onTabChange, panel, onPanelChange, connectedAddress, accountKind, externalWalletAddress, balanceRevisionCounter, userTokenStore, settingsPending, settingsError, tokenListError, onSendToken, pendingTransfers, onRevealAccount, gasContext, }: WalletMenuActionCardProps): React.JSX.Element | null;
|
|
2947
|
+
declare function WalletMenuActionCard({ track, session, smartAccountAddress, faucetBusy, onFaucet, config, tokens, gasPaymentToken, onGasPaymentTokenChange, silentSigningEnabled, onSilentSigningChange, onDisconnect, onConnectWithX, tab, onTabChange, panel, onPanelChange, connectedAddress, accountKind, externalWalletAddress, balanceRevisionCounter, userTokenStore, settingsPending, settingsError, tokenListError, onSendToken, pendingTransfers, onMintUsdnr, mintUsdnrBusy, onRevealAccount, gasContext, }: WalletMenuActionCardProps): React.JSX.Element | null;
|
|
2891
2948
|
|
|
2892
2949
|
declare const buttonVariants: (props?: ({
|
|
2893
2950
|
variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|