switchMethod
How to call the API from an app
const snapId = `npm:@hashgraph/hedera-identify-snap`
const handleSwitchMethodAPI = async () => {
await window.ethereum.request({
method: 'wallet_invokeSnap',
params: {
snapId,
request: {
method: 'switchDIDMethod',
params: {
didMethod: 'did:hedera'
}
}
}
})
}How the API is handled between the app and snap

What the API does
Live Demo on CodePen
Last updated
Was this helpful?

