Preparing search index...
The search index is not available
eip1193-types
eip1193-types
MetaMaskProvider
Interface MetaMaskProvider
interface
MetaMaskProvider
{
_metamask
:
{
isUnlocked
()
:
Promise
<
boolean
>
}
;
chainId
:
string
;
isMetaMask
:
true
;
networkVersion
:
string
;
request
:
MakeRequestMethod
<
"wallet_watchAsset"
,
[
[
WatchAssetParams
]
,
boolean
]
,
>
&
MakeRequestMethod
<
"eth_requestAccounts"
,
[
undefined
|
[
]
,
string
[]
]
>
&
MakeRequestMethod
<
"wallet_addEthereumChain"
,
[
[
AddEthereumChainParameter
]
,
null
]
,
>
&
MakeRequestMethod
<
"wallet_switchEthereumChain"
,
[
[
SwitchEthereumChainParameter
]
,
null
]
,
>
&
MakeRequestMethod
<
"wallet_getPermissions"
,
[
undefined
|
[
]
,
Web3WalletPermission
[]
]
,
>
&
MakeRequestMethod
<
"wallet_requestPermissions"
,
[
RequestedPermissions
[]
,
Web3WalletPermission
[]
]
,
>
&
MakeRequestMethod
<
"wallet_registerOnboarding"
,
[
undefined
|
[
]
,
boolean
]
,
>
&
MakeRequestMethod
<
"wallet_scanQRCode"
,
[
undefined
|
[
]
|
[
string
]
,
string
]
,
>
;
selectedAddress
:
string
;
enable
()
:
Promise
<
string
[]
>
;
isConnected
()
:
boolean
;
on
(
event
:
"connect"
,
listener
:
(
info
:
ProviderConnectInfo
)
=>
void
)
:
this
;
on
(
event
:
"disconnect"
,
listener
:
(
error
:
ProviderRpcError
)
=>
void
)
:
this
;
on
(
event
:
"close"
,
listener
:
(
error
:
Error
)
=>
void
)
:
this
;
on
(
event
:
"chainChanged"
,
listener
:
(
chainId
:
string
)
=>
void
)
:
this
;
on
(
event
:
"networkChanged"
,
listener
:
(
networkId
:
string
)
=>
void
)
:
this
;
on
(
event
:
"accountsChanged"
,
listener
:
(
accounts
:
`
0x
${
string
}
`
[]
)
=>
void
,
)
:
this
;
on
(
event
:
"message"
,
listener
:
(
message
:
ProviderMessage
)
=>
void
)
:
this
;
on
(
event
:
"notification"
,
listener
:
(
payload
:
ProviderMessage
)
=>
void
,
)
:
this
;
on
(
event
:
string
,
listener
:
(
...
args
:
unknown
[]
)
=>
void
)
:
this
;
send
(
payload
:
JsonRpcRequest
,
callback
:
JsonRpcCallback
)
:
void
;
send
(
method
:
string
,
params
?:
unknown
[]
)
:
Promise
<
JsonRpcResponse
>
;
send
(
payload
:
JsonRpcRequest
)
:
unknown
;
sendAsync
(
payload
:
JsonRpcRequest
,
callback
:
JsonRpcCallback
)
:
void
;
}
Hierarchy (
View Summary
)
EIP1193Provider
MetaMaskProvider
Index
Properties
_metamask
chain
Id
is
Meta
Mask
network
Version
request
selected
Address
Methods
enable
is
Connected
on
send
send
Async
Properties
_metamask
_metamask
:
{
isUnlocked
()
:
Promise
<
boolean
>
}
Type declaration
isUnlocked
:
function
isUnlocked
()
:
Promise
<
boolean
>
Experimental
Returns
Promise
<
boolean
>
chain
Id
chainId
:
string
Deprecated
is
Meta
Mask
isMetaMask
:
true
network
Version
networkVersion
:
string
Deprecated
request
request
:
MakeRequestMethod
<
"wallet_watchAsset"
,
[
[
WatchAssetParams
]
,
boolean
]
>
&
MakeRequestMethod
<
"eth_requestAccounts"
,
[
undefined
|
[
]
,
string
[]
]
,
>
&
MakeRequestMethod
<
"wallet_addEthereumChain"
,
[
[
AddEthereumChainParameter
]
,
null
]
,
>
&
MakeRequestMethod
<
"wallet_switchEthereumChain"
,
[
[
SwitchEthereumChainParameter
]
,
null
]
,
>
&
MakeRequestMethod
<
"wallet_getPermissions"
,
[
undefined
|
[
]
,
Web3WalletPermission
[]
]
,
>
&
MakeRequestMethod
<
"wallet_requestPermissions"
,
[
RequestedPermissions
[]
,
Web3WalletPermission
[]
]
,
>
&
MakeRequestMethod
<
"wallet_registerOnboarding"
,
[
undefined
|
[
]
,
boolean
]
,
>
&
MakeRequestMethod
<
"wallet_scanQRCode"
,
[
undefined
|
[
]
|
[
string
]
,
string
]
,
>
selected
Address
selectedAddress
:
string
Deprecated
Methods
enable
enable
()
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
Deprecated
is
Connected
isConnected
()
:
boolean
Returns
boolean
on
on
(
event
:
"connect"
,
listener
:
(
info
:
ProviderConnectInfo
)
=>
void
)
:
this
Parameters
event
:
"connect"
listener
:
(
info
:
ProviderConnectInfo
)
=>
void
Returns
this
on
(
event
:
"disconnect"
,
listener
:
(
error
:
ProviderRpcError
)
=>
void
)
:
this
Parameters
event
:
"disconnect"
listener
:
(
error
:
ProviderRpcError
)
=>
void
Returns
this
on
(
event
:
"close"
,
listener
:
(
error
:
Error
)
=>
void
)
:
this
Parameters
event
:
"close"
listener
:
(
error
:
Error
)
=>
void
Returns
this
Deprecated
on
(
event
:
"chainChanged"
,
listener
:
(
chainId
:
string
)
=>
void
)
:
this
Parameters
event
:
"chainChanged"
listener
:
(
chainId
:
string
)
=>
void
Returns
this
on
(
event
:
"networkChanged"
,
listener
:
(
networkId
:
string
)
=>
void
)
:
this
Parameters
event
:
"networkChanged"
listener
:
(
networkId
:
string
)
=>
void
Returns
this
Deprecated
on
(
event
:
"accountsChanged"
,
listener
:
(
accounts
:
`
0x
${
string
}
`
[]
)
=>
void
,
)
:
this
Parameters
event
:
"accountsChanged"
listener
:
(
accounts
:
`
0x
${
string
}
`
[]
)
=>
void
Returns
this
on
(
event
:
"message"
,
listener
:
(
message
:
ProviderMessage
)
=>
void
)
:
this
Parameters
event
:
"message"
listener
:
(
message
:
ProviderMessage
)
=>
void
Returns
this
on
(
event
:
"notification"
,
listener
:
(
payload
:
ProviderMessage
)
=>
void
)
:
this
Parameters
event
:
"notification"
listener
:
(
payload
:
ProviderMessage
)
=>
void
Returns
this
Deprecated
on
(
event
:
string
,
listener
:
(
...
args
:
unknown
[]
)
=>
void
)
:
this
Parameters
event
:
string
listener
:
(
...
args
:
unknown
[]
)
=>
void
Returns
this
send
send
(
payload
:
JsonRpcRequest
,
callback
:
JsonRpcCallback
)
:
void
Parameters
payload
:
JsonRpcRequest
callback
:
JsonRpcCallback
Returns
void
Deprecated
send
(
method
:
string
,
params
?:
unknown
[]
)
:
Promise
<
JsonRpcResponse
>
Parameters
method
:
string
Optional
params
:
unknown
[]
Returns
Promise
<
JsonRpcResponse
>
Deprecated
send
(
payload
:
JsonRpcRequest
)
:
unknown
Parameters
payload
:
JsonRpcRequest
Returns
unknown
Deprecated
send
Async
sendAsync
(
payload
:
JsonRpcRequest
,
callback
:
JsonRpcCallback
)
:
void
Parameters
payload
:
JsonRpcRequest
callback
:
JsonRpcCallback
Returns
void
Deprecated
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
_metamask
chain
Id
is
Meta
Mask
network
Version
request
selected
Address
Methods
enable
is
Connected
on
send
send
Async
eip1193-types
Loading...
Experimental