Creates a transport that communicates with the MetaMask extension via window.postMessage This is primarily used for Firefox where the externally_connectable API is not available
A Transport instance that communicates with the MetaMask extension
const transport = getWindowPostMessageTransport();await transport.connect();const result = await transport.request({ method: 'eth_getBalance', params: ['0x123', 'latest'] }); Copy
const transport = getWindowPostMessageTransport();await transport.connect();const result = await transport.request({ method: 'eth_getBalance', params: ['0x123', 'latest'] });
Creates a transport that communicates with the MetaMask extension via window.postMessage This is primarily used for Firefox where the externally_connectable API is not available