Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
import { ArcanaProvider } from './provider'
import IframeWrapper from './iframeWrapper'
import {
getErrorReporter,
constructLoginUrl,
getCurrentUrl,
getConstructorParams,
removeHexPrefix,
getCurrentUrl,
getErrorReporter,
getParamsFromClientId,
isClientId,
preLoadIframe,
removeHexPrefix,
validateAppAddress,
isClientId,
getParamsFromClientId,
} from './utils'
import { getNetworkConfig, getRpcConfig } from './config'
import {
AppConfig,
AppMode,
ConstructorParams,
ChainConfigInput,
ChainType,
ConstructorParams,
EthereumProvider,
InitStatus,
Logins,
NetworkConfig,
Position,
RpcConfig,
Theme,
ThemeConfig,
UserInfo,
InitStatus,
Logins,
EthereumProvider,
WalletType,
} from './typings'
import { getAppInfo, getImageUrls } from './appInfo'
import { ErrorNotInitialized, ArcanaAuthError } from './errors'
import { ArcanaAuthError, ErrorNotInitialized } from './errors'
import { LOG_LEVEL, setExceptionReporter, setLogLevel } from './logger'
import { Chain } from './chainList'
import Popup from './popup'
Expand Down Expand Up @@ -319,6 +320,7 @@ class AuthProvider {
)
this.appConfig = {
name: appInfo.name,
chainType: ChainType.solana_cv25519,
themeConfig: {
assets: {
logo: {
Expand Down Expand Up @@ -395,8 +397,10 @@ export {
Chain as CHAIN,
EthereumProvider,
AppConfig,
AppMode,
Theme,
Position,
ChainType,
RpcConfig,
Logins,
UserInfo,
Expand Down
6 changes: 6 additions & 0 deletions src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface AppInfo {
export interface AppConfig {
name: string
themeConfig: ThemeConfig
chainType: ChainType
}

export interface UserInfo {
Expand Down Expand Up @@ -168,6 +169,11 @@ export enum AppMode {
Full = 2,
}

export enum ChainType {
evm_secp256k1,
solana_cv25519,
}

export const ModeWalletTypeRelation = {
[WalletType.UI]: [AppMode.Widget, AppMode.Full],
[WalletType.NoUI]: [AppMode.NoUI],
Expand Down