@linenext/dapp-portal-sdk
Version:
Dapp Portal SDK
85 lines (84 loc) • 2.33 kB
TypeScript
export type DappPortalSDKClientConfig = {
clientId: string;
chainId?: string;
chainNodeRpcEndpoint?: string;
sdkBaseUrl?: string;
};
export type KaiaWalletMobileConfig = {
iosAppId: string;
androidPackageName: string;
appleBundleId: string;
urlScheme: string;
};
export type LiffWalletConfig = {
baseUrl: {
compact: string;
tall: string;
full: string;
};
defaultLiffType: 'compact' | 'tall' | 'full';
liffTypeByRequestMethod: {
[key: string]: 'compact' | 'tall' | 'full';
};
};
export type DappPortalSDKConfig = {
clientId: string;
chainId: string;
sdkUIUrls: {
walletSelect: string;
mobileWalletBridge: string;
browserGuide: string;
miniDappConnectWeb: string;
miniDappConnectLiff: string;
miniDappConnectWebV2: string;
miniDappConnectLiffV2: string;
};
relayServerConfig: {
baseUrl: string;
relaySessionTimeout: number;
maxRetryCount: number;
};
paymentServerConfig: {
baseUrl: string;
maxRetryCount: number;
};
metricServerConfig: {
baseUrl: string;
};
stripePopupSize: {
width: number;
height: number;
};
paymentHistoryPopupConfig: {
webUrl: string;
liffUrl: string;
popupSize: {
width: number;
height: number;
};
};
liffWalletConfig: LiffWalletConfig;
kaiaWalletMobileConfig: KaiaWalletMobileConfig;
chainNodeRpcEndpoint: string;
webWalletConfig: {
baseUrl: string;
popupSize: {
width: number;
height: number;
};
};
walletHandledMethods: string[];
kaiaOnlyMethods: string[];
methodsShouldSyncChain: string[];
feeDelegatedTxTypes: number[];
methodsShouldAttachTxTypeParamsWhenRequestToExtension: string[];
methodsShouldConvertInputFieldToDataFieldWhenRequestToExtension: string[];
txTypesShouldConvertInputFieldToDataFieldWhenRequestToExtension: number[];
blockedMethods: {
[key: string]: object;
};
blockedBrowsersUserAgent: {
[name: string]: string[];
};
};
export declare function buildDappPortalSDKConfig(clientConfig: DappPortalSDKClientConfig): Promise<DappPortalSDKConfig>;