sdk-monorepo/test/preload.ts
T-Hax 9419f0673c Monorepository has been setup
Signed-off-by: T-Hax <>
2023-05-02 22:19:28 +00:00

18 lines
377 B
TypeScript

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
}