Back to Wallet Selection
EIP-1193

MetaMask Integration

Connect MetaMask via window.ethereum and interact with the CIFER SDK. No extra packages needed.

Step 1

Initialize SDK

The SDK is initialized with auto-discovery when the page loads. It fetches supported chains and contract addresses from the Blackbox API.

const sdk = await createCiferSdk({
blackboxUrl: 'https://cifer-blackbox.ternoa.dev:3010',
});
Step 2

Connect MetaMask

Request account access, then wrap window.ethereum with Eip1193SignerAdapter.

await window.ethereum.request({ method: 'eth_requestAccounts' });
const signer = new Eip1193SignerAdapter(window.ethereum);
const address = await signer.getAddress();

Console Output

Waiting for SDK init...