Skip to main content

Ronin Wallet JS SDK


This page contains a full list of methods and properties provided by the Ronin Wallet JavaScript SDK.


You can pass options when constructing a WalletSDK instance.


const sdk = new WalletSDK({
mobileOptions: {
walletConnectProjectId: 'd2ef97836db7eb390bcb2c1e9847ecdc',
useDeeplink: false
dappMetadata: {
url: window.location.origin,
icon: 'https://example-dapp/assets/logo.png',
name: 'Example dApp',
description: 'This is a test dApp',
Option nameTypeRequiredDescription
dappMetadataDappMetadataoptionalUsed for displaying the dApp's information on the connection popup in Ronin Wallet.
mobileOptionsMobileOptionsoptionalSet these options only if you want to connect to the mobile Ronin Wallet.



Specifies information you want to display when connecting to Ronin Wallet. If not defined, the data is fetched from HTML by default.

KeyTypeDefault valueRequiredDescription
urlstringrequiredURL of the dApp, similar to window.location.origin.
namestringrequiredTitle of the dApp, similar to document.title.
iconstringoptionalURL of the dApp's logo.
descriptionstringoptionalShort description of the dApp.


KeyTypeDefault valueRequiredDescription
useDeeplinkbooleanoptionalSet it to true if you want to use a deep link instead of a universal link.
walletConnectProjectIdstringrequiredThis is mandatory if you want to connect to the mobile Ronin Wallet. Check WalletConnect instruction on how to obtain a project ID.


Response data after connecting.

KeyTypeDefault valueRequiredDescription
accountsstring[]requiredList of approved accounts.
chainIdnumberrequiredCurrent chain ID in Ronin Wallet.



connectMobile(): Promise<InitialData>

Emits an event when connection is ready. You must provide mobileOptions before calling this method.


connectInjected(): Promise<InitialData>

May return an empty array if the wallet is locked. If you want the extension popup to show, use requestAccounts.


connect(): Promise<InitialData>

Automatically initializes connection based on the environment.

getDeeplink(): string | undefined

Returns a deep link or universal link based on the provided mobileOptions.useDeeplink.

You must call this method after connectMobile() is called and WCEvent.DISPLAY_URI is emitted.


disconnect(): Promise<void>

Disconnects the current session and cleans up.


requestAccounts(): Promise<string[]>

Returns the approved accounts. If the wallet is locked, an extension popup is displayed.


getAccounts(): Promise<string[]>

Returns the approved accounts.


getChainId(): Promise<number>

  • Ronin Wallet extension: returns the current chain ID.
  • Ronin Wallet mobile app: returns the chain ID as of the last time the wallet was active.


getProvider(): EIP1193Provider

Returns an instance of EIP1193Provider. This method is useful when you want to make custom requests.


request(args: RequestArguments, autoOpenMobileApp = true): Promise<unknown>

Sends a JsonRpcRequest and opens the Ronin Wallet mobile app automatically when possible.


openMobileApp(url: string, target = '_self', autoClose = true'): void

Opens the Ronin Wallet mobile app using a universal link by default.

Was this page helpful?
Happy React is loading...