Skip to main content
Version: 0.1.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_requestAccountsOpens Temple via Beacon, returns ['0xAlias']
eth_accountsReturns current connected alias
eth_chainIdReturns Tezos X chain ID
net_versionChain ID as decimal string
eth_sendTransactionRoutes via NAC gateway
eth_getBalanceBalance of the 0x alias
eth_getTransactionReceiptReceipt or synthetic response
eth_getTransactionCountReturns 0x0
eth_blockNumberLatest block number
wallet_revokePermissionsDisconnects 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' }]
});