9419f0673c
Signed-off-by: T-Hax <>
18 lines
377 B
TypeScript
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
|
|
}
|