Skip to main content

Introduction

note

Last update: October 2023
Polywrap version 0.12.1

If you want to learn how to build a Polywrap "wrap", you've come to the right place! In this guide, we will build a new Polywrap wrap called "Oracle Wrap". Oracle Wrap is capable of both obscuring and illuminating knowledge using hashing and generative AI. The guide is split into two parts.

tip

👋 This guide is meant for those who want to build and deploy their own wraps. If you're interested in integrating existing wraps into your app, see our Integrate into a JS App guide.

In Part One, we cover everything you need to know to build, test, and deploy a wrap that you can use in your app today. Part one will stick to the "happy path", where we rely on default configurations that serve most use cases well.

We will learn how to:

  • Add basic project metadata to the polywrap.yaml project manifest
  • Define the wrap's interface in the polywrap.graphql schema
  • Build a wrap
  • Import and invoke other wraps
  • Import and work with interface wraps
  • Test the wrap
  • Add a readme to the wrap package
  • Deploy the wrap package to IPFS

In Part Two, we discuss the various ways you can configure and customize Polywrap's build tools to suite the needs of your project.

We will cover:

  • Overview of default Polywrap Client configuration
    • Learn which interfaces and plugins are already available to your users
  • Advanced configuration for the polywrap.yaml project manifest
  • Customize the build process with the polywrap.build.yaml build manifest
  • Configure deployment with the polywrap.deploy.yaml deployment manifest
  • Easily manage local test infrastructure with the polywrap.infra.yaml infrastructure manifest
  • Advanced wrap testing with Polywrap Workflows and the polywrap.test.yaml manifest

If at any time in this process you get stuck or have questions, please reach out to us on Discord.

Prerequisites​

If you haven't already, you'll need to install the Polywrap CLI. We'll be using it throughout the tutorial.

To build your wrap without installing additional dependencies, you will need Docker and Docker Compose.

The Polywrap CLI uses Docker by default, and we will use it in this tutorial. You can learn how to build a wrap without Docker in Configure Polywrap build pipeline.

Next Steps​

The next section will show you how to start a new wrap project.