This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import FlowService from "./flow.service"; | |
| // Here is the configuration file for fixes. | |
| import flowJSON from "@/flow.json" assert { type: "json" }; | |
| let _instance: FlowService; | |
| export async function getFlowInstance(): Promise<FlowService> { | |
| if (!_instance) { | |
| _instance = new FlowService(flowJSON); | |
| await _instance.onModuleInit(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| charStringToUint8Array, | |
| hexStringToUint8Array, | |
| } from './utilities.ts'; | |
| import nacl from 'tweetnacl'; | |
| import { atob } from 'js-base64'; | |
| export function parseQueryStr(initData: string): Record<string, string> { | |
| const data = initData || import.meta.env.PUBLIC_TELEGRAM_USER_DATA; // For test using PUBLIC_TELEGRAM_USER_DATA env | |
| const result: Record<string, string> = {}; |
OlderNewer