kodadot/nft-gallery

View on GitHub
services/farcaster.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { createAppClient, viemConnector } from '@farcaster/auth-client'

export const appClient = createAppClient({
  relay: 'https://relay.farcaster.xyz',
  ethereum: viemConnector(),
})

export const createChannel = () =>
  appClient.createChannel({
    siweUri: window.location.origin,
    domain: window.location.host,
    expirationTime: new Date(Date.now() + 1000 * 60 * 5).toISOString(), // 5 minutes
  })