百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rair-sdk

> 编程语言
开源

用于 RAIR 协议的简单开发者 SDK

1.3K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于 RAIR 协议的简单开发者 SDK

Deploying Vibe Frontend Quickly

Clone this repository on your own GitHub account and deploy it to Netlify:

rair-sdk

Simple developer SDK for RAIRprotocol. Note: Before you start you need an Admin NFT which can be minted here using Metamask and a small amount of Base Gas. If you need Base Gas please reach out to us. https://rairprotocol.xyz/collection/0x2105/0xfc3666266d129504dd6c713f9bce107747ae4aee/0/0

Getting started

bash
npm install @rair-protocol/sdk

After installing, you can import and initialize the SDK:

typescript
import { RairSDK } from "@rair-protocol/sdk";

const settings = {
  serverURL, // URL for backend. Default sandbox URL to try if you haven't deployed your own backend rair-node yet http://35.226.25.117:5000
  socketURL, // URL for socket. http://35.226.25.117:8080
};

export const rairSDK = new RairSDK(settings);

After Initializng the SDK here are the first things you can do to get a working dApp

1. Empty dApp with Authentication working (default frontend)

Follow these steps below to deploy our existing sample application

typescript
const getChallenge = async (userAddress: Hex, ownerAddress?: Hex) => {
  const responseData = await rairSDK.auth.getChallenge({  // use getChallenge from auth folder
    userAddress: userAddress,
    intent: "login",
    ownerAddress: ownerAddress || userAddress,
  });
  return responseData.response;
};

All requests what you need to use you can find in src/API

Some example:

For user lists

typescript
const { data } = await rairSDK.users.listUsers();

Request with arguments

typescript
const responseData = await rairSDK.notifications.listNotifications({
      pageNum: pageNum,
    });

To use the SDK you need to use rairSDK(exported above), select the desired file with requests and select the request Example: file - src/API/users request - findUserByUserAddress

Result:

typescript
const userDataResponse = await rairSDK.users.findUserByUserAddress({
        publicAddress: loginData.userAddress,
      });

publicAddress is a required argument in this request

2. Example of deploying your own frontend that interacts with our SDK to make a new dApp

Demo project for rair sdk - https://github.com/rairprotocol/rair-official-library/tree/main/demo-rair-sdk

make git clone https://github.com/rairprotocol/rair-official-library/tree/main/demo-rair-sdk and yarn and yarn start

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言