sdk-monorepo/test/preload.ts

18 lines
377 B
TypeScript
Raw Normal View History

import { Relayer, RegularHttpClient } from '@tornado/sdk-web'
import * as dotenv from 'dotenv'
dotenv.config()
export async function initializeRelayer(
name: string,
httpClient = new RegularHttpClient()
): Promise<Relayer> {
const relayer = new Relayer({
url: 'https://' + name,
httpClient: httpClient
})
await relayer.fetchProperties()
return relayer
}