FilecoinContextType
type FilecoinContextType = { account: | IAccount | undefined; adapter: | WalletAdapter | undefined; adapters: WalletAdapter[]; error: | Error | undefined; loading: boolean; network: Network; reconnecting: boolean; rpcs: Record<Network, RPC>; setAccount: (value: React.SetStateAction< | IAccount | undefined>) => void; setAdapter: (value: React.SetStateAction< | WalletAdapter | undefined>) => void; setNetwork: (value: React.SetStateAction<Network>) => void;};
Defined in: packages/iso-filecoin-react/src/types.ts:31
Wallet context type
Properties
account
account: | IAccount | undefined;
Defined in: packages/iso-filecoin-react/src/types.ts:39
Currently connected account
adapter
adapter: | WalletAdapter | undefined;
Defined in: packages/iso-filecoin-react/src/types.ts:37
Currently selected wallet adapter
adapters
adapters: WalletAdapter[];
Defined in: packages/iso-filecoin-react/src/types.ts:35
List of available wallet adapters
error
error: | Error | undefined;
Defined in: packages/iso-filecoin-react/src/types.ts:49
Last error that occurred on the selected adapter
loading
loading: boolean;
Defined in: packages/iso-filecoin-react/src/types.ts:43
Provider is checking adapters support
network
network: Network;
Defined in: packages/iso-filecoin-react/src/types.ts:33
Current network (mainnet or testnet)
reconnecting
reconnecting: boolean;
Defined in: packages/iso-filecoin-react/src/types.ts:47
Provider is reconnecting to the last selected adapter
rpcs
rpcs: Record<Network, RPC>;
Defined in: packages/iso-filecoin-react/src/types.ts:51
RPC clients for each network
setAccount()
setAccount: (value: React.SetStateAction< | IAccount | undefined>) => void;
Defined in: packages/iso-filecoin-react/src/types.ts:53
Set the current account
Parameters
Parameter | Type |
---|---|
value | React.SetStateAction < | IAccount | undefined > |
Returns
void
setAdapter()
setAdapter: (value: React.SetStateAction< | WalletAdapter | undefined>) => void;
Defined in: packages/iso-filecoin-react/src/types.ts:57
Set the current wallet adapter
Parameters
Parameter | Type |
---|---|
value | React.SetStateAction < | WalletAdapter | undefined > |
Returns
void
setNetwork()
setNetwork: (value: React.SetStateAction<Network>) => void;
Defined in: packages/iso-filecoin-react/src/types.ts:55
Set the current network
Parameters
Parameter | Type |
---|---|
value | React.SetStateAction <Network > |
Returns
void