Skip to main content
Version: 0.2.0

EIP-1193 Provider

EIP-1193 defines the standard JavaScript interface for Ethereum providers — the window.ethereum API.

Interface​

interface EIP1193Provider {
request(args: { method: string; params?: unknown[] }): Promise<unknown>;
on(event: string, listener: (...args: unknown[]) => void): void;
removeListener(event: string, listener: (...args: unknown[]) => void): void;
}

Implemented methods​

MethodStatusDescription
eth_requestAccounts✅Opens Temple via Beacon, returns ['0xAlias']
eth_accounts✅Returns current connected alias
eth_chainId✅Returns Tezos X chain ID
net_version✅Chain ID as decimal string
eth_sendTransaction✅Routes via NAC gateway
eth_getBalance✅Balance of the 0x alias
eth_getTransactionReceipt✅Receipt or synthetic response
eth_getTransactionCount✅Returns 0x0
eth_blockNumber✅Latest block number
wallet_revokePermissions✅Disconnects Temple session
eth_sign❌ Not supportedSIWE out of scope
personal_sign❌ Not supportedOut of scope V1
eth_signTypedData❌ Not supportedEIP-712 out of scope

Example​

// Connect
const accounts = await window.ethereum.request({
method: 'eth_requestAccounts'
});
console.log(accounts); // ['0x341af4de...']

// Get chain
const chainId = await window.ethereum.request({ method: 'eth_chainId' });

// Send transaction
const hash = await window.ethereum.request({
method: 'eth_sendTransaction',
params: [{ to: '0x...', value: '0xde0b6b3a7640000' }]
});