Skip to content

Magickbase/platform-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magickbase Platform API

Usage with tRPC

import { TRPCRouter } from '@magickbase/p';
import { createTRPCClient, httpBatchLink } from '@trpc/client';
import SuperJSON from 'superjson';

const client = createTRPCClient<TRPCRouter>({
  links: [
    httpBatchLink({
      url: `https://api-endpoint.domain/api/trpc`,
      transformer: SuperJSON,
      headers: {
        Authorization: `Bearer <my-token>`,
      },
    }),
  ],
});

It is recommended to use tRPC and TypeScript to interact with the platform API for a better development experience

Import this Repo

{
  "dependencies": {
    "@magickbase/p": "github:magickbase/platform-api"
  }
}

About

Web3Platform API client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published