learning_ai_invt_trdg/shared/platform-mobile.ts

22 lines
715 B
TypeScript

import { createKillSwitchClient } from '@bytelyst/kill-switch-client';
import { createRNPlatformSDK } from '@bytelyst/react-native-platform-sdk';
import { getRuntimeEnvironment } from './runtime.js';
export function createTradingKillSwitchClient(platform: 'web' | 'mobile') {
const runtime = getRuntimeEnvironment(platform);
return createKillSwitchClient({
baseUrl: runtime.platformApiUrl,
productId: runtime.productId,
platform,
});
}
export function createTradingMobileSdk(getAccessToken: () => string | null) {
const runtime = getRuntimeEnvironment('mobile');
return createRNPlatformSDK({
baseURL: runtime.platformApiUrl,
productId: runtime.productId,
getAccessToken,
});
}