Members
(constant) config :Config
Type:
(constant) initialState :FirstTimeState
- Source:
Type:
Methods
blacklistedDomainCheck() → {boolean}
- Source:
Checks if the current domain is blacklisted
Returns:
True if the current domain is blacklisted
- Type
- boolean
cleanContextForImports()
Caches reference to global define object and deletes it
connectToAccountManager(connectionStream, cb)
- Source:
Establishes streamed connections to background scripts and a Web3 provider
Parameters:
Name | Type | Description |
---|---|---|
connectionStream |
any | PortStream instance establishing a background connection |
cb |
function | Called when controller connection is established |
doctypeCheck() → {boolean}
- Source:
Checks the doctype of the current document if it exists
Returns:
True if the doctype is html or if none exists
- Type
- boolean
documentElementCheck() → {boolean}
- Source:
Checks the documentElement of the current document
Returns:
True if the documentElement is an html node or if none exists
- Type
- boolean
initializePopup(config, cb)
- Source:
Asynchronously initializes the MetaMask popup UI
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | Popup configuration object |
cb |
function | Called when initialization is comlete |
logStreamDisconnectWarning(remoteLabel, err)
- Source:
Error handler for page to plugin stream disconnections
Parameters:
Name | Type | Description |
---|---|---|
remoteLabel |
string | Remote stream name |
err |
Error | Stream connection error |
redirectToPhishingWarning()
- Source:
Redirects the current page to a phishing information page
restoreContextAfterImports()
Restores global define object from cached reference
setupControllerConnection(connectionStream, cb)
- Source:
Establishes a streamed connection to the background account manager
Parameters:
Name | Type | Description |
---|---|---|
connectionStream |
any | PortStream instance establishing a background connection |
cb |
function | Called when the remote account manager connection is established |
setupInjection()
- Source:
Creates a script tag that injects inpage.js
setupStreams()
- Source:
Sets up two-way communication streams between the browser extension and local per-page browser context
setupWeb3Connection(connectionStream)
- Source:
Establishes a streamed connection to a Web3 provider
Parameters:
Name | Type | Description |
---|---|---|
connectionStream |
any | PortStream instance establishing a background connection |
shouldInjectWeb3() → {boolean}
- Source:
Determines if Web3 should be injected
Returns:
True of Web3 should be injected
- Type
- boolean
suffixCheck() → {boolean}
- Source:
Checks the current document extension
Returns:
True if the current extension is not prohibited
- Type
- boolean
Type Definitions
Config
Properties:
Name | Type | Description |
---|---|---|
network |
UrlConfig | Network configuration parameters |
networkBeta |
UrlConfig | Beta UI network configuration parameters |
networkNames |
NameConfig | Network name configuration parameters |
enums |
EnumConfig | Application-wide string constants |
Type:
- Object
EnumConfig
Properties:
Name | Type | Description |
---|---|---|
DEFAULT_RPC |
string | Default network provider URL |
OLD_UI_NETWORK_TYPE |
string | |
BETA_UI_NETWORK_TYPE |
string |
Type:
- Object
FirstTimeState
- Source:
Properties:
Name | Type | Description |
---|---|---|
config |
Object | Initial configuration parameters |
NetworkController |
Object | Network controller state |
Type:
- Object
NameConfig
Properties:
Name | Type | Description |
---|---|---|
3 |
string | URL of local RPC provider |
4 |
string | URL of mainnet RPC provider |
42 |
string | URL of Ropsten testnet RPC provider |
Type:
- Object
UrlConfig
Properties:
Name | Type | Description |
---|---|---|
localhost |
string | URL of local RPC provider |
mainnet |
string | URL of mainnet RPC provider |
ropsten |
string | URL of Ropsten testnet RPC provider |
kovan |
string | URL of Kovan testnet RPC provider |
rinkeby |
string | URL of Rinkeby testnet RPC provider |
Type:
- Object