Blockchain startup ChainLink has pulled in $32 million through its presale and initial coin offering, which closed yesterday. The company provides middleware to enable “smart contracts” running on a blockchain to access external data.

Smart contracts, or self-executing contracts, are one of the exciting promises of blockchain tech. They allow businesses and individuals to set service-level agreements with each other.

For example, imagine if airlines started offering smart contracts that would automatically refund 20 percent of your ticket fare if your flight misses its departure time by more than an hour. Or imagine if medical shipments to pharmacies were automatically halted and returned to the manufacturer if the shipping temperature exceeded a contracted limit.

As Coin Sciences’ Gideon Greenspan explains, these kinds of pie-in-the-sky use cases for blockchain have been unrealistic to date, since blockchains haven’t been able to reliably access a wide range of external data. But ChainLink plans to change that. It offers contract makers a whole network of “oracles,” or trusted external data sources, to choose from. With ChainLink, you can have a contract query one or several different oracles to check, say, flight departure times.

“When you type ‘interest rates’ into the ChainLink search bar, you’ll get a list of some 50 data feeds to choose from,” explained CEO Sergey Nazarov. “You copy and paste [from that data feed page on ChainLink] what your contract needs to do and copy that into your contract.” The developers who connect APIs to ChainLink are compensated with ChainLink’s LINK token each time someone uses their feed by the contracts that are requesting data from those feeds.

The company has had about 3,700 emails from developers interested in running a ChainLink, Nazarov said.

ChainLink is being built by the team at 3.5 year-old company SmartContract, based in San Francisco, which does custom enterprise smart contract rollouts. So far SmartContract’s biggest client has been inter-bank transaction network SWIFT, which has 11,000 banks in its network.

But one-off rollouts take time, require a hand-tailored API, and are, in effect, hard-wired to the chosen oracle; they don’t give you the flexibility of deciding how many data sources to query.

ChainLink will bring smart contract capabillites to anyone with high security and a lot more choice.

Without ChainLink’s network, Nazarov said, a company wanting to deploy a smart contract able to interact with an external data feed needs to develop an API for that data feed and then go to one of the few middleware providers working in this space who then wrap the necessary rules and calls into the smart contract. The application developer doesn’t get much flexibility in deciding how many of the blockchain’s nodes should query the data feed or how many data sources to query. Security is also a big concern. “If we’re transacting billions of dollars on these systems, we need them to be secure end-to-end,” said Nazarov. Having a decentralized system make a call to a single data source in order to execute a multimillion dollar contract could leave the system open to manipulation.

The coming generation of open-source oracles will come with more options and more security. Developers will be able to have their smart contracts query multiple disparate data feeds from many different nodes, cross-check them for consistency, possibly averaging the various inputs to reduce the chance of error.

ChainLink’s capabilties aren’t ready for rollout yet — the company is still working on its network — but the fresh fundraise should help move that work along.

Even after the company’s oracle network is rolled out, it could take five or so years to reach maturity, Nazarov explained. The biggest data providers realize this new model could be good business for them, but they’re not willing to take the jump until they see a decent volume of smart contracts in play. So we’ll likely see smaller and mid-sized data providers move in first, with the rest following later. And the pace at which key data feeds become available will, to a certain extent, dictate how quickly the whole ecosystem is able to develop.