The Contract interface will be using to interact with a contract using syntax: contract.query.<message>.
import { Contract } from'dedot/contract';import { FlipperContractApi } from'./flipper';import flipperMetadata from'./flipper.json'assert { type:'json' };// ... initializing DedotClientconstALICE='5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; // AliceconstcontractAddress='...';// create a contract instace from its metadata & addressconstcontract=newContract<FlipperContractApi>(client, flipperMetadata, contractAddress);// Making call to get the current value of the flipper contractconstresult=awaitcontract.query.get({ caller:ALICE });// Typescipt can inspect the type of value as `boolean` with the support of FlipperContractApi interfaceconstvalue:boolean=result.data;// You can also have access to the detailed/raw result of the callconstrawResult=result.raw;