diff --git a/api/methods/getEvents.mdx b/api/methods/getEvents.mdx index 41602a8d..e9ee6d51 100644 --- a/api/methods/getEvents.mdx +++ b/api/methods/getEvents.mdx @@ -26,7 +26,7 @@ By default soroban-rpc retains the most recent 24 hours of events. - A `SegmentMatcher` is one of the following: - For an exact segment match, a string containing base64-encoded ScVal - For a wildcard single-segment match, the string "*", matches exactly one segment. - - Examples of matching token transfer events. Events are emitted here: [rs-soroban-env/event.rs at 924d86cacd58b8a162344bfe0ab37d9668f5d629]. I've decoded the base64-encoded ScVals for easier reading (both the symbols and addresses). In real usage, the `ScSymbol("transfer").toXdr().toString("base64")`, and `ScBinary(pubkeyBytes).toXdr().toString("base64")`, would be base64 encoded strings for exact matches. For example: + - Examples of matching token transfer events. Events are emitted here: [rs-soroban-env/event.rs @ `924d86c`], with base64-encoded ScVals decoded for easier reading (both the symbols and addresses). In real usage, the `ScSymbol("transfer").toXdr().toString("base64")`, and `ScBinary(pubkeyBytes).toXdr().toString("base64")`, would be base64-encoded strings for exact matches. For example: - `[ScSymbol("transfer"), "*", "*"]` - Matches any token transfer events - `[ScSymbol("transfer"), "*", "GABC...123"]` @@ -41,15 +41,14 @@ By default soroban-rpc retains the most recent 24 hours of events. - `latestLedger`: `` - Stringified-number of the current latest ledger observed by the node when this response was generated. - `events`: `` - `ledger`: `` - String-ified sequence number of the ledger. - - `ledgerClosedAt`: `` - ISO8601 timestamp of the ledger closing time. - - `contractId`: `` - ID of the emitting contract. + - `ledgerClosedAt`: `` - [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp of the ledger closing time. + - `contractId`: `` - StrKey ID (`C...`) of the emitting contract ([SEP-23](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0023.md#specification)). - `id`: `` - Unique identifier for this event. - The event's unique id field is based on a [`toid` from Horizon] as used in Horizon's /effects endpoint. - https://github.com/stellar/go/blob/master/services/horizon/internal/db2/history/effect.go#L58 - Specifically, it is a string containing: - - bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + `` + number for the event within the operation. - - For example: - - 1234-1 + - bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + `` + number for the event within the operation. + - For example: `1234-1` - `pagingToken`: `` - Duplicate of `id` field, but in the standard place for pagination tokens. - `inSuccessfulContractCall`: `` - If true the event was emitted during a successful contract call. - `topic`: `` - List containing the topic this event was emitted with. @@ -99,7 +98,7 @@ The examples below only returns two transfer events that took place to/from the "type": "contract", "ledger": "230010", "ledgerClosedAt": "2023-01-23T18:54:41Z", - "contractId": "d93f5c7bb0ebc4a9c8f727c5cebc4e41194d38257e1d0d910356b43bfc528813", + "contractId": "CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJZSODMCX4NJ2HV2KN7OHT", "id": "0000987885427757056-0000000001", "pagingToken": "0000987885427757056-0000000001", "inSuccessfulContractCall": true, @@ -116,7 +115,7 @@ The examples below only returns two transfer events that took place to/from the "type": "contract", "ledger": "230170", "ledgerClosedAt": "2023-01-23T19:08:37Z", - "contractId": "d93f5c7bb0ebc4a9c8f727c5cebc4e41194d38257e1d0d910356b43bfc528813", + "contractId": "CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJZSODMCX4NJ2HV2KN7OHT", "id": "0000988572622524416-0000000001", "pagingToken": "0000988572622524416-0000000001", "inSuccessfulContractCall": true, @@ -134,5 +133,5 @@ The examples below only returns two transfer events that took place to/from the } ``` -[rs-soroban-env/event.rs at 924d86cacd58b8a162344bfe0ab37d9668f5d629]: +[rs-soroban-env/event.rs @ `924d86c`]: [`toid` from Horizon]: diff --git a/api/methods/getLedgerEntries.mdx b/api/methods/getLedgerEntries.mdx index 3bb85dd8..29f87f70 100644 --- a/api/methods/getLedgerEntries.mdx +++ b/api/methods/getLedgerEntries.mdx @@ -17,10 +17,11 @@ To fetch contract wasm byte-code, use the ContractCode ledger entry key. ## Return - `` - - `entries`: Array containing the specified ledger entries which were found - - `key`: `` - The key of the ledger entry (serialized in a base64 string) - - `xdr`: `` - The current value of the given ledger entry (serialized in a base64 string) - - `lastModifiedLedgerSeq`: `` - The ledger number of the last time this entry was updated (optional) + - `entries`: Array containing the specified ledger entries which were found. + - `key`: `` - The key of the ledger entry (serialized in a base64 string). + - `xdr`: `` - The current value of the given ledger entry (serialized in a base64 string). + - `lastModifiedLedgerSeq`: `` - The ledger sequence number of the last time this entry was updated. + - `expirationLedgerSeq`: `` - The ledger sequence number after which the ledger entry would expire. This field exists only for ContractCodeEntry and ContractDataEntry ledger entries (optional). - `latestLedger`: `` - The current latest ledger observed by the node when this response was generated. ## Examples @@ -40,7 +41,8 @@ To fetch contract wasm byte-code, use the ContractCode ledger entry key. { "key": "AAAAB+qfy4GuVKKfazvyk4R9P9fpo2n9HICsr+xqvVcTF+DC", "xdr": "AAAABwAAAADqn8uBrlSin2s78pOEfT/X6aNp/RyArK/sar1XExfgwgAAAAphIGNvbnRyYWN0AAA=", - "lastModifiedLedgerSeq": "13" + "lastModifiedLedgerSeq": "13", + "expirationLedgerSeq": "95" } ], "latestLedger": "179436" @@ -381,7 +383,8 @@ And the response we get contains (even more) `LedgerEntryData` that we can decod { "key": "AAAAB2QWKBCU9yGjzDJNxaEZpxEB6A8XsD2S/lKK/sViOLiC", "xdr": "AAAABwAAAABkFigQlPcho8wyTcWhGacRAegPF7A9kv5Siv7FYji4ggAAAlQAYXNtAQAAAAEPA2ACfn4BfmABfgF+YAAAAgcBAXYBRwAAAwQDAQICBQMBABEGGQN/AUGAgMAAC38AQYWAwAALfwBBkIDAAAsHMQUGbWVtb3J5AgAFaGVsbG8AAQFfAAMKX19kYXRhX2VuZAMBC19faGVhcF9iYXNlAwIK4QID1gIDAn8CfgF/I4CAgIAAQSBrIgEkgICAgAACQAJAIACnQf8BcSICQQ5GDQAgAkHKAEcNAQtCACEDQXshAgNAAkACQAJAAkAgAkUNAEIBIQQgAkGFgMCAAGotAAAiBUHfAEYNAyAFrSEEIAVBUGpBCkkNAiAFQb9/akEaSQ0BAkAgBUGff2pBGk8NACAEQkV8IQQMBAsQgoCAgAAACyABIAA3AwggASADQgiGQg6ENwMAQQAhAgNAAkAgAkEQRw0AQQAhAgJAA0AgAkEQRg0BIAFBEGogAmogASACaikDADcDACACQQhqIQIMAAsLIAFBEGqtQiCGQgSEQoSAgIAgEICAgIAAIQQgAUEgaiSAgICAACAEDwsgAUEQaiACakICNwMAIAJBCGohAgwACwsgBEJLfCEEDAELIARCUnwhBAsgAkEBaiECIAQgA0IGhoQhAwwACwsAAAsEAAAACwIACwsOAQBBgIDAAAsFSGVsbG8AHhFjb250cmFjdGVudm1ldGF2MAAAAAAAAAAUAAAAJQBDDmNvbnRyYWN0c3BlY3YwAAAAAAAAAAAAAAAFaGVsbG8AAAAAAAABAAAAAAAAAAJ0bwAAAAAAEQAAAAEAAAPqAAAAEQ==", - "lastModifiedLedgerSeq": "75206" + "lastModifiedLedgerSeq": "75206", + "expirationLedgerSeq": "320384" } ], "latestLedger": "262384" diff --git a/dapps/dapp-challenges/challenge-0-crowdfund.mdx b/dapps/dapp-challenges/challenge-0-crowdfund.mdx index 1ac34492..72baccdc 100644 --- a/dapps/dapp-challenges/challenge-0-crowdfund.mdx +++ b/dapps/dapp-challenges/challenge-0-crowdfund.mdx @@ -12,8 +12,11 @@ import success from "../../static/img/success.png"; import backedResult from "../../static/img/backedResult.png"; import deployedDApp from "../../static/img/deployedDApp.png"; import { ParentChallengeForm } from "../../src/components/atoms/challenge-form"; +import { ParentChallengeContractForm } from "../../src/components/atoms/challenge-contract-form"; import CompleteStepButton from "../../src/components/atoms/complete-step-button"; import StartChallengeButton from "../../src/components/atoms/start-challenge-button"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; @@ -33,6 +36,7 @@ First, clone the Soroban Dapps Challenge repo and check out the `crowdfund` bran ```sh git clone https://github.com/stellar/soroban-dapps-challenge.git +cd soroban-dapps-challenge git checkout crowdfund ``` @@ -51,6 +55,7 @@ In your terminal, load the contracts and initialize them in the Sandbox environm ```sh npm run setup ``` + If the command runs successfully, your terminal will return a series of messages notifying you about the successful initialization of the contracts and the post-installation sequence. ```sh @@ -73,9 +78,7 @@ Please, save your deployed contract ID, you will need it to complete the challen ::: - - Mark smart contracts deployed - + ## Checkpoint 2: ๐Ÿค Connect the Frontend to the Backend @@ -97,45 +100,108 @@ You will need to add some Futurenet network lumens to your wallet to interact wi > Note: These are test lumens for use with Futurenet and cannot be used on Mainnet -## Checkpoint 3: ๐Ÿฆ Mint Tokens for the Crowdfunding Campaign +## Checkpoint 3: ๐ŸŒŸ Powering the Campaign + +Fuel the vision! In this step, you will learn how to mint tokens and fund the crowdfunding campaign. + + + + + + + + + +#### Open Dapp and Mint Open the dapp frontend and click on the "Mint 100 ABND" button. + + + + +#### Approve Transaction + You should see a popup from Freighter asking you to sign the transaction. Click on "Approve" and wait for the transaction to be confirmed. + + + + +#### Check Updated Balance + You should see an updated balance in the pledge component. -> Note: These are test tokens for use with Futurenet and cannot be used on Mainnet + + + + + -## Checkpoint 4: ๐Ÿ’ฐ Fund the Crowdfunding Campaign + -Now that you have your wallet set up, let's fund the crowdfunding campaign. + -Open the frontend and click on the "Back this project" button. You should see a popup from Freighter asking you to sign the transaction. + + +#### Fund the Campaign + +Now that you have your wallet set up, let's fund the crowdfunding campaign. Open the frontend and click on the "Back this project" button. You should see a popup from Freighter asking you to sign the transaction. -Click on "Approve" and wait for the transaction to be confirmed. + + + + +#### Approve Transaction -Once the transaction is confirmed, you should see a success message. +Click on "Approve" and wait for the transaction to be confirmed. Once the transaction is confirmed, you should see a success message. -You should see an updated balance in the amount you have pledged in the pledge component. + + + + +#### Check Updated Pledged Amount + +You should see an updated balance reflecting the amount you have pledged in the pledge component. + + + + + + + + +> Note: These are test tokens for use with Futurenet and cannot be used on Mainnet. + Funding completed -## Checkpoint 5: ๐Ÿšข Ship it! ๐Ÿš +## Checkpoint 4: ๐Ÿšข Ship it! ๐Ÿš Now that your dapp is fully functional, next prepare it for a new deployment on Futurenet, this time with a hosted frontend. @@ -151,7 +217,7 @@ Then run the dev server again: npm run dev ``` -Now, open your browser and visit [http://localhost:3000](http://localhost:3000). +Now, open your browser and visit [http://localhost:3000](http://localhost:3000). Ensure that you are connected to Futurenet and you should be able to see the frontend of your dapp! @@ -199,13 +265,13 @@ You can now visit the preview link to see your deployed dapp! ๐ŸŽ‰ -## Checkpoint 6: ๐Ÿ’ช Pass the Challenge! +## Checkpoint 5: ๐Ÿ’ช Pass the Challenge! Submit your public url to the challenge form and proceed to the next step to check your work. -
+
:::info @@ -213,25 +279,24 @@ Join [our Community in Discord](https://discord.gg/stellardev) in case you have ::: -## Checkpoint 7: โœ… Check your work! +## Checkpoint 6: โœ… Check your work! -In order to successfully complete this challenge, your work needs to be checked. -Please, follow this steps: +In order to successfully complete this challenge, your work needs to be checked. Please, follow this steps: 1. Fork [the challenge repository](https://github.com/stellar/soroban-dapps-challenge). -2. Fill `crowdfund/challenge/output.txt` file with your wallet address, contract ID and production url. -Filled file should look like: +2. Fill `crowdfund/challenge/output.txt` file with your wallet address. Filled file should look like: + ```sh -public key: GBSXUXZSA2VEXN5VGOWE5ODAJLC575JCMWRJ4FFRDWSTRCJ123456789 -contract Id: CBKY7UN5VGD4LIQFOBOTSUSQWK67BZZTA23NIEVWSWRR5SAT26JQN2BN -production: https://soroban-example-dapp-rho.vercel.app +Public Key: GBSXUXZSA2VEXN5VGOWE5ODAJLC575JCMWRJ4FFRDWSTRCJ123456789 ``` 3. Create a Pull Request to the `stellar/soroban-dapps-challenge/crowdfund` branch. When the PR will be created, CI actions will check the `crowdfund/challenge/output.txt` file data and update your progress. 4. Wait for the CI/CD pipeline results. 5. Fix errors if present: + - find the error reason in the Crowdfund challenge CI results (you can find a link right in the pull request); - return to your forked repository; - fix errors and commit changes. The existing PR will be checked again. + 6. If the pipeline was successful, then congratulations! You completed the challenge!๐Ÿ‘ Invite a friend to try out your dapp and ask them to provide feedback! diff --git a/dapps/dapp-challenges/challenge-1-payment.mdx b/dapps/dapp-challenges/challenge-1-payment.mdx index 2114336d..3ee1149b 100644 --- a/dapps/dapp-challenges/challenge-1-payment.mdx +++ b/dapps/dapp-challenges/challenge-1-payment.mdx @@ -21,8 +21,11 @@ import submit_pmt from "../../static/img/submit_pmt.png"; import end from "../../static/img/end.png"; import balance_rcvr from "../../static/img/balance_rcvr.png"; import { ParentChallengeForm } from "../../src/components/atoms/challenge-form"; +import { ParentChallengeContractForm } from "../../src/components/atoms/challenge-contract-form"; import CompleteStepButton from "../../src/components/atoms/complete-step-button"; import StartChallengeButton from "../../src/components/atoms/start-challenge-button"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem" @@ -42,6 +45,7 @@ Clone and set up the Example Soroban Payment Dapp repository: ```bash git clone https://github.com/stellar/soroban-dapps-challenge.git +cd soroban-dapps-challenge git checkout payment yarn ``` @@ -108,9 +112,7 @@ soroban contract invoke \ --amount 1000000000 ``` - - Mark smart contracts deployed - + ## Checkpoint 3: ๐Ÿ–ฅ๏ธ Launch the Frontend @@ -135,64 +137,96 @@ Now open your browser and navigate to `http://localhost:9000/`. You should see t connect -## Checkpoint 4: ๐Ÿ“ก Add the Token to Freighter +## Checkpoint 4: ๐Ÿš€ Token Transfer Odyssey + +Strap in and get ready to send some tokens! In this step, you will use the Payment Dapp to send Soroban tokens to another account. + + + + + + + + +#### ๐Ÿ“ก Connect Freighter to Payment Dapp Follow the steps in the [Connect a Wallet: Freighter](../guides/wallets.mdx) guide to connect Freighter to the Payment Dapp. + -Add the Soroban token to your Freighter wallet. To do this, open your Freighter wallet and click on the `Manage Assets` button at the bottom of the screen. + +#### Add Soroban Token +Open your Freighter wallet and click on the `Manage Assets` button at the bottom of the screen. manage assets Then click on the `Add Soroban token ` button and enter the token ID that was returned when you deployed the smart contracts. - add token -
- new token +
-You should now see the Soroban token in your Freighter wallet. + +#### Check Token Addition +You should now see the Soroban token in your Freighter wallet. added balance + -## Checkpoint 5: ๐Ÿฆ Send Tokens to Another Account +
+
-First, connect Freighter and Select the account that will be used to send Soroban tokens. + + -Click "next" to continue. + +#### Connect Freighter and Select Account +First, connect Freighter and Select the account that will be used to send Soroban tokens. +Click "next" to continue. next + -Provide the public key of the account that will receive the Soroban tokens. + + +#### Provide Token Transfer Details +Provide the public key of the account that will receive the Soroban tokens. payment destination Input the Token ID of the Soroban token. - choose token Input the amount of Soroban tokens to send. - select token Confirm the payment settings. - payment settings + -Review the transaction details to ensure accuracy and then click the "Sign with Freighter". Freighter will prompt you to sign the transaction with your wallet's private key. + +#### Confirm and Submit Transaction +Review the transaction details to ensure accuracy and then click the "Sign with Freighter". Freighter will prompt you to sign the transaction with your wallet's private key. confirm payment Once signed, click the "Submit Payment" button, and the transaction will be submitted to the network. - submit payment The Payment Dapp will show a confirmation message once the transaction has been successfully submitted. - end You can now check the balance of the receiving account to ensure that the transaction was successful. - balance receiver You can also check the balance of an account with the soroban-cli by running the following command: @@ -207,17 +241,24 @@ You can also check the balance of an account with the soroban-cli by running the --id ``` + Output: ```bash "1000000000" ``` + + + + +
+ - Tokens added + Tokens Sent -## Checkpoint 6: ๐Ÿšข Ship it! ๐Ÿš +## Checkpoint 5: ๐Ÿšข Ship it! ๐Ÿš You can upload your dapp to a hosting platform of your choice. You could use platforms like Netlify, Vercel, or even an AWS S3 bucket. @@ -269,13 +310,13 @@ You can now visit the preview link to see your deployed dapp! ๐ŸŽ‰ You will need to add some Futurenet network lumens to your Freighter wallet to interact with the deployed dapp. Visit [https://laboratory.stellar.org/#create-account](https://laboratory.stellar.org/#create-account), and follow the instructions to create your Freighter account on Futurenet. -## Checkpoint 7: โœ… Complete the Challenge! +## Checkpoint 6: โœ… Complete the Challenge! Submit your public URL to the challenge form. -
+
:::info @@ -283,7 +324,7 @@ Join [our Community in Discord](https://discord.gg/stellardev) in case you have ::: -## Checkpoint 8: ๐Ÿ’ช Share Your Accomplishment with the Community +## Checkpoint 7: ๐Ÿ’ช Share Your Accomplishment with the Community Don't forget to share your work with the community. Let others see what you've accomplished, receive feedback, and inspire others! @@ -312,4 +353,4 @@ To ensure that you've covered all the key user actions during the challenge, fol ## ๐Ÿ›ก๏ธ๐Ÿ—ก๏ธ Take On More Challenges -View your progress and take on more challenges by visiting your [User Dashboard!](/dashboard) \ No newline at end of file +View your progress and take on more challenges by visiting your [User Dashboard!](/dashboard) diff --git a/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx b/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx index e958eef6..19a039cd 100644 --- a/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx +++ b/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx @@ -14,6 +14,7 @@ import swapComplete from "../../static/img/swapComplete.png"; import futurenetDeployment from "../../static/img/futurenetDeployment.png"; import wdraw from "../../static/img/wdraw.png"; import { ParentChallengeForm } from "../../src/components/atoms/challenge-form"; +import { ParentChallengeContractForm } from "../../src/components/atoms/challenge-contract-form"; import CompleteStepButton from "../../src/components/atoms/complete-step-button"; import StartChallengeButton from "../../src/components/atoms/start-challenge-button"; @@ -37,8 +38,10 @@ First, clone the Soroban example dapp repo and navigate to the `liquidity-pool` ```bash git clone https://github.com/stellar/soroban-dapps-challenge +cd soroban-dapps-challenge git checkout liquidity-pool ``` + Then, install soroban-cli alias by running the following command: ```sh @@ -71,9 +74,7 @@ Done ... ``` - - Mark smart contracts deployed - + ## Checkpoint 2: ๐Ÿค Connect the Frontend to the Backend @@ -96,69 +97,189 @@ You will need to add some Futurenet network lumens to your wallet to interact wi > Note: These are test lumens for use on Futurenet and cannot be used on Mainnet -## Checkpoint 3: ๐Ÿฆ Mint Tokens for the Liquidity Pool +## Checkpoint 3: ๐ŸŒŠ Dive into the Liquidity Pool + +Embark on a tidal journey! In this step you will mint, deposit, swap, and withdraw tokens from the liquidity pool. + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + + + + + + + + + +#### Mint USDC and BTC Open the dapp frontend and click the "MINT" button for USDC and BTC. + + + + +#### Approve Transaction You should see a popup from Freighter asking you to sign the transactions. Click on "Approve" and wait for the transaction to be confirmed. + + + + +#### Check Updated Balance You should see an updated balance in the account balance component. + -> Note: These are test tokens for use on Futurenet or Mainnet. + -## Checkpoint 4: ๐Ÿ’ฐ Deposit into the Liquidity Pool + -Now that your wallet is set up, let's fund the liquidity pool. + + + + + + +#### Deposit into the Liquidity Pool Open the frontend, enter the desired token amounts, and click the "Deposit" button. You should see a popup from Freighter asking you to sign the transaction. + -Click on "Approve" and wait for the transaction to be confirmed. + -Once the transaction is confirmed, you should see your balances updated. +#### Approve Transaction - +Click on "Approve" and wait for the transaction to be confirmed. Once the transaction is confirmed, you should see your balances updated. + + + + + +#### Check Updated Balance You should see an updated balance in the amounts you have deposited in the account and reserve balance components, respectively. Following the example, you should see 50 USDC, 50 BTC, and 50 POOL. -## Checkpoint 5: ๐Ÿ”„ Make a Swap + + + + + + + + + + + -Now that you have funded the liquidity pool, let's make a swap. + + +#### Swap Tokens + +Now that you have funded the liquidity pool, you can make a swap. Open the swap tab, input the desired token swap amounts, and click the "Swap" button. You should see a popup from Freighter asking you to sign the transaction. + + + + +#### Approve Transaction + Click on "Approve" and wait for the transaction to be confirmed. + + + + +#### Check Updated Balance + Once the transaction is confirmed, you should see updated balances on the frontend. -## Checkpoint 6: โคด๏ธ Make a Withdrawal + + + + + + + + + + + + +#### Withdraw Tokens from the Liquidity Pool -Now that you have funded the liquidity pool, let's make a withdrawal. +Now that you have funded the liquidity pool, you can make a withdrawal. Open the withdraw tab, select how much liquidity you want to remove with the sliding bar, and click the "Withdraw" button. You should see a popup from Freighter asking you to sign the transaction. + + + + +#### Approve Transaction + Click on "Approve" and wait for the transaction to be confirmed. + + + + +#### Check Updated Balance + Once the transaction is confirmed, you should see updated balances on the frontend. + + + + + + + + +> Note: These are test tokens for use on Futurenet or Mainnet. + Transactions completed -## Checkpoint 7: ๐Ÿšข Ship It! ๐Ÿš +## Checkpoint 4: ๐Ÿšข Ship It! ๐Ÿš Now that your dapp is fully functional , it's time to prepare it for new deployment on Futurenet using Vercel. @@ -177,6 +298,7 @@ Then, navigate to the `frontend` directory and run the development server: cd frontend make setup && make start_dev ``` + Now, open your browser and visit [http://localhost:5173](http://localhost:5173/). Ensure that Freighter is connected to Futurenet, and you should be able to see the frontend of your dapp! @@ -271,13 +393,13 @@ You can now visit the preview link to see your deployed dapp! ๐ŸŽ‰ You must add Futurenet network lumens to your Freighter wallet to interact with the deployed example dapp. Visit https://laboratory.stellar.org/#account-creator?network=futurenet, and follow the instructions to create your Freighter account on Futurenet. -## Checkpoint 8: โœ… Complete the Challenge! +## Checkpoint 5: โœ… Complete the Challenge! Submit your public URL to the challenge form. -## Checkpoint 9: ๐Ÿ’ช Flex! +## Checkpoint 6: ๐Ÿ’ช Flex! ๐Ÿด [Fork the liquidity pool repo] and make your own changes to the dapp. @@ -308,4 +430,4 @@ Then, via the web UI, you should be able to: ## ๐Ÿ›ก๏ธ๐Ÿ—ก๏ธ Take On More Challenges -View your progress and take on more challenges by visiting your [User Dashboard!](/dashboard) \ No newline at end of file +View your progress and take on more challenges by visiting your [User Dashboard!](/dashboard) diff --git a/docs/basic-tutorials/logging.mdx b/docs/basic-tutorials/logging.mdx index ccd6ae8f..779b623b 100644 --- a/docs/basic-tutorials/logging.mdx +++ b/docs/basic-tutorials/logging.mdx @@ -31,7 +31,7 @@ Logs in contracts are only visible in tests, or when executing contracts using :::tip -Logs are no a substitute for step-through debugging. Rust tests for Soroban can +Logs are not a substitute for step-through debugging. Rust tests for Soroban can be step-through debugged in your Rust-enabled IDE. See [testing] for more details. diff --git a/docs/basic-tutorials/upgrading-contracts.mdx b/docs/basic-tutorials/upgrading-contracts.mdx index 9d50b103..30b32c24 100644 --- a/docs/basic-tutorials/upgrading-contracts.mdx +++ b/docs/basic-tutorials/upgrading-contracts.mdx @@ -78,7 +78,7 @@ pub fn upgrade(e: Env, new_wasm_hash: BytesN<32>) { The `update_current_contract_wasm` host function will also emit a `SYSTEM` contract [event] that contains the old and new wasm reference, allowing downstream users to be notified when a contract they use is updated. The event structure will have `topics = ["executable_update", old_executable: ContractExecutable, old_executable: ContractExecutable]` and `data = []`. -[here]: https://docs.rs/soroban-sdk/0.9.2/soroban_sdk/struct.Env.html#method.update_current_contract_wasm +[here]: https://docs.rs/soroban-sdk/20.0.0-rc2/soroban_sdk/struct.Env.html#method.update_current_contract_wasm [event]: ../fundamentals-and-concepts/events.mdx#event-types ## Tests diff --git a/docs/basic-tutorials/wasm-metadata.mdx b/docs/basic-tutorials/wasm-metadata.mdx index 34d9a181..d27613f9 100644 --- a/docs/basic-tutorials/wasm-metadata.mdx +++ b/docs/basic-tutorials/wasm-metadata.mdx @@ -38,5 +38,5 @@ contractmeta!( pub trait LiquidityPoolTrait {... ``` -[contractmeta!]: https://docs.rs/soroban-sdk/0.9.2/soroban_sdk/macro.contractmeta.html +[contractmeta!]: https://docs.rs/soroban-sdk/20.0.0-rc2/soroban_sdk/macro.contractmeta.html [liquidity pool example]: https://github.com/stellar/soroban-examples/blob/v20.0.0-rc2/liquidity_pool/src/lib.rs#L152-L155 diff --git a/docs/getting-started/storing-data.mdx b/docs/getting-started/storing-data.mdx index d03aad97..91487743 100644 --- a/docs/getting-started/storing-data.mdx +++ b/docs/getting-started/storing-data.mdx @@ -80,7 +80,7 @@ members = [ ] [workspace.dependencies] -soroban-sdk = "0.9.2" +soroban-sdk = "20.0.0-rc2" [profile.release] opt-level = "z" diff --git a/docs/reference/freighter.mdx b/docs/reference/freighter.mdx index c52be722..63428573 100644 --- a/docs/reference/freighter.mdx +++ b/docs/reference/freighter.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 title: Freighter Wallet description: Freighter is a browser extension that can sign Soroban transactions. --- diff --git a/docs/reference/rpc-list.mdx b/docs/reference/rpc-list.mdx new file mode 100644 index 00000000..4bf267ce --- /dev/null +++ b/docs/reference/rpc-list.mdx @@ -0,0 +1,29 @@ +--- +title: RPC Providers +sidebar_position: 7 +--- + +## Ecosystem Providers + +Multiple infrastructure providers have made Soroban RPC endpoint services available, and offer plans ranging from free to high throughput endpoints. These providers can be used for development, testing, and production. + +Most of these providers allow access to the Testnet network (with Mainnet coming soon). + +| Provider | Signup / Access | +| :---------------------------------------------------- | --------------------------------------------------- | +| [Blockdaemon](https://www.blockdaemon.com) | [Access](https://www.blockdaemon.com/apply/soroban) | +| [Validation Cloud](https://validationcloud.io/) | [Access](https://app.validationcloud.io/) | +| [QuickNode](https://www.quicknode.com/chains/stellar) | [Access](https://www.quicknode.com/chains/stellar) | +| [BlockEden](https://blockeden.xyz/stellar-soroban) | [Access](https://blockeden.xyz/stellar-soroban) | +| [NowNodes](https://nownodes.io/nodes/stellar-xlm) | [Access](https://nownodes.io/nodes/stellar-xlm) | + +## SDF (Futurenet and Testnet only) + +SDF has made available Soroban RPC endpoints with access to the Futurenet and Testnet networks. These services are free to use, and are suitable for development and testing. + +SDF will not be providing a publicly available RPC endpoint for Mainnet. Developers should select an ecosystem provider that works for their project before migrating to Mainnet. In some cases, projects may choose to [run their own RPC instance](rpc.mdx#run-your-own-instance). + +| Provider | Endpoint | Friendbot | Network | +| :---------------------------- | ------------------------------------- | ----------------------------------------- | ----------- | +| [SDF](http://www.stellar.org) | `https://rpc-futurenet.stellar.org` | `https://friendbot-futurenet.stellar.org` | `Futurenet` | +| [SDF](http://www.stellar.org) | `https://soroban-testnet.stellar.org` | `https://friendbot.stellar.org` | `Testnet` | diff --git a/docs/reference/rpc.mdx b/docs/reference/rpc.mdx index 622c5c19..0aaa89ed 100644 --- a/docs/reference/rpc.mdx +++ b/docs/reference/rpc.mdx @@ -1,6 +1,6 @@ --- sidebar_position: 6 -title: RPC +title: RPC Usage --- The RPC service allows you to communicate directly with Soroban via a [JSON RPC interface](https://soroban.stellar.org/api/). diff --git a/package-lock.json b/package-lock.json index 98d10391..db5007f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,9 @@ "react-dom": "^17.0.2", "react-rewards": "^2.0.4", "react-toastify": "^9.1.3", - "sass": "^1.57.1" + "sass": "^1.57.1", + "soroban-client": "^1.0.0-beta.2", + "stellar-wallets-kit": "github:Creit-Tech/Stellar-Wallets-Kit" }, "devDependencies": { "@docusaurus/eslint-plugin": "^2.2.0", @@ -45,6 +47,7 @@ "remark-cli": "^11.0.0", "remark-frontmatter": "^4.0.1", "remark-mdx": "1", + "source-map-loader": "^4.0.1", "typescript": "^4.9.4", "unist-util-visit": "^2.0.3" } @@ -59,6 +62,11 @@ "node": ">=0.10.0" } }, + "node_modules/@albedo-link/intent": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@albedo-link/intent/-/intent-0.12.0.tgz", + "integrity": "sha512-UlGBhi0qASDYOjLrOL4484vQ26Ee3zTK2oAgvPMClOs+1XNk3zbs3dECKZv+wqeSI8SkHow8mXLTa16eVh+dQA==" + }, "node_modules/@algolia/autocomplete-core": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", @@ -2408,6 +2416,15 @@ "node": ">=0.1.90" } }, + "node_modules/@creit-tech/xbull-wallet-connect": { + "version": "0.1.0", + "resolved": "git+ssh://git@github.com/Creit-Tech/xBull-Wallet-Connect.git#bf6725307a5de7e513aa67fa6b8bdbf58797af1d", + "dependencies": { + "rxjs": "^7.5.5", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -3527,6 +3544,19 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "license": "MIT" }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz", + "integrity": "sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ==" + }, + "node_modules/@lit/reactive-element": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.0.0" + } + }, "node_modules/@mdx-js/mdx": { "version": "1.6.22", "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz", @@ -3974,6 +4004,47 @@ "soroban-client": "0.8.1" } }, + "node_modules/@soroban-react/chains/node_modules/js-xdr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/js-xdr/-/js-xdr-2.0.0.tgz", + "integrity": "sha512-4mctWHR47ejNcfpE8/Xl3l2wYqO1Qy09d1pveZRmarUz2BcuU/M8grzadxV6PoN/X0ywOb6cy6117qYUWkfeBA==" + }, + "node_modules/@soroban-react/chains/node_modules/soroban-client": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.8.1.tgz", + "integrity": "sha512-F+3K+hHlpXbSSdBMjvTlkim1tb2aMlg4OT+71r1ILk8T+bMFHXlZShettJg2VMQ402WGalBNN4Q9oSeoHsPVFQ==", + "dependencies": { + "axios": "^1.4.0", + "bignumber.js": "^9.1.1", + "buffer": "^6.0.3", + "detect-node": "^2.0.4", + "es6-promise": "^4.2.4", + "eventsource": "^2.0.2", + "lodash": "^4.17.21", + "randombytes": "^2.1.0", + "stellar-base": "9.0.0-soroban.3", + "toml": "^3.0.0", + "urijs": "^1.19.1" + } + }, + "node_modules/@soroban-react/chains/node_modules/stellar-base": { + "version": "9.0.0-soroban.3", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-9.0.0-soroban.3.tgz", + "integrity": "sha512-PaeIrspURhbDA0FSkH/mu/lQxxSYPplOdhIcW4VqmKW2kMm/ADXjyQr1y4tFIfv8EpIe5DCJ6sfIyadIoPd8HQ==", + "dependencies": { + "base32.js": "^0.1.0", + "bignumber.js": "^9.1.1", + "crc": "^4.3.2", + "crypto-browserify": "^3.12.0", + "js-xdr": "^2.0.0", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "tweetnacl": "^1.0.3" + }, + "optionalDependencies": { + "sodium-native": "^4.0.1" + } + }, "node_modules/@soroban-react/core": { "version": "5.3.12", "resolved": "https://registry.npmjs.org/@soroban-react/core/-/core-5.3.12.tgz", @@ -3988,6 +4059,47 @@ "react": ">=16.8" } }, + "node_modules/@soroban-react/core/node_modules/js-xdr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/js-xdr/-/js-xdr-2.0.0.tgz", + "integrity": "sha512-4mctWHR47ejNcfpE8/Xl3l2wYqO1Qy09d1pveZRmarUz2BcuU/M8grzadxV6PoN/X0ywOb6cy6117qYUWkfeBA==" + }, + "node_modules/@soroban-react/core/node_modules/soroban-client": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.8.1.tgz", + "integrity": "sha512-F+3K+hHlpXbSSdBMjvTlkim1tb2aMlg4OT+71r1ILk8T+bMFHXlZShettJg2VMQ402WGalBNN4Q9oSeoHsPVFQ==", + "dependencies": { + "axios": "^1.4.0", + "bignumber.js": "^9.1.1", + "buffer": "^6.0.3", + "detect-node": "^2.0.4", + "es6-promise": "^4.2.4", + "eventsource": "^2.0.2", + "lodash": "^4.17.21", + "randombytes": "^2.1.0", + "stellar-base": "9.0.0-soroban.3", + "toml": "^3.0.0", + "urijs": "^1.19.1" + } + }, + "node_modules/@soroban-react/core/node_modules/stellar-base": { + "version": "9.0.0-soroban.3", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-9.0.0-soroban.3.tgz", + "integrity": "sha512-PaeIrspURhbDA0FSkH/mu/lQxxSYPplOdhIcW4VqmKW2kMm/ADXjyQr1y4tFIfv8EpIe5DCJ6sfIyadIoPd8HQ==", + "dependencies": { + "base32.js": "^0.1.0", + "bignumber.js": "^9.1.1", + "crc": "^4.3.2", + "crypto-browserify": "^3.12.0", + "js-xdr": "^2.0.0", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "tweetnacl": "^1.0.3" + }, + "optionalDependencies": { + "sodium-native": "^4.0.1" + } + }, "node_modules/@soroban-react/events": { "version": "5.3.12", "resolved": "https://registry.npmjs.org/@soroban-react/events/-/events-5.3.12.tgz", @@ -4002,6 +4114,47 @@ "react": ">=16.8" } }, + "node_modules/@soroban-react/events/node_modules/js-xdr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/js-xdr/-/js-xdr-2.0.0.tgz", + "integrity": "sha512-4mctWHR47ejNcfpE8/Xl3l2wYqO1Qy09d1pveZRmarUz2BcuU/M8grzadxV6PoN/X0ywOb6cy6117qYUWkfeBA==" + }, + "node_modules/@soroban-react/events/node_modules/soroban-client": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.8.1.tgz", + "integrity": "sha512-F+3K+hHlpXbSSdBMjvTlkim1tb2aMlg4OT+71r1ILk8T+bMFHXlZShettJg2VMQ402WGalBNN4Q9oSeoHsPVFQ==", + "dependencies": { + "axios": "^1.4.0", + "bignumber.js": "^9.1.1", + "buffer": "^6.0.3", + "detect-node": "^2.0.4", + "es6-promise": "^4.2.4", + "eventsource": "^2.0.2", + "lodash": "^4.17.21", + "randombytes": "^2.1.0", + "stellar-base": "9.0.0-soroban.3", + "toml": "^3.0.0", + "urijs": "^1.19.1" + } + }, + "node_modules/@soroban-react/events/node_modules/stellar-base": { + "version": "9.0.0-soroban.3", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-9.0.0-soroban.3.tgz", + "integrity": "sha512-PaeIrspURhbDA0FSkH/mu/lQxxSYPplOdhIcW4VqmKW2kMm/ADXjyQr1y4tFIfv8EpIe5DCJ6sfIyadIoPd8HQ==", + "dependencies": { + "base32.js": "^0.1.0", + "bignumber.js": "^9.1.1", + "crc": "^4.3.2", + "crypto-browserify": "^3.12.0", + "js-xdr": "^2.0.0", + "lodash": "^4.17.21", + "sha.js": "^2.3.6", + "tweetnacl": "^1.0.3" + }, + "optionalDependencies": { + "sodium-native": "^4.0.1" + } + }, "node_modules/@soroban-react/freighter": { "version": "5.3.12", "resolved": "https://registry.npmjs.org/@soroban-react/freighter/-/freighter-5.3.12.tgz", @@ -4018,6 +4171,152 @@ "integrity": "sha512-Rcg2SEwSNJQQeE8q9PK4flUAewzhc1lUW/6C5mG4kcqlLGPi8zzPkQFNqxoGWglqSNxUomOrJzyce1Lnv0ZPhQ==", "license": "Apache-2.0" }, + "node_modules/@stablelib/aead": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/aead/-/aead-1.0.1.tgz", + "integrity": "sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==" + }, + "node_modules/@stablelib/binary": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", + "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", + "dependencies": { + "@stablelib/int": "^1.0.1" + } + }, + "node_modules/@stablelib/bytes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/bytes/-/bytes-1.0.1.tgz", + "integrity": "sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==" + }, + "node_modules/@stablelib/chacha": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/chacha/-/chacha-1.0.1.tgz", + "integrity": "sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/chacha20poly1305": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz", + "integrity": "sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA==", + "dependencies": { + "@stablelib/aead": "^1.0.1", + "@stablelib/binary": "^1.0.1", + "@stablelib/chacha": "^1.0.1", + "@stablelib/constant-time": "^1.0.1", + "@stablelib/poly1305": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/constant-time/-/constant-time-1.0.1.tgz", + "integrity": "sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==" + }, + "node_modules/@stablelib/ed25519": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz", + "integrity": "sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==", + "dependencies": { + "@stablelib/random": "^1.0.2", + "@stablelib/sha512": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/hash": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz", + "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==" + }, + "node_modules/@stablelib/hkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hkdf/-/hkdf-1.0.1.tgz", + "integrity": "sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g==", + "dependencies": { + "@stablelib/hash": "^1.0.1", + "@stablelib/hmac": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/hmac": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hmac/-/hmac-1.0.1.tgz", + "integrity": "sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==", + "dependencies": { + "@stablelib/constant-time": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/int": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", + "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==" + }, + "node_modules/@stablelib/keyagreement": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz", + "integrity": "sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==", + "dependencies": { + "@stablelib/bytes": "^1.0.1" + } + }, + "node_modules/@stablelib/poly1305": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/poly1305/-/poly1305-1.0.1.tgz", + "integrity": "sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==", + "dependencies": { + "@stablelib/constant-time": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/random": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz", + "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/sha256": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/sha256/-/sha256-1.0.1.tgz", + "integrity": "sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/sha512": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz", + "integrity": "sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/wipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", + "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==" + }, + "node_modules/@stablelib/x25519": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stablelib/x25519/-/x25519-1.0.3.tgz", + "integrity": "sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw==", + "dependencies": { + "@stablelib/keyagreement": "^1.0.1", + "@stablelib/random": "^1.0.2", + "@stablelib/wipe": "^1.0.1" + } + }, "node_modules/@stellar/eslint-config": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@stellar/eslint-config/-/eslint-config-2.1.2.tgz", @@ -4035,10 +4334,9 @@ } }, "node_modules/@stellar/freighter-api": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@stellar/freighter-api/-/freighter-api-1.5.1.tgz", - "integrity": "sha512-WEnKEqd+xVLnOq6bJv+fLXod8JQyPjzpOKTpH4g7tG9MM1fmXzD3y2SXJlpCIw8kVqtiC4ynWOlSWX+TKO7KiQ==", - "license": "Apache-2.0" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@stellar/freighter-api/-/freighter-api-1.6.0.tgz", + "integrity": "sha512-Z6CRY+3+whzMspda6PiHEc4Rs9tdQkHLin9FopdnHhij/FEEAK+IiuF8Ki2ROcQweXdazb8N237aSim10s+Zgw==" }, "node_modules/@stellar/prettier-config": { "version": "1.0.1", @@ -4711,6 +5009,11 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/trusted-types": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.4.tgz", + "integrity": "sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==" + }, "node_modules/@types/unist": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", @@ -5018,51 +5321,467 @@ "dev": true, "license": "ISC", "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@walletconnect/browser-utils": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@walletconnect/browser-utils/-/browser-utils-1.8.0.tgz", + "integrity": "sha512-Wcqqx+wjxIo9fv6eBUFHPsW1y/bGWWRboni5dfD8PtOmrihrEpOCmvRJe4rfl7xgJW8Ea9UqKEaq0bIRLHlK4A==", + "dependencies": { + "@walletconnect/safe-json": "1.0.0", + "@walletconnect/types": "^1.8.0", + "@walletconnect/window-getters": "1.0.0", + "@walletconnect/window-metadata": "1.0.0", + "detect-browser": "5.2.0" + } + }, + "node_modules/@walletconnect/browser-utils/node_modules/@walletconnect/types": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-1.8.0.tgz", + "integrity": "sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg==", + "deprecated": "WalletConnect's v1 SDKs are now deprecated. Please upgrade to a v2 SDK. For details see: https://docs.walletconnect.com/" + }, + "node_modules/@walletconnect/core": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.10.1.tgz", + "integrity": "sha512-WAoXfmj+Zy5q48TnrKUjmHXJCBahzKwbul+noepRZf7JDtUAZ9IOWpUjg+UPRbfK5EiWZ0TF42S6SXidf7EHoQ==", + "dependencies": { + "@walletconnect/heartbeat": "1.2.1", + "@walletconnect/jsonrpc-provider": "1.0.13", + "@walletconnect/jsonrpc-types": "1.0.3", + "@walletconnect/jsonrpc-utils": "1.0.8", + "@walletconnect/jsonrpc-ws-connection": "1.0.13", + "@walletconnect/keyvaluestorage": "^1.0.2", + "@walletconnect/logger": "^2.0.1", + "@walletconnect/relay-api": "^1.0.9", + "@walletconnect/relay-auth": "^1.0.4", + "@walletconnect/safe-json": "^1.0.2", + "@walletconnect/time": "^1.0.2", + "@walletconnect/types": "2.10.1", + "@walletconnect/utils": "2.10.1", + "events": "^3.3.0", + "lodash.isequal": "4.5.0", + "uint8arrays": "^3.1.0" + } + }, + "node_modules/@walletconnect/core/node_modules/@walletconnect/keyvaluestorage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.0.2.tgz", + "integrity": "sha512-U/nNG+VLWoPFdwwKx0oliT4ziKQCEoQ27L5Hhw8YOFGA2Po9A9pULUYNWhDgHkrb0gYDNt//X7wABcEWWBd3FQ==", + "dependencies": { + "safe-json-utils": "^1.1.1", + "tslib": "1.14.1" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": "1.x", + "lokijs": "1.x" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + }, + "lokijs": { + "optional": true + } + } + }, + "node_modules/@walletconnect/core/node_modules/@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "dependencies": { + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/core/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/environment": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz", + "integrity": "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==", + "dependencies": { + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/environment/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/events": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/events/-/events-1.0.1.tgz", + "integrity": "sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==", + "dependencies": { + "keyvaluestorage-interface": "^1.0.0", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/events/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/heartbeat": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz", + "integrity": "sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==", + "dependencies": { + "@walletconnect/events": "^1.0.1", + "@walletconnect/time": "^1.0.2", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/heartbeat/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/jsonrpc-provider": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz", + "integrity": "sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==", + "dependencies": { + "@walletconnect/jsonrpc-utils": "^1.0.8", + "@walletconnect/safe-json": "^1.0.2", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/jsonrpc-provider/node_modules/@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "dependencies": { + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/jsonrpc-provider/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/jsonrpc-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz", + "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==", + "dependencies": { + "keyvaluestorage-interface": "^1.0.0", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/jsonrpc-types/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/jsonrpc-utils": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz", + "integrity": "sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==", + "dependencies": { + "@walletconnect/environment": "^1.0.1", + "@walletconnect/jsonrpc-types": "^1.0.3", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/jsonrpc-utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/jsonrpc-ws-connection": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz", + "integrity": "sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg==", + "dependencies": { + "@walletconnect/jsonrpc-utils": "^1.0.6", + "@walletconnect/safe-json": "^1.0.2", + "events": "^3.3.0", + "tslib": "1.14.1", + "ws": "^7.5.1" + } + }, + "node_modules/@walletconnect/jsonrpc-ws-connection/node_modules/@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "dependencies": { + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/jsonrpc-ws-connection/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.0.1.tgz", + "integrity": "sha512-SsTKdsgWm+oDTBeNE/zHxxr5eJfZmE9/5yp/Ku+zJtcTAjELb3DXueWkDXmE9h8uHIbJzIb5wj5lPdzyrjT6hQ==", + "dependencies": { + "pino": "7.11.0", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/logger/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/mobile-registry": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@walletconnect/mobile-registry/-/mobile-registry-1.4.0.tgz", + "integrity": "sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw==", + "deprecated": "Deprecated in favor of dynamic registry available from: https://github.com/walletconnect/walletconnect-registry" + }, + "node_modules/@walletconnect/qrcode-modal": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@walletconnect/qrcode-modal/-/qrcode-modal-1.8.0.tgz", + "integrity": "sha512-BueaFefaAi8mawE45eUtztg3ZFbsAH4DDXh1UNwdUlsvFMjqcYzLUG0xZvDd6z2eOpbgDg2N3bl6gF0KONj1dg==", + "deprecated": "WalletConnect's v1 SDKs are now deprecated. Please upgrade to a v2 SDK. For details see: https://docs.walletconnect.com/", + "dependencies": { + "@walletconnect/browser-utils": "^1.8.0", + "@walletconnect/mobile-registry": "^1.4.0", + "@walletconnect/types": "^1.8.0", + "copy-to-clipboard": "^3.3.1", + "preact": "10.4.1", + "qrcode": "1.4.4" + } + }, + "node_modules/@walletconnect/qrcode-modal/node_modules/@walletconnect/types": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-1.8.0.tgz", + "integrity": "sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg==", + "deprecated": "WalletConnect's v1 SDKs are now deprecated. Please upgrade to a v2 SDK. For details see: https://docs.walletconnect.com/" + }, + "node_modules/@walletconnect/relay-api": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@walletconnect/relay-api/-/relay-api-1.0.9.tgz", + "integrity": "sha512-Q3+rylJOqRkO1D9Su0DPE3mmznbAalYapJ9qmzDgK28mYF9alcP3UwG/og5V7l7CFOqzCLi7B8BvcBUrpDj0Rg==", + "dependencies": { + "@walletconnect/jsonrpc-types": "^1.0.2", + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/relay-api/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/relay-auth": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz", + "integrity": "sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ==", + "dependencies": { + "@stablelib/ed25519": "^1.0.2", + "@stablelib/random": "^1.0.1", + "@walletconnect/safe-json": "^1.0.1", + "@walletconnect/time": "^1.0.2", + "tslib": "1.14.1", + "uint8arrays": "^3.0.0" + } + }, + "node_modules/@walletconnect/relay-auth/node_modules/@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "dependencies": { + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/relay-auth/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/safe-json": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.0.tgz", + "integrity": "sha512-QJzp/S/86sUAgWY6eh5MKYmSfZaRpIlmCJdi5uG4DJlKkZrHEF7ye7gA+VtbVzvTtpM/gRwO2plQuiooIeXjfg==" + }, + "node_modules/@walletconnect/sign-client": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.10.1.tgz", + "integrity": "sha512-iG3eJGi1yXeG3xGeVSSMf8wDFyx239B0prLQfy1uYDtYFb2ynnH/09oqAZyKn96W5nfQzUgM2Mz157PVdloH3Q==", + "dependencies": { + "@walletconnect/core": "2.10.1", + "@walletconnect/events": "^1.0.1", + "@walletconnect/heartbeat": "1.2.1", + "@walletconnect/jsonrpc-utils": "1.0.8", + "@walletconnect/logger": "^2.0.1", + "@walletconnect/time": "^1.0.2", + "@walletconnect/types": "2.10.1", + "@walletconnect/utils": "2.10.1", + "events": "^3.3.0" + } + }, + "node_modules/@walletconnect/time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/time/-/time-1.0.2.tgz", + "integrity": "sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==", + "dependencies": { + "tslib": "1.14.1" + } + }, + "node_modules/@walletconnect/time/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/types": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.10.1.tgz", + "integrity": "sha512-7pccAhajQdiH2kYywjE1XI64IqRI+4ioyGy0wvz8d0UFQ/DSG3MLKR8jHf5aTOafQQ/HRLz6xvlzN4a7gIVkUQ==", + "dependencies": { + "@walletconnect/events": "^1.0.1", + "@walletconnect/heartbeat": "1.2.1", + "@walletconnect/jsonrpc-types": "1.0.3", + "@walletconnect/keyvaluestorage": "^1.0.2", + "@walletconnect/logger": "^2.0.1", + "events": "^3.3.0" + } + }, + "node_modules/@walletconnect/types/node_modules/@walletconnect/keyvaluestorage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.0.2.tgz", + "integrity": "sha512-U/nNG+VLWoPFdwwKx0oliT4ziKQCEoQ27L5Hhw8YOFGA2Po9A9pULUYNWhDgHkrb0gYDNt//X7wABcEWWBd3FQ==", + "dependencies": { + "safe-json-utils": "^1.1.1", + "tslib": "1.14.1" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": "1.x", + "lokijs": "1.x" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + }, + "lokijs": { + "optional": true + } + } + }, + "node_modules/@walletconnect/types/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/utils": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.10.1.tgz", + "integrity": "sha512-DM0dKgm9O58l7VqJEyV2OVv16XRePhDAReI23let6WdW1dSpw/Y/A89Lp99ZJOjLm2FxyblMRF3YRaZtHwBffw==", + "dependencies": { + "@stablelib/chacha20poly1305": "1.0.1", + "@stablelib/hkdf": "1.0.1", + "@stablelib/random": "^1.0.2", + "@stablelib/sha256": "1.0.1", + "@stablelib/x25519": "^1.0.3", + "@walletconnect/relay-api": "^1.0.9", + "@walletconnect/safe-json": "^1.0.2", + "@walletconnect/time": "^1.0.2", + "@walletconnect/types": "2.10.1", + "@walletconnect/window-getters": "^1.0.1", + "@walletconnect/window-metadata": "^1.0.1", + "detect-browser": "5.3.0", + "query-string": "7.1.3", + "uint8arrays": "^3.1.0" + } + }, + "node_modules/@walletconnect/utils/node_modules/@walletconnect/safe-json": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz", + "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==", + "dependencies": { + "tslib": "1.14.1" } }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "license": "ISC", + "node_modules/@walletconnect/utils/node_modules/@walletconnect/window-getters": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", + "integrity": "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "tslib": "1.14.1" } }, - "node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" + "node_modules/@walletconnect/utils/node_modules/@walletconnect/window-metadata": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz", + "integrity": "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==", + "dependencies": { + "@walletconnect/window-getters": "^1.0.1", + "tslib": "1.14.1" + } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "license": "MIT", + "node_modules/@walletconnect/utils/node_modules/detect-browser": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", + "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" + }, + "node_modules/@walletconnect/utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/window-getters": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.0.tgz", + "integrity": "sha512-xB0SQsLaleIYIkSsl43vm8EwETpBzJ2gnzk7e0wMF3ktqiTGS6TFHxcprMl5R44KKh4tCcHCJwolMCaDSwtAaA==" + }, + "node_modules/@walletconnect/window-metadata": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.0.tgz", + "integrity": "sha512-9eFvmJxIKCC3YWOL97SgRkKhlyGXkrHwamfechmqszbypFspaSk+t2jQXAEU7YClHF6Qjw5eYOmy1//zFi9/GA==", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "@walletconnect/window-getters": "^1.0.0" } }, "node_modules/@webassemblyjs/ast": { @@ -5223,6 +5942,12 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "license": "Apache-2.0" }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", @@ -5588,7 +6313,6 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "license": "MIT", "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -5596,6 +6320,11 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/ast-types-flow": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", @@ -5618,6 +6347,14 @@ "node": ">= 4.0.0" } }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/autoprefixer": { "version": "10.4.14", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", @@ -5872,7 +6609,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.1.0.tgz", "integrity": "sha512-n3TkB02ixgBOhTvANakDb4xaMXnYUVkNoRFJjQflcqMQhyEKxEHdj3E6N8t8sUQ0mjH/3/JxzlXuz3ul/J90pQ==", - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -5894,8 +6630,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/batch": { "version": "0.6.1", @@ -5913,10 +6648,9 @@ } }, "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", - "license": "MIT", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", "engines": { "node": "*" } @@ -5931,10 +6665,9 @@ } }, "node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "license": "MIT" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, "node_modules/body-parser": { "version": "1.20.1", @@ -6117,14 +6850,12 @@ "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "license": "MIT" + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, "node_modules/browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "license": "MIT", "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -6138,7 +6869,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "license": "MIT", "dependencies": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -6149,7 +6879,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "license": "MIT", "dependencies": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -6161,23 +6890,15 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "license": "MIT", "dependencies": { "bn.js": "^5.0.0", "randombytes": "^2.0.1" } }, - "node_modules/browserify-rsa/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "license": "MIT" - }, "node_modules/browserify-sign": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "license": "ISC", "dependencies": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", @@ -6190,12 +6911,6 @@ "safe-buffer": "^5.2.0" } }, - "node_modules/browserify-sign/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "license": "MIT" - }, "node_modules/browserslist": { "version": "4.21.9", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", @@ -6246,12 +6961,30 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -6261,8 +6994,7 @@ "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "license": "MIT" + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, "node_modules/builtin-modules": { "version": "3.3.0", @@ -6598,7 +7330,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "license": "MIT", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -6652,6 +7383,98 @@ "@colors/colors": "1.5.0" } }, + "node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cliui/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -6945,6 +7768,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "dependencies": { + "toggle-selection": "^1.0.6" + } + }, "node_modules/copy-webpack-plugin": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", @@ -7152,7 +7983,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/crc/-/crc-4.3.2.tgz", "integrity": "sha512-uGDHf4KLLh2zsHa8D8hIQ1H/HtFQhyHrc0uhHBcoKGol/Xnb+MPYfUMw7cvON6ze/GUESTudKayDcJC5HnJv1A==", - "license": "MIT", "engines": { "node": ">=12" }, @@ -7169,17 +7999,20 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "license": "MIT", "dependencies": { "bn.js": "^4.1.0", "elliptic": "^6.5.3" } }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "license": "MIT", "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -7192,7 +8025,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "license": "MIT", "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -7229,7 +8061,6 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "license": "MIT", "dependencies": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -8186,6 +9017,14 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "license": "MIT" }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decode-named-character-reference": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", @@ -8211,6 +9050,14 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -8354,7 +9201,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "license": "MIT", "dependencies": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -8383,6 +9229,11 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/detect-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.2.0.tgz", + "integrity": "sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA==" + }, "node_modules/detect-node": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", @@ -8449,13 +9300,22 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "license": "MIT", "dependencies": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", "randombytes": "^2.0.0" } }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==" + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -8625,6 +9485,17 @@ "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", "license": "BSD-3-Clause" }, + "node_modules/duplexify": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", + "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", + "dependencies": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.0" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -8653,7 +9524,6 @@ "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "license": "MIT", "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -8664,6 +9534,11 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -8847,8 +9722,7 @@ "node_modules/es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "license": "MIT" + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "node_modules/escalade": { "version": "3.1.1", @@ -9529,7 +10403,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", - "license": "MIT", "engines": { "node": ">=12.0.0" } @@ -9538,7 +10411,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "license": "MIT", "dependencies": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -9695,6 +10567,14 @@ "devOptional": true, "license": "MIT" }, + "node_modules/fast-redact": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", + "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/fast-url-parser": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", @@ -9841,6 +10721,14 @@ "node": ">=8" } }, + "node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -10268,6 +11156,14 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -10683,7 +11579,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "license": "MIT", "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -10697,7 +11592,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -10931,7 +11825,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "license": "MIT", "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -11239,8 +12132,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/ignore": { "version": "5.2.4", @@ -12068,10 +12960,9 @@ "license": "MIT" }, "node_modules/js-xdr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/js-xdr/-/js-xdr-2.0.0.tgz", - "integrity": "sha512-4mctWHR47ejNcfpE8/Xl3l2wYqO1Qy09d1pveZRmarUz2BcuU/M8grzadxV6PoN/X0ywOb6cy6117qYUWkfeBA==", - "license": "Apache-2.0" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/js-xdr/-/js-xdr-3.0.0.tgz", + "integrity": "sha512-tSt6UKJ2L7t+yaQURGkHo9kop9qnVbChTlCu62zNiDbDZQoZb/YjUj2iFJ3lgelhfg9p5bhO2o/QX+g36TPsSQ==" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -12180,6 +13071,11 @@ "json-buffer": "3.0.0" } }, + "node_modules/keyvaluestorage-interface": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz", + "integrity": "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==" + }, "node_modules/khroma": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.0.0.tgz", @@ -12295,6 +13191,34 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "license": "MIT" }, + "node_modules/lit": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", + "dependencies": { + "@lit/reactive-element": "^1.6.0", + "lit-element": "^3.3.0", + "lit-html": "^2.8.0" + } + }, + "node_modules/lit-element": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.1.0", + "@lit/reactive-element": "^1.3.0", + "lit-html": "^2.8.0" + } + }, + "node_modules/lit-html": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, "node_modules/load-plugin": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-5.1.0.tgz", @@ -12384,6 +13308,11 @@ "integrity": "sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==", "license": "MIT" }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -12482,7 +13411,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -13297,7 +14225,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "license": "MIT", "dependencies": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -13306,6 +14233,11 @@ "miller-rabin": "bin/miller-rabin" } }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -13455,8 +14387,7 @@ "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT" + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, "node_modules/minimatch": { "version": "3.1.2", @@ -13537,6 +14468,11 @@ "multicast-dns": "cli.js" } }, + "node_modules/multiformats": { + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", + "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==" + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -13633,10 +14569,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", - "license": "MIT", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", "optional": true, "bin": { "node-gyp-build": "bin.js", @@ -13858,6 +14793,11 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", "license": "MIT" }, + "node_modules/on-exit-leak-free": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz", + "integrity": "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==" + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -14079,7 +15019,6 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "license": "ISC", "dependencies": { "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", @@ -14259,7 +15198,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "license": "MIT", "dependencies": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -14285,10 +15223,45 @@ "engines": { "node": ">=8.6" }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pino": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-7.11.0.tgz", + "integrity": "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==", + "dependencies": { + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.0.0", + "on-exit-leak-free": "^0.2.0", + "pino-abstract-transport": "v0.5.0", + "pino-std-serializers": "^4.0.0", + "process-warning": "^1.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.1.0", + "safe-stable-stringify": "^2.1.0", + "sonic-boom": "^2.2.1", + "thread-stream": "^0.15.1" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz", + "integrity": "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==", + "dependencies": { + "duplexify": "^4.1.2", + "split2": "^4.0.0" } }, + "node_modules/pino-std-serializers": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz", + "integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==" + }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -14396,6 +15369,14 @@ "node": ">=4" } }, + "node_modules/pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/postcss": { "version": "8.4.27", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", @@ -15053,6 +16034,15 @@ "postcss": "^8.2.15" } }, + "node_modules/preact": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.4.1.tgz", + "integrity": "sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -15140,6 +16130,11 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "license": "MIT" }, + "node_modules/process-warning": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz", + "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==" + }, "node_modules/promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -15218,7 +16213,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "license": "MIT", "dependencies": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -15228,6 +16222,11 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -15265,6 +16264,54 @@ "integrity": "sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA==", "license": "MIT" }, + "node_modules/qrcode": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.4.tgz", + "integrity": "sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==", + "dependencies": { + "buffer": "^5.4.3", + "buffer-alloc": "^1.2.0", + "buffer-from": "^1.1.1", + "dijkstrajs": "^1.0.1", + "isarray": "^2.0.1", + "pngjs": "^3.3.0", + "yargs": "^13.2.4" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/qrcode/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/qrcode/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -15280,6 +16327,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/query-string": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", + "dependencies": { + "decode-uri-component": "^0.2.2", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/queue": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", @@ -15309,6 +16373,11 @@ ], "license": "MIT" }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==" + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -15322,7 +16391,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "license": "MIT", "dependencies": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -15725,6 +16793,14 @@ "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==", "license": "MIT" }, + "node_modules/real-require": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", + "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==", + "engines": { + "node": ">= 12.13.0" + } + }, "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -16267,6 +17343,14 @@ "node": ">=0.10" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -16284,6 +17368,11 @@ "node": "*" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -16369,7 +17458,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -16499,6 +17587,11 @@ ], "license": "MIT" }, + "node_modules/safe-json-utils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/safe-json-utils/-/safe-json-utils-1.1.1.tgz", + "integrity": "sha512-SAJWGKDs50tAbiDXLf89PDwt9XYkWyANFWVzn4dTXl5QyI8t2o/bW5/OJl3lvc2WVU4MEpTo9Yz5NVFNsp+OJQ==" + }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -16514,6 +17607,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "engines": { + "node": ">=10" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -16889,6 +17990,11 @@ "node": ">= 0.8.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -16905,7 +18011,6 @@ "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "license": "(MIT AND BSD-3-Clause)", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -17078,28 +18183,28 @@ "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.0.4.tgz", "integrity": "sha512-faqOKw4WQKK7r/ybn6Lqo1F9+L5T6NlBJJYvpxbZPetpWylUVqz449mvlwIBKBqxEHbWakWuOlUt8J3Qpc4sWw==", "hasInstallScript": true, - "license": "MIT", "optional": true, "dependencies": { "node-gyp-build": "^4.6.0" } }, + "node_modules/sonic-boom": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz", + "integrity": "sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, "node_modules/soroban-client": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-0.8.1.tgz", - "integrity": "sha512-F+3K+hHlpXbSSdBMjvTlkim1tb2aMlg4OT+71r1ILk8T+bMFHXlZShettJg2VMQ402WGalBNN4Q9oSeoHsPVFQ==", - "license": "Apache-2.0", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/soroban-client/-/soroban-client-1.0.0-beta.2.tgz", + "integrity": "sha512-v5h3yvef7HkUD3H26w33NUEgRXcPiOSDWEsVzMloaxsprs3N002tXJHvFF+Uw1eYt50Uk6bvqBgvkLwX10VENw==", "dependencies": { "axios": "^1.4.0", "bignumber.js": "^9.1.1", "buffer": "^6.0.3", - "detect-node": "^2.0.4", - "es6-promise": "^4.2.4", - "eventsource": "^2.0.2", - "lodash": "^4.17.21", - "randombytes": "^2.1.0", - "stellar-base": "9.0.0-soroban.3", - "toml": "^3.0.0", + "stellar-base": "v10.0.0-beta.1", "urijs": "^1.19.1" } }, @@ -17130,6 +18235,39 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-loader": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz", + "integrity": "sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA==", + "dev": true, + "dependencies": { + "abab": "^2.0.6", + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.72.1" + } + }, + "node_modules/source-map-loader/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -17205,6 +18343,22 @@ "wbuf": "^1.7.3" } }, + "node_modules/split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "engines": { + "node": ">= 10.x" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -17243,17 +18397,14 @@ "license": "MIT" }, "node_modules/stellar-base": { - "version": "9.0.0-soroban.3", - "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-9.0.0-soroban.3.tgz", - "integrity": "sha512-PaeIrspURhbDA0FSkH/mu/lQxxSYPplOdhIcW4VqmKW2kMm/ADXjyQr1y4tFIfv8EpIe5DCJ6sfIyadIoPd8HQ==", - "license": "Apache-2.0", + "version": "10.0.0-beta.1", + "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-10.0.0-beta.1.tgz", + "integrity": "sha512-zXC5AsbUsLi57JruyeIMv23s3iUxq/P2ZFrSJ+FerLIZjSAjY8EDs4zwY4LCuu7swUu46Lm8GK6sqxUZCPekHw==", "dependencies": { "base32.js": "^0.1.0", - "bignumber.js": "^9.1.1", - "crc": "^4.3.2", - "crypto-browserify": "^3.12.0", - "js-xdr": "^2.0.0", - "lodash": "^4.17.21", + "bignumber.js": "^9.1.2", + "buffer": "^6.0.3", + "js-xdr": "^3.0.0", "sha.js": "^2.3.6", "tweetnacl": "^1.0.3" }, @@ -17261,6 +18412,36 @@ "sodium-native": "^4.0.1" } }, + "node_modules/stellar-wallets-kit": { + "version": "0.1.1", + "resolved": "git+ssh://git@github.com/Creit-Tech/Stellar-Wallets-Kit.git#7f5dcffef493eb3569c954c033b166def5403b98", + "dependencies": { + "@albedo-link/intent": "^0.12.0", + "@creit-tech/xbull-wallet-connect": "github:Creit-Tech/xBull-Wallet-Connect", + "@stellar/freighter-api": "^1.6.0", + "@walletconnect/qrcode-modal": "^1.8.0", + "@walletconnect/sign-client": "^2.1.3", + "@walletconnect/types": "^2.1.3", + "events": "^3.3.0", + "lit": "^2.2.4" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "node_modules/strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -17613,6 +18794,14 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "license": "MIT" }, + "node_modules/thread-stream": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz", + "integrity": "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==", + "dependencies": { + "real-require": "^0.1.0" + } + }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", @@ -17676,6 +18865,11 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -17688,8 +18882,7 @@ "node_modules/toml": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", - "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", - "license": "MIT" + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" }, "node_modules/totalist": { "version": "1.1.0", @@ -17798,8 +18991,12 @@ "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "license": "Unlicense" + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" }, "node_modules/type-check": { "version": "0.4.0", @@ -17956,6 +19153,14 @@ "node": "*" } }, + "node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "dependencies": { + "multiformats": "^9.4.2" + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -19417,6 +20622,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" + }, "node_modules/which-typed-array": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", @@ -19675,6 +20885,11 @@ "node": ">=0.4" } }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -19690,6 +20905,127 @@ "node": ">= 6" } }, + "node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs-parser/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "node_modules/yargs/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 6b81d3b0..d447018f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,9 @@ "react-dom": "^17.0.2", "react-rewards": "^2.0.4", "react-toastify": "^9.1.3", - "sass": "^1.57.1" + "sass": "^1.57.1", + "soroban-client": "^1.0.0-beta.2", + "@stellar/freighter-api": "^1.6.1" }, "browserslist": { "production": [ @@ -68,6 +70,7 @@ "remark-cli": "^11.0.0", "remark-frontmatter": "^4.0.1", "remark-mdx": "1", + "source-map-loader": "^4.0.1", "typescript": "^4.9.4", "unist-util-visit": "^2.0.3" } diff --git a/src/components/atoms/challenge-contract-form/index.tsx b/src/components/atoms/challenge-contract-form/index.tsx new file mode 100644 index 00000000..36c20412 --- /dev/null +++ b/src/components/atoms/challenge-contract-form/index.tsx @@ -0,0 +1,127 @@ +import React, { + useState, + useEffect, + useContext, + ChangeEvent, + FormEvent, +} from "react"; +import { SorobanEventsProvider } from "@soroban-react/events"; +import BrowserOnly from "@docusaurus/BrowserOnly"; +import styles from "./style.module.css"; +import CompleteStepButton from "../complete-step-button"; +import UserChallengesContext, { + UserChallengesContextProps, +} from "../../../store/user-challenges-context"; +import { getActiveChallenge } from "../../../utils/get-active-challenge"; +import useAuth from "../../../hooks/useAuth"; + +interface ChallengeFormProps { + id: number; + address?: string; +} + +function ChallengeContractForm({ address, id }: ChallengeFormProps) { + const [savedContractId, setSavedContractId] = useState(""); + const [contractId, setContractId] = useState(""); + const [isStarted, setIsStarted] = useState(false); + const [formError, setFormError] = useState(null); + const { data } = useContext( + UserChallengesContext, + ); + const isSubmitBtnDisabled = !contractId || savedContractId === contractId; + + useEffect(() => { + if (address) { + const challenge = getActiveChallenge(data, id); + setSavedContractId(challenge?.contractId || ""); + setIsStarted(!!challenge?.startDate); + } + }, [address, savedContractId, data, id]); + + const changeHandler = (event: ChangeEvent) => { + setContractId(event.target.value); + }; + + const blurHandler = () => { + if (!contractId) { + setFormError("Mandatory field"); + } else { + setFormError(null); + } + }; + + if (!isStarted) { + return ( + <> + + Connect your wallet to track your progress and submit ContractId. + +
+ + ); + } + + return ( +
+ {savedContractId ? ( +

ContractId submitted!

+ ) : null} + +
e.preventDefault()} + > + + + + {savedContractId ? "Re-submit" : "Submit contractId"} + +
+ {formError} +
+ ); +} + +function InnerComponent({ id }: { id: number }) { + const { loading, address } = useAuth(); + + // if user is not logged in (address is undefined), render the Login button + if (loading) { + return ( +
+ Please connect to Testnet network. +
+
+ ); + } + // if user is logged in and connected to the right network, + // render the ChallengeForm + return ; +} + +export function ParentChallengeContractForm({ id }: { id: number }) { + return ( + + Please connect to Testnet network.}> + {() => } + + + ); +} diff --git a/src/components/atoms/challenge-contract-form/style.module.css b/src/components/atoms/challenge-contract-form/style.module.css new file mode 100644 index 00000000..ad04774b --- /dev/null +++ b/src/components/atoms/challenge-contract-form/style.module.css @@ -0,0 +1,94 @@ +.challengeform { + display: flex; + flex-direction: row; + justify-content: left; + align-items: center; + gap: 16px; + margin-right: 1rem; +} + +/* .displayData { + display: flex; +} */ + +.button { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + padding: 16px 12px; + gap: 8px; + background: #1a1523; + border-radius: 8px; + border: 0; + height: 38px; + font-weight: 600; + font-size: 14px; + line-height: 22px; + color: #f5f5f5; + cursor: pointer; + align-self: baseline; +} + +.success { + display: flex; + flex-direction: column; + justify-content: center; + align-items: left; + gap: 8px; + border-radius: 8px; + border: 0; + height: 38px; + font-weight: 600; + font-size: 18px; + line-height: 22px; + color: #1a1523; + cursor: pointer; + align-self: baseline; +} + + +[data-theme="dark"] .button { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + padding: 16px 12px; + gap: 8px; + background: #767676; + border-radius: 8px; + border: 0; + height: 38px; + font-weight: 600; + font-size: 14px; + line-height: 22px; + color: #f5f5f5; + cursor: pointer; + align-self: baseline; +} + +.input { + display: flex; + flex-direction: row; + justify-content: center; + width: 100%; + align-items: center; + padding: 11px; + gap: 8px; + background: #ffffff; + border-radius: 2px; + border: 0; + font-size: 16px; + color: #585858; + border: 1px solid #ECECEC; + cursor: pointer; +} + +.inputWithError { + border-color: #DF0101; +} + +.errorMessage { + position: absolute; + color: #DF0101; +} \ No newline at end of file diff --git a/src/components/atoms/challenge-form/index.tsx b/src/components/atoms/challenge-form/index.tsx index 679ce0bc..cf492384 100644 --- a/src/components/atoms/challenge-form/index.tsx +++ b/src/components/atoms/challenge-form/index.tsx @@ -5,7 +5,6 @@ import React, { ChangeEvent, FormEvent, } from "react"; -import { useSorobanReact } from "@soroban-react/core"; import { SorobanEventsProvider } from "@soroban-react/events"; import BrowserOnly from "@docusaurus/BrowserOnly"; import styles from "./style.module.css"; @@ -14,6 +13,7 @@ import UserChallengesContext, { UserChallengesContextProps, } from "../../../store/user-challenges-context"; import { getActiveChallenge } from "../../../utils/get-active-challenge"; +import useAuth from "../../../hooks/useAuth"; interface ChallengeFormProps { id: number; @@ -123,36 +123,7 @@ function ChallengeForm({ address, id }: ChallengeFormProps) { } function InnerComponent({ id }: { id: number }) { - const { address, connect, activeChain } = useSorobanReact(); - const addressString = address ? address.toString() : "No address"; - const [loading, setLoading] = useState(true); - - // Check if the user is connected and stored the status in local storage - useEffect(() => { - const isConnected = localStorage.getItem(`isConnected:${addressString}`); - if (isConnected === "true") { - setLoading(false); - connect(); // Call connect() to establish a connection if not already connected - } else { - setLoading(true); - } - }, [connect]); - - useEffect(() => { - if (activeChain) { - if (activeChain.name?.toString() !== "Futurenet" || activeChain.name !=="Testnet" ) { - alert("Please ensure that you are connected to Futurenet or Testnet"); - setLoading(true); - } - if (activeChain.name?.toString() === undefined) { - alert("Please ensure that you are connected to Futurenet or Testnet"); - setLoading(true); - } - if (activeChain.name?.toString() === "Futurenet" && address || activeChain.name?.toString() === "Testnet" && address) { - setLoading(false); - } - } - }, [activeChain]); + const { loading, address } = useAuth(); // if user is not logged in (address is undefined), render the Login button if (loading) { @@ -163,14 +134,15 @@ function InnerComponent({ id }: { id: number }) { ); } - // if user is logged in and connected to the right network, render the ChallengeForm + // if user is logged in and connected to the right network, + // render the ChallengeForm return ; } export function ParentChallengeForm({ id }: { id: number }) { return ( - Please connect to Testnet network.}> + Please connect to Testnet or Futurenet network.}> {() => } diff --git a/src/components/atoms/challenges-list/index.tsx b/src/components/atoms/challenges-list/index.tsx index ee0fcc4d..2c449d6d 100644 --- a/src/components/atoms/challenges-list/index.tsx +++ b/src/components/atoms/challenges-list/index.tsx @@ -1,33 +1,38 @@ -import React, { useCallback, useEffect, useState } from "react"; +import React, { useMemo, useState } from "react"; import styles from "./style.module.css"; import { Challenge, ChallengeInfo } from "../../../interfaces/challenge"; import { ChallengeCard } from "../challenge-card"; -import { fetchUserProgress } from "../../../services/challenges"; import Switcher from "../UI/switcher"; +import ConfirmModal from "../confirm-modal"; -interface ChallengesListProps { - isConnected: boolean; - address: string; - initialChallenges: Challenge[]; - setTotalCompleted?: (amount: number) => void; +interface Props { + availableChallenges: Challenge[]; + userChallenges: ChallengeInfo[]; + onRefresh: () => void; + onReset?: () => void; } -export default function ChallengesList({ - isConnected, - address, - initialChallenges, - setTotalCompleted, -}: ChallengesListProps) { - const [challenges, setChallenges] = useState( - [], - ); - const [startedChallenges, setStartedChallenges] = useState([]); - const [isLoading, setIsLoading] = useState(false); - const [showOnlyMy, setShowOnlyMy] = useState(false); - const onlyMyList = ( +export default function ChallengeList({ + availableChallenges, + userChallenges, + onRefresh, + onReset, +}: Props) { + const [onlyMine, setOnlyMine] = useState(false); + const [confirmReset, setConfirmReset] = useState(false); + + const onResetClick = () => { + setConfirmReset(true); + }; + + const onCancelClick = () => { + setConfirmReset(false); + }; + + const myChallanges = ( <> - {challenges?.length ? ( - challenges?.map((challenge: ChallengeInfo) => { + {userChallenges?.length ? ( + userChallenges?.map((challenge: ChallengeInfo) => { return ; }) ) : ( @@ -35,68 +40,56 @@ export default function ChallengesList({ )} ); - const listContentWithProgress = ( - <> - {initialChallenges?.map((challenge: ChallengeInfo) => { - if (!startedChallenges?.includes(challenge.id)) { - return ; - } - const challengeWithProgress = challenges.find( - (item: ChallengeInfo) => item.id === challenge.id, + const allChallenges = useMemo( + () => + availableChallenges?.map((aChall: Challenge) => { + const inProgressChallenge = userChallenges.find( + (uChall: ChallengeInfo) => uChall.id === aChall.id, ); - return ( - - ); - })} - - ); - const fetchProgress = useCallback(async () => { - setIsLoading(true); - try { - const response = await fetchUserProgress(address); - const challengeIds = response.data.challenges?.map( - (item: ChallengeInfo) => item.id, - ); - setChallenges(response.data.challenges || []); - setTotalCompleted && - setTotalCompleted(response.data.completedChallenges || 0); - setStartedChallenges(challengeIds); - } finally { - setIsLoading(false); - } - }, []); + if (inProgressChallenge) { + return ( + + ); + } - useEffect(() => { - if (isConnected && address) { - fetchProgress(); - } - }, [isConnected, address, fetchProgress]); + return ; + }), + [availableChallenges, userChallenges], + ); return ( <> - {isLoading ? ( -

We're loading the list of challenges...

- ) : ( - <> -
- {challenges?.length > 0 ? ( - setShowOnlyMy(value)} - /> - ) : null} - -
+
+
+ {userChallenges?.length > 0 ? ( + setOnlyMine(value)} + /> + ) : null} + +
+ {onReset && ( + + )} +
+ +
    + {onlyMine ? myChallanges : allChallenges} +
-
    - {showOnlyMy ? onlyMyList : listContentWithProgress} -
- + {confirmReset && onReset && ( + )} ); diff --git a/src/components/atoms/challenges-list/style.module.css b/src/components/atoms/challenges-list/style.module.css index 834b6e61..498a033f 100644 --- a/src/components/atoms/challenges-list/style.module.css +++ b/src/components/atoms/challenges-list/style.module.css @@ -14,6 +14,11 @@ .listHeader { display: flex; + justify-content: space-between; +} + +.dataControls { + display: flex; } .refreshBtn { @@ -21,9 +26,23 @@ font-weight: 500; font-family: var(--ifm-font-family-base); background-color: transparent; - color: #369EA7; + color: #369ea7; border-radius: 4px; - border: 1px solid #369EA7; + border: 1px solid #369ea7; + padding: 12px 8px; + line-height: 0.8; + width: max-content; + cursor: pointer; +} + +.resetBtn { + font-size: 14px; + font-weight: 500; + font-family: var(--ifm-font-family-base); + background-color: transparent; + color: #df0101; + border-radius: 4px; + border: 1px solid #df0101; padding: 12px 8px; line-height: 0.8; width: max-content; @@ -32,4 +51,4 @@ div + .refreshBtn { margin-left: 20px; -} \ No newline at end of file +} diff --git a/src/components/atoms/complete-step-button/index.tsx b/src/components/atoms/complete-step-button/index.tsx index 17266738..da3a2a03 100644 --- a/src/components/atoms/complete-step-button/index.tsx +++ b/src/components/atoms/complete-step-button/index.tsx @@ -5,9 +5,9 @@ import React, { useState, } from "react"; import { toast } from "react-toastify"; -import { useSorobanReact } from "@soroban-react/core"; import { useReward } from "react-rewards"; import { AxiosResponse } from "axios"; +import useAuth from "../../../hooks/useAuth"; import styles from "./styles.module.css"; import UserChallengesContext, { UserChallengesContextProps, @@ -19,6 +19,7 @@ import { UpdateProgressData, } from "../../../interfaces/challenge"; import { updateUserProgress } from "../../../services/challenges"; +import { getContractBalance } from "../../../utils/get-contract-balance"; interface CompleteStepButtonState { isCompleted: boolean; @@ -32,6 +33,7 @@ interface CompleteStepButtonProps extends PropsWithChildren { id: number; progress: number; url?: string; + contractId?: string; } const milestoneToast = ( @@ -69,6 +71,7 @@ export default function CompleteStepButton({ id, progress, url, + contractId, }: CompleteStepButtonProps) { const [challenge, setChallenge] = useState(null); const [state, setState] = useState({ @@ -79,7 +82,7 @@ export default function CompleteStepButton({ const { data, updateProgress } = useContext( UserChallengesContext, ); - const { address } = useSorobanReact(); + const { address } = useAuth(); const { reward, isAnimating } = useReward( `reward${id}-${progress}`, "confetti", @@ -139,10 +142,12 @@ export default function CompleteStepButton({ challengeProgress: progress, url, completedAt: Date.now(), - startDate: challenge.startDate, + startDate: challenge?.startDate, + contractId: challenge?.contractId, + totalValueLocked: challenge?.totalValueLocked, }); - showToast(challenge.isPullRequestRequired ? passedToast : completedToast); + showToast(challenge?.isPullRequestRequired ? passedToast : completedToast); reward(); }; @@ -152,6 +157,50 @@ export default function CompleteStepButton({ return; } + let balance = 0; + + // if funding step => get contract balance (except payment for now) + if (progress === 2 && id !== 1) { + if (challenge?.contractId) { + try { + const result = await getContractBalance( + challenge?.contractId, + address, + ); + if (!result) { + toast("No locked balance found!", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + + return; + } + + balance = result; + } catch (error) { + console.error(error); + + toast("No locked balance found!", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + return; + } + } else { + toast("No contract id found!", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + return; + } + } + setState((prevState: CompleteStepButtonState) => { return { ...prevState, @@ -163,7 +212,9 @@ export default function CompleteStepButton({ userId: address, challengeId: id, challengeProgress: progress, - startDate: challenge.startDate, + startDate: challenge?.startDate, + contractId: contractId || challenge?.contractId, + totalValueLocked: challenge?.totalValueLocked || balance, }); showToast(milestoneToast); @@ -174,7 +225,7 @@ export default function CompleteStepButton({ + + + + + ); +} diff --git a/src/components/atoms/confirm-modal/style.module.css b/src/components/atoms/confirm-modal/style.module.css new file mode 100644 index 00000000..d855ac2c --- /dev/null +++ b/src/components/atoms/confirm-modal/style.module.css @@ -0,0 +1,63 @@ +.blurContainer { + position: absolute; + height: 100vh; + width: 100vw; + overflow: hidden; + top: 0; + left: 0; + background: rgba(0, 0, 0, 0.7); + z-index: 1000; +} + +.modalContainer { + position: absolute; + width: 350px; + height: 200px; + top: calc(50% - 100px); + left: calc(50% - 175px); + background-color: #ffffff; + padding: 20px; + border-radius: 8px; + text-align: center; + z-index: 1001; +} + +.title { + font-size: 18px; + font-weight: 600; +} + +.buttons { + margin-top: 20px; + display: flex; + justify-content: center; + gap: 20px; +} + +.cancelBtn { + font-size: 14px; + font-weight: 500; + font-family: var(--ifm-font-family-base); + background-color: transparent; + color: #369ea7; + border-radius: 4px; + border: 1px solid #369ea7; + padding: 12px 8px; + line-height: 0.8; + width: max-content; + cursor: pointer; +} + +.resetBtn { + font-size: 14px; + font-weight: 500; + font-family: var(--ifm-font-family-base); + background-color: transparent; + color: #df0101; + border-radius: 4px; + border: 1px solid #df0101; + padding: 12px 8px; + line-height: 0.8; + width: max-content; + cursor: pointer; +} diff --git a/src/components/atoms/dashboard-header/index.tsx b/src/components/atoms/dashboard-header/index.tsx index 6ab6e499..9520428a 100644 --- a/src/components/atoms/dashboard-header/index.tsx +++ b/src/components/atoms/dashboard-header/index.tsx @@ -1,33 +1,31 @@ -import React, { useEffect, useState } from "react"; +import React , { useState }from "react"; import { toast } from "react-toastify"; +import { Ranking } from "interfaces/challenge"; import styles from "./style.module.css"; import useAuth from "../../../hooks/useAuth"; -interface DashboardHeaderProps { - challengesCompleted: number; +const AVATAR = `/icons/icon-avatar-${Math.floor(Math.random() * 10) + 1}.svg`; + +interface Props { + totalCompleted: number; + ranking: Ranking; } -export default function DashboardHeader({ - challengesCompleted, -}: DashboardHeaderProps) { - const { address, disconnectUser } = useAuth(); - const [avatarNumber, setAvatarNumber] = useState(); - const addressEnding = address?.substring(address.length, address.length - 4); +const DashboardHeader: React.FC = ({ totalCompleted, ranking }) => { + const { address, disconnect } = useAuth(); - useEffect(() => { - setAvatarNumber(Math.floor(Math.random() * 10) + 1); - }, []); + const [showContent, setShowContent] = useState(false); + const addressEnding = address?.substring(address.length, address.length - 4); const copyUserAddress = () => { navigator.clipboard.writeText(address); + toast("Copied to clipboard!", { hideProgressBar: true, position: "top-center", autoClose: 2000, }); }; - - // TODO: Uncomment Logout button when disconnect feature will be fully completed from @soroban-react/core side return (

Your dashboard

@@ -35,14 +33,13 @@ export default function DashboardHeader({
  • User avatar icon
    -
    {address}
    Copy address to clipboard
    - - {/* */} +
  • +
  • Star icon -
    - + completed challenges
  • + +
  • + Ranking icon +
    + + + {showContent && ( +
    + {!ranking.current || !ranking.total ? ( + + Start a challenge to get a rank + + ) : ( + <> + + leaderboard ranking + + )} +
    + )} +
    +
); -} +}; + +export default DashboardHeader; diff --git a/src/components/atoms/dashboard-header/style.module.css b/src/components/atoms/dashboard-header/style.module.css index 7efbc0c5..e5c7576f 100644 --- a/src/components/atoms/dashboard-header/style.module.css +++ b/src/components/atoms/dashboard-header/style.module.css @@ -1,5 +1,5 @@ .dashboardHeader { - background-image: url('/static/img/dashboard-bg.png'); + background-image: url("/static/img/dashboard-bg.png"); background-size: cover; background-position: center; height: 200px; @@ -13,7 +13,19 @@ } .dashboardTabs { - +} + +.toggleButton { + font-family: var(--ifm-font-family-base); + font-size: 14px; + font-weight: 600; + background-color: #FFD748; + color: #222222; + border-radius: 4px; + border: none; + padding: 8px 8px; + width: max-content; + cursor: pointer; } .userInfo { @@ -25,7 +37,14 @@ display: flex; align-items: flex-start; list-style: none; - margin-right: 8%; +} + +.userInfoItem:nth-child(1) { + margin-right: 150px; +} + +.userInfoItem:nth-child(2) { + margin-right: 24px; } .userAddress { @@ -60,7 +79,7 @@ .completedChallenges span { font-size: 12px; - color: #BDBDBD; + color: #bdbdbd; } .copyIcon { @@ -74,7 +93,9 @@ margin-right: 10px; } -.starIcon { +.statsIcon { + width: 30px; + height: 30px; background-color: #444444; padding: 6px; border-radius: 50%; @@ -82,7 +103,7 @@ } .logoutButton { - color: #369EA7; + color: #369ea7; background-color: transparent; padding: 12px 8px; border: none; @@ -90,4 +111,4 @@ font-size: 14px; font-weight: 500; cursor: pointer; -} \ No newline at end of file +} diff --git a/src/components/atoms/start-challenge-button/index.tsx b/src/components/atoms/start-challenge-button/index.tsx index 01fdb468..13da59ce 100644 --- a/src/components/atoms/start-challenge-button/index.tsx +++ b/src/components/atoms/start-challenge-button/index.tsx @@ -32,7 +32,7 @@ const startedToast = ( export default function StartChallengeButton({ id, }: StartChallengeButtonProps) { - const { address, isConnected, connectUser } = useAuth(); + const { address, isConnected, connect } = useAuth(); const [isStarted, setIsStarted] = useState(false); const [isLoading, setIsLoading] = useState(false); const { setData, updateProgress } = useContext( @@ -82,10 +82,10 @@ export default function StartChallengeButton({ return ( ); } diff --git a/src/components/molecules/leaderboard/index.tsx b/src/components/molecules/leaderboard/index.tsx index 81f8707b..9cb055f0 100644 --- a/src/components/molecules/leaderboard/index.tsx +++ b/src/components/molecules/leaderboard/index.tsx @@ -1,18 +1,166 @@ -import React from "react"; +import React, { useState } from "react"; +import { Leaderboard as LeaderboardI } from "../../../interfaces/challenge"; +import { + LeaderboardColumn, + LeaderboardParams, +} from "../../../services/leaderboard"; import styles from "./style.module.css"; -export default function Leaderboard() { +type Props = { + userId?: string; + list: LeaderboardI[]; + isLoading: boolean; + onLoad: (params: LeaderboardParams) => void; +}; + +const PAGE_SIZE = 10; + +const arrowDown = ; +const arrowUp = ; + +const Leaderboard: React.FC = ({ userId, list, isLoading, onLoad }) => { + const [col, setCol] = useState(null); + const [isAsc, setIsAsc] = useState(false); + + const [pageNumber, setPageNumber] = useState(1); + + const maxUsers = list[0]?.ranking.total; + const maxPage = Math.ceil(maxUsers / PAGE_SIZE); + + const onSort = (val: LeaderboardColumn) => { + // if click on current column ? change direction : set default direction + const nextAsc = col === val ? !isAsc : false; + setIsAsc(nextAsc); + onLoad({ + colName: val, + direction: nextAsc ? "asc" : "desc", + }); + setCol(val); + setPageNumber(1); + }; + + const onReset = () => { + setIsAsc(true); + setCol(null); + onLoad({}); + setPageNumber(1); + }; + + const onNext = () => { + const nextPageNumber = pageNumber + 1; + setPageNumber(nextPageNumber); + onLoad({ + pageNumber: nextPageNumber, + ...(col ? { colName: col } : {}), + direction: isAsc ? "asc" : "desc", + }); + }; + + const onPrev = () => { + const nextPageNumber = pageNumber - 1; + setPageNumber(nextPageNumber); + onLoad({ + pageNumber: nextPageNumber, + ...(col ? { colName: col } : {}), + direction: isAsc ? "asc" : "desc", + }); + }; + + const arrow = !isAsc ? arrowDown : arrowUp; + return (
-
- Stay tuned. - Leaderboard is coming soon! + + + + + + + + + + + {isLoading ? null : ( + + {list.map((item) => { + const isCurrent = userId === item.userId; + return ( + + + + + + + + ); + })} + + )} +
+ Place + Address onSort(LeaderboardColumn.TotalValueLocked)} + > + TVL, $ {col === LeaderboardColumn.TotalValueLocked ? arrow : null} + onSort(LeaderboardColumn.ChallengesCompleted)} + > + Number of challenges{" "} + {col === LeaderboardColumn.ChallengesCompleted ? arrow : null} + onSort(LeaderboardColumn.MinutesSpent)} + > + Minutes spent{" "} + {col === LeaderboardColumn.MinutesSpent ? arrow : null} +
+
+ {item.ranking.current} +
+ {isCurrent ? ( + <> + you are here! + Star icon + + ) : null} +
{`${item.userId}`}{item.totalValueLocked}{item.challengesCompleted}{item.minutesSpent}
+ {isLoading ?
Loading
: null} +
+ +
- - Leaderboard placeholder
); -} +}; + +export default Leaderboard; diff --git a/src/components/molecules/leaderboard/style.module.css b/src/components/molecules/leaderboard/style.module.css index 622a3de0..234aacc7 100644 --- a/src/components/molecules/leaderboard/style.module.css +++ b/src/components/molecules/leaderboard/style.module.css @@ -4,7 +4,84 @@ justify-content: center; align-items: center; position: relative; - margin-top: 10%; + padding: 32px 0; +} + +.leadTable { + width: 100%; + display: table; + font-family: "Inter"; + font-size: 14px; + font-weight: 500; +} + +table.leadTable td, +th { + border: none; + background-color: #ffffff; +} + +.leadTableHead { + background-color: var(--secondary-black); + color: #ffffff; +} + +.leadTableHeadColumn { + width: 273px; + padding: 16px; + text-align: start; + border: none; + cursor: pointer; +} + +.leadTableHeadColumnPlace { + width: 273px; + padding: 16px; + text-align: start; + border: none; + cursor: pointer; +} + +.leadTableBody { + color: var(--secondary-black); + background-color: #ffffff; +} + +.leadTableBodyRow { + background-color: #ffffff; + border: none; + border: 0.5px solid var(--secondary-black); +} + +.userRow { + border: 2px solid #ffd748; +} + +.rankingCell { + display: flex; + align-items: center; +} + +.userRankingCell { + padding-left: 7px; +} + +.rankingCellNum { + border: 1px solid black; + width: min-content; + padding: 2px; + border-radius: 50%; + min-width: 28px; + display: flex; + align-items: center; + justify-content: center; +} + +.userRankingCellNum { + border: none; + padding: 5px 10px; + background-color: #ffd748; + margin-right: 5px; } .leaderboardText { @@ -23,4 +100,27 @@ .leaderboardText strong { color: #585858; font-size: 22px; -} \ No newline at end of file +} + +.paginationBlock { + display: flex; + gap: 10px; + align-self: flex-end; +} + +.paginationButton { + padding: 10px; + font-size: 14px; + font-weight: 500; + font-family: var(--ifm-font-family-base); + border-radius: 4px; + border: none; + cursor: pointer; +} + +.loading { + height: 536px; + display: flex; + align-items: center; + justify-content: center; +} diff --git a/src/contants.ts b/src/contants.ts new file mode 100644 index 00000000..151a50c7 --- /dev/null +++ b/src/contants.ts @@ -0,0 +1,5 @@ +export const FUTURENET_DETAILS = { + network: "FUTURENET", + networkUrl: "https://horizon-futurenet.stellar.org", + networkPassphrase: "Test SDF Future Network ; October 2022", +}; diff --git a/src/dev-server-plugin.js b/src/dev-server-plugin.js index 882349ec..fb9423b7 100644 --- a/src/dev-server-plugin.js +++ b/src/dev-server-plugin.js @@ -1,16 +1,25 @@ module.exports = () => ({ name: "dev-server-plugin", - configureWebpack() { + configureWebpack(config) { + config.module.rules.push({ + test: /\.(js|mjs|jsx)$/, + enforce: "pre", + loader: require.resolve("source-map-loader"), + resolve: { + fullySpecified: false, + }, + }); + return { devServer: { - host: '0.0.0.0', + host: "0.0.0.0", client: { webSocketURL: { - port: 0 - } - } - } - } - } -}) \ No newline at end of file + port: 0, + }, + }, + }, + }; + }, +}); diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx index 898ff3c7..ffa99107 100644 --- a/src/hooks/useAuth.tsx +++ b/src/hooks/useAuth.tsx @@ -1,52 +1,76 @@ -import { useLayoutEffect, useState } from "react"; -import { useSorobanReact } from "@soroban-react/core"; +import { useContext, useState } from "react"; +import { toast } from "react-toastify"; +import UserChallengesContext, { + UserChallengesContextProps, +} from "../store/user-challenges-context"; + +// Import the Freighter library +import { isConnected, setAllowed, getPublicKey } from "@stellar/freighter-api"; const useAuth = () => { - const { address, connect, disconnect } = useSorobanReact(); - const [isConnected, setIsConnected] = useState(false); - const addressString = address ? address.toString() : "No address"; + const { address, setAddress } = useContext( + UserChallengesContext + ); - useLayoutEffect(() => { - if (address) { - localStorage.setItem(`isConnected:${address}`, "true"); - } - const isConnectedFromStorage = localStorage.getItem( - `isConnected:${addressString}`, - ); - setIsConnected(!!isConnectedFromStorage); - - if (isConnectedFromStorage) { - try { - connect(); - } catch (error) { - console.error("Error during connection:", error); - } - } - }, [connect, address, addressString]); + const [loading, setLoading] = useState(false); - const connectUser = async () => { + const disconnect = () => { + setAddress(""); + }; + + const connect = async () => { try { - await connect(); - localStorage.setItem(`isConnected:${addressString}`, "true"); - setIsConnected(true); - } catch (error) { - console.error("Error during connection:", error); + setLoading(true); + + // Check if the user has Freighter installed + if (await isConnected()) { + // Prompt the user for authorization if needed + await setAllowed(); + + // Retrieve the user's public key + const publicKey = await getPublicKey(); + + // Store the user's public key in the context + setAddress(publicKey); + + setLoading(false); + + return true; + } else { + // Handle the case where Freighter is not installed + toast("Freighter is not installed!", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + return false; + } + } catch (e) { + console.error("Connection error", e); + + toast("Connection error!", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + return false; } }; - const disconnectUser = async () => { - // TODO: Uncomment this when disconnect feature will be fully completed from @soroban-react/core side - // try { - // await disconnect().then(() => { - // localStorage.removeItem(`isConnected:${addressString}`); - // setIsConnected(false); - // }); - // } catch (error) { - // console.error("Error during disconnection:", error); - // } + const onConnectFreighter = () => { + // Call the connect function to initiate the Freighter connection + connect(); }; - return { address, isConnected, connectUser, disconnectUser }; + return { + address, + isConnected: !!address, + loading, + connect: onConnectFreighter, + disconnect, + }; }; export default useAuth; diff --git a/src/interfaces/challenge.ts b/src/interfaces/challenge.ts index d9897a40..53788d89 100644 --- a/src/interfaces/challenge.ts +++ b/src/interfaces/challenge.ts @@ -8,8 +8,23 @@ export interface UpdateProgressData { challengeId: number; challengeProgress: number; url?: string; - startDate: number; + startDate?: number; completedAt?: number; + contractId?: string; + totalValueLocked?: number; +} + +export interface Ranking { + current: number; + total: number; +} + +export interface Leaderboard { + userId: string; + ranking: Ranking; + totalValueLocked: number; + minutesSpent: number; + challengesCompleted: number; } export interface Challenge { @@ -22,13 +37,16 @@ export interface Challenge { export interface ChallengeInfo extends Challenge { progress?: number; url?: string; + contractId?: string; startDate?: number; completedAt?: number; isCompleted?: boolean; + totalValueLocked?: number; } export interface UserProgress { userId: string; completedChallenges: number; + ranking: Ranking; challenges: ChallengeInfo[]; } diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx index b4c01e75..ce943038 100644 --- a/src/pages/dashboard/index.tsx +++ b/src/pages/dashboard/index.tsx @@ -2,28 +2,133 @@ import React, { useEffect, useState } from "react"; import Layout from "@theme/Layout"; import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +import { toast } from "react-toastify"; +import { + LeaderboardParams, + fetchLeaderboard, +} from "../../services/leaderboard"; import styles from "./style.module.css"; -import { fetchInitialChallenges } from "../../services/challenges"; +import { + fetchInitialChallenges, + fetchUserProgress, + resetUserProgress, +} from "../../services/challenges"; import useAuth from "../../hooks/useAuth"; import DashboardHeader from "../../components/atoms/dashboard-header"; import Leaderboard from "../../components/molecules/leaderboard"; import ChallengesList from "../../components/atoms/challenges-list"; -import { Challenge } from "../../interfaces/challenge"; +import { + Challenge, + ChallengeInfo, + Leaderboard as LeaderboardI, + Ranking, +} from "../../interfaces/challenge"; export default function Dashboard() { - const [initialChallenges, setInitialChallenges] = useState(); - const [totalCompleted, setTotalCompleted] = useState(); - const [isLoading, setIsLoading] = useState(false); - const { address, isConnected, connectUser } = useAuth(); + const { address, isConnected, connect } = useAuth(); + + const [availableChallenges, setAvailableChallenges] = useState( + [], + ); + const [userChallenges, setUserChallenges] = useState([]); + const [leaderboard, setLeaderboard] = useState([]); + const [totalCompleted, setTotalCompleted] = useState(0); + const [ranking, setRanking] = useState(null); + const [isLoading, setIsLoading] = useState(true); + const [isLeaderboardLoading, setIsLeaderboardLoading] = + useState(false); + + const fetchUserChallenges = async () => { + setIsLoading(true); + try { + const result = await fetchUserProgress(address); + setUserChallenges(result.data?.challenges || []); + setTotalCompleted(result.data?.completedChallenges || 0); + setRanking(result.data?.ranking || null); + } catch (e) { + toast("Something went wrong! Please reload", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + } finally { + setIsLoading(false); + } + }; + + const fetchOnlyLeaderboard = async (params: LeaderboardParams) => { + try { + setIsLeaderboardLoading(true); + const result = await fetchLeaderboard(params); + setLeaderboard(result?.data); + } catch (e) { + toast("Something went wrong! Please reload", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + } finally { + setIsLeaderboardLoading(false); + } + }; + + const onReset = async () => { + try { + setIsLoading(true); + await resetUserProgress(address); + } catch (error) { + toast("Something went wrong! Please try again", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); + } finally { + setIsLoading(false); + } + }; useEffect(() => { const fetchData = async () => { - setIsLoading(true); try { - const response = await fetchInitialChallenges(); - setInitialChallenges(response.data); - } finally { + setIsLoading(true); + + const result = await Promise.allSettled([ + fetchInitialChallenges(), + fetchLeaderboard({}), + fetchUserProgress(address), + ]); + + if (result[0].status === "fulfilled") { + setAvailableChallenges(result[0].value.data || []); + } + if (result[1].status === "fulfilled") { + setLeaderboard(result[1].value.data || []); + } + if (result[2].status === "fulfilled") { + setUserChallenges(result[2].value.data?.challenges || []); + setTotalCompleted(result[2].value.data?.completedChallenges || 0); + setRanking(result[2].value.data?.ranking || null); + } + + if ( + result[0].status === "rejected" || + result[1].status === "rejected" || + result[2].status === "rejected" + ) { + throw new Error("Some request error"); + } setIsLoading(false); + } catch (error) { + setIsLoading(false); + toast("Something went wrong! Please reload", { + type: "error", + hideProgressBar: true, + position: "top-center", + autoClose: 2000, + }); } }; fetchData(); @@ -33,46 +138,45 @@ export default function Dashboard() {
{isConnected && address ? ( - <> - -
- - - - - - - - -
- - ) : ( - <> -
- {isLoading ? ( -

We're loading the list of challenges...

- ) : ( + + ) : null} + +
+ {isLoading ? ( +

We're loading the list of challenges...

+ ) : ( + + + + + - )} -
+ + + )} +
-
- Want to take part in our challenges? - -
- - )} + {!isConnected || !address ? ( +
+ Want to take part in our challenges? + +
+ ) : null}
); diff --git a/src/services/challenges.ts b/src/services/challenges.ts index 768669d0..1a86b61a 100644 --- a/src/services/challenges.ts +++ b/src/services/challenges.ts @@ -20,6 +20,12 @@ export const fetchUserProgress = async (userId: string) => { }); }; +export const resetUserProgress = async (userId: string) => { + return await httpClient.delete("/users", { + params: { userId }, + }); +}; + export const updateUserProgress = async (challenge: UpdateProgressData) => { return await httpClient.post< Partial, diff --git a/src/services/leaderboard.ts b/src/services/leaderboard.ts new file mode 100644 index 00000000..5a70adcd --- /dev/null +++ b/src/services/leaderboard.ts @@ -0,0 +1,31 @@ +import { Leaderboard } from "../interfaces/challenge"; +import { httpClient } from "./http-client"; + +export enum LeaderboardColumn { + ChallengesCompleted = "challengesCompleted", + MinutesSpent = "minutesSpent", + TotalValueLocked = "totalValueLocked", +} + +export type LeaderboardParams = { + colName?: LeaderboardColumn; + direction?: "asc" | "desc"; + pageNumber?: number; +}; + +export const fetchLeaderboard = async ({ + colName, + direction = "asc", + pageNumber, +}: LeaderboardParams) => { + return await httpClient.get("/leaderboard", { + params: { + ...(colName + ? { + sort: `${colName},${direction}`, + } + : {}), + ...(pageNumber ? { pageNumber } : {}), + }, + }); +}; diff --git a/src/store/UserChallengesContextProvider.tsx b/src/store/UserChallengesContextProvider.tsx index 7ccc4db6..11c01cf0 100644 --- a/src/store/UserChallengesContextProvider.tsx +++ b/src/store/UserChallengesContextProvider.tsx @@ -1,29 +1,36 @@ import React, { PropsWithChildren, useReducer } from "react"; -import UserChallengesContext, { UserChallengesContextProps } from "./user-challenges-context"; +import UserChallengesContext, { + UserChallengesContextProps, +} from "./user-challenges-context"; import { ChallengeInfo } from "../interfaces/challenge"; interface ChallengesState { data: ChallengeInfo[]; + address: string; } interface Action { type: string; data?: ChallengeInfo[]; item?: ChallengeInfo; + payload?: string; } enum ActionType { SET_DATA = "SET_DATA", UPDATE_PROGRESS = "UPDATE_PROGRESS", + SET_ADDRESS = "SET_ADDRESS", } const defaultState: ChallengesState = { data: [], + address: "", }; const challengesReducer = (state: ChallengesState, action: Action) => { if (action.type === ActionType.SET_DATA && action.data) { return { + ...state, data: [...action.data], }; } @@ -44,10 +51,18 @@ const challengesReducer = (state: ChallengesState, action: Action) => { } return { + ...state, data: updatedChallenges, }; } + if (action.type === ActionType.SET_ADDRESS && action.payload) { + return { + ...state, + address: action.payload, + }; + } + return defaultState; }; @@ -68,8 +83,17 @@ const UserChallengesContextProvider = (props: PropsWithChildren) => { }); }; + const setAddress = (address: string) => { + dispatchAction({ + type: ActionType.SET_ADDRESS, + payload: address, + }); + }; + const challengesCtx: UserChallengesContextProps = { data: state.data, + address: state.address, + setAddress, setData: setDataHandler, updateProgress: updateProgressHandler, }; diff --git a/src/store/user-challenges-context.ts b/src/store/user-challenges-context.ts index 56cdbf1e..20fb421d 100644 --- a/src/store/user-challenges-context.ts +++ b/src/store/user-challenges-context.ts @@ -3,14 +3,18 @@ import { ChallengeInfo } from "../interfaces/challenge"; export type UserChallengesContextProps = { data: ChallengeInfo[]; + address: string; setData: (data: ChallengeInfo[]) => void; updateProgress: (item: ChallengeInfo) => void; + setAddress: (address: string) => void; }; const UserChallengesContext = React.createContext({ data: [], + address: "", setData: () => {}, updateProgress: () => {}, + setAddress: () => {}, }); export default UserChallengesContext; diff --git a/src/theme/Root.tsx b/src/theme/Root.tsx index 5741eb35..d51f2bc1 100644 --- a/src/theme/Root.tsx +++ b/src/theme/Root.tsx @@ -21,9 +21,7 @@ export default function Root({ children }: PropsWithChildren) { > - - {children} - + {children} ); } diff --git a/src/utils/get-contract-balance.ts b/src/utils/get-contract-balance.ts new file mode 100644 index 00000000..632d4a73 --- /dev/null +++ b/src/utils/get-contract-balance.ts @@ -0,0 +1,50 @@ +import { + Contract, + scValToBigInt, + Server, + TransactionBuilder, + TimeoutInfinite, + Address, +} from "soroban-client"; +import { FUTURENET_DETAILS } from "../contants"; + +const XLM_DECIMALS = 7; + +const BASE_FEE = "100"; +const RPC_URLS: { [key: string]: string } = { + FUTURENET: "https://rpc-futurenet.stellar.org/", +}; +const server = new Server(RPC_URLS[FUTURENET_DETAILS.network]); + +function formatAmount( + undivided: bigint, + decimals?: number = XLM_DECIMALS, +): string { + const n = + undivided.valueOf() < BigInt(Number.MAX_SAFE_INTEGER) + ? Number(undivided) / 10 ** decimals + : undivided.valueOf() / 10n ** BigInt(decimals); + return String(n); +} + +export const getContractBalance = async ( + contractId: string, + address: string, +): Promise => { + const account = await server.getAccount(address); + const contract = new Contract(contractId); + const params = [new Address(address).toScVal()]; + + const transaction = new TransactionBuilder(account, { + fee: BASE_FEE, + networkPassphrase: FUTURENET_DETAILS.networkPassphrase, + }) + .addOperation(contract.call("balance", ...params)) + .setTimeout(TimeoutInfinite) + .build(); + + const response = await server.simulateTransaction(transaction); + + const balanceStr = formatAmount(scValToBigInt(response.result.retval)); + return +balanceStr; +}; diff --git a/static/icons/icon-ranking.svg b/static/icons/icon-ranking.svg new file mode 100644 index 00000000..8e1b0105 --- /dev/null +++ b/static/icons/icon-ranking.svg @@ -0,0 +1,4 @@ + + + + diff --git a/static/icons/icon-star-yellow.svg b/static/icons/icon-star-yellow.svg new file mode 100644 index 00000000..f41ea093 --- /dev/null +++ b/static/icons/icon-star-yellow.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/tsconfig.json b/tsconfig.json index 509ae59b..6ffd87c9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "target": "ES6", "baseUrl": "./src", "jsx": "react", - "moduleResolution" : "NodeNext", + "moduleResolution": "NodeNext" }, "exclude": ["node_modules", "**/node_modules/*"], "extends": "@stellar/tsconfig" diff --git a/yarn.lock b/yarn.lock index 197e0030..9baa7afb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2121,9 +2121,14 @@ integrity sha512-5aUkncDMmx0SvVlZD4rld5snGKt3mc0Gno1Jik3Pp31HUmpgrkRUD3ZZekEOqB9mDKadZhQZNNsS0jhyuXaayw== "@stellar/freighter-api@^1.4.0": - version "1.5.1" - resolved "https://registry.npmjs.org/@stellar/freighter-api/-/freighter-api-1.5.1.tgz" - integrity sha512-WEnKEqd+xVLnOq6bJv+fLXod8JQyPjzpOKTpH4g7tG9MM1fmXzD3y2SXJlpCIw8kVqtiC4ynWOlSWX+TKO7KiQ== + version "1.6.0" + resolved "https://registry.npmjs.org/@stellar/freighter-api/-/freighter-api-1.6.0.tgz" + integrity sha512-Z6CRY+3+whzMspda6PiHEc4Rs9tdQkHLin9FopdnHhij/FEEAK+IiuF8Ki2ROcQweXdazb8N237aSim10s+Zgw== + +"@stellar/freighter-api@^1.6.1": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@stellar/freighter-api/-/freighter-api-1.6.1.tgz#f61d74b8aef2d461d9a1f443ad660c42ad1b49b4" + integrity sha512-8XjwQ0cSjwZai4N+C6ZKq5tljTZrxj99lgYoyMwWCiQP3MbcHUngGNIuQ1xX1iKF1EhTT/86HRsDeRm61mB6tg== "@stellar/prettier-config@^1.0.1": version "1.0.1" @@ -2807,6 +2812,11 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + abbrev@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz" @@ -3281,10 +3291,10 @@ big.js@^5.2.2: resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -bignumber.js@^9.1.1: - version "9.1.1" - resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== +bignumber.js@^9.1.1, bignumber.js@^9.1.2: + version "9.1.2" + resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== binary-extensions@^2.0.0: version "2.2.0" @@ -6184,7 +6194,7 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@0.6: +iconv-lite@0.6, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -6707,6 +6717,11 @@ js-xdr@^2.0.0: resolved "https://registry.npmjs.org/js-xdr/-/js-xdr-2.0.0.tgz" integrity sha512-4mctWHR47ejNcfpE8/Xl3l2wYqO1Qy09d1pveZRmarUz2BcuU/M8grzadxV6PoN/X0ywOb6cy6117qYUWkfeBA== +js-xdr@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/js-xdr/-/js-xdr-3.0.0.tgz" + integrity sha512-tSt6UKJ2L7t+yaQURGkHo9kop9qnVbChTlCu62zNiDbDZQoZb/YjUj2iFJ3lgelhfg9p5bhO2o/QX+g36TPsSQ== + js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" @@ -7614,9 +7629,9 @@ node-forge@^1: integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== node-gyp-build@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz" - integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + version "4.6.1" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz" + integrity sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ== node-releases@^2.0.12: version "2.0.13" @@ -9442,6 +9457,17 @@ soroban-client@0.8.1: toml "^3.0.0" urijs "^1.19.1" +soroban-client@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.npmjs.org/soroban-client/-/soroban-client-1.0.0-beta.2.tgz" + integrity sha512-v5h3yvef7HkUD3H26w33NUEgRXcPiOSDWEsVzMloaxsprs3N002tXJHvFF+Uw1eYt50Uk6bvqBgvkLwX10VENw== + dependencies: + axios "^1.4.0" + bignumber.js "^9.1.1" + buffer "^6.0.3" + stellar-base v10.0.0-beta.1 + urijs "^1.19.1" + sort-css-media-queries@2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/sort-css-media-queries/-/sort-css-media-queries-2.1.0.tgz" @@ -9452,6 +9478,15 @@ sort-css-media-queries@2.1.0: resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-loader@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz" + integrity sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA== + dependencies: + abab "^2.0.6" + iconv-lite "^0.6.3" + source-map-js "^1.0.2" + source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" @@ -9562,6 +9597,20 @@ stellar-base@9.0.0-soroban.3: optionalDependencies: sodium-native "^4.0.1" +stellar-base@v10.0.0-beta.1: + version "10.0.0-beta.1" + resolved "https://registry.npmjs.org/stellar-base/-/stellar-base-10.0.0-beta.1.tgz" + integrity sha512-zXC5AsbUsLi57JruyeIMv23s3iUxq/P2ZFrSJ+FerLIZjSAjY8EDs4zwY4LCuu7swUu46Lm8GK6sqxUZCPekHw== + dependencies: + base32.js "^0.1.0" + bignumber.js "^9.1.2" + buffer "^6.0.3" + js-xdr "^3.0.0" + sha.js "^2.3.6" + tweetnacl "^1.0.3" + optionalDependencies: + sodium-native "^4.0.1" + string-natural-compare@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz"