-
Notifications
You must be signed in to change notification settings - Fork 0
/
request.html
94 lines (90 loc) · 8.83 KB
/
request.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<html>
<head>
<script src="request.js">
</script>
</head>
<body>
Check console for results of clicks.
<h1>window.ethereum.request</h1>
<ul>
<li><a href="javascript:request('eth_blockNumber')">eth_blockNumber</a></li>
<li><a href="javascript:request('eth_accounts')">eth_accounts</a></li>
<li><a href="javascript:request('eth_requestAccounts')">eth_requestAccounts</a></li>
<li><a href="javascript:request('wallet_addEthereumChain', addEthereumChainParams)">wallet_addEthereumChain</a></li>
<li><a href="javascript:request('wallet_switchEthereumChain', switchEthereumChainParams)">wallet_switchEthereumChain</a></li>
<li><a href="javascript:request('wallet_switchEthereumChain', switchEthereumChainParams2)">wallet_switchEthereumChain2</a></li>
<li><a href="javascript:sendTransaction(false, 'request', '#request-to-1')">eth_sendTransaction</a> to: <input id="request-to-1"></li>
<li><a href="javascript:sendTransaction(true, 'request', '#request-to-2')">eth_sendTransaction (1559)</a> to: <input id="request-to-2"></li>
<li><a href="javascript:sendTransaction(undefined, 'request', '#request-to-3')">eth_sendTransaction (unspecified gas type)</a> to: <input id="request-to-3"></li>
<li><a href="javascript:signTransaction(false, 'request', '#request-sign-to-1')">eth_signTransaction</a> to: <input id="request-sign-to-1"></li>
<li><a href="javascript:signTransaction(true, 'request', '#request-sign-to-2')">eth_signTransaction (1559)</a> to: <input id="request-sign-to-2"></li>
<li><a href="javascript:signTransaction(undefined, 'request', '#request-sign-to-3')">eth_signTransaction (unspecified gas type)</a> to: <input id="request-sign-to-3"></li>
<li><a href="javascript:sendRawTransaction('request', '#request-send-raw-tx')">eth_sendRawTransaction</a> raw tx: <input id="request-send-raw-tx"></li>
<li><a href="javascript:sign('request', '#request-message-to-1')">eth_sign</a> message: <input id="request-message-to-1"></li>
<li><a href="javascript:personalSign('request', '#request-message-to-2')">personal_sign</a> message: <input id="request-message-to-2"></li>
<li><a href="javascript:signTypedData('request', '#request-message-to-3')">eth_signTypedData</a>
<li><a href="javascript:signTypedData_v4('request', '#request-message-to-4')">eth_signTypedData_v4</a>
<li><a href="javascript:sign('request', '#request-siwe', true)">Sign-In With Ethereuem</a> message: <textarea id="request-siwe" style="white-space: pre-wrap"></textarea></li>
<li><a href="javascript:request('wallet_requestPermissions', [{'eth_accounts': {}}])">walet_requestPermissions</a>
<li><a href="javascript:request('wallet_getPermissions')">walet_getPermissions</a>
<li><a href="javascript:request('wallet_watchAsset', addTokenParams)">wallet_watchAsset</a></li>
<li><a href="javascript:request('eth_subscribe', ['newHeads'])">eth_subscribe (newHeads)</a></li>
<li><a href="javascript:ethUnsubscribe('request', '#request-subscription-id')">eth_unsubscribe</a> subscription ID: <input id="request-subscription-id"></li>
</ul>
<h1>window.ethereum.sendAsync</h1>
<ul>
<li><a href="javascript:sendAsync('eth_blockNumber')">eth_blockNumber</a></li>
<li><a href="javascript:sendAsync('eth_accounts')">eth_accounts</a></li>
<li><a href="javascript:sendAsync('eth_requestAccounts')">eth_requestAccounts</a></li>
<li><a href="javascript:sendAsync('wallet_addEthereumChain', addEthereumChainParams)">wallet_addEthereumChain</a></li>
<li><a href="javascript:sendAsync('wallet_switchEthereumChain', switchEthereumChainParams)">wallet_switchEthereumChain</a></li>
<li><a href="javascript:sendTransaction(false, 'sendAsync', '#sendAsync-to-1')">eth_sendTransaction</a> to: <input id="sendAsync-to-1"></li>
<li><a href="javascript:sendTransaction(true, 'sendAsync', '#sendAsync-to-2')">eth_sendTransaction (1559)</a> to: <input id="sendAsync-to-2"></li>
<li><a href="javascript:sendTransaction(undefined, 'sendAsync', '#sendAsync-to-3')">eth_sendTransaction (unspecified gas type)</a> to: <input id="sendAsync-to-3"></li>
<li><a href="javascript:signTransaction(false, 'signAsync', '#signAsync-to-1')">eth_signTransaction</a> to: <input id="signAsync-to-1"></li>
<li><a href="javascript:signTransaction(true, 'signAsync', '#signAsync-to-2')">eth_signTransaction (1559)</a> to: <input id="signAsync-to-2"></li>
<li><a href="javascript:signTransaction(undefined, 'signAsync', '#signAsync-to-3')">eth_signTransaction (unspecified gas type)</a> to: <input id="signAsync-to-3"></li>
<li><a href="javascript:sendRawTransaction('sendAsync', '#sendAsync-send-raw-tx')">eth_sendRawTransaction</a> raw tx: <input id="sendAsync-send-raw-tx"></li>
<li><a href="javascript:sign('sendAsync', '#sendAsync-message-to-1')">eth_sign</a> message: <input id="sendAsync-message-to-1"></li>
<li><a href="javascript:personalSign('sendAsync', '#sendAsync-message-to-2')">personal_sign</a> message: <input id="sendAsync-message-to-2"></li>
<li><a href="javascript:signTypedData('sendAsync', '#request-message-to-3')">eth_signTypedData</a>
<li><a href="javascript:signTypedData_v4('sendAsync', '#request-message-to-4')">eth_signTypedData_v4</a>
<li><a href="javascript:sign('sendAsync', '#sendAsync-siwe', true)">Sign-In With Ethereuem</a> message: <textarea id="sendAsync-siwe" style="white-space: pre-wrap"></textarea></li>
<li><a href="javascript:sendAsync('wallet_requestPermissions', [{'eth_accounts': {}}])">walet_requestPermissions</a>
<li><a href="javascript:sendAsync('wallet_getPermissions')">walet_getPermissions</a>
<li><a href="javascript:sendAsync('wallet_watchAsset', addTokenParams)">wallet_watchAsset</a></li>
<li><a href="javascript:sendAsync('eth_subscribe', ['newHeads'])">eth_subscribe (newHeads)</a></li>
<li><a href="javascript:ethUnsubscribe('sendAsync', '#sendAsync-subscription-id')">eth_unsubscribe</a> subscription ID: <input id="sendAsync-subscription-id"></li>
</ul>
<h1>window.ethereum.send</h1>
<ul>
<li><a href="javascript:send('eth_blockNumber')">eth_blockNumber</a></li>
<li><a href="javascript:send('eth_accounts')">eth_accounts</a></li>
<li><a href="javascript:send('eth_requestAccounts')">eth_requestAccounts</a></li>
<li><a href="javascript:send('wallet_addEthereumChain', addEthereumChainParams)">wallet_addEthereumChain</a></li>
<li><a href="javascript:send('wallet_switchEthereumChain', switchEthereumChainParams)">wallet_switchEthereumChain</a></li>
<li><a href="javascript:sendTransaction(false, 'send', '#send-to-1')">eth_sendTransaction</a> to: <input id="send-to-1"></li>
<li><a href="javascript:sendTransaction(true, 'send', '#send-to-2')">eth_sendTransaction (1559)</a> to: <input id="send-to-2"></li>
<li><a href="javascript:sendTransaction(undefined, 'send', '#send-to-3')">eth_sendTransaction (unspecified gas type)</a> to: <input id="send-to-3"></li>
<li><a href="javascript:signTransaction(false, 'send', '#sign-to-1')">eth_signTransaction</a> to: <input id="sign-to-1"></li>
<li><a href="javascript:signTransaction(true, 'send', '#sign-to-2')">eth_signTransaction (1559)</a> to: <input id="sign-to-2"></li>
<li><a href="javascript:signTransaction(undefined, 'send', '#sign-to-3')">eth_signTransaction (unspecified gas type)</a> to: <input id="sign-to-3"></li>
<li><a href="javascript:sendRawTransaction('send', '#sendAsync-send-raw-tx')">eth_sendRawTransaction</a> raw tx: <input id="sendAsync-send-raw-tx"></li>
<li><a href="javascript:sign('send', '#send-message-to-1')">eth_sign</a> message: <input id="send-message-to-1"></li>
<li><a href="javascript:personalSign('send', '#send-message-to-2')">personal_sign</a> message: <input id="send-message-to-2"></li>
<li><a href="javascript:signTypedData('send', '#request-message-to-3')">eth_signTypedData</a>
<li><a href="javascript:signTypedData_v4('send', '#request-message-to-4')">eth_signTypedData_v4</a>
<li><a href="javascript:sign('send', '#send-siwe', true)">Sign-In With Ethereuem</a> message: <textarea id="send-siwe" style="white-space: pre-wrap"></textarea></li>
<li><a href="javascript:send('wallet_requestPermissions', [{'eth_accounts': {}}])">walet_requestPermissions</a>
<li><a href="javascript:send('wallet_getPermissions')">walet_getPermissions</a>
<li><a href="javascript:send('wallet_watchAsset', addTokenParams)">wallet_watchAsset</a></li>
<li><a href="javascript:send('eth_subscribe', ['newHeads'])">eth_subscribe (newHeads)</a></li>
<li><a href="javascript:ethUnsubscribe('send', '#send-subscription-id')">eth_unsubscribe</a> subscription ID: <input id="send-subscription-id"></li>
</ul>
</ul>
<h1>Other functions</h1>
<ul>
<li><a href="javascript:enable()">ethereum.enable</a></li>
</ul>
</body>
</html>