metamask / metamask-docs Goto Github PK
View Code? Open in Web Editor NEWDeveloper documentation for MetaMask
Home Page: https://docs.metamask.io
License: Apache License 2.0
Developer documentation for MetaMask
Home Page: https://docs.metamask.io
License: Apache License 2.0
Readme
Base 2.0 PR #189
Brand Resources:
https://github.com/MetaMask/brand-resources
On this page it says v3 is the latest version, but now v4 is the latest version.
On this page it says "MetMask" rather than "MetaMask".
error:
Name of a key "directdepositqitmm'erexplainer" is invalid. Only ASCII [a-z], [A-Z], [0-9] and "_" are allowed.
chrome 78.0.3904.108 (64)
making the docs more interactive by replacing the codepen examples with actual vue components. Will keep a link to the codepen examples for people to play with
Readme
Only the home page is accessible, and that without css. All internal links return a 404.
Mobile
1. Introduction (has content updates)
2. Checklist to make site compatible
3. Best practices
Thought it'd be a great idea to add a "Contributor" tab at the bottom of the "Resource" section.
To Do:
Hi,
I use the Metamask "Quick Started" sample code to detect that,
But I always got the alert 'Looks like you need a Dapp browser to get started.' even the metamask is installed.
The Metamask info is V7.4.0 in Chrome.
Someone help me to fix that?
thank you :)
if (typeof window.ethereum === 'undefined') {
alert('Looks like you need a Dapp browser to get started.')
alert('Consider installing MetaMask!')
} else {
// In the case the user has MetaMask installed, you can easily
// ask them to sign in and reveal their accounts:
ethereum.enable()
// Remember to handle the case they reject the request:
.catch(function (reason) {
if (reason === 'User rejected provider access') {
// The user didn't want to sign in!
} else {
// This shouldn't happen, so you might want to log this...
alert('There was an issue signing you in.')
}
})
// In the case they approve the log-in request, you'll receive their accounts:
.then(function (accounts) {
// You also should verify the user is on the correct network:
if (ethereum.networkVersion !== desiredNetwork) {
alert('This application requires the main network, please switch it in your MetaMask UI.')
// We plan to provide an API to make this request in the near future.
// https://github.com/MetaMask/metamask-extension/issues/3663
}
// Once you have a reference to user accounts,
// you can suggest transactions and signatures:
const account = accounts[0]
sendEtherFrom(account, function (err, transaction) {
if (err) {
return alert(`Sorry you weren't able to contribute!`)
}
alert('Thanks for your successful contribution!')
})
})
}
Here are some docs we agreed we'd like to add. Please check off an item as you begin it, so nobody else does! (Also maybe reload first to make sure someone else didn't just check it).
Allows other WebExtensions to connect to MetaMask:
https://github.com/MetaMask/extension-provider
This should include examples of use with the Rimble MetaMask button.
It says "MyCryto" rather than "MyCrypto" in this section.
"See API Reference" link under, https://metamask.github.io/metamask-docs/Main_Concepts/Getting_Started#user-state leads to a broken link 404
issue to scroll menu left in : https://metamask.github.io/metamask-docs/
Browser : Opera Versión:62.0.3331.99
"Paste the contract code from bokky's blog post into remix" -> remix link is incorrect
This issue refers to the link at the bottom of this page highlighted as ethereum API
.
Which leads to https://metamask.github.io/metamask-docs/Examples/API_Reference
May be what @marcuswin was referring to in his issue here #4
From @rekmarks:
Our documentation’s search functionality sucks, because we’re using a limited, local, markdown header-based JS search library. As it turns out, lots of big projects use VuePress for their docs like we do, and you can do a free integration with a search engine called Algolia to provide full-text site search.
The gist is that Algolia indexes your docs site, and then you incorporate their widget into your docs (very straightforward with VuePress). It does not appear to inject any trackers into the website, at least none that Brave can detect.
Users include Babel, React, Yarn, TypeScript, Webpack, and ESLint.
VuePress docs for integration: https://vuepress.vuejs.org/theme/default-theme-config.html#algolia-search
Algolia’s docsearch product home page: https://docsearch.algolia.com/
need to be updated to be compatible with the new remix version
I believe the code contained at this link: https://metamask.github.io/metamask-docs/Examples/Low_Level_Ether_Transfer
const rejected = 'User denied transaction signature.'
if (response.error && response.error.message.includes(rejected)) {
return alert(`We can't take your money without your permission.`)
}
Should be:
const rejected = 'User denied transaction signature.'
if (response.error && response.error.stack.includes(rejected)) {
return alert(`We can't take your money without your permission.`)
}
The documentation says the method eth_requestAccounts
returns an array of accounts, however it returns a JSON-RPC response as of MetaMask 7.4.0. Probably a bug of MetaMask.
In any page containing an EthereumProvider for a browser installed MetaMask 7.4.0, evaluate the following statement:
ethereum.send('eth_requestAccounts').then(console.log)
// {id: 1, jsonrpc: "2.0", result: ['0x1234...']}
The code in this page:
https://metamask.github.io/metamask-docs/API_Reference/Ethereum_Provider#ethereum.enable()
Example usage (ES6), assuming async function:
try {
const accounts = await ethereum.enable()
// You now have an array of accounts!
// Currently only ever one:
// ['0xFDEa65C8e26263F6d9A1B5de9555D2931A33b825']
} catch (error) {
// Handle error. Likely the user rejected the login:
console.log(reason === "User rejected provider access")
}
logs an error: reason is not defined
reason
might have been mistaken which should've been error
Create an example for signing data types.
Both of these are available synchronously as ethereum.networkVersion and ethereum.selectedAddress. You can listen for changes using events too, see (the API reference).
It says "but no use as as important as calling" on the Accessing Accounts page in the docs, and that doesn't make sense. Please consider rewording this with the intended meaning. Thanks!
Add info about:
use:
https://ahrefs.com/backlink-checker
paste link below in search box:
https://docs.metamask.io/
This will show the domain back linking results. It's currently at 80. Due to it being a subdomain of MetaMask.io.
To better improve results and search optimization we need to:
-Perform keyword research
-Improve Metadata Content
-Create FAQ's on each page
1. Number/Letter the subheaders to correspond with the TOC
a. The five steps under Basic Action (Part 1) are not numbered , so it's harder for the reader to follow along in the steps. I think the bullets in the first section of Basic Action (Part 1) should be numbered, and the headers that correspond to those bullets be numbered as well.
b. Only the first bullet point in Basic Action (Part 1) is a link to its respective section. All of the bullets should have corresponding links
2. Avoid adding code to the middle of blocks
As much as possible, the tutorial should try to build the code linearly. On two occasions in this tutorial, the reader is asked to add code in the middle of a block, which increases the likelihood of errors and adds confusion.
3. Increased feedback loops so the user can verify exactly what happened
As a user who is fairly new to any programming language or platform, having tight feedback loops ensures that they are on the right track and boosts confidence. I would personally prefer to have less steps with more feedback, even at the expense of longer code blocks.
4. A final code block that shows the entire page/tutorial in a single block
At the end of the tutorial, having the entire code block on the page provides a checkpoint for the reader. They are then able to compare their work to the completed code block and make any chances to their work if they are seeing any errors. Having this larger code block also allows for the users to paste the entire code snippet and work through the tutorial with complete code .
Create a getting started tutorial app that will help guide developers on where to start with the different methods when communicating with the network. Reference here as a starting point for the getting started application.
https://metamask.github.io/metamask-docs/API_Reference/JSON_RPC_API
You can look up how to pass these methods to the window.ethereum object here.
in examples we should migrate away from the web3
library and use ethers.js
, given that it's our library of choice internally
Look into creating live coding examples for Ethereum methods. Interactive docs with more code examples. Make the docs more interactive by creating reactivity and real-time feedback when typing
On this page it says "comaptible" rather than "compatible".
Also, it says "does not mean we will not eventually have a v4
". It should say v5
, since this page is already for v4
.
Port over Readme.md to go under 'Getting Started'
https://github.com/MetaMask/metamask-onboarding
Some folders/files in the repo are excessive and unnecessary. Need to clean out and eliminate psudo code
We should use async/await
and try/catch
everywhere in the repo instead of .then
/.catch
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.