config is a class that contains the configuration for the JoyID SDK. You should call config function in your app's entry file to set the configuration.

React App
import ReactDOM from 'react-dom'import { config } from '@joyid/core'config.setNetwork('mainnet') // or 'testnet'const root = ReactDOM.createRoot(document.getElementById('root'));root.render(<h1>Hello, world!</h1>);
Vue App
import { createApp } from 'vue'import App from './App.vue'import { config } from '@joyid/core'config.setNetwork('mainnet') // or 'testnet'const app = createApp(App)

For most of the cases, you only need to set the network configuration manually. If config is not set, the default value is testnet.

config.setNetwork(network: 'mainnet' | 'testnet')

Set the network to use.

config.setJoyIDAppURL(url: string)

Set JoyID App URL.

config.setJoyIDServerURL(url: string)

Set JoyID Server URL.