diff --git a/README.md b/README.md index 7c48789646..bbcbb742ec 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,15 @@ This repo is constructed using yarn workspaces and consists of the 4 sections: You will need -- Node (>=18): https://nodejs.org/en/download/ +- Node (>=21): https://nodejs.org/en/download/ - Yarn (v1.22.5 or newer): https://classic.yarnpkg.com/en/docs/install ## Build the extension -To simply build a production version of the extension, install the prerequisites then navigate to this root folder in your command line and run these 2 steps: +To simply build a production version of the extension, install the prerequisites then navigate to this root folder (`/freighter`) in your command line and run these 2 steps: ``` +yarn install yarn setup ``` @@ -47,7 +48,7 @@ This will start up multiple watching builds in parallel: - The docs, serving on `localhost:3000` - A dev server with the webapp running in the extension, serving on `localhost:9000` -- The actual built extension, able to be installed in Chrome, in `build/` +- The actual built extension, able to be installed in Chrome or Firefox, in `build/` Each of these will build in response to editing their source. @@ -70,12 +71,21 @@ an individual workspace. ### Useful URLs: +[Configure the backend](https://github.com/stellar/freighter/blob/master/extension/README.md#configure-the-backend) + +[Build the extension and install it on your machine](https://github.com/stellar/freighter/blob/master/extension/README.md#build-the-extension-and-install-it-on-your-machine) + [The popup webapp](http://localhost:9000/#/) -[The `getPublicKey` playground](http://localhost:3000/docs/playground/getPublicKey) +[The `setAllowed` playground](http://localhost:3000/docs/playground/setAllowed) + +[The `requestAccess` playground](http://localhost:3000/docs/playground/requestAccess) + +[The `getAddress` playground](http://localhost:3000/docs/playground/getAddress) + [The `signTransaction` playground](http://localhost:3000/docs/playground/signTransaction) -It's important to note that these two won't interact with the _dev server_ popup +It's important to note that these last functions won't interact with the _dev server_ popup UI on `localhost:9000` — you'll need to re-install the unpacked extension each time you make a change. diff --git a/docs/docs/guide/developingForSoroban.md b/docs/docs/guide/developingForSoroban.md index b6d7606c30..21046b74e5 100644 --- a/docs/docs/guide/developingForSoroban.md +++ b/docs/docs/guide/developingForSoroban.md @@ -36,7 +36,7 @@ import { /* For this example, we are assuming the token adheres to the interface documented in SEP-0041 */ const generateTransferXdr = (contractId, serverUrl, publicKey, destination, amount, fee, networkPassphrase, memo) => { - // the contract id of the the token + // the contract id of the token const contract = new Contract(contractId); const server = new SorobanRpc.Server(serverUrl); diff --git a/docs/docs/guide/gettingStarted.md b/docs/docs/guide/gettingStarted.md index 9fa71d0fe4..1ddb423ba2 100644 --- a/docs/docs/guide/gettingStarted.md +++ b/docs/docs/guide/gettingStarted.md @@ -26,7 +26,7 @@ or #### For browser-based applications -- Install the packaged library via script tag using cdnjs, swapping in the desired version number for `{version}`: +- Install the packaged library via `script` tag using cdnjs, swapping in the [desired version number](https://www.npmjs.com/package/@stellar/freighter-api?activeTab=versions) for `{version}`: _NOTE:_ You must use version `1.1.2` or above diff --git a/docs/docs/guide/signXdr.md b/docs/docs/guide/signXdr.md index bd71b0c187..fff0de215e 100644 --- a/docs/docs/guide/signXdr.md +++ b/docs/docs/guide/signXdr.md @@ -15,6 +15,6 @@ You can serialize an assembled transaction to a base64 encoded xdr string using During the transaction/operation review, you can review signing details at different fidelities. -- Summary: The first tab is the summary tab which lays out high level trasnsction/operation details. +- Summary: The first tab is the summary tab which lays out high level transaction/operation details. - Operation Details: The second tab exposes information about the operations in the transaction and optionally walks through the invocation chain and highlights authorizations. - Raw XDR: The last tab lets you copy the raw XDR to be used outside of Freighter. diff --git a/docs/docs/guide/usingFreighterBrowser.mdx b/docs/docs/guide/usingFreighterBrowser.mdx index 7ba4c4bfdc..ed48896ddd 100644 --- a/docs/docs/guide/usingFreighterBrowser.mdx +++ b/docs/docs/guide/usingFreighterBrowser.mdx @@ -11,14 +11,12 @@ We now have an extension installed on our machine and a library to interact with First import the library in the `` tag of your page. -- Install the packaged library via script tag using cdnjs, swapping in the desired version number for `{version}` - -_NOTE:_ You must use version `1.1.2` or above - -For example, include the `script` in your `head` tag using the following code: +Install the packaged library via `script` tag using cdnjs. For example, use the following code to install the [latest freighter api version](https://www.npmjs.com/package/@stellar/freighter-api?activeTab=versions): +_NOTE:_ You can swap in another desired version number but you must use at least version `1.1.2` or above. + This will expose a global variable called `window.freighterApi` that will contain our library. The call signatures will be exactly the same as the [node version](./usingFreighterWebApp), but you will call the methods directly from `window.freighterApi`: diff --git a/docs/docs/guide/usingFreighterWebApp.md b/docs/docs/guide/usingFreighterWebApp.md index 0ee7db0a2d..c0aaf543eb 100644 --- a/docs/docs/guide/usingFreighterWebApp.md +++ b/docs/docs/guide/usingFreighterWebApp.md @@ -295,7 +295,7 @@ const response = await server.submitTransaction(transactionToSubmit); #### `WatchWalletChanges -> new WatchWalletChanges(timeout?: number)` -The class `WatchWalletChanges` provides methods to watch changes from Freighter. To use this class, first instantiate with with an optional `timeout` param to determine how often you want to check for changes in the wallet. The default is `3000` ms. +The class `WatchWalletChanges` provides methods to watch changes from Freighter. To use this class, first instantiate with an optional `timeout` param to determine how often you want to check for changes in the wallet. The default is `3000` ms. ##### `WatchWalletChanges.watch(callback: ({ address: string; network: string; networkPassphrase; string }) => void)` diff --git a/extension/README.md b/extension/README.md index bc85845162..b0698adc22 100755 --- a/extension/README.md +++ b/extension/README.md @@ -45,8 +45,8 @@ To install on Chrome: 4. Click `Load Unpacked` and it will open your file system. -5. Navigate to this folder and click the `build` folder. Hit `Select`. You - should now see an icon for Freighter in Chrome. +5. Navigate to this folder (`/extension`) and click the `build` folder. Hit + `Select`. You should now see an icon for Freighter in Chrome. To install on Firefox: @@ -54,8 +54,9 @@ To install on Firefox: 2. Click `Load Temporary Add-On` -3. Navigate to this folder and open the `build` folder and find `manifest.json`. - Hit `Select`. You should now see an icon for Freighter in Firefox +3. Navigate to this folder (`/extension`) and open the `build` folder and find + `manifest.json`. Hit `Select`. You should now see an icon for Freighter in + Firefox ### Build the extension using production settings @@ -148,7 +149,7 @@ of these are located in the `src/` folder: uninstall/reload). It is run in a headless browser, so it has access to all Web APIs. It also has accessible dev tools, which can be reached by going to `chrome://extensions/` or `about:debugging#/runtime/this-firefox` and - clicking `Inspect` + clicking `service worker` 3. The `content script` that allows external sites to send and receive messages to `background`. Using an event listener, it waits for an application to diff --git a/extension/src/popup/locales/en/translation.json b/extension/src/popup/locales/en/translation.json index b9d434fa5e..87c3bfb474 100644 --- a/extension/src/popup/locales/en/translation.json +++ b/extension/src/popup/locales/en/translation.json @@ -14,6 +14,7 @@ "Add": "Add", "Add address": "Add address", "Add an asset": "Add an asset", + "Add anyway": "Add anyway", "Add asset": "Add asset", "Add Asset trustline": "Add Asset trustline", "Add Asset Trustline": "Add Asset Trustline", @@ -200,6 +201,10 @@ "Got it": "Got it", "Hash": "Hash", "Help": "Help", + "Hide payments smaller than 0": { + "1 XLM": "Hide payments smaller than 0.1 XLM" + }, + "Hide small payments": "Hide small payments", "High Threshold": "High Threshold", "History": "History", "Home": "Home", diff --git a/extension/src/popup/locales/pt/translation.json b/extension/src/popup/locales/pt/translation.json index 06bc89376c..d9f588fd95 100644 --- a/extension/src/popup/locales/pt/translation.json +++ b/extension/src/popup/locales/pt/translation.json @@ -14,6 +14,7 @@ "Add": "Add", "Add address": "Add address", "Add an asset": "Add an asset", + "Add anyway": "Add anyway", "Add asset": "Add asset", "Add Asset trustline": "Add Asset trustline", "Add Asset Trustline": "Add Asset Trustline", @@ -200,6 +201,10 @@ "Got it": "Got it", "Hash": "Hash", "Help": "Help", + "Hide payments smaller than 0": { + "1 XLM": "Hide payments smaller than 0.1 XLM" + }, + "Hide small payments": "Hide small payments", "High Threshold": "High Threshold", "History": "History", "Home": "Home",