@privy-io/server-auth
Version:
Server-side client for the Privy API
2 lines (1 loc) • 2.46 kB
JavaScript
const s=s=>`/api/v1/users/${s}`,a=({cursor:s,limit:a=100}={})=>{let e=new URLSearchParams;return s&&e.append("cursor",s),a&&e.append("limit",String(a)),`/api/v1/users?${e.toString()}`},e=s=>`/api/v1/apps/${s}/users/wallet`,i=()=>"/api/v1/users",p=()=>"/api/v1/users/search",r=()=>"/api/v1/users/wallet/address",t=()=>"/api/v1/users/smart_wallet/address",l=()=>"/api/v1/users/farcaster/fid",u=s=>`/api/v1/apps/${s}`,v=s=>`${u(s)}/allowlist`,c=s=>`/api/v1/apps/${s}/test_credentials`,o=()=>"/api/v1/passwordless/authenticate",$=()=>"/api/v1/users/email/address",m=()=>"/api/v1/users/phone/number",n=()=>"/api/v1/users/discord/username",d=()=>"/api/v1/users/github/username",w=()=>"/api/v1/users/twitter/username",g=()=>"/api/v1/users/twitter/subject",h=()=>"/api/v1/users/custom_auth/id",_=()=>"/api/v1/users/telegram/telegram_user_id",b=()=>"/api/v1/users/telegram/username",S=s=>`/api/v1/users/${s}/custom_metadata`,f=s=>`/api/v1/wallets/${s}`,j=()=>"/api/v1/wallets",x=()=>"/api/v1/wallets",L=s=>`/api/v1/wallets/${s}`,P=()=>"/api/v1/wallets/import/init",R=()=>"/api/v1/wallets/import/submit",U=s=>`/api/v1/wallets/${s}/rpc`,k=s=>`/api/v1/transactions/${s}`,q=()=>"/api/v1/policies",y=s=>`/api/v1/policies/${s}`,z=s=>`/api/v1/policies/${s}`,A=s=>`/api/v1/policies/${s}`,B=s=>`/api/v1/policies/${s}/rules`,C=(s,a)=>`/api/v1/policies/${s}/rules/${a}`,D=(s,a)=>`/api/v1/policies/${s}/rules/${a}`,E=s=>`/api/v1/policies/${s}/rules`;export{v as allowlistPath,u as appSettingsPath,q as createPolicyPath,B as createPolicyRulePath,e as createWalletsPath,A as deletePolicyPath,D as deletePolicyRulePath,y as getPolicyPath,E as getPolicyRulePath,c as getTestCredentialsPath,k as getTransactionGetPath,h as getUserByCustomAuthIdPath,n as getUserByDiscordUsernamePath,$ as getUserByEmailPath,l as getUserByFarcasterIdPath,d as getUserByGithubUsernamePath,m as getUserByPhoneNumberPath,t as getUserBySmartWalletAddressPath,_ as getUserByTelegramUserIdPath,b as getUserByTelegramUsernamePath,g as getUserByTwitterSubjectPath,w as getUserByTwitterUsernamePath,r as getUserByWalletAddressPath,x as getWalletApiCreatePath,f as getWalletApiGetPath,P as getWalletApiImportInitPath,R as getWalletApiImportSubmitPath,U as getWalletApiRpcPath,j as getWalletApiSearchPath,L as getWalletApiUpdatePath,i as importUserPath,o as passwordlessAuthenticatePath,p as searchUsersPath,S as setCustomMetadataPath,z as updatePolicyPath,C as updatePolicyRulePath,s as userPath,a as usersPath};