πŸš€ Getting Started

We offer two APIs: a general Typescript API, and one specifically for React. You can use this Typescript API in any Node.js app, and the React API supports both queries, suspense queries, and mutations

Installation

pnpm install @owlprotocol/core-trpc

Note: we recommend using pnpminstead of npm, but you can also use npm to install our package (pnpm)

Typescript API

Import and initialize the client:

import { createClient } from "@owlprotocol/core-trpc";
const client = createClient({apiKey: "API_KEY"})

// Example query
const contract = await client.collection.deploy.mutate({
    chainId,
    name: "My Collection",
    symbol: "MY",
});

Using the Typescript API requires having a Project API key. To do so, you need to log into the dashboard, create a project if you haven’t done so yet, and copy your project API key.

Sample API functions

Endpoints (client.)Information
collection.deploy.mutateDeploy collection
collection.erc721AutoId.templateMintBatch.mutateMint collection assets from template (ERC721AutoId)
projectTokenTemplate.createOrSet.mutateCreate or set project token template
projectUser.createOrSet.mutateCreate or set project user
projectUser.get.queryGet project user
teamMember.create.mutateCreate team member

React API

Under development