JSON-RPC API
window.pockie.request({ method: 'eth_chainId' })
.then((chainId) => {
console.log('Response:', chainId);
}).catch((error) => {
if (error.code === 4001) {
// EIP-1193 userRejectedRequest error
console.log('Please connect to MetaMask.');
} else {
console.error(error);
}
});Methods
wallet_getPermissions
wallet_requestPermissions
wallet_switchEthereumChain
wallet_watchAsset
지원하지 않는 Methods
Last updated