What is Midpoint
Call any off-chain endpoint from your smart contract.
Midpoint is a protocol and platform for making dynamic requests from smart contracts to off-chain endpoints. Unlike traditional oracle networks - midpoints allow developers to define requests with on-chain parameters, multistep authentication workflows, private off-chain data, and multi-chain callback functions. We believe developers should be able to define and make a call from a smart contract to any off-chain endpoint in under five minutes and with one line of code; no deploying infrastructure and no talking to a support team.
There is no predefined list of midpoints or list of services/websites that you can use midpoint to interact with. Every day developers build midpoints to connect their smart contract to new services and endpoints - ones that we (Midpoint Labs) - have never heard of.
// Build www.midpointapi.com with npm, add a version tag of "23" on GitHub, and deploy to production
IMidpoint(startpointAddress).callMidpoint(219, "npm run", bytes1(0x00) "prod", bytes1(0x00), 23);
Request and Response
// Check if a DocuSign document has been signed
uint256 requestId = IMidpoint(startpointAddress).callMidpoint(134, "a1cf7e68-872f-4374-b6de-129ca07fe16f");
// Take action accordingly
function callback(uint256 _requestId, uint64 _midpointId, string memory status, uint8 signers) public