@xyo-network/react-connected-accounts 3.0.2 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/classes/EnabledWallets.d.ts +30 -0
- package/dist/browser/classes/EnabledWallets.d.ts.map +1 -0
- package/dist/browser/classes/index.d.ts +2 -0
- package/dist/browser/classes/index.d.ts.map +1 -0
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts +8 -0
- package/dist/browser/components/ConnectedAccountsFlexbox.d.ts.map +1 -0
- package/dist/browser/components/index.d.ts +3 -0
- package/dist/browser/components/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +7 -0
- package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts +9 -0
- package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +8 -0
- package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts +6 -0
- package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts +3 -0
- package/dist/browser/components/wallet/dialogs/connect/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/index.d.ts +3 -0
- package/dist/browser/components/wallet/dialogs/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts +8 -0
- package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts +2 -0
- package/dist/browser/components/wallet/dialogs/revoke/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/index.d.ts +3 -0
- package/dist/browser/components/wallet/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/lib/ActiveProvider.d.ts +7 -0
- package/dist/browser/components/wallet/lib/ActiveProvider.d.ts.map +1 -0
- package/dist/browser/components/wallet/lib/TableHeadData.d.ts +3 -0
- package/dist/browser/components/wallet/lib/TableHeadData.d.ts.map +1 -0
- package/dist/browser/components/wallet/lib/index.d.ts +3 -0
- package/dist/browser/components/wallet/lib/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts +10 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts +12 -0
- package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Accounts.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Actions.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Cells.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/ChainName.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/State.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/State.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts +4 -0
- package/dist/browser/components/wallet/table/cells/Wallet.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/index.d.ts +7 -0
- package/dist/browser/components/wallet/table/cells/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts +15 -0
- package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts +2 -0
- package/dist/browser/components/wallet/table/cells/lib/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/index.d.ts +2 -0
- package/dist/browser/components/wallet/table/hooks/index.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +4 -0
- package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts.map +1 -0
- package/dist/browser/components/wallet/table/index.d.ts +5 -0
- package/dist/browser/components/wallet/table/index.d.ts.map +1 -0
- package/dist/browser/hooks/index.d.ts +3 -0
- package/dist/browser/hooks/index.d.ts.map +1 -0
- package/dist/browser/hooks/useDetectWallets.d.ts +6 -0
- package/dist/browser/hooks/useDetectWallets.d.ts.map +1 -0
- package/dist/browser/hooks/useEnabledWallets.d.ts +9 -0
- package/dist/browser/hooks/useEnabledWallets.d.ts.map +1 -0
- package/dist/browser/img/index.d.ts +3 -0
- package/dist/browser/img/index.d.ts.map +1 -0
- package/dist/browser/index.d.ts +4 -119
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +47 -41
- package/src/components/ConnectedAccountsFlexbox.stories.tsx +1 -3
- package/src/components/ConnectedAccountsFlexbox.tsx +3 -1
- package/src/components/wallet/dialogs/connect/CheckboxFormControl.tsx +3 -1
- package/src/components/wallet/dialogs/connect/Dialog.tsx +14 -4
- package/src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx +9 -2
- package/src/components/wallet/dialogs/revoke/Dialog.tsx +3 -1
- package/src/components/wallet/table/ConnectedWalletsTable.tsx +9 -3
- package/src/components/wallet/table/ConnectedWalletsTableRow.tsx +8 -2
- package/src/components/wallet/table/cells/Accounts.tsx +3 -1
- package/src/components/wallet/table/cells/Actions.tsx +6 -2
- package/src/components/wallet/table/cells/State.tsx +6 -2
- package/src/components/wallet/table/cells/Wallet.tsx +3 -1
- package/src/hooks/useDetectWallets.tsx +4 -1
- package/xy.config.ts +1 -3
@@ -0,0 +1,30 @@
|
|
1
|
+
import type { DiscoveredWallets, EIP6963Connector } from '@xylabs/react-crypto';
|
2
|
+
export interface EnabledEthWalletsState {
|
3
|
+
[rdns: string]: {
|
4
|
+
enabled: boolean;
|
5
|
+
wallet: EIP6963Connector;
|
6
|
+
};
|
7
|
+
}
|
8
|
+
export interface EnabledWalletsSavedState {
|
9
|
+
[rdns: string]: boolean;
|
10
|
+
}
|
11
|
+
export type WalletListener = () => void;
|
12
|
+
export declare class EnabledEthWalletConnections {
|
13
|
+
persistPreferences: boolean;
|
14
|
+
private enabledWallets;
|
15
|
+
private ethWalletsState;
|
16
|
+
private listeners;
|
17
|
+
private localStorageKey;
|
18
|
+
constructor(localStorageKey?: string);
|
19
|
+
get wallets(): EnabledEthWalletsState;
|
20
|
+
disableWallet(rdns: string): void;
|
21
|
+
enableWallet(rdns: string): void;
|
22
|
+
resetWallets(wallets: DiscoveredWallets): void;
|
23
|
+
subscribe(listener: WalletListener): () => void;
|
24
|
+
toggleEnabledWallet(rdns: string, enabled: boolean): void;
|
25
|
+
private emitChange;
|
26
|
+
private isPersistance;
|
27
|
+
private persistSettings;
|
28
|
+
private reviveSettings;
|
29
|
+
}
|
30
|
+
//# sourceMappingURL=EnabledWallets.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EnabledWallets.d.ts","sourceRoot":"","sources":["../../../src/classes/EnabledWallets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAO/E,MAAM,WAAW,sBAAsB;IACrC,CAAC,IAAI,EAAE,MAAM,GAAG;QACd,OAAO,EAAE,OAAO,CAAA;QAChB,MAAM,EAAE,gBAAgB,CAAA;KACzB,CAAA;CACF;AAKD,MAAM,WAAW,wBAAwB;IACvC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,CAAA;AAEvC,qBAAa,2BAA2B;IAEtC,kBAAkB,UAAO;IAGzB,OAAO,CAAC,cAAc,CAA+B;IAGrD,OAAO,CAAC,eAAe,CAA6B;IAGpD,OAAO,CAAC,SAAS,CAAuB;IAGxC,OAAO,CAAC,eAAe,CAA4B;gBAEvC,eAAe,SAA4B;IAKvD,IAAI,OAAO,2BAEV;IAED,aAAa,CAAC,IAAI,EAAE,MAAM;IAI1B,YAAY,CAAC,IAAI,EAAE,MAAM;IAOzB,YAAY,CAAC,OAAO,EAAE,iBAAiB;IAiBvC,SAAS,CAAC,QAAQ,EAAE,cAAc;IAOlC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAQlD,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,cAAc;CAWvB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
2
|
+
import React from 'react';
|
3
|
+
export interface ConnectedAccountsFlexboxProps extends FlexBoxProps {
|
4
|
+
ignoreConnectDialog?: boolean;
|
5
|
+
onIgnoreConnectDialog?: (checked: boolean) => void;
|
6
|
+
}
|
7
|
+
export declare const ConnectedAccountsFlexbox: React.ForwardRefExoticComponent<ConnectedAccountsFlexboxProps & React.RefAttributes<HTMLDivElement>>;
|
8
|
+
//# sourceMappingURL=ConnectedAccountsFlexbox.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectedAccountsFlexbox.d.ts","sourceRoot":"","sources":["../../../src/components/ConnectedAccountsFlexbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,MAAM,WAAW,6BAA8B,SAAQ,YAAY;IACjE,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CACnD;AAED,eAAO,MAAM,wBAAwB,sGA4BpC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mBAAmB,CAAA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { FormControlProps } from '@mui/material';
|
2
|
+
import React from 'react';
|
3
|
+
export interface CheckboxFormControlProps extends FormControlProps {
|
4
|
+
onCheckChanged?: (checked: boolean) => void;
|
5
|
+
}
|
6
|
+
export declare const CheckboxFormControl: React.FC<CheckboxFormControlProps>;
|
7
|
+
//# sourceMappingURL=CheckboxFormControl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CheckboxFormControl.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/dialogs/connect/CheckboxFormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAIrD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC5C;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CASlE,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { DialogProps } from '@mui/material';
|
2
|
+
import React from 'react';
|
3
|
+
import type { ActiveProvider } from '../../lib/index.ts';
|
4
|
+
export interface ConnectWalletDialogProps extends DialogProps {
|
5
|
+
activeProvider?: ActiveProvider;
|
6
|
+
onIgnoreConnectDialog?: (checked: boolean) => void;
|
7
|
+
}
|
8
|
+
export declare const ConnectWalletDialog: React.FC<ConnectWalletDialogProps>;
|
9
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/dialogs/connect/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAIhD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAKxD,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CACnD;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAsClE,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
2
|
+
import React from 'react';
|
3
|
+
export interface LinkedProvidersFlexboxProps extends FlexBoxProps {
|
4
|
+
icon?: string;
|
5
|
+
providerName?: string;
|
6
|
+
}
|
7
|
+
export declare const LinkedProvidersFlexbox: React.FC<LinkedProvidersFlexboxProps>;
|
8
|
+
//# sourceMappingURL=LinkedProvidersFlexbox.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LinkedProvidersFlexbox.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAqBxE,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
2
|
+
import React from 'react';
|
3
|
+
export interface WalletPermissionsFlexBoxProps extends FlexBoxProps {
|
4
|
+
}
|
5
|
+
export declare const WalletPermissionsFlexbox: React.FC<WalletPermissionsFlexBoxProps>;
|
6
|
+
//# sourceMappingURL=Permissions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Permissions.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/dialogs/connect/Permissions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,6BAA8B,SAAQ,YAAY;CAAG;AAEtE,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAyB5E,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/dialogs/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,cAAc,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/wallet/dialogs/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { DialogProps } from '@mui/material';
|
2
|
+
import React from 'react';
|
3
|
+
import type { ActiveProvider } from '../../lib/index.ts';
|
4
|
+
export interface RevokeWalletConnectionDialogProps extends DialogProps {
|
5
|
+
activeProvider?: ActiveProvider;
|
6
|
+
}
|
7
|
+
export declare const RevokeWalletConnectionDialog: React.FC<RevokeWalletConnectionDialogProps>;
|
8
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/dialogs/revoke/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAMhD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,MAAM,WAAW,iCAAkC,SAAQ,WAAW;IACpE,cAAc,CAAC,EAAE,cAAc,CAAA;CAChC;AAED,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAAC,iCAAiC,CA6BpF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/dialogs/revoke/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/wallet/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ActiveProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/wallet/lib/ActiveProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,MAAM,WAAW,cAAc;IAC7B,aAAa,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TableHeadData.d.ts","sourceRoot":"","sources":["../../../../../src/components/wallet/lib/TableHeadData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,eAAO,MAAM,qBAAqB,EAAE,aAAa,EAoChD,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/wallet/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { TableProps } from '@mui/material';
|
2
|
+
import type { EIP6963Connector } from '@xylabs/react-crypto';
|
3
|
+
import React from 'react';
|
4
|
+
export interface ConnectedWalletsTableProps extends TableProps {
|
5
|
+
ignoreConnectDialog?: boolean;
|
6
|
+
onIgnoreConnectDialog?: (checked: boolean) => void;
|
7
|
+
wallets?: EIP6963Connector[];
|
8
|
+
}
|
9
|
+
export declare const ConnectedWalletsTable: React.FC<ConnectedWalletsTableProps>;
|
10
|
+
//# sourceMappingURL=ConnectedWalletsTable.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectedWalletsTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/wallet/table/ConnectedWalletsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAmB,MAAM,OAAO,CAAA;AAQvC,MAAM,WAAW,0BAA2B,SAAQ,UAAU;IAC5D,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAClD,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC7B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA0CtE,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { TableRowProps } from '@mui/material';
|
2
|
+
import type { EthWalletConnectorBase } from '@xylabs/react-crypto';
|
3
|
+
import React from 'react';
|
4
|
+
import type { ActiveProvider } from '../lib/index.ts';
|
5
|
+
export interface WalletConnectionsTableRowProps extends TableRowProps {
|
6
|
+
ignoreConnectDialog?: boolean;
|
7
|
+
onConnectClick?: (activeProvider: ActiveProvider) => void;
|
8
|
+
onRevoke?: (activeProvider: ActiveProvider) => void;
|
9
|
+
wallet: EthWalletConnectorBase;
|
10
|
+
}
|
11
|
+
export declare const WalletConnectionsTableRow: React.FC<WalletConnectionsTableRowProps>;
|
12
|
+
//# sourceMappingURL=ConnectedWalletsTableRow.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectedWalletsTableRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/wallet/table/ConnectedWalletsTableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,KAA+B,MAAM,OAAO,CAAA;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGrD,MAAM,WAAW,8BAA+B,SAAQ,aAAa;IACnE,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,cAAc,CAAC,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,CAAA;IACzD,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,CAAA;IACnD,MAAM,EAAE,sBAAsB,CAAA;CAC/B;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CA4D9E,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accounts.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/cells/Accounts.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAEnE,eAAO,MAAM,iCAAiC,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAkBrF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/cells/Actions.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAEnE,eAAO,MAAM,gCAAgC,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CA4BpF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Cells.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/cells/Cells.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAK1C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,yBAAyB,EAAE,aAAa,CAAC,6BAA6B,CAAC,EAMnF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ChainName.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/cells/ChainName.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAEnE,eAAO,MAAM,kCAAkC,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAEtF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/cells/State.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAEnE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAqBxE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Wallet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/cells/Wallet.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAEnE,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAanF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/cells/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { TableCellProps } from '@mui/material';
|
2
|
+
export interface ConnectedWalletTableCellProps {
|
3
|
+
additionalAccounts?: string[];
|
4
|
+
chainName?: string;
|
5
|
+
connected?: boolean;
|
6
|
+
currentAccount?: string[];
|
7
|
+
icon?: string;
|
8
|
+
onConnect?: () => Promise<void>;
|
9
|
+
onRevoke?: () => void;
|
10
|
+
tableCellProps?: TableCellProps;
|
11
|
+
totalAccounts: number;
|
12
|
+
walletName?: string;
|
13
|
+
walletRdns?: string;
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=ConnectedWalletTableCellProps.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ConnectedWalletTableCellProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IAGrB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/wallet/table/cells/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAA"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
2
|
+
import type { ActiveProvider } from '../../lib/index.ts';
|
3
|
+
export declare const useActiveProviderDialogState: (setActiveProvider: Dispatch<SetStateAction<ActiveProvider | undefined>>) => [boolean, (activeProvider: ActiveProvider) => void, () => void];
|
4
|
+
//# sourceMappingURL=useActiveProviderDialogState.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useActiveProviderDialogState.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet/table/hooks/useActiveProviderDialogState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,eAAO,MAAM,4BAA4B,sBACpB,QAAQ,CAAC,cAAc,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC,KACtE,CAAC,OAAO,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,EAAE,MAAM,IAAI,CAahE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/wallet/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kBAAkB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useDetectWallets.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDetectWallets.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAc/E,eAAO,MAAM,kBAAkB;;;CA+B9B,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { EnabledEthWalletsState, EnabledWalletsSavedState } from '../classes/index.ts';
|
2
|
+
export declare const useEnabledWalletsInner: (enabledWalletsRdns?: EnabledWalletsSavedState) => EnabledEthWalletsState;
|
3
|
+
export declare const useEnabledWallets: (enabledWalletsRdns?: EnabledWalletsSavedState) => {
|
4
|
+
disableWallet: ((rdns: string) => void) | undefined;
|
5
|
+
enableWallet: ((rdns: string) => void) | undefined;
|
6
|
+
enabledWallets: EnabledEthWalletsState;
|
7
|
+
wallets: EnabledEthWalletsState;
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=useEnabledWallets.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useEnabledWallets.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEnabledWallets.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAQ3F,eAAO,MAAM,sBAAsB,wBAAyB,wBAAwB,2BAYnF,CAAA;AAKD,eAAO,MAAM,iBAAiB,wBAAyB,wBAAwB;;;;;CAkB9E,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/img/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gCAAgC,CAAA"}
|
package/dist/browser/index.d.ts
CHANGED
@@ -1,119 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
interface EnabledEthWalletsState {
|
7
|
-
[rdns: string]: {
|
8
|
-
enabled: boolean;
|
9
|
-
wallet: EIP6963Connector;
|
10
|
-
};
|
11
|
-
}
|
12
|
-
interface EnabledWalletsSavedState {
|
13
|
-
[rdns: string]: boolean;
|
14
|
-
}
|
15
|
-
type WalletListener = () => void;
|
16
|
-
declare class EnabledEthWalletConnections {
|
17
|
-
persistPreferences: boolean;
|
18
|
-
private enabledWallets;
|
19
|
-
private ethWalletsState;
|
20
|
-
private listeners;
|
21
|
-
private localStorageKey;
|
22
|
-
constructor(localStorageKey?: string);
|
23
|
-
get wallets(): EnabledEthWalletsState;
|
24
|
-
disableWallet(rdns: string): void;
|
25
|
-
enableWallet(rdns: string): void;
|
26
|
-
resetWallets(wallets: DiscoveredWallets): void;
|
27
|
-
subscribe(listener: WalletListener): () => void;
|
28
|
-
toggleEnabledWallet(rdns: string, enabled: boolean): void;
|
29
|
-
private emitChange;
|
30
|
-
private isPersistance;
|
31
|
-
private persistSettings;
|
32
|
-
private reviveSettings;
|
33
|
-
}
|
34
|
-
|
35
|
-
interface ConnectedAccountsFlexboxProps extends FlexBoxProps {
|
36
|
-
ignoreConnectDialog?: boolean;
|
37
|
-
onIgnoreConnectDialog?: (checked: boolean) => void;
|
38
|
-
}
|
39
|
-
declare const ConnectedAccountsFlexbox: React.ForwardRefExoticComponent<ConnectedAccountsFlexboxProps & React.RefAttributes<HTMLDivElement>>;
|
40
|
-
|
41
|
-
interface CheckboxFormControlProps extends FormControlProps {
|
42
|
-
onCheckChanged?: (checked: boolean) => void;
|
43
|
-
}
|
44
|
-
declare const CheckboxFormControl: React.FC<CheckboxFormControlProps>;
|
45
|
-
|
46
|
-
interface ActiveProvider {
|
47
|
-
connectWallet?: EthWallet['connectWallet'];
|
48
|
-
icon?: string;
|
49
|
-
providerName?: string;
|
50
|
-
}
|
51
|
-
|
52
|
-
interface ConnectWalletDialogProps extends DialogProps {
|
53
|
-
activeProvider?: ActiveProvider;
|
54
|
-
onIgnoreConnectDialog?: (checked: boolean) => void;
|
55
|
-
}
|
56
|
-
declare const ConnectWalletDialog: React.FC<ConnectWalletDialogProps>;
|
57
|
-
|
58
|
-
interface RevokeWalletConnectionDialogProps extends DialogProps {
|
59
|
-
activeProvider?: ActiveProvider;
|
60
|
-
}
|
61
|
-
declare const RevokeWalletConnectionDialog: React.FC<RevokeWalletConnectionDialogProps>;
|
62
|
-
|
63
|
-
interface ConnectedWalletTableCellProps {
|
64
|
-
additionalAccounts?: string[];
|
65
|
-
chainName?: string;
|
66
|
-
connected?: boolean;
|
67
|
-
currentAccount?: string[];
|
68
|
-
icon?: string;
|
69
|
-
onConnect?: () => Promise<void>;
|
70
|
-
onRevoke?: () => void;
|
71
|
-
tableCellProps?: TableCellProps;
|
72
|
-
totalAccounts: number;
|
73
|
-
walletName?: string;
|
74
|
-
walletRdns?: string;
|
75
|
-
}
|
76
|
-
|
77
|
-
declare const ConnectedWalletsAccountsTableCell: React.FC<ConnectedWalletTableCellProps>;
|
78
|
-
|
79
|
-
declare const ConnectedWalletsActionsTableCell: React.FC<ConnectedWalletTableCellProps>;
|
80
|
-
|
81
|
-
declare const ConnectedWalletTableCells: ComponentType<ConnectedWalletTableCellProps>[];
|
82
|
-
|
83
|
-
declare const ConnectedWalletsChainNameTableCell: React.FC<ConnectedWalletTableCellProps>;
|
84
|
-
|
85
|
-
declare const ConnectedWalletState: React.FC<ConnectedWalletTableCellProps>;
|
86
|
-
|
87
|
-
declare const ConnectedWalletsWalletTableCell: React.FC<ConnectedWalletTableCellProps>;
|
88
|
-
|
89
|
-
interface ConnectedWalletsTableProps extends TableProps {
|
90
|
-
ignoreConnectDialog?: boolean;
|
91
|
-
onIgnoreConnectDialog?: (checked: boolean) => void;
|
92
|
-
wallets?: EIP6963Connector[];
|
93
|
-
}
|
94
|
-
declare const ConnectedWalletsTable: React.FC<ConnectedWalletsTableProps>;
|
95
|
-
|
96
|
-
interface WalletConnectionsTableRowProps extends TableRowProps {
|
97
|
-
ignoreConnectDialog?: boolean;
|
98
|
-
onConnectClick?: (activeProvider: ActiveProvider) => void;
|
99
|
-
onRevoke?: (activeProvider: ActiveProvider) => void;
|
100
|
-
wallet: EthWalletConnectorBase;
|
101
|
-
}
|
102
|
-
declare const WalletConnectionsTableRow: React.FC<WalletConnectionsTableRowProps>;
|
103
|
-
|
104
|
-
declare const useActiveProviderDialogState: (setActiveProvider: Dispatch<SetStateAction<ActiveProvider | undefined>>) => [boolean, (activeProvider: ActiveProvider) => void, () => void];
|
105
|
-
|
106
|
-
declare const useDetectedWallets: () => {
|
107
|
-
sortedWallets: EIP6963Connector[];
|
108
|
-
totalConnectedAccounts: number;
|
109
|
-
};
|
110
|
-
|
111
|
-
declare const useEnabledWalletsInner: (enabledWalletsRdns?: EnabledWalletsSavedState) => EnabledEthWalletsState;
|
112
|
-
declare const useEnabledWallets: (enabledWalletsRdns?: EnabledWalletsSavedState) => {
|
113
|
-
disableWallet: ((rdns: string) => void) | undefined;
|
114
|
-
enableWallet: ((rdns: string) => void) | undefined;
|
115
|
-
enabledWallets: EnabledEthWalletsState;
|
116
|
-
wallets: EnabledEthWalletsState;
|
117
|
-
};
|
118
|
-
|
119
|
-
export { CheckboxFormControl, type CheckboxFormControlProps, ConnectWalletDialog, type ConnectWalletDialogProps, ConnectedAccountsFlexbox, type ConnectedAccountsFlexboxProps, ConnectedWalletState, ConnectedWalletTableCells, ConnectedWalletsAccountsTableCell, ConnectedWalletsActionsTableCell, ConnectedWalletsChainNameTableCell, ConnectedWalletsTable, type ConnectedWalletsTableProps, ConnectedWalletsWalletTableCell, EnabledEthWalletConnections, type EnabledEthWalletsState, type EnabledWalletsSavedState, RevokeWalletConnectionDialog, type RevokeWalletConnectionDialogProps, WalletConnectionsTableRow, type WalletConnectionsTableRowProps, type WalletListener, useActiveProviderDialogState, useDetectedWallets, useEnabledWallets, useEnabledWalletsInner };
|
1
|
+
export * from './classes/index.ts';
|
2
|
+
export * from './components/index.ts';
|
3
|
+
export * from './hooks/index.ts';
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
|