@@ -76,9 +76,69 @@ const wallet = new NodeArweaveWallet({
7676 port: 3737 , // Optional: port number (default: 3737, use 0 for random)
7777 freePort: false , // Optional: auto-free port if in use (default: false)
7878 requestTimeout: 300000 , // Optional: request timeout in ms (default: 5 minutes)
79+ browser: ' chrome' , // Optional: specify browser (default: system default)
80+ browserProfile: ' Work' , // Optional: specify browser profile
7981})
8082```
8183
84+ ** Browser Options:**
85+
86+ You can specify which browser to open for wallet connection:
87+
88+ ``` typescript
89+ // Use a specific browser by name
90+ const wallet = new NodeArweaveWallet ({ browser: ' chrome' }) // Google Chrome
91+ const wallet = new NodeArweaveWallet ({ browser: ' firefox' }) // Firefox
92+ const wallet = new NodeArweaveWallet ({ browser: ' safari' }) // Safari (macOS)
93+ const wallet = new NodeArweaveWallet ({ browser: ' edge' }) // Microsoft Edge
94+ const wallet = new NodeArweaveWallet ({ browser: ' brave' }) // Brave Browser
95+ const wallet = new NodeArweaveWallet ({ browser: ' opera' }) // Opera
96+
97+ // Use a custom browser path
98+ const wallet = new NodeArweaveWallet ({
99+ browser: ' /Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
100+ })
101+
102+ // Disable auto-opening (you'll need to open the URL manually)
103+ const wallet = new NodeArweaveWallet ({ browser: false })
104+ ```
105+
106+ ** Browser Profile Options:**
107+
108+ You can also specify a browser profile to use:
109+
110+ ``` typescript
111+ // Chrome/Edge/Brave - use profile directory name (NOT the display name!)
112+ const wallet = new NodeArweaveWallet ({
113+ browser: ' chrome' ,
114+ browserProfile: ' Profile 1' // or 'Default', 'Profile 2', etc.
115+ })
116+
117+ // Firefox - use profile name
118+ const wallet = new NodeArweaveWallet ({
119+ browser: ' firefox' ,
120+ browserProfile: ' dev-edition-default' // or your custom profile name
121+ })
122+ ```
123+
124+ ** Important:** The library automatically resolves display names to directory names for Chrome/Edge/Brave!
125+
126+ - ** Chrome/Edge/Brave:** You can use either the display name ("Work") or directory name ("Profile 2")
127+ - ** Firefox:** Use the profile name exactly as shown in the profile manager
128+
129+ ** How to find your profile name:**
130+
131+ 1 . ** Chrome/Edge/Brave:**
132+ - Open ` chrome://version/ ` (or ` edge://version/ ` , ` brave://version/ ` )
133+ - Look for "Profile Path"
134+ - You can use either:
135+ - The display name shown in the browser UI: ` 'Work' ` , ` 'Personal' `
136+ - The directory name (last part of path): ` 'Default' ` , ` 'Profile 1' ` , ` 'Profile 2' `
137+
138+ 2 . ** Firefox:**
139+ - Run ` firefox -P ` to open the profile manager
140+ - Use the exact profile name shown (e.g., ` 'default-release' ` , ` 'dev-edition-default' ` )
141+
82142#### ` wallet.initialize() `
83143
84144Starts the local server and opens the browser for wallet connection.
0 commit comments