UNPKG

@follow-app/client-sdk

Version:

TypeScript client SDK for Follow RSS Server API

84 lines (68 loc) 2.14 kB
import { defineModule, defineRoute } from "../../shared/define-module" import type { AirdropClaimResponse, AirdropGetResponse, AirdropUpdateResponse, ClaimCheckResponse, ClaimDailyResponse, PowerPriceResponse, TipRequest, TipResponse, TransactionQuery, TransactionsGetResponse, WalletRankingQuery, WalletRankingResponse, WalletsGetResponse, WalletsPostResponse, WalletsRefreshResponse, WithdrawRequest, WithdrawResponse, } from "./types" /** * Wallets module definition - Web3 wallet operations and transactions */ export const walletsModule = defineModule({ name: "wallets", prefix: "/wallets", routes: { // Basic wallet operations get: defineRoute<never, WalletsGetResponse>("GET", "/"), post: defineRoute<never, WalletsPostResponse>("POST", "/"), refresh: defineRoute<never, WalletsRefreshResponse>("POST", "/refresh"), ranking: defineRoute<WalletRankingQuery, WalletRankingResponse>( "GET", "/ranking", ), powerPrice: defineRoute<never, PowerPriceResponse>("GET", "/power-price"), // Transaction operations (nested) transactions: { get: defineRoute<TransactionQuery, TransactionsGetResponse>( "GET", "/transactions", ), tip: defineRoute<TipRequest, TipResponse>("POST", "/transactions/tip"), claimDaily: defineRoute<never, ClaimDailyResponse>( "POST", "/transactions/claim-daily", ), withdraw: defineRoute<WithdrawRequest, WithdrawResponse>( "POST", "/transactions/withdraw", ), claimCheck: defineRoute<never, ClaimCheckResponse>( "GET", "/transactions/claim-check", ), }, // Airdrop operations (nested) airdrop: { get: defineRoute<never, AirdropGetResponse>("GET", "/airdrop"), claim: defineRoute<never, AirdropClaimResponse>("POST", "/airdrop"), update: defineRoute<never, AirdropUpdateResponse>("PUT", "/airdrop"), }, }, }) // Export the API type export type WalletsAPI = typeof walletsModule.api // Re-export types for external consumption export type * from "./types"