npm install
npm run serve
npm run build
// request account access
window.qtum.request({ method: 'eth_requestAccounts' })
.then(() => {
// add chain
window.qtum.request({
method: "wallet_addEthereumChain",
params: [{
{
chainId: '0x22B9',
chainName: 'Qtum Testnet',
rpcUrls: ['https://localhost:23889'],
blockExplorerUrls: ['https://testnet.qtum.info/'],
iconUrls: [
'https://qtum.info/images/metamask_icon.svg',
'https://qtum.info/images/metamask_icon.png',
],
nativeCurrency: {
decimals: 18,
symbol: 'QTUM',
},
}
}],
}
});
- Metamask requires https for
rpcUrls
so that must be enabled- Either directly through Janus with
--https-key ./path --https-cert ./path2
see SSL - Through the Makefile
make docker-configure-https && make run-janus-https
- Or do it yourself with a proxy (eg, nginx)
- Either directly through Janus with