Skip to content
✨ Learn more about Convo Space & Omnid →
Docs
ConvoX
Omnid x MetaMask

Omnid x MetaMask

Introduction

Omnid securing your Web3 Experience using MetaMask.

Step 1 : Install MetaMask Flask

Snaps are currently available only on the Developer Version of MetaMask called MetaMask Flask. Get it on metamask.io/flask (opens in a new tab)

Step 2 : Install Omnid's Snap on Flask

All done.

Add Snap Installer to your Site

NPM: https://www.npmjs.com/package/@omnid/snap (opens in a new tab)

await ethereum.request({
    method: 'wallet_enable',
    params: [{
        wallet_snap: { [`npm:@omnid/snap`]: {} },
    }]
})

RPC API

omnid_getTrustScoreData

You can use omnid_getTrustScoreData to get an arbitary user's TrustScore and Omnid Data.

Example,

const snapId = `npm:@omnid/snap`;
const response = await ethereum.request({
    method: 'wallet_invokeSnap',
    params: [snapId, {
        method: 'omnid_getTrustScoreData',
        address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
        apikey: '<convo-api-key>',
    }]
})
console.log('response', response);

omnid_getFortaData

You can use omnid_getFortaData to get an arbitary user's Forta Alerts.

Example,

const snapId = `npm:@omnid/snap`;
const response = await ethereum.request({
    method: 'wallet_invokeSnap',
    params: [snapId, {
        method: 'omnid_getFortaData',
        address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
        customVariables: null, // Optional Param to override default GraphQL variable values.
    }]
})
console.log('response', response);

Links


Changelog

1.2.0

  • Add Support for tx-insight api.
  • Switch to TypeScript.
  • Update Dependencies.

1.1.4

  • Update Dependencies.

1.1.3

  • Update Dependencies.

1.1.2

  • Update Dependencies.

1.1.1

  • Update Dependencies.

1.1.0

  • Add Forta Alerts RPC API omnid_getFortaData.
  • Update Dependencies.

1.0.0

  • Release Snap 🚀.

Comments