Try   HackMD

Streamlining Web3 Integration for Mobile Applications

Polywrap DAO recently completed a prototype of the Swift client. This client will make web3 iOS mobile development more efficient, accessible, and versatile.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Polywrap clients gives applications access to all wraps written in any language. We began with the JavaScript client which lets polywrap-enabled web applications to use wraps. Once the Swift client is released, web3 developers will be able to effectively integrate web3 protocols into iOS mobile applications.

All clients use a GraphQL-esque query language to communicate with wraps. As a quick example, below is the code for fetching a wrap and executing its methods using the Swift client library.

// Swift Application public func getSafeAddress( _ args: ArgsGetSafeAddress, _ client: PolywrapClient ) -> String { return client.invoke( uri: SAFE_FACTORY_URI, method: "predictSafeAddress", args: args.input, env: nil ) }

While the Swift client is still a prototype, it marks an important milestone in demonstrating the capability of Polywrap to bring web3 beyond the web browser and into mobile.

Bringing Ethers to all Platforms

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

The new Ethers wrap brings the functionality of the Ethers.js library to all platforms. Ethers is a popular and powerful library for interacting with the Ethereum Blockchain and its ecosystem.

Demo – Safe Wrap in MetaMask iOS Mobile

We recently demoed Polywrap technology on mobile for the first time at the Safe Account Abstraction hackathon. The demo makes use of the Swift client, Ethers wrap, and Safe wrap.

A video of the demo application can be found here.

The Safe wrap is an SDK that enables dApps to interact with the Safe smart contract from a variety of execution environments. It includes the same functionality as the current Safe JavaScript SDK (but with all the benefits of Polywrap). This means developers can use the wrap to deploy a new safe, perform off-chain signatures, and execute transactions.

In the demo, Cesar Brazon, a Polywrap engineer contributor, shows an iOS application with the new Polywrap Swift client library installed into MetaMask mobile. The Swift client fetches the Safe wrap from decentralized storage to create a new Safe wallet for the user inside MetaMask.

The magic of Polywrap technology is that this exact same Safe wrap can be used in iOS apps, or Android, or web browser, or any environment, and it'd function the same way in any of these platforms!

Resources