const myInterfaceIndex = whatsabi.interfaces.createInterfaceIndex(
Object.assign({},
// Include defaults?
whatsabi.interfaces.defaultKnownInterfaces,
// Our special secret interface we want to detect
{
"MyInterface": [ "function Foo() returns (uint256)", "function Bar()" ],
},
),
);
const detectedInterfaces = whatsabi.interfaces.abiToInterfaces(abi, myInterfaceIndex);
Given a lookup of known interfaces, produce a lookup index to use with abiToInterfaces.