From 50e03d08bf09657cf4e1346e482a529ce9b990bc Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 13:18:32 +0200 Subject: [PATCH 001/142] added info on post_process.sh --- documentation/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/documentation/README.md b/documentation/README.md index 59c5e32133..3defd29526 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -9,5 +9,4 @@ Each directory contains a readme with more information about running and contrib ## Scripts * `bump_versions.sh` allows you to update the ~~`platform_release_version` and~~ `wallet_release_version` variable~~s~~ in the `book.toml` of each mdbook project at once. You can also optionally update the `minimum_rust_version` as well. Helpful for lazy-updating when cutting a new version of the docs. * `build_all_to_dist.sh` is used by the `ci-dev.yml` and `cd-dev.yml` scripts for building all mdbook projects and moving the rendered html to `../dist/` to be rsynced with various servers. - - +* `post_process.sh` is a script called by the github CI and CD workflows to post process CSS/image/href links for serving several mdbooks from a subdirectory. From 2806931ca17198f9f3143f61a35e1eff6053f79c Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 14:50:03 +0200 Subject: [PATCH 002/142] added new pages --- documentation/dev-portal/book.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/dev-portal/book.toml b/documentation/dev-portal/book.toml index d0dfbe0674..1012ec22f9 100644 --- a/documentation/dev-portal/book.toml +++ b/documentation/dev-portal/book.toml @@ -43,7 +43,7 @@ turn-off = true [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` +assets_version = "2.0.1" # do not edit: managed by `mdbook-admonish install` # variables preprocessor: import variables into files # https://gitlab.com/tglman/mdbook-variables/ From 0e1548db72f019d076682d45b3a5f3e36e4973d5 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 14:50:24 +0200 Subject: [PATCH 003/142] added new pages to summary --- documentation/dev-portal/src/SUMMARY.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/documentation/dev-portal/src/SUMMARY.md b/documentation/dev-portal/src/SUMMARY.md index 5dcbd3ba70..7c9836c58a 100644 --- a/documentation/dev-portal/src/SUMMARY.md +++ b/documentation/dev-portal/src/SUMMARY.md @@ -22,6 +22,13 @@ - [NymConnect Matrix](tutorials/matrix.md) - [NymConnect Telegram](tutorials/telegram.md) +# Code Examples + +- [Rust](examples/rust.md) +- [Typescript](examples/typescript.md) +- [Nym Demos](examples/demos.md) +- [Community Apps](examples/community-apps.md) + # Integrations - [Integration Options](integrations/integration-options.md) @@ -41,7 +48,7 @@ - [Preparing Your Service pt2](tutorials/cosmos-service/service-src.md) - [Querying the Chain](tutorials/cosmos-service/querying.md) - [Typescript](tutorials/typescript.md) - - [Simple Service Provider](tutorials/simple-service-provider/simple-service-provider.md) + - [[DEPRECATED] Simple Service Provider](tutorials/simple-service-provider/simple-service-provider.md) - [Tutorial Overview](tutorials/simple-service-provider/overview.md) - [Preparing Your User Client Environment](tutorials/simple-service-provider/preparating-env.md) - [Building Your User Client](tutorials/simple-service-provider/user-client.md) From 7b3a8d5bcd34d01aae9a6bc6b27632b448af74a0 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 14:50:40 +0200 Subject: [PATCH 004/142] added new examples pages --- documentation/dev-portal/src/examples/community-apps.md | 1 + documentation/dev-portal/src/examples/demos.md | 1 + documentation/dev-portal/src/examples/rust.md | 1 + documentation/dev-portal/src/examples/typescript.md | 1 + 4 files changed, 4 insertions(+) create mode 100644 documentation/dev-portal/src/examples/community-apps.md create mode 100644 documentation/dev-portal/src/examples/demos.md create mode 100644 documentation/dev-portal/src/examples/rust.md create mode 100644 documentation/dev-portal/src/examples/typescript.md diff --git a/documentation/dev-portal/src/examples/community-apps.md b/documentation/dev-portal/src/examples/community-apps.md new file mode 100644 index 0000000000..b6c3fda9c6 --- /dev/null +++ b/documentation/dev-portal/src/examples/community-apps.md @@ -0,0 +1 @@ +# Community Apps diff --git a/documentation/dev-portal/src/examples/demos.md b/documentation/dev-portal/src/examples/demos.md new file mode 100644 index 0000000000..ddcf4dd8c4 --- /dev/null +++ b/documentation/dev-portal/src/examples/demos.md @@ -0,0 +1 @@ +# Nym Demos diff --git a/documentation/dev-portal/src/examples/rust.md b/documentation/dev-portal/src/examples/rust.md new file mode 100644 index 0000000000..2f1d5efed1 --- /dev/null +++ b/documentation/dev-portal/src/examples/rust.md @@ -0,0 +1 @@ +# Rust diff --git a/documentation/dev-portal/src/examples/typescript.md b/documentation/dev-portal/src/examples/typescript.md new file mode 100644 index 0000000000..42c9775801 --- /dev/null +++ b/documentation/dev-portal/src/examples/typescript.md @@ -0,0 +1 @@ +# Typescript From bd10b17272400e80638dce5946986c1ac3952857 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 14:50:53 +0200 Subject: [PATCH 005/142] update plugin --- documentation/dev-portal/mdbook-admonish.css | 172 ++++++++++--------- 1 file changed, 92 insertions(+), 80 deletions(-) diff --git a/documentation/dev-portal/mdbook-admonish.css b/documentation/dev-portal/mdbook-admonish.css index e0a3365532..244bc9ade7 100644 --- a/documentation/dev-portal/mdbook-admonish.css +++ b/documentation/dev-portal/mdbook-admonish.css @@ -1,18 +1,31 @@ @charset "UTF-8"; :root { - --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--note: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--abstract: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--info: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--tip: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--success: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--question: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--warning: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--failure: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--danger: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--bug: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--example: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--quote: + url("data:image/svg+xml;charset=utf-8,"); + --md-details-icon: + url("data:image/svg+xml;charset=utf-8,"); } :is(.admonition) { @@ -62,7 +75,7 @@ a.admonition-anchor-link::before { content: "§"; } -:is(.admonition-title, summary.admonition-title) { +:is(.admonition-title, summary) { position: relative; min-height: 4rem; margin-block: 0; @@ -73,13 +86,13 @@ a.admonition-anchor-link::before { background-color: rgba(68, 138, 255, 0.1); display: flex; } -:is(.admonition-title, summary.admonition-title) p { +:is(.admonition-title, summary) p { margin: 0; } -html :is(.admonition-title, summary.admonition-title):last-child { +html :is(.admonition-title, summary):last-child { margin-bottom: 0; } -:is(.admonition-title, summary.admonition-title)::before { +:is(.admonition-title, summary)::before { position: absolute; top: 0.625em; inset-inline-start: 1.6rem; @@ -94,7 +107,7 @@ html :is(.admonition-title, summary.admonition-title):last-child { -webkit-mask-size: contain; content: ""; } -:is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { +:is(.admonition-title, summary):hover a.admonition-anchor-link { display: initial; } @@ -119,204 +132,204 @@ details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } -:is(.admonition):is(.admonish-note) { +:is(.admonition):is(.note) { border-color: #448aff; } -:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { +:is(.note) > :is(.admonition-title, summary) { background-color: rgba(68, 138, 255, 0.1); } -:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { +:is(.note) > :is(.admonition-title, summary)::before { background-color: #448aff; - mask-image: var(--md-admonition-icon--admonish-note); - -webkit-mask-image: var(--md-admonition-icon--admonish-note); + mask-image: var(--md-admonition-icon--note); + -webkit-mask-image: var(--md-admonition-icon--note); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { +:is(.admonition):is(.abstract, .summary, .tldr) { border-color: #00b0ff; } -:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { background-color: rgba(0, 176, 255, 0.1); } -:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { background-color: #00b0ff; - mask-image: var(--md-admonition-icon--admonish-abstract); - -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); + mask-image: var(--md-admonition-icon--abstract); + -webkit-mask-image: var(--md-admonition-icon--abstract); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-info, .admonish-todo) { +:is(.admonition):is(.info, .todo) { border-color: #00b8d4; } -:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { +:is(.info, .todo) > :is(.admonition-title, summary) { background-color: rgba(0, 184, 212, 0.1); } -:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { +:is(.info, .todo) > :is(.admonition-title, summary)::before { background-color: #00b8d4; - mask-image: var(--md-admonition-icon--admonish-info); - -webkit-mask-image: var(--md-admonition-icon--admonish-info); + mask-image: var(--md-admonition-icon--info); + -webkit-mask-image: var(--md-admonition-icon--info); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { +:is(.admonition):is(.tip, .hint, .important) { border-color: #00bfa5; } -:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { +:is(.tip, .hint, .important) > :is(.admonition-title, summary) { background-color: rgba(0, 191, 165, 0.1); } -:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { +:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { background-color: #00bfa5; - mask-image: var(--md-admonition-icon--admonish-tip); - -webkit-mask-image: var(--md-admonition-icon--admonish-tip); + mask-image: var(--md-admonition-icon--tip); + -webkit-mask-image: var(--md-admonition-icon--tip); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { +:is(.admonition):is(.success, .check, .done) { border-color: #00c853; } -:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { +:is(.success, .check, .done) > :is(.admonition-title, summary) { background-color: rgba(0, 200, 83, 0.1); } -:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { +:is(.success, .check, .done) > :is(.admonition-title, summary)::before { background-color: #00c853; - mask-image: var(--md-admonition-icon--admonish-success); - -webkit-mask-image: var(--md-admonition-icon--admonish-success); + mask-image: var(--md-admonition-icon--success); + -webkit-mask-image: var(--md-admonition-icon--success); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { +:is(.admonition):is(.question, .help, .faq) { border-color: #64dd17; } -:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { +:is(.question, .help, .faq) > :is(.admonition-title, summary) { background-color: rgba(100, 221, 23, 0.1); } -:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { +:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { background-color: #64dd17; - mask-image: var(--md-admonition-icon--admonish-question); - -webkit-mask-image: var(--md-admonition-icon--admonish-question); + mask-image: var(--md-admonition-icon--question); + -webkit-mask-image: var(--md-admonition-icon--question); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { +:is(.admonition):is(.warning, .caution, .attention) { border-color: #ff9100; } -:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { +:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { background-color: rgba(255, 145, 0, 0.1); } -:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { +:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { background-color: #ff9100; - mask-image: var(--md-admonition-icon--admonish-warning); - -webkit-mask-image: var(--md-admonition-icon--admonish-warning); + mask-image: var(--md-admonition-icon--warning); + -webkit-mask-image: var(--md-admonition-icon--warning); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { +:is(.admonition):is(.failure, .fail, .missing) { border-color: #ff5252; } -:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { +:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { background-color: rgba(255, 82, 82, 0.1); } -:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { +:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { background-color: #ff5252; - mask-image: var(--md-admonition-icon--admonish-failure); - -webkit-mask-image: var(--md-admonition-icon--admonish-failure); + mask-image: var(--md-admonition-icon--failure); + -webkit-mask-image: var(--md-admonition-icon--failure); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-danger, .admonish-error) { +:is(.admonition):is(.danger, .error) { border-color: #ff1744; } -:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { +:is(.danger, .error) > :is(.admonition-title, summary) { background-color: rgba(255, 23, 68, 0.1); } -:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { +:is(.danger, .error) > :is(.admonition-title, summary)::before { background-color: #ff1744; - mask-image: var(--md-admonition-icon--admonish-danger); - -webkit-mask-image: var(--md-admonition-icon--admonish-danger); + mask-image: var(--md-admonition-icon--danger); + -webkit-mask-image: var(--md-admonition-icon--danger); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-bug) { +:is(.admonition):is(.bug) { border-color: #f50057; } -:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { +:is(.bug) > :is(.admonition-title, summary) { background-color: rgba(245, 0, 87, 0.1); } -:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { +:is(.bug) > :is(.admonition-title, summary)::before { background-color: #f50057; - mask-image: var(--md-admonition-icon--admonish-bug); - -webkit-mask-image: var(--md-admonition-icon--admonish-bug); + mask-image: var(--md-admonition-icon--bug); + -webkit-mask-image: var(--md-admonition-icon--bug); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-example) { +:is(.admonition):is(.example) { border-color: #7c4dff; } -:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { +:is(.example) > :is(.admonition-title, summary) { background-color: rgba(124, 77, 255, 0.1); } -:is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { +:is(.example) > :is(.admonition-title, summary)::before { background-color: #7c4dff; - mask-image: var(--md-admonition-icon--admonish-example); - -webkit-mask-image: var(--md-admonition-icon--admonish-example); + mask-image: var(--md-admonition-icon--example); + -webkit-mask-image: var(--md-admonition-icon--example); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-quote, .admonish-cite) { +:is(.admonition):is(.quote, .cite) { border-color: #9e9e9e; } -:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { +:is(.quote, .cite) > :is(.admonition-title, summary) { background-color: rgba(158, 158, 158, 0.1); } -:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { +:is(.quote, .cite) > :is(.admonition-title, summary)::before { background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--admonish-quote); - -webkit-mask-image: var(--md-admonition-icon--admonish-quote); + mask-image: var(--md-admonition-icon--quote); + -webkit-mask-image: var(--md-admonition-icon--quote); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; @@ -327,8 +340,7 @@ details[open].admonition > summary.admonition-title::after { background-color: var(--sidebar-bg); } -.ayu :is(.admonition), -.coal :is(.admonition) { +.ayu :is(.admonition), .coal :is(.admonition) { background-color: var(--theme-hover); } From b26f70eb6a48c708cdf11815693c68ad3a6e5034 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 14:51:05 +0200 Subject: [PATCH 006/142] stripped down + added new links --- .../src/infrastructure/node-types.md | 42 +++---------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/documentation/dev-portal/src/infrastructure/node-types.md b/documentation/dev-portal/src/infrastructure/node-types.md index e864208cd3..c918c0e6d9 100644 --- a/documentation/dev-portal/src/infrastructure/node-types.md +++ b/documentation/dev-portal/src/infrastructure/node-types.md @@ -4,43 +4,11 @@ Discover the workings of Nym's privacy-enhancing mixnet infrastructure through t -### Mixnet Infrastructure - -There are few types of Nym infrastructure nodes: - -#### Mix Nodes -Mix nodes play a critical role in the Nym network by providing enhanced security and privacy to network content and metadata. They are part of the three-layer mixnet that ensures that communication remains anonymous and untraceable. Mix nodes receive `NYM` tokens as compensation for their quality of service, which is measured by the network validators. - -Mix nodes anonymously relay encrypted Sphinx packets between each other, adding an extra layer of protection by reordering and delaying the packets before forwarding them to the intended recipient. Additionally, cover traffic is maintained through mix nodes sending Sphinx packets to other mix nodes, making it appear as if there is a constant flow of user messages and further protecting the privacy of legitimate data packets. - -With the ability to hide, reorder and add a delay to network traffic, mix nodes make it difficult for attackers to perform time-based correlation attacks and deanonymize users. By consistently delivering high-quality service, mix nodes are rewarded with NYM tokens, reinforcing the integrity of the Nym network. - -#### Gateways -Gateways serve as the point of entry for user data into the mixnet, verifying that users have acquired sufficient NYM-based bandwidth credentials before allowing encrypted packets to be forwarded to mixnodes. They are also responsible for safeguarding against denial of service attacks and act as a message storage for users who may go offline. - -Gateways receive bandwidth credentials from users, which are periodically redeemed for `NYM` tokens as payment for their services. Users have the flexibility to choose a single gateway, split traffic across multiple gateways, run their own gateways, or a combination of these options. - -In addition, gateways also cache messages, functioning as an inbox for users who are offline. By providing secure, reliable access to the mixnet and ensuring that data remains protected, gateways play a crucial role in maintaining the integrity of the Nym network. - -#### Validators -Validators are essential to the security and integrity of the Nym network, tasked with several key responsibilities. They utilize proof-of-stake Sybil defense measures to secure the network and determine which nodes are included within it. Through their collaborative efforts, validators create Coconut threshold credentials which provide anonymous access to network data and resources. - -Validators also play a critical role in maintaining the Nym Cosmos blockchain, a secure, public ledger that records network-wide information such as node public information and keys, network configuration parameters, CosmWasm smart contracts, and `NYM` and credential transactions. - -#### Service Providers -Service Providers are a crucial aspect of the Nym infrastructure that support the application layer of the Nym network. Any application built with Nym will require a Service Provider, which can be created by anyone. Service Providers run a piece of binary code that enables them to handle requests from Nym users or other services, and then make requests to external servers on behalf of the users. - -For example, a Service Provider could receive a request to check a mail server and then forward the response to the user. The presence of Service Providers in the Nym network enhances its security and privacy, making it a reliable and robust platform for anonymous communication and data exchange. - ### Where do I go from here? 💭 -Maybe you would like to concentrate on building a application that uses the mixnet: +For more in-depth information on the network architecture, head to the [Network Overview page](https://nymtech.net/docs/architecture/network-overview.html). -* Explore the Tutorials section of the Developer Portal. Our in-depth tutorial on [Building a Simple Service Provider](../tutorials/simple-service-provider/simple-service-provider.md) give a good understanding of building User Clients and Service Providers in TypeScript, and how to configure Nym Websocket Clients for seamless communication with the mixnet. - -* Get started with using the Nym Mixnet quickly and easily by exploring the [Quickstart](../quickstart/overview.md) options, such a NymConnect, proxying traffic through the Nym Socks5 client, or dive into integrating Nym into your existing application with the [Integrations](../integrations/integration-options.md) section. - -Or perhaps you a developer that would like to run a infrastructure node such as a Gateway, Mix node or Network Requestor: -* Check out the [Network Overview](https://nymtech.net/docs/architecture/network-overview.html) docs page. - -* Take a look at our [Node Setup Guide](https://nymtech.net/operators/nodes/setup-guides.html) with our Nym Docs, containing setup guides for setting up you own infrastructure node. +If you would like to concentrate on building an application that uses the mixnet: +* Get started with using the Nym Mixnet quickly and easily by exploring the [Quickstart](../quickstart/overview.md) options. +* Go the [Tutorials](../tutorials) section . +* Check out examples of [Community Apps](../community-resources/community-applications-and-guides.md). From 0347a2bd892524fb07cfa8ab8cec8fb977f4e121 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 14:51:15 +0200 Subject: [PATCH 007/142] added deprecation warning --- .../simple-service-provider/simple-service-provider.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/documentation/dev-portal/src/tutorials/simple-service-provider/simple-service-provider.md b/documentation/dev-portal/src/tutorials/simple-service-provider/simple-service-provider.md index b08d988de2..ece2427041 100644 --- a/documentation/dev-portal/src/tutorials/simple-service-provider/simple-service-provider.md +++ b/documentation/dev-portal/src/tutorials/simple-service-provider/simple-service-provider.md @@ -1,5 +1,12 @@ # Building a Simple Service Provider +```admonish warning +This tutorial was written before the creation of the [Typescript SDK](https://sdk.nymtech.net), and involves running a Nym Client alongside your application processes, instead of relying on the SDK to integrate the Client process into your application logic. + +As such, although this tutorial is still a valid way of approaching building on Nym, it is a little less streamlined than it could be. + +A more streamlined rewrite of this tutorial will be coming soon. +``` This tutorial is the best place to start for developers new to Nym. You will learn how to build a minimum viable privacy-enabled application (PEApp) able to send and receive traffic via the mixnet. This tutorial is less about building an immediately useful application, and more about beginning to understand: From 15af5511399fd1cb1c2abca908e8a7d4686b4e9e Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 24 Oct 2023 15:03:58 +0200 Subject: [PATCH 008/142] smol reword --- documentation/dev-portal/src/infrastructure/node-types.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/dev-portal/src/infrastructure/node-types.md b/documentation/dev-portal/src/infrastructure/node-types.md index c918c0e6d9..ba1a127d37 100644 --- a/documentation/dev-portal/src/infrastructure/node-types.md +++ b/documentation/dev-portal/src/infrastructure/node-types.md @@ -6,9 +6,9 @@ Discover the workings of Nym's privacy-enhancing mixnet infrastructure through t ### Where do I go from here? 💭 -For more in-depth information on the network architecture, head to the [Network Overview page](https://nymtech.net/docs/architecture/network-overview.html). +For more in-depth information on the network architecture, head to the [Network Overview page](https://nymtech.net/docs/architecture/network-overview.html), and check out the [Operators book](https://nymtech.net/operators) if you want to run a node yourself. If you would like to concentrate on building an application that uses the mixnet: -* Get started with using the Nym Mixnet quickly and easily by exploring the [Quickstart](../quickstart/overview.md) options. -* Go the [Tutorials](../tutorials) section . +* Explore the [Quickstart](../quickstart/overview.md) options. * Check out examples of [Community Apps](../community-resources/community-applications-and-guides.md). +* Run through one of the [tutorials](../tutorials). From 0d21f2f39de6cf23a9bc8bd5f79a7c8096e3833d Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 10:39:11 +0200 Subject: [PATCH 009/142] initialise operators update branch --- documentation/operators/src/faq/smoosh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 8bcc071e3e..ceb356ff7b 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -2,8 +2,8 @@ > We aim on purpose to make minimal changes to reward scheme and software. We're just 'smooshing' together stuff we already debugged and know works. > -- Harry Halpin, Nym CEO -

+
This page refer to the changes which are planned to take place over Q3 and Q4 2023. As this is a transition period in the beginning (Q3 2023) the [Mix Nodes FAQ page](./mixnodes-faq.md) holds more answers to the current setup as project Smoosh refers to the eventual setup. As project Smoosh gets progressively implemented the answers on this page will become to be more relevant to the current state and eventually this FAQ page will be merged with the still relevant parts of the main Mix Nodes FAQ page. If any questions are not answered or it's not clear for you in which stage project Smoosh is right now, please reach out in Node Operators [Matrix room](https://matrix.to/#/#operators:nymtech.chat). From d47f7afbf6ea23d9822c682f0428060f5ed6638b Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:17:13 +0200 Subject: [PATCH 010/142] update smoosh faq - two options --- documentation/operators/src/faq/smoosh-faq.md | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index ceb356ff7b..1169992001 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -16,26 +16,39 @@ As we shared in our blog post article [*What does it take to build the wolds mos > A nick-name by CTO Dave Hrycyszyn and Chief Scientist Claudia Diaz for the work they are currently doing to “smoosh” Nym nodes so that the same operator can serve alternately as mix node, gateway or VPN node. This requires careful calibration of the Nym token economics, for example, only nodes with the highest reputation for good quality service will be in the VPN set and have the chance to earn higher rewards. > By simplifying the components, adding VPN features and supporting new node operators, the aim is to widen the geographical coverage of nodes and have significant redundancy, meaning plenty of operators to be able to meet demand. This requires strong token economic incentives as well as training and support for new node operators. + ## Technical Questions ### What are the changes? Project smoosh will have three steps: -1. Combine the `gateway` and `network-requester`. -2. Combine all the nodes in the Nym Mixnet into one binary, that is `mixnode`, `gateway` (entry and exit) and `network-requester`. -3. Make a selection button (command/argument/flag) for operators to choose whether they want their node to provide all or just some of the functions nodes have in the Nym Mixnet. Not everyone will be able/want to run an exit `gateway` for example. +1. Combine the `gateway` and `network-requester` into one binary ✅ +2. Create [exit gateway](../legal/exit-gateway.md): Take the gateway binary including network requester combined in \#1 and switch from *allowed.list* to a new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) ✅ +3. Combine all the nodes in the Nym Mixnet into one binary, that is `mixnode`, `gateway` (entry and exit) and `network-requester`. These three steps will be staggered over time - period of several months, and will be implemented one by one with enough time to take in feedback and fix bugs in between. Generally, the software will be the same, just instead of multiple binaries, there will be one Nym Mixnet node binary. Delegations will remain on as they are now, per our token economics (staking, saturation etc) +### What does it mean for Nym nodes operators? + +We are looking into two possible ways how such binary will work in practice and will inform in advance. These are the options: + +1. Make a selection button (command/argument/flag) for operators to choose whether they want their node to provide all or just some of the functions nodes have in the Nym Mixnet. Those nodes functioning as exit gateway (in that epoch) will then have bigger rewards due to their larger risk exposure and overhead work with the setup. + +2. All nodes will be required to have the exit gateway functionality. All nodes are rewarded the same as now, and the difference is that a node sometimes (some epochs) may be performing as exit gateway sometimes as mix node or entry gateway of mix functions. + +### Where can I read more about the exit gateway setup? + +We created an [entire page](../legal/exit-gateway.md) about the technical and legal questions around exit gateway. + ### What is the change from allow list to deny list? -The operators running `gateways` would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short allow list to a more permissive setup. An exit policy will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. +The operators running `gateways` would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short allow list to a more permissive setup. An [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. ### Can I run a mix node only? -Yes, to run a mix node only is an option. However it will be less rewarded as nodes providing option for `gateway` - meaning the *new smooshed gateway* (previously `gateway` and `network requester`) - due to the work and risk the operators have in comparison to running a `mixnode` only. +Depends which [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators) will be the final one. In case of the first one - yes. In case of the second option, all the nodes will be setup with gateway functionality turned on. ## Token Economics & Rewards @@ -45,22 +58,21 @@ In the original setup there were no incentives to run a `network-requester`. Aft ### How does this change the token economics? -The token economics will stay the same as they are, same goes for the reward algorithm. In practice the distribution of rewards will benefit more the operators who run open gateways. +The token economics will stay the same as they are, same goes for the reward algorithm. ### How are the rewards distributed? +This depends on [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators) chosen. In case of \#1, it will look like this: + As each operator can choose what roles their nodes provide, the nodes which work as open gateways will have higher rewards because they are the most important to keep up and stable. Besides that the operators of gateways may be exposed to more complication and possible legal risks. The nodes which are initialized to run as mix nodes and gateways will be chosen to be on top of the active set before the ones working only as a mix node. -We are considering to turn off the rewards for non-open gateways to incentivize operators to run the open ones. Mix nodes on 'standby' will not be rewarded (as they are not being used). - -The more roles an operator will allow their node to provide the bigger reward ratio which will have huge performance benefits for the end-users. - +I case we go with \#2, all nodes active in the epoch will be rewarded proportionally according their work. ### How will be the staking and inflation after project Smoosh? -We must run tests to see how many users pay. We may need to keep inflation on if not enough people pay to keep high quality gateways on in the early stage of the transition. That would mean keeping staking on for gateways. Staking will always be on for mix nodes. +We must run tests to see how many users pay. We may need to keep inflation on if not enough people pay to keep high quality gateways on in the early stage of the transition. ### When project smooth will be launched, it would be the mixmining pool that will pay for the gateway rewards based on amount of traffic routed ? From 0ff512f3736c0773f7a3361d74095c092e60c684 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:22:23 +0200 Subject: [PATCH 011/142] update smoosh faq - two options --- documentation/operators/src/faq/smoosh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 1169992001..4d369d8d12 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -36,7 +36,7 @@ We are looking into two possible ways how such binary will work in practice and 1. Make a selection button (command/argument/flag) for operators to choose whether they want their node to provide all or just some of the functions nodes have in the Nym Mixnet. Those nodes functioning as exit gateway (in that epoch) will then have bigger rewards due to their larger risk exposure and overhead work with the setup. -2. All nodes will be required to have the exit gateway functionality. All nodes are rewarded the same as now, and the difference is that a node sometimes (some epochs) may be performing as exit gateway sometimes as mix node or entry gateway of mix functions. +2. All nodes will be required to have the exit gateway functionality. All nodes are rewarded the same as now, and the difference is that a node sometimes (some epochs) may be performing as exit gateway sometimes as mix node or entry gateway adjusted according the network demand by an algorithm. ### Where can I read more about the exit gateway setup? From e61281e25eb4b4dc64a933b280b8305289c93597 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:54:51 +0200 Subject: [PATCH 012/142] correction based on feedback --- documentation/operators/src/faq/smoosh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 4d369d8d12..30180eba09 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -32,7 +32,7 @@ Generally, the software will be the same, just instead of multiple binaries, the ### What does it mean for Nym nodes operators? -We are looking into two possible ways how such binary will work in practice and will inform in advance. These are the options: +We are exploring two potential methods for implementing binary functionality in practice and will provide information in advance. The options are: 1. Make a selection button (command/argument/flag) for operators to choose whether they want their node to provide all or just some of the functions nodes have in the Nym Mixnet. Those nodes functioning as exit gateway (in that epoch) will then have bigger rewards due to their larger risk exposure and overhead work with the setup. From a65da367a30ef3824b5bd5108e44bf39d8decc72 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:55:59 +0200 Subject: [PATCH 013/142] correction based on feedback --- documentation/operators/src/faq/smoosh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 30180eba09..4c1342c326 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -34,7 +34,7 @@ Generally, the software will be the same, just instead of multiple binaries, the We are exploring two potential methods for implementing binary functionality in practice and will provide information in advance. The options are: -1. Make a selection button (command/argument/flag) for operators to choose whether they want their node to provide all or just some of the functions nodes have in the Nym Mixnet. Those nodes functioning as exit gateway (in that epoch) will then have bigger rewards due to their larger risk exposure and overhead work with the setup. +1. Make a selection button (command/argument/flag) for operators to choose whether they want their node to provide all or just some of the functions nodes have in the Nym Mixnet. Nodes functioning as exit gateways (in that epoch) will then have bigger rewards due to their larger risk exposure and overhead work with the setup. 2. All nodes will be required to have the exit gateway functionality. All nodes are rewarded the same as now, and the difference is that a node sometimes (some epochs) may be performing as exit gateway sometimes as mix node or entry gateway adjusted according the network demand by an algorithm. From 4e994f2b9266da2144d6f753135f4664b3734fa1 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:32:53 +0200 Subject: [PATCH 014/142] update exit policy info --- .../operators/src/legal/exit-gateway.md | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index e011cc01e3..2c73435c9b 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -6,7 +6,7 @@ The entire content of this page is under [Creative Commons Attribution 4.0 Inter This page is a part of Nym Community Legal Forum and its content is composed by shared advices in [Node Operators Legal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) (Matrix chat) as well as though pull requests done by the node operators directly to our [repository](https://github.com/nymtech/nym/tree/develop/documentation/operators/src), reviewed by Nym DevRels. -This document presents an initiative to further support Nym’s mission of allowing privacy for everyone everywhere. This would be achieved with the support of Nym node operators operating gateways and opening these to any online service with the safeguards of the [Tor Null ‘deny’ list](https://tornull.org/). +This document presents an initiative to further support Nym’s mission of allowing privacy for everyone everywhere. This would be achieved with the support of Nym node operators operating gateways and opening these to any online service. Such setup needs a **clear policy**, one which will remain the **same for all operators** running Nym nodes. The [proposed **Exit policy**](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) is a combination of two existing safeguards: [Tor Null ‘deny’ list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). ```admonish warning @@ -22,7 +22,7 @@ Nym core team cannot provide comprehensive legal advice across all jurisdictions * Currently, Nym Gateway nodes only enable access to apps and services that are on an ‘allow’ list that is maintained by the core team. -* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list (based on the [Tor Null advisory BL](https://tornull.org/)). +* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list - [Exit policy]((https://nymtech.net/.wellknown/network-requester/exit-policy.txt). Based on two existing safeguards: [Tor Null ‘deny’ list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). * This will enhance the usage and appeal of Nym products for end users. As a result, increased usage will ultimately lead to higher revenues for Nym operators. @@ -39,7 +39,7 @@ Nym core team cannot provide comprehensive legal advice across all jurisdictions To offer a better and more private everyday experience for its users, Nym would like them to use any online services they please, without limiting its access to a few messaging apps or crypto wallets. -To achieve this, operators running “gateways” would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. +To achieve this, operators running exit gateways would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays following this [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt). ## Pros and cons of the initiative @@ -63,21 +63,17 @@ The new setup: Running nodes supporting traffic of any online service (with safe | Operational | | - Higher operational overhead, such as dealing with DMCA / abuse complaints, managing the VPS provider questions, or helping the community to maintain the denylist
- Administrative overhead if running nodes as a company or an entity | | Legal | | - Ideally requires to check legal environment with local privacy association or lawyer | Financial | - Higher revenue potential for operators due to the increase in network usage | - If not running VPS with an unlimited bandwidth plan, higher costs due to higher network usage | -## New gateway setup +## Exit gateways: New setup In our previous technical setup, network requesters acted as a proxy, and only made requests that match an allow list. That was a default IP based list of allowed domains stored at Nym page in a centralised fashion possibly re-defined by any Network requester operator. This restricts the hosts that the NymConnect app can connect to and has the effect of selectively supporting messaging services (e.g. Telegram, Matrix) or crypto wallets (e.g. Electrum or Monero). Operators of network requesters can have confidence that the infrastructure they run only connects to a limited set of public internet hosts. -In the new setup, the main change is to expand this short allow list to a more permissive setup. An exit policy will constrain the hosts that the users of the Nym Mixnet and Nym VPN can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym Mixnet VPN and VPN clients (both wrapped in the same app). +In the new setup, the main change is to expand this short allow list to a more permissive setup. An [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym Mixnet and Nym VPN can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym Mixnet VPN and VPN clients (both wrapped in the same app). -As of now we the gateways will be defaulted to Tornull’s (note: Not affiliated with Tor) deny list - reproduction permitted under Creative Commons Attribution 3.0 United States License which is IP-based, e.g., `ExitPolicy reject 5.188.10.0/23:*`. Whether we will stick with this list, do modifications (likely) or compile another one is still a subject of discussion. +As of now we the gateways will be defaulted to a combination of [Tor Null ‘deny’ list](https://tornull.org/) (note: Not affiliated with Tor) - reproduction permitted under Creative Commons Attribution 3.0 United States License which is IP-based, e.g., `ExitPolicy reject 5.188.10.0/23:*` and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). Whether we will stick with this list, do modifications or compile another one is still a subject of discussion. In all cases, this policy will remain the same for all the nodes, without any option to modify it by Nym node operators to secure stable and reliable service for the end users. -<:-- -These policies will be either reused without modification from Tor / Tornull (license permitting), or customized and updated in a Nym crowd-sourced community effort. ---> - -The Gateways will display an HTML page similar to that suggested by [Tor](https://gitlab.torproject.org/tpo/core/tor/-/raw/HEAD/contrib/operator-tools/tor-exit-notice.html) for exit relays on port 80 and port 443. This will allow the operator to provide information about their Gateway, possibly including the currently configured exit policy, without having to actively communicate with law enforcement or regulatory authorities. It also makes the behaviour of the Gateway transparent and even computable (a possible feature would be to offer a machine readable form of the notice in JSON or YAML). +The Gateways will display an HTML page similar to that suggested by [Tor](https://gitlab.torproject.org/tpo/core/tor/-/raw/HEAD/contrib/operator-tools/tor-exit-notice.html) for exit relays on port 80 and port 443. This will allow the operator to provide information about their Gateway, possibly including the currently configured exit policy, without having to actively communicate with law enforcement or regulatory authorities. It also makes the behaviour of exit gateways transparent and even computable (a possible feature would be to offer a machine readable form of the notice in JSON or YAML). We also recommend operators to check the technical advice from [Tor](https://community.torproject.org/relay/setup/exit/). @@ -133,14 +129,14 @@ Useful links: ## Legal environment - Findings from our legal team ```admonish warning -Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the operator channels ([Element](https://matrix.to/#/#operators:nymtech.chat), [Discord](https://discord.com/invite/nym), [Telegram](https://t.me/nymchan_help_chat)) to share best practices and experiences. +The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. ``` The Swiss legal counsel and US legal counsel have so far provided the following advice: ### Switzerland -TBD soon. + ### United States From f9e5a1159d3d03ecd076ab673e3f82aa47218376 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:37:15 +0200 Subject: [PATCH 015/142] create legal region pages - us, swiss --- documentation/operators/src/legal/swiss.md | 0 .../operators/src/legal/united-states.md | 25 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 documentation/operators/src/legal/swiss.md create mode 100644 documentation/operators/src/legal/united-states.md diff --git a/documentation/operators/src/legal/swiss.md b/documentation/operators/src/legal/swiss.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/documentation/operators/src/legal/united-states.md b/documentation/operators/src/legal/united-states.md new file mode 100644 index 0000000000..54a215c6fc --- /dev/null +++ b/documentation/operators/src/legal/united-states.md @@ -0,0 +1,25 @@ +## Legal environment: United States + +```admonish warning +The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. +``` + + + +## Findings from our legal team + +```admonish warning +The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. +``` + +The US legal counsel have so far provided the following advice: + +The legal risk faced by VPN operators subject to United States jurisdiction depends on various statutes and regulations related to privacy, anonymity, and electronic communications. The key areas to consider are: intermediary liability and exceptions, data protection, copyright infringement, export controls, criminal law, government requests for data and assistance, and third party liability. + +As outlined in Part A, the United States treats VPNs as telecommunications networks subject to intermediary liability protection from wrongful conduct that occurs on its network. However, such protections do have exceptions including criminal law and copyright claims that are worth considering. In the United States, I am not aware of an individual ever being prosecuted or convicted for running a node for a dVPN or a Privacy Enhancing Network. + +However, as discussed in Part B-C, VPN operators are subject to law enforcement requests for access or assistance in obtaining access to data relevant to an investigation into allegedly unlawful conduct that was facilitated by the network as an intermediary. As shown in Part C, governments may also request assistance from node operators for certain high-level and national security targets. + +Finally, as outlined in Parts D-G, VPN operators may also be subject to non-criminal liability including (Part D) failing to respond to notices under the DMCA, (Part E) privacy and data protection law, (Part F) third party lawsuits stemming from wrongful acts committed using the network, and (G) export control violations. + + From 96d18619559e1a5dc5530dfc24788bdab6245538 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:51:30 +0200 Subject: [PATCH 016/142] add legal findings switzerland --- .../operators/src/legal/exit-gateway.md | 26 ++----- documentation/operators/src/legal/swiss.md | 73 +++++++++++++++++++ .../operators/src/legal/united-states.md | 8 +- 3 files changed, 80 insertions(+), 27 deletions(-) diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index 2c73435c9b..2b55bc3223 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -128,30 +128,14 @@ Useful links: ## Legal environment - Findings from our legal team -```admonish warning -The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. -``` +The Node Operators Legal Forum are divided into pages according the regions: -The Swiss legal counsel and US legal counsel have so far provided the following advice: +- [Switzerland](./swiss.md) +- [United States](./united-states.md) -### Switzerland +See the next chapter to learn how to edit or add the Legal Forum pages. - - -### United States - -A US counsel shared the following advice: - -The legal risk faced by VPN operators subject to United States jurisdiction depends on various statutes and regulations related to privacy, anonymity, and electronic communications. The key areas to consider are: intermediary liability and exceptions, data protection, copyright infringement, export controls, criminal law, government requests for data and assistance, and third party liability. - -As outlined in Part A, the United States treats VPNs as telecommunications networks subject to intermediary liability protection from wrongful conduct that occurs on its network. However, such protections do have exceptions including criminal law and copyright claims that are worth considering. In the United States, I am not aware of an individual ever being prosecuted or convicted for running a node for a dVPN or a Privacy Enhancing Network. - -However, as discussed in Part B-C, VPN operators are subject to law enforcement requests for access or assistance in obtaining access to data relevant to an investigation into allegedly unlawful conduct that was facilitated by the network as an intermediary. As shown in Part C, governments may also request assistance from node operators for certain high-level and national security targets. - -Finally, as outlined in Parts D-G, VPN operators may also be subject to non-criminal liability including (Part D) failing to respond to notices under the DMCA, (Part E) privacy and data protection law, (Part F) third party lawsuits stemming from wrongful acts committed using the network, and (G) export control violations. - - -## How to add legal information +## How to edit or add legal information Our aim is to establish a strong community network, sharing legal findings with each other. We would like to encourage all the current and future operators to do research about the situation in the jurisdiction they operate and update this page. diff --git a/documentation/operators/src/legal/swiss.md b/documentation/operators/src/legal/swiss.md index e69de29bb2..1f03ce9f7b 100644 --- a/documentation/operators/src/legal/swiss.md +++ b/documentation/operators/src/legal/swiss.md @@ -0,0 +1,73 @@ +# Legal environment: Switzerland + +```admonish warning +The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. +``` + +## Findings from our legal team + +**Note:** The information shared below is in the stage of conclusions upon final confirmation. The text is a not edited exert from a legal counsel. Nym core team is asking for more clarifications. + +### Operators of Exit Nodes + +#### Telecoms Law + +As well as operators of normal mixnet nodes, operators of exit nodes might be considered telecommunications providers according to the broad term of the telecommunications act (TCA). +The regulatory consequences have already been laid out in section 5.1.2.2.1 above. + +####Telecoms Surveillance Law + +Unlike normal mixnet nodes, exit nodes might have information about the communication party which uses the respective exit node (in particular its IP address). They might therefore be a target for surveillance authorities, at least at first glance. + +However, as the IP address of the communications party is disguised on the other side of the communications through the Nym encryption infrastructure, the usual situation, where an IP address or another trace of an Internet user is found in the connection with a criminal activity (e.g., in a web server protocol), and then used in cooperation with the user’s provider to identify the user, is not going to take place. + +The same is true for the opposite side: The node operator does not see the communication party of his user. + +Experience has shown that Swiss investigative authorities are aware of these limitations and do not conduct investigations against individuals who operate TOR nodes, for example. In one specific case that I know of, the investigation was stopped by the police as soon as it was clear that a TOR node was being operated. + +I therefore consider the risk for an exit node operator to become involved in a SPTA proceeding as low. + +Nevertheless, in such a situation, exit node operators providers would have to provide the authorities with the information already available to them (Art. 22 Para. 3 SPTA), and they would have to tolerate monitoring by the authorities or by the persons commissioned by the service of the data which the monitored person transmits or stores using derived communications services (Art. 27 Para. 1 SPTA; see above, 5.1.1.2). There is no duty of data retention for providers of derived communication services, though. + +The the risk for exit node operators of being upgraded according to Art. 22 Para. 4 SPTA is low to non existent for the reasons mentioned above. + +#### Intelligence Service Law + +Operators of exit nodes do not provide wire-based telecommunications services either and therefore do not fall under the IntelSA. + +### Nym as VPN provider + +#### Telecoms Law + +Nym as a VPN operator might be considered a telecommunication provider under the newly revised TCA, as the term now also covers operators of Over-the-Top services which are carried out over the internet. + +However I consider possible administrative burdens arising from this qualification as negligible (see above, 5.1.2.1). + +#### Telecoms Surveillance Law + +VPN providers have information about the communication party which uses the respective exit node (in particular its IP address). They might therefore be a target for surveillance authorities, at least at first glance. + +However, for the same reason I see a risk low for exit node operators to become involved in a SPTA proceeding (the IP address is not visible to the communication partner, which is exactly the reason the Nym VPN is being used at all), I also see a low risk for Nym itself to become involved in such a proceeding (see above, 5.1.3.2). + +#### Intelligence Service Law + +VPN operators do not provide wire-based telecommunications services and therefore do not fall under the IntelSA. + +### EU chat control regulation in particular + +According to a EU commission proposal for a regulation laying down rules to prevent and combat child sexual abuse (https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX: 52022PC0209) hosting providers and providers of so-called interpersonal communication services should be obliged to perform an assessment of risks of online child sexual abuse. Additionally an obligation for certain providers should be established to detect such abuse, to report it via the EU Centre, to remove or disable access to, or to block online child sexual abuse material when so ordered. + +'Interpersonal communications service’ means a service normally provided for remuneration that enables direct interpersonal and interactive exchange of information via electronic communications networks between a finite number of persons, whereby the persons initiating or participating in the communication determine its recipient(s) and does not include services which enable interpersonal and interactive communication merely as a minor ancillary feature that is intrinsically linked to another service (Art. 2 Point 5 Directive (EU) 2018/1972, which is also relevant for the mentioned proposal). + +Interpersonal communications services are services that enable interpersonal and interactive exchange of information. Interactive communication entails that the service allows the recipient of the information to respond. The proposal therefore only covers services like traditional voice calls between two individuals but also all types of emails, messaging services, or group chats. Examples for services which do not meet those requirements are linear broadcasting, video on demand, websites, social networks, blogs, or exchange of information between machines (Directive (EU) 2018/1972, Consideration 17). + +Neither the Nym encryption infrastructure nor the NYM VPN are used as means for an interactive exchange of information in the aforementioned sense (of e-mail, messaging, chats or similar). + +I therefore consider the risk arising from the mentioned proposal for Nym as low, be it as software developer or VPN operator. + +However, an application provider which uses the Nym encryption infrastructure to provide encrypted chat services or similar could still fall under the proposal. This might pose a commercial risk for Nym as the provider of the basic infrastructure for such services, because such services might lose their commercial value for end customers. + +Currently the EU decision on chat control has been postponed because there is a blocking minority which can prevent the adoption of the respective parts of the law. In addition, even EU internal lawyers held that the proposal was clearly in violation of the EU charter of fundamental rights and would therefore be nullified by the EU courts in case it would still be enacted by the parliament. + +I therefore consider the risk that the mentioned proposal is enacted by the EU authorities and finally upheld by the courts in its planned form as low. + diff --git a/documentation/operators/src/legal/united-states.md b/documentation/operators/src/legal/united-states.md index 54a215c6fc..6988a9bc5a 100644 --- a/documentation/operators/src/legal/united-states.md +++ b/documentation/operators/src/legal/united-states.md @@ -1,16 +1,12 @@ -## Legal environment: United States +# Legal environment: United States ```admonish warning The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. ``` - - ## Findings from our legal team -```admonish warning -The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. -``` +**Note:** The information shared below is in the stage of conclusions upon final confirmation. The US legal counsel have so far provided the following advice: From 722486ca689562b5020b88df7b968447eabdedbf Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:57:31 +0200 Subject: [PATCH 017/142] add regions to SUMMARY.md --- documentation/operators/src/legal/exit-gateway.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index 2b55bc3223..75f67956c7 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -1,4 +1,4 @@ -# Nym operators - Running Exit Gateway +# Nym Operators Legal Forum: Running Exit Gateway ```admonish info The entire content of this page is under [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/). From 3d5a3ad9587d55e24fad6893854aeb95e4386620 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:58:29 +0200 Subject: [PATCH 018/142] add regions to SUMMARY.md --- documentation/operators/src/SUMMARY.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/operators/src/SUMMARY.md b/documentation/operators/src/SUMMARY.md index 0e2cdb2323..b349782408 100644 --- a/documentation/operators/src/SUMMARY.md +++ b/documentation/operators/src/SUMMARY.md @@ -27,6 +27,8 @@ # Legal Forum - [Exit Gateway](./legal/exit-gateway.md) + - [Switzerland](./legal/swiss.md) + - [United States](./legal/united-states.md) --- # Misc. From fa3277e18b3304f869b71a6ba9952a32a42420de Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:59:40 +0200 Subject: [PATCH 019/142] syntax fix --- documentation/operators/src/legal/exit-gateway.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index 75f67956c7..a513a4d74f 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -22,7 +22,7 @@ Nym core team cannot provide comprehensive legal advice across all jurisdictions * Currently, Nym Gateway nodes only enable access to apps and services that are on an ‘allow’ list that is maintained by the core team. -* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list - [Exit policy]((https://nymtech.net/.wellknown/network-requester/exit-policy.txt). Based on two existing safeguards: [Tor Null ‘deny’ list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). +* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list - [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt). Based on two existing safeguards: [Tor Null ‘deny’ list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). * This will enhance the usage and appeal of Nym products for end users. As a result, increased usage will ultimately lead to higher revenues for Nym operators. From 1aad2a3a7a605b5396f007e08dfb0f5050f5ffd0 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:04:56 +0200 Subject: [PATCH 020/142] syntax fix --- documentation/operators/src/legal/exit-gateway.md | 4 ++-- documentation/operators/src/legal/swiss.md | 6 +++--- documentation/operators/src/legal/united-states.md | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index a513a4d74f..69e1ec4099 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -128,12 +128,12 @@ Useful links: ## Legal environment - Findings from our legal team -The Node Operators Legal Forum are divided into pages according the regions: +The Node Operators Legal Forum pages are divided into pages according the region: - [Switzerland](./swiss.md) - [United States](./united-states.md) -See the next chapter to learn how to edit or add the Legal Forum pages. +See the next chapter to learn how to edit information or add findings about your jurisdiction. ## How to edit or add legal information diff --git a/documentation/operators/src/legal/swiss.md b/documentation/operators/src/legal/swiss.md index 1f03ce9f7b..07d21553b7 100644 --- a/documentation/operators/src/legal/swiss.md +++ b/documentation/operators/src/legal/swiss.md @@ -1,12 +1,12 @@ # Legal environment: Switzerland ```admonish warning -The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. +The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators Legal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. ``` ## Findings from our legal team -**Note:** The information shared below is in the stage of conclusions upon final confirmation. The text is a not edited exert from a legal counsel. Nym core team is asking for more clarifications. +> **Note:** The information shared below is in the stage of conclusions upon final confirmation. The text is a not edited exert from a legal counsel. Nym core team is asking for more clarifications. ### Operators of Exit Nodes @@ -15,7 +15,7 @@ The following part is for informational purposes only. Nym core team cannot prov As well as operators of normal mixnet nodes, operators of exit nodes might be considered telecommunications providers according to the broad term of the telecommunications act (TCA). The regulatory consequences have already been laid out in section 5.1.2.2.1 above. -####Telecoms Surveillance Law +#### Telecoms Surveillance Law Unlike normal mixnet nodes, exit nodes might have information about the communication party which uses the respective exit node (in particular its IP address). They might therefore be a target for surveillance authorities, at least at first glance. diff --git a/documentation/operators/src/legal/united-states.md b/documentation/operators/src/legal/united-states.md index 6988a9bc5a..c0e66054dc 100644 --- a/documentation/operators/src/legal/united-states.md +++ b/documentation/operators/src/legal/united-states.md @@ -1,12 +1,12 @@ # Legal environment: United States ```admonish warning -The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators LEgal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. +The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators Legal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. ``` ## Findings from our legal team -**Note:** The information shared below is in the stage of conclusions upon final confirmation. +> **Note:** The information shared below is in the stage of conclusions upon final confirmation. The text is a not edited exert from a legal counsel. Nym core team is asking for more clarifications. The US legal counsel have so far provided the following advice: From 3fdd89035b3bdb72b98eb16ba1fa79e33135bd2c Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:07:07 +0200 Subject: [PATCH 021/142] add page license --- documentation/operators/src/legal/swiss.md | 4 ++++ documentation/operators/src/legal/united-states.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/documentation/operators/src/legal/swiss.md b/documentation/operators/src/legal/swiss.md index 07d21553b7..b879123d85 100644 --- a/documentation/operators/src/legal/swiss.md +++ b/documentation/operators/src/legal/swiss.md @@ -1,5 +1,9 @@ # Legal environment: Switzerland +```admonish info +The entire content of this page is under [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/). +``` + ```admonish warning The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators Legal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. ``` diff --git a/documentation/operators/src/legal/united-states.md b/documentation/operators/src/legal/united-states.md index c0e66054dc..ce541b3028 100644 --- a/documentation/operators/src/legal/united-states.md +++ b/documentation/operators/src/legal/united-states.md @@ -1,5 +1,9 @@ # Legal environment: United States +```admonish info +The entire content of this page is under [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/). +``` + ```admonish warning The following part is for informational purposes only. Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the [Node Operator](https://matrix.to/#/#operators:nymtech.chat) and [Operators Legal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) channels on Element to share best practices and experiences. ``` From 49dcc7e89473e08f937918bac80802b708a1fbb6 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 14:37:30 +0200 Subject: [PATCH 022/142] syntax fix --- documentation/operators/src/nodes/gateway-setup.md | 3 ++- documentation/operators/src/nodes/network-requester-setup.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index 0c95db8b8a..d23e0ab02e 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -6,6 +6,7 @@ ```admonish info As a result of [Project Smoosh](../faq/smoosh-faq.md), the current version of `nym-gateway` binary also contains `nym-network-requester` functionality which can be enabled [by the operator](./gateway-setup.md#initialising-gateway-with-network-requester). This combination is a basis of Nym exit gateway node - an essential piece in our new setup. Please read more in our [Project Smoosh FAQ](../faq/smoosh-faq.md) and [Exit Gateways Page](../legal/exit-gateway.md). We recommend operators begin to shift their setups to this new combined node, instead of operating two separate binaries. ``` + > Any syntax in `<>` brackets is a user's unique variable. Exchange with a corresponding name without the `<>` brackets. ## Current version @@ -156,7 +157,7 @@ You can bond your gateway via the Desktop wallet. 3. You will be asked to run a the `sign` command with your `gateway` - copy and paste the long signature as the value of `--contract-msg` and run it. ``` -./nym-gatewway sign --id --contract-msg +./nym-gateway sign --id --contract-msg ``` It will look something like this: diff --git a/documentation/operators/src/nodes/network-requester-setup.md b/documentation/operators/src/nodes/network-requester-setup.md index 5e7cd7969e..9945bf0d0f 100644 --- a/documentation/operators/src/nodes/network-requester-setup.md +++ b/documentation/operators/src/nodes/network-requester-setup.md @@ -5,6 +5,7 @@ ```admonish info As a result of [Project Smoosh](../faq/smoosh-faq.md), the current version of `nym-gateway` binary also contains `nym-network-requester` functionality which can be enabled [by the operator](./gateway-setup.md#initialising-gateway-with-network-requester). This combination is a basis of Nym exit gateway node - an essential piece in our new setup. Please read more in our [Project Smoosh FAQ](../faq/smoosh-faq.md) and [Exit Gateways Page](../legal/exit-gateway.md). We recommend operators begin to shift their setups to this new combined node, instead of operating two separate binaries. ``` + > Any syntax in `<>` brackets is a user's unique variable. Exchange with a corresponding name without the `<>` brackets. ## Current version From 9d1adf9884ded83a3247deb20cebc8a044c2f05f Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:56:43 +0200 Subject: [PATCH 023/142] fix based on feedback --- documentation/operators/src/legal/exit-gateway.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index 69e1ec4099..2cd3f03daa 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -22,7 +22,7 @@ Nym core team cannot provide comprehensive legal advice across all jurisdictions * Currently, Nym Gateway nodes only enable access to apps and services that are on an ‘allow’ list that is maintained by the core team. -* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list - [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt). Based on two existing safeguards: [Tor Null ‘deny’ list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). +* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list - [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt). In accordance with the [Tor Null 'deny' list](https://tornull.org/) and [Tor reduced policy] (https://tornull.org/tor-reduced-reduced-exit-policy.php), which are two established safeguards. * This will enhance the usage and appeal of Nym products for end users. As a result, increased usage will ultimately lead to higher revenues for Nym operators. @@ -69,11 +69,11 @@ In our previous technical setup, network requesters acted as a proxy, and only m This restricts the hosts that the NymConnect app can connect to and has the effect of selectively supporting messaging services (e.g. Telegram, Matrix) or crypto wallets (e.g. Electrum or Monero). Operators of network requesters can have confidence that the infrastructure they run only connects to a limited set of public internet hosts. -In the new setup, the main change is to expand this short allow list to a more permissive setup. An [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym Mixnet and Nym VPN can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym Mixnet VPN and VPN clients (both wrapped in the same app). +The principal change in the new configuration is to make this short allow list more permissive. Nym's [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will restrict the hosts to which Nym Mixnet and Nym VPN users are permitted to connect. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym Mixnet VPN and VPN clients (both wrapped in the same app). As of now we the gateways will be defaulted to a combination of [Tor Null ‘deny’ list](https://tornull.org/) (note: Not affiliated with Tor) - reproduction permitted under Creative Commons Attribution 3.0 United States License which is IP-based, e.g., `ExitPolicy reject 5.188.10.0/23:*` and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). Whether we will stick with this list, do modifications or compile another one is still a subject of discussion. In all cases, this policy will remain the same for all the nodes, without any option to modify it by Nym node operators to secure stable and reliable service for the end users. -The Gateways will display an HTML page similar to that suggested by [Tor](https://gitlab.torproject.org/tpo/core/tor/-/raw/HEAD/contrib/operator-tools/tor-exit-notice.html) for exit relays on port 80 and port 443. This will allow the operator to provide information about their Gateway, possibly including the currently configured exit policy, without having to actively communicate with law enforcement or regulatory authorities. It also makes the behaviour of exit gateways transparent and even computable (a possible feature would be to offer a machine readable form of the notice in JSON or YAML). +For exit relays on ports 80 and 443, the gateways will exhibit an HTML page resembling the one proposed by [Tor](https://gitlab.torproject.org/tpo/core/tor/-/raw/HEAD/contrib/operator-tools/tor-exit-notice.html). By doing so, the operator will be able to disclose details regarding their gateway, including the currently configured exit policy, all without the need for direct correspondence with regulatory or law enforcement agencies. It also makes the behaviour of exit gateways transparent and even computable (a possible feature would be to offer a machine readable form of the notice in JSON or YAML). We also recommend operators to check the technical advice from [Tor](https://community.torproject.org/relay/setup/exit/). From 8270204c7e2553f8c726edb4ce8db703decabcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 26 Oct 2023 17:01:43 +0200 Subject: [PATCH 024/142] Run embedded ip-forwarder in gateway --- Cargo.lock | 1 + gateway/Cargo.toml | 1 + gateway/src/commands/helpers.rs | 12 ++ gateway/src/commands/run.rs | 16 ++- gateway/src/config/mod.rs | 17 +++ gateway/src/config/old_config_v1_1_29.rs | 4 + gateway/src/config/persistence/paths.rs | 5 + gateway/src/error.rs | 24 ++++ .../embedded_network_requester/mod.rs | 11 ++ gateway/src/node/helpers.rs | 14 ++ gateway/src/node/mod.rs | 125 +++++++++++++++++- 11 files changed, 223 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 614ed8738a..369423472d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6540,6 +6540,7 @@ dependencies = [ "nym-credentials", "nym-crypto", "nym-gateway-requests", + "nym-ip-forwarder", "nym-mixnet-client", "nym-mixnode-common", "nym-network-defaults", diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index b968ee7b7e..b5881ef080 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -76,6 +76,7 @@ nym-task = { path = "../common/task" } nym-types = { path = "../common/types" } nym-validator-client = { path = "../common/client-libs/validator-client" } nym-wireguard = { path = "../common/wireguard", optional = true } +nym-ip-forwarder = { path = "../service-providers/ip-forwarder" } [dev-dependencies] tower = "0.4.13" diff --git a/gateway/src/commands/helpers.rs b/gateway/src/commands/helpers.rs index 9029c14a7a..94947890c4 100644 --- a/gateway/src/commands/helpers.rs +++ b/gateway/src/commands/helpers.rs @@ -101,6 +101,11 @@ pub(crate) struct OverrideNetworkRequesterConfig { pub(crate) statistics_recipient: Option, } +#[derive(Default)] +pub(crate) struct OverrideIpForwarderConfig { + // TODO +} + /// Ensures that a given bech32 address is valid pub(crate) fn ensure_correct_bech32_prefix(address: &AccountId) -> Result<(), GatewayError> { let expected_prefix = @@ -220,6 +225,13 @@ pub(crate) fn override_network_requester_config( ) } +pub(crate) fn override_ip_forwarder_config( + cfg: nym_ip_forwarder::Config, + _opts: Option, +) -> nym_ip_forwarder::Config { + cfg +} + pub(crate) async fn initialise_local_network_requester( gateway_config: &Config, opts: OverrideNetworkRequesterConfig, diff --git a/gateway/src/commands/run.rs b/gateway/src/commands/run.rs index 185bf75a53..4f390db406 100644 --- a/gateway/src/commands/run.rs +++ b/gateway/src/commands/run.rs @@ -15,6 +15,8 @@ use nym_node::error::NymNodeError; use std::net::IpAddr; use std::path::PathBuf; +use super::helpers::OverrideIpForwarderConfig; + #[derive(Args, Clone)] pub struct Run { /// Id of the gateway we want to run @@ -88,6 +90,10 @@ pub struct Run { #[clap(long)] with_network_requester: Option, + /// Allows this gateway to run an embedded network requester for minimal network overhead + #[clap(long)] + with_ip_forwarder: Option, + // ##### NETWORK REQUESTER FLAGS ##### /// Specifies whether this network requester should run in 'open-proxy' mode #[arg(long)] @@ -175,6 +181,12 @@ impl<'a> From<&'a Run> for OverrideNetworkRequesterConfig { } } +impl From<&Run> for OverrideIpForwarderConfig { + fn from(_value: &Run) -> Self { + OverrideIpForwarderConfig {} + } +} + fn show_binding_warning(address: IpAddr) { eprintln!("\n##### NOTE #####"); eprintln!( @@ -217,6 +229,7 @@ pub async fn execute(args: Run) -> anyhow::Result<()> { let output = args.output; let custom_mixnet = args.custom_mixnet.clone(); let nr_opts = (&args).into(); + let ip_opts = (&args).into(); let config = build_config(id, args)?; ensure_config_version_compatibility(&config)?; @@ -235,7 +248,8 @@ pub async fn execute(args: Run) -> anyhow::Result<()> { } let node_details = node_details(&config)?; - let gateway = crate::node::create_gateway(config, Some(nr_opts), custom_mixnet).await?; + let gateway = + crate::node::create_gateway(config, Some(nr_opts), Some(ip_opts), custom_mixnet).await?; eprintln!( "\nTo bond your gateway you will need to install the Nym wallet, go to https://nymtech.net/get-involved and select the Download button.\n\ Select the correct version and install it to your machine. You will need to provide some of the following: \n "); diff --git a/gateway/src/config/mod.rs b/gateway/src/config/mod.rs index 134964fe94..caef4cd68d 100644 --- a/gateway/src/config/mod.rs +++ b/gateway/src/config/mod.rs @@ -100,6 +100,8 @@ pub struct Config { pub network_requester: NetworkRequester, + pub ip_forwarder: IpForwarder, + #[serde(default)] pub logging: LoggingSettings, @@ -128,6 +130,7 @@ impl Config { wireguard: Default::default(), storage_paths: GatewayPaths::new_default(id.as_ref()), network_requester: Default::default(), + ip_forwarder: Default::default(), logging: Default::default(), debug: Default::default(), } @@ -360,6 +363,20 @@ impl Default for NetworkRequester { } } +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(default)] +pub struct IpForwarder { + /// Specifies whether ip forwarder service is enabled in this process. + pub enabled: bool, +} + +#[allow(clippy::derivable_impls)] +impl Default for IpForwarder { + fn default() -> Self { + Self { enabled: false } + } +} + #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(default)] pub struct Debug { diff --git a/gateway/src/config/old_config_v1_1_29.rs b/gateway/src/config/old_config_v1_1_29.rs index e38ff2a57c..467b82709f 100644 --- a/gateway/src/config/old_config_v1_1_29.rs +++ b/gateway/src/config/old_config_v1_1_29.rs @@ -150,10 +150,14 @@ impl From for Config { }, clients_storage: value.storage_paths.clients_storage, network_requester_config: value.storage_paths.network_requester_config, + // WIP: make proper conversion + ip_forwarder_config: Default::default(), }, network_requester: NetworkRequester { enabled: value.network_requester.enabled, }, + // WIP: make proper conversion + ip_forwarder: Default::default(), logging: LoggingSettings {}, debug: Debug { packet_forwarding_initial_backoff: value.debug.packet_forwarding_initial_backoff, diff --git a/gateway/src/config/persistence/paths.rs b/gateway/src/config/persistence/paths.rs index 8d3be49335..4430e65921 100644 --- a/gateway/src/config/persistence/paths.rs +++ b/gateway/src/config/persistence/paths.rs @@ -50,6 +50,10 @@ pub struct GatewayPaths { // pub node_description: PathBuf, // pub cosmos_bip39_mnemonic: PathBuf, + + /// Path to the configuration of the embedded ip forwarder. + #[serde(deserialize_with = "de_maybe_path")] + pub ip_forwarder_config: Option, } impl GatewayPaths { @@ -59,6 +63,7 @@ impl GatewayPaths { clients_storage: default_data_directory(id).join(DEFAULT_CLIENTS_STORAGE_FILENAME), // node_description: default_config_filepath(id).join(DEFAULT_DESCRIPTION_FILENAME), network_requester_config: None, + ip_forwarder_config: None, } } diff --git a/gateway/src/error.rs b/gateway/src/error.rs index 438b684981..681131d8b9 100644 --- a/gateway/src/error.rs +++ b/gateway/src/error.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::node::storage::error::StorageError; +use nym_ip_forwarder::error::IpForwarderError; use nym_network_requester::error::{ClientCoreError, NetworkRequesterError}; use nym_validator_client::nyxd::error::NyxdError; use nym_validator_client::nyxd::AccountId; @@ -48,6 +49,17 @@ pub(crate) enum GatewayError { source: io::Error, }, + #[error( + "failed to load config file for ip forwarder (gateway-id: '{id}') using path '{}'. detailed message: {source}", + path.display() + )] + IpForwarderConfigLoadFailure { + id: String, + path: PathBuf, + #[source] + source: io::Error, + }, + #[error( "failed to save config file for id {id} using path '{}'. detailed message: {source}", path.display() )] @@ -86,15 +98,27 @@ pub(crate) enum GatewayError { #[error("Path to network requester configuration file hasn't been specified. Perhaps try to run `setup-network-requester`?")] UnspecifiedNetworkRequesterConfig, + #[error("Path to ip forwarder configuration file hasn't been specified. Perhaps try to run `setup-ip-forwarder`?")] + UnspecifiedIpForwarderConfig, + #[error("there was an issue with the local network requester: {source}")] NetworkRequesterFailure { #[from] source: NetworkRequesterError, }, + #[error("there was an issue with the local ip forwarder: {source}")] + IpForwarederFailure { + #[from] + source: IpForwarderError, + }, + #[error("failed to startup local network requester")] NetworkRequesterStartupFailure, + #[error("failed to startup local ip forwarder")] + IpForwarderStartupFailure, + #[error("there are no nym API endpoints available")] NoNymApisAvailable, diff --git a/gateway/src/node/client_handling/embedded_network_requester/mod.rs b/gateway/src/node/client_handling/embedded_network_requester/mod.rs index e088535cd9..0256592ea6 100644 --- a/gateway/src/node/client_handling/embedded_network_requester/mod.rs +++ b/gateway/src/node/client_handling/embedded_network_requester/mod.rs @@ -28,6 +28,17 @@ impl LocalNetworkRequesterHandle { } } + // TODO: generalize this whole thing to be general. And change the name(s). + pub(crate) fn new_ip( + start_data: nym_ip_forwarder::OnStartData, + mix_message_sender: MixMessageSender, + ) -> Self { + Self { + address: start_data.address, + mix_message_sender, + } + } + pub(crate) fn client_destination(&self) -> DestinationAddressBytes { self.address.identity().derive_destination_address() } diff --git a/gateway/src/node/helpers.rs b/gateway/src/node/helpers.rs index 9535519fce..54953e133e 100644 --- a/gateway/src/node/helpers.rs +++ b/gateway/src/node/helpers.rs @@ -96,6 +96,20 @@ pub(crate) fn load_network_requester_config>( }) } +pub(crate) fn load_ip_forwarder_config>( + id: &str, + path: P, +) -> Result { + let path = path.as_ref(); + nym_ip_forwarder::Config::read_from_toml_file(path).map_err(|err| { + GatewayError::IpForwarderConfigLoadFailure { + id: id.to_string(), + path: path.to_path_buf(), + source: err, + } + }) +} + pub(crate) async fn initialise_main_storage( config: &Config, ) -> Result { diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index a51180ba35..6dc8bf3076 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -1,8 +1,12 @@ // Copyright 2020-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use self::helpers::load_ip_forwarder_config; use self::storage::PersistentStorage; -use crate::commands::helpers::{override_network_requester_config, OverrideNetworkRequesterConfig}; +use crate::commands::helpers::{ + override_ip_forwarder_config, override_network_requester_config, OverrideIpForwarderConfig, + OverrideNetworkRequesterConfig, +}; use crate::config::Config; use crate::error::GatewayError; use crate::http::HttpApiBuilder; @@ -54,7 +58,8 @@ struct StartedNetworkRequester { pub(crate) async fn create_gateway( config: Config, nr_config_override: Option, - custom_nr_mixnet: Option, + ip_config_override: Option, + custom_mixnet: Option, ) -> Result { // don't attempt to read config if NR is disabled let network_requester_config = if config.network_requester.enabled { @@ -69,14 +74,32 @@ pub(crate) async fn create_gateway( None }; + // don't attempt to read config if NR is disabled + let ip_forwarder_config = if config.ip_forwarder.enabled { + if let Some(path) = &config.storage_paths.ip_forwarder_config { + let cfg = load_ip_forwarder_config(&config.gateway.id, path)?; + Some(override_ip_forwarder_config(cfg, ip_config_override)) + } else { + // if NR is enabled, the config path must be specified + return Err(GatewayError::UnspecifiedIpForwarderConfig); + } + } else { + None + }; + let storage = initialise_main_storage(&config).await?; let nr_opts = network_requester_config.map(|config| LocalNetworkRequesterOpts { - config, - custom_mixnet_path: custom_nr_mixnet, + config: config.clone(), + custom_mixnet_path: custom_mixnet.clone(), }); - Gateway::new(config, nr_opts, storage) + let ip_opts = ip_forwarder_config.map(|config| LocalIpForwarderOpts { + config, + custom_mixnet_path: custom_mixnet, + }); + + Gateway::new(config, nr_opts, ip_opts, storage) } #[derive(Debug, Clone)] @@ -86,11 +109,20 @@ pub struct LocalNetworkRequesterOpts { custom_mixnet_path: Option, } +#[derive(Debug, Clone)] +pub struct LocalIpForwarderOpts { + config: nym_ip_forwarder::Config, + + custom_mixnet_path: Option, +} + pub(crate) struct Gateway { config: Config, network_requester_opts: Option, + ip_forwarder_opts: Option, + /// ed25519 keypair used to assert one's identity. identity_keypair: Arc, @@ -106,6 +138,7 @@ impl Gateway { pub fn new( config: Config, network_requester_opts: Option, + ip_forwarder_opts: Option, storage: St, ) -> Result { Ok(Gateway { @@ -114,6 +147,7 @@ impl Gateway { sphinx_keypair: Arc::new(helpers::load_sphinx_keys(&config)?), config, network_requester_opts, + ip_forwarder_opts, client_registry: Arc::new(DashMap::new()), }) } @@ -219,6 +253,73 @@ impl Gateway { packet_sender } + async fn start_ip_service_provider( + &self, + forwarding_channel: MixForwardingSender, + shutdown: TaskClient, + ) -> Result { + info!("Starting IP service provider..."); + + // if network requester is enabled, configuration file must be provided! + let Some(ip_opts) = &self.ip_forwarder_opts else { + return Err(GatewayError::UnspecifiedIpForwarderConfig); + }; + + // this gateway, whenever it has anything to send to its local NR will use fake_client_tx + let (nr_mix_sender, nr_mix_receiver) = mpsc::unbounded(); + let router_shutdown = shutdown.fork("message_router"); + + let (router_tx, mut router_rx) = oneshot::channel(); + + let transceiver = LocalGateway::new( + *self.identity_keypair.public_key(), + forwarding_channel, + router_tx, + ); + + // TODO: well, wire it up internally to gateway traffic, shutdowns, etc. + let (on_start_tx, on_start_rx) = oneshot::channel(); + // let mut nr_builder = nym_ip_forwarder::IpForwarderBuilder::new(nr_opts.config.clone()) + let mut ip_builder = nym_ip_forwarder::IpForwarderBuilder::new(ip_opts.config.clone()) + .with_shutdown(shutdown) + .with_custom_gateway_transceiver(Box::new(transceiver)) + .with_wait_for_gateway(true) + .with_on_start(on_start_tx); + + if let Some(custom_mixnet) = &ip_opts.custom_mixnet_path { + ip_builder = ip_builder.with_stored_topology(custom_mixnet)? + } + + tokio::spawn(async move { + if let Err(err) = ip_builder.run_service_provider().await { + // no need to panic as we have passed a task client to the ip forwarder so we're + // most likely already in the process of shutting down + error!("ip forwarder has failed: {err}") + } + }); + + let start_data = on_start_rx + .await + .map_err(|_| GatewayError::IpForwarderStartupFailure)?; + + // this should be instantaneous since the data is sent on this channel before the on start is called; + // the failure should be impossible + let Ok(Some(packet_router)) = router_rx.try_recv() else { + return Err(GatewayError::IpForwarderStartupFailure); + }; + + MessageRouter::new(nr_mix_receiver, packet_router).start_with_shutdown(router_shutdown); + info!( + "the local ip forwarder is running on {}", + start_data.address + ); + + Ok(LocalNetworkRequesterHandle::new_ip( + start_data, + nr_mix_sender, + )) + } + // TODO: rethink the logic in this function... async fn start_network_requester( &self, @@ -372,7 +473,9 @@ impl Gateway { }); } - let nr_request_filter = if self.config.network_requester.enabled { + // WIP(JON) + // let nr_request_filter = if self.config.network_requester.enabled { + let nr_request_filter = if false { let embedded_nr = self .start_network_requester( mix_forwarding_channel.clone(), @@ -397,6 +500,16 @@ impl Gateway { .with_maybe_network_request_filter(nr_request_filter) .start(shutdown.subscribe().named("http-api"))?; + if true { + let embedded_ip_sp = self + .start_ip_service_provider( + mix_forwarding_channel.clone(), + shutdown.subscribe().named("ip_service_provider"), + ) + .await?; + active_clients_store.insert_embedded(embedded_ip_sp); + } + self.start_client_websocket_listener( mix_forwarding_channel, active_clients_store, From cfef1f8325d52dd8f03cc2303e18b48f735cec1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 26 Oct 2023 23:14:05 +0200 Subject: [PATCH 025/142] config handling --- Cargo.lock | 2 + common/types/src/gateway.rs | 25 +++ gateway/src/commands/helpers.rs | 77 ++++++++- gateway/src/commands/init.rs | 21 ++- gateway/src/commands/mod.rs | 6 + gateway/src/commands/run.rs | 39 ++--- gateway/src/commands/setup_ip_forwarder.rs | 67 ++++++++ gateway/src/config/mod.rs | 13 ++ gateway/src/config/persistence/paths.rs | 24 +++ gateway/src/config/template.rs | 7 + gateway/src/node/mod.rs | 155 +++++++++--------- service-providers/ip-forwarder/Cargo.toml | 2 + .../ip-forwarder/src/config/mod.rs | 85 +++++++++- .../ip-forwarder/src/config/template.rs | 105 ++++++++++++ 14 files changed, 525 insertions(+), 103 deletions(-) create mode 100644 gateway/src/commands/setup_ip_forwarder.rs create mode 100644 service-providers/ip-forwarder/src/config/template.rs diff --git a/Cargo.lock b/Cargo.lock index 369423472d..938ab2606d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6650,9 +6650,11 @@ version = "0.1.0" dependencies = [ "futures", "log", + "nym-bin-common", "nym-client-core", "nym-config", "nym-sdk", + "nym-service-providers-common", "nym-sphinx", "nym-task", "serde", diff --git a/common/types/src/gateway.rs b/common/types/src/gateway.rs index c57dee8001..9c0dc8541a 100644 --- a/common/types/src/gateway.rs +++ b/common/types/src/gateway.rs @@ -146,3 +146,28 @@ impl fmt::Display for GatewayNetworkRequesterDetails { writeln!(f, "\tunknown list path: {}", self.unknown_list_path) } } + +#[derive(Serialize, Deserialize)] +pub struct GatewayIpForwarderDetails { + pub enabled: bool, + + pub identity_key: String, + pub encryption_key: String, + + // just a convenience wrapper around all the keys + pub address: String, + + pub config_path: String, +} + +impl fmt::Display for GatewayIpForwarderDetails { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + writeln!(f, "IP forwarder:")?; + writeln!(f, "\tenabled: {}", self.enabled)?; + writeln!(f, "\tconfig path: {}", self.config_path)?; + + writeln!(f, "\tidentity key: {}", self.identity_key)?; + writeln!(f, "\tencryption key: {}", self.encryption_key)?; + writeln!(f, "\taddress: {}", self.address) + } +} diff --git a/gateway/src/commands/helpers.rs b/gateway/src/commands/helpers.rs index 94947890c4..56c9d74292 100644 --- a/gateway/src/commands/helpers.rs +++ b/gateway/src/commands/helpers.rs @@ -3,7 +3,9 @@ use crate::commands::upgrade_helpers; use crate::config::default_config_filepath; -use crate::config::persistence::paths::default_network_requester_data_dir; +use crate::config::persistence::paths::{ + default_ip_forwarder_data_dir, default_network_requester_data_dir, +}; use crate::config::Config; use crate::error::GatewayError; use log::{error, info}; @@ -17,7 +19,7 @@ use nym_network_requester::config::BaseClientConfig; use nym_network_requester::{ setup_gateway, GatewaySelectionSpecification, GatewaySetup, OnDiskGatewayDetails, OnDiskKeys, }; -use nym_types::gateway::GatewayNetworkRequesterDetails; +use nym_types::gateway::{GatewayIpForwarderDetails, GatewayNetworkRequesterDetails}; use nym_validator_client::nyxd::AccountId; use std::net::IpAddr; use std::path::PathBuf; @@ -39,6 +41,7 @@ pub(crate) struct OverrideConfig { pub(crate) nyxd_urls: Option>, pub(crate) only_coconut_credentials: Option, pub(crate) with_network_requester: Option, + pub(crate) with_ip_forwarder: Option, } impl OverrideConfig { @@ -76,12 +79,16 @@ impl OverrideConfig { .with_optional( Config::with_enabled_network_requester, self.with_network_requester, - ); + ) + .with_optional(Config::with_enabled_ip_forwarder, self.with_ip_forwarder); if config.network_requester.enabled && config.storage_paths.network_requester_config.is_none() { Ok(config.with_default_network_requester_config_path()) + } else if config.ip_forwarder.enabled && config.storage_paths.ip_forwarder_config.is_none() + { + Ok(config.with_default_ip_forwarder_config_path()) } else { Ok(config) } @@ -166,6 +173,10 @@ fn make_nr_id(gateway_id: &str) -> String { format!("{gateway_id}-network-requester") } +fn make_ip_id(gateway_id: &str) -> String { + format!("{gateway_id}-ip-forwarder") +} + // NOTE: make sure this is in sync with service-providers/network-requester/src/cli/mod.rs::override_config pub(crate) fn override_network_requester_config( mut cfg: nym_network_requester::Config, @@ -303,3 +314,63 @@ pub(crate) async fn initialise_local_network_requester( .to_string(), }) } + +pub(crate) async fn initialise_local_ip_forwarder( + gateway_config: &Config, + opts: OverrideIpForwarderConfig, + identity: identity::PublicKey, +) -> Result { + info!("initialising ip forwarder..."); + let Some(ip_cfg_path) = gateway_config.storage_paths.ip_forwarder_config() else { + return Err(GatewayError::UnspecifiedIpForwarderConfig); + }; + + let id = &gateway_config.gateway.id; + let ip_id = make_ip_id(id); + let ip_data_dir = default_ip_forwarder_data_dir(id); + let mut ip_cfg = nym_ip_forwarder::Config::new(&ip_id).with_data_directory(ip_data_dir); + ip_cfg = override_ip_forwarder_config(ip_cfg, Some(opts)); + + let key_store = OnDiskKeys::new(ip_cfg.storage_paths.common_paths.keys.clone()); + let details_store = + OnDiskGatewayDetails::new(&ip_cfg.storage_paths.common_paths.gateway_details); + + // gateway setup here is way simpler as we're 'connecting' to ourselves + let init_res = setup_gateway( + GatewaySetup::New { + specification: GatewaySelectionSpecification::Custom { + gateway_identity: identity.to_base58_string(), + additional_data: Default::default(), + }, + available_gateways: vec![], + overwrite_data: false, + }, + &key_store, + &details_store, + ) + .await?; + + let address = init_res.client_address()?; + + if let Err(err) = save_formatted_config_to_file(&ip_cfg, ip_cfg_path) { + log::error!("Failed to save the ip forwarder config file: {err}"); + return Err(GatewayError::ConfigSaveFailure { + id: ip_id, + path: ip_cfg_path.to_path_buf(), + source: err, + }); + } else { + eprintln!( + "Saved ip forwarder configuration file to {}", + ip_cfg_path.display() + ) + } + + Ok(GatewayIpForwarderDetails { + enabled: gateway_config.ip_forwarder.enabled, + identity_key: address.identity().to_string(), + encryption_key: address.encryption_key().to_string(), + address: address.to_string(), + config_path: ip_cfg_path.display().to_string(), + }) +} diff --git a/gateway/src/commands/init.rs b/gateway/src/commands/init.rs index e5e14068a8..8823524791 100644 --- a/gateway/src/commands/init.rs +++ b/gateway/src/commands/init.rs @@ -2,7 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 use crate::commands::helpers::{ - initialise_local_network_requester, OverrideNetworkRequesterConfig, + initialise_local_ip_forwarder, initialise_local_network_requester, + OverrideNetworkRequesterConfig, }; use crate::config::{default_config_directory, default_config_filepath, default_data_directory}; use crate::node::helpers::node_details; @@ -14,6 +15,8 @@ use std::net::IpAddr; use std::path::PathBuf; use std::{fs, io}; +use super::helpers::OverrideIpForwarderConfig; + #[derive(Args, Clone)] pub struct Init { /// Id of the gateway we want to create config for @@ -79,9 +82,13 @@ pub struct Init { statistics_service_url: Option, /// Allows this gateway to run an embedded network requester for minimal network overhead - #[clap(long)] + #[clap(long, conflicts_with = "with_ip_forwarder")] with_network_requester: bool, + /// Allows this gateway to run an embedded network requester for minimal network overhead + #[clap(long, conflicts_with = "with_network_requester")] + with_ip_forwarder: bool, + // ##### NETWORK REQUESTER FLAGS ##### /// Specifies whether this network requester should run in 'open-proxy' mode #[clap(long, requires = "with_network_requester")] @@ -154,6 +161,7 @@ impl From for OverrideConfig { nyxd_urls: init_config.nyxd_urls, only_coconut_credentials: init_config.only_coconut_credentials, with_network_requester: Some(init_config.with_network_requester), + with_ip_forwarder: Some(init_config.with_ip_forwarder), } } } @@ -172,6 +180,12 @@ impl<'a> From<&'a Init> for OverrideNetworkRequesterConfig { } } +impl From<&Init> for OverrideIpForwarderConfig { + fn from(_value: &Init) -> Self { + OverrideIpForwarderConfig {} + } +} + fn init_paths(id: &str) -> io::Result<()> { fs::create_dir_all(default_data_directory(id))?; fs::create_dir_all(default_config_directory(id)) @@ -196,6 +210,7 @@ pub async fn execute(args: Init) -> anyhow::Result<()> { // Initialising the config structure is just overriding a default constructed one let fresh_config = Config::new(&args.id); let nr_opts = (&args).into(); + let ip_opts = (&args).into(); let mut config = OverrideConfig::from(args).do_override(fresh_config)?; // if gateway was already initialised, don't generate new keys, et al. @@ -228,6 +243,8 @@ pub async fn execute(args: Init) -> anyhow::Result<()> { if config.network_requester.enabled { initialise_local_network_requester(&config, nr_opts, *identity_keys.public_key()) .await?; + } else if config.ip_forwarder.enabled { + initialise_local_ip_forwarder(&config, ip_opts, *identity_keys.public_key()).await?; } eprintln!("Saved identity and mixnet sphinx keypairs"); diff --git a/gateway/src/commands/mod.rs b/gateway/src/commands/mod.rs index 0df249edb1..f51fd011d2 100644 --- a/gateway/src/commands/mod.rs +++ b/gateway/src/commands/mod.rs @@ -12,6 +12,7 @@ pub(crate) mod helpers; pub(crate) mod init; pub(crate) mod node_details; pub(crate) mod run; +pub(crate) mod setup_ip_forwarder; pub(crate) mod setup_network_requester; pub(crate) mod sign; mod upgrade_helpers; @@ -31,6 +32,10 @@ pub(crate) enum Commands { // essentially an option to include NR without having to setup fresh gateway SetupNetworkRequester(setup_network_requester::CmdArgs), + /// Add ip forwarder support to this gateway + // essentially an option to include ip forwarder without having to setup fresh gateway + SetupIpForwarder(setup_ip_forwarder::CmdArgs), + /// Sign text to prove ownership of this mixnode Sign(sign::Sign), @@ -52,6 +57,7 @@ pub(crate) async fn execute(args: Cli) -> Result<(), Box node_details::execute(m).await?, Commands::Run(m) => run::execute(m).await?, Commands::SetupNetworkRequester(m) => setup_network_requester::execute(m).await?, + Commands::SetupIpForwarder(m) => setup_ip_forwarder::execute(m).await?, Commands::Sign(m) => sign::execute(m)?, Commands::BuildInfo(m) => build_info::execute(m), Commands::Completions(s) => s.generate(&mut crate::Cli::command(), bin_name), diff --git a/gateway/src/commands/run.rs b/gateway/src/commands/run.rs index 4f390db406..ad6a4495c6 100644 --- a/gateway/src/commands/run.rs +++ b/gateway/src/commands/run.rs @@ -20,36 +20,36 @@ use super::helpers::OverrideIpForwarderConfig; #[derive(Args, Clone)] pub struct Run { /// Id of the gateway we want to run - #[clap(long)] + #[arg(long)] id: String, /// The custom listening address on which the gateway will be running for receiving sphinx packets - #[clap(long, alias = "host")] + #[arg(long, alias = "host")] listening_address: Option, /// Comma separated list of public ip addresses that will announced to the nym-api and subsequently to the clients. /// In nearly all circumstances, it's going to be identical to the address you're going to use for bonding. - #[clap(long, value_delimiter = ',')] + #[arg(long, value_delimiter = ',')] public_ips: Option>, /// Optional hostname associated with this gateway that will announced to the nym-api and subsequently to the clients - #[clap(long)] + #[arg(long)] hostname: Option, /// The port on which the gateway will be listening for sphinx packets - #[clap(long)] + #[arg(long)] mix_port: Option, /// The port on which the gateway will be listening for clients gateway-requests - #[clap(long)] + #[arg(long)] clients_port: Option, /// Path to sqlite database containing all gateway persistent data - #[clap(long)] + #[arg(long)] datastore: Option, /// Comma separated list of endpoints of nym APIs - #[clap( + #[arg( long, alias = "validator_apis", value_delimiter = ',', @@ -59,7 +59,7 @@ pub struct Run { nym_apis: Option>, /// Comma separated list of endpoints of the validator - #[clap( + #[arg( long, alias = "validators", alias = "nyxd_validators", @@ -70,28 +70,28 @@ pub struct Run { nyxd_urls: Option>, /// Cosmos wallet mnemonic - #[clap(long)] + #[arg(long)] mnemonic: Option, /// Set this gateway to work only with coconut credentials; that would disallow clients to /// bypass bandwidth credential requirement - #[clap(long, hide = true)] + #[arg(long, hide = true)] only_coconut_credentials: Option, /// Enable/disable gateway anonymized statistics that get sent to a statistics aggregator server - #[clap(long)] + #[arg(long)] enabled_statistics: Option, /// URL where a statistics aggregator is running. The default value is a Nym aggregator server - #[clap(long)] + #[arg(long)] statistics_service_url: Option, /// Allows this gateway to run an embedded network requester for minimal network overhead - #[clap(long)] + #[arg(long, conflicts_with = "with_ip_forwarder")] with_network_requester: Option, /// Allows this gateway to run an embedded network requester for minimal network overhead - #[clap(long)] + #[arg(long, conflicts_with = "with_network_requester")] with_ip_forwarder: Option, // ##### NETWORK REQUESTER FLAGS ##### @@ -129,20 +129,20 @@ pub struct Run { /// Path to .json file containing custom network specification. /// Only usable when local network requester is enabled. - #[clap(long, group = "network", hide = true)] + #[arg(long, group = "network", hide = true)] custom_mixnet: Option, /// Specifies whether this network requester will run using the default ExitPolicy /// as opposed to the allow list. /// Note: this setting will become the default in the future releases. - #[clap(long)] + #[arg(long)] with_exit_policy: Option, - #[clap(short, long, default_value_t = OutputFormat::default())] + #[arg(short, long, default_value_t = OutputFormat::default())] output: OutputFormat, /// Flag specifying this node will be running in a local setting. - #[clap(long)] + #[arg(long)] local: bool, } @@ -163,6 +163,7 @@ impl From for OverrideConfig { nyxd_urls: run_config.nyxd_urls, only_coconut_credentials: run_config.only_coconut_credentials, with_network_requester: run_config.with_network_requester, + with_ip_forwarder: run_config.with_ip_forwarder, } } } diff --git a/gateway/src/commands/setup_ip_forwarder.rs b/gateway/src/commands/setup_ip_forwarder.rs new file mode 100644 index 0000000000..6b8678f3ab --- /dev/null +++ b/gateway/src/commands/setup_ip_forwarder.rs @@ -0,0 +1,67 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::commands::helpers::{ + initialise_local_ip_forwarder, try_load_current_config, OverrideIpForwarderConfig, +}; +use crate::node::helpers::load_public_key; +use clap::Args; +use nym_bin_common::output_format::OutputFormat; +use std::path::PathBuf; + +#[derive(Args, Clone)] +pub struct CmdArgs { + /// The id of the gateway you want to initialise local ip forwarder for. + #[arg(long)] + id: String, + + /// Path to custom location for ip forward's config. + #[arg(long)] + custom_config_path: Option, + + /// Specify whether the ip forwarder should be enabled. + // (you might want to create all the configs, generate keys, etc. but not actually run the NR just yet) + #[arg(long)] + enabled: Option, + + #[arg(short, long, default_value_t = OutputFormat::default())] + output: OutputFormat, +} + +impl From<&CmdArgs> for OverrideIpForwarderConfig { + fn from(_value: &CmdArgs) -> Self { + OverrideIpForwarderConfig {} + } +} + +pub async fn execute(args: CmdArgs) -> anyhow::Result<()> { + let mut config = try_load_current_config(&args.id)?; + let opts = (&args).into(); + + // if somebody provided config file of a custom NR, that's fine + // but in 90% cases, I'd assume, it won't work due to invalid gateway configuration + // but it might be nice to be able to move files around. + if let Some(custom_config_path) = args.custom_config_path { + // if you specified anything as the argument, overwrite whatever was already in the config file + config.storage_paths.ip_forwarder_config = Some(custom_config_path); + } + + if let Some(override_enabled) = args.enabled { + config.ip_forwarder.enabled = override_enabled; + } + + if config.storage_paths.ip_forwarder_config.is_none() { + config = config.with_default_ip_forwarder_config_path() + } + + let identity_public_key = load_public_key( + &config.storage_paths.keys.public_identity_key_file, + "gateway identity", + )?; + let details = initialise_local_ip_forwarder(&config, opts, identity_public_key).await?; + config.try_save()?; + + args.output.to_stdout(&details); + + Ok(()) +} diff --git a/gateway/src/config/mod.rs b/gateway/src/config/mod.rs index caef4cd68d..88c438e29c 100644 --- a/gateway/src/config/mod.rs +++ b/gateway/src/config/mod.rs @@ -100,6 +100,7 @@ pub struct Config { pub network_requester: NetworkRequester, + #[serde(default)] pub ip_forwarder: IpForwarder, #[serde(default)] @@ -198,6 +199,18 @@ impl Config { self } + pub fn with_enabled_ip_forwarder(mut self, enabled_ip_forwarder: bool) -> Self { + self.ip_forwarder.enabled = enabled_ip_forwarder; + self + } + + pub fn with_default_ip_forwarder_config_path(mut self) -> Self { + self.storage_paths = self + .storage_paths + .with_default_ip_forwarder_config(&self.gateway.id); + self + } + pub fn with_only_coconut_credentials(mut self, only_coconut_credentials: bool) -> Self { self.gateway.only_coconut_credentials = only_coconut_credentials; self diff --git a/gateway/src/config/persistence/paths.rs b/gateway/src/config/persistence/paths.rs index 4430e65921..0e0ec8d836 100644 --- a/gateway/src/config/persistence/paths.rs +++ b/gateway/src/config/persistence/paths.rs @@ -15,12 +15,19 @@ pub const DEFAULT_CLIENTS_STORAGE_FILENAME: &str = "db.sqlite"; pub const DEFAULT_NETWORK_REQUESTER_CONFIG_FILENAME: &str = "network_requester_config.toml"; pub const DEFAULT_NETWORK_REQUESTER_DATA_DIR: &str = "network-requester-data"; +pub const DEFAULT_IP_FORWARDER_CONFIG_FILENAME: &str = "ip_forwarder_config.toml"; +pub const DEFAULT_IP_FORWARDER_DATA_DIR: &str = "ip-forwarder-data"; + // pub const DEFAULT_DESCRIPTION_FILENAME: &str = "description.toml"; pub fn default_network_requester_data_dir>(id: P) -> PathBuf { default_data_directory(id).join(DEFAULT_NETWORK_REQUESTER_DATA_DIR) } +pub fn default_ip_forwarder_data_dir>(id: P) -> PathBuf { + default_data_directory(id).join(DEFAULT_IP_FORWARDER_DATA_DIR) +} + /// makes sure that an empty path is converted into a `None` as opposed to `Some("")` fn de_maybe_path<'de, D>(deserializer: D) -> Result, D::Error> where @@ -80,10 +87,27 @@ impl GatewayPaths { ) } + #[must_use] + pub fn with_ip_forwarder_config>(mut self, path: P) -> Self { + self.ip_forwarder_config = Some(path.as_ref().into()); + self + } + + #[must_use] + pub fn with_default_ip_forwarder_config>(self, id: P) -> Self { + self.with_ip_forwarder_config( + default_config_directory(id).join(DEFAULT_IP_FORWARDER_CONFIG_FILENAME), + ) + } + pub fn network_requester_config(&self) -> &Option { &self.network_requester_config } + pub fn ip_forwarder_config(&self) -> &Option { + &self.ip_forwarder_config + } + pub fn private_identity_key(&self) -> &Path { self.keys.private_identity_key() } diff --git a/gateway/src/config/template.rs b/gateway/src/config/template.rs index 0f77d499fc..24867e10c4 100644 --- a/gateway/src/config/template.rs +++ b/gateway/src/config/template.rs @@ -82,6 +82,10 @@ landing_page_assets_path = '{{ http.landing_page_assets_path }}' # Specifies whether network requester service is enabled in this process. enabled = {{ network_requester.enabled }} +[ip_forwarder] +# Specifies whether ip forwarder service is enabled in this process. +enabled = {{ ip_forwarder.enabled }} + [storage_paths] # Path to file containing private identity key. @@ -103,6 +107,9 @@ clients_storage = '{{ storage_paths.clients_storage }}' # Path to the configuration of the embedded network requester. network_requester_config = '{{ storage_paths.network_requester_config }}' +# Path to the configuration of the embedded ip forwarder. +ip_forwarder_config = '{{ storage_paths.ip_forwarder_config }}' + ##### logging configuration options ##### [logging] diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 6dc8bf3076..2a8bf0b088 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -253,73 +253,6 @@ impl Gateway { packet_sender } - async fn start_ip_service_provider( - &self, - forwarding_channel: MixForwardingSender, - shutdown: TaskClient, - ) -> Result { - info!("Starting IP service provider..."); - - // if network requester is enabled, configuration file must be provided! - let Some(ip_opts) = &self.ip_forwarder_opts else { - return Err(GatewayError::UnspecifiedIpForwarderConfig); - }; - - // this gateway, whenever it has anything to send to its local NR will use fake_client_tx - let (nr_mix_sender, nr_mix_receiver) = mpsc::unbounded(); - let router_shutdown = shutdown.fork("message_router"); - - let (router_tx, mut router_rx) = oneshot::channel(); - - let transceiver = LocalGateway::new( - *self.identity_keypair.public_key(), - forwarding_channel, - router_tx, - ); - - // TODO: well, wire it up internally to gateway traffic, shutdowns, etc. - let (on_start_tx, on_start_rx) = oneshot::channel(); - // let mut nr_builder = nym_ip_forwarder::IpForwarderBuilder::new(nr_opts.config.clone()) - let mut ip_builder = nym_ip_forwarder::IpForwarderBuilder::new(ip_opts.config.clone()) - .with_shutdown(shutdown) - .with_custom_gateway_transceiver(Box::new(transceiver)) - .with_wait_for_gateway(true) - .with_on_start(on_start_tx); - - if let Some(custom_mixnet) = &ip_opts.custom_mixnet_path { - ip_builder = ip_builder.with_stored_topology(custom_mixnet)? - } - - tokio::spawn(async move { - if let Err(err) = ip_builder.run_service_provider().await { - // no need to panic as we have passed a task client to the ip forwarder so we're - // most likely already in the process of shutting down - error!("ip forwarder has failed: {err}") - } - }); - - let start_data = on_start_rx - .await - .map_err(|_| GatewayError::IpForwarderStartupFailure)?; - - // this should be instantaneous since the data is sent on this channel before the on start is called; - // the failure should be impossible - let Ok(Some(packet_router)) = router_rx.try_recv() else { - return Err(GatewayError::IpForwarderStartupFailure); - }; - - MessageRouter::new(nr_mix_receiver, packet_router).start_with_shutdown(router_shutdown); - info!( - "the local ip forwarder is running on {}", - start_data.address - ); - - Ok(LocalNetworkRequesterHandle::new_ip( - start_data, - nr_mix_sender, - )) - } - // TODO: rethink the logic in this function... async fn start_network_requester( &self, @@ -384,6 +317,74 @@ impl Gateway { }) } + async fn start_ip_service_provider( + &self, + forwarding_channel: MixForwardingSender, + shutdown: TaskClient, + ) -> Result { + info!("Starting IP service provider..."); + + // if network requester is enabled, configuration file must be provided! + let Some(ip_opts) = &self.ip_forwarder_opts else { + log::error!("IP service provider is enabled but no configuration file was provided!"); + return Err(GatewayError::UnspecifiedIpForwarderConfig); + }; + + // this gateway, whenever it has anything to send to its local NR will use fake_client_tx + let (nr_mix_sender, nr_mix_receiver) = mpsc::unbounded(); + let router_shutdown = shutdown.fork("message_router"); + + let (router_tx, mut router_rx) = oneshot::channel(); + + let transceiver = LocalGateway::new( + *self.identity_keypair.public_key(), + forwarding_channel, + router_tx, + ); + + // TODO: well, wire it up internally to gateway traffic, shutdowns, etc. + let (on_start_tx, on_start_rx) = oneshot::channel(); + // let mut nr_builder = nym_ip_forwarder::IpForwarderBuilder::new(nr_opts.config.clone()) + let mut ip_builder = nym_ip_forwarder::IpForwarderBuilder::new(ip_opts.config.clone()) + .with_shutdown(shutdown) + .with_custom_gateway_transceiver(Box::new(transceiver)) + .with_wait_for_gateway(true) + .with_on_start(on_start_tx); + + if let Some(custom_mixnet) = &ip_opts.custom_mixnet_path { + ip_builder = ip_builder.with_stored_topology(custom_mixnet)? + } + + tokio::spawn(async move { + if let Err(err) = ip_builder.run_service_provider().await { + // no need to panic as we have passed a task client to the ip forwarder so we're + // most likely already in the process of shutting down + error!("ip forwarder has failed: {err}") + } + }); + + let start_data = on_start_rx + .await + .map_err(|_| GatewayError::IpForwarderStartupFailure)?; + + // this should be instantaneous since the data is sent on this channel before the on start is called; + // the failure should be impossible + let Ok(Some(packet_router)) = router_rx.try_recv() else { + return Err(GatewayError::IpForwarderStartupFailure); + }; + + MessageRouter::new(nr_mix_receiver, packet_router).start_with_shutdown(router_shutdown); + info!( + "the local ip forwarder is running on {}", + start_data.address + ); + + Ok(LocalNetworkRequesterHandle::new_ip( + start_data, + nr_mix_sender, + )) + } + async fn wait_for_interrupt(shutdown: TaskManager) -> Result<(), Box> { let res = shutdown.catch_interrupt().await; log::info!("Stopping nym gateway"); @@ -490,16 +491,6 @@ impl Gateway { None }; - HttpApiBuilder::new( - &self.config, - self.identity_keypair.as_ref(), - self.sphinx_keypair.clone(), - ) - .with_wireguard_client_registry(self.client_registry.clone()) - .with_maybe_network_requester(self.network_requester_opts.as_ref().map(|o| &o.config)) - .with_maybe_network_request_filter(nr_request_filter) - .start(shutdown.subscribe().named("http-api"))?; - if true { let embedded_ip_sp = self .start_ip_service_provider( @@ -510,6 +501,16 @@ impl Gateway { active_clients_store.insert_embedded(embedded_ip_sp); } + HttpApiBuilder::new( + &self.config, + self.identity_keypair.as_ref(), + self.sphinx_keypair.clone(), + ) + .with_wireguard_client_registry(self.client_registry.clone()) + .with_maybe_network_requester(self.network_requester_opts.as_ref().map(|o| &o.config)) + .with_maybe_network_request_filter(nr_request_filter) + .start(shutdown.subscribe().named("http-api"))?; + self.start_client_websocket_listener( mix_forwarding_channel, active_clients_store, diff --git a/service-providers/ip-forwarder/Cargo.toml b/service-providers/ip-forwarder/Cargo.toml index 777de65c28..bb88978f18 100644 --- a/service-providers/ip-forwarder/Cargo.toml +++ b/service-providers/ip-forwarder/Cargo.toml @@ -11,9 +11,11 @@ license.workspace = true [dependencies] futures = { workspace = true } log = { workspace = true } +nym-bin-common = { path = "../../common/bin-common" } nym-client-core = { path = "../../common/client-core" } nym-config = { path = "../../common/config" } nym-sdk = { path = "../../sdk/rust/nym-sdk" } +nym-service-providers-common = { path = "../common" } nym-sphinx = { path = "../../common/nymsphinx" } nym-task = { path = "../../common/task" } serde = { workspace = true, features = ["derive"] } diff --git a/service-providers/ip-forwarder/src/config/mod.rs b/service-providers/ip-forwarder/src/config/mod.rs index 1792793107..19bcaedc49 100644 --- a/service-providers/ip-forwarder/src/config/mod.rs +++ b/service-providers/ip-forwarder/src/config/mod.rs @@ -1,11 +1,53 @@ -use std::{io, path::Path}; - pub use nym_client_core::config::Config as BaseClientConfig; + +use nym_bin_common::logging::LoggingSettings; +use nym_config::{ + must_get_home, save_formatted_config_to_file, NymConfigTemplate, DEFAULT_CONFIG_DIR, + DEFAULT_CONFIG_FILENAME, DEFAULT_DATA_DIR, NYM_DIR, +}; +use nym_service_providers_common::DEFAULT_SERVICE_PROVIDERS_DIR; use serde::{Deserialize, Serialize}; +use std::{ + io, + path::{Path, PathBuf}, +}; use crate::config::persistence::IpForwarderPaths; +use self::template::CONFIG_TEMPLATE; + mod persistence; +mod template; + +const DEFAULT_IP_FORWARDERS_DIR: &str = "ip-forwarder"; + +/// Derive default path to ip forwarder's config directory. +/// It should get resolved to `$HOME/.nym/service-providers/ip-forwareder//config` +pub fn default_config_directory>(id: P) -> PathBuf { + must_get_home() + .join(NYM_DIR) + .join(DEFAULT_SERVICE_PROVIDERS_DIR) + .join(DEFAULT_IP_FORWARDERS_DIR) + .join(id) + .join(DEFAULT_CONFIG_DIR) +} + +/// Derive default path to ip forwarder's config file. +/// It should get resolved to `$HOME/.nym/service-providers/ip-forwarder//config/config.toml` +pub fn default_config_filepath>(id: P) -> PathBuf { + default_config_directory(id).join(DEFAULT_CONFIG_FILENAME) +} + +/// Derive default path to network requester's data directory where files, such as keys, are stored. +/// It should get resolved to `$HOME/.nym/service-providers/network-requester//data` +pub fn default_data_directory>(id: P) -> PathBuf { + must_get_home() + .join(NYM_DIR) + .join(DEFAULT_SERVICE_PROVIDERS_DIR) + .join(DEFAULT_IP_FORWARDERS_DIR) + .join(id) + .join(DEFAULT_DATA_DIR) +} #[derive(Debug, Clone, Deserialize, PartialEq, Serialize)] #[serde(deny_unknown_fields)] @@ -14,10 +56,49 @@ pub struct Config { pub base: BaseClientConfig, pub storage_paths: IpForwarderPaths, + + pub logging: LoggingSettings, +} + +impl NymConfigTemplate for Config { + fn template(&self) -> &'static str { + CONFIG_TEMPLATE + } } impl Config { + pub fn new>(id: S) -> Self { + Config { + base: BaseClientConfig::new(id.as_ref(), env!("CARGO_PKG_VERSION")), + storage_paths: IpForwarderPaths::new_base(default_data_directory(id.as_ref())), + logging: Default::default(), + } + } + + pub fn with_data_directory>(mut self, data_directory: P) -> Self { + self.storage_paths = IpForwarderPaths::new_base(data_directory); + self + } + pub fn read_from_toml_file>(path: P) -> io::Result { nym_config::read_config_from_toml_file(path) } + + pub fn read_from_default_path>(id: P) -> io::Result { + Self::read_from_toml_file(default_config_filepath(id)) + } + + pub fn default_location(&self) -> PathBuf { + default_config_filepath(&self.base.client.id) + } + + pub fn save_to_default_location(&self) -> io::Result<()> { + let config_save_location: PathBuf = self.default_location(); + save_formatted_config_to_file(self, config_save_location) + } + + pub fn validate(&self) -> bool { + // no other sections have explicit requirements (yet) + self.base.validate() + } } diff --git a/service-providers/ip-forwarder/src/config/template.rs b/service-providers/ip-forwarder/src/config/template.rs new file mode 100644 index 0000000000..2da118a580 --- /dev/null +++ b/service-providers/ip-forwarder/src/config/template.rs @@ -0,0 +1,105 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +pub(crate) const CONFIG_TEMPLATE: &str = + // While using normal toml marshalling would have been way simpler with less overhead, + // I think it's useful to have comments attached to the saved config file to explain behaviour of + // particular fields. + // Note: any changes to the template must be reflected in the appropriate structs. + r#" +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### main base client config options ##### + +[client] +# Version of the client for which this configuration was created. +version = '{{ client.version }}' + +# Human readable ID of this particular client. +id = '{{ client.id }}' + +# Indicates whether this client is running in a disabled credentials mode, thus attempting +# to claim bandwidth without presenting bandwidth credentials. +disabled_credentials_mode = {{ client.disabled_credentials_mode }} + +# Addresses to nyxd validators via which the client can communicate with the chain. +nyxd_urls = [ + {{#each client.nyxd_urls }} + '{{this}}', + {{/each}} +] + +# Addresses to APIs running on validator from which the client gets the view of the network. +nym_api_urls = [ + {{#each client.nym_api_urls }} + '{{this}}', + {{/each}} +] + +[storage_paths] + +# Path to file containing private identity key. +keys.private_identity_key_file = '{{ storage_paths.keys.private_identity_key_file }}' + +# Path to file containing public identity key. +keys.public_identity_key_file = '{{ storage_paths.keys.public_identity_key_file }}' + +# Path to file containing private encryption key. +keys.private_encryption_key_file = '{{ storage_paths.keys.private_encryption_key_file }}' + +# Path to file containing public encryption key. +keys.public_encryption_key_file = '{{ storage_paths.keys.public_encryption_key_file }}' + +# A gateway specific, optional, base58 stringified shared key used for +# communication with particular gateway. +keys.gateway_shared_key_file = '{{ storage_paths.keys.gateway_shared_key_file }}' + +# Path to file containing key used for encrypting and decrypting the content of an +# acknowledgement so that nobody besides the client knows which packet it refers to. +keys.ack_key_file = '{{ storage_paths.keys.ack_key_file }}' + +# Path to the database containing bandwidth credentials +credentials_database = '{{ storage_paths.credentials_database }}' + +# Path to the file containing information about gateway used by this client, +# i.e. details such as its public key, owner address or the network information. +gateway_details = '{{ storage_paths.gateway_details }}' + +# Path to the persistent store for received reply surbs, unused encryption keys and used sender tags. +reply_surb_database = '{{ storage_paths.reply_surb_database }}' + +# Location of the file containing our allow.list +allowed_list_location = '{{ storage_paths.allowed_list_location }}' + +# Location of the file containing our unknown.list +unknown_list_location = '{{ storage_paths.unknown_list_location }}' + +# Path to file containing description of this network-requester. +ip_forwarder_description = '{{ storage_paths.ip_forwarder_description }}' + + +##### logging configuration options ##### + +[logging] + +# TODO + + +##### debug configuration options ##### +# The following options should not be modified unless you know EXACTLY what you are doing +# as if set incorrectly, they may impact your anonymity. + +[debug] + +[debug.traffic] +average_packet_delay = '{{ debug.traffic.average_packet_delay }}' +message_sending_average_delay = '{{ debug.traffic.message_sending_average_delay }}' + +[debug.acknowledgements] +average_ack_delay = '{{ debug.acknowledgements.average_ack_delay }}' + +[debug.cover_traffic] +loop_cover_traffic_average_delay = '{{ debug.cover_traffic.loop_cover_traffic_average_delay }}' + +"#; From d33967f60c6e97fbce08cab3bf5da3b9320549e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 26 Oct 2023 23:39:56 +0200 Subject: [PATCH 026/142] rustfmt --- gateway/src/config/persistence/paths.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/gateway/src/config/persistence/paths.rs b/gateway/src/config/persistence/paths.rs index 0e0ec8d836..14e35f4613 100644 --- a/gateway/src/config/persistence/paths.rs +++ b/gateway/src/config/persistence/paths.rs @@ -57,7 +57,6 @@ pub struct GatewayPaths { // pub node_description: PathBuf, // pub cosmos_bip39_mnemonic: PathBuf, - /// Path to the configuration of the embedded ip forwarder. #[serde(deserialize_with = "de_maybe_path")] pub ip_forwarder_config: Option, From a17d36fd894599521bd0968b1b28c0c2814ed3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 27 Oct 2023 10:40:03 +0200 Subject: [PATCH 027/142] Fix test compilation --- gateway/src/commands/init.rs | 2 ++ gateway/src/node/mod.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gateway/src/commands/init.rs b/gateway/src/commands/init.rs index 8823524791..296e7c8017 100644 --- a/gateway/src/commands/init.rs +++ b/gateway/src/commands/init.rs @@ -293,6 +293,7 @@ mod tests { only_coconut_credentials: None, output: Default::default(), with_network_requester: false, + with_ip_forwarder: false, open_proxy: None, enable_statistics: None, statistics_recipient: None, @@ -320,6 +321,7 @@ mod tests { let _gateway = Gateway::new_from_keys_and_storage( config, None, + None, identity_keys, sphinx_keys, InMemStorage, diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 2a8bf0b088..7bbdd1233c 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -156,6 +156,7 @@ impl Gateway { pub async fn new_from_keys_and_storage( config: Config, network_requester_opts: Option, + ip_forwarder_opts: Option, identity_keypair: identity::KeyPair, sphinx_keypair: encryption::KeyPair, storage: St, @@ -163,6 +164,7 @@ impl Gateway { Gateway { config, network_requester_opts, + ip_forwarder_opts, identity_keypair: Arc::new(identity_keypair), sphinx_keypair: Arc::new(sphinx_keypair), storage, From 65d93b2b1803b2454fd07f17e05e699d7cbfd844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 27 Oct 2023 10:54:53 +0200 Subject: [PATCH 028/142] Remove hack --- gateway/src/commands/init.rs | 2 +- gateway/src/commands/run.rs | 2 +- gateway/src/node/mod.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gateway/src/commands/init.rs b/gateway/src/commands/init.rs index 296e7c8017..286a24f21a 100644 --- a/gateway/src/commands/init.rs +++ b/gateway/src/commands/init.rs @@ -86,7 +86,7 @@ pub struct Init { with_network_requester: bool, /// Allows this gateway to run an embedded network requester for minimal network overhead - #[clap(long, conflicts_with = "with_network_requester")] + #[clap(long, hide = true, conflicts_with = "with_network_requester")] with_ip_forwarder: bool, // ##### NETWORK REQUESTER FLAGS ##### diff --git a/gateway/src/commands/run.rs b/gateway/src/commands/run.rs index ad6a4495c6..a0f807a99d 100644 --- a/gateway/src/commands/run.rs +++ b/gateway/src/commands/run.rs @@ -91,7 +91,7 @@ pub struct Run { with_network_requester: Option, /// Allows this gateway to run an embedded network requester for minimal network overhead - #[arg(long, conflicts_with = "with_network_requester")] + #[arg(long, hide = true, conflicts_with = "with_network_requester")] with_ip_forwarder: Option, // ##### NETWORK REQUESTER FLAGS ##### diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 7bbdd1233c..0be8be5eaf 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -476,9 +476,7 @@ impl Gateway { }); } - // WIP(JON) - // let nr_request_filter = if self.config.network_requester.enabled { - let nr_request_filter = if false { + let nr_request_filter = if self.config.network_requester.enabled { let embedded_nr = self .start_network_requester( mix_forwarding_channel.clone(), @@ -493,7 +491,9 @@ impl Gateway { None }; - if true { + // NOTE: this is mutually exclusive with the network requester (for now). This is reflected + // in the command line arguments as well. + if self.config.ip_forwarder.enabled { let embedded_ip_sp = self .start_ip_service_provider( mix_forwarding_channel.clone(), From 49cf33f6d7d7d7aeae792df646536d853f0fb660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Mon, 30 Oct 2023 11:09:50 +0100 Subject: [PATCH 029/142] Proper config backwards compatibility --- gateway/src/commands/upgrade_helpers.rs | 33 ++- gateway/src/config/mod.rs | 1 + gateway/src/config/old_config_v1_1_29.rs | 28 +- gateway/src/config/old_config_v1_1_30.rs | 362 +++++++++++++++++++++++ 4 files changed, 407 insertions(+), 17 deletions(-) create mode 100644 gateway/src/config/old_config_v1_1_30.rs diff --git a/gateway/src/commands/upgrade_helpers.rs b/gateway/src/commands/upgrade_helpers.rs index 7b13cc3f53..f5c9b14953 100644 --- a/gateway/src/commands/upgrade_helpers.rs +++ b/gateway/src/commands/upgrade_helpers.rs @@ -4,6 +4,7 @@ use crate::config::old_config_v1_1_20::ConfigV1_1_20; use crate::config::old_config_v1_1_28::ConfigV1_1_28; use crate::config::old_config_v1_1_29::ConfigV1_1_29; +use crate::config::old_config_v1_1_30::ConfigV1_1_30; use crate::config::{default_config_filepath, Config}; use crate::error::GatewayError; use log::info; @@ -22,7 +23,8 @@ fn try_upgrade_v1_1_20_config(id: &str) -> Result { let updated_step1: ConfigV1_1_28 = old_config.into(); let updated_step2: ConfigV1_1_29 = updated_step1.into(); - let updated: Config = updated_step2.into(); + let updated_step3: ConfigV1_1_30 = updated_step2.into(); + let updated: Config = updated_step3.into(); updated .save_to_default_location() .map_err(|err| GatewayError::ConfigSaveFailure { @@ -45,7 +47,8 @@ fn try_upgrade_v1_1_28_config(id: &str) -> Result { info!("It is going to get updated to the current specification."); let updated_step1: ConfigV1_1_29 = old_config.into(); - let updated: Config = updated_step1.into(); + let updated_step2: ConfigV1_1_30 = updated_step1.into(); + let updated: Config = updated_step2.into(); updated .save_to_default_location() .map_err(|err| GatewayError::ConfigSaveFailure { @@ -67,6 +70,29 @@ fn try_upgrade_v1_1_29_config(id: &str) -> Result { info!("It seems the gateway is using <= v1.1.29 config template."); info!("It is going to get updated to the current specification."); + let updated_step1: ConfigV1_1_30 = old_config.into(); + let updated: Config = updated_step1.into(); + updated + .save_to_default_location() + .map_err(|err| GatewayError::ConfigSaveFailure { + path: default_config_filepath(id), + id: id.to_string(), + source: err, + })?; + + Ok(true) +} + +fn try_upgrade_v1_1_30_config(id: &str) -> Result { + // explicitly load it as v1.1.30 (which is incompatible with the current, i.e. 1.1.31+) + let Ok(old_config) = ConfigV1_1_30::read_from_default_path(id) else { + // if we failed to load it, there might have been nothing to upgrade + // or maybe it was an even older file. in either way. just ignore it and carry on with our day + return Ok(false); + }; + info!("It seems the gateway is using <= v1.1.30 config template."); + info!("It is going to get updated to the current specification."); + let updated: Config = old_config.into(); updated .save_to_default_location() @@ -89,6 +115,9 @@ pub(crate) fn try_upgrade_config(id: &str) -> Result<(), GatewayError> { if try_upgrade_v1_1_29_config(id)? { return Ok(()); } + if try_upgrade_v1_1_30_config(id)? { + return Ok(()); + } Ok(()) } diff --git a/gateway/src/config/mod.rs b/gateway/src/config/mod.rs index 88c438e29c..a1adbf86bf 100644 --- a/gateway/src/config/mod.rs +++ b/gateway/src/config/mod.rs @@ -24,6 +24,7 @@ use zeroize::{Zeroize, ZeroizeOnDrop}; pub(crate) mod old_config_v1_1_20; pub(crate) mod old_config_v1_1_28; pub(crate) mod old_config_v1_1_29; +pub(crate) mod old_config_v1_1_30; pub mod persistence; mod template; diff --git a/gateway/src/config/old_config_v1_1_29.rs b/gateway/src/config/old_config_v1_1_29.rs index 467b82709f..842e0a8275 100644 --- a/gateway/src/config/old_config_v1_1_29.rs +++ b/gateway/src/config/old_config_v1_1_29.rs @@ -1,9 +1,6 @@ // Copyright 2020-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::config::persistence::paths::{GatewayPaths, KeysPaths}; -use crate::config::{Config, Debug, Gateway, NetworkRequester}; -use nym_bin_common::logging::LoggingSettings; use nym_config::{ must_get_home, read_config_from_toml_file, DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, NYM_DIR, }; @@ -14,6 +11,11 @@ use std::path::{Path, PathBuf}; use std::time::Duration; use url::Url; +use super::old_config_v1_1_30::{ + ConfigV1_1_30, DebugV1_1_30, GatewayPathsV1_1_30, GatewayV1_1_30, KeysPathsV1_1_30, + LoggingSettingsV1_1_30, NetworkRequesterV1_1_30, +}; + const DEFAULT_GATEWAYS_DIR: &str = "gateways"; // 'DEBUG' @@ -105,9 +107,9 @@ impl ConfigV1_1_29 { } } -impl From for Config { +impl From for ConfigV1_1_30 { fn from(value: ConfigV1_1_29) -> Self { - Config { + ConfigV1_1_30 { save_path: value.save_path, // \/ ADDED @@ -121,7 +123,7 @@ impl From for Config { // \/ ADDED http: Default::default(), // /\ ADDED - gateway: Gateway { + gateway: GatewayV1_1_30 { version: value.gateway.version, id: value.gateway.id, only_coconut_credentials: value.gateway.only_coconut_credentials, @@ -141,8 +143,8 @@ impl From for Config { // \/ ADDED wireguard: Default::default(), // /\ ADDED - storage_paths: GatewayPaths { - keys: KeysPaths { + storage_paths: GatewayPathsV1_1_30 { + keys: KeysPathsV1_1_30 { private_identity_key_file: value.storage_paths.keys.private_identity_key_file, public_identity_key_file: value.storage_paths.keys.public_identity_key_file, private_sphinx_key_file: value.storage_paths.keys.private_sphinx_key_file, @@ -150,16 +152,12 @@ impl From for Config { }, clients_storage: value.storage_paths.clients_storage, network_requester_config: value.storage_paths.network_requester_config, - // WIP: make proper conversion - ip_forwarder_config: Default::default(), }, - network_requester: NetworkRequester { + network_requester: NetworkRequesterV1_1_30 { enabled: value.network_requester.enabled, }, - // WIP: make proper conversion - ip_forwarder: Default::default(), - logging: LoggingSettings {}, - debug: Debug { + logging: LoggingSettingsV1_1_30 {}, + debug: DebugV1_1_30 { packet_forwarding_initial_backoff: value.debug.packet_forwarding_initial_backoff, packet_forwarding_maximum_backoff: value.debug.packet_forwarding_maximum_backoff, initial_connection_timeout: value.debug.initial_connection_timeout, diff --git a/gateway/src/config/old_config_v1_1_30.rs b/gateway/src/config/old_config_v1_1_30.rs new file mode 100644 index 0000000000..66dcbdea60 --- /dev/null +++ b/gateway/src/config/old_config_v1_1_30.rs @@ -0,0 +1,362 @@ +// Copyright 2020-2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::config::persistence::paths::GatewayPaths; +use nym_bin_common::logging::LoggingSettings; +use nym_config::{ + must_get_home, read_config_from_toml_file, DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, NYM_DIR, +}; +use serde::{Deserialize, Deserializer, Serialize}; +use std::io; +use std::net::{IpAddr, Ipv4Addr, SocketAddr}; +use std::path::{Path, PathBuf}; +use std::time::Duration; +use url::Url; + +use super::persistence::paths::KeysPaths; +use super::{Config, Debug, Gateway, NetworkRequester}; + +const DEFAULT_GATEWAYS_DIR: &str = "gateways"; + +// 'DEBUG' +// where applicable, the below are defined in milliseconds +const DEFAULT_PRESENCE_SENDING_DELAY: Duration = Duration::from_millis(10_000); +const DEFAULT_PACKET_FORWARDING_INITIAL_BACKOFF: Duration = Duration::from_millis(10_000); +const DEFAULT_PACKET_FORWARDING_MAXIMUM_BACKOFF: Duration = Duration::from_millis(300_000); +const DEFAULT_INITIAL_CONNECTION_TIMEOUT: Duration = Duration::from_millis(1_500); +const DEFAULT_MAXIMUM_CONNECTION_BUFFER_SIZE: usize = 2000; + +const DEFAULT_STORED_MESSAGE_FILENAME_LENGTH: u16 = 16; +const DEFAULT_MESSAGE_RETRIEVAL_LIMIT: i64 = 100; + +fn de_maybe_port<'de, D>(deserializer: D) -> Result, D::Error> +where + D: Deserializer<'de>, +{ + let port = u16::deserialize(deserializer)?; + if port == 0 { + Ok(None) + } else { + Ok(Some(port)) + } +} + +fn de_maybe_path<'de, D>(deserializer: D) -> Result, D::Error> +where + D: Deserializer<'de>, +{ + let path = PathBuf::deserialize(deserializer)?; + if path.as_os_str().is_empty() { + Ok(None) + } else { + Ok(Some(path)) + } +} + +/// Derive default path to gateway's config directory. +/// It should get resolved to `$HOME/.nym/gateways//config` +pub fn default_config_directory>(id: P) -> PathBuf { + must_get_home() + .join(NYM_DIR) + .join(DEFAULT_GATEWAYS_DIR) + .join(id) + .join(DEFAULT_CONFIG_DIR) +} + +/// Derive default path to gateways's config file. +/// It should get resolved to `$HOME/.nym/gateways//config/config.toml` +pub fn default_config_filepath>(id: P) -> PathBuf { + default_config_directory(id).join(DEFAULT_CONFIG_FILENAME) +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(deny_unknown_fields)] +pub struct ConfigV1_1_30 { + // additional metadata holding on-disk location of this config file + #[serde(skip)] + pub(crate) save_path: Option, + + pub host: nym_node::config::Host, + + #[serde(default)] + pub http: nym_node::config::Http, + + pub gateway: GatewayV1_1_30, + + #[serde(default)] + // currently not really used for anything useful + pub wireguard: WireguardV1_1_30, + + pub storage_paths: GatewayPathsV1_1_30, + + pub network_requester: NetworkRequesterV1_1_30, + + #[serde(default)] + pub logging: LoggingSettingsV1_1_30, + + #[serde(default)] + pub debug: DebugV1_1_30, +} + +impl ConfigV1_1_30 { + pub fn read_from_default_path>(id: P) -> io::Result { + read_config_from_toml_file(default_config_filepath(id)) + } +} + +impl From for Config { + fn from(value: ConfigV1_1_30) -> Self { + Self { + save_path: value.save_path, + host: value.host, + http: value.http, + gateway: Gateway { + version: value.gateway.version, + id: value.gateway.id, + only_coconut_credentials: value.gateway.only_coconut_credentials, + listening_address: value.gateway.listening_address, + mix_port: value.gateway.mix_port, + clients_port: value.gateway.clients_port, + clients_wss_port: value.gateway.clients_wss_port, + enabled_statistics: value.gateway.enabled_statistics, + statistics_service_url: value.gateway.statistics_service_url, + nym_api_urls: value.gateway.nym_api_urls, + nyxd_urls: value.gateway.nyxd_urls, + cosmos_mnemonic: value.gateway.cosmos_mnemonic, + }, + wireguard: nym_node::config::Wireguard { + enabled: value.wireguard.enabled, + bind_address: value.wireguard.bind_address, + announced_port: value.wireguard.announced_port, + storage_paths: nym_node::config::persistence::WireguardPaths { + // no fields (yet) + }, + }, + storage_paths: GatewayPaths { + keys: KeysPaths { + private_identity_key_file: value.storage_paths.keys.private_identity_key_file, + public_identity_key_file: value.storage_paths.keys.public_identity_key_file, + private_sphinx_key_file: value.storage_paths.keys.private_sphinx_key_file, + public_sphinx_key_file: value.storage_paths.keys.public_sphinx_key_file, + }, + clients_storage: value.storage_paths.clients_storage, + network_requester_config: value.storage_paths.network_requester_config, + // \/ ADDED + ip_forwarder_config: Default::default(), + // /\ ADDED + }, + network_requester: NetworkRequester { + enabled: value.network_requester.enabled, + }, + // \/ ADDED + ip_forwarder: Default::default(), + // /\ ADDED + logging: LoggingSettings { + // no fields (yet) + }, + debug: Debug { + packet_forwarding_initial_backoff: value.debug.packet_forwarding_initial_backoff, + packet_forwarding_maximum_backoff: value.debug.packet_forwarding_maximum_backoff, + initial_connection_timeout: value.debug.initial_connection_timeout, + maximum_connection_buffer_size: value.debug.maximum_connection_buffer_size, + presence_sending_delay: value.debug.presence_sending_delay, + stored_messages_filename_length: value.debug.stored_messages_filename_length, + message_retrieval_limit: value.debug.message_retrieval_limit, + use_legacy_framed_packet_version: value.debug.use_legacy_framed_packet_version, + }, + } + } +} + +#[derive(Debug, Deserialize, PartialEq, Eq, Serialize)] +pub struct GatewayV1_1_30 { + /// Version of the gateway for which this configuration was created. + pub version: String, + + /// ID specifies the human readable ID of this particular gateway. + pub id: String, + + /// Indicates whether this gateway is accepting only coconut credentials for accessing the + /// the mixnet, or if it also accepts non-paying clients + #[serde(default)] + pub only_coconut_credentials: bool, + + /// Address to which this mixnode will bind to and will be listening for packets. + pub listening_address: IpAddr, + + /// Port used for listening for all mixnet traffic. + /// (default: 1789) + pub mix_port: u16, + + /// Port used for listening for all client-related traffic. + /// (default: 9000) + pub clients_port: u16, + + /// If applicable, announced port for listening for secure websocket client traffic. + /// (default: None) + #[serde(deserialize_with = "de_maybe_port")] + pub clients_wss_port: Option, + + /// Whether gateway collects and sends anonymized statistics + pub enabled_statistics: bool, + + /// Domain address of the statistics service + pub statistics_service_url: Url, + + /// Addresses to APIs from which the node gets the view of the network. + #[serde(alias = "validator_api_urls")] + pub nym_api_urls: Vec, + + /// Addresses to validators which the node uses to check for double spending of ERC20 tokens. + #[serde(alias = "validator_nymd_urls")] + pub nyxd_urls: Vec, + + /// Mnemonic of a cosmos wallet used in checking for double spending. + // #[deprecated(note = "move to storage")] + // TODO: I don't think this should be stored directly in the config... + pub cosmos_mnemonic: bip39::Mnemonic, +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(default)] +#[serde(deny_unknown_fields)] +pub struct WireguardV1_1_30 { + /// Specifies whether the wireguard service is enabled on this node. + pub enabled: bool, + + /// Socket address this node will use for binding its wireguard interface. + /// default: `0.0.0.0:51820` + pub bind_address: SocketAddr, + + /// Port announced to external clients wishing to connect to the wireguard interface. + /// Useful in the instances where the node is behind a proxy. + pub announced_port: u16, + + /// Paths for wireguard keys, client registries, etc. + pub storage_paths: WireguardPathsV1_1_30, +} + +impl Default for WireguardV1_1_30 { + fn default() -> Self { + Self { + enabled: false, + bind_address: SocketAddr::new( + IpAddr::V4(Ipv4Addr::UNSPECIFIED), + nym_node::config::DEFAULT_WIREGUARD_PORT, + ), + announced_port: nym_node::config::DEFAULT_WIREGUARD_PORT, + storage_paths: WireguardPathsV1_1_30 {}, + } + } +} + +#[derive(Debug, Clone, Deserialize, PartialEq, Eq, Serialize)] +#[serde(deny_unknown_fields)] +pub struct WireguardPathsV1_1_30 { + // pub keys: +} + +#[derive(Debug, Clone, Deserialize, PartialEq, Eq, Serialize)] +#[serde(deny_unknown_fields)] +pub struct GatewayPathsV1_1_30 { + pub keys: KeysPathsV1_1_30, + + /// Path to sqlite database containing all persistent data: messages for offline clients, + /// derived shared keys and available client bandwidths. + #[serde(alias = "persistent_storage")] + pub clients_storage: PathBuf, + + /// Path to the configuration of the embedded network requester. + #[serde(deserialize_with = "de_maybe_path")] + pub network_requester_config: Option, + // pub node_description: PathBuf, + + // pub cosmos_bip39_mnemonic: PathBuf, +} + +#[derive(Debug, Clone, Deserialize, PartialEq, Eq, Serialize)] +pub struct KeysPathsV1_1_30 { + /// Path to file containing private identity key. + pub private_identity_key_file: PathBuf, + + /// Path to file containing public identity key. + pub public_identity_key_file: PathBuf, + + /// Path to file containing private sphinx key. + pub private_sphinx_key_file: PathBuf, + + /// Path to file containing public sphinx key. + pub public_sphinx_key_file: PathBuf, +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(default)] +pub struct NetworkRequesterV1_1_30 { + /// Specifies whether network requester service is enabled in this process. + pub enabled: bool, +} + +#[allow(clippy::derivable_impls)] +impl Default for NetworkRequesterV1_1_30 { + fn default() -> Self { + Self { enabled: false } + } +} + +#[derive(Debug, Default, Clone, Deserialize, PartialEq, Eq, Serialize)] +#[serde(deny_unknown_fields)] +pub struct LoggingSettingsV1_1_30 { + // well, we need to implement something here at some point... +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(default)] +pub struct DebugV1_1_30 { + /// Initial value of an exponential backoff to reconnect to dropped TCP connection when + /// forwarding sphinx packets. + #[serde(with = "humantime_serde")] + pub packet_forwarding_initial_backoff: Duration, + + /// Maximum value of an exponential backoff to reconnect to dropped TCP connection when + /// forwarding sphinx packets. + #[serde(with = "humantime_serde")] + pub packet_forwarding_maximum_backoff: Duration, + + /// Timeout for establishing initial connection when trying to forward a sphinx packet. + #[serde(with = "humantime_serde")] + pub initial_connection_timeout: Duration, + + /// Maximum number of packets that can be stored waiting to get sent to a particular connection. + pub maximum_connection_buffer_size: usize, + + /// Delay between each subsequent presence data being sent. + #[serde(with = "humantime_serde")] + pub presence_sending_delay: Duration, + + /// Length of filenames for new client messages. + pub stored_messages_filename_length: u16, + + /// Number of messages from offline client that can be pulled at once from the storage. + pub message_retrieval_limit: i64, + + /// Specifies whether the mixnode should be using the legacy framing for the sphinx packets. + // it's set to true by default. The reason for that decision is to preserve compatibility with the + // existing nodes whilst everyone else is upgrading and getting the code for handling the new field. + // It shall be disabled in the subsequent releases. + pub use_legacy_framed_packet_version: bool, +} + +impl Default for DebugV1_1_30 { + fn default() -> Self { + Self { + packet_forwarding_initial_backoff: DEFAULT_PACKET_FORWARDING_INITIAL_BACKOFF, + packet_forwarding_maximum_backoff: DEFAULT_PACKET_FORWARDING_MAXIMUM_BACKOFF, + initial_connection_timeout: DEFAULT_INITIAL_CONNECTION_TIMEOUT, + presence_sending_delay: DEFAULT_PRESENCE_SENDING_DELAY, + maximum_connection_buffer_size: DEFAULT_MAXIMUM_CONNECTION_BUFFER_SIZE, + stored_messages_filename_length: DEFAULT_STORED_MESSAGE_FILENAME_LENGTH, + message_retrieval_limit: DEFAULT_MESSAGE_RETRIEVAL_LIMIT, + use_legacy_framed_packet_version: false, + } + } +} From da9d743f39378f9c95b16f76cce689abcedfb1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 12:55:42 +0000 Subject: [PATCH 030/142] [mixnode] replace rocket with axum (#4071) * axum-equivalent mixnode http api routes * replaced all rocket routes with axum equivalents * removed '_axum' suffix from the routes --- Cargo.lock | 4 +- .../mixnode-common/src/verloc/measurement.rs | 8 +-- common/mixnode-common/src/verloc/mod.rs | 2 +- gateway/Cargo.toml | 2 +- mixnode/Cargo.toml | 9 ++- mixnode/src/commands/mod.rs | 1 + mixnode/src/commands/run.rs | 2 +- mixnode/src/commands/sign.rs | 4 +- mixnode/src/error.rs | 11 ++++ mixnode/src/main.rs | 5 +- mixnode/src/node/http/description.rs | 15 +++-- mixnode/src/node/http/hardware.rs | 16 ++--- mixnode/src/node/http/mod.rs | 12 ++-- mixnode/src/node/http/state.rs | 25 ++++++++ mixnode/src/node/http/stats.rs | 41 ++++++++----- mixnode/src/node/http/verloc.rs | 17 ++++-- .../node/listener/connection_handler/mod.rs | 5 +- mixnode/src/node/listener/mod.rs | 3 +- mixnode/src/node/mod.rs | 61 +++++++++++-------- mixnode/src/node/node_statistics.rs | 8 +-- 20 files changed, 159 insertions(+), 92 deletions(-) create mode 100644 mixnode/src/error.rs create mode 100644 mixnode/src/node/http/state.rs diff --git a/Cargo.lock b/Cargo.lock index 614ed8738a..388c0697fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6697,6 +6697,7 @@ name = "nym-mixnode" version = "1.1.31" dependencies = [ "anyhow", + "axum", "bs58 0.4.0", "cfg-if", "clap 4.4.6", @@ -6714,6 +6715,7 @@ dependencies = [ "nym-crypto", "nym-mixnet-client", "nym-mixnode-common", + "nym-node", "nym-nonexhaustive-delayqueue", "nym-pemstore", "nym-sphinx", @@ -6726,10 +6728,10 @@ dependencies = [ "opentelemetry", "pretty_env_logger", "rand 0.7.3", - "rocket", "serde", "serde_json", "sysinfo", + "thiserror", "tokio", "tokio-util", "toml 0.5.11", diff --git a/common/mixnode-common/src/verloc/measurement.rs b/common/mixnode-common/src/verloc/measurement.rs index 6f3d93bb65..a1584dee99 100644 --- a/common/mixnode-common/src/verloc/measurement.rs +++ b/common/mixnode-common/src/verloc/measurement.rs @@ -9,6 +9,7 @@ use std::sync::Arc; use std::time::Duration; use tokio::sync::RwLock; +#[derive(Clone)] pub struct AtomicVerlocResult { inner: Arc>, } @@ -35,13 +36,6 @@ impl AtomicVerlocResult { } } - // this could have also been achieved with a normal #[derive(Clone)] but I prefer to be explicit about it - pub(crate) fn clone_data_pointer(&self) -> Self { - AtomicVerlocResult { - inner: Arc::clone(&self.inner), - } - } - pub(crate) async fn reset_results(&self, new_tested: usize) { let mut write_permit = self.inner.write().await; write_permit.total_tested = new_tested; diff --git a/common/mixnode-common/src/verloc/mod.rs b/common/mixnode-common/src/verloc/mod.rs index 3872f8002e..8fa66e3445 100644 --- a/common/mixnode-common/src/verloc/mod.rs +++ b/common/mixnode-common/src/verloc/mod.rs @@ -226,7 +226,7 @@ impl VerlocMeasurer { } pub fn get_verloc_results_pointer(&self) -> AtomicVerlocResult { - self.results.clone_data_pointer() + self.results.clone() } fn start_listening(&self) -> JoinHandle<()> { diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index b968ee7b7e..c1d6503199 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -52,7 +52,7 @@ tokio = { workspace = true, features = [ tokio-stream = { version = "0.1.11", features = ["fs"] } tokio-tungstenite = { version = "0.20.1" } tokio-util = { version = "0.7.4", features = ["codec"] } -url = { version = "2.2", features = ["serde"] } +url = { workspace = true, features = ["serde"] } zeroize = { workspace = true } # internal diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 37268c654d..39061c4ca4 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -16,6 +16,7 @@ rust-version = "1.58.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +axum = { workspace = true } anyhow = "1.0.40" bs58 = "0.4.0" clap = { version = "4.0", features = ["cargo", "derive"] } @@ -28,22 +29,24 @@ lazy_static = "1.4.0" log = { workspace = true } pretty_env_logger = "0.4.0" rand = "0.7.3" -rocket = { version = "0.5.0-rc.2", features = ["json"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } sysinfo = "0.27.7" tokio = { version = "1.21.2", features = ["rt-multi-thread", "net", "signal"] } tokio-util = { version = "0.7.3", features = ["codec"] } toml = "0.5.8" -url = { version = "2.2", features = ["serde"] } +url = { workspace = true, features = ["serde"] } cfg-if = "1.0.0" +thiserror = { workspace = true } ## tracing tracing = { version = "0.1.37", optional = true } opentelemetry = { version = "0.19.0", optional = true } -## internal +# internal +nym-node = { path = "../nym-node" } + nym-config = { path = "../common/config" } nym-crypto = { path = "../common/crypto" } nym-contracts-common = { path = "../common/cosmwasm-smart-contracts/contracts-common" } diff --git a/mixnode/src/commands/mod.rs b/mixnode/src/commands/mod.rs index e79df8e2ab..17a2bd3a59 100644 --- a/mixnode/src/commands/mod.rs +++ b/mixnode/src/commands/mod.rs @@ -7,6 +7,7 @@ use anyhow::anyhow; use clap::CommandFactory; use clap::Subcommand; use colored::Colorize; +use log::{error, info, warn}; use nym_bin_common::completions::{fig_generate, ArgShell}; use nym_bin_common::version_checker; use nym_config::defaults::var_names::{BECH32_PREFIX, NYM_API}; diff --git a/mixnode/src/commands/run.rs b/mixnode/src/commands/run.rs index f617494aad..0fded783b8 100644 --- a/mixnode/src/commands/run.rs +++ b/mixnode/src/commands/run.rs @@ -6,11 +6,11 @@ use crate::commands::{override_config, try_load_current_config, version_check}; use crate::node::MixNode; use anyhow::bail; use clap::Args; +use log::error; use nym_bin_common::output_format::OutputFormat; use nym_config::helpers::SPECIAL_ADDRESSES; use nym_validator_client::nyxd; use std::net::IpAddr; - #[derive(Args, Clone)] pub(crate) struct Run { /// Id of the nym-mixnode we want to run diff --git a/mixnode/src/commands/sign.rs b/mixnode/src/commands/sign.rs index 8c10bdb995..9650f53273 100644 --- a/mixnode/src/commands/sign.rs +++ b/mixnode/src/commands/sign.rs @@ -5,15 +5,13 @@ use crate::commands::{try_load_current_config, validate_bech32_address_or_exit}; use crate::node::MixNode; use anyhow::{bail, Result}; use clap::{ArgGroup, Args}; +use log::error; use nym_bin_common::output_format::OutputFormat; use nym_crypto::asymmetric::identity; use nym_types::helpers::ConsoleSigningOutput; use nym_validator_client::nyxd; use std::convert::TryFrom; -#[cfg(feature = "cpucycles")] -use tracing::error; - use super::version_check; #[derive(Args, Clone)] diff --git a/mixnode/src/error.rs b/mixnode/src/error.rs new file mode 100644 index 0000000000..a0ee647852 --- /dev/null +++ b/mixnode/src/error.rs @@ -0,0 +1,11 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use thiserror::Error; + +#[derive(Debug, Error)] +pub(crate) enum MixnodeError { + // TODO: in the future this should work the other way, i.e. NymNode depending on Gateway errors + #[error(transparent)] + NymNodeError(#[from] nym_node::error::NymNodeError), +} diff --git a/mixnode/src/main.rs b/mixnode/src/main.rs index bdda653edf..34ca2d613f 100644 --- a/mixnode/src/main.rs +++ b/mixnode/src/main.rs @@ -1,12 +1,10 @@ // Copyright 2020-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -#[macro_use] -extern crate rocket; - use ::nym_config::defaults::setup_env; use clap::{crate_name, crate_version, Parser}; use lazy_static::lazy_static; +use log::info; use nym_bin_common::bin_info; #[allow(unused_imports)] @@ -20,6 +18,7 @@ use tracing::instrument; mod commands; mod config; +pub(crate) mod error; mod node; lazy_static! { diff --git a/mixnode/src/node/http/description.rs b/mixnode/src/node/http/description.rs index 3c37014645..7c6ec2b580 100644 --- a/mixnode/src/node/http/description.rs +++ b/mixnode/src/node/http/description.rs @@ -1,9 +1,14 @@ use crate::node::node_description::NodeDescription; -use rocket::serde::json::Json; -use rocket::State; +use axum::extract::Query; +use nym_node::http::api::{FormattedResponse, OutputParams}; /// Returns a description of the node and why someone might want to delegate stake to it. -#[get("/description")] -pub(crate) fn description(description: &State) -> Json { - Json(description.inner().clone()) +pub(crate) async fn description( + description: NodeDescription, + Query(output): Query, +) -> MixnodeDescriptionResponse { + let output = output.output.unwrap_or_default(); + output.to_response(description) } + +pub type MixnodeDescriptionResponse = FormattedResponse; diff --git a/mixnode/src/node/http/hardware.rs b/mixnode/src/node/http/hardware.rs index 57e2e68bbf..c4e24b4911 100644 --- a/mixnode/src/node/http/hardware.rs +++ b/mixnode/src/node/http/hardware.rs @@ -1,10 +1,11 @@ +use axum::extract::Query; use cupid::TopologyType; -use rocket::serde::{json::Json, Serialize}; +use nym_node::http::api::{FormattedResponse, OutputParams}; +use serde::Serialize; use sysinfo::{System, SystemExt}; #[derive(Serialize, Debug)] -#[serde(crate = "rocket::serde")] -pub(crate) struct Hardware { +pub struct Hardware { ram: String, num_cores: usize, crypto_hardware: Option, @@ -12,7 +13,6 @@ pub(crate) struct Hardware { #[allow(clippy::struct_excessive_bools)] #[derive(Serialize, Debug)] -#[serde(crate = "rocket::serde")] pub(crate) struct CryptoHardware { aesni: bool, avx2: bool, @@ -24,11 +24,13 @@ pub(crate) struct CryptoHardware { } /// Provides hardware information which Nym can use to optimize mixnet speed over time (memory, crypto hardware, CPU, cores, etc). -#[get("/hardware")] -pub(crate) fn hardware() -> Json> { - Json(hardware_info()) +pub(crate) async fn hardware(Query(output): Query) -> MixnodeHardwareResponse { + let output = output.output.unwrap_or_default(); + output.to_response(hardware_info()) } +pub type MixnodeHardwareResponse = FormattedResponse>; + /// Gives back a summary report of whatever system hardware info we can get for this platform. fn hardware_info() -> Option { let crypto_hardware = hardware_info_from_cupid(); diff --git a/mixnode/src/node/http/mod.rs b/mixnode/src/node/http/mod.rs index f92212b9aa..ddedce8215 100644 --- a/mixnode/src/node/http/mod.rs +++ b/mixnode/src/node/http/mod.rs @@ -1,11 +1,15 @@ pub(crate) mod description; pub(crate) mod hardware; +pub(crate) mod state; pub(crate) mod stats; pub(crate) mod verloc; -use rocket::Request; +use axum::http::{StatusCode, Uri}; +use axum::response::IntoResponse; -#[catch(404)] -pub(crate) fn not_found(req: &Request<'_>) -> String { - format!("I couldn't find '{}'. Try something else?", req.uri()) +pub(crate) async fn not_found(uri: Uri) -> impl IntoResponse { + ( + StatusCode::NOT_FOUND, + format!("I couldn't find '{uri}'. Try something else?"), + ) } diff --git a/mixnode/src/node/http/state.rs b/mixnode/src/node/http/state.rs new file mode 100644 index 0000000000..4cc3e7b8d6 --- /dev/null +++ b/mixnode/src/node/http/state.rs @@ -0,0 +1,25 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::node::http::verloc::VerlocState; +use crate::node::node_statistics::SharedNodeStats; +use axum::extract::FromRef; + +// this is a temporary thing for the transition period +#[derive(Clone)] +pub(crate) struct MixnodeAppState { + pub(crate) verloc: VerlocState, + pub(crate) stats: SharedNodeStats, +} + +impl FromRef for VerlocState { + fn from_ref(app_state: &MixnodeAppState) -> Self { + app_state.verloc.clone() + } +} + +impl FromRef for SharedNodeStats { + fn from_ref(app_state: &MixnodeAppState) -> Self { + app_state.stats.clone() + } +} diff --git a/mixnode/src/node/http/stats.rs b/mixnode/src/node/http/stats.rs index c285954cb9..093932288a 100644 --- a/mixnode/src/node/http/stats.rs +++ b/mixnode/src/node/http/stats.rs @@ -1,29 +1,38 @@ use crate::node::node_statistics::{NodeStats, NodeStatsSimple, SharedNodeStats}; -use rocket::serde::json::Json; -use rocket::State; -use serde::Serialize; +use axum::extract::{Query, State}; +use nym_node::http::api::{FormattedResponse, Output}; +use serde::{Deserialize, Serialize}; #[derive(Serialize)] #[serde(untagged)] -pub(crate) enum NodeStatsResponse { +pub enum NodeStatsResponse { Full(NodeStats), Simple(NodeStatsSimple), } -/// Returns a running stats of the node. -#[get("/stats?")] pub(crate) async fn stats( - stats: &State, - debug: Option, -) -> Json { + Query(params): Query, + State(stats): State, +) -> MixnodeStatsResponse { + let output = params.output.unwrap_or_default(); + let snapshot_data = stats.clone_data().await; // there's no point in returning the entire hashmap of sending destinations in regular mode - if let Some(debug) = debug { - if debug { - return Json(NodeStatsResponse::Full(snapshot_data)); - } - } - - Json(NodeStatsResponse::Simple(snapshot_data.simplify())) + let response = if params.debug { + NodeStatsResponse::Full(snapshot_data) + } else { + NodeStatsResponse::Simple(snapshot_data.simplify()) + }; + output.to_response(response) +} + +pub type MixnodeStatsResponse = FormattedResponse; + +#[derive(Default, Debug, Serialize, Deserialize, Copy, Clone)] +// #[derive(Default, Debug, Serialize, Deserialize, Copy, Clone, IntoParams, ToSchema)] +#[serde(default)] +pub(crate) struct StatsQueryParams { + debug: bool, + pub output: Option, } diff --git a/mixnode/src/node/http/verloc.rs b/mixnode/src/node/http/verloc.rs index ff26a1b52d..1848f48f6c 100644 --- a/mixnode/src/node/http/verloc.rs +++ b/mixnode/src/node/http/verloc.rs @@ -1,7 +1,8 @@ +use axum::extract::{Query, State}; use nym_mixnode_common::verloc::{AtomicVerlocResult, VerlocResult}; -use rocket::serde::json::Json; -use rocket::State; +use nym_node::http::api::{FormattedResponse, OutputParams}; +#[derive(Clone)] pub(crate) struct VerlocState { shared: AtomicVerlocResult, } @@ -16,8 +17,12 @@ impl VerlocState { /// Provides verifiable location (verloc) measurements for this mixnode - a list of the /// round-trip times, in milliseconds, for all other mixnodes that this node knows about. -#[get("/verloc")] -pub(crate) async fn verloc(state: &State) -> Json { - // since it's impossible to get a mutable reference to the state, we can't cache any results outside the lock : ( - Json(state.shared.clone_data().await) +pub(crate) async fn verloc( + State(verloc): State, + Query(output): Query, +) -> MixnodeVerlocResponse { + let output = output.output.unwrap_or_default(); + output.to_response(verloc.shared.clone_data().await) } + +pub type MixnodeVerlocResponse = FormattedResponse; diff --git a/mixnode/src/node/listener/connection_handler/mod.rs b/mixnode/src/node/listener/connection_handler/mod.rs index 733d2660f8..8d0895cbea 100644 --- a/mixnode/src/node/listener/connection_handler/mod.rs +++ b/mixnode/src/node/listener/connection_handler/mod.rs @@ -7,6 +7,8 @@ use crate::node::listener::connection_handler::packet_processing::{ use crate::node::packet_delayforwarder::PacketDelayForwardSender; use crate::node::TaskClient; use futures::StreamExt; +use log::debug; +use log::{error, info, warn}; use nym_mixnode_common::measure; use nym_sphinx::forwarding::packet::MixPacket; use nym_sphinx::framing::codec::NymCodec; @@ -16,8 +18,9 @@ use std::net::SocketAddr; use tokio::net::TcpStream; use tokio::time::Instant; use tokio_util::codec::Framed; + #[cfg(feature = "cpucycles")] -use tracing::{error, info, instrument}; +use tracing::instrument; pub(crate) mod packet_processing; diff --git a/mixnode/src/node/listener/mod.rs b/mixnode/src/node/listener/mod.rs index f8fad07b23..fc553b41ed 100644 --- a/mixnode/src/node/listener/mod.rs +++ b/mixnode/src/node/listener/mod.rs @@ -2,12 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 use crate::node::listener::connection_handler::ConnectionHandler; +use log::{error, info, warn}; use std::net::SocketAddr; use std::process; use tokio::net::TcpListener; use tokio::task::JoinHandle; -#[cfg(feature = "cpucycles")] -use tracing::error; use super::TaskClient; diff --git a/mixnode/src/node/mod.rs b/mixnode/src/node/mod.rs index 98b0c769dc..a73c5a10a4 100644 --- a/mixnode/src/node/mod.rs +++ b/mixnode/src/node/mod.rs @@ -2,23 +2,26 @@ // SPDX-License-Identifier: Apache-2.0 use crate::config::Config; -use crate::node::http::{ - description::description, - hardware::hardware, - not_found, - stats::stats, - verloc::{verloc as verloc_route, VerlocState}, -}; +use crate::node::http::description::description; +use crate::node::http::hardware::hardware; +use crate::node::http::not_found; +use crate::node::http::state::MixnodeAppState; +use crate::node::http::stats::stats; +use crate::node::http::verloc::{verloc, VerlocState}; use crate::node::listener::connection_handler::packet_processing::PacketProcessor; use crate::node::listener::connection_handler::ConnectionHandler; use crate::node::listener::Listener; use crate::node::node_description::NodeDescription; use crate::node::node_statistics::SharedNodeStats; use crate::node::packet_delayforwarder::{DelayForwarder, PacketDelayForwardSender}; +use axum::routing::get; +use axum::Router; +use log::{error, info, warn}; use nym_bin_common::output_format::OutputFormat; use nym_bin_common::version_checker::parse_version; use nym_crypto::asymmetric::{encryption, identity}; use nym_mixnode_common::verloc::{self, AtomicVerlocResult, VerlocMeasurer}; +use nym_node::http::middleware::logging; use nym_task::{TaskClient, TaskManager}; use rand::seq::SliceRandom; use rand::thread_rng; @@ -26,9 +29,6 @@ use std::net::SocketAddr; use std::process; use std::sync::Arc; -#[cfg(feature = "cpucycles")] -use tracing::{error, info, warn}; - mod http; mod listener; pub(crate) mod node_description; @@ -99,29 +99,36 @@ impl MixNode { atomic_verloc_result: AtomicVerlocResult, node_stats_pointer: SharedNodeStats, ) { - info!( - "Starting HTTP API on http://{}:{}", - self.config.mixnode.listening_address, self.config.mixnode.http_api_port + let bind_address = SocketAddr::new( + self.config.mixnode.listening_address, + self.config.mixnode.http_api_port, ); - let mut config = rocket::config::Config::release_default(); + info!("Starting HTTP API on http://{bind_address}",); - // bind to the same address as we are using for mixnodes - config.address = self.config.mixnode.listening_address; - config.port = self.config.mixnode.http_api_port; + let state = MixnodeAppState { + verloc: VerlocState::new(atomic_verloc_result), + stats: node_stats_pointer, + }; - let verloc_state = VerlocState::new(atomic_verloc_result); - let descriptor = self.descriptor.clone(); + let router = Router::new() + .route("/verloc", get(verloc)) + .route( + "/description", + get({ + let descriptor = self.descriptor.clone(); + move |query| description(descriptor, query) + }), + ) + .route("/stats", get(stats)) + .route("/hardware", get(hardware)) + .fallback(not_found) + .layer(axum::middleware::from_fn(logging::logger)) + .with_state(state); tokio::spawn(async move { - rocket::build() - .configure(config) - .mount("/", routes![verloc_route, description, stats, hardware]) - .register("/", catchers![not_found]) - .manage(verloc_state) - .manage(descriptor) - .manage(node_stats_pointer) - .launch() + axum::Server::bind(&bind_address) + .serve(router.into_make_service_with_connect_info::()) .await }); } diff --git a/mixnode/src/node/node_statistics.rs b/mixnode/src/node/node_statistics.rs index 2187d77a91..72f85c6001 100644 --- a/mixnode/src/node/node_statistics.rs +++ b/mixnode/src/node/node_statistics.rs @@ -1,6 +1,8 @@ +use super::TaskClient; use futures::channel::mpsc; use futures::lock::Mutex; use futures::StreamExt; +use log::{debug, info, trace}; use serde::Serialize; use std::collections::HashMap; use std::ops::DerefMut; @@ -9,8 +11,6 @@ use std::sync::Arc; use std::time::{Duration, SystemTime}; use tokio::sync::{RwLock, RwLockReadGuard}; -use super::TaskClient; - // convenience aliases type PacketsMap = HashMap; type PacketDataReceiver = mpsc::UnboundedReceiver; @@ -80,7 +80,7 @@ impl SharedNodeStats { } #[derive(Serialize, Clone)] -pub(crate) struct NodeStats { +pub struct NodeStats { #[serde(serialize_with = "humantime_serde::serialize")] update_time: SystemTime, @@ -126,7 +126,7 @@ impl NodeStats { } #[derive(Serialize, Clone)] -pub(crate) struct NodeStatsSimple { +pub struct NodeStatsSimple { #[serde(serialize_with = "humantime_serde::serialize")] update_time: SystemTime, From aa02f33addb6c2bee4e32b75dc47074a7c6fca04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Mon, 30 Oct 2023 15:01:47 +0100 Subject: [PATCH 031/142] No need to show setup-ip-forwarder just yet --- gateway/src/commands/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/gateway/src/commands/mod.rs b/gateway/src/commands/mod.rs index f51fd011d2..83cde5302b 100644 --- a/gateway/src/commands/mod.rs +++ b/gateway/src/commands/mod.rs @@ -34,6 +34,7 @@ pub(crate) enum Commands { /// Add ip forwarder support to this gateway // essentially an option to include ip forwarder without having to setup fresh gateway + #[command(hide = true)] SetupIpForwarder(setup_ip_forwarder::CmdArgs), /// Sign text to prove ownership of this mixnode From 2084095773c264159321213046c4f8e4139c8c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Walther?= Date: Mon, 30 Oct 2023 16:42:40 +0100 Subject: [PATCH 032/142] Update security disclosure process --- SECURITY.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index dac44ded6c..c3b9bb9748 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,8 +1,90 @@ Critical bug or security issue 💥 -If you're here because you're trying to figure out how to notify us of a security issue, go to Discord or Matrix, and alert the core engineers: +If you're here because you're trying to figure out how to notify us of a security issue, send us a PGP encrypted email to: - Jedrzej Stuczynski, discord: "Jedrzej | Nym#5666" , matrix: @jstuczyn:nymtech.chat - Mark Sinclair | discord: marknym#8088 , matrix: @mark:nymtech.chat +``` +security@nymte.ch +``` + +Encrypted with our public key which is available below in plain text and also on keyservers: + +``` +pub rsa4096 2023-10-30 [SC] [expire : 2026-10-29] + 24B2592E801A5AAA8666C8BA7C3C727F05090550 +uid [ ultime ] Security Nym Technologies +sub rsa4096 2023-10-30 [E] [expire : 2026-10-29] + +``` + +The fingerprint of the key is on the second line above. + +If you need to chat __urgently__ to our team for a __critical__ security issue: + +go to Matrix, and alert the core engineers with a private direct message: + + Jedrzej Stuczynski @jstuczyn:nymtech.chat + Mark Sinclair @mark:nymtech.chat + Raphaël Walther @raphael:nymtech.chat Please avoid opening public issues on GitHub that contain information about a potential security vulnerability as this makes it difficult to reduce the impact and harm of valid security issues. + +If you don't know what Matrix is, you can follow this documentation to create an account on this federation of instant messaging servers: + +[Matrix for Instant Messaging](https://matrix.org/docs/chat_basics/matrix-for-im/) + + + +``` +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGU/XpcBEAC+ykz0yxn8FferjEBooptXlOH/v/28aa0Nv8DfImTgj9BNY5cR +UdLk+Wa3CSXQVE7PIsi0egEjAMfyxPEywbvPlgklW4XAKDVUCf3gxpQNN47VuVgV +VwrN0VBurhhIKoEw9daO6A0P44+6nmXGIfUulCr4fMxYq82SOooog/j5w0/LfITu +rQXxVABLkXHGN/NGf4BE52QI/ppeXWoshlNVU1wdZIIYWwte+9ukikWpN+LYfJUR +ybtyCjQ4Gdf8ap1GmkKHmAru24wbUuFsBWGVgHsXAwYlKxyiNGR9YwgAxmFk6vNf +1PqKGO3i4erx5X/+mzylzNbFlCqFuksZRyUSDZvQ8fxkm8ra1zWbO38eOTp8Vhgg +SKfRTzOKeZYURZicJPxmEIfA88U4tx+YWJ54YWT/gERZkjIJL5mzIuY9UulVvKUM +vMFUIzBMHOPXH16036zGyFMC1esRd2qqil4b9KtLgCOkrD1VgpjcveoA0VyMJCN6 +LmKTrVjwjjDMxby+d49BolRWGnCofXozXwvNQx+CYv8M2WPErTpyYoofYFtpqr7A +fIufc/e0+um3zoGIbHejrhsbuH9Qf+MKsI+Ng93bdDtjeHz6MEgAlsTm0qeizYpj +IyKZIObPmfvrAm08hFZ8JnGk+XuooF36XWbJYjCCy0bOyMw1r7ZG99TcSwARAQAB +tC1TZWN1cml0eSBOeW0gVGVjaG5vbG9naWVzIDxzZWN1cml0eUBueW10ZS5jaD6J +AlQEEwEKAD4WIQQkslkugBpaqoZmyLp8PHJ/BQkFUAUCZT9elwIbAwUJBaOagAUL +CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8PHJ/BQkFUL7dD/9zO73uI5VR+SWx +PFmJW+9QsPiQbVRvGwNZurctmQ2s2Pe0vHRELFeqD5oYvSx2Lequ3Ir+zn/C3kDM +kNs40obSL6jCBiLPkxEY0JqzPM9jZr7EjvlibWV3f6DxooRIqEyfN57I3OBGlqZE +0Mx7sQuCcgau8C70DF952QhKUwXC2cmpmDKHVEEoio1xGSD4dQhGapCB32RQGtna +OGfAO9celNMvSq0Lp+aJxeACmWFY5T4/y79JPcT5vSs/yEIRmaH/fn2piwaFBsIq +gHJJMxO3740P1hF8j7KWUoUofuFaEALHBpEpjWTOj8ej1wmFlu+5F+jSVoc781Wb +ZZXu04cOBXnGTogzSxMpBe9TtLb28zd6WzFotC25KTI3pngMzXsQGLJLOwvoZKiS +LFjPRjg1rwobmB3Q3J2W5GYSveia0CDsZGP+g87GVVf/oD2Djpa68xyVYwIYeA6T +3DNdS77qHiRuGiS4kWXyVjDqOICboR4uCvt09zlkBuLDdTWqWYARUvZjtjs4w/Ol +rdrBI3A88ti8fRldYaNpu17ME1ilpN44yKoJtqiWc3Tisk8eYLfx6c7FQF3PrRva +mr7FZvhFsYML5CeNFHTEzN6Y3jjKN/60DvCfodWnWFK47Txkl8UAXGY2W9B0fWqQ +wUVr8uLuMyyMiKbeoufi7rGOj6AMErkCDQRlP16XARAA8FGmD5J3tM1BOM1niJxZ +JTdCauzEtxEoBL0RuqGBkR8U29sRM6DwuzjU7PwscFnBaGyU+eU73GwGkH3ozFfF +tllYhQrhP/kkN+0rEO5Xi+nR+4JCFRqrf3nJXAAPfiksURMp8er1dUOY2/e1ZSoL +tS+nzUivV8CfE+pgj/5YtGwPC+KYHLATkKkMELCrbW4UO06VWOqQsvr6kivXuJQQ +LdEAMpBlADmXFG45DmPKQzsBWUgvTwyGy3LX0nys8cgpex9BH8hhr01QmGyP469s +N3cNrtFuu8U6RAsiCD/8mlBuD3EQEU5SF0lc7kCICAZk+wElmXnimEi0TOYsbz6k +90lteicX70rA9GNeyI76H+VSOYvWpkRwaJAgUdzrAM1o9SHASq+cZ6nD85OZioQk +DWM6+Q+sf2oen0qJnnGmUr93kJIC0PIdgrXRrtiNfeRa1Z/H0LmREyyEMoFiVivn +z1vVk85Oq6Sf3ltUwvmDzuuJOtsp2Qp6+x6Snn/yKauI4uf4Cf/wKUch4r6Bwgg5 +Dw49ky7lwlnALio4GIVoGLpLef93wWoDmp4Klyh3ZPf2nB0U91u3bHRUo7m+D7QJ +98cyKtqLLzjg7szGf60pIWNWRsadYQT3bSncynqknAjOV3BCvx6/ivsnpj//QjYR +HtviUAcQ1DBB6UC6q23FIs0AEQEAAYkCPAQYAQoAJhYhBCSyWS6AGlqqhmbIunw8 +cn8FCQVQBQJlP16XAhsMBQkFo5qAAAoJEHw8cn8FCQVQzukP/iLxjOxT+UpPR//c +prDVSLkP4pF5bmw36U07jvqpS+/KTXsxiiQleffRabOpNLcd+K1ueavyt9nnIwHH +tHS9kM9A7DBw3LnpEbXki46QDCCI6niGijlLOEeAWqnocwMNTT05wVVgCtO3DQP2 +MoSCcqHpXDChvOyr5d5xjYLVJhlctIMSomcVzGryjknPu0Yj/TkC/4c+m86ZWQUD +HqMHQIuiEenvb62/F4c5OJIRZPEn70wdddkgJuJU3eHdHrnuhCkjCC93GQGbGj03 +Zqos6699y6hmPeD3U5IUv8ujwZYVCCuDm8gJfrp3R6WLfeZeK9WmTVBpCzsDg3fV +hSwmOk6pp8DAq1/Dev3yRkFggCEyGK6c9b+a0CRBncl8e5Q0QQIzNiS/uExQP3h+ +ELJs3P0MLP+6FWhNUry09n3lnWkr1hY+v1M0GAxbfdv/tsCN1Pq/VQEz+CTqXqya +ftWldOHWw6Hh+gtwxcHjG4MBOrO5oICQ3lh2hGwQ58cDgZYSK/OGgJ9BggFl1CcM +0uGC0/TRCI1zt/4y+7efSZQMZkHo7VC/3MFbp2hcNejpW+BxVuwKTunFvWK3TLhq +sSlQ5yyhqchooepsFHq9bosKFjLJC01uprBv1rinoNduOy43FbyS7JPRRspANN0R +iC2pMbWdE0ZTQaFq6tPIg058pjqi +=nqgX +-----END PGP PUBLIC KEY BLOCK----- +``` From f6f2cd7e170634d5f72d7b792a4c6b3fccf29d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 16:13:05 +0000 Subject: [PATCH 033/142] unified native, socks5, NR client inits --- Cargo.lock | 53 ++--- Cargo.toml | 1 + clients/native/Cargo.toml | 4 +- clients/native/src/client/config/mod.rs | 20 ++ clients/native/src/commands/init.rs | 202 +++++------------ clients/socks5/Cargo.toml | 4 +- clients/socks5/src/commands/init.rs | 205 +++++------------ clients/socks5/src/config/mod.rs | 20 ++ common/bin-common/Cargo.toml | 2 +- common/client-core/Cargo.toml | 2 + common/client-core/src/error.rs | 21 ++ common/client-core/src/init/client_init.rs | 201 +++++++++++++++++ common/client-core/src/init/mod.rs | 1 + common/client-core/src/init/types.rs | 16 +- common/commands/Cargo.toml | 2 +- ephemera/Cargo.toml | 2 +- explorer-api/Cargo.toml | 2 +- gateway/Cargo.toml | 2 +- mixnode/Cargo.toml | 2 +- nym-api/Cargo.toml | 2 +- nym-connect/desktop/Cargo.lock | 26 +-- nym-wallet/Cargo.lock | 36 +-- .../network-requester/Cargo.toml | 4 +- .../network-requester/src/cli/init.rs | 209 +++++------------- .../network-requester/src/cli/mod.rs | 2 +- .../network-requester/src/config/mod.rs | 20 ++ tools/internal/sdk-version-bump/Cargo.toml | 2 +- tools/nym-cli/Cargo.toml | 2 +- tools/nym-nr-query/Cargo.toml | 2 +- 29 files changed, 534 insertions(+), 533 deletions(-) create mode 100644 common/client-core/src/init/client_init.rs diff --git a/Cargo.lock b/Cargo.lock index 388c0697fa..63ef8aef35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1158,7 +1158,7 @@ checksum = "f769ab9e8c1652d78dd0b3ec59cdaa1e2bcb3b6b39f6681b256abcdbe101cc14" dependencies = [ "anyhow", "cargo_metadata", - "clap 4.4.6", + "clap 4.4.7", "concolor-control", "crates-index", "dirs-next", @@ -1393,9 +1393,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.6" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", @@ -1403,13 +1403,13 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.6" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.1", + "clap_lex 0.6.0", "strsim", "terminal_size", ] @@ -1420,7 +1420,7 @@ version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3ae8ba90b9d8b007efe66e55e48fb936272f5ca00349b5b0e89877520d35ea7" dependencies = [ - "clap 4.4.6", + "clap 4.4.7", ] [[package]] @@ -1429,15 +1429,15 @@ version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29bdbe21a263b628f83fcbeac86a4416a1d588c7669dd41473bc4149e4e7d2f1" dependencies = [ - "clap 4.4.6", + "clap 4.4.7", "clap_complete", ] [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -1456,9 +1456,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cloudabi" @@ -2871,7 +2871,7 @@ dependencies = [ "bytes", "cfg-if", "chrono", - "clap 4.4.6", + "clap 4.4.7", "config", "digest 0.10.7", "dirs 5.0.1", @@ -2941,7 +2941,7 @@ name = "explorer-api" version = "1.1.30" dependencies = [ "chrono", - "clap 4.4.6", + "clap 4.4.7", "dotenvy", "humantime-serde", "isocountry", @@ -5961,7 +5961,7 @@ dependencies = [ "bs58 0.4.0", "cfg-if", "chrono", - "clap 4.4.6", + "clap 4.4.7", "console-subscriber", "cosmwasm-std", "cw-utils", @@ -6066,7 +6066,7 @@ name = "nym-bin-common" version = "0.6.0" dependencies = [ "atty", - "clap 4.4.6", + "clap 4.4.7", "clap_complete", "clap_complete_fig", "log", @@ -6107,7 +6107,7 @@ dependencies = [ "base64 0.13.1", "bip39", "bs58 0.4.0", - "clap 4.4.6", + "clap 4.4.7", "clap_complete", "clap_complete_fig", "dotenvy", @@ -6132,7 +6132,7 @@ dependencies = [ "bip39", "bs58 0.4.0", "cfg-if", - "clap 4.4.6", + "clap 4.4.7", "comfy-table", "cosmrs", "cosmwasm-std", @@ -6176,7 +6176,7 @@ dependencies = [ name = "nym-client" version = "1.1.30" dependencies = [ - "clap 4.4.6", + "clap 4.4.7", "dirs 4.0.0", "futures", "lazy_static", @@ -6215,6 +6215,7 @@ dependencies = [ "async-trait", "base64 0.21.4", "cfg-if", + "clap 4.4.7", "dashmap", "dirs 4.0.0", "futures", @@ -6523,7 +6524,7 @@ dependencies = [ "atty", "bip39", "bs58 0.4.0", - "clap 4.4.6", + "clap 4.4.7", "colored", "dashmap", "dirs 4.0.0", @@ -6700,7 +6701,7 @@ dependencies = [ "axum", "bs58 0.4.0", "cfg-if", - "clap 4.4.6", + "clap 4.4.7", "colored", "cpu-cycles", "cupid", @@ -6820,7 +6821,7 @@ dependencies = [ "async-file-watcher", "async-trait", "bs58 0.4.0", - "clap 4.4.6", + "clap 4.4.7", "dirs 4.0.0", "futures", "humantime-serde", @@ -6982,7 +6983,7 @@ name = "nym-nr-query" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.6", + "clap 4.4.7", "log", "nym-bin-common", "nym-network-defaults", @@ -7107,7 +7108,7 @@ dependencies = [ name = "nym-socks5-client" version = "1.1.30" dependencies = [ - "clap 4.4.6", + "clap 4.4.7", "lazy_static", "log", "nym-bin-common", @@ -9534,7 +9535,7 @@ version = "0.1.0" dependencies = [ "anyhow", "cargo-edit", - "clap 4.4.6", + "clap 4.4.7", "semver 1.0.20", "serde", "serde_json", @@ -10296,7 +10297,7 @@ name = "ssl-inject" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.6", + "clap 4.4.7", "hex", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 802b81f89e..d7771a2d17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -138,6 +138,7 @@ axum = "0.6.20" base64 = "0.21.4" bip39 = { version = "2.0.0", features = ["zeroize"] } boringtun = { git = "https://github.com/cloudflare/boringtun", rev = "e1d6360d6ab4529fc942a078e4c54df107abe2ba" } +clap = "4.4.7" cfg-if = "1.0.0" cosmwasm-derive = "=1.3.0" cosmwasm-schema = "=1.3.0" diff --git a/clients/native/Cargo.toml b/clients/native/Cargo.toml index 57df3570b3..4f714aeaef 100644 --- a/clients/native/Cargo.toml +++ b/clients/native/Cargo.toml @@ -20,7 +20,7 @@ futures = { workspace = true } # bunch of futures stuff, however, now that I thi # and the single instance of abortable we have should really be refactored anyway url = { workspace = true } -clap = { version = "4.0", features = ["cargo", "derive"] } +clap = { workspace = true, features = ["cargo", "derive"] } dirs = "4.0" lazy_static = "1.4.0" log = { workspace = true } # self explanatory @@ -36,7 +36,7 @@ tokio-tungstenite = { workspace = true } ## internal nym-bandwidth-controller = { path = "../../common/bandwidth-controller" } nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] } -nym-client-core = { path = "../../common/client-core", features = ["fs-surb-storage"] } +nym-client-core = { path = "../../common/client-core", features = ["fs-surb-storage", "cli"] } nym-coconut-interface = { path = "../../common/coconut-interface" } nym-config = { path = "../../common/config" } nym-credential-storage = { path = "../../common/credential-storage" } diff --git a/clients/native/src/client/config/mod.rs b/clients/native/src/client/config/mod.rs index 4f57387ceb..65185e579e 100644 --- a/clients/native/src/client/config/mod.rs +++ b/clients/native/src/client/config/mod.rs @@ -16,8 +16,10 @@ use std::net::{IpAddr, Ipv4Addr}; use std::path::{Path, PathBuf}; use std::str::FromStr; +use nym_client_core::config::disk_persistence::CommonClientPaths; pub use nym_client_core::config::Config as BaseClientConfig; pub use nym_client_core::config::{DebugConfig, GatewayEndpointConfig}; +use nym_client_core::init::client_init::ClientConfig; pub mod old_config_v1_1_13; pub mod old_config_v1_1_20; @@ -72,6 +74,24 @@ impl NymConfigTemplate for Config { } } +impl ClientConfig for Config { + fn common_paths(&self) -> &CommonClientPaths { + &self.storage_paths.common_paths + } + + fn core_config(&self) -> &BaseClientConfig { + &self.base + } + + fn default_store_location(&self) -> PathBuf { + self.default_location() + } + + fn save_to>(&self, path: P) -> io::Result<()> { + save_formatted_config_to_file(self, path) + } +} + impl Config { pub fn new>(id: S) -> Self { Config { diff --git a/clients/native/src/commands/init.rs b/clients/native/src/commands/init.rs index 0fc27590dd..8c9edeec2a 100644 --- a/clients/native/src/commands/init.rs +++ b/clients/native/src/commands/init.rs @@ -12,55 +12,49 @@ use crate::{ }; use clap::Args; use nym_bin_common::output_format::OutputFormat; -use nym_client_core::client::base_client::storage::gateway_details::OnDiskGatewayDetails; -use nym_client_core::client::key_manager::persistence::OnDiskKeys; -use nym_client_core::config::GatewayEndpointConfig; -use nym_client_core::error::ClientCoreError; -use nym_client_core::init::helpers::current_gateways; -use nym_client_core::init::types::{GatewayDetails, GatewaySelectionSpecification, GatewaySetup}; -use nym_crypto::asymmetric::identity; -use nym_sphinx::addressing::clients::Recipient; -use nym_topology::NymTopology; +use nym_client_core::init::client_init::{ + initialise_client, CommonClientInitArgs, InitResultsWithConfig, InitialisableClient, +}; use serde::Serialize; use std::fmt::Display; +use std::fs; use std::net::IpAddr; use std::path::PathBuf; -use std::{fs, io}; -use tap::TapFallible; + +struct NativeClientInit; + +impl InitialisableClient for NativeClientInit { + const NAME: &'static str = "native"; + type Error = ClientError; + type InitArgs = Init; + type Config = Config; + + fn try_upgrade_outdated_config(id: &str) -> Result<(), Self::Error> { + try_upgrade_config(id) + } + + fn initialise_storage_paths(id: &str) -> Result<(), Self::Error> { + fs::create_dir_all(default_data_directory(id))?; + fs::create_dir_all(default_config_directory(id))?; + Ok(()) + } + + fn default_config_path(id: &str) -> PathBuf { + default_config_filepath(id) + } + + fn construct_config(init_args: &Self::InitArgs) -> Self::Config { + override_config( + Config::new(&init_args.common_args.id), + OverrideConfig::from(init_args.clone()), + ) + } +} #[derive(Args, Clone)] pub(crate) struct Init { - /// Id of the nym-mixnet-client we want to create config for. - #[clap(long)] - id: String, - - /// Id of the gateway we are going to connect to. - #[clap(long)] - gateway: Option, - - /// Specifies whether the new gateway should be determined based by latency as opposed to being chosen - /// uniformly. - #[clap(long, conflicts_with = "gateway")] - latency_based_selection: bool, - - /// Force register gateway. WARNING: this will overwrite any existing keys for the given id, - /// potentially causing loss of access. - #[clap(long)] - force_register_gateway: bool, - - /// Comma separated list of rest endpoints of the nyxd validators - #[clap(long, alias = "nyxd_validators", value_delimiter = ',', hide = true)] - nyxd_urls: Option>, - - /// Comma separated list of rest endpoints of the API validators - #[clap( - long, - alias = "api_validators", - value_delimiter = ',', - group = "network" - )] - // the alias here is included for backwards compatibility (1.1.4 and before) - nym_apis: Option>, + #[command(flatten)] + common_args: CommonClientInitArgs, /// Whether to not start the websocket #[clap(long)] @@ -74,10 +68,6 @@ pub(crate) struct Init { #[clap(long)] host: Option, - /// Path to .json file containing custom network specification. - #[clap(long, group = "network", hide = true)] - custom_mixnet: Option, - /// Mostly debug-related option to increase default traffic rate so that you would not need to /// modify config post init #[clap(long, hide = true)] @@ -87,27 +77,28 @@ pub(crate) struct Init { #[clap(long, hide = true)] no_cover: bool, - /// Set this client to work in a enabled credentials mode that would attempt to use gateway - /// with bandwidth credential requirement. - #[clap(long, hide = true)] - enabled_credentials_mode: Option, - #[clap(short, long, default_value_t = OutputFormat::default())] output: OutputFormat, } +impl AsRef for Init { + fn as_ref(&self) -> &CommonClientInitArgs { + &self.common_args + } +} + impl From for OverrideConfig { fn from(init_config: Init) -> Self { OverrideConfig { - nym_apis: init_config.nym_apis, + nym_apis: init_config.common_args.nym_apis, disable_socket: init_config.disable_socket, port: init_config.port, host: init_config.host, fastmode: init_config.fastmode, no_cover: init_config.no_cover, - nyxd_urls: init_config.nyxd_urls, - enabled_credentials_mode: init_config.enabled_credentials_mode, + nyxd_urls: init_config.common_args.nyxd_urls, + enabled_credentials_mode: init_config.common_args.enabled_credentials_mode, } } } @@ -121,15 +112,11 @@ pub struct InitResults { } impl InitResults { - fn new(config: &Config, address: &Recipient, gateway: &GatewayEndpointConfig) -> Self { + fn new(res: InitResultsWithConfig) -> Self { Self { - client_core: nym_client_core::init::types::InitResults::new( - &config.base, - address, - gateway, - ), - client_listening_port: config.socket.listening_port, - client_address: address.to_string(), + client_address: res.init_results.address.to_string(), + client_core: res.init_results, + client_listening_port: res.config.socket.listening_port, } } } @@ -142,97 +129,14 @@ impl Display for InitResults { } } -fn init_paths(id: &str) -> io::Result<()> { - fs::create_dir_all(default_data_directory(id))?; - fs::create_dir_all(default_config_directory(id)) -} - pub(crate) async fn execute(args: Init) -> Result<(), ClientError> { eprintln!("Initialising client..."); - let id = &args.id; + let output = args.output; + let res = initialise_client::(args).await?; - let already_init = if default_config_filepath(id).exists() { - // in case we're using old config, try to upgrade it - // (if we're using the current version, it's a no-op) - try_upgrade_config(id)?; - eprintln!("Client \"{id}\" was already initialised before"); - true - } else { - init_paths(id)?; - false - }; - - // Usually you only register with the gateway on the first init, however you can force - // re-registering if wanted. - let user_wants_force_register = args.force_register_gateway; - if user_wants_force_register { - eprintln!("Instructed to force registering gateway. This will overwrite keys!"); - } - - // If the client was already initialized, don't generate new keys and don't re-register with - // the gateway (because this would create a new shared key). - // Unless the user really wants to. - let register_gateway = !already_init || user_wants_force_register; - - // Attempt to use a user-provided gateway, if possible - let user_chosen_gateway_id = args.gateway; - let selection_spec = GatewaySelectionSpecification::new( - user_chosen_gateway_id.map(|id| id.to_base58_string()), - Some(args.latency_based_selection), - false, - ); - - // Load and potentially override config - let config = override_config(Config::new(id), OverrideConfig::from(args.clone())); - - // Setup gateway by either registering a new one, or creating a new config from the selected - // one but with keys kept, or reusing the gateway configuration. - let key_store = OnDiskKeys::new(config.storage_paths.common_paths.keys.clone()); - let details_store = - OnDiskGatewayDetails::new(&config.storage_paths.common_paths.gateway_details); - - let available_gateways = if let Some(hardcoded_topology) = args - .custom_mixnet - .map(NymTopology::new_from_file) - .transpose()? - { - // hardcoded_topology - hardcoded_topology.get_gateways() - } else { - let mut rng = rand::thread_rng(); - current_gateways(&mut rng, &config.base.client.nym_api_urls).await? - }; - - let gateway_setup = GatewaySetup::New { - specification: selection_spec, - available_gateways, - overwrite_data: register_gateway, - }; - - let init_details = - nym_client_core::init::setup_gateway(gateway_setup, &key_store, &details_store) - .await - .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))?; - - let config_save_location = config.default_location(); - config.save_to_default_location().tap_err(|_| { - log::error!("Failed to save the config file"); - })?; - eprintln!( - "Saved configuration file to {}", - config_save_location.display() - ); - - let address = init_details.client_address()?; - - eprintln!("Client configuration completed.\n"); - - let GatewayDetails::Configured(gateway_details) = init_details.gateway_details else { - return Err(ClientCoreError::UnexpectedPersistedCustomGatewayDetails)?; - }; - let init_results = InitResults::new(&config, &address, &gateway_details); - println!("{}", args.output.format(&init_results)); + let init_results = InitResults::new(res); + println!("{}", output.format(&init_results)); Ok(()) } diff --git a/clients/socks5/Cargo.toml b/clients/socks5/Cargo.toml index 7ea0469c74..a3fa47e4a0 100644 --- a/clients/socks5/Cargo.toml +++ b/clients/socks5/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" rust-version = "1.56" [dependencies] -clap = { version = "4.0", features = ["cargo", "derive"] } +clap = { workspace = true, features = ["cargo", "derive"] } lazy_static = "1.4.0" log = { workspace = true } pretty_env_logger = "0.4" @@ -21,7 +21,7 @@ url = { workspace = true } # internal nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] } -nym-client-core = { path = "../../common/client-core", features = ["fs-surb-storage"] } +nym-client-core = { path = "../../common/client-core", features = ["fs-surb-storage", "cli"] } nym-coconut-interface = { path = "../../common/coconut-interface" } nym-config = { path = "../../common/config" } nym-credentials = { path = "../../common/credentials" } diff --git a/clients/socks5/src/commands/init.rs b/clients/socks5/src/commands/init.rs index 3c6a2a943f..d0c7e5e842 100644 --- a/clients/socks5/src/commands/init.rs +++ b/clients/socks5/src/commands/init.rs @@ -11,27 +11,50 @@ use crate::{ }; use clap::Args; use nym_bin_common::output_format::OutputFormat; -use nym_client_core::client::base_client::storage::gateway_details::OnDiskGatewayDetails; -use nym_client_core::client::key_manager::persistence::OnDiskKeys; -use nym_client_core::config::GatewayEndpointConfig; -use nym_client_core::error::ClientCoreError; -use nym_client_core::init::helpers::current_gateways; -use nym_client_core::init::types::{GatewayDetails, GatewaySelectionSpecification, GatewaySetup}; -use nym_crypto::asymmetric::identity; +use nym_client_core::init::client_init::{ + initialise_client, CommonClientInitArgs, InitResultsWithConfig, InitialisableClient, +}; use nym_sphinx::addressing::clients::Recipient; -use nym_topology::NymTopology; use serde::Serialize; use std::fmt::Display; +use std::fs; use std::net::{IpAddr, SocketAddr}; use std::path::PathBuf; -use std::{fs, io}; -use tap::TapFallible; + +struct Socks5ClientInit; + +impl InitialisableClient for Socks5ClientInit { + const NAME: &'static str = "socks5"; + type Error = Socks5ClientError; + type InitArgs = Init; + type Config = Config; + + fn try_upgrade_outdated_config(id: &str) -> Result<(), Self::Error> { + try_upgrade_config(id) + } + + fn initialise_storage_paths(id: &str) -> Result<(), Self::Error> { + fs::create_dir_all(default_data_directory(id))?; + fs::create_dir_all(default_config_directory(id))?; + Ok(()) + } + + fn default_config_path(id: &str) -> PathBuf { + default_config_filepath(id) + } + + fn construct_config(init_args: &Self::InitArgs) -> Self::Config { + override_config( + Config::new(&init_args.common_args.id, &init_args.provider.to_string()), + OverrideConfig::from(init_args.clone()), + ) + } +} #[derive(Args, Clone)] pub(crate) struct Init { - /// Id of the nym-mixnet-client we want to create config for. - #[clap(long)] - id: String, + #[command(flatten)] + common_args: CommonClientInitArgs, /// Address of the socks5 provider to send messages to. #[clap(long)] @@ -46,34 +69,6 @@ pub(crate) struct Init { #[clap(long, alias = "use_anonymous_sender_tag")] use_reply_surbs: Option, - /// Id of the gateway we are going to connect to. - #[clap(long)] - gateway: Option, - - /// Specifies whether the new gateway should be determined based by latency as opposed to being chosen - /// uniformly. - #[clap(long, conflicts_with = "gateway")] - latency_based_selection: bool, - - /// Force register gateway. WARNING: this will overwrite any existing keys for the given id, - /// potentially causing loss of access. - #[clap(long)] - force_register_gateway: bool, - - /// Comma separated list of rest endpoints of the nyxd validators - #[clap(long, alias = "nyxd_validators", value_delimiter = ',', hide = true)] - nyxd_urls: Option>, - - /// Comma separated list of rest endpoints of the API validators - #[clap( - long, - alias = "api_validators", - value_delimiter = ',', - group = "network" - )] - // the alias here is included for backwards compatibility (1.1.4 and before) - nym_apis: Option>, - /// Port for the socket to listen on in all subsequent runs #[clap(short, long)] port: Option, @@ -82,10 +77,6 @@ pub(crate) struct Init { #[clap(long)] host: Option, - /// Path to .json file containing custom network specification. - #[clap(long, group = "network", hide = true)] - custom_mixnet: Option, - /// Mostly debug-related option to increase default traffic rate so that you would not need to /// modify config post init #[clap(long, hide = true)] @@ -95,19 +86,20 @@ pub(crate) struct Init { #[clap(long, hide = true)] no_cover: bool, - /// Set this client to work in a enabled credentials mode that would attempt to use gateway - /// with bandwidth credential requirement. - #[clap(long, hide = true)] - enabled_credentials_mode: Option, - #[clap(short, long, default_value_t = OutputFormat::default())] output: OutputFormat, } +impl AsRef for Init { + fn as_ref(&self) -> &CommonClientInitArgs { + &self.common_args + } +} + impl From for OverrideConfig { fn from(init_config: Init) -> Self { OverrideConfig { - nym_apis: init_config.nym_apis, + nym_apis: init_config.common_args.nym_apis, ip: init_config.host, port: init_config.port, use_anonymous_replies: init_config.use_reply_surbs, @@ -115,8 +107,8 @@ impl From for OverrideConfig { no_cover: init_config.no_cover, geo_routing: None, medium_toggle: false, - nyxd_urls: init_config.nyxd_urls, - enabled_credentials_mode: init_config.enabled_credentials_mode, + nyxd_urls: init_config.common_args.nyxd_urls, + enabled_credentials_mode: init_config.common_args.enabled_credentials_mode, outfox: false, } } @@ -131,15 +123,11 @@ pub struct InitResults { } impl InitResults { - fn new(config: &Config, address: &Recipient, gateway: &GatewayEndpointConfig) -> Self { + fn new(res: InitResultsWithConfig) -> Self { Self { - client_core: nym_client_core::init::types::InitResults::new( - &config.core.base, - address, - gateway, - ), - socks5_listening_address: config.core.socks5.bind_adddress, - client_address: address.to_string(), + client_address: res.init_results.address.to_string(), + client_core: res.init_results, + socks5_listening_address: res.config.core.socks5.bind_adddress, } } } @@ -156,101 +144,14 @@ impl Display for InitResults { } } -fn init_paths(id: &str) -> io::Result<()> { - fs::create_dir_all(default_data_directory(id))?; - fs::create_dir_all(default_config_directory(id)) -} - pub(crate) async fn execute(args: Init) -> Result<(), Socks5ClientError> { eprintln!("Initialising client..."); - let id = &args.id; - let provider_address = &args.provider; + let output = args.output; + let res = initialise_client::(args).await?; - let already_init = if default_config_filepath(id).exists() { - // in case we're using old config, try to upgrade it - // (if we're using the current version, it's a no-op) - try_upgrade_config(id)?; - eprintln!("SOCKS5 client \"{id}\" was already initialised before"); - true - } else { - init_paths(id)?; - false - }; - - // Usually you only register with the gateway on the first init, however you can force - // re-registering if wanted. - let user_wants_force_register = args.force_register_gateway; - if user_wants_force_register { - eprintln!("Instructed to force registering gateway. This might overwrite keys!"); - } - - // If the client was already initialized, don't generate new keys and don't re-register with - // the gateway (because this would create a new shared key). - // Unless the user really wants to. - let register_gateway = !already_init || user_wants_force_register; - - // Attempt to use a user-provided gateway, if possible - let user_chosen_gateway_id = args.gateway; - let selection_spec = GatewaySelectionSpecification::new( - user_chosen_gateway_id.map(|id| id.to_base58_string()), - Some(args.latency_based_selection), - false, - ); - - // Load and potentially override config - let config = override_config( - Config::new(id, &provider_address.to_string()), - OverrideConfig::from(args.clone()), - ); - - // Setup gateway by either registering a new one, or creating a new config from the selected - // one but with keys kept, or reusing the gateway configuration. - let key_store = OnDiskKeys::new(config.storage_paths.common_paths.keys.clone()); - let details_store = - OnDiskGatewayDetails::new(&config.storage_paths.common_paths.gateway_details); - - let available_gateways = if let Some(hardcoded_topology) = args - .custom_mixnet - .map(NymTopology::new_from_file) - .transpose()? - { - // hardcoded_topology - hardcoded_topology.get_gateways() - } else { - let mut rng = rand::thread_rng(); - current_gateways(&mut rng, &config.core.base.client.nym_api_urls).await? - }; - - let gateway_setup = GatewaySetup::New { - specification: selection_spec, - available_gateways, - overwrite_data: register_gateway, - }; - - let init_details = - nym_client_core::init::setup_gateway(gateway_setup, &key_store, &details_store) - .await - .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))?; - - // TODO: ask the service provider we specified for its interface version and set it in the config - - let config_save_location = config.default_location(); - config.save_to_default_location().tap_err(|_| { - log::error!("Failed to save the config file"); - })?; - eprintln!( - "Saved configuration file to {}", - config_save_location.display() - ); - - let address = init_details.client_address()?; - - let GatewayDetails::Configured(gateway_details) = init_details.gateway_details else { - return Err(ClientCoreError::UnexpectedPersistedCustomGatewayDetails)?; - }; - let init_results = InitResults::new(&config, &address, &gateway_details); - println!("{}", args.output.format(&init_results)); + let init_results = InitResults::new(res); + println!("{}", output.format(&init_results)); Ok(()) } diff --git a/clients/socks5/src/config/mod.rs b/clients/socks5/src/config/mod.rs index 8a8681c50f..9f4c23720f 100644 --- a/clients/socks5/src/config/mod.rs +++ b/clients/socks5/src/config/mod.rs @@ -15,7 +15,9 @@ use std::path::{Path, PathBuf}; use std::str::FromStr; pub use crate::config::persistence::SocksClientPaths; +use nym_client_core::config::disk_persistence::CommonClientPaths; pub use nym_client_core::config::Config as BaseClientConfig; +use nym_client_core::init::client_init::ClientConfig; pub use nym_socks5_client_core::config::Config as CoreConfig; pub mod old_config_v1_1_13; @@ -69,6 +71,24 @@ impl NymConfigTemplate for Config { } } +impl ClientConfig for Config { + fn common_paths(&self) -> &CommonClientPaths { + &self.storage_paths.common_paths + } + + fn core_config(&self) -> &BaseClientConfig { + &self.core.base + } + + fn default_store_location(&self) -> PathBuf { + self.default_location() + } + + fn save_to>(&self, path: P) -> io::Result<()> { + save_formatted_config_to_file(self, path) + } +} + impl Config { pub fn new>(id: S, provider_mix_address: S) -> Self { Config { diff --git a/common/bin-common/Cargo.toml b/common/bin-common/Cargo.toml index 7f9ae7fe89..9ed9958a07 100644 --- a/common/bin-common/Cargo.toml +++ b/common/bin-common/Cargo.toml @@ -9,7 +9,7 @@ repository = { workspace = true } [dependencies] atty = "0.2" -clap = { version = "4.0", features = ["derive"] } +clap = { workspace = true, features = ["derive"] } clap_complete = "4.0" clap_complete_fig = "4.0" log = { workspace = true } diff --git a/common/client-core/Cargo.toml b/common/client-core/Cargo.toml index cd17b7e979..ccd2113a28 100644 --- a/common/client-core/Cargo.toml +++ b/common/client-core/Cargo.toml @@ -11,6 +11,7 @@ rust-version = "1.66" async-trait = { workspace = true } base64 = "0.21.2" cfg-if = "1.0.0" +clap = { workspace = true, optional = true } dashmap = { workspace = true } dirs = "4.0" futures = { workspace = true } @@ -92,6 +93,7 @@ sqlx = { version = "0.6.2", features = ["runtime-tokio-rustls", "sqlite", "macro [features] default = [] +cli = ["clap"] fs-surb-storage = ["sqlx"] wasm = ["nym-gateway-client/wasm"] diff --git a/common/client-core/src/error.rs b/common/client-core/src/error.rs index 8118936730..8a193d8a75 100644 --- a/common/client-core/src/error.rs +++ b/common/client-core/src/error.rs @@ -8,6 +8,7 @@ use nym_topology::gateway::GatewayConversionError; use nym_topology::NymTopologyError; use nym_validator_client::ValidatorClientError; use std::error::Error; +use std::path::PathBuf; #[derive(thiserror::Error, Debug)] pub enum ClientCoreError { @@ -132,6 +133,26 @@ pub enum ClientCoreError { #[error("the specified gateway '{gateway}' does not support the wss protocol")] UnsupportedWssProtocol { gateway: String }, + + #[error( + "failed to load custom topology using path '{}'. detailed message: {source}", file_path.display() + )] + CustomTopologyLoadFailure { + file_path: PathBuf, + #[source] + source: std::io::Error, + }, + + #[error( + "failed to save config file for client-{typ} id {id} using path '{}'. detailed message: {source}", path.display() + )] + ConfigSaveFailure { + typ: String, + id: String, + path: PathBuf, + #[source] + source: std::io::Error, + }, } /// Set of messages that the client can send to listeners via the task manager diff --git a/common/client-core/src/init/client_init.rs b/common/client-core/src/init/client_init.rs new file mode 100644 index 0000000000..42f9987f44 --- /dev/null +++ b/common/client-core/src/init/client_init.rs @@ -0,0 +1,201 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::config::disk_persistence::CommonClientPaths; +use crate::error::ClientCoreError; +use crate::{ + client::{ + base_client::storage::gateway_details::OnDiskGatewayDetails, + key_manager::persistence::OnDiskKeys, + }, + init::types::{GatewayDetails, GatewaySelectionSpecification, GatewaySetup, InitResults}, +}; +use log::info; +use nym_crypto::asymmetric::identity; +use nym_topology::NymTopology; +use std::path::{Path, PathBuf}; + +pub trait InitialisableClient { + const NAME: &'static str; + type Error: From; + type InitArgs: AsRef; + type Config: ClientConfig; + + fn try_upgrade_outdated_config(id: &str) -> Result<(), Self::Error>; + + fn initialise_storage_paths(id: &str) -> Result<(), Self::Error>; + + fn default_config_path(id: &str) -> PathBuf; + + fn construct_config(init_args: &Self::InitArgs) -> Self::Config; +} + +pub trait ClientConfig { + fn common_paths(&self) -> &CommonClientPaths; + + fn core_config(&self) -> &crate::config::Config; + + fn default_store_location(&self) -> PathBuf; + + fn save_to>(&self, path: P) -> std::io::Result<()>; +} + +#[cfg_attr(feature = "cli", derive(clap::Args))] +#[derive(Debug, Clone)] +pub struct CommonClientInitArgs { + /// Id of client we want to create config for. + #[cfg_attr(feature = "cli", clap(long))] + pub id: String, + + /// Id of the gateway we are going to connect to. + #[cfg_attr(feature = "cli", clap(long))] + pub gateway: Option, + + /// Specifies whether the new gateway should be determined based by latency as opposed to being chosen + /// uniformly. + #[cfg_attr(feature = "cli", clap(long, conflicts_with = "gateway"))] + pub latency_based_selection: bool, + + /// Force register gateway. WARNING: this will overwrite any existing keys for the given id, + /// potentially causing loss of access. + #[cfg_attr(feature = "cli", clap(long))] + pub force_register_gateway: bool, + + /// Comma separated list of rest endpoints of the nyxd validators + #[cfg_attr( + feature = "cli", + clap(long, alias = "nyxd_validators", value_delimiter = ',', hide = true) + )] + pub nyxd_urls: Option>, + + /// Comma separated list of rest endpoints of the API validators + #[cfg_attr( + feature = "cli", + clap( + long, + alias = "api_validators", + value_delimiter = ',', + group = "network" + ) + )] + pub nym_apis: Option>, + + /// Path to .json file containing custom network specification. + #[cfg_attr(feature = "cli", clap(long, group = "network", hide = true))] + pub custom_mixnet: Option, + + /// Set this client to work in a enabled credentials mode that would attempt to use gateway + /// with bandwidth credential requirement. + #[cfg_attr(feature = "cli", clap(long, hide = true))] + pub enabled_credentials_mode: Option, +} + +pub struct InitResultsWithConfig { + pub config: T, + pub init_results: InitResults, +} + +pub async fn initialise_client( + init_args: C::InitArgs, +) -> Result, C::Error> +where + C: InitialisableClient, +{ + info!("initialising {} client", C::NAME); + + let common_args = init_args.as_ref(); + let id = &common_args.id; + + let already_init = if C::default_config_path(id).exists() { + // in case we're using old config, try to upgrade it + // (if we're using the current version, it's a no-op) + C::try_upgrade_outdated_config(id)?; + eprintln!("{} client \"{id}\" was already initialised before", C::NAME); + true + } else { + C::initialise_storage_paths(id)?; + false + }; + + // Usually you only register with the gateway on the first init, however you can force + // re-registering if wanted. + let user_wants_force_register = common_args.force_register_gateway; + if user_wants_force_register { + eprintln!("Instructed to force registering gateway. This might overwrite keys!"); + } + + // If the client was already initialized, don't generate new keys and don't re-register with + // the gateway (because this would create a new shared key). + // Unless the user really wants to. + let register_gateway = !already_init || user_wants_force_register; + + // Attempt to use a user-provided gateway, if possible + let user_chosen_gateway_id = common_args.gateway; + let selection_spec = GatewaySelectionSpecification::new( + user_chosen_gateway_id.map(|id| id.to_base58_string()), + Some(common_args.latency_based_selection), + false, + ); + + // Load and potentially override config + let config = C::construct_config(&init_args); + let paths = config.common_paths(); + let core = config.core_config(); + + // Setup gateway by either registering a new one, or creating a new config from the selected + // one but with keys kept, or reusing the gateway configuration. + let key_store = OnDiskKeys::new(paths.keys.clone()); + let details_store = OnDiskGatewayDetails::new(&paths.gateway_details); + + let available_gateways = if let Some(custom_mixnet) = common_args.custom_mixnet.as_ref() { + let hardcoded_topology = NymTopology::new_from_file(custom_mixnet).map_err(|source| { + ClientCoreError::CustomTopologyLoadFailure { + file_path: custom_mixnet.clone(), + source, + } + })?; + hardcoded_topology.get_gateways() + } else { + let mut rng = rand::thread_rng(); + crate::init::helpers::current_gateways(&mut rng, &core.client.nym_api_urls).await? + }; + + let gateway_setup = GatewaySetup::New { + specification: selection_spec, + available_gateways, + overwrite_data: register_gateway, + }; + + let init_details = + crate::init::setup_gateway(gateway_setup, &key_store, &details_store).await?; + + // TODO: ask the service provider we specified for its interface version and set it in the config + + let config_save_location = config.default_store_location(); + if let Err(err) = config.save_to(&config_save_location) { + return Err(ClientCoreError::ConfigSaveFailure { + typ: C::NAME.to_string(), + id: id.to_string(), + path: config_save_location, + source: err, + } + .into()); + } + + eprintln!( + "Saved configuration file to {}", + config_save_location.display() + ); + + let address = init_details.client_address()?; + + let GatewayDetails::Configured(gateway_details) = init_details.gateway_details else { + return Err(ClientCoreError::UnexpectedPersistedCustomGatewayDetails)?; + }; + let init_results = InitResults::new(config.core_config(), address, &gateway_details); + + Ok(InitResultsWithConfig { + config, + init_results, + }) +} diff --git a/common/client-core/src/init/mod.rs b/common/client-core/src/init/mod.rs index 395fdd45c2..ab153378c2 100644 --- a/common/client-core/src/init/mod.rs +++ b/common/client-core/src/init/mod.rs @@ -24,6 +24,7 @@ use serde::de::DeserializeOwned; use serde::Serialize; use std::sync::Arc; +pub mod client_init; pub mod helpers; pub mod types; diff --git a/common/client-core/src/init/types.rs b/common/client-core/src/init/types.rs index 3e8a88d133..bf9df9edb2 100644 --- a/common/client-core/src/init/types.rs +++ b/common/client-core/src/init/types.rs @@ -296,16 +296,17 @@ impl GatewaySetup { /// Struct describing the results of the client initialization procedure. #[derive(Debug, Serialize)] pub struct InitResults { - version: String, - id: String, - identity_key: String, - encryption_key: String, - gateway_id: String, - gateway_listener: String, + pub version: String, + pub id: String, + pub identity_key: String, + pub encryption_key: String, + pub gateway_id: String, + pub gateway_listener: String, + pub address: Recipient, } impl InitResults { - pub fn new(config: &Config, address: &Recipient, gateway: &GatewayEndpointConfig) -> Self { + pub fn new(config: &Config, address: Recipient, gateway: &GatewayEndpointConfig) -> Self { Self { version: config.client.version.clone(), id: config.client.id.clone(), @@ -313,6 +314,7 @@ impl InitResults { encryption_key: address.encryption_key().to_base58_string(), gateway_id: gateway.gateway_id.clone(), gateway_listener: gateway.gateway_listener.clone(), + address, } } } diff --git a/common/commands/Cargo.toml b/common/commands/Cargo.toml index df6860641e..e538a7ed31 100644 --- a/common/commands/Cargo.toml +++ b/common/commands/Cargo.toml @@ -11,7 +11,7 @@ bip39 = { workspace = true } bs58 = "0.4" comfy-table = "6.0.0" cfg-if = "1.0.0" -clap = { version = "4.0", features = ["derive"] } +clap = { workspace = true, features = ["derive"] } cw-utils = { workspace = true } handlebars = "3.0.1" humantime-serde = "1.0" diff --git a/ephemera/Cargo.toml b/ephemera/Cargo.toml index 63ccaa9ab7..f0af6af3a9 100644 --- a/ephemera/Cargo.toml +++ b/ephemera/Cargo.toml @@ -21,7 +21,7 @@ bs58 = "0.4.0" bytes = "1.3.0" cfg-if = "1.0.0" chrono = { version = "0.4.24", default-features = false, features = ["clock"] } -clap = { version = "4.0.32", features = ["derive"] } +clap = { workspace = true, features = ["derive"] } config = { version = "0.13", default-features = false, features = ["toml"] } digest = "0.10.6" dirs = "5.0.0" diff --git a/explorer-api/Cargo.toml b/explorer-api/Cargo.toml index 935a76cb52..16c55da6c5 100644 --- a/explorer-api/Cargo.toml +++ b/explorer-api/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] chrono = { version = "0.4.31", features = ["serde"] } -clap = { version = "4.0", features = ["cargo", "derive"] } +clap = { workspace = true, features = ["cargo", "derive"] } dotenvy = "0.15.6" humantime-serde = "1.0" isocountry = "0.3.2" diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index c1d6503199..777032d128 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -20,7 +20,7 @@ async-trait = { workspace = true } atty = "0.2" bip39 = { workspace = true } bs58 = "0.4.0" -clap = { version = "4.0", features = ["cargo", "derive"] } +clap = { workspace = true, features = ["cargo", "derive"] } colored = "2.0" dashmap = { workspace = true } dirs = "4.0" diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 39061c4ca4..751aa06e04 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -19,7 +19,7 @@ rust-version = "1.58.1" axum = { workspace = true } anyhow = "1.0.40" bs58 = "0.4.0" -clap = { version = "4.0", features = ["cargo", "derive"] } +clap = { workspace = true, features = ["cargo", "derive"] } colored = "2.0" cupid = "0.6.1" dirs = "4.0" diff --git a/nym-api/Cargo.toml b/nym-api/Cargo.toml index 4691bf250f..85c20d6e59 100644 --- a/nym-api/Cargo.toml +++ b/nym-api/Cargo.toml @@ -19,7 +19,7 @@ async-trait = { workspace = true } bs58 = { version = "0.4.0" } bip39 = { workspace = true } cfg-if = "1.0" -clap = { version = "4.0", features = ["cargo", "derive"] } +clap = { workspace = true, features = ["cargo", "derive"] } console-subscriber = { version = "0.1.1", optional = true } # validator-api needs to be built with RUSTFLAGS="--cfg tokio_unstable" dirs = "4.0" futures = { workspace = true } diff --git a/nym-connect/desktop/Cargo.lock b/nym-connect/desktop/Cargo.lock index 6dbf35cc44..e3a9fce4c2 100644 --- a/nym-connect/desktop/Cargo.lock +++ b/nym-connect/desktop/Cargo.lock @@ -126,16 +126,15 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] @@ -165,9 +164,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -868,20 +867,19 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.21" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.21" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -910,9 +908,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -922,9 +920,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cocoa" diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index a2922d8391..ec32ea6a33 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -108,16 +108,15 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] @@ -147,9 +146,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -662,20 +661,19 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.21" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.21" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -704,9 +702,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -716,9 +714,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cocoa" @@ -3431,6 +3429,15 @@ dependencies = [ "nym-contracts-common", ] +[[package]] +name = "nym-exit-policy" +version = "0.1.0" +dependencies = [ + "serde", + "thiserror", + "tracing", +] + [[package]] name = "nym-group-contract-common" version = "0.1.0" @@ -3510,6 +3517,7 @@ dependencies = [ "base64 0.21.4", "nym-bin-common", "nym-crypto", + "nym-exit-policy", "nym-wireguard-types", "schemars", "serde", diff --git a/service-providers/network-requester/Cargo.toml b/service-providers/network-requester/Cargo.toml index 42c54bc0b2..a13ee1fed4 100644 --- a/service-providers/network-requester/Cargo.toml +++ b/service-providers/network-requester/Cargo.toml @@ -17,7 +17,7 @@ path = "src/lib.rs" [dependencies] async-trait = { workspace = true } bs58 = "0.4.0" -clap = {version = "4.0", features = ["cargo", "derive"]} +clap = { workspace = true, features = ["cargo", "derive"]} dirs = "4.0" futures = { workspace = true } humantime-serde = "1.1.1" @@ -41,7 +41,7 @@ url = { workspace = true } # internal async-file-watcher = { path = "../../common/async-file-watcher" } nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] } -nym-client-core = { path = "../../common/client-core" } +nym-client-core = { path = "../../common/client-core", features = ["cli"] } nym-client-websocket-requests = { path = "../../clients/native/websocket-requests" } nym-config = { path = "../../common/config" } nym-credential-storage = { path = "../../common/credential-storage" } diff --git a/service-providers/network-requester/src/cli/init.rs b/service-providers/network-requester/src/cli/init.rs index d6c1960da6..35ddedc279 100644 --- a/service-providers/network-requester/src/cli/init.rs +++ b/service-providers/network-requester/src/cli/init.rs @@ -10,27 +10,48 @@ use crate::{ }; use clap::Args; use nym_bin_common::output_format::OutputFormat; -use nym_client_core::client::base_client::storage::gateway_details::OnDiskGatewayDetails; -use nym_client_core::client::key_manager::persistence::OnDiskKeys; -use nym_client_core::config::GatewayEndpointConfig; -use nym_client_core::error::ClientCoreError; -use nym_client_core::init::helpers::current_gateways; -use nym_client_core::init::types::GatewaySetup; -use nym_client_core::init::types::{GatewayDetails, GatewaySelectionSpecification}; -use nym_crypto::asymmetric::identity; -use nym_sdk::mixnet::NymTopology; -use nym_sphinx::addressing::clients::Recipient; +use nym_client_core::init::client_init::{ + initialise_client, CommonClientInitArgs, InitResultsWithConfig, InitialisableClient, +}; use serde::Serialize; use std::fmt::Display; +use std::fs; use std::path::PathBuf; -use std::{fs, io}; -use tap::TapFallible; + +struct NetworkRequesterInit; + +impl InitialisableClient for NetworkRequesterInit { + const NAME: &'static str = "network requester"; + type Error = NetworkRequesterError; + type InitArgs = Init; + type Config = Config; + + fn try_upgrade_outdated_config(id: &str) -> Result<(), Self::Error> { + try_upgrade_config(id) + } + + fn initialise_storage_paths(id: &str) -> Result<(), Self::Error> { + fs::create_dir_all(default_data_directory(id))?; + fs::create_dir_all(default_config_directory(id))?; + Ok(()) + } + + fn default_config_path(id: &str) -> PathBuf { + default_config_filepath(id) + } + + fn construct_config(init_args: &Self::InitArgs) -> Self::Config { + override_config( + Config::new(&init_args.common_args.id), + OverrideConfig::from(init_args.clone()), + ) + } +} #[derive(Args, Clone)] pub(crate) struct Init { - /// Id of the nym-mixnet-client we want to create config for. - #[clap(long)] - id: String, + #[command(flatten)] + common_args: CommonClientInitArgs, /// Specifies whether this network requester should run in 'open-proxy' mode #[clap(long)] @@ -45,43 +66,6 @@ pub(crate) struct Init { #[clap(long)] statistics_recipient: Option, - /// Id of the gateway we are going to connect to. - #[clap(long)] - gateway: Option, - - /// Specifies whether the new gateway should be determined based by latency as opposed to being chosen - /// uniformly. - #[clap(long, conflicts_with = "gateway")] - latency_based_selection: bool, - - /// Force register gateway. WARNING: this will overwrite any existing keys for the given id, - /// potentially causing loss of access. - #[clap(long)] - force_register_gateway: bool, - - /// Comma separated list of rest endpoints of the nyxd validators - #[clap(long, alias = "nymd_validators", value_delimiter = ',')] - nyxd_urls: Option>, - - /// Comma separated list of rest endpoints of the API validators - #[clap( - long, - alias = "api_validators", - value_delimiter = ',', - group = "network" - )] - // the alias here is included for backwards compatibility (1.1.4 and before) - nym_apis: Option>, - - /// Path to .json file containing custom network specification. - #[clap(long, group = "network", hide = true)] - custom_mixnet: Option, - - /// Set this client to work in a enabled credentials mode that would attempt to use gateway - /// with bandwidth credential requirement. - #[clap(long)] - enabled_credentials_mode: Option, - /// Specifies whether this network requester will run using the default ExitPolicy /// as opposed to the allow list. /// Note: this setting will become the default in the future releases. @@ -95,20 +79,26 @@ pub(crate) struct Init { impl From for OverrideConfig { fn from(init_config: Init) -> Self { OverrideConfig { - nym_apis: init_config.nym_apis, + nym_apis: init_config.common_args.nym_apis, fastmode: false, no_cover: false, medium_toggle: false, - nyxd_urls: init_config.nyxd_urls, - enabled_credentials_mode: init_config.enabled_credentials_mode, + nyxd_urls: init_config.common_args.nyxd_urls, + enabled_credentials_mode: init_config.common_args.enabled_credentials_mode, enable_exit_policy: init_config.with_exit_policy, open_proxy: init_config.open_proxy, - enable_statistics: init_config.enabled_credentials_mode, + enable_statistics: init_config.enable_statistics, statistics_recipient: init_config.statistics_recipient, } } } +impl AsRef for Init { + fn as_ref(&self) -> &CommonClientInitArgs { + &self.common_args + } +} + #[derive(Debug, Serialize)] pub struct InitResults { #[serde(flatten)] @@ -117,14 +107,10 @@ pub struct InitResults { } impl InitResults { - fn new(config: &Config, address: &Recipient, gateway: &GatewayEndpointConfig) -> Self { + fn new(res: InitResultsWithConfig) -> Self { Self { - client_core: nym_client_core::init::types::InitResults::new( - &config.base, - address, - gateway, - ), - client_address: address.to_string(), + client_address: res.init_results.address.to_string(), + client_core: res.init_results, } } } @@ -140,99 +126,14 @@ impl Display for InitResults { } } -fn init_paths(id: &str) -> io::Result<()> { - fs::create_dir_all(default_data_directory(id))?; - fs::create_dir_all(default_config_directory(id)) -} +pub(crate) async fn execute(args: Init) -> Result<(), NetworkRequesterError> { + eprintln!("Initialising client..."); -pub(crate) async fn execute(args: &Init) -> Result<(), NetworkRequesterError> { - log::info!("Initialising client..."); + let output = args.output; + let res = initialise_client::(args).await?; - let id = &args.id; - - let already_init = if default_config_filepath(id).exists() { - // in case we're using old config, try to upgrade it - // (if we're using the current version, it's a no-op) - try_upgrade_config(id)?; - log::info!("Client \"{id}\" was already initialised before"); - true - } else { - init_paths(&args.id)?; - false - }; - - // Usually you only register with the gateway on the first init, however you can force - // re-registering if wanted. - let user_wants_force_register = args.force_register_gateway; - if user_wants_force_register { - log::warn!("Instructed to force registering gateway. This might overwrite keys!"); - } - - // If the client was already initialized, don't generate new keys and don't re-register with - // the gateway (because this would create a new shared key). - // Unless the user really wants to. - let register_gateway = !already_init || user_wants_force_register; - - // Attempt to use a user-provided gateway, if possible - let user_chosen_gateway_id = args.gateway; - let selection_spec = GatewaySelectionSpecification::new( - user_chosen_gateway_id.map(|id| id.to_base58_string()), - Some(args.latency_based_selection), - false, - ); - - // Load and potentially override config - let config = override_config(Config::new(id), OverrideConfig::from(args.clone())); - log::debug!("Using config: {:#?}", config); - - // Setup gateway by either registering a new one, or creating a new config from the selected - // one but with keys kept, or reusing the gateway configuration. - let key_store = OnDiskKeys::new(config.storage_paths.common_paths.keys.clone()); - let details_store = - OnDiskGatewayDetails::new(&config.storage_paths.common_paths.gateway_details); - - let available_gateways = if let Some(hardcoded_topology) = args - .custom_mixnet - .as_ref() - .map(NymTopology::new_from_file) - .transpose()? - { - // hardcoded_topology - hardcoded_topology.get_gateways() - } else { - let mut rng = rand::thread_rng(); - current_gateways(&mut rng, &config.base.client.nym_api_urls).await? - }; - - let gateway_setup = GatewaySetup::New { - specification: selection_spec, - available_gateways, - overwrite_data: register_gateway, - }; - - let init_details = - nym_client_core::init::setup_gateway(gateway_setup, &key_store, &details_store) - .await - .tap_err(|err| log::error!("Failed to setup gateway\nError: {err}"))?; - - let config_save_location = config.default_location(); - config.save_to_default_location().tap_err(|_| { - log::error!("Failed to save the config file"); - })?; - log::info!( - "Saved configuration file to {}", - config_save_location.display() - ); - - let address = init_details.client_address()?; - - log::info!("Client configuration completed.\n"); - - let GatewayDetails::Configured(gateway_details) = init_details.gateway_details else { - return Err(ClientCoreError::UnexpectedPersistedCustomGatewayDetails)?; - }; - let init_results = InitResults::new(&config, &address, &gateway_details); - println!("{}", args.output.format(&init_results)); + let init_results = InitResults::new(res); + println!("{}", output.format(&init_results)); Ok(()) } diff --git a/service-providers/network-requester/src/cli/mod.rs b/service-providers/network-requester/src/cli/mod.rs index c090912743..fcc2fe6750 100644 --- a/service-providers/network-requester/src/cli/mod.rs +++ b/service-providers/network-requester/src/cli/mod.rs @@ -154,7 +154,7 @@ pub(crate) async fn execute(args: Cli) -> Result<(), NetworkRequesterError> { let bin_name = "nym-network-requester"; match args.command { - Commands::Init(m) => init::execute(&m).await?, + Commands::Init(m) => init::execute(m).await?, Commands::Run(m) => run::execute(&m).await?, Commands::Sign(m) => sign::execute(&m).await?, Commands::BuildInfo(m) => build_info::execute(m), diff --git a/service-providers/network-requester/src/config/mod.rs b/service-providers/network-requester/src/config/mod.rs index 81ace42e36..8fee1c6725 100644 --- a/service-providers/network-requester/src/config/mod.rs +++ b/service-providers/network-requester/src/config/mod.rs @@ -17,8 +17,10 @@ use std::str::FromStr; use std::time::Duration; use url::Url; +use nym_client_core::config::disk_persistence::CommonClientPaths; pub use nym_client_core::config::Config as BaseClientConfig; pub use nym_client_core::config::{DebugConfig, GatewayEndpointConfig}; +use nym_client_core::init::client_init::ClientConfig; use nym_network_defaults::mainnet; use nym_sphinx::params::PacketSize; @@ -83,6 +85,24 @@ impl NymConfigTemplate for Config { } } +impl ClientConfig for Config { + fn common_paths(&self) -> &CommonClientPaths { + &self.storage_paths.common_paths + } + + fn core_config(&self) -> &BaseClientConfig { + &self.base + } + + fn default_store_location(&self) -> PathBuf { + self.default_location() + } + + fn save_to>(&self, path: P) -> io::Result<()> { + save_formatted_config_to_file(self, path) + } +} + impl Config { pub fn new>(id: S) -> Self { Config { diff --git a/tools/internal/sdk-version-bump/Cargo.toml b/tools/internal/sdk-version-bump/Cargo.toml index 07bb45a875..b4ab71b34f 100644 --- a/tools/internal/sdk-version-bump/Cargo.toml +++ b/tools/internal/sdk-version-bump/Cargo.toml @@ -13,7 +13,7 @@ license.workspace = true [dependencies] anyhow = { workspace = true } cargo-edit = "0.11.0" -clap = { version = "4.3.19", features = ["derive", "string"] } +clap = { workspace = true, features = ["derive", "string"] } semver = "1.0.18" serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } diff --git a/tools/nym-cli/Cargo.toml b/tools/nym-cli/Cargo.toml index def3dc32eb..5640b96840 100644 --- a/tools/nym-cli/Cargo.toml +++ b/tools/nym-cli/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] base64 = "0.13.0" bs58 = "0.4" -clap = { version = "4.0", features = ["derive"] } +clap = { workspace = true, features = ["derive"] } clap_complete = "4.0" clap_complete_fig = "4.0" dotenvy = "0.15.6" diff --git a/tools/nym-nr-query/Cargo.toml b/tools/nym-nr-query/Cargo.toml index 9034b536db..804577e583 100644 --- a/tools/nym-nr-query/Cargo.toml +++ b/tools/nym-nr-query/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] anyhow = { workspace = true } -clap = {version = "4.0", features = ["cargo", "derive"]} +clap = { workspace = true, features = ["cargo", "derive"]} log = { workspace = true } nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] } nym-network-defaults = { path = "../../common/network-defaults" } From 4716d278ce0f9fa474e3a0b0a13d764494b6b58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 16:26:37 +0000 Subject: [PATCH 034/142] combine client run args --- clients/native/src/commands/run.rs | 61 ++++--------------- clients/socks5/src/commands/run.rs | 55 ++++------------- common/client-core/src/init/client_run.rs | 55 +++++++++++++++++ common/client-core/src/init/mod.rs | 1 + .../network-requester/src/cli/run.rs | 39 +++--------- 5 files changed, 88 insertions(+), 123 deletions(-) create mode 100644 common/client-core/src/init/client_run.rs diff --git a/clients/native/src/commands/run.rs b/clients/native/src/commands/run.rs index 8a61f8147c..7365b0773b 100644 --- a/clients/native/src/commands/run.rs +++ b/clients/native/src/commands/run.rs @@ -10,35 +10,14 @@ use crate::{ use clap::Args; use log::*; use nym_bin_common::version_checker::is_minor_version_compatible; -use nym_crypto::asymmetric::identity; +use nym_client_core::init::client_run::CommonClientRunArgs; use std::error::Error; use std::net::IpAddr; -use std::path::PathBuf; #[derive(Args, Clone)] pub(crate) struct Run { - /// Id of the nym-mixnet-client we want to run. - #[clap(long)] - id: String, - - /// Comma separated list of rest endpoints of the nyxd validators - #[clap(long, alias = "nyxd_validators", value_delimiter = ',', hide = true)] - nyxd_urls: Option>, - - /// Comma separated list of rest endpoints of the API validators - #[clap( - long, - alias = "api_validators", - value_delimiter = ',', - group = "network" - )] - // the alias here is included for backwards compatibility (1.1.4 and before) - nym_apis: Option>, - - /// Id of the gateway we want to connect to. If overridden, it is user's responsibility to - /// ensure prior registration happened - #[clap(long)] - gateway: Option, + #[command(flatten)] + common_args: CommonClientRunArgs, /// Whether to not start the websocket #[clap(long)] @@ -51,37 +30,19 @@ pub(crate) struct Run { /// Ip for the socket (if applicable) to listen for requests. #[clap(long)] host: Option, - - /// Path to .json file containing custom network specification. - #[clap(long, group = "network", hide = true)] - custom_mixnet: Option, - - /// Mostly debug-related option to increase default traffic rate so that you would not need to - /// modify config post init - #[clap(long, hide = true)] - fastmode: bool, - - /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) - #[clap(long, hide = true)] - no_cover: bool, - - /// Set this client to work in a enabled credentials mode that would attempt to use gateway - /// with bandwidth credential requirement. - #[clap(long, hide = true)] - enabled_credentials_mode: Option, } impl From for OverrideConfig { fn from(run_config: Run) -> Self { OverrideConfig { - nym_apis: run_config.nym_apis, + nym_apis: run_config.common_args.nym_apis, disable_socket: run_config.disable_socket, port: run_config.port, host: run_config.host, - fastmode: run_config.fastmode, - no_cover: run_config.no_cover, - nyxd_urls: run_config.nyxd_urls, - enabled_credentials_mode: run_config.enabled_credentials_mode, + fastmode: run_config.common_args.fastmode, + no_cover: run_config.common_args.no_cover, + nyxd_urls: run_config.common_args.nyxd_urls, + enabled_credentials_mode: run_config.common_args.enabled_credentials_mode, } } } @@ -106,9 +67,9 @@ fn version_check(cfg: &Config) -> bool { } pub(crate) async fn execute(args: Run) -> Result<(), Box> { - eprintln!("Starting client {}...", args.id); + eprintln!("Starting client {}...", args.common_args.id); - let mut config = try_load_current_config(&args.id)?; + let mut config = try_load_current_config(&args.common_args.id)?; config = override_config(config, OverrideConfig::from(args.clone())); if !version_check(&config) { @@ -116,7 +77,7 @@ pub(crate) async fn execute(args: Run) -> Result<(), Box, - /// Id of the gateway we want to connect to. If overridden, it is user's responsibility to - /// ensure prior registration happened - #[clap(long)] - gateway: Option, - - /// Comma separated list of rest endpoints of the nyxd validators - #[clap(long, alias = "nyxd_validators", value_delimiter = ',', hide = true)] - nyxd_urls: Option>, - - /// Comma separated list of rest endpoints of the Nym APIs - #[clap(long, value_delimiter = ',', group = "network")] - nym_apis: Option>, - /// Port for the socket to listen on #[clap(short, long)] port: Option, @@ -58,19 +43,6 @@ pub(crate) struct Run { #[clap(long)] host: Option, - /// Path to .json file containing custom network specification. - #[clap(long, group = "network", group = "routing", hide = true)] - custom_mixnet: Option, - - /// Mostly debug-related option to increase default traffic rate so that you would not need to - /// modify config post init - #[clap(long, hide = true)] - fastmode: bool, - - /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) - #[clap(long, hide = true)] - no_cover: bool, - /// Set geo-aware mixnode selection when sending mixnet traffic, for experiments only. #[clap(long, hide = true, value_parser = validate_country_group, group="routing")] geo_routing: Option, @@ -80,11 +52,6 @@ pub(crate) struct Run { #[clap(long, hide = true)] medium_toggle: bool, - /// Set this client to work in a enabled credentials mode that would attempt to use gateway - /// with bandwidth credential requirement. - #[clap(long, hide = true)] - enabled_credentials_mode: Option, - #[clap(long, hide = true, action)] outfox: bool, } @@ -92,16 +59,16 @@ pub(crate) struct Run { impl From for OverrideConfig { fn from(run_config: Run) -> Self { OverrideConfig { - nym_apis: run_config.nym_apis, + nym_apis: run_config.common_args.nym_apis, ip: run_config.host, port: run_config.port, use_anonymous_replies: run_config.use_anonymous_replies, - fastmode: run_config.fastmode, - no_cover: run_config.no_cover, + fastmode: run_config.common_args.fastmode, + no_cover: run_config.common_args.no_cover, geo_routing: run_config.geo_routing, medium_toggle: run_config.medium_toggle, - nyxd_urls: run_config.nyxd_urls, - enabled_credentials_mode: run_config.enabled_credentials_mode, + nyxd_urls: run_config.common_args.nyxd_urls, + enabled_credentials_mode: run_config.common_args.enabled_credentials_mode, outfox: run_config.outfox, } } @@ -136,9 +103,9 @@ fn version_check(cfg: &Config) -> bool { } pub(crate) async fn execute(args: Run) -> Result<(), Box> { - eprintln!("Starting client {}...", args.id); + eprintln!("Starting client {}...", args.common_args.id); - let mut config = try_load_current_config(&args.id)?; + let mut config = try_load_current_config(&args.common_args.id)?; config = override_config(config, OverrideConfig::from(args.clone())); if !version_check(&config) { @@ -149,7 +116,7 @@ pub(crate) async fn execute(args: Run) -> Result<(), Box +// SPDX-License-Identifier: Apache-2.0 + +use nym_crypto::asymmetric::identity; +use std::path::PathBuf; + +#[cfg_attr(feature = "cli", derive(clap::Args))] +#[derive(Debug, Clone)] +pub struct CommonClientRunArgs { + /// Id of client we want to create config for. + #[cfg_attr(feature = "cli", clap(long))] + pub id: String, + + /// Id of the gateway we want to connect to. If overridden, it is user's responsibility to + /// ensure prior registration happened + #[cfg_attr(feature = "cli", clap(long))] + pub gateway: Option, + + /// Comma separated list of rest endpoints of the nyxd validators + #[cfg_attr( + feature = "cli", + clap(long, alias = "nyxd_validators", value_delimiter = ',', hide = true) + )] + pub nyxd_urls: Option>, + + /// Comma separated list of rest endpoints of the API validators + #[cfg_attr( + feature = "cli", + clap( + long, + alias = "api_validators", + value_delimiter = ',', + group = "network" + ) + )] + pub nym_apis: Option>, + + /// Path to .json file containing custom network specification. + #[cfg_attr(feature = "cli", clap(long, group = "network", hide = true))] + pub custom_mixnet: Option, + + /// Set this client to work in a enabled credentials mode that would attempt to use gateway + /// with bandwidth credential requirement. + #[cfg_attr(feature = "cli", clap(long, hide = true))] + pub enabled_credentials_mode: Option, + + /// Mostly debug-related option to increase default traffic rate so that you would not need to + /// modify config post init + #[arg(long, hide = true, conflicts_with = "medium_toggle")] + pub fastmode: bool, + + /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) + #[arg(long, hide = true, conflicts_with = "medium_toggle")] + pub no_cover: bool, +} diff --git a/common/client-core/src/init/mod.rs b/common/client-core/src/init/mod.rs index ab153378c2..c8acabd838 100644 --- a/common/client-core/src/init/mod.rs +++ b/common/client-core/src/init/mod.rs @@ -25,6 +25,7 @@ use serde::Serialize; use std::sync::Arc; pub mod client_init; +pub mod client_run; pub mod helpers; pub mod types; diff --git a/service-providers/network-requester/src/cli/run.rs b/service-providers/network-requester/src/cli/run.rs index c55e37ca48..7ab10102b1 100644 --- a/service-providers/network-requester/src/cli/run.rs +++ b/service-providers/network-requester/src/cli/run.rs @@ -8,16 +8,15 @@ use crate::{ }; use clap::Args; use log::error; -use std::path::PathBuf; +use nym_client_core::init::client_run::CommonClientRunArgs; const ENABLE_STATISTICS: &str = "enable-statistics"; #[allow(clippy::struct_excessive_bools)] #[derive(Args, Clone)] pub(crate) struct Run { - /// Id of the nym-mixnet-client we want to run. - #[arg(long)] - id: String, + #[command(flatten)] + common_args: CommonClientRunArgs, /// Specifies whether this network requester should run in 'open-proxy' mode #[arg(long)] @@ -32,24 +31,6 @@ pub(crate) struct Run { #[arg(long)] statistics_recipient: Option, - /// Set this client to work in a enabled credentials mode that would attempt to use gateway - /// with bandwidth credential requirement. - #[arg(long)] - enabled_credentials_mode: Option, - - /// Path to .json file containing custom network specification. - #[clap(long, group = "network", hide = true)] - custom_mixnet: Option, - - /// Mostly debug-related option to increase default traffic rate so that you would not need to - /// modify config post init - #[arg(long, hide = true, conflicts_with = "medium_toggle")] - fastmode: bool, - - /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) - #[arg(long, hide = true, conflicts_with = "medium_toggle")] - no_cover: bool, - /// Enable medium mixnet traffic, for experiments only. /// This includes things like disabling cover traffic, no per hop delays, etc. #[arg( @@ -71,21 +52,21 @@ impl From for OverrideConfig { fn from(run_config: Run) -> Self { OverrideConfig { nym_apis: None, - fastmode: run_config.fastmode, - no_cover: run_config.no_cover, + fastmode: run_config.common_args.fastmode, + no_cover: run_config.common_args.no_cover, medium_toggle: run_config.medium_toggle, - nyxd_urls: None, - enabled_credentials_mode: run_config.enabled_credentials_mode, + nyxd_urls: run_config.common_args.nyxd_urls, + enabled_credentials_mode: run_config.common_args.enabled_credentials_mode, enable_exit_policy: run_config.with_exit_policy, open_proxy: run_config.open_proxy, - enable_statistics: run_config.enabled_credentials_mode, + enable_statistics: run_config.enable_statistics, statistics_recipient: run_config.statistics_recipient, } } } pub(crate) async fn execute(args: &Run) -> Result<(), NetworkRequesterError> { - let mut config = try_load_current_config(&args.id)?; + let mut config = try_load_current_config(&args.common_args.id)?; config = override_config(config, OverrideConfig::from(args.clone())); log::debug!("Using config: {:#?}", config); @@ -112,7 +93,7 @@ pub(crate) async fn execute(args: &Run) -> Result<(), NetworkRequesterError> { log::info!("Starting socks5 service provider"); let mut server = crate::core::NRServiceProviderBuilder::new(config); - if let Some(custom_mixnet) = &args.custom_mixnet { + if let Some(custom_mixnet) = &args.common_args.custom_mixnet { server = server.with_stored_topology(custom_mixnet)? } From b3c7801f73c12a4bff9ab2d3025c9a3a8cb6fa31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 16:30:12 +0000 Subject: [PATCH 035/142] moved to different submodule --- clients/native/src/client/config/mod.rs | 4 ++-- clients/native/src/commands/init.rs | 2 +- clients/native/src/commands/run.rs | 2 +- clients/socks5/src/commands/init.rs | 2 +- clients/socks5/src/commands/run.rs | 2 +- clients/socks5/src/config/mod.rs | 4 ++-- .../client-core/src/{init => cli_helpers}/client_init.rs | 0 .../client-core/src/{init => cli_helpers}/client_run.rs | 0 common/client-core/src/cli_helpers/mod.rs | 5 +++++ common/client-core/src/init/mod.rs | 2 -- common/client-core/src/lib.rs | 1 + service-providers/network-requester/src/cli/init.rs | 2 +- service-providers/network-requester/src/cli/run.rs | 2 +- service-providers/network-requester/src/config/mod.rs | 8 ++++---- 14 files changed, 20 insertions(+), 16 deletions(-) rename common/client-core/src/{init => cli_helpers}/client_init.rs (100%) rename common/client-core/src/{init => cli_helpers}/client_run.rs (100%) create mode 100644 common/client-core/src/cli_helpers/mod.rs diff --git a/clients/native/src/client/config/mod.rs b/clients/native/src/client/config/mod.rs index 65185e579e..7fa28c8ab4 100644 --- a/clients/native/src/client/config/mod.rs +++ b/clients/native/src/client/config/mod.rs @@ -4,6 +4,8 @@ use crate::client::config::persistence::ClientPaths; use crate::client::config::template::CONFIG_TEMPLATE; use nym_bin_common::logging::LoggingSettings; +use nym_client_core::cli_helpers::client_init::ClientConfig; +use nym_client_core::config::disk_persistence::CommonClientPaths; use nym_config::defaults::DEFAULT_WEBSOCKET_LISTENING_PORT; use nym_config::{ must_get_home, read_config_from_toml_file, save_formatted_config_to_file, NymConfigTemplate, @@ -16,10 +18,8 @@ use std::net::{IpAddr, Ipv4Addr}; use std::path::{Path, PathBuf}; use std::str::FromStr; -use nym_client_core::config::disk_persistence::CommonClientPaths; pub use nym_client_core::config::Config as BaseClientConfig; pub use nym_client_core::config::{DebugConfig, GatewayEndpointConfig}; -use nym_client_core::init::client_init::ClientConfig; pub mod old_config_v1_1_13; pub mod old_config_v1_1_20; diff --git a/clients/native/src/commands/init.rs b/clients/native/src/commands/init.rs index 8c9edeec2a..0be76ab332 100644 --- a/clients/native/src/commands/init.rs +++ b/clients/native/src/commands/init.rs @@ -12,7 +12,7 @@ use crate::{ }; use clap::Args; use nym_bin_common::output_format::OutputFormat; -use nym_client_core::init::client_init::{ +use nym_client_core::cli_helpers::client_init::{ initialise_client, CommonClientInitArgs, InitResultsWithConfig, InitialisableClient, }; use serde::Serialize; diff --git a/clients/native/src/commands/run.rs b/clients/native/src/commands/run.rs index 7365b0773b..b836fe6d20 100644 --- a/clients/native/src/commands/run.rs +++ b/clients/native/src/commands/run.rs @@ -10,7 +10,7 @@ use crate::{ use clap::Args; use log::*; use nym_bin_common::version_checker::is_minor_version_compatible; -use nym_client_core::init::client_run::CommonClientRunArgs; +use nym_client_core::cli_helpers::client_run::CommonClientRunArgs; use std::error::Error; use std::net::IpAddr; diff --git a/clients/socks5/src/commands/init.rs b/clients/socks5/src/commands/init.rs index d0c7e5e842..98e2393bf2 100644 --- a/clients/socks5/src/commands/init.rs +++ b/clients/socks5/src/commands/init.rs @@ -11,7 +11,7 @@ use crate::{ }; use clap::Args; use nym_bin_common::output_format::OutputFormat; -use nym_client_core::init::client_init::{ +use nym_client_core::cli_helpers::client_init::{ initialise_client, CommonClientInitArgs, InitResultsWithConfig, InitialisableClient, }; use nym_sphinx::addressing::clients::Recipient; diff --git a/clients/socks5/src/commands/run.rs b/clients/socks5/src/commands/run.rs index cc0500b894..5638c80d9b 100644 --- a/clients/socks5/src/commands/run.rs +++ b/clients/socks5/src/commands/run.rs @@ -10,9 +10,9 @@ use crate::{ use clap::Args; use log::*; use nym_bin_common::version_checker::is_minor_version_compatible; +use nym_client_core::cli_helpers::client_run::CommonClientRunArgs; use nym_client_core::client::base_client::storage::OnDiskPersistent; use nym_client_core::client::topology_control::geo_aware_provider::CountryGroup; -use nym_client_core::init::client_run::CommonClientRunArgs; use nym_socks5_client_core::NymClient; use nym_sphinx::addressing::clients::Recipient; use std::net::IpAddr; diff --git a/clients/socks5/src/config/mod.rs b/clients/socks5/src/config/mod.rs index 9f4c23720f..9df903e64b 100644 --- a/clients/socks5/src/config/mod.rs +++ b/clients/socks5/src/config/mod.rs @@ -3,6 +3,8 @@ use crate::config::template::CONFIG_TEMPLATE; use nym_bin_common::logging::LoggingSettings; +use nym_client_core::cli_helpers::client_init::ClientConfig; +use nym_client_core::config::disk_persistence::CommonClientPaths; use nym_config::{ must_get_home, read_config_from_toml_file, save_formatted_config_to_file, NymConfigTemplate, DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, DEFAULT_DATA_DIR, NYM_DIR, @@ -15,9 +17,7 @@ use std::path::{Path, PathBuf}; use std::str::FromStr; pub use crate::config::persistence::SocksClientPaths; -use nym_client_core::config::disk_persistence::CommonClientPaths; pub use nym_client_core::config::Config as BaseClientConfig; -use nym_client_core::init::client_init::ClientConfig; pub use nym_socks5_client_core::config::Config as CoreConfig; pub mod old_config_v1_1_13; diff --git a/common/client-core/src/init/client_init.rs b/common/client-core/src/cli_helpers/client_init.rs similarity index 100% rename from common/client-core/src/init/client_init.rs rename to common/client-core/src/cli_helpers/client_init.rs diff --git a/common/client-core/src/init/client_run.rs b/common/client-core/src/cli_helpers/client_run.rs similarity index 100% rename from common/client-core/src/init/client_run.rs rename to common/client-core/src/cli_helpers/client_run.rs diff --git a/common/client-core/src/cli_helpers/mod.rs b/common/client-core/src/cli_helpers/mod.rs new file mode 100644 index 0000000000..874663b75e --- /dev/null +++ b/common/client-core/src/cli_helpers/mod.rs @@ -0,0 +1,5 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +pub mod client_init; +pub mod client_run; diff --git a/common/client-core/src/init/mod.rs b/common/client-core/src/init/mod.rs index c8acabd838..395fdd45c2 100644 --- a/common/client-core/src/init/mod.rs +++ b/common/client-core/src/init/mod.rs @@ -24,8 +24,6 @@ use serde::de::DeserializeOwned; use serde::Serialize; use std::sync::Arc; -pub mod client_init; -pub mod client_run; pub mod helpers; pub mod types; diff --git a/common/client-core/src/lib.rs b/common/client-core/src/lib.rs index 386e498e53..83b3c0f393 100644 --- a/common/client-core/src/lib.rs +++ b/common/client-core/src/lib.rs @@ -1,5 +1,6 @@ use std::future::Future; +pub mod cli_helpers; pub mod client; pub mod config; pub mod error; diff --git a/service-providers/network-requester/src/cli/init.rs b/service-providers/network-requester/src/cli/init.rs index 35ddedc279..101b976172 100644 --- a/service-providers/network-requester/src/cli/init.rs +++ b/service-providers/network-requester/src/cli/init.rs @@ -10,7 +10,7 @@ use crate::{ }; use clap::Args; use nym_bin_common::output_format::OutputFormat; -use nym_client_core::init::client_init::{ +use nym_client_core::cli_helpers::client_init::{ initialise_client, CommonClientInitArgs, InitResultsWithConfig, InitialisableClient, }; use serde::Serialize; diff --git a/service-providers/network-requester/src/cli/run.rs b/service-providers/network-requester/src/cli/run.rs index 7ab10102b1..929ba57661 100644 --- a/service-providers/network-requester/src/cli/run.rs +++ b/service-providers/network-requester/src/cli/run.rs @@ -8,7 +8,7 @@ use crate::{ }; use clap::Args; use log::error; -use nym_client_core::init::client_run::CommonClientRunArgs; +use nym_client_core::cli_helpers::client_run::CommonClientRunArgs; const ENABLE_STATISTICS: &str = "enable-statistics"; diff --git a/service-providers/network-requester/src/config/mod.rs b/service-providers/network-requester/src/config/mod.rs index 8fee1c6725..faaf3487ee 100644 --- a/service-providers/network-requester/src/config/mod.rs +++ b/service-providers/network-requester/src/config/mod.rs @@ -4,12 +4,16 @@ use crate::config::persistence::NetworkRequesterPaths; use crate::config::template::CONFIG_TEMPLATE; use nym_bin_common::logging::LoggingSettings; +use nym_client_core::cli_helpers::client_init::ClientConfig; +use nym_client_core::config::disk_persistence::CommonClientPaths; use nym_config::{ must_get_home, read_config_from_toml_file, save_formatted_config_to_file, serde_helpers::de_maybe_stringified, NymConfigTemplate, OptionalSet, DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, DEFAULT_DATA_DIR, NYM_DIR, }; +use nym_network_defaults::mainnet; use nym_service_providers_common::DEFAULT_SERVICE_PROVIDERS_DIR; +use nym_sphinx::params::PacketSize; use serde::{Deserialize, Serialize}; use std::io; use std::path::{Path, PathBuf}; @@ -17,12 +21,8 @@ use std::str::FromStr; use std::time::Duration; use url::Url; -use nym_client_core::config::disk_persistence::CommonClientPaths; pub use nym_client_core::config::Config as BaseClientConfig; pub use nym_client_core::config::{DebugConfig, GatewayEndpointConfig}; -use nym_client_core::init::client_init::ClientConfig; -use nym_network_defaults::mainnet; -use nym_sphinx::params::PacketSize; pub mod old_config_v1_1_13; pub mod old_config_v1_1_20; From 4a4b0ab7e0311054c9baa76086df6d17f30683f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 16:32:13 +0000 Subject: [PATCH 036/142] putting no cover and fastmode to common args --- clients/native/src/commands/init.rs | 13 ++----------- clients/socks5/src/commands/init.rs | 13 ++----------- common/client-core/src/cli_helpers/client_init.rs | 9 +++++++++ common/client-core/src/cli_helpers/client_run.rs | 10 ++++++++-- service-providers/network-requester/src/cli/init.rs | 4 ++-- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/clients/native/src/commands/init.rs b/clients/native/src/commands/init.rs index 0be76ab332..27f62bd05b 100644 --- a/clients/native/src/commands/init.rs +++ b/clients/native/src/commands/init.rs @@ -68,15 +68,6 @@ pub(crate) struct Init { #[clap(long)] host: Option, - /// Mostly debug-related option to increase default traffic rate so that you would not need to - /// modify config post init - #[clap(long, hide = true)] - fastmode: bool, - - /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) - #[clap(long, hide = true)] - no_cover: bool, - #[clap(short, long, default_value_t = OutputFormat::default())] output: OutputFormat, } @@ -94,8 +85,8 @@ impl From for OverrideConfig { disable_socket: init_config.disable_socket, port: init_config.port, host: init_config.host, - fastmode: init_config.fastmode, - no_cover: init_config.no_cover, + fastmode: init_config.common_args.fastmode, + no_cover: init_config.common_args.no_cover, nyxd_urls: init_config.common_args.nyxd_urls, enabled_credentials_mode: init_config.common_args.enabled_credentials_mode, diff --git a/clients/socks5/src/commands/init.rs b/clients/socks5/src/commands/init.rs index 98e2393bf2..44a247316e 100644 --- a/clients/socks5/src/commands/init.rs +++ b/clients/socks5/src/commands/init.rs @@ -77,15 +77,6 @@ pub(crate) struct Init { #[clap(long)] host: Option, - /// Mostly debug-related option to increase default traffic rate so that you would not need to - /// modify config post init - #[clap(long, hide = true)] - fastmode: bool, - - /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) - #[clap(long, hide = true)] - no_cover: bool, - #[clap(short, long, default_value_t = OutputFormat::default())] output: OutputFormat, } @@ -103,8 +94,8 @@ impl From for OverrideConfig { ip: init_config.host, port: init_config.port, use_anonymous_replies: init_config.use_reply_surbs, - fastmode: init_config.fastmode, - no_cover: init_config.no_cover, + fastmode: init_config.common_args.fastmode, + no_cover: init_config.common_args.no_cover, geo_routing: None, medium_toggle: false, nyxd_urls: init_config.common_args.nyxd_urls, diff --git a/common/client-core/src/cli_helpers/client_init.rs b/common/client-core/src/cli_helpers/client_init.rs index 42f9987f44..c43ebf4545 100644 --- a/common/client-core/src/cli_helpers/client_init.rs +++ b/common/client-core/src/cli_helpers/client_init.rs @@ -88,6 +88,15 @@ pub struct CommonClientInitArgs { /// with bandwidth credential requirement. #[cfg_attr(feature = "cli", clap(long, hide = true))] pub enabled_credentials_mode: Option, + + /// Mostly debug-related option to increase default traffic rate so that you would not need to + /// modify config post init + #[cfg_attr(feature = "cli", clap(long, hide = true))] + pub fastmode: bool, + + /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) + #[cfg_attr(feature = "cli", clap(long, hide = true))] + pub no_cover: bool, } pub struct InitResultsWithConfig { diff --git a/common/client-core/src/cli_helpers/client_run.rs b/common/client-core/src/cli_helpers/client_run.rs index 8db3d49c38..594a3a34cb 100644 --- a/common/client-core/src/cli_helpers/client_run.rs +++ b/common/client-core/src/cli_helpers/client_run.rs @@ -46,10 +46,16 @@ pub struct CommonClientRunArgs { /// Mostly debug-related option to increase default traffic rate so that you would not need to /// modify config post init - #[arg(long, hide = true, conflicts_with = "medium_toggle")] + #[cfg_attr( + feature = "cli", + clap(long, hide = true, conflicts_with = "medium_toggle") + )] pub fastmode: bool, /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) - #[arg(long, hide = true, conflicts_with = "medium_toggle")] + #[cfg_attr( + feature = "cli", + clap(long, hide = true, conflicts_with = "medium_toggle") + )] pub no_cover: bool, } diff --git a/service-providers/network-requester/src/cli/init.rs b/service-providers/network-requester/src/cli/init.rs index 101b976172..d8439247b5 100644 --- a/service-providers/network-requester/src/cli/init.rs +++ b/service-providers/network-requester/src/cli/init.rs @@ -80,8 +80,8 @@ impl From for OverrideConfig { fn from(init_config: Init) -> Self { OverrideConfig { nym_apis: init_config.common_args.nym_apis, - fastmode: false, - no_cover: false, + fastmode: init_config.common_args.fastmode, + no_cover: init_config.common_args.no_cover, medium_toggle: false, nyxd_urls: init_config.common_args.nyxd_urls, enabled_credentials_mode: init_config.common_args.enabled_credentials_mode, From 00179d563bca8c7933122649f55bba8bd0eceb76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 17:06:36 +0000 Subject: [PATCH 037/142] removed the contracicting flag --- common/client-core/src/cli_helpers/client_run.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/common/client-core/src/cli_helpers/client_run.rs b/common/client-core/src/cli_helpers/client_run.rs index 594a3a34cb..7864e4059f 100644 --- a/common/client-core/src/cli_helpers/client_run.rs +++ b/common/client-core/src/cli_helpers/client_run.rs @@ -46,16 +46,14 @@ pub struct CommonClientRunArgs { /// Mostly debug-related option to increase default traffic rate so that you would not need to /// modify config post init - #[cfg_attr( - feature = "cli", - clap(long, hide = true, conflicts_with = "medium_toggle") - )] + // note: we removed the 'conflicts_with = medium_toggle', but that's fine since NR + // has defined the conflict on that field itself + #[cfg_attr(feature = "cli", clap(long, hide = true))] pub fastmode: bool, /// Disable loop cover traffic and the Poisson rate limiter (for debugging only) - #[cfg_attr( - feature = "cli", - clap(long, hide = true, conflicts_with = "medium_toggle") - )] + // note: we removed the 'conflicts_with = medium_toggle', but that's fine since NR + // has defined the conflict on that field itself + #[cfg_attr(feature = "cli", clap(long, hide = true))] pub no_cover: bool, } From 30000126d1e016b497d61179e4d0f3981af2c07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 17:12:13 +0000 Subject: [PATCH 038/142] Incorporate basic nym-node HTTP API (with swagger) to mixnodes (#4075) * basic nym-node router * loading legacy routes * dead code * config migrations --- .../mixnode-common/src/verloc/measurement.rs | 4 +- mixnode/src/commands/init.rs | 5 +- mixnode/src/commands/mod.rs | 41 +-- mixnode/src/commands/node_details.rs | 2 +- mixnode/src/commands/run.rs | 4 +- mixnode/src/commands/sign.rs | 4 +- mixnode/src/commands/upgrade_helpers.rs | 66 +++++ mixnode/src/config/mod.rs | 72 ++++- mixnode/src/config/old_config_v1_1_21.rs | 18 +- mixnode/src/config/old_config_v1_1_32.rs | 263 ++++++++++++++++++ mixnode/src/config/template.rs | 25 +- mixnode/src/error.rs | 41 ++- mixnode/src/node/helpers.rs | 52 ++++ .../src/node/http/{ => legacy}/description.rs | 0 .../src/node/http/{ => legacy}/hardware.rs | 0 mixnode/src/node/http/legacy/mod.rs | 49 ++++ mixnode/src/node/http/{ => legacy}/state.rs | 4 +- mixnode/src/node/http/{ => legacy}/stats.rs | 0 mixnode/src/node/http/{ => legacy}/verloc.rs | 2 +- mixnode/src/node/http/mod.rs | 114 +++++++- mixnode/src/node/mod.rs | 99 ++----- mixnode/src/node/node_statistics.rs | 17 +- nym-node/src/config/mod.rs | 1 + nym-node/src/http/router/mod.rs | 6 + nym-wallet/Cargo.lock | 10 + 25 files changed, 751 insertions(+), 148 deletions(-) create mode 100644 mixnode/src/commands/upgrade_helpers.rs create mode 100644 mixnode/src/config/old_config_v1_1_32.rs create mode 100644 mixnode/src/node/helpers.rs rename mixnode/src/node/http/{ => legacy}/description.rs (100%) rename mixnode/src/node/http/{ => legacy}/hardware.rs (100%) create mode 100644 mixnode/src/node/http/legacy/mod.rs rename mixnode/src/node/http/{ => legacy}/state.rs (89%) rename mixnode/src/node/http/{ => legacy}/stats.rs (100%) rename mixnode/src/node/http/{ => legacy}/verloc.rs (97%) diff --git a/common/mixnode-common/src/verloc/measurement.rs b/common/mixnode-common/src/verloc/measurement.rs index a1584dee99..0e7d312f84 100644 --- a/common/mixnode-common/src/verloc/measurement.rs +++ b/common/mixnode-common/src/verloc/measurement.rs @@ -9,12 +9,12 @@ use std::sync::Arc; use std::time::Duration; use tokio::sync::RwLock; -#[derive(Clone)] +#[derive(Clone, Default)] pub struct AtomicVerlocResult { inner: Arc>, } -#[derive(Debug, Clone, Serialize)] +#[derive(Debug, Clone, Serialize, Default)] pub struct VerlocResult { total_tested: usize, #[serde(with = "humantime_serde")] diff --git a/mixnode/src/commands/init.rs b/mixnode/src/commands/init.rs index c0834686ee..31a45dfe96 100644 --- a/mixnode/src/commands/init.rs +++ b/mixnode/src/commands/init.rs @@ -62,7 +62,7 @@ fn init_paths(id: &str) -> io::Result<()> { fs::create_dir_all(default_config_directory(id)) } -pub(crate) fn execute(args: &Init) { +pub(crate) fn execute(args: &Init) -> anyhow::Result<()> { let override_config_fields = OverrideConfig::from(args.clone()); let id = override_config_fields.id.clone(); eprintln!("Initialising mixnode {id}..."); @@ -118,5 +118,6 @@ pub(crate) fn execute(args: &Init) { ); eprintln!("Mixnode configuration completed.\n\n\n"); - MixNode::new(config).print_node_details(args.output) + MixNode::new(config)?.print_node_details(args.output); + Ok(()) } diff --git a/mixnode/src/commands/mod.rs b/mixnode/src/commands/mod.rs index 17a2bd3a59..068089f9d9 100644 --- a/mixnode/src/commands/mod.rs +++ b/mixnode/src/commands/mod.rs @@ -1,9 +1,9 @@ // Copyright 2020 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::config::old_config_v1_1_21::ConfigV1_1_21; +use crate::config::default_config_filepath; +use crate::error::MixnodeError; use crate::{config::Config, Cli}; -use anyhow::anyhow; use clap::CommandFactory; use clap::Subcommand; use colored::Colorize; @@ -22,6 +22,7 @@ mod init; mod node_details; mod run; mod sign; +mod upgrade_helpers; #[derive(Subcommand)] pub(crate) enum Commands { @@ -65,7 +66,7 @@ pub(crate) async fn execute(args: Cli) -> anyhow::Result<()> { match args.command { Commands::Describe(m) => describe::execute(m)?, - Commands::Init(m) => init::execute(&m), + Commands::Init(m) => init::execute(&m)?, Commands::Run(m) => run::execute(&m).await?, Commands::Sign(m) => sign::execute(&m)?, Commands::NodeDetails(m) => node_details::execute(&m)?, @@ -131,32 +132,18 @@ pub(crate) fn version_check(cfg: &Config) -> bool { } } -fn try_upgrade_v1_1_21_config(id: &str) -> std::io::Result<()> { - use nym_config::legacy_helpers::nym_config::MigrationNymConfig; - - // explicitly load it as v1.1.21 (which is incompatible with the current, i.e. 1.1.22+) - let Ok(old_config) = ConfigV1_1_21::load_from_file(id) else { - // if we failed to load it, there might have been nothing to upgrade - // or maybe it was an even older file. in either way. just ignore it and carry on with our day - return Ok(()); - }; - info!("It seems the mixnode is using <= v1.1.21 config template."); - info!("It is going to get updated to the current specification."); - - let updated: Config = old_config.into(); - updated.save_to_default_location() -} - -fn try_load_current_config(id: &str) -> anyhow::Result { - try_upgrade_v1_1_21_config(id)?; +fn try_load_current_config(id: &str) -> Result { + upgrade_helpers::try_upgrade_config(id)?; Config::read_from_default_path(id).map_err(|err| { - let error_msg = - format!( - "Failed to load config for {id}. Are you sure you have run `init` before? (Error was: {err})", - ); - error!("{error_msg}"); - anyhow!(error_msg) + error!( + "Failed to load config for {id}. Are you sure you have run `init` before? (Error was: {err})", + ); + MixnodeError::ConfigLoadFailure { + path: default_config_filepath(id), + id: id.to_string(), + source: err, + } }) } diff --git a/mixnode/src/commands/node_details.rs b/mixnode/src/commands/node_details.rs index c26bad8cab..c4b17c645f 100644 --- a/mixnode/src/commands/node_details.rs +++ b/mixnode/src/commands/node_details.rs @@ -19,6 +19,6 @@ pub(crate) struct NodeDetails { pub(crate) fn execute(args: &NodeDetails) -> anyhow::Result<()> { let config = try_load_current_config(&args.id)?; - MixNode::new(config).print_node_details(args.output); + MixNode::new(config)?.print_node_details(args.output); Ok(()) } diff --git a/mixnode/src/commands/run.rs b/mixnode/src/commands/run.rs index 0fded783b8..0ca0550679 100644 --- a/mixnode/src/commands/run.rs +++ b/mixnode/src/commands/run.rs @@ -84,13 +84,13 @@ pub(crate) async fn execute(args: &Run) -> anyhow::Result<()> { show_binding_warning(&config.mixnode.listening_address.to_string()); } - let mut mixnode = MixNode::new(config); + let mut mixnode = MixNode::new(config)?; eprintln!( "\nTo bond your mixnode you will need to install the Nym wallet, go to https://nymtech.net/get-involved and select the Download button.\n\ Select the correct version and install it to your machine. You will need to provide the following: \n "); mixnode.print_node_details(args.output); - mixnode.run().await; + mixnode.run().await?; Ok(()) } diff --git a/mixnode/src/commands/sign.rs b/mixnode/src/commands/sign.rs index 9650f53273..7864ef5504 100644 --- a/mixnode/src/commands/sign.rs +++ b/mixnode/src/commands/sign.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::commands::{try_load_current_config, validate_bech32_address_or_exit}; -use crate::node::MixNode; +use crate::node::helpers::load_identity_keys; use anyhow::{bail, Result}; use clap::{ArgGroup, Args}; use log::error; @@ -127,7 +127,7 @@ pub(crate) fn execute(args: &Sign) -> anyhow::Result<()> { bail!(err); } }; - let identity_keypair = MixNode::load_identity_keys(&config); + let identity_keypair = load_identity_keys(&config)?; match signed_target { SignedTarget::Text(text) => { diff --git a/mixnode/src/commands/upgrade_helpers.rs b/mixnode/src/commands/upgrade_helpers.rs new file mode 100644 index 0000000000..cf64c27158 --- /dev/null +++ b/mixnode/src/commands/upgrade_helpers.rs @@ -0,0 +1,66 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::config::old_config_v1_1_21::ConfigV1_1_21; +use crate::config::old_config_v1_1_32::ConfigV1_1_32; +use crate::config::{default_config_filepath, Config}; +use crate::error::MixnodeError; +use log::info; + +fn try_upgrade_v1_1_21_config(id: &str) -> Result { + use nym_config::legacy_helpers::nym_config::MigrationNymConfig; + + // explicitly load it as v1.1.21 (which is incompatible with the current, i.e. 1.1.22+) + let Ok(old_config) = ConfigV1_1_21::load_from_file(id) else { + // if we failed to load it, there might have been nothing to upgrade + // or maybe it was an even older file. in either way. just ignore it and carry on with our day + return Ok(false); + }; + info!("It seems the mixnode is using <= v1.1.21 config template."); + info!("It is going to get updated to the current specification."); + + let updated_step1: ConfigV1_1_32 = old_config.into(); + + let updated: Config = updated_step1.into(); + updated + .save_to_default_location() + .map_err(|err| MixnodeError::ConfigSaveFailure { + path: default_config_filepath(id), + id: id.to_string(), + source: err, + })?; + + Ok(true) +} + +fn try_upgrade_v1_1_32_config(id: &str) -> Result { + // explicitly load it as v1.1.32 (which is incompatible with the current, i.e. 1.1.22+) + let Ok(old_config) = ConfigV1_1_32::read_from_default_path(id) else { + // if we failed to load it, there might have been nothing to upgrade + // or maybe it was an even older file. in either way. just ignore it and carry on with our day + return Ok(false); + }; + info!("It seems the mixnode is using <= v1.1.32 config template."); + info!("It is going to get updated to the current specification."); + + let updated: Config = old_config.into(); + updated + .save_to_default_location() + .map_err(|err| MixnodeError::ConfigSaveFailure { + path: default_config_filepath(id), + id: id.to_string(), + source: err, + })?; + + Ok(true) +} + +pub(crate) fn try_upgrade_config(id: &str) -> Result<(), MixnodeError> { + if try_upgrade_v1_1_21_config(id)? { + return Ok(()); + } + if try_upgrade_v1_1_32_config(id)? { + return Ok(()); + } + Ok(()) +} diff --git a/mixnode/src/config/mod.rs b/mixnode/src/config/mod.rs index 7a6a73e06a..97ad26d699 100644 --- a/mixnode/src/config/mod.rs +++ b/mixnode/src/config/mod.rs @@ -3,6 +3,7 @@ use crate::config::persistence::paths::MixNodePaths; use crate::config::template::CONFIG_TEMPLATE; +use log::{debug, warn}; use nym_bin_common::logging::LoggingSettings; use nym_config::defaults::{ mainnet, DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, @@ -13,15 +14,17 @@ use nym_config::{ must_get_home, read_config_from_toml_file, save_formatted_config_to_file, NymConfigTemplate, DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, DEFAULT_DATA_DIR, NYM_DIR, }; +use nym_node::config; use serde::{Deserialize, Serialize}; use std::io; -use std::net::IpAddr; +use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::time::Duration; use url::Url; pub(crate) mod old_config_v1_1_21; +pub(crate) mod old_config_v1_1_32; pub mod persistence; mod template; @@ -70,9 +73,28 @@ pub fn default_data_directory>(id: P) -> PathBuf { .join(DEFAULT_DATA_DIR) } +fn default_mixnode_http_config() -> config::Http { + config::Http { + bind_address: SocketAddr::new( + IpAddr::V4(Ipv4Addr::UNSPECIFIED), + DEFAULT_HTTP_API_LISTENING_PORT, + ), + landing_page_assets_path: None, + } +} + #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(deny_unknown_fields)] pub struct Config { + // additional metadata holding on-disk location of this config file + #[serde(skip)] + pub(crate) save_path: Option, + + pub host: config::Host, + + #[serde(default = "default_mixnode_http_config")] + pub http: config::Http, + pub mixnode: MixNode, pub storage_paths: MixNodePaths, @@ -95,8 +117,17 @@ impl NymConfigTemplate for Config { impl Config { pub fn new>(id: S) -> Self { + let default_mixnode = MixNode::new_default(id.as_ref()); + Config { - mixnode: MixNode::new_default(id.as_ref()), + save_path: None, + host: config::Host { + // this is a very bad default! + public_ips: vec![default_mixnode.listening_address], + hostname: None, + }, + http: default_mixnode_http_config(), + mixnode: default_mixnode, storage_paths: MixNodePaths::new_default(id.as_ref()), verloc: Default::default(), logging: Default::default(), @@ -104,12 +135,24 @@ impl Config { } } + // simple wrapper that reads config file and assigns path location + fn read_from_path>(path: P) -> io::Result { + let path = path.as_ref(); + let mut loaded: Config = read_config_from_toml_file(path)?; + loaded.save_path = Some(path.to_path_buf()); + debug!("loaded config file from {}", path.display()); + Ok(loaded) + } + + // currently this is dead code, but once we allow loading configs from custom paths + // well, we will have to be using it + #[allow(dead_code)] pub fn read_from_toml_file>(path: P) -> io::Result { - read_config_from_toml_file(path) + Self::read_from_path(path) } pub fn read_from_default_path>(id: P) -> io::Result { - Self::read_from_toml_file(default_config_filepath(id)) + Self::read_from_path(default_config_filepath(id)) } pub fn default_location(&self) -> PathBuf { @@ -121,6 +164,15 @@ impl Config { save_formatted_config_to_file(self, config_save_location) } + pub fn try_save(&self) -> io::Result<()> { + if let Some(save_location) = &self.save_path { + save_formatted_config_to_file(self, save_location) + } else { + warn!("config file save location is unknown. falling back to the default"); + self.save_to_default_location() + } + } + // builder methods pub fn with_custom_nym_apis(mut self, nym_api_urls: Vec) -> Self { self.mixnode.nym_api_urls = nym_api_urls; @@ -129,6 +181,10 @@ impl Config { pub fn with_listening_address(mut self, listening_address: IpAddr) -> Self { self.mixnode.listening_address = listening_address; + + let http_port = self.http.bind_address.port(); + self.http.bind_address = SocketAddr::new(listening_address, http_port); + self } @@ -143,7 +199,8 @@ impl Config { } pub fn with_http_api_port(mut self, port: u16) -> Self { - self.mixnode.http_api_port = port; + let http_ip = self.http.bind_address.ip(); + self.http.bind_address = SocketAddr::new(http_ip, port); self } @@ -171,10 +228,6 @@ pub struct MixNode { /// (default: 1790) pub verloc_port: u16, - /// Port used for listening for http requests. - /// (default: 8000) - pub http_api_port: u16, - /// Addresses to nym APIs from which the node gets the view of the network. pub nym_api_urls: Vec, } @@ -187,7 +240,6 @@ impl MixNode { listening_address: inaddr_any(), mix_port: DEFAULT_MIX_LISTENING_PORT, verloc_port: DEFAULT_VERLOC_LISTENING_PORT, - http_api_port: DEFAULT_HTTP_API_LISTENING_PORT, nym_api_urls: vec![Url::from_str(mainnet::NYM_API).expect("Invalid default API URL")], } } diff --git a/mixnode/src/config/old_config_v1_1_21.rs b/mixnode/src/config/old_config_v1_1_21.rs index 5baa6307df..fc4ae148a0 100644 --- a/mixnode/src/config/old_config_v1_1_21.rs +++ b/mixnode/src/config/old_config_v1_1_21.rs @@ -1,8 +1,10 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use crate::config::old_config_v1_1_32::{ + ConfigV1_1_32, DebugV1_1_32, MixNodeV1_1_32, VerlocV1_1_32, +}; use crate::config::persistence::paths::{KeysPaths, MixNodePaths}; -use crate::config::{Config, Debug, MixNode, Verloc}; use nym_bin_common::logging::LoggingSettings; use nym_config::legacy_helpers::nym_config::MigrationNymConfig; use nym_validator_client::nyxd; @@ -67,13 +69,13 @@ pub struct ConfigV1_1_21 { debug: DebugV1_1_21, } -impl From for Config { +impl From for ConfigV1_1_32 { fn from(value: ConfigV1_1_21) -> Self { let node_description = ConfigV1_1_21::default_config_directory(&value.mixnode.id).join(DESCRIPTION_FILE); - Config { - mixnode: MixNode { + ConfigV1_1_32 { + mixnode: MixNodeV1_1_32 { version: value.mixnode.version, id: value.mixnode.id, listening_address: value.mixnode.listening_address, @@ -169,9 +171,9 @@ struct VerlocV1_1_21 { retry_timeout: Duration, } -impl From for Verloc { +impl From for VerlocV1_1_32 { fn from(value: VerlocV1_1_21) -> Self { - Verloc { + VerlocV1_1_32 { packets_per_node: value.packets_per_node, connection_timeout: value.connection_timeout, packet_timeout: value.packet_timeout, @@ -220,9 +222,9 @@ struct DebugV1_1_21 { use_legacy_framed_packet_version: bool, } -impl From for Debug { +impl From for DebugV1_1_32 { fn from(value: DebugV1_1_21) -> Self { - Debug { + DebugV1_1_32 { node_stats_logging_delay: value.node_stats_logging_delay, node_stats_updating_delay: value.node_stats_updating_delay, packet_forwarding_initial_backoff: value.packet_forwarding_initial_backoff, diff --git a/mixnode/src/config/old_config_v1_1_32.rs b/mixnode/src/config/old_config_v1_1_32.rs new file mode 100644 index 0000000000..92947a3234 --- /dev/null +++ b/mixnode/src/config/old_config_v1_1_32.rs @@ -0,0 +1,263 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::config::persistence::paths::MixNodePaths; +use crate::config::{Config, Debug, MixNode, Verloc}; +use nym_bin_common::logging::LoggingSettings; +use nym_config::{ + must_get_home, read_config_from_toml_file, DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, NYM_DIR, +}; +use serde::{Deserialize, Serialize}; +use std::io; +use std::net::{IpAddr, SocketAddr}; +use std::path::{Path, PathBuf}; +use std::time::Duration; +use url::Url; + +const DEFAULT_MIXNODES_DIR: &str = "mixnodes"; + +// 'RTT MEASUREMENT' +const DEFAULT_PACKETS_PER_NODE: usize = 100; +const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_millis(5000); +const DEFAULT_PACKET_TIMEOUT: Duration = Duration::from_millis(1500); +const DEFAULT_DELAY_BETWEEN_PACKETS: Duration = Duration::from_millis(50); +const DEFAULT_BATCH_SIZE: usize = 50; +const DEFAULT_TESTING_INTERVAL: Duration = Duration::from_secs(60 * 60 * 12); +const DEFAULT_RETRY_TIMEOUT: Duration = Duration::from_secs(60 * 30); + +// 'DEBUG' +const DEFAULT_NODE_STATS_LOGGING_DELAY: Duration = Duration::from_millis(60_000); +const DEFAULT_NODE_STATS_UPDATING_DELAY: Duration = Duration::from_millis(30_000); +const DEFAULT_PACKET_FORWARDING_INITIAL_BACKOFF: Duration = Duration::from_millis(10_000); +const DEFAULT_PACKET_FORWARDING_MAXIMUM_BACKOFF: Duration = Duration::from_millis(300_000); +const DEFAULT_INITIAL_CONNECTION_TIMEOUT: Duration = Duration::from_millis(1_500); +const DEFAULT_MAXIMUM_CONNECTION_BUFFER_SIZE: usize = 2000; + +/// Derive default path to mixnodes's config directory. +/// It should get resolved to `$HOME/.nym/mixnodes//config` +fn default_config_directory>(id: P) -> PathBuf { + must_get_home() + .join(NYM_DIR) + .join(DEFAULT_MIXNODES_DIR) + .join(id) + .join(DEFAULT_CONFIG_DIR) +} + +/// Derive default path to mixnodes's config file. +/// It should get resolved to `$HOME/.nym/mixnodes//config/config.toml` +fn default_config_filepath>(id: P) -> PathBuf { + default_config_directory(id).join(DEFAULT_CONFIG_FILENAME) +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(deny_unknown_fields)] +pub struct ConfigV1_1_32 { + pub mixnode: MixNodeV1_1_32, + + // i hope this laziness is not going to backfire... + pub storage_paths: MixNodePaths, + + #[serde(default)] + pub verloc: VerlocV1_1_32, + + #[serde(default)] + pub logging: LoggingSettings, + + #[serde(default)] + pub debug: DebugV1_1_32, +} + +impl ConfigV1_1_32 { + pub fn read_from_default_path>(id: P) -> io::Result { + read_config_from_toml_file(default_config_filepath(id)) + } +} + +impl From for Config { + fn from(value: ConfigV1_1_32) -> Self { + Config { + // \/ ADDED + save_path: None, + // /\ ADDED + + // \/ ADDED + host: nym_node::config::Host { + // this is a very bad default! + public_ips: vec![value.mixnode.listening_address], + hostname: None, + }, + // /\ ADDED + + // \/ ADDED + http: nym_node::config::Http { + bind_address: SocketAddr::new( + value.mixnode.listening_address, + value.mixnode.http_api_port, + ), + landing_page_assets_path: None, + }, + // /\ ADDED + mixnode: MixNode { + version: value.mixnode.version, + id: value.mixnode.id, + listening_address: value.mixnode.listening_address, + mix_port: value.mixnode.mix_port, + verloc_port: value.mixnode.verloc_port, + nym_api_urls: value.mixnode.nym_api_urls, + }, + storage_paths: value.storage_paths, + verloc: value.verloc.into(), + logging: value.logging, + debug: value.debug.into(), + } + } +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +pub struct MixNodeV1_1_32 { + /// Version of the mixnode for which this configuration was created. + pub version: String, + + /// ID specifies the human readable ID of this particular mixnode. + pub id: String, + + /// Address to which this mixnode will bind to and will be listening for packets. + pub listening_address: IpAddr, + + /// Port used for listening for all mixnet traffic. + /// (default: 1789) + pub mix_port: u16, + + /// Port used for listening for verloc traffic. + /// (default: 1790) + pub verloc_port: u16, + + /// Port used for listening for http requests. + /// (default: 8000) + pub http_api_port: u16, + + /// Addresses to nym APIs from which the node gets the view of the network. + pub nym_api_urls: Vec, +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(deny_unknown_fields)] +pub struct VerlocV1_1_32 { + /// Specifies number of echo packets sent to each node during a measurement run. + pub packets_per_node: usize, + + /// Specifies maximum amount of time to wait for the connection to get established. + #[serde(with = "humantime_serde")] + pub connection_timeout: Duration, + + /// Specifies maximum amount of time to wait for the reply packet to arrive before abandoning the test. + #[serde(with = "humantime_serde")] + pub packet_timeout: Duration, + + /// Specifies delay between subsequent test packets being sent (after receiving a reply). + #[serde(with = "humantime_serde")] + pub delay_between_packets: Duration, + + /// Specifies number of nodes being tested at once. + pub tested_nodes_batch_size: usize, + + /// Specifies delay between subsequent test runs. + #[serde(with = "humantime_serde")] + pub testing_interval: Duration, + + /// Specifies delay between attempting to run the measurement again if the previous run failed + /// due to being unable to get the list of nodes. + #[serde(with = "humantime_serde")] + pub retry_timeout: Duration, +} + +impl From for Verloc { + fn from(value: VerlocV1_1_32) -> Self { + Verloc { + packets_per_node: value.packets_per_node, + connection_timeout: value.connection_timeout, + packet_timeout: value.packet_timeout, + delay_between_packets: value.delay_between_packets, + tested_nodes_batch_size: value.tested_nodes_batch_size, + testing_interval: value.testing_interval, + retry_timeout: value.retry_timeout, + } + } +} + +impl Default for VerlocV1_1_32 { + fn default() -> Self { + VerlocV1_1_32 { + packets_per_node: DEFAULT_PACKETS_PER_NODE, + connection_timeout: DEFAULT_CONNECTION_TIMEOUT, + packet_timeout: DEFAULT_PACKET_TIMEOUT, + delay_between_packets: DEFAULT_DELAY_BETWEEN_PACKETS, + tested_nodes_batch_size: DEFAULT_BATCH_SIZE, + testing_interval: DEFAULT_TESTING_INTERVAL, + retry_timeout: DEFAULT_RETRY_TIMEOUT, + } + } +} + +#[derive(Debug, Deserialize, PartialEq, Serialize)] +#[serde(default)] +pub struct DebugV1_1_32 { + /// Delay between each subsequent node statistics being logged to the console + #[serde(with = "humantime_serde")] + pub node_stats_logging_delay: Duration, + + /// Delay between each subsequent node statistics being updated + #[serde(with = "humantime_serde")] + pub node_stats_updating_delay: Duration, + + /// Initial value of an exponential backoff to reconnect to dropped TCP connection when + /// forwarding sphinx packets. + #[serde(with = "humantime_serde")] + pub packet_forwarding_initial_backoff: Duration, + + /// Maximum value of an exponential backoff to reconnect to dropped TCP connection when + /// forwarding sphinx packets. + #[serde(with = "humantime_serde")] + pub packet_forwarding_maximum_backoff: Duration, + + /// Timeout for establishing initial connection when trying to forward a sphinx packet. + #[serde(with = "humantime_serde")] + pub initial_connection_timeout: Duration, + + /// Maximum number of packets that can be stored waiting to get sent to a particular connection. + pub maximum_connection_buffer_size: usize, + + /// Specifies whether the mixnode should be using the legacy framing for the sphinx packets. + // it's set to true by default. The reason for that decision is to preserve compatibility with the + // existing nodes whilst everyone else is upgrading and getting the code for handling the new field. + // It shall be disabled in the subsequent releases. + pub use_legacy_framed_packet_version: bool, +} + +impl From for Debug { + fn from(value: DebugV1_1_32) -> Self { + Debug { + node_stats_logging_delay: value.node_stats_logging_delay, + node_stats_updating_delay: value.node_stats_updating_delay, + packet_forwarding_initial_backoff: value.packet_forwarding_initial_backoff, + packet_forwarding_maximum_backoff: value.packet_forwarding_maximum_backoff, + initial_connection_timeout: value.initial_connection_timeout, + maximum_connection_buffer_size: value.maximum_connection_buffer_size, + use_legacy_framed_packet_version: value.use_legacy_framed_packet_version, + } + } +} + +impl Default for DebugV1_1_32 { + fn default() -> Self { + DebugV1_1_32 { + node_stats_logging_delay: DEFAULT_NODE_STATS_LOGGING_DELAY, + node_stats_updating_delay: DEFAULT_NODE_STATS_UPDATING_DELAY, + packet_forwarding_initial_backoff: DEFAULT_PACKET_FORWARDING_INITIAL_BACKOFF, + packet_forwarding_maximum_backoff: DEFAULT_PACKET_FORWARDING_MAXIMUM_BACKOFF, + initial_connection_timeout: DEFAULT_INITIAL_CONNECTION_TIMEOUT, + maximum_connection_buffer_size: DEFAULT_MAXIMUM_CONNECTION_BUFFER_SIZE, + use_legacy_framed_packet_version: false, + } + } +} diff --git a/mixnode/src/config/template.rs b/mixnode/src/config/template.rs index a885a1ecbb..b7f9433ae5 100644 --- a/mixnode/src/config/template.rs +++ b/mixnode/src/config/template.rs @@ -11,6 +11,19 @@ pub(crate) const CONFIG_TEMPLATE: &str = r#" ##### main base mixnode config options ##### +[host] +# Ip address(es) of this host, such as 1.1.1.1 that external clients will use for connections. +# currently not in active use for mixnodes +public_ips = [ + {{#each host.public_ips }} + '{{this}}', + {{/each}} +] + +# (temporary) Optional hostname of this node, for example nymtech.net. +# currently not in active use for mixnodes +hostname = '{{ host.hostname }}' + [mixnode] # Version of the mixnode for which this configuration was created. version = '{{ mixnode.version }}' @@ -29,10 +42,6 @@ mix_port = {{ mixnode.mix_port }} # (default: 1790) verloc_port = {{ mixnode.verloc_port }} -# Port used for listening for http requests. -# (default: 8000) -http_api_port = {{ mixnode.http_api_port }} - # Addresses to APIs running on validator from which the node gets the view of the network. nym_api_urls = [ {{#each mixnode.nym_api_urls }} @@ -40,6 +49,14 @@ nym_api_urls = [ {{/each}} ] +[http] +# Socket address this node will use for binding its http API. +# default: `0.0.0.0:8000` +bind_address = '{{ http.bind_address }}' + +# Path to assets directory of custom landing page of this node +landing_page_assets_path = '{{ http.landing_page_assets_path }}' + [storage_paths] # Path to file containing private identity key. diff --git a/mixnode/src/error.rs b/mixnode/src/error.rs index a0ee647852..a5f80b10d4 100644 --- a/mixnode/src/error.rs +++ b/mixnode/src/error.rs @@ -1,10 +1,49 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use std::io; +use std::path::PathBuf; use thiserror::Error; #[derive(Debug, Error)] -pub(crate) enum MixnodeError { +pub enum MixnodeError { + #[error("failed to load {keys} keys from '{}' (private key) and '{}' (public key): {err}", .paths.private_key_path.display(), .paths.public_key_path.display())] + KeyPairLoadFailure { + keys: String, + paths: nym_pemstore::KeyPairPath, + #[source] + err: io::Error, + }, + + #[allow(dead_code)] + #[error("failed to load {key} public key from '{}': {err}", .path.display())] + PublicKeyLoadFailure { + key: String, + path: PathBuf, + #[source] + err: io::Error, + }, + + #[error( + "failed to load config file for id {id} using path '{}'. detailed message: {source}", path.display() + )] + ConfigLoadFailure { + id: String, + path: PathBuf, + #[source] + source: io::Error, + }, + + #[error( + "failed to save config file for id {id} using path '{}'. detailed message: {source}", path.display() + )] + ConfigSaveFailure { + id: String, + path: PathBuf, + #[source] + source: io::Error, + }, + // TODO: in the future this should work the other way, i.e. NymNode depending on Gateway errors #[error(transparent)] NymNodeError(#[from] nym_node::error::NymNodeError), diff --git a/mixnode/src/node/helpers.rs b/mixnode/src/node/helpers.rs new file mode 100644 index 0000000000..955f4f98fe --- /dev/null +++ b/mixnode/src/node/helpers.rs @@ -0,0 +1,52 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::config::Config; +use crate::error::MixnodeError; +use nym_crypto::asymmetric::{encryption, identity}; +use nym_pemstore::traits::{PemStorableKey, PemStorableKeyPair}; +use nym_pemstore::KeyPairPath; +use std::path::Path; + +pub(crate) fn load_keypair( + paths: KeyPairPath, + name: impl Into, +) -> Result { + nym_pemstore::load_keypair(&paths).map_err(|err| MixnodeError::KeyPairLoadFailure { + keys: name.into(), + paths, + err, + }) +} + +#[allow(unused)] +pub(crate) fn load_public_key(path: P, name: S) -> Result +where + T: PemStorableKey, + P: AsRef, + S: Into, +{ + nym_pemstore::load_key(path.as_ref()).map_err(|err| MixnodeError::PublicKeyLoadFailure { + key: name.into(), + path: path.as_ref().to_path_buf(), + err, + }) +} + +/// Loads identity keys stored on disk +pub(crate) fn load_identity_keys(config: &Config) -> Result { + let identity_paths = KeyPairPath::new( + config.storage_paths.keys.private_identity_key(), + config.storage_paths.keys.public_identity_key(), + ); + load_keypair(identity_paths, "mixnode identity") +} + +/// Loads Sphinx keys stored on disk +pub(crate) fn load_sphinx_keys(config: &Config) -> Result { + let sphinx_paths = KeyPairPath::new( + config.storage_paths.keys.private_encryption_key(), + config.storage_paths.keys.public_encryption_key(), + ); + load_keypair(sphinx_paths, "mixnode sphinx") +} diff --git a/mixnode/src/node/http/description.rs b/mixnode/src/node/http/legacy/description.rs similarity index 100% rename from mixnode/src/node/http/description.rs rename to mixnode/src/node/http/legacy/description.rs diff --git a/mixnode/src/node/http/hardware.rs b/mixnode/src/node/http/legacy/hardware.rs similarity index 100% rename from mixnode/src/node/http/hardware.rs rename to mixnode/src/node/http/legacy/hardware.rs diff --git a/mixnode/src/node/http/legacy/mod.rs b/mixnode/src/node/http/legacy/mod.rs new file mode 100644 index 0000000000..49230ebbec --- /dev/null +++ b/mixnode/src/node/http/legacy/mod.rs @@ -0,0 +1,49 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::node::http::legacy::description::description; +use crate::node::http::legacy::hardware::hardware; +use crate::node::http::legacy::state::MixnodeAppState; +use crate::node::http::legacy::stats::stats; +use crate::node::http::legacy::verloc::verloc; +use crate::node::node_description::NodeDescription; +use axum::http::{StatusCode, Uri}; +use axum::response::IntoResponse; +use axum::routing::get; +use axum::Router; + +pub(crate) mod description; +pub(crate) mod hardware; +pub(crate) mod state; +pub(crate) mod stats; +pub(crate) mod verloc; + +pub(crate) async fn not_found(uri: Uri) -> impl IntoResponse { + ( + StatusCode::NOT_FOUND, + format!("I couldn't find '{uri}'. Try something else?"), + ) +} + +pub(crate) mod api_routes { + pub(crate) const VERLOC: &str = "/verloc"; + pub(crate) const DESCRIPTION: &str = "/description"; + pub(crate) const STATS: &str = "/stats"; + pub(crate) const HARDWARE: &str = "/hardware"; +} + +pub(crate) fn routes( + state: MixnodeAppState, + descriptor: NodeDescription, +) -> Router { + Router::new() + .route(api_routes::VERLOC, get(verloc)) + .route( + api_routes::DESCRIPTION, + get(move |query| description(descriptor, query)), + ) + .route(api_routes::STATS, get(stats)) + .route(api_routes::HARDWARE, get(hardware)) + .fallback(not_found) + .with_state(state) +} diff --git a/mixnode/src/node/http/state.rs b/mixnode/src/node/http/legacy/state.rs similarity index 89% rename from mixnode/src/node/http/state.rs rename to mixnode/src/node/http/legacy/state.rs index 4cc3e7b8d6..2b3016185c 100644 --- a/mixnode/src/node/http/state.rs +++ b/mixnode/src/node/http/legacy/state.rs @@ -1,12 +1,12 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::node::http::verloc::VerlocState; +use crate::node::http::legacy::verloc::VerlocState; use crate::node::node_statistics::SharedNodeStats; use axum::extract::FromRef; // this is a temporary thing for the transition period -#[derive(Clone)] +#[derive(Clone, Default)] pub(crate) struct MixnodeAppState { pub(crate) verloc: VerlocState, pub(crate) stats: SharedNodeStats, diff --git a/mixnode/src/node/http/stats.rs b/mixnode/src/node/http/legacy/stats.rs similarity index 100% rename from mixnode/src/node/http/stats.rs rename to mixnode/src/node/http/legacy/stats.rs diff --git a/mixnode/src/node/http/verloc.rs b/mixnode/src/node/http/legacy/verloc.rs similarity index 97% rename from mixnode/src/node/http/verloc.rs rename to mixnode/src/node/http/legacy/verloc.rs index 1848f48f6c..18a263e713 100644 --- a/mixnode/src/node/http/verloc.rs +++ b/mixnode/src/node/http/legacy/verloc.rs @@ -2,7 +2,7 @@ use axum::extract::{Query, State}; use nym_mixnode_common::verloc::{AtomicVerlocResult, VerlocResult}; use nym_node::http::api::{FormattedResponse, OutputParams}; -#[derive(Clone)] +#[derive(Clone, Default)] pub(crate) struct VerlocState { shared: AtomicVerlocResult, } diff --git a/mixnode/src/node/http/mod.rs b/mixnode/src/node/http/mod.rs index ddedce8215..a3a0d49ce2 100644 --- a/mixnode/src/node/http/mod.rs +++ b/mixnode/src/node/http/mod.rs @@ -1,15 +1,105 @@ -pub(crate) mod description; -pub(crate) mod hardware; -pub(crate) mod state; -pub(crate) mod stats; -pub(crate) mod verloc; +use crate::config::Config; +use crate::error::MixnodeError; +use crate::node::http::legacy::verloc::VerlocState; +use crate::node::node_description::NodeDescription; +use crate::node::node_statistics::SharedNodeStats; +use log::info; +use nym_bin_common::bin_info_owned; +use nym_crypto::asymmetric::{encryption, identity}; +use nym_node::error::NymNodeError; +use nym_node::http::api::api_requests; +use nym_node::http::api::api_requests::SignedHostInformation; +use nym_task::TaskClient; -use axum::http::{StatusCode, Uri}; -use axum::response::IntoResponse; +pub(crate) mod legacy; -pub(crate) async fn not_found(uri: Uri) -> impl IntoResponse { - ( - StatusCode::NOT_FOUND, - format!("I couldn't find '{uri}'. Try something else?"), - ) +fn load_host_details( + config: &Config, + sphinx_key: &encryption::PublicKey, + identity_keypair: &identity::KeyPair, +) -> Result { + let host_info = api_requests::v1::node::models::HostInformation { + ip_address: config.host.public_ips.clone(), + hostname: config.host.hostname.clone(), + keys: api_requests::v1::node::models::HostKeys { + ed25519: identity_keypair.public_key().to_base58_string(), + x25519: sphinx_key.to_base58_string(), + }, + }; + + let signed_info = SignedHostInformation::new(host_info, identity_keypair.private_key()) + .map_err(NymNodeError::from)?; + Ok(signed_info) +} + +fn load_mixnode_details( + _config: &Config, +) -> Result { + Ok(api_requests::v1::mixnode::models::Mixnode {}) +} + +pub(crate) struct HttpApiBuilder<'a> { + mixnode_config: &'a Config, + identity_keypair: &'a identity::KeyPair, + sphinx_keypair: &'a encryption::KeyPair, + legacy_mixnode: legacy::state::MixnodeAppState, + legacy_descriptor: NodeDescription, +} + +impl<'a> HttpApiBuilder<'a> { + pub(crate) fn new( + mixnode_config: &'a Config, + identity_keypair: &'a identity::KeyPair, + sphinx_keypair: &'a encryption::KeyPair, + ) -> Self { + HttpApiBuilder { + mixnode_config, + identity_keypair, + sphinx_keypair, + legacy_mixnode: legacy::state::MixnodeAppState::default(), + legacy_descriptor: Default::default(), + } + } + + #[must_use] + pub(crate) fn with_verloc(mut self, verloc: VerlocState) -> Self { + self.legacy_mixnode.verloc = verloc; + self + } + + #[must_use] + pub(crate) fn with_mixing_stats(mut self, stats: SharedNodeStats) -> Self { + self.legacy_mixnode.stats = stats; + self + } + + #[must_use] + pub(crate) fn with_descriptor(mut self, descriptor: NodeDescription) -> Self { + self.legacy_descriptor = descriptor; + self + } + + pub(crate) fn start(self, task_client: TaskClient) -> Result<(), MixnodeError> { + let bind_address = self.mixnode_config.http.bind_address; + info!("Starting HTTP API on http://{bind_address}",); + + let config = nym_node::http::Config::new( + bin_info_owned!(), + load_host_details( + self.mixnode_config, + self.sphinx_keypair.public_key(), + self.identity_keypair, + )?, + ) + .with_mixnode(load_mixnode_details(self.mixnode_config)?) + .with_landing_page_assets(self.mixnode_config.http.landing_page_assets_path.as_ref()); + + let router = nym_node::http::NymNodeRouter::new(config, None); + let server = router + .with_merged(legacy::routes(self.legacy_mixnode, self.legacy_descriptor)) + .build_server(&bind_address)? + .with_task_client(task_client); + tokio::spawn(async move { server.run().await }); + Ok(()) + } } diff --git a/mixnode/src/node/mod.rs b/mixnode/src/node/mod.rs index a73c5a10a4..f1b330e69a 100644 --- a/mixnode/src/node/mod.rs +++ b/mixnode/src/node/mod.rs @@ -2,26 +2,21 @@ // SPDX-License-Identifier: Apache-2.0 use crate::config::Config; -use crate::node::http::description::description; -use crate::node::http::hardware::hardware; -use crate::node::http::not_found; -use crate::node::http::state::MixnodeAppState; -use crate::node::http::stats::stats; -use crate::node::http::verloc::{verloc, VerlocState}; +use crate::error::MixnodeError; +use crate::node::helpers::{load_identity_keys, load_sphinx_keys}; +use crate::node::http::legacy::verloc::VerlocState; +use crate::node::http::HttpApiBuilder; use crate::node::listener::connection_handler::packet_processing::PacketProcessor; use crate::node::listener::connection_handler::ConnectionHandler; use crate::node::listener::Listener; use crate::node::node_description::NodeDescription; use crate::node::node_statistics::SharedNodeStats; use crate::node::packet_delayforwarder::{DelayForwarder, PacketDelayForwardSender}; -use axum::routing::get; -use axum::Router; use log::{error, info, warn}; use nym_bin_common::output_format::OutputFormat; use nym_bin_common::version_checker::parse_version; use nym_crypto::asymmetric::{encryption, identity}; use nym_mixnode_common::verloc::{self, AtomicVerlocResult, VerlocMeasurer}; -use nym_node::http::middleware::logging; use nym_task::{TaskClient, TaskManager}; use rand::seq::SliceRandom; use rand::thread_rng; @@ -29,6 +24,7 @@ use std::net::SocketAddr; use std::process; use std::sync::Arc; +pub(crate) mod helpers; mod http; mod listener; pub(crate) mod node_description; @@ -44,41 +40,19 @@ pub struct MixNode { } impl MixNode { - pub fn new(config: Config) -> Self { - MixNode { + pub fn new(config: Config) -> Result { + Ok(MixNode { descriptor: Self::load_node_description(&config), - identity_keypair: Arc::new(Self::load_identity_keys(&config)), - sphinx_keypair: Arc::new(Self::load_sphinx_keys(&config)), + identity_keypair: Arc::new(load_identity_keys(&config)?), + sphinx_keypair: Arc::new(load_sphinx_keys(&config)?), config, - } + }) } fn load_node_description(config: &Config) -> NodeDescription { NodeDescription::load_from_file(&config.storage_paths.node_description).unwrap_or_default() } - /// Loads identity keys stored on disk - pub(crate) fn load_identity_keys(config: &Config) -> identity::KeyPair { - let identity_keypair: identity::KeyPair = - nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new( - config.storage_paths.keys.private_identity_key(), - config.storage_paths.keys.public_identity_key(), - )) - .expect("Failed to read stored identity key files"); - identity_keypair - } - - /// Loads Sphinx keys stored on disk - fn load_sphinx_keys(config: &Config) -> encryption::KeyPair { - let sphinx_keypair: encryption::KeyPair = - nym_pemstore::load_keypair(&nym_pemstore::KeyPairPath::new( - config.storage_paths.keys.private_encryption_key(), - config.storage_paths.keys.public_encryption_key(), - )) - .expect("Failed to read stored sphinx key files"); - sphinx_keypair - } - /// Prints relevant node details to the console pub(crate) fn print_node_details(&self, output: OutputFormat) { let node_details = nym_types::mixnode::MixnodeNodeDetailsResponse { @@ -87,7 +61,7 @@ impl MixNode { bind_address: self.config.mixnode.listening_address, version: self.config.mixnode.version.clone(), mix_port: self.config.mixnode.mix_port, - http_api_port: self.config.mixnode.http_api_port, + http_api_port: self.config.http.bind_address.port(), verloc_port: self.config.mixnode.verloc_port, }; @@ -98,39 +72,13 @@ impl MixNode { &self, atomic_verloc_result: AtomicVerlocResult, node_stats_pointer: SharedNodeStats, - ) { - let bind_address = SocketAddr::new( - self.config.mixnode.listening_address, - self.config.mixnode.http_api_port, - ); - - info!("Starting HTTP API on http://{bind_address}",); - - let state = MixnodeAppState { - verloc: VerlocState::new(atomic_verloc_result), - stats: node_stats_pointer, - }; - - let router = Router::new() - .route("/verloc", get(verloc)) - .route( - "/description", - get({ - let descriptor = self.descriptor.clone(); - move |query| description(descriptor, query) - }), - ) - .route("/stats", get(stats)) - .route("/hardware", get(hardware)) - .fallback(not_found) - .layer(axum::middleware::from_fn(logging::logger)) - .with_state(state); - - tokio::spawn(async move { - axum::Server::bind(&bind_address) - .serve(router.into_make_service_with_connect_info::()) - .await - }); + task_client: TaskClient, + ) -> Result<(), MixnodeError> { + HttpApiBuilder::new(&self.config, &self.identity_keypair, &self.sphinx_keypair) + .with_verloc(VerlocState::new(atomic_verloc_result)) + .with_mixing_stats(node_stats_pointer) + .with_descriptor(self.descriptor.clone()) + .start(task_client) } fn start_node_stats_controller( @@ -272,7 +220,7 @@ impl MixNode { log::info!("Stopping nym mixnode"); } - pub async fn run(&mut self) { + pub async fn run(&mut self) -> Result<(), MixnodeError> { info!("Starting nym mixnode"); if self.check_if_bonded().await { @@ -298,9 +246,14 @@ impl MixNode { // Rocket handles shutdown on it's own, but its shutdown handling should be incorporated // with that of the rest of the tasks. // Currently it's runtime is forcefully terminated once the mixnode exits. - self.start_http_api(atomic_verloc_results, node_stats_pointer); + self.start_http_api( + atomic_verloc_results, + node_stats_pointer, + shutdown.subscribe().named("http-api"), + )?; info!("Finished nym mixnode startup procedure - it should now be able to receive mix traffic!"); - self.wait_for_interrupt(shutdown).await + self.wait_for_interrupt(shutdown).await; + Ok(()) } } diff --git a/mixnode/src/node/node_statistics.rs b/mixnode/src/node/node_statistics.rs index 72f85c6001..78895b85ce 100644 --- a/mixnode/src/node/node_statistics.rs +++ b/mixnode/src/node/node_statistics.rs @@ -16,7 +16,7 @@ type PacketsMap = HashMap; type PacketDataReceiver = mpsc::UnboundedReceiver; type PacketDataSender = mpsc::UnboundedSender; -#[derive(Clone)] +#[derive(Clone, Default)] pub(crate) struct SharedNodeStats { inner: Arc>, } @@ -104,6 +104,21 @@ pub struct NodeStats { packets_explicitly_dropped_since_last_update: PacketsMap, } +impl Default for NodeStats { + fn default() -> Self { + NodeStats { + update_time: SystemTime::UNIX_EPOCH, + previous_update_time: SystemTime::UNIX_EPOCH, + packets_received_since_startup: 0, + packets_sent_since_startup: Default::default(), + packets_explicitly_dropped_since_startup: Default::default(), + packets_received_since_last_update: 0, + packets_sent_since_last_update: Default::default(), + packets_explicitly_dropped_since_last_update: Default::default(), + } + } +} + impl NodeStats { pub(crate) fn simplify(&self) -> NodeStatsSimple { NodeStatsSimple { diff --git a/nym-node/src/config/mod.rs b/nym-node/src/config/mod.rs index 958b912c7b..ad4a9a8823 100644 --- a/nym-node/src/config/mod.rs +++ b/nym-node/src/config/mod.rs @@ -43,6 +43,7 @@ impl Host { pub struct Http { /// Socket address this node will use for binding its http API. /// default: `0.0.0.0:8080` + /// note: for legacy reasons, it defaults to port `8000` for mixnodes. pub bind_address: SocketAddr, /// Path to assets directory of custom landing page of this node. diff --git a/nym-node/src/http/router/mod.rs b/nym-node/src/http/router/mod.rs index 3548266373..d24033f1bc 100644 --- a/nym-node/src/http/router/mod.rs +++ b/nym-node/src/http/router/mod.rs @@ -124,6 +124,12 @@ impl NymNodeRouter { self } + #[must_use] + pub fn with_merged(mut self, router: Router) -> Self { + self.inner = self.inner.merge(router); + self + } + pub fn build_server( self, bind_address: &SocketAddr, diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index a2922d8391..8696afe916 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -3431,6 +3431,15 @@ dependencies = [ "nym-contracts-common", ] +[[package]] +name = "nym-exit-policy" +version = "0.1.0" +dependencies = [ + "serde", + "thiserror", + "tracing", +] + [[package]] name = "nym-group-contract-common" version = "0.1.0" @@ -3510,6 +3519,7 @@ dependencies = [ "base64 0.21.4", "nym-bin-common", "nym-crypto", + "nym-exit-policy", "nym-wireguard-types", "schemars", "serde", From 5fcaacc39af378a152976b398a689c3863a6705d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 30 Oct 2023 17:16:08 +0000 Subject: [PATCH 039/142] wasm lock --- common/client-core/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/common/client-core/src/lib.rs b/common/client-core/src/lib.rs index 83b3c0f393..0b401f4e02 100644 --- a/common/client-core/src/lib.rs +++ b/common/client-core/src/lib.rs @@ -1,5 +1,6 @@ use std::future::Future; +#[cfg(not(target_arch = "wasm32"))] pub mod cli_helpers; pub mod client; pub mod config; From b48dc0b38ab1e863629d25a5dc045da7bc35436f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 09:53:28 +0100 Subject: [PATCH 040/142] Rename to old_config_v1_1_31.rs --- .../src/config/{old_config_v1_1_30.rs => old_config_v1_1_31.rs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename gateway/src/config/{old_config_v1_1_30.rs => old_config_v1_1_31.rs} (100%) diff --git a/gateway/src/config/old_config_v1_1_30.rs b/gateway/src/config/old_config_v1_1_31.rs similarity index 100% rename from gateway/src/config/old_config_v1_1_30.rs rename to gateway/src/config/old_config_v1_1_31.rs From cf234ecf8237507121d44dc9cb54257fb3d217c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 09:58:08 +0100 Subject: [PATCH 041/142] Update files to reflect new filename --- gateway/src/commands/upgrade_helpers.rs | 14 +++---- gateway/src/config/mod.rs | 2 +- gateway/src/config/old_config_v1_1_29.rs | 22 +++++------ gateway/src/config/old_config_v1_1_31.rs | 48 ++++++++++++------------ 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/gateway/src/commands/upgrade_helpers.rs b/gateway/src/commands/upgrade_helpers.rs index f5c9b14953..e09e6f827d 100644 --- a/gateway/src/commands/upgrade_helpers.rs +++ b/gateway/src/commands/upgrade_helpers.rs @@ -4,7 +4,7 @@ use crate::config::old_config_v1_1_20::ConfigV1_1_20; use crate::config::old_config_v1_1_28::ConfigV1_1_28; use crate::config::old_config_v1_1_29::ConfigV1_1_29; -use crate::config::old_config_v1_1_30::ConfigV1_1_30; +use crate::config::old_config_v1_1_31::ConfigV1_1_31; use crate::config::{default_config_filepath, Config}; use crate::error::GatewayError; use log::info; @@ -23,7 +23,7 @@ fn try_upgrade_v1_1_20_config(id: &str) -> Result { let updated_step1: ConfigV1_1_28 = old_config.into(); let updated_step2: ConfigV1_1_29 = updated_step1.into(); - let updated_step3: ConfigV1_1_30 = updated_step2.into(); + let updated_step3: ConfigV1_1_31 = updated_step2.into(); let updated: Config = updated_step3.into(); updated .save_to_default_location() @@ -47,7 +47,7 @@ fn try_upgrade_v1_1_28_config(id: &str) -> Result { info!("It is going to get updated to the current specification."); let updated_step1: ConfigV1_1_29 = old_config.into(); - let updated_step2: ConfigV1_1_30 = updated_step1.into(); + let updated_step2: ConfigV1_1_31 = updated_step1.into(); let updated: Config = updated_step2.into(); updated .save_to_default_location() @@ -70,7 +70,7 @@ fn try_upgrade_v1_1_29_config(id: &str) -> Result { info!("It seems the gateway is using <= v1.1.29 config template."); info!("It is going to get updated to the current specification."); - let updated_step1: ConfigV1_1_30 = old_config.into(); + let updated_step1: ConfigV1_1_31 = old_config.into(); let updated: Config = updated_step1.into(); updated .save_to_default_location() @@ -83,9 +83,9 @@ fn try_upgrade_v1_1_29_config(id: &str) -> Result { Ok(true) } -fn try_upgrade_v1_1_30_config(id: &str) -> Result { +fn try_upgrade_v1_1_31_config(id: &str) -> Result { // explicitly load it as v1.1.30 (which is incompatible with the current, i.e. 1.1.31+) - let Ok(old_config) = ConfigV1_1_30::read_from_default_path(id) else { + let Ok(old_config) = ConfigV1_1_31::read_from_default_path(id) else { // if we failed to load it, there might have been nothing to upgrade // or maybe it was an even older file. in either way. just ignore it and carry on with our day return Ok(false); @@ -115,7 +115,7 @@ pub(crate) fn try_upgrade_config(id: &str) -> Result<(), GatewayError> { if try_upgrade_v1_1_29_config(id)? { return Ok(()); } - if try_upgrade_v1_1_30_config(id)? { + if try_upgrade_v1_1_31_config(id)? { return Ok(()); } diff --git a/gateway/src/config/mod.rs b/gateway/src/config/mod.rs index a1adbf86bf..6705d7a737 100644 --- a/gateway/src/config/mod.rs +++ b/gateway/src/config/mod.rs @@ -24,7 +24,7 @@ use zeroize::{Zeroize, ZeroizeOnDrop}; pub(crate) mod old_config_v1_1_20; pub(crate) mod old_config_v1_1_28; pub(crate) mod old_config_v1_1_29; -pub(crate) mod old_config_v1_1_30; +pub(crate) mod old_config_v1_1_31; pub mod persistence; mod template; diff --git a/gateway/src/config/old_config_v1_1_29.rs b/gateway/src/config/old_config_v1_1_29.rs index 842e0a8275..bbd939b16a 100644 --- a/gateway/src/config/old_config_v1_1_29.rs +++ b/gateway/src/config/old_config_v1_1_29.rs @@ -11,9 +11,9 @@ use std::path::{Path, PathBuf}; use std::time::Duration; use url::Url; -use super::old_config_v1_1_30::{ - ConfigV1_1_30, DebugV1_1_30, GatewayPathsV1_1_30, GatewayV1_1_30, KeysPathsV1_1_30, - LoggingSettingsV1_1_30, NetworkRequesterV1_1_30, +use super::old_config_v1_1_31::{ + ConfigV1_1_31, DebugV1_1_31, GatewayPathsV1_1_31, GatewayV1_1_31, KeysPathsV1_1_31, + LoggingSettingsV1_1_31, NetworkRequesterV1_1_31, }; const DEFAULT_GATEWAYS_DIR: &str = "gateways"; @@ -107,9 +107,9 @@ impl ConfigV1_1_29 { } } -impl From for ConfigV1_1_30 { +impl From for ConfigV1_1_31 { fn from(value: ConfigV1_1_29) -> Self { - ConfigV1_1_30 { + ConfigV1_1_31 { save_path: value.save_path, // \/ ADDED @@ -123,7 +123,7 @@ impl From for ConfigV1_1_30 { // \/ ADDED http: Default::default(), // /\ ADDED - gateway: GatewayV1_1_30 { + gateway: GatewayV1_1_31 { version: value.gateway.version, id: value.gateway.id, only_coconut_credentials: value.gateway.only_coconut_credentials, @@ -143,8 +143,8 @@ impl From for ConfigV1_1_30 { // \/ ADDED wireguard: Default::default(), // /\ ADDED - storage_paths: GatewayPathsV1_1_30 { - keys: KeysPathsV1_1_30 { + storage_paths: GatewayPathsV1_1_31 { + keys: KeysPathsV1_1_31 { private_identity_key_file: value.storage_paths.keys.private_identity_key_file, public_identity_key_file: value.storage_paths.keys.public_identity_key_file, private_sphinx_key_file: value.storage_paths.keys.private_sphinx_key_file, @@ -153,11 +153,11 @@ impl From for ConfigV1_1_30 { clients_storage: value.storage_paths.clients_storage, network_requester_config: value.storage_paths.network_requester_config, }, - network_requester: NetworkRequesterV1_1_30 { + network_requester: NetworkRequesterV1_1_31 { enabled: value.network_requester.enabled, }, - logging: LoggingSettingsV1_1_30 {}, - debug: DebugV1_1_30 { + logging: LoggingSettingsV1_1_31 {}, + debug: DebugV1_1_31 { packet_forwarding_initial_backoff: value.debug.packet_forwarding_initial_backoff, packet_forwarding_maximum_backoff: value.debug.packet_forwarding_maximum_backoff, initial_connection_timeout: value.debug.initial_connection_timeout, diff --git a/gateway/src/config/old_config_v1_1_31.rs b/gateway/src/config/old_config_v1_1_31.rs index 66dcbdea60..122772f5ef 100644 --- a/gateway/src/config/old_config_v1_1_31.rs +++ b/gateway/src/config/old_config_v1_1_31.rs @@ -71,7 +71,7 @@ pub fn default_config_filepath>(id: P) -> PathBuf { #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(deny_unknown_fields)] -pub struct ConfigV1_1_30 { +pub struct ConfigV1_1_31 { // additional metadata holding on-disk location of this config file #[serde(skip)] pub(crate) save_path: Option, @@ -81,31 +81,31 @@ pub struct ConfigV1_1_30 { #[serde(default)] pub http: nym_node::config::Http, - pub gateway: GatewayV1_1_30, + pub gateway: GatewayV1_1_31, #[serde(default)] // currently not really used for anything useful - pub wireguard: WireguardV1_1_30, + pub wireguard: WireguardV1_1_31, - pub storage_paths: GatewayPathsV1_1_30, + pub storage_paths: GatewayPathsV1_1_31, - pub network_requester: NetworkRequesterV1_1_30, + pub network_requester: NetworkRequesterV1_1_31, #[serde(default)] - pub logging: LoggingSettingsV1_1_30, + pub logging: LoggingSettingsV1_1_31, #[serde(default)] - pub debug: DebugV1_1_30, + pub debug: DebugV1_1_31, } -impl ConfigV1_1_30 { +impl ConfigV1_1_31 { pub fn read_from_default_path>(id: P) -> io::Result { read_config_from_toml_file(default_config_filepath(id)) } } -impl From for Config { - fn from(value: ConfigV1_1_30) -> Self { +impl From for Config { + fn from(value: ConfigV1_1_31) -> Self { Self { save_path: value.save_path, host: value.host, @@ -169,7 +169,7 @@ impl From for Config { } #[derive(Debug, Deserialize, PartialEq, Eq, Serialize)] -pub struct GatewayV1_1_30 { +pub struct GatewayV1_1_31 { /// Version of the gateway for which this configuration was created. pub version: String, @@ -220,7 +220,7 @@ pub struct GatewayV1_1_30 { #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(default)] #[serde(deny_unknown_fields)] -pub struct WireguardV1_1_30 { +pub struct WireguardV1_1_31 { /// Specifies whether the wireguard service is enabled on this node. pub enabled: bool, @@ -233,10 +233,10 @@ pub struct WireguardV1_1_30 { pub announced_port: u16, /// Paths for wireguard keys, client registries, etc. - pub storage_paths: WireguardPathsV1_1_30, + pub storage_paths: WireguardPathsV1_1_31, } -impl Default for WireguardV1_1_30 { +impl Default for WireguardV1_1_31 { fn default() -> Self { Self { enabled: false, @@ -245,21 +245,21 @@ impl Default for WireguardV1_1_30 { nym_node::config::DEFAULT_WIREGUARD_PORT, ), announced_port: nym_node::config::DEFAULT_WIREGUARD_PORT, - storage_paths: WireguardPathsV1_1_30 {}, + storage_paths: WireguardPathsV1_1_31 {}, } } } #[derive(Debug, Clone, Deserialize, PartialEq, Eq, Serialize)] #[serde(deny_unknown_fields)] -pub struct WireguardPathsV1_1_30 { +pub struct WireguardPathsV1_1_31 { // pub keys: } #[derive(Debug, Clone, Deserialize, PartialEq, Eq, Serialize)] #[serde(deny_unknown_fields)] -pub struct GatewayPathsV1_1_30 { - pub keys: KeysPathsV1_1_30, +pub struct GatewayPathsV1_1_31 { + pub keys: KeysPathsV1_1_31, /// Path to sqlite database containing all persistent data: messages for offline clients, /// derived shared keys and available client bandwidths. @@ -275,7 +275,7 @@ pub struct GatewayPathsV1_1_30 { } #[derive(Debug, Clone, Deserialize, PartialEq, Eq, Serialize)] -pub struct KeysPathsV1_1_30 { +pub struct KeysPathsV1_1_31 { /// Path to file containing private identity key. pub private_identity_key_file: PathBuf, @@ -291,13 +291,13 @@ pub struct KeysPathsV1_1_30 { #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(default)] -pub struct NetworkRequesterV1_1_30 { +pub struct NetworkRequesterV1_1_31 { /// Specifies whether network requester service is enabled in this process. pub enabled: bool, } #[allow(clippy::derivable_impls)] -impl Default for NetworkRequesterV1_1_30 { +impl Default for NetworkRequesterV1_1_31 { fn default() -> Self { Self { enabled: false } } @@ -305,13 +305,13 @@ impl Default for NetworkRequesterV1_1_30 { #[derive(Debug, Default, Clone, Deserialize, PartialEq, Eq, Serialize)] #[serde(deny_unknown_fields)] -pub struct LoggingSettingsV1_1_30 { +pub struct LoggingSettingsV1_1_31 { // well, we need to implement something here at some point... } #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(default)] -pub struct DebugV1_1_30 { +pub struct DebugV1_1_31 { /// Initial value of an exponential backoff to reconnect to dropped TCP connection when /// forwarding sphinx packets. #[serde(with = "humantime_serde")] @@ -346,7 +346,7 @@ pub struct DebugV1_1_30 { pub use_legacy_framed_packet_version: bool, } -impl Default for DebugV1_1_30 { +impl Default for DebugV1_1_31 { fn default() -> Self { Self { packet_forwarding_initial_backoff: DEFAULT_PACKET_FORWARDING_INITIAL_BACKOFF, From 00ca4d2afa3d1e1109bf5af912cf6d3ecfb8e6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 10:13:10 +0100 Subject: [PATCH 042/142] Rename to nym-ip-packet-router --- Cargo.lock | 4 +-- gateway/Cargo.toml | 2 +- gateway/src/commands/helpers.rs | 28 +++++++-------- gateway/src/commands/init.rs | 14 ++++---- gateway/src/commands/mod.rs | 6 ++-- gateway/src/commands/run.rs | 6 ++-- ...forwarder.rs => setup_ip_packet_router.rs} | 12 +++---- gateway/src/config/mod.rs | 16 ++++----- gateway/src/config/old_config_v1_1_31.rs | 4 +-- gateway/src/config/persistence/paths.rs | 26 +++++++------- gateway/src/config/template.rs | 6 ++-- gateway/src/error.rs | 2 +- .../embedded_network_requester/mod.rs | 2 +- gateway/src/node/helpers.rs | 6 ++-- gateway/src/node/mod.rs | 34 +++++++++---------- service-providers/ip-forwarder/Cargo.toml | 2 +- 16 files changed, 85 insertions(+), 85 deletions(-) rename gateway/src/commands/{setup_ip_forwarder.rs => setup_ip_packet_router.rs} (79%) diff --git a/Cargo.lock b/Cargo.lock index 938ab2606d..e7f8983425 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6540,7 +6540,7 @@ dependencies = [ "nym-credentials", "nym-crypto", "nym-gateway-requests", - "nym-ip-forwarder", + "nym-ip-packet-router", "nym-mixnet-client", "nym-mixnode-common", "nym-network-defaults", @@ -6645,7 +6645,7 @@ dependencies = [ ] [[package]] -name = "nym-ip-forwarder" +name = "nym-ip-packet-router" version = "0.1.0" dependencies = [ "futures", diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index b5881ef080..aa595f0584 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -76,7 +76,7 @@ nym-task = { path = "../common/task" } nym-types = { path = "../common/types" } nym-validator-client = { path = "../common/client-libs/validator-client" } nym-wireguard = { path = "../common/wireguard", optional = true } -nym-ip-forwarder = { path = "../service-providers/ip-forwarder" } +nym-ip-packet-router = { path = "../service-providers/ip-forwarder" } [dev-dependencies] tower = "0.4.13" diff --git a/gateway/src/commands/helpers.rs b/gateway/src/commands/helpers.rs index 56c9d74292..99289b8b16 100644 --- a/gateway/src/commands/helpers.rs +++ b/gateway/src/commands/helpers.rs @@ -4,7 +4,7 @@ use crate::commands::upgrade_helpers; use crate::config::default_config_filepath; use crate::config::persistence::paths::{ - default_ip_forwarder_data_dir, default_network_requester_data_dir, + default_ip_packet_router_data_dir, default_network_requester_data_dir, }; use crate::config::Config; use crate::error::GatewayError; @@ -41,7 +41,7 @@ pub(crate) struct OverrideConfig { pub(crate) nyxd_urls: Option>, pub(crate) only_coconut_credentials: Option, pub(crate) with_network_requester: Option, - pub(crate) with_ip_forwarder: Option, + pub(crate) with_ip_packet_router: Option, } impl OverrideConfig { @@ -80,15 +80,15 @@ impl OverrideConfig { Config::with_enabled_network_requester, self.with_network_requester, ) - .with_optional(Config::with_enabled_ip_forwarder, self.with_ip_forwarder); + .with_optional(Config::with_enabled_ip_packet_router, self.with_ip_packet_router); if config.network_requester.enabled && config.storage_paths.network_requester_config.is_none() { Ok(config.with_default_network_requester_config_path()) - } else if config.ip_forwarder.enabled && config.storage_paths.ip_forwarder_config.is_none() + } else if config.ip_packet_router.enabled && config.storage_paths.ip_packet_router_config.is_none() { - Ok(config.with_default_ip_forwarder_config_path()) + Ok(config.with_default_ip_packet_router_config_path()) } else { Ok(config) } @@ -236,10 +236,10 @@ pub(crate) fn override_network_requester_config( ) } -pub(crate) fn override_ip_forwarder_config( - cfg: nym_ip_forwarder::Config, +pub(crate) fn override_ip_packet_router_config( + cfg: nym_ip_packet_router::Config, _opts: Option, -) -> nym_ip_forwarder::Config { +) -> nym_ip_packet_router::Config { cfg } @@ -315,21 +315,21 @@ pub(crate) async fn initialise_local_network_requester( }) } -pub(crate) async fn initialise_local_ip_forwarder( +pub(crate) async fn initialise_local_ip_packet_router( gateway_config: &Config, opts: OverrideIpForwarderConfig, identity: identity::PublicKey, ) -> Result { info!("initialising ip forwarder..."); - let Some(ip_cfg_path) = gateway_config.storage_paths.ip_forwarder_config() else { + let Some(ip_cfg_path) = gateway_config.storage_paths.ip_packet_router_config() else { return Err(GatewayError::UnspecifiedIpForwarderConfig); }; let id = &gateway_config.gateway.id; let ip_id = make_ip_id(id); - let ip_data_dir = default_ip_forwarder_data_dir(id); - let mut ip_cfg = nym_ip_forwarder::Config::new(&ip_id).with_data_directory(ip_data_dir); - ip_cfg = override_ip_forwarder_config(ip_cfg, Some(opts)); + let ip_data_dir = default_ip_packet_router_data_dir(id); + let mut ip_cfg = nym_ip_packet_router::Config::new(&ip_id).with_data_directory(ip_data_dir); + ip_cfg = override_ip_packet_router_config(ip_cfg, Some(opts)); let key_store = OnDiskKeys::new(ip_cfg.storage_paths.common_paths.keys.clone()); let details_store = @@ -367,7 +367,7 @@ pub(crate) async fn initialise_local_ip_forwarder( } Ok(GatewayIpForwarderDetails { - enabled: gateway_config.ip_forwarder.enabled, + enabled: gateway_config.ip_packet_router.enabled, identity_key: address.identity().to_string(), encryption_key: address.encryption_key().to_string(), address: address.to_string(), diff --git a/gateway/src/commands/init.rs b/gateway/src/commands/init.rs index 286a24f21a..6fda8fa01c 100644 --- a/gateway/src/commands/init.rs +++ b/gateway/src/commands/init.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::commands::helpers::{ - initialise_local_ip_forwarder, initialise_local_network_requester, + initialise_local_ip_packet_router, initialise_local_network_requester, OverrideNetworkRequesterConfig, }; use crate::config::{default_config_directory, default_config_filepath, default_data_directory}; @@ -82,12 +82,12 @@ pub struct Init { statistics_service_url: Option, /// Allows this gateway to run an embedded network requester for minimal network overhead - #[clap(long, conflicts_with = "with_ip_forwarder")] + #[clap(long, conflicts_with = "with_ip_packet_router")] with_network_requester: bool, /// Allows this gateway to run an embedded network requester for minimal network overhead #[clap(long, hide = true, conflicts_with = "with_network_requester")] - with_ip_forwarder: bool, + with_ip_packet_router: bool, // ##### NETWORK REQUESTER FLAGS ##### /// Specifies whether this network requester should run in 'open-proxy' mode @@ -161,7 +161,7 @@ impl From for OverrideConfig { nyxd_urls: init_config.nyxd_urls, only_coconut_credentials: init_config.only_coconut_credentials, with_network_requester: Some(init_config.with_network_requester), - with_ip_forwarder: Some(init_config.with_ip_forwarder), + with_ip_packet_router: Some(init_config.with_ip_packet_router), } } } @@ -243,8 +243,8 @@ pub async fn execute(args: Init) -> anyhow::Result<()> { if config.network_requester.enabled { initialise_local_network_requester(&config, nr_opts, *identity_keys.public_key()) .await?; - } else if config.ip_forwarder.enabled { - initialise_local_ip_forwarder(&config, ip_opts, *identity_keys.public_key()).await?; + } else if config.ip_packet_router.enabled { + initialise_local_ip_packet_router(&config, ip_opts, *identity_keys.public_key()).await?; } eprintln!("Saved identity and mixnet sphinx keypairs"); @@ -293,7 +293,7 @@ mod tests { only_coconut_credentials: None, output: Default::default(), with_network_requester: false, - with_ip_forwarder: false, + with_ip_packet_router: false, open_proxy: None, enable_statistics: None, statistics_recipient: None, diff --git a/gateway/src/commands/mod.rs b/gateway/src/commands/mod.rs index 83cde5302b..41690d4af3 100644 --- a/gateway/src/commands/mod.rs +++ b/gateway/src/commands/mod.rs @@ -12,7 +12,7 @@ pub(crate) mod helpers; pub(crate) mod init; pub(crate) mod node_details; pub(crate) mod run; -pub(crate) mod setup_ip_forwarder; +pub(crate) mod setup_ip_packet_router; pub(crate) mod setup_network_requester; pub(crate) mod sign; mod upgrade_helpers; @@ -35,7 +35,7 @@ pub(crate) enum Commands { /// Add ip forwarder support to this gateway // essentially an option to include ip forwarder without having to setup fresh gateway #[command(hide = true)] - SetupIpForwarder(setup_ip_forwarder::CmdArgs), + SetupIpForwarder(setup_ip_packet_router::CmdArgs), /// Sign text to prove ownership of this mixnode Sign(sign::Sign), @@ -58,7 +58,7 @@ pub(crate) async fn execute(args: Cli) -> Result<(), Box node_details::execute(m).await?, Commands::Run(m) => run::execute(m).await?, Commands::SetupNetworkRequester(m) => setup_network_requester::execute(m).await?, - Commands::SetupIpForwarder(m) => setup_ip_forwarder::execute(m).await?, + Commands::SetupIpForwarder(m) => setup_ip_packet_router::execute(m).await?, Commands::Sign(m) => sign::execute(m)?, Commands::BuildInfo(m) => build_info::execute(m), Commands::Completions(s) => s.generate(&mut crate::Cli::command(), bin_name), diff --git a/gateway/src/commands/run.rs b/gateway/src/commands/run.rs index a0f807a99d..e9c1802118 100644 --- a/gateway/src/commands/run.rs +++ b/gateway/src/commands/run.rs @@ -87,12 +87,12 @@ pub struct Run { statistics_service_url: Option, /// Allows this gateway to run an embedded network requester for minimal network overhead - #[arg(long, conflicts_with = "with_ip_forwarder")] + #[arg(long, conflicts_with = "with_ip_packet_router")] with_network_requester: Option, /// Allows this gateway to run an embedded network requester for minimal network overhead #[arg(long, hide = true, conflicts_with = "with_network_requester")] - with_ip_forwarder: Option, + with_ip_packet_router: Option, // ##### NETWORK REQUESTER FLAGS ##### /// Specifies whether this network requester should run in 'open-proxy' mode @@ -163,7 +163,7 @@ impl From for OverrideConfig { nyxd_urls: run_config.nyxd_urls, only_coconut_credentials: run_config.only_coconut_credentials, with_network_requester: run_config.with_network_requester, - with_ip_forwarder: run_config.with_ip_forwarder, + with_ip_packet_router: run_config.with_ip_packet_router, } } } diff --git a/gateway/src/commands/setup_ip_forwarder.rs b/gateway/src/commands/setup_ip_packet_router.rs similarity index 79% rename from gateway/src/commands/setup_ip_forwarder.rs rename to gateway/src/commands/setup_ip_packet_router.rs index 6b8678f3ab..abe28fc350 100644 --- a/gateway/src/commands/setup_ip_forwarder.rs +++ b/gateway/src/commands/setup_ip_packet_router.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::commands::helpers::{ - initialise_local_ip_forwarder, try_load_current_config, OverrideIpForwarderConfig, + initialise_local_ip_packet_router, try_load_current_config, OverrideIpForwarderConfig, }; use crate::node::helpers::load_public_key; use clap::Args; @@ -43,22 +43,22 @@ pub async fn execute(args: CmdArgs) -> anyhow::Result<()> { // but it might be nice to be able to move files around. if let Some(custom_config_path) = args.custom_config_path { // if you specified anything as the argument, overwrite whatever was already in the config file - config.storage_paths.ip_forwarder_config = Some(custom_config_path); + config.storage_paths.ip_packet_router_config = Some(custom_config_path); } if let Some(override_enabled) = args.enabled { - config.ip_forwarder.enabled = override_enabled; + config.ip_packet_router.enabled = override_enabled; } - if config.storage_paths.ip_forwarder_config.is_none() { - config = config.with_default_ip_forwarder_config_path() + if config.storage_paths.ip_packet_router_config.is_none() { + config = config.with_default_ip_packet_router_config_path() } let identity_public_key = load_public_key( &config.storage_paths.keys.public_identity_key_file, "gateway identity", )?; - let details = initialise_local_ip_forwarder(&config, opts, identity_public_key).await?; + let details = initialise_local_ip_packet_router(&config, opts, identity_public_key).await?; config.try_save()?; args.output.to_stdout(&details); diff --git a/gateway/src/config/mod.rs b/gateway/src/config/mod.rs index 6705d7a737..b2d8cf90e2 100644 --- a/gateway/src/config/mod.rs +++ b/gateway/src/config/mod.rs @@ -102,7 +102,7 @@ pub struct Config { pub network_requester: NetworkRequester, #[serde(default)] - pub ip_forwarder: IpForwarder, + pub ip_packet_router: IpPacketRouter, #[serde(default)] pub logging: LoggingSettings, @@ -132,7 +132,7 @@ impl Config { wireguard: Default::default(), storage_paths: GatewayPaths::new_default(id.as_ref()), network_requester: Default::default(), - ip_forwarder: Default::default(), + ip_packet_router: Default::default(), logging: Default::default(), debug: Default::default(), } @@ -200,15 +200,15 @@ impl Config { self } - pub fn with_enabled_ip_forwarder(mut self, enabled_ip_forwarder: bool) -> Self { - self.ip_forwarder.enabled = enabled_ip_forwarder; + pub fn with_enabled_ip_packet_router(mut self, enabled_ip_packet_router: bool) -> Self { + self.ip_packet_router.enabled = enabled_ip_packet_router; self } - pub fn with_default_ip_forwarder_config_path(mut self) -> Self { + pub fn with_default_ip_packet_router_config_path(mut self) -> Self { self.storage_paths = self .storage_paths - .with_default_ip_forwarder_config(&self.gateway.id); + .with_default_ip_packet_router_config(&self.gateway.id); self } @@ -379,13 +379,13 @@ impl Default for NetworkRequester { #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(default)] -pub struct IpForwarder { +pub struct IpPacketRouter { /// Specifies whether ip forwarder service is enabled in this process. pub enabled: bool, } #[allow(clippy::derivable_impls)] -impl Default for IpForwarder { +impl Default for IpPacketRouter { fn default() -> Self { Self { enabled: false } } diff --git a/gateway/src/config/old_config_v1_1_31.rs b/gateway/src/config/old_config_v1_1_31.rs index 122772f5ef..6391b18115 100644 --- a/gateway/src/config/old_config_v1_1_31.rs +++ b/gateway/src/config/old_config_v1_1_31.rs @@ -142,14 +142,14 @@ impl From for Config { clients_storage: value.storage_paths.clients_storage, network_requester_config: value.storage_paths.network_requester_config, // \/ ADDED - ip_forwarder_config: Default::default(), + ip_packet_router_config: Default::default(), // /\ ADDED }, network_requester: NetworkRequester { enabled: value.network_requester.enabled, }, // \/ ADDED - ip_forwarder: Default::default(), + ip_packet_router: Default::default(), // /\ ADDED logging: LoggingSettings { // no fields (yet) diff --git a/gateway/src/config/persistence/paths.rs b/gateway/src/config/persistence/paths.rs index 14e35f4613..7c6f2f7fc2 100644 --- a/gateway/src/config/persistence/paths.rs +++ b/gateway/src/config/persistence/paths.rs @@ -15,8 +15,8 @@ pub const DEFAULT_CLIENTS_STORAGE_FILENAME: &str = "db.sqlite"; pub const DEFAULT_NETWORK_REQUESTER_CONFIG_FILENAME: &str = "network_requester_config.toml"; pub const DEFAULT_NETWORK_REQUESTER_DATA_DIR: &str = "network-requester-data"; -pub const DEFAULT_IP_FORWARDER_CONFIG_FILENAME: &str = "ip_forwarder_config.toml"; -pub const DEFAULT_IP_FORWARDER_DATA_DIR: &str = "ip-forwarder-data"; +pub const DEFAULT_IP_PACKET_ROUTER_CONFIG_FILENAME: &str = "ip_packet_router_config.toml"; +pub const DEFAULT_IP_PACKET_ROUTER_DATA_DIR: &str = "ip-packet-router-data"; // pub const DEFAULT_DESCRIPTION_FILENAME: &str = "description.toml"; @@ -24,8 +24,8 @@ pub fn default_network_requester_data_dir>(id: P) -> PathBuf { default_data_directory(id).join(DEFAULT_NETWORK_REQUESTER_DATA_DIR) } -pub fn default_ip_forwarder_data_dir>(id: P) -> PathBuf { - default_data_directory(id).join(DEFAULT_IP_FORWARDER_DATA_DIR) +pub fn default_ip_packet_router_data_dir>(id: P) -> PathBuf { + default_data_directory(id).join(DEFAULT_IP_PACKET_ROUTER_DATA_DIR) } /// makes sure that an empty path is converted into a `None` as opposed to `Some("")` @@ -59,7 +59,7 @@ pub struct GatewayPaths { // pub cosmos_bip39_mnemonic: PathBuf, /// Path to the configuration of the embedded ip forwarder. #[serde(deserialize_with = "de_maybe_path")] - pub ip_forwarder_config: Option, + pub ip_packet_router_config: Option, } impl GatewayPaths { @@ -69,7 +69,7 @@ impl GatewayPaths { clients_storage: default_data_directory(id).join(DEFAULT_CLIENTS_STORAGE_FILENAME), // node_description: default_config_filepath(id).join(DEFAULT_DESCRIPTION_FILENAME), network_requester_config: None, - ip_forwarder_config: None, + ip_packet_router_config: None, } } @@ -87,15 +87,15 @@ impl GatewayPaths { } #[must_use] - pub fn with_ip_forwarder_config>(mut self, path: P) -> Self { - self.ip_forwarder_config = Some(path.as_ref().into()); + pub fn with_ip_packet_router_config>(mut self, path: P) -> Self { + self.ip_packet_router_config = Some(path.as_ref().into()); self } #[must_use] - pub fn with_default_ip_forwarder_config>(self, id: P) -> Self { - self.with_ip_forwarder_config( - default_config_directory(id).join(DEFAULT_IP_FORWARDER_CONFIG_FILENAME), + pub fn with_default_ip_packet_router_config>(self, id: P) -> Self { + self.with_ip_packet_router_config( + default_config_directory(id).join(DEFAULT_IP_PACKET_ROUTER_CONFIG_FILENAME), ) } @@ -103,8 +103,8 @@ impl GatewayPaths { &self.network_requester_config } - pub fn ip_forwarder_config(&self) -> &Option { - &self.ip_forwarder_config + pub fn ip_packet_router_config(&self) -> &Option { + &self.ip_packet_router_config } pub fn private_identity_key(&self) -> &Path { diff --git a/gateway/src/config/template.rs b/gateway/src/config/template.rs index 24867e10c4..c64b14aa1a 100644 --- a/gateway/src/config/template.rs +++ b/gateway/src/config/template.rs @@ -82,9 +82,9 @@ landing_page_assets_path = '{{ http.landing_page_assets_path }}' # Specifies whether network requester service is enabled in this process. enabled = {{ network_requester.enabled }} -[ip_forwarder] -# Specifies whether ip forwarder service is enabled in this process. -enabled = {{ ip_forwarder.enabled }} +[ip_packet_router] +# Specifies whether ip packet router service is enabled in this process. +enabled = {{ ip_packet_router.enabled }} [storage_paths] diff --git a/gateway/src/error.rs b/gateway/src/error.rs index 681131d8b9..7e193e4f19 100644 --- a/gateway/src/error.rs +++ b/gateway/src/error.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::node::storage::error::StorageError; -use nym_ip_forwarder::error::IpForwarderError; +use nym_ip_packet_router::error::IpForwarderError; use nym_network_requester::error::{ClientCoreError, NetworkRequesterError}; use nym_validator_client::nyxd::error::NyxdError; use nym_validator_client::nyxd::AccountId; diff --git a/gateway/src/node/client_handling/embedded_network_requester/mod.rs b/gateway/src/node/client_handling/embedded_network_requester/mod.rs index 0256592ea6..8ed7e2f978 100644 --- a/gateway/src/node/client_handling/embedded_network_requester/mod.rs +++ b/gateway/src/node/client_handling/embedded_network_requester/mod.rs @@ -30,7 +30,7 @@ impl LocalNetworkRequesterHandle { // TODO: generalize this whole thing to be general. And change the name(s). pub(crate) fn new_ip( - start_data: nym_ip_forwarder::OnStartData, + start_data: nym_ip_packet_router::OnStartData, mix_message_sender: MixMessageSender, ) -> Self { Self { diff --git a/gateway/src/node/helpers.rs b/gateway/src/node/helpers.rs index 54953e133e..50a52cd109 100644 --- a/gateway/src/node/helpers.rs +++ b/gateway/src/node/helpers.rs @@ -96,12 +96,12 @@ pub(crate) fn load_network_requester_config>( }) } -pub(crate) fn load_ip_forwarder_config>( +pub(crate) fn load_ip_packet_router_config>( id: &str, path: P, -) -> Result { +) -> Result { let path = path.as_ref(); - nym_ip_forwarder::Config::read_from_toml_file(path).map_err(|err| { + nym_ip_packet_router::Config::read_from_toml_file(path).map_err(|err| { GatewayError::IpForwarderConfigLoadFailure { id: id.to_string(), path: path.to_path_buf(), diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 0be8be5eaf..85ce12fc62 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -1,10 +1,10 @@ // Copyright 2020-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use self::helpers::load_ip_forwarder_config; +use self::helpers::load_ip_packet_router_config; use self::storage::PersistentStorage; use crate::commands::helpers::{ - override_ip_forwarder_config, override_network_requester_config, OverrideIpForwarderConfig, + override_ip_packet_router_config, override_network_requester_config, OverrideIpForwarderConfig, OverrideNetworkRequesterConfig, }; use crate::config::Config; @@ -75,10 +75,10 @@ pub(crate) async fn create_gateway( }; // don't attempt to read config if NR is disabled - let ip_forwarder_config = if config.ip_forwarder.enabled { - if let Some(path) = &config.storage_paths.ip_forwarder_config { - let cfg = load_ip_forwarder_config(&config.gateway.id, path)?; - Some(override_ip_forwarder_config(cfg, ip_config_override)) + let ip_packet_router_config = if config.ip_packet_router.enabled { + if let Some(path) = &config.storage_paths.ip_packet_router_config { + let cfg = load_ip_packet_router_config(&config.gateway.id, path)?; + Some(override_ip_packet_router_config(cfg, ip_config_override)) } else { // if NR is enabled, the config path must be specified return Err(GatewayError::UnspecifiedIpForwarderConfig); @@ -94,7 +94,7 @@ pub(crate) async fn create_gateway( custom_mixnet_path: custom_mixnet.clone(), }); - let ip_opts = ip_forwarder_config.map(|config| LocalIpForwarderOpts { + let ip_opts = ip_packet_router_config.map(|config| LocalIpForwarderOpts { config, custom_mixnet_path: custom_mixnet, }); @@ -111,7 +111,7 @@ pub struct LocalNetworkRequesterOpts { #[derive(Debug, Clone)] pub struct LocalIpForwarderOpts { - config: nym_ip_forwarder::Config, + config: nym_ip_packet_router::Config, custom_mixnet_path: Option, } @@ -121,7 +121,7 @@ pub(crate) struct Gateway { network_requester_opts: Option, - ip_forwarder_opts: Option, + ip_packet_router_opts: Option, /// ed25519 keypair used to assert one's identity. identity_keypair: Arc, @@ -138,7 +138,7 @@ impl Gateway { pub fn new( config: Config, network_requester_opts: Option, - ip_forwarder_opts: Option, + ip_packet_router_opts: Option, storage: St, ) -> Result { Ok(Gateway { @@ -147,7 +147,7 @@ impl Gateway { sphinx_keypair: Arc::new(helpers::load_sphinx_keys(&config)?), config, network_requester_opts, - ip_forwarder_opts, + ip_packet_router_opts, client_registry: Arc::new(DashMap::new()), }) } @@ -156,7 +156,7 @@ impl Gateway { pub async fn new_from_keys_and_storage( config: Config, network_requester_opts: Option, - ip_forwarder_opts: Option, + ip_packet_router_opts: Option, identity_keypair: identity::KeyPair, sphinx_keypair: encryption::KeyPair, storage: St, @@ -164,7 +164,7 @@ impl Gateway { Gateway { config, network_requester_opts, - ip_forwarder_opts, + ip_packet_router_opts, identity_keypair: Arc::new(identity_keypair), sphinx_keypair: Arc::new(sphinx_keypair), storage, @@ -327,7 +327,7 @@ impl Gateway { info!("Starting IP service provider..."); // if network requester is enabled, configuration file must be provided! - let Some(ip_opts) = &self.ip_forwarder_opts else { + let Some(ip_opts) = &self.ip_packet_router_opts else { log::error!("IP service provider is enabled but no configuration file was provided!"); return Err(GatewayError::UnspecifiedIpForwarderConfig); }; @@ -346,8 +346,8 @@ impl Gateway { // TODO: well, wire it up internally to gateway traffic, shutdowns, etc. let (on_start_tx, on_start_rx) = oneshot::channel(); - // let mut nr_builder = nym_ip_forwarder::IpForwarderBuilder::new(nr_opts.config.clone()) - let mut ip_builder = nym_ip_forwarder::IpForwarderBuilder::new(ip_opts.config.clone()) + // let mut nr_builder = nym_ip_packet_router::IpForwarderBuilder::new(nr_opts.config.clone()) + let mut ip_builder = nym_ip_packet_router::IpForwarderBuilder::new(ip_opts.config.clone()) .with_shutdown(shutdown) .with_custom_gateway_transceiver(Box::new(transceiver)) .with_wait_for_gateway(true) @@ -493,7 +493,7 @@ impl Gateway { // NOTE: this is mutually exclusive with the network requester (for now). This is reflected // in the command line arguments as well. - if self.config.ip_forwarder.enabled { + if self.config.ip_packet_router.enabled { let embedded_ip_sp = self .start_ip_service_provider( mix_forwarding_channel.clone(), diff --git a/service-providers/ip-forwarder/Cargo.toml b/service-providers/ip-forwarder/Cargo.toml index bb88978f18..c01c13cfb4 100644 --- a/service-providers/ip-forwarder/Cargo.toml +++ b/service-providers/ip-forwarder/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "nym-ip-forwarder" +name = "nym-ip-packet-router" version = "0.1.0" authors.workspace = true repository.workspace = true From 7c5183700eaf73ffcdaad402e17f9471549f53f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 10:14:01 +0100 Subject: [PATCH 043/142] Rename to ip-packet-router directory --- Cargo.toml | 2 +- gateway/Cargo.toml | 2 +- service-providers/{ip-forwarder => ip-packet-router}/Cargo.toml | 0 .../{ip-forwarder => ip-packet-router}/src/config/mod.rs | 0 .../src/config/persistence.rs | 0 .../{ip-forwarder => ip-packet-router}/src/config/template.rs | 0 .../{ip-forwarder => ip-packet-router}/src/error.rs | 0 service-providers/{ip-forwarder => ip-packet-router}/src/lib.rs | 0 8 files changed, 2 insertions(+), 2 deletions(-) rename service-providers/{ip-forwarder => ip-packet-router}/Cargo.toml (100%) rename service-providers/{ip-forwarder => ip-packet-router}/src/config/mod.rs (100%) rename service-providers/{ip-forwarder => ip-packet-router}/src/config/persistence.rs (100%) rename service-providers/{ip-forwarder => ip-packet-router}/src/config/template.rs (100%) rename service-providers/{ip-forwarder => ip-packet-router}/src/error.rs (100%) rename service-providers/{ip-forwarder => ip-packet-router}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 802b81f89e..3d114f689a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,7 +90,7 @@ members = [ "sdk/lib/socks5-listener", "sdk/rust/nym-sdk", "service-providers/common", - "service-providers/ip-forwarder", + "service-providers/ip-packet-router", "service-providers/network-requester", "service-providers/network-statistics", "nym-api", diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index aa595f0584..7efe36f517 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -76,7 +76,7 @@ nym-task = { path = "../common/task" } nym-types = { path = "../common/types" } nym-validator-client = { path = "../common/client-libs/validator-client" } nym-wireguard = { path = "../common/wireguard", optional = true } -nym-ip-packet-router = { path = "../service-providers/ip-forwarder" } +nym-ip-packet-router = { path = "../service-providers/ip-packet-router" } [dev-dependencies] tower = "0.4.13" diff --git a/service-providers/ip-forwarder/Cargo.toml b/service-providers/ip-packet-router/Cargo.toml similarity index 100% rename from service-providers/ip-forwarder/Cargo.toml rename to service-providers/ip-packet-router/Cargo.toml diff --git a/service-providers/ip-forwarder/src/config/mod.rs b/service-providers/ip-packet-router/src/config/mod.rs similarity index 100% rename from service-providers/ip-forwarder/src/config/mod.rs rename to service-providers/ip-packet-router/src/config/mod.rs diff --git a/service-providers/ip-forwarder/src/config/persistence.rs b/service-providers/ip-packet-router/src/config/persistence.rs similarity index 100% rename from service-providers/ip-forwarder/src/config/persistence.rs rename to service-providers/ip-packet-router/src/config/persistence.rs diff --git a/service-providers/ip-forwarder/src/config/template.rs b/service-providers/ip-packet-router/src/config/template.rs similarity index 100% rename from service-providers/ip-forwarder/src/config/template.rs rename to service-providers/ip-packet-router/src/config/template.rs diff --git a/service-providers/ip-forwarder/src/error.rs b/service-providers/ip-packet-router/src/error.rs similarity index 100% rename from service-providers/ip-forwarder/src/error.rs rename to service-providers/ip-packet-router/src/error.rs diff --git a/service-providers/ip-forwarder/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs similarity index 100% rename from service-providers/ip-forwarder/src/lib.rs rename to service-providers/ip-packet-router/src/lib.rs From a088d64d57d3f68dc163317ba08a0d606f4e219a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 10:21:01 +0100 Subject: [PATCH 044/142] Fix missed rename in template --- gateway/src/config/template.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/src/config/template.rs b/gateway/src/config/template.rs index c64b14aa1a..d48be52009 100644 --- a/gateway/src/config/template.rs +++ b/gateway/src/config/template.rs @@ -108,7 +108,7 @@ clients_storage = '{{ storage_paths.clients_storage }}' network_requester_config = '{{ storage_paths.network_requester_config }}' # Path to the configuration of the embedded ip forwarder. -ip_forwarder_config = '{{ storage_paths.ip_forwarder_config }}' +ip_packet_router_config = '{{ storage_paths.ip_packet_router_config }}' ##### logging configuration options ##### From 9e33454dc2e06fd1d776dd45bdc869e4d1cb9562 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:34:31 +0100 Subject: [PATCH 045/142] add exit policy implementation steps --- documentation/operators/src/faq/smoosh-faq.md | 10 +++++++++- documentation/operators/src/legal/exit-gateway.md | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 4c1342c326..5f312f8267 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -24,7 +24,7 @@ As we shared in our blog post article [*What does it take to build the wolds mos Project smoosh will have three steps: 1. Combine the `gateway` and `network-requester` into one binary ✅ -2. Create [exit gateway](../legal/exit-gateway.md): Take the gateway binary including network requester combined in \#1 and switch from *allowed.list* to a new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) ✅ +2. Create [exit gateway](../legal/exit-gateway.md): Take the gateway binary including network requester combined in \#1 and switch from [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) ✅ 3. Combine all the nodes in the Nym Mixnet into one binary, that is `mixnode`, `gateway` (entry and exit) and `network-requester`. These three steps will be staggered over time - period of several months, and will be implemented one by one with enough time to take in feedback and fix bugs in between. @@ -38,6 +38,14 @@ We are exploring two potential methods for implementing binary functionality in 2. All nodes will be required to have the exit gateway functionality. All nodes are rewarded the same as now, and the difference is that a node sometimes (some epochs) may be performing as exit gateway sometimes as mix node or entry gateway adjusted according the network demand by an algorithm. +### How will the design be implemented? + +The progression will have three steps: + +1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allow.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their gateways/network requesters and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ +2. Relatively soon the exit policy will become the default. +3. Further down the line, it will be the only option. Then the *allowed.list* will be completely removed. + ### Where can I read more about the exit gateway setup? We created an [entire page](../legal/exit-gateway.md) about the technical and legal questions around exit gateway. diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index 2cd3f03daa..328633faf2 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -22,7 +22,7 @@ Nym core team cannot provide comprehensive legal advice across all jurisdictions * Currently, Nym Gateway nodes only enable access to apps and services that are on an ‘allow’ list that is maintained by the core team. -* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list - [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt). In accordance with the [Tor Null 'deny' list](https://tornull.org/) and [Tor reduced policy] (https://tornull.org/tor-reduced-reduced-exit-policy.php), which are two established safeguards. +* To decentralise and enable privacy for a broader range of services, this initiative will have to transition from the current ‘allow’ list to a ‘deny’ list - [Exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt). In accordance with the [Tor Null 'deny' list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php), which are two established safeguards. * This will enhance the usage and appeal of Nym products for end users. As a result, increased usage will ultimately lead to higher revenues for Nym operators. From b10aa52eca25742f23528a48eb3ee8783555549d Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:35:30 +0100 Subject: [PATCH 046/142] add exit policy implementation steps --- documentation/operators/src/faq/smoosh-faq.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 5f312f8267..a5d16d5092 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -38,14 +38,6 @@ We are exploring two potential methods for implementing binary functionality in 2. All nodes will be required to have the exit gateway functionality. All nodes are rewarded the same as now, and the difference is that a node sometimes (some epochs) may be performing as exit gateway sometimes as mix node or entry gateway adjusted according the network demand by an algorithm. -### How will the design be implemented? - -The progression will have three steps: - -1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allow.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their gateways/network requesters and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ -2. Relatively soon the exit policy will become the default. -3. Further down the line, it will be the only option. Then the *allowed.list* will be completely removed. - ### Where can I read more about the exit gateway setup? We created an [entire page](../legal/exit-gateway.md) about the technical and legal questions around exit gateway. @@ -54,8 +46,17 @@ We created an [entire page](../legal/exit-gateway.md) about the technical and le The operators running `gateways` would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short allow list to a more permissive setup. An [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. +### How will the design be implemented? + +The progression will have three steps: + +1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allow.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their gateways/network requesters and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ +2. Relatively soon the exit policy will become the default. +3. Further down the line, it will be the only option. Then the *allowed.list* will be completely removed. + ### Can I run a mix node only? + Depends which [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators) will be the final one. In case of the first one - yes. In case of the second option, all the nodes will be setup with gateway functionality turned on. ## Token Economics & Rewards From b83e756650333fc542a1875951fb05407f1d8721 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:37:41 +0100 Subject: [PATCH 047/142] syntax fix --- documentation/operators/src/faq/smoosh-faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index a5d16d5092..2a90841283 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -44,13 +44,13 @@ We created an [entire page](../legal/exit-gateway.md) about the technical and le ### What is the change from allow list to deny list? -The operators running `gateways` would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short allow list to a more permissive setup. An [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. +The operators running Gateways would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a more permissive setup. An [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. ### How will the design be implemented? The progression will have three steps: -1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allow.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their gateways/network requesters and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ +1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their gateways/network requesters and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ 2. Relatively soon the exit policy will become the default. 3. Further down the line, it will be the only option. Then the *allowed.list* will be completely removed. From 70d0aabbc13917896e3a4f747984ff26f39a5c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 10:37:46 +0100 Subject: [PATCH 048/142] Big chunk of search replace to the new name --- common/types/src/gateway.rs | 6 +-- gateway/src/commands/helpers.rs | 22 +++++------ gateway/src/commands/init.rs | 6 +-- gateway/src/commands/mod.rs | 8 ++-- gateway/src/commands/run.rs | 6 +-- .../src/commands/setup_ip_packet_router.rs | 12 +++--- gateway/src/config/mod.rs | 2 +- gateway/src/config/persistence/paths.rs | 2 +- gateway/src/config/template.rs | 2 +- gateway/src/error.rs | 16 ++++---- gateway/src/node/helpers.rs | 2 +- gateway/src/node/mod.rs | 39 +++++++++---------- 12 files changed, 61 insertions(+), 62 deletions(-) diff --git a/common/types/src/gateway.rs b/common/types/src/gateway.rs index 9c0dc8541a..3b546320b6 100644 --- a/common/types/src/gateway.rs +++ b/common/types/src/gateway.rs @@ -148,7 +148,7 @@ impl fmt::Display for GatewayNetworkRequesterDetails { } #[derive(Serialize, Deserialize)] -pub struct GatewayIpForwarderDetails { +pub struct GatewayIpPacketRouterDetails { pub enabled: bool, pub identity_key: String, @@ -160,9 +160,9 @@ pub struct GatewayIpForwarderDetails { pub config_path: String, } -impl fmt::Display for GatewayIpForwarderDetails { +impl fmt::Display for GatewayIpPacketRouterDetails { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - writeln!(f, "IP forwarder:")?; + writeln!(f, "IP packet router:")?; writeln!(f, "\tenabled: {}", self.enabled)?; writeln!(f, "\tconfig path: {}", self.config_path)?; diff --git a/gateway/src/commands/helpers.rs b/gateway/src/commands/helpers.rs index 99289b8b16..984465ecc7 100644 --- a/gateway/src/commands/helpers.rs +++ b/gateway/src/commands/helpers.rs @@ -19,7 +19,7 @@ use nym_network_requester::config::BaseClientConfig; use nym_network_requester::{ setup_gateway, GatewaySelectionSpecification, GatewaySetup, OnDiskGatewayDetails, OnDiskKeys, }; -use nym_types::gateway::{GatewayIpForwarderDetails, GatewayNetworkRequesterDetails}; +use nym_types::gateway::{GatewayIpPacketRouterDetails, GatewayNetworkRequesterDetails}; use nym_validator_client::nyxd::AccountId; use std::net::IpAddr; use std::path::PathBuf; @@ -109,7 +109,7 @@ pub(crate) struct OverrideNetworkRequesterConfig { } #[derive(Default)] -pub(crate) struct OverrideIpForwarderConfig { +pub(crate) struct OverrideIpPacketRouterConfig { // TODO } @@ -174,7 +174,7 @@ fn make_nr_id(gateway_id: &str) -> String { } fn make_ip_id(gateway_id: &str) -> String { - format!("{gateway_id}-ip-forwarder") + format!("{gateway_id}-ip-packet-router") } // NOTE: make sure this is in sync with service-providers/network-requester/src/cli/mod.rs::override_config @@ -238,7 +238,7 @@ pub(crate) fn override_network_requester_config( pub(crate) fn override_ip_packet_router_config( cfg: nym_ip_packet_router::Config, - _opts: Option, + _opts: Option, ) -> nym_ip_packet_router::Config { cfg } @@ -317,12 +317,12 @@ pub(crate) async fn initialise_local_network_requester( pub(crate) async fn initialise_local_ip_packet_router( gateway_config: &Config, - opts: OverrideIpForwarderConfig, + opts: OverrideIpPacketRouterConfig, identity: identity::PublicKey, -) -> Result { - info!("initialising ip forwarder..."); +) -> Result { + info!("initialising ip packet router..."); let Some(ip_cfg_path) = gateway_config.storage_paths.ip_packet_router_config() else { - return Err(GatewayError::UnspecifiedIpForwarderConfig); + return Err(GatewayError::UnspecifiedIpPacketRouterConfig); }; let id = &gateway_config.gateway.id; @@ -353,7 +353,7 @@ pub(crate) async fn initialise_local_ip_packet_router( let address = init_res.client_address()?; if let Err(err) = save_formatted_config_to_file(&ip_cfg, ip_cfg_path) { - log::error!("Failed to save the ip forwarder config file: {err}"); + log::error!("Failed to save the ip packet router config file: {err}"); return Err(GatewayError::ConfigSaveFailure { id: ip_id, path: ip_cfg_path.to_path_buf(), @@ -361,12 +361,12 @@ pub(crate) async fn initialise_local_ip_packet_router( }); } else { eprintln!( - "Saved ip forwarder configuration file to {}", + "Saved ip packet router configuration file to {}", ip_cfg_path.display() ) } - Ok(GatewayIpForwarderDetails { + Ok(GatewayIpPacketRouterDetails { enabled: gateway_config.ip_packet_router.enabled, identity_key: address.identity().to_string(), encryption_key: address.encryption_key().to_string(), diff --git a/gateway/src/commands/init.rs b/gateway/src/commands/init.rs index 6fda8fa01c..22a142228c 100644 --- a/gateway/src/commands/init.rs +++ b/gateway/src/commands/init.rs @@ -15,7 +15,7 @@ use std::net::IpAddr; use std::path::PathBuf; use std::{fs, io}; -use super::helpers::OverrideIpForwarderConfig; +use super::helpers::OverrideIpPacketRouterConfig; #[derive(Args, Clone)] pub struct Init { @@ -180,9 +180,9 @@ impl<'a> From<&'a Init> for OverrideNetworkRequesterConfig { } } -impl From<&Init> for OverrideIpForwarderConfig { +impl From<&Init> for OverrideIpPacketRouterConfig { fn from(_value: &Init) -> Self { - OverrideIpForwarderConfig {} + OverrideIpPacketRouterConfig {} } } diff --git a/gateway/src/commands/mod.rs b/gateway/src/commands/mod.rs index 41690d4af3..99c10869a5 100644 --- a/gateway/src/commands/mod.rs +++ b/gateway/src/commands/mod.rs @@ -32,10 +32,10 @@ pub(crate) enum Commands { // essentially an option to include NR without having to setup fresh gateway SetupNetworkRequester(setup_network_requester::CmdArgs), - /// Add ip forwarder support to this gateway - // essentially an option to include ip forwarder without having to setup fresh gateway + /// Add ip packet router support to this gateway + // essentially an option to include ip packet router without having to setup fresh gateway #[command(hide = true)] - SetupIpForwarder(setup_ip_packet_router::CmdArgs), + SetupIpPacketRouter(setup_ip_packet_router::CmdArgs), /// Sign text to prove ownership of this mixnode Sign(sign::Sign), @@ -58,7 +58,7 @@ pub(crate) async fn execute(args: Cli) -> Result<(), Box node_details::execute(m).await?, Commands::Run(m) => run::execute(m).await?, Commands::SetupNetworkRequester(m) => setup_network_requester::execute(m).await?, - Commands::SetupIpForwarder(m) => setup_ip_packet_router::execute(m).await?, + Commands::SetupIpPacketRouter(m) => setup_ip_packet_router::execute(m).await?, Commands::Sign(m) => sign::execute(m)?, Commands::BuildInfo(m) => build_info::execute(m), Commands::Completions(s) => s.generate(&mut crate::Cli::command(), bin_name), diff --git a/gateway/src/commands/run.rs b/gateway/src/commands/run.rs index e9c1802118..8e57b7b998 100644 --- a/gateway/src/commands/run.rs +++ b/gateway/src/commands/run.rs @@ -15,7 +15,7 @@ use nym_node::error::NymNodeError; use std::net::IpAddr; use std::path::PathBuf; -use super::helpers::OverrideIpForwarderConfig; +use super::helpers::OverrideIpPacketRouterConfig; #[derive(Args, Clone)] pub struct Run { @@ -182,9 +182,9 @@ impl<'a> From<&'a Run> for OverrideNetworkRequesterConfig { } } -impl From<&Run> for OverrideIpForwarderConfig { +impl From<&Run> for OverrideIpPacketRouterConfig { fn from(_value: &Run) -> Self { - OverrideIpForwarderConfig {} + OverrideIpPacketRouterConfig {} } } diff --git a/gateway/src/commands/setup_ip_packet_router.rs b/gateway/src/commands/setup_ip_packet_router.rs index abe28fc350..633c2a4bab 100644 --- a/gateway/src/commands/setup_ip_packet_router.rs +++ b/gateway/src/commands/setup_ip_packet_router.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::commands::helpers::{ - initialise_local_ip_packet_router, try_load_current_config, OverrideIpForwarderConfig, + initialise_local_ip_packet_router, try_load_current_config, OverrideIpPacketRouterConfig, }; use crate::node::helpers::load_public_key; use clap::Args; @@ -11,15 +11,15 @@ use std::path::PathBuf; #[derive(Args, Clone)] pub struct CmdArgs { - /// The id of the gateway you want to initialise local ip forwarder for. + /// The id of the gateway you want to initialise local ip packet router for. #[arg(long)] id: String, - /// Path to custom location for ip forward's config. + /// Path to custom location for ip packet routers' config. #[arg(long)] custom_config_path: Option, - /// Specify whether the ip forwarder should be enabled. + /// Specify whether the ip packet router should be enabled. // (you might want to create all the configs, generate keys, etc. but not actually run the NR just yet) #[arg(long)] enabled: Option, @@ -28,9 +28,9 @@ pub struct CmdArgs { output: OutputFormat, } -impl From<&CmdArgs> for OverrideIpForwarderConfig { +impl From<&CmdArgs> for OverrideIpPacketRouterConfig { fn from(_value: &CmdArgs) -> Self { - OverrideIpForwarderConfig {} + OverrideIpPacketRouterConfig {} } } diff --git a/gateway/src/config/mod.rs b/gateway/src/config/mod.rs index b2d8cf90e2..4737f38c58 100644 --- a/gateway/src/config/mod.rs +++ b/gateway/src/config/mod.rs @@ -380,7 +380,7 @@ impl Default for NetworkRequester { #[derive(Debug, Deserialize, PartialEq, Serialize)] #[serde(default)] pub struct IpPacketRouter { - /// Specifies whether ip forwarder service is enabled in this process. + /// Specifies whether ip packet router service is enabled in this process. pub enabled: bool, } diff --git a/gateway/src/config/persistence/paths.rs b/gateway/src/config/persistence/paths.rs index 7c6f2f7fc2..340b4a6495 100644 --- a/gateway/src/config/persistence/paths.rs +++ b/gateway/src/config/persistence/paths.rs @@ -57,7 +57,7 @@ pub struct GatewayPaths { // pub node_description: PathBuf, // pub cosmos_bip39_mnemonic: PathBuf, - /// Path to the configuration of the embedded ip forwarder. + /// Path to the configuration of the embedded ip packet router. #[serde(deserialize_with = "de_maybe_path")] pub ip_packet_router_config: Option, } diff --git a/gateway/src/config/template.rs b/gateway/src/config/template.rs index d48be52009..040a92bddd 100644 --- a/gateway/src/config/template.rs +++ b/gateway/src/config/template.rs @@ -107,7 +107,7 @@ clients_storage = '{{ storage_paths.clients_storage }}' # Path to the configuration of the embedded network requester. network_requester_config = '{{ storage_paths.network_requester_config }}' -# Path to the configuration of the embedded ip forwarder. +# Path to the configuration of the embedded ip packet router. ip_packet_router_config = '{{ storage_paths.ip_packet_router_config }}' ##### logging configuration options ##### diff --git a/gateway/src/error.rs b/gateway/src/error.rs index 7e193e4f19..d69b8eb480 100644 --- a/gateway/src/error.rs +++ b/gateway/src/error.rs @@ -50,10 +50,10 @@ pub(crate) enum GatewayError { }, #[error( - "failed to load config file for ip forwarder (gateway-id: '{id}') using path '{}'. detailed message: {source}", + "failed to load config file for ip packet router (gateway-id: '{id}') using path '{}'. detailed message: {source}", path.display() )] - IpForwarderConfigLoadFailure { + IpPacketRouterConfigLoadFailure { id: String, path: PathBuf, #[source] @@ -98,8 +98,8 @@ pub(crate) enum GatewayError { #[error("Path to network requester configuration file hasn't been specified. Perhaps try to run `setup-network-requester`?")] UnspecifiedNetworkRequesterConfig, - #[error("Path to ip forwarder configuration file hasn't been specified. Perhaps try to run `setup-ip-forwarder`?")] - UnspecifiedIpForwarderConfig, + #[error("Path to ip packet router configuration file hasn't been specified. Perhaps try to run `setup-ip-packet-router`?")] + UnspecifiedIpPacketRouterConfig, #[error("there was an issue with the local network requester: {source}")] NetworkRequesterFailure { @@ -107,8 +107,8 @@ pub(crate) enum GatewayError { source: NetworkRequesterError, }, - #[error("there was an issue with the local ip forwarder: {source}")] - IpForwarederFailure { + #[error("there was an issue with the local ip packet router: {source}")] + IpPacketRouterFailure { #[from] source: IpForwarderError, }, @@ -116,8 +116,8 @@ pub(crate) enum GatewayError { #[error("failed to startup local network requester")] NetworkRequesterStartupFailure, - #[error("failed to startup local ip forwarder")] - IpForwarderStartupFailure, + #[error("failed to startup local ip packet router")] + IpPacketRouterStartupFailure, #[error("there are no nym API endpoints available")] NoNymApisAvailable, diff --git a/gateway/src/node/helpers.rs b/gateway/src/node/helpers.rs index 50a52cd109..0b8fc9c994 100644 --- a/gateway/src/node/helpers.rs +++ b/gateway/src/node/helpers.rs @@ -102,7 +102,7 @@ pub(crate) fn load_ip_packet_router_config>( ) -> Result { let path = path.as_ref(); nym_ip_packet_router::Config::read_from_toml_file(path).map_err(|err| { - GatewayError::IpForwarderConfigLoadFailure { + GatewayError::IpPacketRouterConfigLoadFailure { id: id.to_string(), path: path.to_path_buf(), source: err, diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 85ce12fc62..f39f19f932 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -4,7 +4,7 @@ use self::helpers::load_ip_packet_router_config; use self::storage::PersistentStorage; use crate::commands::helpers::{ - override_ip_packet_router_config, override_network_requester_config, OverrideIpForwarderConfig, + override_ip_packet_router_config, override_network_requester_config, OverrideIpPacketRouterConfig, OverrideNetworkRequesterConfig, }; use crate::config::Config; @@ -58,7 +58,7 @@ struct StartedNetworkRequester { pub(crate) async fn create_gateway( config: Config, nr_config_override: Option, - ip_config_override: Option, + ip_config_override: Option, custom_mixnet: Option, ) -> Result { // don't attempt to read config if NR is disabled @@ -81,7 +81,7 @@ pub(crate) async fn create_gateway( Some(override_ip_packet_router_config(cfg, ip_config_override)) } else { // if NR is enabled, the config path must be specified - return Err(GatewayError::UnspecifiedIpForwarderConfig); + return Err(GatewayError::UnspecifiedIpPacketRouterConfig); } } else { None @@ -94,7 +94,7 @@ pub(crate) async fn create_gateway( custom_mixnet_path: custom_mixnet.clone(), }); - let ip_opts = ip_packet_router_config.map(|config| LocalIpForwarderOpts { + let ip_opts = ip_packet_router_config.map(|config| LocalIpPacketRouterOpts { config, custom_mixnet_path: custom_mixnet, }); @@ -110,7 +110,7 @@ pub struct LocalNetworkRequesterOpts { } #[derive(Debug, Clone)] -pub struct LocalIpForwarderOpts { +pub struct LocalIpPacketRouterOpts { config: nym_ip_packet_router::Config, custom_mixnet_path: Option, @@ -121,7 +121,7 @@ pub(crate) struct Gateway { network_requester_opts: Option, - ip_packet_router_opts: Option, + ip_packet_router_opts: Option, /// ed25519 keypair used to assert one's identity. identity_keypair: Arc, @@ -138,7 +138,7 @@ impl Gateway { pub fn new( config: Config, network_requester_opts: Option, - ip_packet_router_opts: Option, + ip_packet_router_opts: Option, storage: St, ) -> Result { Ok(Gateway { @@ -156,7 +156,7 @@ impl Gateway { pub async fn new_from_keys_and_storage( config: Config, network_requester_opts: Option, - ip_packet_router_opts: Option, + ip_packet_router_opts: Option, identity_keypair: identity::KeyPair, sphinx_keypair: encryption::KeyPair, storage: St, @@ -319,17 +319,17 @@ impl Gateway { }) } - async fn start_ip_service_provider( + async fn start_ip_packet_router( &self, forwarding_channel: MixForwardingSender, shutdown: TaskClient, ) -> Result { - info!("Starting IP service provider..."); + info!("Starting IP packet provider..."); // if network requester is enabled, configuration file must be provided! let Some(ip_opts) = &self.ip_packet_router_opts else { - log::error!("IP service provider is enabled but no configuration file was provided!"); - return Err(GatewayError::UnspecifiedIpForwarderConfig); + log::error!("IP packet router is enabled but no configuration file was provided!"); + return Err(GatewayError::UnspecifiedIpPacketRouterConfig); }; // this gateway, whenever it has anything to send to its local NR will use fake_client_tx @@ -346,7 +346,6 @@ impl Gateway { // TODO: well, wire it up internally to gateway traffic, shutdowns, etc. let (on_start_tx, on_start_rx) = oneshot::channel(); - // let mut nr_builder = nym_ip_packet_router::IpForwarderBuilder::new(nr_opts.config.clone()) let mut ip_builder = nym_ip_packet_router::IpForwarderBuilder::new(ip_opts.config.clone()) .with_shutdown(shutdown) .with_custom_gateway_transceiver(Box::new(transceiver)) @@ -359,25 +358,25 @@ impl Gateway { tokio::spawn(async move { if let Err(err) = ip_builder.run_service_provider().await { - // no need to panic as we have passed a task client to the ip forwarder so we're - // most likely already in the process of shutting down - error!("ip forwarder has failed: {err}") + // no need to panic as we have passed a task client to the ip packet router so + // we're most likely already in the process of shutting down + error!("ip packet router has failed: {err}") } }); let start_data = on_start_rx .await - .map_err(|_| GatewayError::IpForwarderStartupFailure)?; + .map_err(|_| GatewayError::IpPacketRouterStartupFailure)?; // this should be instantaneous since the data is sent on this channel before the on start is called; // the failure should be impossible let Ok(Some(packet_router)) = router_rx.try_recv() else { - return Err(GatewayError::IpForwarderStartupFailure); + return Err(GatewayError::IpPacketRouterStartupFailure); }; MessageRouter::new(nr_mix_receiver, packet_router).start_with_shutdown(router_shutdown); info!( - "the local ip forwarder is running on {}", + "the local ip packet router is running on {}", start_data.address ); @@ -495,7 +494,7 @@ impl Gateway { // in the command line arguments as well. if self.config.ip_packet_router.enabled { let embedded_ip_sp = self - .start_ip_service_provider( + .start_ip_packet_router( mix_forwarding_channel.clone(), shutdown.subscribe().named("ip_service_provider"), ) From 3307e7e0fc9a177a2f8be259bae382fd7ac87c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 10:38:30 +0100 Subject: [PATCH 049/142] rustfmt --- gateway/src/commands/helpers.rs | 8 ++++++-- gateway/src/commands/init.rs | 3 ++- gateway/src/node/mod.rs | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gateway/src/commands/helpers.rs b/gateway/src/commands/helpers.rs index 984465ecc7..f4ef8640e9 100644 --- a/gateway/src/commands/helpers.rs +++ b/gateway/src/commands/helpers.rs @@ -80,13 +80,17 @@ impl OverrideConfig { Config::with_enabled_network_requester, self.with_network_requester, ) - .with_optional(Config::with_enabled_ip_packet_router, self.with_ip_packet_router); + .with_optional( + Config::with_enabled_ip_packet_router, + self.with_ip_packet_router, + ); if config.network_requester.enabled && config.storage_paths.network_requester_config.is_none() { Ok(config.with_default_network_requester_config_path()) - } else if config.ip_packet_router.enabled && config.storage_paths.ip_packet_router_config.is_none() + } else if config.ip_packet_router.enabled + && config.storage_paths.ip_packet_router_config.is_none() { Ok(config.with_default_ip_packet_router_config_path()) } else { diff --git a/gateway/src/commands/init.rs b/gateway/src/commands/init.rs index 22a142228c..8bcfca93b7 100644 --- a/gateway/src/commands/init.rs +++ b/gateway/src/commands/init.rs @@ -244,7 +244,8 @@ pub async fn execute(args: Init) -> anyhow::Result<()> { initialise_local_network_requester(&config, nr_opts, *identity_keys.public_key()) .await?; } else if config.ip_packet_router.enabled { - initialise_local_ip_packet_router(&config, ip_opts, *identity_keys.public_key()).await?; + initialise_local_ip_packet_router(&config, ip_opts, *identity_keys.public_key()) + .await?; } eprintln!("Saved identity and mixnet sphinx keypairs"); diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index f39f19f932..d3851a671c 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -4,8 +4,8 @@ use self::helpers::load_ip_packet_router_config; use self::storage::PersistentStorage; use crate::commands::helpers::{ - override_ip_packet_router_config, override_network_requester_config, OverrideIpPacketRouterConfig, - OverrideNetworkRequesterConfig, + override_ip_packet_router_config, override_network_requester_config, + OverrideIpPacketRouterConfig, OverrideNetworkRequesterConfig, }; use crate::config::Config; use crate::error::GatewayError; From 47d0c0ffa22d76828887e725688a2ea4ff2ce9eb Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:37:57 +0100 Subject: [PATCH 050/142] add exit policy implementation steps --- documentation/operators/src/faq/smoosh-faq.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 2a90841283..c14a562534 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -51,11 +51,12 @@ The operators running Gateways would have to “open” their nodes to a wider r The progression will have three steps: 1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their gateways/network requesters and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ -2. Relatively soon the exit policy will become the default. +2. Relatively soon the exit policy will become the default. To disable this exit policy, operators must use `--disable-network-requester` flag. 3. Further down the line, it will be the only option. Then the *allowed.list* will be completely removed. -### Can I run a mix node only? +Keep in mind this only relates to changes happening on Gateway and Network Requester side. Whether this will be optional or mandatory depends on the chosen [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators). +### Can I run a mix node only? Depends which [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators) will be the final one. In case of the first one - yes. In case of the second option, all the nodes will be setup with gateway functionality turned on. From b169b6b43847eedb52ed3ea0c5739dbcf5a6053f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 11:48:20 +0100 Subject: [PATCH 051/142] ci: add workflow_dispatch to ci-nym-vpn-ui-rust --- .github/workflows/ci-nym-vpn-ui-rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-nym-vpn-ui-rust.yml b/.github/workflows/ci-nym-vpn-ui-rust.yml index 9f21147c30..57f257e1bc 100644 --- a/.github/workflows/ci-nym-vpn-ui-rust.yml +++ b/.github/workflows/ci-nym-vpn-ui-rust.yml @@ -1,6 +1,7 @@ name: ci-nym-vpn-ui-rust on: + workflow_dispatch: push: paths: - 'nym-vpn/ui/src-tauri/**' From 99c972e88031acff32f1a0ebf8257aca5ed8aaab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 11:41:04 +0100 Subject: [PATCH 052/142] Set name to ci-nym-api-tests --- .github/workflows/ci-nym-api-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-nym-api-tests.yml b/.github/workflows/ci-nym-api-tests.yml index fbc3d63eea..bef6e7bc06 100644 --- a/.github/workflows/ci-nym-api-tests.yml +++ b/.github/workflows/ci-nym-api-tests.yml @@ -1,4 +1,4 @@ -name: CI for Nym API Tests +name: ci-nym-api-tests on: workflow_dispatch: @@ -16,10 +16,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - + - name: Install npm run: npm install - + - name: Node v18 uses: actions/setup-node@v3 with: From f2383b5cb00efb9d94fc52092b1f6328202a411e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Tue, 31 Oct 2023 12:39:25 +0000 Subject: [PATCH 053/142] replaced '--disable-sign-ext' with '--signext-lowering' when running wasm-opt (#3896) * replaced '--disable-sign-ext' with '--signext-lowering' when running wasm-opt + updated wasm-opt * updated wasm-opt used in CI --- .github/workflows/ci-contracts-upload-binaries.yml | 4 ++-- .github/workflows/publish-nym-contracts.yml | 4 ++-- Makefile | 6 +----- contracts/mixnet/Makefile | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-contracts-upload-binaries.yml b/.github/workflows/ci-contracts-upload-binaries.yml index c5466d7506..620012763e 100644 --- a/.github/workflows/ci-contracts-upload-binaries.yml +++ b/.github/workflows/ci-contracts-upload-binaries.yml @@ -35,14 +35,14 @@ jobs: - name: Install Rust stable uses: actions-rs/toolchain@v1 with: - toolchain: 1.69.0 + toolchain: stable target: wasm32-unknown-unknown override: true - name: Install wasm-opt uses: ./.github/actions/install-wasm-opt with: - version: '112' + version: '114' - name: Build release contracts run: make contracts diff --git a/.github/workflows/publish-nym-contracts.yml b/.github/workflows/publish-nym-contracts.yml index f1cd855e02..03c4eddb63 100644 --- a/.github/workflows/publish-nym-contracts.yml +++ b/.github/workflows/publish-nym-contracts.yml @@ -14,13 +14,13 @@ jobs: - name: Install Rust stable uses: actions-rs/toolchain@v1 with: - toolchain: 1.69.0 + toolchain: stable target: wasm32-unknown-unknown override: true components: rustfmt, clippy - name: Install wasm-opt - run: cargo install --version 0.112.0 wasm-opt + run: cargo install --version 0.114.0 wasm-opt - name: Build release contracts run: make contracts diff --git a/Makefile b/Makefile index b567e3db31..31127bc413 100644 --- a/Makefile +++ b/Makefile @@ -93,10 +93,6 @@ $(eval $(call add_cargo_workspace,contracts,contracts,--lib --target wasm32-unkn $(eval $(call add_cargo_workspace,wallet,nym-wallet)) $(eval $(call add_cargo_workspace,connect,nym-connect/desktop)) -# OVERRIDE: wasm-opt fails if the binary has been built with the latest rustc. -# Pin to the last working version. -contracts_BUILD_RELEASE_TOOLCHAIN := +1.69.0 - # ----------------------------------------------------------------------------- # SDK # ----------------------------------------------------------------------------- @@ -144,7 +140,7 @@ contracts: build-release-contracts wasm-opt-contracts wasm-opt-contracts: for contract in $(CONTRACTS_WASM); do \ - wasm-opt --disable-sign-ext -Os $(CONTRACTS_OUT_DIR)/$$contract -o $(CONTRACTS_OUT_DIR)/$$contract; \ + wasm-opt --signext-lowering -Os $(CONTRACTS_OUT_DIR)/$$contract -o $(CONTRACTS_OUT_DIR)/$$contract; \ done # Consider adding 's' to make plural consistent (beware: used in github workflow) diff --git a/contracts/mixnet/Makefile b/contracts/mixnet/Makefile index 01452be701..4583495c9a 100644 --- a/contracts/mixnet/Makefile +++ b/contracts/mixnet/Makefile @@ -1,5 +1,5 @@ opt: wasm - wasm-opt --disable-sign-ext -Os ../target/wasm32-unknown-unknown/release/mixnet_contract.wasm -o ../target/wasm32-unknown-unknown/release/mixnet_contract.wasm + wasm-opt --signext-lowering -Os ../target/wasm32-unknown-unknown/release/mixnet_contract.wasm -o ../target/wasm32-unknown-unknown/release/mixnet_contract.wasm wasm: RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown From 5ce2e21abca40ebee04474c18bac6d58fb719dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 14:26:09 +0100 Subject: [PATCH 054/142] ci: iterate on ci-nym-vpn-ui-rust --- .github/workflows/ci-nym-vpn-ui-rust.yml | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-nym-vpn-ui-rust.yml b/.github/workflows/ci-nym-vpn-ui-rust.yml index 57f257e1bc..780f33dcac 100644 --- a/.github/workflows/ci-nym-vpn-ui-rust.yml +++ b/.github/workflows/ci-nym-vpn-ui-rust.yml @@ -2,16 +2,13 @@ name: ci-nym-vpn-ui-rust on: workflow_dispatch: - push: - paths: - - 'nym-vpn/ui/src-tauri/**' pull_request: paths: - 'nym-vpn/ui/src-tauri/**' jobs: build: - runs-on: [self-hosted, custom-linux] + runs-on: custom-linux env: CARGO_TERM_COLOR: always CARGOTOML_PATH: ./nym-vpn/ui/src-tauri/Cargo.toml @@ -32,18 +29,23 @@ jobs: components: rustfmt, clippy - name: Prepare build - working-directory: nym-vpn/ui/ - run: mkdir dist + run: mkdir nym-vpn/ui/dist - - name: Check build - working-directory: nym-vpn/ui/src-tauri - run: cargo build --release --lib --features custom-protocol + # - name: Check build + # working-directory: nym-vpn/ui/src-tauri + # run: cargo build --release --lib --features custom-protocol + # + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --manifest-path ${{ env.CARGOTOML_PATH }} --lib --features custom-protocol # - name: Run all tests # uses: actions-rs/cargo@v1 # with: # command: test -# args: --manifest-path ${{ env.CARGOTOML_PATH }} --workspace +# args: --manifest-path ${{ env.CARGOTOML_PATH }} - name: Check formatting uses: actions-rs/cargo@v1 @@ -56,10 +58,10 @@ jobs: continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ${{ env.CARGOTOML_PATH }} --workspace --all-features + args: --manifest-path ${{ env.CARGOTOML_PATH }} --all-features - name: Run clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --manifest-path ${{ env.CARGOTOML_PATH }} --workspace --all-features -- -D warnings + args: --manifest-path ${{ env.CARGOTOML_PATH }} --all-features --all-targets -- -D warnings From 199817bed06b8e8084bbc1aa5a62746b3d7762d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 14:30:30 +0100 Subject: [PATCH 055/142] ci: more iterate on ci-nym-vpn-ui-rust --- .github/workflows/ci-nym-vpn-ui-rust.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-nym-vpn-ui-rust.yml b/.github/workflows/ci-nym-vpn-ui-rust.yml index 780f33dcac..c60f11597d 100644 --- a/.github/workflows/ci-nym-vpn-ui-rust.yml +++ b/.github/workflows/ci-nym-vpn-ui-rust.yml @@ -31,10 +31,6 @@ jobs: - name: Prepare build run: mkdir nym-vpn/ui/dist - # - name: Check build - # working-directory: nym-vpn/ui/src-tauri - # run: cargo build --release --lib --features custom-protocol - # - name: Build uses: actions-rs/cargo@v1 with: @@ -53,14 +49,14 @@ jobs: command: fmt args: --manifest-path ${{ env.CARGOTOML_PATH }} --all -- --check - - uses: actions-rs/clippy-check@v1 - name: Clippy checks + - name: Annotate with clippy checks + uses: actions-rs/clippy-check@v1 continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --manifest-path ${{ env.CARGOTOML_PATH }} --all-features - - name: Run clippy + - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy From 6fbb6539effe86aa284b1053f827839c9dd8ff4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 14:36:07 +0100 Subject: [PATCH 056/142] ci: tidy ci-nym-vpn-ui-js --- .github/workflows/ci-nym-vpn-ui-js.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-nym-vpn-ui-js.yml b/.github/workflows/ci-nym-vpn-ui-js.yml index 5c3d286244..fc923aa43e 100644 --- a/.github/workflows/ci-nym-vpn-ui-js.yml +++ b/.github/workflows/ci-nym-vpn-ui-js.yml @@ -1,11 +1,7 @@ name: ci-nym-vpn-ui-js on: - push: - paths: - - 'nym-vpn/ui/src/**' - - 'nym-vpn/ui/package.json' - - 'nym-vpn/ui/index.html' + workflow_dispatch: pull_request: paths: - 'nym-vpn/ui/src/**' @@ -14,7 +10,7 @@ on: jobs: check: - runs-on: [ self-hosted, custom-linux ] + runs-on: custom-linux steps: - name: Checkout uses: actions/checkout@v4 From 5d8c5224ede9718f561304652db0b529a6f8c279 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 31 Oct 2023 15:44:22 +0100 Subject: [PATCH 057/142] added examples pages --- documentation/dev-portal/src/SUMMARY.md | 31 ++++++++++--------- .../dev-portal/src/examples/browser-only.md | 10 ++++++ .../src/examples/custom-services.md | 16 ++++++++++ .../dev-portal/src/examples/demos.md | 1 - .../src/examples/monorepo-examples.md | 5 +++ documentation/dev-portal/src/examples/rust.md | 1 - .../dev-portal/src/examples/typescript.md | 1 - .../dev-portal/src/examples/using-nrs.md | 17 ++++++++++ 8 files changed, 64 insertions(+), 18 deletions(-) create mode 100644 documentation/dev-portal/src/examples/browser-only.md create mode 100644 documentation/dev-portal/src/examples/custom-services.md delete mode 100644 documentation/dev-portal/src/examples/demos.md create mode 100644 documentation/dev-portal/src/examples/monorepo-examples.md delete mode 100644 documentation/dev-portal/src/examples/rust.md delete mode 100644 documentation/dev-portal/src/examples/typescript.md create mode 100644 documentation/dev-portal/src/examples/using-nrs.md diff --git a/documentation/dev-portal/src/SUMMARY.md b/documentation/dev-portal/src/SUMMARY.md index 7c9836c58a..b9909e8190 100644 --- a/documentation/dev-portal/src/SUMMARY.md +++ b/documentation/dev-portal/src/SUMMARY.md @@ -18,21 +18,21 @@ # User Manuals -- [NymConnect Monero](tutorials/monero.md) -- [NymConnect Matrix](tutorials/matrix.md) -- [NymConnect Telegram](tutorials/telegram.md) +- [NymConnect X Monero](tutorials/monero.md) +- [NymConnect X Matrix](tutorials/matrix.md) +- [NymConnect X Telegram](tutorials/telegram.md) # Code Examples -- [Rust](examples/rust.md) -- [Typescript](examples/typescript.md) -- [Nym Demos](examples/demos.md) -- [Community Apps](examples/community-apps.md) +- [Custom Service Providers](examples/custom-services.md) +- [Apps Using Network Requesters](examples/using-nrs.md) +- [Browser only](examples/browser-only.md) +- [Monorepo examples](examples/monorepo-examples.md) # Integrations - [Integration Options](integrations/integration-options.md) -- [Mixnet Integration](integrations/mixnet-integration.md) +[//]: # (- [Mixnet Integration](integrations/mixnet-integration.md)) - [Payment Integration](integrations/payment-integration.md) # Tutorials @@ -47,14 +47,15 @@ - [Preparing Your Service](tutorials/cosmos-service/service.md) - [Preparing Your Service pt2](tutorials/cosmos-service/service-src.md) - [Querying the Chain](tutorials/cosmos-service/querying.md) + - [Typescript](tutorials/typescript.md) - - [[DEPRECATED] Simple Service Provider](tutorials/simple-service-provider/simple-service-provider.md) - - [Tutorial Overview](tutorials/simple-service-provider/overview.md) - - [Preparing Your User Client Environment](tutorials/simple-service-provider/preparating-env.md) - - [Building Your User Client](tutorials/simple-service-provider/user-client.md) - - [Preparing Your Service Provider Environment](tutorials/simple-service-provider/preparating-env2.md) - - [Building Your Service Provider](tutorials/simple-service-provider/service-provider.md) - - [Sending a Message Through the Mixnet](tutorials/simple-service-provider/sending-message.md) + - [[DEPRECATED] Simple Service Provider](tutorials/simple-service-provider/simple-service-provider.md) + - [Tutorial Overview](tutorials/simple-service-provider/overview.md) + - [Preparing Your User Client Environment](tutorials/simple-service-provider/preparating-env.md) + - [Building Your User Client](tutorials/simple-service-provider/user-client.md) + - [Preparing Your Service Provider Environment](tutorials/simple-service-provider/preparating-env2.md) + - [Building Your Service Provider](tutorials/simple-service-provider/service-provider.md) + - [Sending a Message Through the Mixnet](tutorials/simple-service-provider/sending-message.md) # Events diff --git a/documentation/dev-portal/src/examples/browser-only.md b/documentation/dev-portal/src/examples/browser-only.md new file mode 100644 index 0000000000..9ee22ef1d8 --- /dev/null +++ b/documentation/dev-portal/src/examples/browser-only.md @@ -0,0 +1,10 @@ +# Browser only +With the Typescript SDK you can run a Nym client in a webworker - meaning you can connect to the mixnet through the browser without having to worry about any other code than your web framework. + +- NoTrustVerify have set up an example application using [`mixFetch`](https://sdk.nymtech.net/examples/mix-fetch) to fetch crypto prices from CoinGecko over the mixnet. + - [Website](https://notrustverify.github.io/mixfetch-examples/) + - [Coinbase](https://github.com/notrustverify/mixfetch-examples) + +- There is a coconut-scheme based Credential Library playground [here](https://coco-demo.nymtech.net/). This is a WASM implementation of our Coconut libraries which generate raw Coconut credentials. Test it to create and re-randomize your own credentials. For more information on what is happening here check out the [Coconut docs](https://nymtech.net/docs/coconut.html). + +- You can find a browser-based 'hello world' chat app [here](https://chat-demo.nymtech.net). Either open in two browser windows and send messages to yourself, or share with a friend and send messages to each other through the mixnet. diff --git a/documentation/dev-portal/src/examples/custom-services.md b/documentation/dev-portal/src/examples/custom-services.md new file mode 100644 index 0000000000..ce8262bb36 --- /dev/null +++ b/documentation/dev-portal/src/examples/custom-services.md @@ -0,0 +1,16 @@ +# Custom Services +Custom services involve two pieces of code that communicate via the mixnet: a client, and a custom server/service. This custom service will most likely interact with the wider internet / a clearnet service on your behalf, with the mixnet between you and the service, acting as a privacy shield. + +- PasteNym is a private pastebin alternative. It involves a browser-based frontend utilising the Typescript SDK and a Python-based backend service communicating with a standalone Nym Websocket Client. **If you're a Python developer, start here!**. + - [Frontend codebase](https://github.com/notrustverify/pastenym) + - [Backend codebase](https://github.com/notrustverify/pastenym-frontend) + +- Nostr-Nym is another application written by NoTrustVerify, standing between mixnet users and a Nostr server in order to protect their metadata from being revealed when gossiping. **Useful for Go and Python developers**. + - [Codebase](https://github.com/notrustverify/nostr-nym) + +- Spook and Nym-Ethtx are both examples of Ethereum transaction broadcasters utilising the mixnet, written in Rust. Since they were written before the release of the Rust SDK, they utilise standalone clients to communicate with the mixnet. + - [Spook](https://github.com/EdenBlockVC/spook) (**Typescript**) + - [Nym-Ethtx](https://github.com/noot/nym-ethtx) (**Rust**) + +- NymDrive is an early proof of concept application for privacy-enhanced file storage on IPFS. **JS and CSS**, and a good example of packaging as an Electrum app. + - [Codebase](https://github.com/saleel/nymdrive) diff --git a/documentation/dev-portal/src/examples/demos.md b/documentation/dev-portal/src/examples/demos.md deleted file mode 100644 index ddcf4dd8c4..0000000000 --- a/documentation/dev-portal/src/examples/demos.md +++ /dev/null @@ -1 +0,0 @@ -# Nym Demos diff --git a/documentation/dev-portal/src/examples/monorepo-examples.md b/documentation/dev-portal/src/examples/monorepo-examples.md new file mode 100644 index 0000000000..ad04287f20 --- /dev/null +++ b/documentation/dev-portal/src/examples/monorepo-examples.md @@ -0,0 +1,5 @@ +# Monorepo examples +As well as these examples, there are a bunch of examples for each SDK in the Nym monorepo. + +- [Rust SDK examples](https://github.com/nymtech/nym/tree/develop/sdk/rust/nym-sdk/examples) +- [Typescript SDK examples](https://github.com/nymtech/nym/tree/develop/sdk/typescript/examples) \ No newline at end of file diff --git a/documentation/dev-portal/src/examples/rust.md b/documentation/dev-portal/src/examples/rust.md deleted file mode 100644 index 2f1d5efed1..0000000000 --- a/documentation/dev-portal/src/examples/rust.md +++ /dev/null @@ -1 +0,0 @@ -# Rust diff --git a/documentation/dev-portal/src/examples/typescript.md b/documentation/dev-portal/src/examples/typescript.md deleted file mode 100644 index 42c9775801..0000000000 --- a/documentation/dev-portal/src/examples/typescript.md +++ /dev/null @@ -1 +0,0 @@ -# Typescript diff --git a/documentation/dev-portal/src/examples/using-nrs.md b/documentation/dev-portal/src/examples/using-nrs.md new file mode 100644 index 0000000000..0732340b79 --- /dev/null +++ b/documentation/dev-portal/src/examples/using-nrs.md @@ -0,0 +1,17 @@ +# Apps Using Network Requesters +These applications utilise custom app logic in the user-facing apps in order to communicate using the mixnet as a transport layer, without having to rely on custom server-side logic. Instead, they utilise existing Nym infrastructure - [Network Requesters](https://nymtech.net/operators/nodes/network-requester-setup.html) - with a custom whitelist addition. + +If you are sending 'normal' application traffic, and/or don't require and custom logic to be happening on the 'other side' of the mixnet, this is most likely the best option to take as a developer who wishes to privacy-enhance their application. + +> Nym will soon be switching from a whitelist-based approach to a blocklist-based approach to filtering traffic. As such, it will soon be even easier for developers to utilise the mixnet, as they will not have to run their own NRs or have to add their domains to the whitelist + +- DarkFi over Nym leverages Nym’s mixnet as a pluggable transport for DarkIRC, their p2p IRC variant. Users can anonymously connect to peers over the network, ensuring secure and private communication within the DarkFi ecosystem. Written in **Rust**. + - [Docs](https://darkrenaissance.github.io/darkfi/clients/nym_outbound.html?highlight=nym#3--run) + - [Github](https://github.com/darkrenaissance/darkfi/tree/master/doc) + +- MiniBolt is a complete guide to building a Bitcoin & Lightning full node on a personal computer. It has the capacity to run network traffic (transactions and syncing) over the mixnet, so you can privately sync your node and not expose your home IP to the wider world when interacting with the rest of the network! + - [Docs](https://v2.minibolt.info/bonus-guides/system/nym-mixnet#proxying-bitcoin-core) + - [Codebase](https://github.com/minibolt-guide/minibolt) + +- Email over Nym is a set of configuration options to set up a Network Requester to send and recieve emails over Nym, using something like Thunderbird. + - [Codebase](https://github.com/dial0ut/nymstr-email) \ No newline at end of file From d1160350b273ec27379902a5be66581b7161f370 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 31 Oct 2023 15:44:39 +0100 Subject: [PATCH 058/142] added notepad to gitignore file --- documentation/dev-portal/.gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/dev-portal/.gitignore b/documentation/dev-portal/.gitignore index c29699d0c0..1451d34afd 100644 --- a/documentation/dev-portal/.gitignore +++ b/documentation/dev-portal/.gitignore @@ -19,4 +19,6 @@ theme/ theme theme/* -.idea \ No newline at end of file +.idea + +notes \ No newline at end of file From 27810d473d131794336edbb64d7d29ee93448997 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 31 Oct 2023 15:45:00 +0100 Subject: [PATCH 059/142] added community examples --- documentation/dev-portal/src/examples/community-apps.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 documentation/dev-portal/src/examples/community-apps.md diff --git a/documentation/dev-portal/src/examples/community-apps.md b/documentation/dev-portal/src/examples/community-apps.md deleted file mode 100644 index b6c3fda9c6..0000000000 --- a/documentation/dev-portal/src/examples/community-apps.md +++ /dev/null @@ -1 +0,0 @@ -# Community Apps From 04fdc1dc60a5b283f5163b962482ccc4dbb6412c Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 31 Oct 2023 15:45:27 +0100 Subject: [PATCH 060/142] streamline integrations files --- .../src/integrations/integration-options.md | 14 +++++++++----- .../src/integrations/mixnet-integration.md | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/documentation/dev-portal/src/integrations/integration-options.md b/documentation/dev-portal/src/integrations/integration-options.md index 56f00a33da..328ec154a3 100644 --- a/documentation/dev-portal/src/integrations/integration-options.md +++ b/documentation/dev-portal/src/integrations/integration-options.md @@ -1,10 +1,14 @@ # Integration Options -If you've already gone through the different [Quick Start](../quickstart/overview.md) options, you have seen the possibilities avaliable to you for quickly connecting existing application code to another Nym process. +If you've already gone through the different [Quick Start](../quickstart/overview.md) options and had a look at the tutorials, you have seen the possibilities available to you for quickly connecting existing application code to another Nym process. -This section assumes you wish to integrate with Nym into your application code. +Below are a resources that will be useful for either beginning to integrate mixnet functionality into existing application code or build a new app using Nym. -The [integrations FAQ](../faq/integrations-faq.md) has a list of common questions regarding integrating with Nym and Nyx, as well as commonly required links. _This is a good place to start to get an overall idea of the tools and software avaliable to you_. +- **We suggest you begin with this [integration decision tree](https://sdk.nymtech.net/integrations)**. This will give you a better idea of what pieces of software (SDKs, standalone clients, service providers) your integration might involve, and what is currently possible to do with as little custom code as possible. + +- The [integrations FAQ](../faq/integrations-faq.md) has a list of common questions regarding integrating with Nym and Nyx, as well as commonly required links. + +- To get an idea of what is possible / has already been built, check the [community applications and resources](../community-resources/community-applications-and-guides.md) page, as well as the [developer tutorials codebase](https://github.com/nymtech/developer-tutorials). + +> If you wish to integrate with the Nyx blockchain to use `NYM` for payments, start with the [payment integration](./payment-integration.md) page. -If you wish to integrate with Nym to use the mixnet for application traffic, start with the [mixnet integration](./mixnet-integration.md) page. -If you wish to integrate with the Nyx blockchain to use `NYM` for payments, start with the [payment integration](./payment-integration.md) page. diff --git a/documentation/dev-portal/src/integrations/mixnet-integration.md b/documentation/dev-portal/src/integrations/mixnet-integration.md index 91e6c2d559..a26f0a885b 100644 --- a/documentation/dev-portal/src/integrations/mixnet-integration.md +++ b/documentation/dev-portal/src/integrations/mixnet-integration.md @@ -13,7 +13,7 @@ As outlined in the [clients overview documentation](https://nymtech.net/docs/cli #### Websocket client Your first option is the native websocket client. This is a compiled program that can run on Linux, Mac OS X, and Windows machines. It runs as a persistent process on a desktop or server machine. You can connect to it with any language that supports websockets. -You can see an example of how to connect to and manage interactions with this client in the [Simple Service Provider tutorial](../tutorials/simple-service-provider/simple-service-provider.md). +[//]: # (You can see an example of how to connect to and manage interactions with this client in the [Simple Service Provider tutorial](../tutorials/simple-service-provider/simple-service-provider.md).) #### Webassembly client If you’re working in JavaScript or Typescript in the browser, or building an edge computing app, you’ll likely want to choose the webassembly client. From 4b23cd94fd1298ee8a54dc43e7c86024b7dc9516 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 31 Oct 2023 15:46:25 +0100 Subject: [PATCH 061/142] streamlined node types --- documentation/dev-portal/src/infrastructure/node-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/dev-portal/src/infrastructure/node-types.md b/documentation/dev-portal/src/infrastructure/node-types.md index ba1a127d37..cb5e9c3d35 100644 --- a/documentation/dev-portal/src/infrastructure/node-types.md +++ b/documentation/dev-portal/src/infrastructure/node-types.md @@ -11,4 +11,4 @@ For more in-depth information on the network architecture, head to the [Network If you would like to concentrate on building an application that uses the mixnet: * Explore the [Quickstart](../quickstart/overview.md) options. * Check out examples of [Community Apps](../community-resources/community-applications-and-guides.md). -* Run through one of the [tutorials](../tutorials). +* Run through the [Rust SDK](../tutorials/rust-sdk.md) or [Typescript](../tutorials/typescript.md) tutorials. From eb7305e31c927ba7343ff14d10dc95d1580740bc Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:01:54 +0100 Subject: [PATCH 062/142] add token economics paper info --- documentation/operators/src/faq/smoosh-faq.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index c14a562534..2950b7df54 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -62,6 +62,10 @@ Depends which [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators ## Token Economics & Rewards +```admonish info +For any details on Nym token economics and Nym Mixnet reward system, please read [Nym token economics paper](https://nymtech.net/nym-cryptoecon-paper.pdf). +``` + ### What are the incentives for the node operator? In the original setup there were no incentives to run a `network-requester`. After the transition all the users will buy multiple tickets of zkNyms credentials and use those as [anonymous e-cash](https://arxiv.org/abs/2303.08221) to pay for their data traffic ([`Nym API`](https://github.com/nymtech/nym/tree/master/nym-api) will do the do cryptographical checks to prevent double-spending). All collected fees get distributed to all active nodes proportionally to their work by the end of each epoch. From b072a080ae6c32d7ad482f859cf68456bcb51154 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 31 Oct 2023 17:03:37 +0100 Subject: [PATCH 063/142] added shipyard info --- documentation/dev-portal/src/SUMMARY.md | 5 ++ .../src/shipyard/challenges-overview.md | 53 +++++++++++++++++++ .../dev-portal/src/shipyard/general.md | 16 ++++++ .../dev-portal/src/shipyard/guidelines.md | 12 +++++ .../dev-portal/src/shipyard/infra.md | 5 ++ 5 files changed, 91 insertions(+) create mode 100644 documentation/dev-portal/src/shipyard/challenges-overview.md create mode 100644 documentation/dev-portal/src/shipyard/general.md create mode 100644 documentation/dev-portal/src/shipyard/guidelines.md create mode 100644 documentation/dev-portal/src/shipyard/infra.md diff --git a/documentation/dev-portal/src/SUMMARY.md b/documentation/dev-portal/src/SUMMARY.md index b9909e8190..cd930be17a 100644 --- a/documentation/dev-portal/src/SUMMARY.md +++ b/documentation/dev-portal/src/SUMMARY.md @@ -57,6 +57,11 @@ - [Building Your Service Provider](tutorials/simple-service-provider/service-provider.md) - [Sending a Message Through the Mixnet](tutorials/simple-service-provider/sending-message.md) +# Shipyard Builders Hackathon 2023 +- [General Info & Resources](shipyard/general.md) +- [Hackathon Challenges](shipyard/challenges-overview.md) +- [A Note on Infrastructure](shipyard/infra.md) +- [Submission Guidelines](shipyard/guidelines.md) # Events diff --git a/documentation/dev-portal/src/shipyard/challenges-overview.md b/documentation/dev-portal/src/shipyard/challenges-overview.md new file mode 100644 index 0000000000..f4a0be6b92 --- /dev/null +++ b/documentation/dev-portal/src/shipyard/challenges-overview.md @@ -0,0 +1,53 @@ +# Hackathon Challenges +There are a few different challenges to choose from, each with different approaches. It is also recommended to check out the _**Examples**_ directory above for inspiration, and if you have questions ask in the [Builders channel]() on Matrix. + +## Tooling challenge +The tooling challenge involves creating tooling for users, operators, or developers of Nym. + +### Examples of user-centric tools: +- Facilitate onboarding new users more easily to staking their Nym, and understanding the pros and cons, as well as finding a good node to stake on. Examples of tools like this: + - [ExploreNym dashboard](https://explorenym.net/) + +- Show information on a dashboard about the network. NOTE due to the amount of dashboards currently available, we expect a good justification for why / something to set this apart from existing ones e.g. it is presenting information that is not already presented, or it is presented in a different manner, such as a TUI or CLI app instead of a web dashboard - maybe an onion service, or no-JS site for those who do not wish to enable Javascript in their day to day browsing. Examples of tools like this: + - [NTV's node dashboard](https://status.notrustverify.ch/d/CW3L7dVVk/nym-mixnet?orgId=1) + - [IsNymUp dashboard](https://isnymup.com/) + +### Examples of operator-centric tooling: +- An APY calculator for determining different financial outcomes of running a node in different situations. + +- Scripting for updating and maintaining nodes. Examples of tools like this: + - [ExploreNym's bash scripts](https://github.com/ExploreNYM/bash-tool) + +- Scripting for packaging node binaries for different OSes. + +### Examples of developer-centric tooling: +- Tooling for use in development: are there pain points you’ve found when developing apps with Nym that you have created scripts/hacks/workarounds for? Is there a pain point that you’ve thought ‘oh it would be great if I could just do X’? These are often the best places to start for building out developer tooling - if you’ve run into this issue, it's very likely someone else already has, or will! + +- Interacting with one of the SDKs via FFI: perhaps you’re a Go developer who would love to have the functionality of one of the Nym SDKs. Building an FFI tool might be something that would make your life easier, and can be shared with other developers in your situation. + +## Integrations challenge +Integration options for Nym are currently relatively restrictive due to the manner in which Nym handles sending and receiving traffic (as unordered Sphinx packets). This challenge will involve (most likely) implementing custom logic for handling Nym traffic for an existing application. + +There are several potential avenues developers can take here: +- If your application (or the application you wish to modify) is written in either Javascript or Typescript, and relies on the `fetch` library to make API calls, then you can use its drop-in replacement: [`mixfetch`](). Perhaps you wish to interact with Coingecko, or a private search engine like Kagi without leaking your IP and metadata, or an RPC endpoint. + - Example with [NTV’s privacy-preserving Coingecko API](https://github.com/notrustverify/mixfetch-examples) + - [Mixfetch docs examples](https://github.com/nymtech/nym/tree/develop/sdk/typescript/examples) + +- If you instead have an application that is able to use any of the SOCKS5, 4a, or 4 protocols (a rule of thumb: if it can communicate over Tor, it will) then you can experiment with using Nym as the transport layer. + - For Rustaceans, check out our [socks5 rust sdk example](https://nymtech.net/docs/sdk/rust.html#socks-client-example). + - For those of you who aren’t Crustaceans, then you will have to run the [Socks Client]() alongside your application as a separate process. _NOTE If you are taking this route, please make sure to include detailed documentation on how you expect users to do this, as well as including any process management tools, scripts, and configs (e.g. if you use systemd then include the configuration file for the client, as well as initialisation logic) that may streamline this process._ + - [NTV's PasteNym backend](https://github.com/notrustverify/pastenym) is a great example of an application with this architecture. + +- Nym is not only useful for blockchain-related apps, but for anything that requires network level privacy! Email clients, messaging clients, and decentralised storage are all key elements of the privacy-enabled web. Several of these sorts of apps can be found in the [community apps page](../community-resources/community-applications-and-guides.md). + +- There is currently a proof of concept using Rust Libp2p with Nym as a transport layer. Perhaps you can think of an app that uses Gossipsub for p2p communication could benefit from network-level privacy. + - [GossipSub chat example](https://github.com/nymtech/nym/tree/develop/sdk/rust/nym-sdk/examples/libp2p_chat) + - [Chainsafe's Lighthouse Nym PoC](https://github.com/ChainSafe/lighthouse/blob/nym/USE_NYM.md#usage) + +- Alternatively if you know of an app that is written in Rust or TS and could benefit from using Nym, you could fork and modify it using the SDKs. Applications such as: + - Magic Wormhole (has a [rust implementation](https://github.com/magic-wormhole/magic-wormhole.rs)) + - [Qual](https://github.com/qaul/qaul.net) (uses Rust Libp2p) + - [Syncthing](https://github.com/syncthing/syncthing) + +### MiniApp challenge +Write an app, either using one of the SDKs or a standalone client (harder). Think of what you can ‘nymify’ e.g. a version of the [TorBirdy](https://support.torproject.org/glossary/torbirdy/) extension that uses Nym instead of Tor. This is very similar to the Integration challenge in terms of the different potential _architectures_ and approaches, but just for new applications. diff --git a/documentation/dev-portal/src/shipyard/general.md b/documentation/dev-portal/src/shipyard/general.md new file mode 100644 index 0000000000..f07f3f22ac --- /dev/null +++ b/documentation/dev-portal/src/shipyard/general.md @@ -0,0 +1,16 @@ +# General Info & Resources +Discussions and announcements will be taking place in the [builders channel on Matrix](https://matrix.to/#/#shipyardbuilders:nymtech.chat). This channel can be used for all discussions. + +There will be daily office horse between 12-14:00 CET. + +This is an open call and questions will be answered on a first come first serve basis. + +The timetable can be found on the [Shipyard website](https://nymtech.net/learn/shipyard). + +## Links +- You can find **code examples**, **tutorials**, & **quickstart** information here, on the Developer Portal. +- [Rust SDK docs](https://nymtech.net/docs/sdk/rust.html) +- [Typescript SDK docs](https://sdk.nymtech.net) +- [Platform docs](https://nymtech.net/docs) +- [NoTrustVerify's Awesome Nym list](https://github.com/notrustverify/awesome-nym) +- [Builders channel Matrix](https://matrix.to/#/#shipyardbuilders:nymtech.chat) diff --git a/documentation/dev-portal/src/shipyard/guidelines.md b/documentation/dev-portal/src/shipyard/guidelines.md new file mode 100644 index 0000000000..ac8a7b18a8 --- /dev/null +++ b/documentation/dev-portal/src/shipyard/guidelines.md @@ -0,0 +1,12 @@ +# Submission Guidelines +We expect to see the following for submissions: +- Working code demos hosted publicly (Gitlab, Github, some other git instance). +- Quality > quantity here: we’d prefer to see a contained, working, and well documented Proof of Concept over a sprawling and messy app that does more but is poorly explained and presented. _The repo must be open source and able to be used and modified by others. The license is up to you._ +- If you already have existing apps / projects you are more than welcome to extend them, instead of starting from scratch - we will only be looking at the NEW additions to make this fair. If you are doing this, make sure to write a detailed account of what it is you;ve added to the existing project, preferably with the possibility to see the ‘old’ version as well as the new one. +- Proper documentation: + - If an app / tool: + - How do you install and run the code? How is it to be used? + - An overview of the application architecture: what is it doing? Is it relying on other services? + - If a UI-based solution: + - How to run it locally? We are happy to also accept staging deployments as part of the submission (e.g. via Vercel) but this does not replace being able to run it locally. +- Please make sure that your application works on commonly reproducible system environments (e.g. if you’re developing on Artix Linux please check for the necessary dependencies for more common-place OSes such as Debian, or Arch). If you are developing on Windows please make sure that it works on non-Windows machines also. Where possible please try to include build and install instructions for a variety of OSes. diff --git a/documentation/dev-portal/src/shipyard/infra.md b/documentation/dev-portal/src/shipyard/infra.md new file mode 100644 index 0000000000..b5621f6ff6 --- /dev/null +++ b/documentation/dev-portal/src/shipyard/infra.md @@ -0,0 +1,5 @@ +# A Note on Infrastructure +If you are writing an application that requires sending messages through the mixnet, then you will either be relying on existing infrastructure nodes (network requesters), or writing your own custom service (for example, the service written as part of the Rust SDK tutorial). + +If you are relying on network requesters then chances are that the IPs or domains your app relies on will not already be on the whitelist. Ideally, you would [run your own,](https://nymtech.net/operators/nodes/network-requester-setup.html) but we will also run a few nodes in ‘open proxy’ mode and share the addresses so that you can use them when beginning to develop. + From 0e906b1a3d71589bdb60ac168af3c01acab3197b Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:11:57 +0100 Subject: [PATCH 064/142] try change ifconfig.me -> icanhazip.com --- .../operators/src/nodes/gateway-setup.md | 84 ++++++++++--------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index d23e0ab02e..0fea8bba90 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -4,7 +4,7 @@ ```admonish info -As a result of [Project Smoosh](../faq/smoosh-faq.md), the current version of `nym-gateway` binary also contains `nym-network-requester` functionality which can be enabled [by the operator](./gateway-setup.md#initialising-gateway-with-network-requester). This combination is a basis of Nym exit gateway node - an essential piece in our new setup. Please read more in our [Project Smoosh FAQ](../faq/smoosh-faq.md) and [Exit Gateways Page](../legal/exit-gateway.md). We recommend operators begin to shift their setups to this new combined node, instead of operating two separate binaries. +As a result of [Project Smoosh](../faq/smoosh-faq.md), the current version of `nym-gateway` binary also contains `nym-network-requester` functionality which can be enabled [by the operator](./gateway-setup.md#initialising-gateway-with-network-requester). This combination is a basis of ***Nym Exit Gateway*** node - an essential piece in our new setup. Please read more in our [Project Smoosh FAQ](../faq/smoosh-faq.md) and [Exit Gateway](../legal/exit-gateway.md) pages. We recommend operators begin to shift their setups to this new combined node, instead of operating two separate binaries. ``` > Any syntax in `<>` brackets is a user's unique variable. Exchange with a corresponding name without the `<>` brackets. @@ -48,42 +48,17 @@ You can also check the various arguments required for individual commands with: ``` > Adding `--no-banner` startup flag will prevent Nym banner being printed even if run in tty environment. -### Initialising your gateway -To check available configuration options use: +## Initialising your Gateway + +As Nym developers build towards [Exit Gateway](../legal/exit-gateway.md) functionality, operators can now run their `nym-gateway` binary with in-build Network requester. Considering the plan to [*smoosh*](../faq/smoosh-faq.md) all the nodes into one binary and have wide opened Exit Gateways, we recommend this setup, instead of operating two separate binaries. + + +### Initialising Exit Gateway + +An operator can initialise the Exit Gateway functionality by: ``` - ./nym-gateway init --help -``` - -~~~admonish example collapsible=true title="Console output" -``` - -``` -~~~ - -The following command returns a gateway on your current IP with the `` of `supergateway`: - -``` -./nym-gateway init --id supergateway --host $(curl ifconfig.me) -``` - -~~~admonish example collapsible=true title="Console output" -``` - -``` -~~~ - -The `$(curl ifconfig.me)` command above returns your IP automatically using an external service. Alternatively, you can enter your IP manually if you wish. If you do this, remember to enter your IP **without** any port information. - - -#### Initialising gateway with network requester - -As some of the [Project Smoosh](../faq/smoosh-faq.md) changes getting implemented, network requester is smooshed with gateways. Such combination creates an exit gateway node, needed for new more open setup. - -An operator can initialise the exit gateway functionality by: - -``` -./nym-gateway init --id --host $(curl ifconfig.me) --with-network-requester +./nym-gateway init --id --host $(curl icanhazip.com) --with-network-requester ``` If we follow the previous example with `` chosen `superexitgateway`, adding the `--with-network-requester` flag, the outcome will be: @@ -91,15 +66,17 @@ If we follow the previous example with `` chosen `superexitgateway`, adding ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ You can see that the printed information besides *identity* and *sphinx keys* also includes a long string called *address*. This is the address to be provided to your local [socks5 client](https://nymtech.net/docs/clients/socks5-client.html) as a `--provider` if you wish to connect to your own exit gateway. -#### Add network requester to existing gateway +Additionally -If you already run a gateway and got it [upgraded](./maintenance.md#upgrading-your-node) to the [newest version](./gateway-setup.md#current-version), you can easily change its functionality to exit gateway. PAuse the gateway and run a command `setup-network-requester`. +#### Add Network requester to existing Gateway + +If you already run a gateway and got it [upgraded](./maintenance.md#upgrading-your-node) to the [newest version](./gateway-setup.md#current-version), you can easily change its functionality to exit gateway. Pause the gateway and run a command `setup-network-requester`. See the options: @@ -144,6 +121,37 @@ To read more about the configuration like whitelisted outbound requesters in `al Before you bond and run your gateway, please make sure the [firewall configuration](./maintenance.md#configure-your-firewall) is setup so your gateway can be reached from the outside. ``` +#### Initialising Gateway without Network requester + +In case you don't want to run your Gateway with the Exit Gateway functionality, you still can run a simple Gateway. + +To check available configuration options use: + +``` + ./nym-gateway init --help +``` + +~~~admonish example collapsible=true title="Console output" +``` + +``` +~~~ + +The following command returns a gateway on your current IP with the `` of `supergateway`: + +``` +./nym-gateway init --id supergateway --host $(curl icanhazip.com) +``` + +~~~admonish example collapsible=true title="Console output" +``` + +``` +~~~ + +The `$(curl icanhazip.com)` command above returns your IP automatically using an external service. Alternatively, you can enter your IP manually if you wish. If you do this, remember to enter your IP **without** any port information. + + ### Bonding your gateway #### Via the Desktop wallet From a10ebf342bcd894c96534cbca46a41eadaa5ea9e Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 31 Oct 2023 17:14:30 +0100 Subject: [PATCH 065/142] tweak --- documentation/dev-portal/src/shipyard/challenges-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/dev-portal/src/shipyard/challenges-overview.md b/documentation/dev-portal/src/shipyard/challenges-overview.md index f4a0be6b92..0a815b2d42 100644 --- a/documentation/dev-portal/src/shipyard/challenges-overview.md +++ b/documentation/dev-portal/src/shipyard/challenges-overview.md @@ -1,5 +1,5 @@ # Hackathon Challenges -There are a few different challenges to choose from, each with different approaches. It is also recommended to check out the _**Examples**_ directory above for inspiration, and if you have questions ask in the [Builders channel]() on Matrix. +There are a few different challenges to choose from, each with different approaches. It is also recommended to check out the _**Examples**_ directory above for inspiration. ## Tooling challenge The tooling challenge involves creating tooling for users, operators, or developers of Nym. From 37958ccb4e1c8d9e3fd7065be34a7fb36dfcc368 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Mon, 9 Oct 2023 14:06:46 +0200 Subject: [PATCH 066/142] Add nodejs wrapper for wasm sphynx client --- .../packages/nodejs-client/.gitignore | 1 + .../packages/nodejs-client/README.md | 34 + .../packages/nodejs-client/package.json | 13 +- .../nodejs-client/rollup-cjs.config.mjs | 31 + .../nodejs-client/rollup-worker.config.mjs | 46 + .../nodejs-client/scripts/build-prod.sh | 20 + .../packages/nodejs-client/scripts/build.sh | 35 + .../scripts/buildPackageJson.mjs | 22 + .../packages/nodejs-client/src/index.ts | 72 +- .../nodejs-client/src/node-adapter.ts | 43 + .../nodejs-client/src/subscriptions.ts | 1 + .../packages/nodejs-client/src/types.ts | 27 +- .../src/typings/rollup-worker.d.ts | 2 + .../packages/nodejs-client/src/worker.ts | 261 ++ .../packages/nodejs-client/tsconfig.json | 31 +- .../packages/nodejs-client/yarn.lock | 2951 +++++++++++++++++ sdk/typescript/scripts/publish.sh | 2 + sdk/typescript/scripts/unpublish.sh | 2 + 18 files changed, 3512 insertions(+), 82 deletions(-) create mode 100644 sdk/typescript/packages/nodejs-client/.gitignore create mode 100644 sdk/typescript/packages/nodejs-client/README.md create mode 100644 sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs create mode 100644 sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs create mode 100755 sdk/typescript/packages/nodejs-client/scripts/build-prod.sh create mode 100755 sdk/typescript/packages/nodejs-client/scripts/build.sh create mode 100644 sdk/typescript/packages/nodejs-client/scripts/buildPackageJson.mjs create mode 100644 sdk/typescript/packages/nodejs-client/src/node-adapter.ts create mode 100644 sdk/typescript/packages/nodejs-client/yarn.lock diff --git a/sdk/typescript/packages/nodejs-client/.gitignore b/sdk/typescript/packages/nodejs-client/.gitignore new file mode 100644 index 0000000000..c573ec84f3 --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/.gitignore @@ -0,0 +1 @@ +*/worker.js diff --git a/sdk/typescript/packages/nodejs-client/README.md b/sdk/typescript/packages/nodejs-client/README.md new file mode 100644 index 0000000000..db694fbe96 --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/README.md @@ -0,0 +1,34 @@ +# Nym NodeJS wrapper for Sphinx webassembly client + +This package is a NodeJS client that uses the wasm from the [Sphinx webassembly client](https://github.com/nymtech/nym/blob/4890c528bcb519290de81ef968bb2ba1399914a4/wasm/client/README.md), runs it inside a NodeJS Worker thread and allows users to send and receive Sphinx packets to/from a Nym mixnet. + +## Usage + +```js +const { createNymMixnetClient } = require('../dist/cjs/index.js'); + +async () => { + const nym = await createNymMixnetClient(); + + nym.events.subscribeToTextMessageReceivedEvent(async (e) => { + if (e.args.payload === 'Hello') { + await nym.client.stop(); + } + }); + + const nymApiUrl = 'https://validator.nymtech.net/api/'; + + // start the client and connect to a gateway + await nym.client.start({ + nymApiUrl, + clientId: 'my-client', + }); + + nym.events.subscribeToConnected(async (e) => { + // send a message to yourself + const message = 'Hello'; + const recipient = await nym.client.selfAddress(); + await nym.client.send({ payload: { message, mimeType: 'text/plain' }, recipient }); + }); +}; +``` diff --git a/sdk/typescript/packages/nodejs-client/package.json b/sdk/typescript/packages/nodejs-client/package.json index fa92d27d10..985b48bdf6 100644 --- a/sdk/typescript/packages/nodejs-client/package.json +++ b/sdk/typescript/packages/nodejs-client/package.json @@ -6,11 +6,10 @@ "files": [ "dist/**/*" ], - "main": "dist/index.mjs", + "main": "dist/cjs/index.js", "scripts": { "build": "scripts/build-prod.sh", "build:dev": "scripts/build.sh", - "build:dev:esm": "scripts/build-dev-esm.sh", "build:worker": "rollup -c rollup-worker.config.mjs", "clean": "rimraf dist", "docs:dev": "run-p docs:watch docs:serve ", @@ -23,12 +22,14 @@ "lint:fix": "eslint src --fix", "start": "tsc -w", "start:dev": "nodemon --watch src -e ts,json --exec 'yarn build:dev:esm'", - "test": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -c=jest.config.mjs --no-cache", "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/nym-client-wasm-node": ">=1.2.0-rc.10 || ^1", - "comlink": "^4.3.1" + "@nymproject/nym-client-wasm-node": "^1.2.0", + "comlink": "^4.3.1", + "fake-indexeddb": "^4.0.2", + "rollup-plugin-polyfill": "^4.2.0", + "ws": "^8.14.2" }, "devDependencies": { "@babel/core": "^7.15.0", @@ -68,6 +69,7 @@ "rimraf": "^3.0.2", "rollup": "^3.9.1", "rollup-plugin-base64": "^1.0.1", + "rollup-plugin-modify": "^3.0.0", "rollup-plugin-web-worker-loader": "^1.6.1", "ts-jest": "^29.1.0", "ts-loader": "^9.4.2", @@ -75,6 +77,5 @@ "typescript": "^4.8.4" }, "private": false, - "type": "module", "types": "./dist/index.d.ts" } diff --git a/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs b/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs new file mode 100644 index 0000000000..cb5fe9ac74 --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs @@ -0,0 +1,31 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import typescript from '@rollup/plugin-typescript'; +import resolve from '@rollup/plugin-node-resolve'; +import { wasm } from '@rollup/plugin-wasm'; +import webWorkerLoader from 'rollup-plugin-web-worker-loader'; +import replace from '@rollup/plugin-replace'; + +export default { + input: 'src/index.ts', + output: { + dir: 'dist/cjs', + format: 'cjs', + }, + plugins: [ + webWorkerLoader({ targetPlatform: 'node', inline: false }), + replace({ + values: { + "createURLWorkerFactory('web-worker-0.js')": + "createURLWorkerFactory(require('path').resolve(__dirname, 'web-worker-0.js'))", + }, + delimiters: ['', ''], + preventAssignment: true, + }), + resolve({ browser: false, extensions: ['.js', '.ts'] }), + wasm({ targetEnv: 'node', maxFileSize: 0 }), + typescript({ + compilerOptions: { outDir: 'dist/cjs', target: 'es5' }, + exclude: ['src/worker.ts'], + }), + ], +}; diff --git a/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs b/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs new file mode 100644 index 0000000000..b75c9820d1 --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs @@ -0,0 +1,46 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import typescript from '@rollup/plugin-typescript'; +import resolve from '@rollup/plugin-node-resolve'; +import { wasm } from '@rollup/plugin-wasm'; +import commonjs from '@rollup/plugin-commonjs'; +import modify from 'rollup-plugin-modify'; + +export default { + input: 'src/worker.ts', + output: { + dir: 'dist/cjs', + format: 'cjs', + }, + external: ['util', 'fake-indexeddb'], + plugins: [ + resolve({ + browser: false, + preferBuiltins: true, + extensions: ['.js', '.ts'], + }), + commonjs(), + // TODO: One of the wasm functions calls `new WebSocket` at one point, which we aren't able to polyfill correctly yet. + modify({ + find: 'const ret = new WebSocket(getStringFromWasm0(arg0, arg1));', + replace: 'const ws = require("ws"); const ret = new ws.WebSocket(getStringFromWasm0(arg0, arg1));', + }), + // TODO: `getObject(...).require` seems to generate a warning on Webpack but with Rollup we get a panic since it can't require. + // By hard coding the require here, we can workaround that. + // Reference: https://github.com/rust-random/getrandom/issues/224 + modify({ find: 'getObject(arg0).require(getStringFromWasm0(arg1, arg2));', replace: 'require("crypto");' }), + // TODO: The NodeJS setTimeout returns a Timeout object instead of a timeout id as the browser API one does. + // check how we could polyfill this, instead of commenting it out. + modify({ + find: /const ret = getObject\(arg0\).setTimeout\(getObject\(arg1\), arg2\);\n\s*?_assertNum\((.*?)\)/, + replace: (match) => match.replace('_assertNum(ret)', '// _assertNum(ret)'), + }), + wasm({ targetEnv: 'node', maxFileSize: 0, fileName: '[name].wasm' }), + typescript({ + compilerOptions: { + outDir: 'dist/cjs', + declaration: false, + target: 'es5', + }, + }), + ], +}; diff --git a/sdk/typescript/packages/nodejs-client/scripts/build-prod.sh b/sdk/typescript/packages/nodejs-client/scripts/build-prod.sh new file mode 100755 index 0000000000..979b03297a --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/scripts/build-prod.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +rm -rf dist || true +rm -rf ../../../../dist/ts/sdk/nodejs-client || true + +# run the build +scripts/build.sh +node scripts/buildPackageJson.mjs + +# move the output outside of the yarn/npm workspaces +mkdir -p ../../../../dist/ts/sdk +mv dist ../../../../dist/ts/sdk +mv ../../../../dist/ts/sdk/dist ../../../../dist/ts/sdk/nodejs-client + +echo "Output can be found in:" +realpath ../../../../dist/ts/sdk/nodejs-client diff --git a/sdk/typescript/packages/nodejs-client/scripts/build.sh b/sdk/typescript/packages/nodejs-client/scripts/build.sh new file mode 100755 index 0000000000..71bf0d64b6 --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/scripts/build.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +rm -rf dist || true + +#------------------------------------------------------- +# WEB WORKER (mix-fetch WASM) +#------------------------------------------------------- +# The web worker needs to be bundled because the WASM bundle needs to be loaded synchronously and all dependencies +# must be included in the worker script (because it is not loaded as an ES Module) + +# build the worker +rollup -c rollup-worker.config.mjs + +# move it next to the Typescript `src/index.ts` so it can be inlined by rollup +rm -f src/*.js +mv dist/cjs/worker.js src/worker.js + +#------------------------------------------------------- +# COMMON JS +#------------------------------------------------------- +# Some old build systems cannot fully handle ESM or ES2021, so build +# a CommonJS bundle targeting ES5 + +# build the SDK as a CommonJS bundle +rollup -c rollup-cjs.config.mjs + +#------------------------------------------------------- +# CLEAN UP +#------------------------------------------------------- + +cp README.md dist/cjs/README.md diff --git a/sdk/typescript/packages/nodejs-client/scripts/buildPackageJson.mjs b/sdk/typescript/packages/nodejs-client/scripts/buildPackageJson.mjs new file mode 100644 index 0000000000..592b17e1e0 --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/scripts/buildPackageJson.mjs @@ -0,0 +1,22 @@ +import * as fs from 'fs'; + +// parse the package.json from the SDK, so we can keep fields like the name and version +const json = JSON.parse(fs.readFileSync('package.json').toString()); + +// defaults (NB: these are in the output file locations) +const browser = 'index.js'; +const main = 'index.js'; +const types = 'index.d.ts'; + +const getPackageJson = (type, suffix) => ({ + name: `${json.name}${suffix ? `-${suffix}` : ''}`, + version: json.version, + license: json.license, + author: json.author, + type, + browser, + main, + types, +}); + +fs.writeFileSync('dist/cjs/package.json', JSON.stringify(getPackageJson('commonjs', 'commonjs'), null, 2)); diff --git a/sdk/typescript/packages/nodejs-client/src/index.ts b/sdk/typescript/packages/nodejs-client/src/index.ts index e124b7136c..88133c28c2 100644 --- a/sdk/typescript/packages/nodejs-client/src/index.ts +++ b/sdk/typescript/packages/nodejs-client/src/index.ts @@ -1,43 +1,23 @@ import * as Comlink from 'comlink'; +import { Worker } from 'worker_threads'; + import InlineWasmWebWorker from 'web-worker:./worker'; import { BinaryMessageReceivedEvent, + Client, ConnectedEvent, EventKinds, - IWebWorker, - Client, Events, + IWebWorker, LoadedEvent, MimeTypes, + NymMixnetClient, + NymMixnetClientOptions, RawMessageReceivedEvent, StringMessageReceivedEvent, } from './types'; import { createSubscriptions } from './subscriptions'; - -/** - * Options for the Nym mixnet client. - * @property autoConvertStringMimeTypes - An array of mime types. - * @example - * ```typescript - * const client = await createNymMixnetClient({ - * autoConvertStringMimeTypes: [MimeTypes.ApplicationJson, MimeTypes.TextPlain], - * }); - * ``` - */ - -export interface NymMixnetClientOptions { - autoConvertStringMimeTypes?: string[] | MimeTypes[]; -} - -/** - * The client for the Nym mixnet which gives access to client methods and event subscriptions. - * Returned by the {@link createNymMixnetClient} function. - * - */ -export interface NymMixnetClient { - client: Client; - events: Events; -} +import nodeEndpoint from './node-adapter'; /** * Create a client to send and receive traffic from the Nym mixnet. @@ -57,16 +37,16 @@ export const createNymMixnetClient = async (options?: NymMixnetClientOptions): P const { getSubscriptions, addSubscription } = subscriptions; // listen to messages from the worker, parse them and let the subscribers handle them, catching any unhandled exceptions - worker.addEventListener('message', (msg) => { - if (msg.data && msg.data.kind) { - const subscribers = getSubscriptions(msg.data.kind); + worker.addListener('message', (msg: { kind: EventKinds; args: any }) => { + if (msg.kind) { + const subscribers = getSubscriptions(msg.kind); (subscribers || []).forEach((s) => { try { // let the subscriber handle the message - s(msg.data); + s(msg); } catch (e) { // eslint-disable-next-line no-console - console.error('Unhandled error in event handler', msg.data, e); + console.error('Unhandled error in event handler', msg, e); } }); } @@ -85,14 +65,14 @@ export const createNymMixnetClient = async (options?: NymMixnetClientOptions): P }; // let comlink handle interop with the web worker - const client: Client = Comlink.wrap(worker); + const client: Client = Comlink.wrap(nodeEndpoint(worker)); // set any options if (options?.autoConvertStringMimeTypes) { - await client.setTextMimeTypes(options.autoConvertStringMimeTypes); + client.setTextMimeTypes(options.autoConvertStringMimeTypes); } else { // set some sensible defaults for text mime types - await client.setTextMimeTypes([MimeTypes.ApplicationJson, MimeTypes.TextPlain]); + client.setTextMimeTypes([MimeTypes.ApplicationJson, MimeTypes.TextPlain]); } // pass the client interop and subscription manage back to the caller @@ -115,17 +95,13 @@ const createWorker = async () => // however, it will make this SDK bundle bigger because of Base64 inline data const worker = new InlineWasmWebWorker(); - worker.addEventListener('error', reject); - worker.addEventListener( - 'message', - (msg) => { - worker.removeEventListener('error', reject); - if (msg.data?.kind === EventKinds.Loaded) { - resolve(worker); - } else { - reject(msg); - } - }, - { once: true }, - ); + worker.addListener('error', reject); + worker.addListener('message', (msg: { kind: EventKinds; args: any }) => { + worker.removeListener('error', reject); + if (msg.kind === EventKinds.Loaded) { + resolve(worker); + } else { + reject(msg); + } + }); }); diff --git a/sdk/typescript/packages/nodejs-client/src/node-adapter.ts b/sdk/typescript/packages/nodejs-client/src/node-adapter.ts new file mode 100644 index 0000000000..aacc0dc6a8 --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/src/node-adapter.ts @@ -0,0 +1,43 @@ +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// Borrowed from https://github.com/GoogleChromeLabs/comlink/blob/main/src/node-adapter.ts + +import { Endpoint } from 'comlink'; + +export interface NodeEndpoint { + postMessage(message: any, transfer?: any[]): void; + on(type: string, listener: EventListenerOrEventListenerObject, options?: {}): void; + off(type: string, listener: EventListenerOrEventListenerObject, options?: {}): void; + start?: () => void; +} + +export default function nodeEndpoint(nep: NodeEndpoint): Endpoint { + const listeners = new WeakMap(); + return { + postMessage: nep.postMessage.bind(nep), + addEventListener: (_, eh) => { + const l = (data: any) => { + if ('handleEvent' in eh) { + eh.handleEvent({ data } as MessageEvent); + } else { + eh({ data } as MessageEvent); + } + }; + nep.on('message', l); + listeners.set(eh, l); + }, + removeEventListener: (_, eh) => { + const l = listeners.get(eh); + if (!l) { + return; + } + nep.off('message', l); + listeners.delete(eh); + }, + start: nep.start && nep.start.bind(nep), + }; +} diff --git a/sdk/typescript/packages/nodejs-client/src/subscriptions.ts b/sdk/typescript/packages/nodejs-client/src/subscriptions.ts index d819591f8b..84b411da28 100644 --- a/sdk/typescript/packages/nodejs-client/src/subscriptions.ts +++ b/sdk/typescript/packages/nodejs-client/src/subscriptions.ts @@ -54,6 +54,7 @@ export const createSubscriptions = () => { try { handler(event); } catch (e: any) { + // eslint-disable-next-line no-console console.error(`Unhandled exception in handler for ${key}: `, e); } }); diff --git a/sdk/typescript/packages/nodejs-client/src/types.ts b/sdk/typescript/packages/nodejs-client/src/types.ts index c395877f76..528dc849d5 100644 --- a/sdk/typescript/packages/nodejs-client/src/types.ts +++ b/sdk/typescript/packages/nodejs-client/src/types.ts @@ -1,4 +1,29 @@ -import type { DebugWasm } from '@nymproject/nym-client-wasm'; +import type { DebugWasm } from '@nymproject/nym-client-wasm-node'; + +/** + * Options for the Nym mixnet client. + * @property autoConvertStringMimeTypes - An array of mime types. + * @example + * ```typescript + * const client = await createNymMixnetClient({ + * autoConvertStringMimeTypes: [MimeTypes.ApplicationJson, MimeTypes.TextPlain], + * }); + * ``` + */ + +export interface NymMixnetClientOptions { + autoConvertStringMimeTypes?: string[] | MimeTypes[]; +} + +/** + * The client for the Nym mixnet which gives access to client methods and event subscriptions. + * Returned by the {@link createNymMixnetClient} function. + * + */ +export interface NymMixnetClient { + client: Client; + events: Events; +} /** * diff --git a/sdk/typescript/packages/nodejs-client/src/typings/rollup-worker.d.ts b/sdk/typescript/packages/nodejs-client/src/typings/rollup-worker.d.ts index ead3d9e1f4..b3814fe6aa 100644 --- a/sdk/typescript/packages/nodejs-client/src/typings/rollup-worker.d.ts +++ b/sdk/typescript/packages/nodejs-client/src/typings/rollup-worker.d.ts @@ -1,4 +1,6 @@ declare module 'web-worker:*' { + import { Worker } from 'worker_threads'; + const WorkerFactory: new () => Worker; export default WorkerFactory; } diff --git a/sdk/typescript/packages/nodejs-client/src/worker.ts b/sdk/typescript/packages/nodejs-client/src/worker.ts index e69de29bb2..a3966a42de 100644 --- a/sdk/typescript/packages/nodejs-client/src/worker.ts +++ b/sdk/typescript/packages/nodejs-client/src/worker.ts @@ -0,0 +1,261 @@ +// eslint-disable-next-line import/first +import * as Comlink from 'comlink'; +import * as crypto from 'node:crypto'; +import * as fs from 'node:fs'; +import * as process from 'node:process'; +import { indexedDB } from 'fake-indexeddb'; +import { parentPort } from 'worker_threads'; +import '@nymproject/nym-client-wasm-node/nym_client_wasm_bg.wasm'; + +import { + ClientConfig, + NymClient, + NymClientBuilder, + decode_payload, + encode_payload_with_headers, + parse_utf8_string, + utf8_string_to_byte_array, +} from '@nymproject/nym-client-wasm-node'; + +import type { + BinaryMessageReceivedEvent, + ConnectedEvent, + IWebWorker, + LoadedEvent, + NymClientConfig, + OnRawPayloadFn, + RawMessageReceivedEvent, + StringMessageReceivedEvent, +} from './types'; + +import nodeEndpoint from './node-adapter'; +import { EventKinds, MimeTypes } from './types'; + +// polyfill setup +const globalVar = + // eslint-disable-next-line @typescript-eslint/no-implied-eval, no-restricted-globals, no-nested-ternary + typeof WorkerGlobalScope !== 'undefined' ? self : typeof global !== 'undefined' ? global : Function('return this;')(); + +globalVar.indexedDB = indexedDB; +globalVar.fs = fs; +globalVar.process = process; +globalVar.performance = performance; +globalVar.TextEncoder = TextEncoder; +globalVar.TextDecoder = TextDecoder; +globalVar.crypto = crypto; + +// eslint-disable-next-line no-console +console.log('[Nym WASM client] Starting Nym WASM web worker...'); + +/** + * Helper method to send typed messages. + * @param event The strongly typed message to send back to the calling thread. + * see https://nodejs.org/api/worker_threads.html#workerparentport + */ +// eslint-disable-next-line no-restricted-globals +const postMessageWithType = (event: E) => parentPort?.postMessage(event); + +/** + * This class holds the state of the Nym WASM client and provides any interop needed. + */ +class ClientWrapper { + client: NymClient | null = null; + + builder: NymClientBuilder | null = null; + + mimeTypes: string[] = [MimeTypes.TextPlain, MimeTypes.ApplicationJson]; + + /** + * Creates the WASM client and initialises it. + */ + init = (config: any, onRawPayloadHandler?: OnRawPayloadFn) => { + const onMessageHandler = (message: Uint8Array) => { + try { + if (onRawPayloadHandler) { + onRawPayloadHandler(message); + } + } catch (e) { + // eslint-disable-next-line no-console + console.error('Unhandled exception in `ClientWrapper.onRawPayloadHandler`: ', e); + } + }; + + this.builder = new NymClientBuilder(config, onMessageHandler); + }; + + /** + * Sets the mime-types that will be parsed for UTF-8 string content. + * + * @param mimeTypes An array of mime-types to treat as having string content. + */ + setTextMimeTypes = (mimeTypes: string[]) => { + this.mimeTypes = mimeTypes; + }; + + /** + * Gest the mime-types that are considered as string and will be automatically converted to byte arrays. + */ + getTextMimeTypes = () => this.mimeTypes; + + /** + * Returns the address of this client. + */ + selfAddress = () => { + if (!this.client) { + // eslint-disable-next-line no-console + console.error('Client has not been initialised. Please call `init` first.'); + return undefined; + } + return this.client.self_address(); + }; + + /** + * Connects to the gateway and starts the client sending traffic. + */ + start = async () => { + if (!this.builder) { + // eslint-disable-next-line no-console + console.error('Client config has not been initialised. Please call `init` first.'); + return; + } + // this is current limitation of wasm in rust - for async methods you can't take self by reference... + // I'm trying to figure out if I can somehow hack my way around it, but for time being you have to re-assign + // the object (it's the same one) + this.client = await this.builder.start_client(); + }; + + /** + * Stops the client and cleans up. + */ + stop = () => { + if (!this.client) { + // eslint-disable-next-line no-console + console.error('Client has not been initialised. Please call `init` first.'); + return; + } + this.client.free(); + this.client = null; + }; + + send = async ({ + payload, + recipient, + replySurbs = 0, + }: { + payload: Uint8Array; + recipient: string; + replySurbs?: number; + }) => { + if (!this.client) { + // eslint-disable-next-line no-console + console.error('Client has not been initialised. Please call `init` first.'); + return; + } + // TODO: currently we don't do anything with the result, it needs some typing and exposed back on the main thread + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const res = await this.client.send_anonymous_message(payload, recipient, replySurbs); + }; +} + +// this wrapper handles any state that the wasm-pack interop needs, e.g. holding an instance of the instantiated WASM code +const wrapper = new ClientWrapper(); + +const startHandler = async (config: NymClientConfig) => { + // create the client, passing handlers for events + wrapper.init(new ClientConfig(config), async (message) => { + // fire an event with the raw message + postMessageWithType({ + kind: EventKinds.RawMessageReceived, + args: { payload: message }, + }); + try { + // try to decode the payload to extract the mime-type, headers and payload body + const decodedPayload = decode_payload(message); + const { payload, headers } = decodedPayload; + const mimeType = decodedPayload.mimeType as MimeTypes; + if (wrapper.getTextMimeTypes().includes(mimeType)) { + const stringMessage = parse_utf8_string(payload); + // the payload is a string type (in the options at creation time, string mime-types are set, or fall back + // to defaults, such as `text/plain`, `application/json`, etc) + postMessageWithType({ + kind: EventKinds.StringMessageReceived, + args: { mimeType, payload: stringMessage, payloadRaw: payload, headers }, + }); + return; + } + // the payload is a binary type + postMessageWithType({ + kind: EventKinds.BinaryMessageReceived, + args: { mimeType, payload, headers }, + }); + } catch (e) { + // eslint-disable-next-line no-console + console.error('Failed to parse binary message', e); + } + }); + // start the client sending traffic + await wrapper.start(); + // get the address + const address = wrapper.selfAddress(); + postMessageWithType({ kind: EventKinds.Connected, args: { address } }); +}; + +// implement the public logic of this web worker (message exchange between the worker and caller is done by https://www.npmjs.com/package/comlink) +const webWorker: IWebWorker = { + start(config) { + // eslint-disable-next-line no-console + startHandler(config).catch((e) => console.error('[Nym WASM client] Failed to start', e)); + }, + stop() { + wrapper.stop(); + }, + selfAddress() { + return wrapper.selfAddress(); + }, + setTextMimeTypes(mimeTypes) { + wrapper.setTextMimeTypes(mimeTypes); + }, + getTextMimeTypes() { + return wrapper.getTextMimeTypes(); + }, + send(args) { + const { + recipient, + replySurbs, + payload: { mimeType, headers }, + } = args; + let payloadBytes = new Uint8Array(); + if (mimeType && wrapper.getTextMimeTypes().includes(mimeType) && typeof args.payload.message === 'string') { + payloadBytes = utf8_string_to_byte_array(args.payload.message); + } else if (typeof args.payload.message !== 'string') { + payloadBytes = args.payload.message; + } else { + // eslint-disable-next-line no-console + console.error( + "[Nym WASM client] Payload is a string. It should be a UintArray, or the mime-type should be set with `setTextMimeTypes` or in the options for `init({ autoConvertStringMimeTypes: ['text/plain', 'application/json'] })` for auto-conversion", + ); + return; + } + const payload = encode_payload_with_headers(mimeType || MimeTypes.ApplicationOctetStream, payloadBytes, headers); + wrapper + .send({ payload, recipient, replySurbs }) + // eslint-disable-next-line no-console + .catch((e) => console.error('[Nym WASM client] Failed to send message', e)); + }, + rawSend(args) { + const { recipient, payload, replySurbs } = args; + wrapper + .send({ payload, replySurbs, recipient }) + // eslint-disable-next-line no-console + .catch((e) => console.error('[Nym WASM client] Failed to send message', e)); + }, +}; + +// start comlink listening for messages and handle them above, if we are on a worker thread. +if (parentPort) { + Comlink.expose(webWorker, nodeEndpoint(parentPort)); +} + +// notify any listeners that the web worker has loaded - HOWEVER, the client has not been created and connected, +// listen for EventKinds.Connected before sending messages +postMessageWithType({ kind: EventKinds.Loaded, args: { loaded: true } }); diff --git a/sdk/typescript/packages/nodejs-client/tsconfig.json b/sdk/typescript/packages/nodejs-client/tsconfig.json index d613d363a3..5e2e667792 100644 --- a/sdk/typescript/packages/nodejs-client/tsconfig.json +++ b/sdk/typescript/packages/nodejs-client/tsconfig.json @@ -1,13 +1,7 @@ { "compileOnSave": false, "compilerOptions": { - "lib": [ - "es2021", - "dom", - "dom.iterable", - "esnext", - "webworker" - ], + "lib": ["es2021", "webworker"], "outDir": "./dist/", "module": "esnext", "target": "esnext", @@ -17,26 +11,9 @@ "skipLibCheck": true, "skipDefaultLibCheck": true, "declaration": true, + "allowSyntheticDefaultImports": true, "baseUrl": "." }, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "jest.config.js", - "webpack.config.js", - "webpack.prod.js", - "webpack.common.js", - "node_modules", - "**/node_modules", - "dist", - "**/dist", - "scripts", - "jest", - "__tests__", - "**/__tests__", - "__jest__", - "**/__jest__", - "config/*", - ] + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "**/node_modules", "dist", "**/dist", "scripts"] } diff --git a/sdk/typescript/packages/nodejs-client/yarn.lock b/sdk/typescript/packages/nodejs-client/yarn.lock new file mode 100644 index 0000000000..943e1eb3de --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/yarn.lock @@ -0,0 +1,2951 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@babel/runtime@^7.20.7": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" + integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== + dependencies: + regenerator-runtime "^0.14.0" + +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" + integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.51.0": + version "8.51.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.51.0.tgz#6d419c240cfb2b66da37df230f7e7eef801c32fa" + integrity sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg== + +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/source-map@^0.3.3": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" + integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@nymproject/nym-client-wasm-node@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@nymproject/nym-client-wasm-node/-/nym-client-wasm-node-1.2.0.tgz#46abe6b7535e80107d837bc6cc47edc1734aa773" + integrity sha512-L2hvMuudTQJgS/ZGGCSCD2oroccf7jWYXrq/E0Qqu0IxLlyjnTJ1xWWwXzUuwzBs+V5YZb0VIdB0kAovGLA+VA== + +"@rollup/plugin-commonjs@^24.0.1": + version "24.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz#79e54bd83bb64396761431eee6c44152ef322100" + integrity sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + commondir "^1.0.1" + estree-walker "^2.0.2" + glob "^8.0.3" + is-reference "1.2.1" + magic-string "^0.27.0" + +"@rollup/plugin-inject@^5.0.3": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz#616f3a73fe075765f91c5bec90176608bed277a3" + integrity sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg== + dependencies: + "@rollup/pluginutils" "^5.0.1" + estree-walker "^2.0.2" + magic-string "^0.30.3" + +"@rollup/plugin-node-resolve@^15.0.1": + version "15.2.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz#e5e0b059bd85ca57489492f295ce88c2d4b0daf9" + integrity sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + "@types/resolve" "1.20.2" + deepmerge "^4.2.2" + is-builtin-module "^3.2.1" + is-module "^1.0.0" + resolve "^1.22.1" + +"@rollup/plugin-replace@^5.0.2": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.4.tgz#fef548dc751d06747e8dca5b0e8e1fbf647ac7e1" + integrity sha512-E2hmRnlh09K8HGT0rOnnri9OTh+BILGr7NVJGB30S4E3cLRn3J0xjdiyOZ74adPs4NiAMgrjUMGAZNJDBgsdmQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + magic-string "^0.30.3" + +"@rollup/plugin-terser@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-terser/-/plugin-terser-0.2.1.tgz#dcf0b163216dafb64611b170a7667e76a7f03d2b" + integrity sha512-hV52c8Oo6/cXZZxVVoRNBb4zh+EKSHS4I1sedWV5pf0O+hTLSkrf6w86/V0AZutYtwBguB6HLKwz89WDBfwGOA== + dependencies: + serialize-javascript "^6.0.0" + smob "^0.0.6" + terser "^5.15.1" + +"@rollup/plugin-typescript@^10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-10.0.1.tgz#270b515b116ea28320e6bb62451c4767d49072d6" + integrity sha512-wBykxRLlX7EzL8BmUqMqk5zpx2onnmRMSw/l9M1sVfkJvdwfxogZQVNUM9gVMJbjRLDR5H6U0OMOrlDGmIV45A== + dependencies: + "@rollup/pluginutils" "^5.0.1" + resolve "^1.22.1" + +"@rollup/plugin-url@^8.0.1": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-url/-/plugin-url-8.0.2.tgz#aab4e209e9e012f65582bd99eb80b3bbdfe15afb" + integrity sha512-5yW2LP5NBEgkvIRSSEdJkmxe5cUNZKG3eenKtfJvSkxVm/xTTu7w+ayBtNwhozl1ZnTUCU0xFaRQR+cBl2H7TQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + make-dir "^3.1.0" + mime "^3.0.0" + +"@rollup/plugin-wasm@^6.1.1": + version "6.2.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-wasm/-/plugin-wasm-6.2.2.tgz#ea75fd8cc5ddba1e30bdc22e07cdbaf8d6d160bf" + integrity sha512-gpC4R1G9Ni92ZIRTexqbhX7U+9estZrbhP+9SRb0DW9xpB9g7j34r+J2hqrcW/lRI7dJaU84MxZM0Rt82tqYPQ== + dependencies: + "@rollup/pluginutils" "^5.0.2" + +"@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + +"@rollup/pluginutils@^5.0.1", "@rollup/pluginutils@^5.0.2": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.5.tgz#bbb4c175e19ebfeeb8c132c2eea0ecb89941a66c" + integrity sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.2.tgz#ff02bc3dc8317cd668dfec247b750ba1f1d62453" + integrity sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA== + +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + +"@types/json-schema@^7.0.9": + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" + integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/node@^16.7.13": + version "16.18.58" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.58.tgz#bf66f63983104ed57c754f4e84ccaf16f8235adb" + integrity sha512-YGncyA25/MaVtQkjWW9r0EFBukZ+JulsLcVZBlGUfIb96OBMjkoRWwQo5IEWJ8Fj06Go3GHw+bjYDitv6BaGsA== + +"@types/resolve@1.20.2": + version "1.20.2" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" + integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== + +"@types/semver@^7.3.12": + version "7.5.3" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" + integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== + +"@typescript-eslint/eslint-plugin@^5.13.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.13.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== + dependencies: + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== + dependencies: + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== + +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.10.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + eslint-scope "^5.1.1" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== + dependencies: + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.8.2, acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-sequence-parser@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +aria-query@^5.1.3: + version "5.3.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" + integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== + dependencies: + dequal "^2.0.3" + +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + +array-includes@^3.1.6: + version "3.1.7" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" + integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-string "^1.0.7" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.findlastindex@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.2.1" + +array.prototype.flat@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.tosorted@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz#620eff7442503d66c799d95503f82b475745cefd" + integrity sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.2.1" + +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + +ast-types-flow@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== + +asynciterator.prototype@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz#8c5df0514936cdd133604dfcc9d3fb93f09b2b62" + integrity sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg== + dependencies: + has-symbols "^1.0.3" + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +axe-core@^4.6.2: + version "4.8.2" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.8.2.tgz#2f6f3cde40935825cf4465e3c1c9e77b240ff6ae" + integrity sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g== + +axobject-query@^3.1.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" + integrity sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg== + dependencies: + dequal "^2.0.3" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-arraybuffer-es6@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/base64-arraybuffer-es6/-/base64-arraybuffer-es6-0.7.0.tgz#dbe1e6c87b1bf1ca2875904461a7de40f21abc86" + integrity sha512-ESyU/U1CFZDJUdr+neHRhNozeCv72Y7Vm0m1DCbjX3KBjT6eYocvAJlSk6+8+HkVwXlT1FNxhGW6q3UKAlCvvw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +builtin-modules@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@^3.5.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +cli-color@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.3.tgz#73769ba969080629670f3f2ef69a4bf4e7cc1879" + integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.61" + es6-iterator "^2.0.3" + memoizee "^0.4.15" + timers-ext "^0.1.7" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +comlink@^4.3.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/comlink/-/comlink-4.4.1.tgz#e568b8e86410b809e8600eb2cf40c189371ef981" + integrity sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@~9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" + integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +confusing-browser-globals@^1.0.10: + version "1.0.11" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" + integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +damerau-levenshtein@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" + integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-data-property@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +dequal@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" + integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +domexception@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== + dependencies: + webidl-conversions "^4.0.2" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +enhanced-resolve@^5.0.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +es-abstract@^1.22.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" + integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.2" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.1" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.12" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.11" + +es-iterator-helpers@^1.0.12: + version "1.0.15" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz#bd81d275ac766431d19305923707c3efd9f1ae40" + integrity sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g== + dependencies: + asynciterator.prototype "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.1" + es-abstract "^1.22.1" + es-set-tostringtag "^2.0.1" + function-bind "^1.1.1" + get-intrinsic "^1.2.1" + globalthis "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + iterator.prototype "^1.1.2" + safe-array-concat "^1.0.1" + +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-airbnb-base@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236" + integrity sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig== + dependencies: + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.5" + semver "^6.3.0" + +eslint-config-airbnb-typescript@^16.1.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-16.2.0.tgz#9193fafd62f1cbf444895f4495eae334baf3265b" + integrity sha512-OUaMPZpTOZGKd5tXOjJ9PRU4iYNW/Z5DoHIynjsVK/FpkWdiY5+nxQW6TiJAlLwVI1l53xUOrnlZWtVBVQzuWA== + dependencies: + eslint-config-airbnb-base "^15.0.0" + +eslint-config-airbnb@^19.0.4: + version "19.0.4" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3" + integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew== + dependencies: + eslint-config-airbnb-base "^15.0.0" + object.assign "^4.1.2" + object.entries "^1.1.5" + +eslint-config-prettier@^8.5.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== + +eslint-import-resolver-node@^0.3.2, eslint-import-resolver-node@^0.3.7: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== + dependencies: + debug "^3.2.7" + is-core-module "^2.13.0" + resolve "^1.22.4" + +eslint-import-resolver-root-import@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-root-import/-/eslint-import-resolver-root-import-1.0.4.tgz#82991138d8014b5e2283b27622ad1ba21f535609" + integrity sha512-c8cUQcELRBe0mnblBZJKEfL+jIUGR8pctK5gdru5N7bBOIve2WZ0R3KoO5GOksXJ4WzZhtcBS2xPaTJYEe4IdQ== + dependencies: + eslint-import-resolver-node "^0.3.2" + json5 "^2.1.0" + +eslint-module-utils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== + dependencies: + debug "^3.2.7" + +eslint-plugin-import@^2.25.4: + version "2.28.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" + integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== + dependencies: + array-includes "^3.1.6" + array.prototype.findlastindex "^1.2.2" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.8.0" + has "^1.0.3" + is-core-module "^2.13.0" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.fromentries "^2.0.6" + object.groupby "^1.0.0" + object.values "^1.1.6" + semver "^6.3.1" + tsconfig-paths "^3.14.2" + +eslint-plugin-jest@^26.1.1: + version "26.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz#7931c31000b1c19e57dbfb71bbf71b817d1bf949" + integrity sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng== + dependencies: + "@typescript-eslint/utils" "^5.10.0" + +eslint-plugin-jsx-a11y@^6.5.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz#fca5e02d115f48c9a597a6894d5bcec2f7a76976" + integrity sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA== + dependencies: + "@babel/runtime" "^7.20.7" + aria-query "^5.1.3" + array-includes "^3.1.6" + array.prototype.flatmap "^1.3.1" + ast-types-flow "^0.0.7" + axe-core "^4.6.2" + axobject-query "^3.1.1" + damerau-levenshtein "^1.0.8" + emoji-regex "^9.2.2" + has "^1.0.3" + jsx-ast-utils "^3.3.3" + language-tags "=1.0.5" + minimatch "^3.1.2" + object.entries "^1.1.6" + object.fromentries "^2.0.6" + semver "^6.3.0" + +eslint-plugin-prettier@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-react-hooks@^4.3.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== + +eslint-plugin-react@^7.29.2: + version "7.33.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz#69ee09443ffc583927eafe86ffebb470ee737608" + integrity sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw== + dependencies: + array-includes "^3.1.6" + array.prototype.flatmap "^1.3.1" + array.prototype.tosorted "^1.1.1" + doctrine "^2.1.0" + es-iterator-helpers "^1.0.12" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.6" + object.fromentries "^2.0.6" + object.hasown "^1.1.2" + object.values "^1.1.6" + prop-types "^15.8.1" + resolve "^2.0.0-next.4" + semver "^6.3.1" + string.prototype.matchall "^4.0.8" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.10.0: + version "8.51.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.51.0.tgz#4a82dae60d209ac89a5cff1604fea978ba4950f3" + integrity sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.51.0" + "@humanwhocodes/config-array" "^0.11.11" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + +estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + +fake-indexeddb@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-4.0.2.tgz#e7a884158fa576e00f03e973b9874619947013e4" + integrity sha512-SdTwEhnakbgazc7W3WUXOJfGmhH0YfG4d+dRPOFoYDRTL6U5t8tvrmkf2W/C3W1jk2ylV7Wrnj44RASqpX/lEw== + dependencies: + realistic-structured-clone "^3.0.0" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + +fast-glob@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.1.tgz#a02a15fdec25a8f844ff7cc658f03dd99eb4609b" + integrity sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + +flatted@^3.2.9: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +function.prototype.name@^1.1.5, function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^13.19.0: + version "13.23.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" + integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== + dependencies: + type-fest "^0.20.2" + +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.2.4: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +ignore-by-default@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" + integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== + +ignore@^5.2.0: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + +is-async-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" + integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA== + dependencies: + has-tostringtag "^1.0.0" + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-builtin-module@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== + dependencies: + builtin-modules "^3.3.0" + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1, is-date-object@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-finalizationregistry@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz#c8749b65f17c133313e661b1289b95ad3dbd62e6" + integrity sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw== + dependencies: + call-bind "^1.0.2" + +is-generator-function@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" + integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== + +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== + +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + +is-reference@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + dependencies: + "@types/estree" "*" + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-set@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" + integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + +is-weakmap@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" + integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +is-weakset@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" + integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +iterator.prototype@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0" + integrity sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w== + dependencies: + define-properties "^1.2.1" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + reflect.getprototypeof "^1.0.4" + set-function-name "^2.0.1" + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + +json5@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + +"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3: + version "3.3.5" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" + integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + object.assign "^4.1.4" + object.values "^1.1.6" + +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +language-subtag-registry@~0.3.2: + version "0.3.22" + resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d" + integrity sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w== + +language-tags@=1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a" + integrity sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ== + dependencies: + language-subtag-registry "~0.3.2" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash@^4.7.0: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== + dependencies: + es5-ext "~0.10.2" + +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +magic-string@0.25.2: + version "0.25.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9" + integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg== + dependencies: + sourcemap-codec "^1.4.4" + +magic-string@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" + integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" + +magic-string@^0.30.3: + version "0.30.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9" + integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + +make-dir@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +marked@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== + +memoizee@^0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" + integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.53" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.0, micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + +minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.0: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.0, minimist@^1.2.6, minimist@~1.2.0: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +next-tick@1, next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +nodemon@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.1.tgz#affe822a2c5f21354466b2fc8ae83277d27dadc7" + integrity sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw== + dependencies: + chokidar "^3.5.2" + debug "^3.2.7" + ignore-by-default "^1.0.1" + minimatch "^3.1.2" + pstree.remy "^1.1.8" + semver "^7.5.3" + simple-update-notifier "^2.0.0" + supports-color "^5.5.0" + touch "^3.1.0" + undefsafe "^2.0.5" + +nopt@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" + integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== + dependencies: + abbrev "1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.0.tgz#42695d3879e1cd5bda6df5062164d80c996e23e2" + integrity sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.2, object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.entries@^1.1.5, object.entries@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.7.tgz#2b47760e2a2e3a752f39dd874655c61a7f03c131" + integrity sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.fromentries@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" + integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.groupby@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + +object.hasown@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.3.tgz#6a5f2897bb4d3668b8e79364f98ccf971bda55ae" + integrity sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA== + dependencies: + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.values@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +open@^8.0.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + +ospec@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ospec/-/ospec-3.1.0.tgz#d36b8e10110f58f63a463df2390a7a73fe9579a8" + integrity sha512-+nGtjV3vlADp+UGfL51miAh/hB4awPBkQrArhcgG4trAaoA2gKt5bf9w0m9ch9zOr555cHWaCHZEDiBOkNZSxw== + dependencies: + glob "^7.1.3" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + +pstree.remy@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" + integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== + +punycode@^2.1.0, punycode@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +realistic-structured-clone@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/realistic-structured-clone/-/realistic-structured-clone-3.0.0.tgz#7b518049ce2dad41ac32b421cd297075b00e3e35" + integrity sha512-rOjh4nuWkAqf9PWu6JVpOWD4ndI+JHfgiZeMmujYcPi+fvILUu7g6l26TC1K5aBIp34nV+jE1cDO75EKOfHC5Q== + dependencies: + domexception "^1.0.1" + typeson "^6.1.0" + typeson-registry "^1.0.0-alpha.20" + +reflect.getprototypeof@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz#aaccbf41aca3821b87bb71d9dcbc7ad0ba50a3f3" + integrity sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + globalthis "^1.0.3" + which-builtin-type "^1.1.3" + +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + +regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + set-function-name "^2.0.0" + +reload@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/reload/-/reload-3.2.1.tgz#42d43e33e327efe1348c723272c6835fe333349a" + integrity sha512-ZdM8ZSEeI72zkhh6heMEvJ0vHZoovZXcJI6Zae8CzS7o5vO/WjZsAMMr0y1+3I/fCN7y7ZxABoUwwCswcLHkjQ== + dependencies: + cli-color "~2.0.0" + commander "~9.4.0" + finalhandler "~1.2.0" + minimist "~1.2.0" + open "^8.0.0" + serve-static "~1.15.0" + supervisor "~0.12.0" + ws "~8.11.0" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.22.1, resolve@^1.22.4: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^2.0.0-next.4: + version "2.0.0-next.5" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" + integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rollup-plugin-base64@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-base64/-/rollup-plugin-base64-1.0.1.tgz#b3529b94d23baeb66e1e3bffd04477fa792985eb" + integrity sha512-IbdX8fjuXO/Op3hYmRPjVo0VwcSenwsQDaDTFdoe+70B5ZGoLMtr96L2yhHXCfxv7HwZVvxZqLsuWj6VwzRt3g== + dependencies: + "@rollup/pluginutils" "^3.1.0" + +rollup-plugin-modify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-modify/-/rollup-plugin-modify-3.0.0.tgz#5326e11dfec247e8bbdd9507f3da1da1e5c7818b" + integrity sha512-p/ffs0Y2jz2dEnWjq1oVC7SY37tuS+aP7whoNaQz1EAAOPg+k3vKJo8cMMWx6xpdd0NzhX4y2YF9o/NPu5YR0Q== + dependencies: + magic-string "0.25.2" + ospec "3.1.0" + +rollup-plugin-polyfill@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill/-/rollup-plugin-polyfill-4.2.0.tgz#414c7ffca0557bf29a8f4e073b8eb7f4d02dac42" + integrity sha512-6eeOyn7nr2/xUOtB+MhydvqLrNKcSybGneOuWA+t8Q4rR9NQyeapzwuu5n6nX8OFfY1WI1sHconAofaC44IpuA== + +rollup-plugin-web-worker-loader@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-web-worker-loader/-/rollup-plugin-web-worker-loader-1.6.1.tgz#9d7a27575b64b0780fe4e8b3bc87470d217e485f" + integrity sha512-4QywQSz1NXFHKdyiou16mH3ijpcfLtLGOrAqvAqu1Gx+P8+zj+3gwC2BSL/VW1d+LW4nIHC8F7d7OXhs9UdR2A== + +rollup@^3.9.1: + version "3.29.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" + integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== + optionalDependencies: + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + isarray "^2.0.5" + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + +semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.3.4, semver@^7.3.7, semver@^7.5.3: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serialize-javascript@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + dependencies: + randombytes "^2.1.0" + +serve-static@~1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +set-function-name@^2.0.0, set-function-name@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shiki@^0.14.1: + version "0.14.5" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.5.tgz#375dd214e57eccb04f0daf35a32aa615861deb93" + integrity sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw== + dependencies: + ansi-sequence-parser "^1.1.0" + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +simple-update-notifier@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" + integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w== + dependencies: + semver "^7.5.3" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +smob@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/smob/-/smob-0.0.6.tgz#09b268fea916158a2781c152044c6155adbb8aa1" + integrity sha512-V21+XeNni+tTyiST1MHsa84AQhT1aFZipzPpOFAVB8DkHzwJyjjAmt9bgwnuZiZWnIbMo2duE29wybxv/7HWUw== + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + +sourcemap-codec@^1.4.4: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +string.prototype.matchall@^4.0.8: + version "4.0.10" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz#a1553eb532221d4180c51581d6072cd65d1ee100" + integrity sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + regexp.prototype.flags "^1.5.0" + set-function-name "^2.0.0" + side-channel "^1.0.4" + +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supervisor@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/supervisor/-/supervisor-0.12.0.tgz#de7e6337015b291851c10f3538c4a7f04917ecc1" + integrity sha512-iBYeU5Or4WiiIa3+ns1DpHIiHjNNXSuYUiixKcznewwo4ImBJ8EobktaAo2csOcauhrz4SvKRTou8Z2C3W28+A== + +supports-color@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser@^5.15.1: + version "5.22.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.22.0.tgz#4f18103f84c5c9437aafb7a14918273310a8a49d" + integrity sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +timers-ext@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +touch@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" + integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== + dependencies: + nopt "~1.0.10" + +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + +ts-loader@^9.4.2: + version "9.5.0" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.0.tgz#f0a51dda37cc4d8e43e6cb14edebbc599b0c3aa2" + integrity sha512-LLlB/pkB4q9mW2yLdFMnK3dEHbrBjeZTYguaaIfusyojBgAGf5kF+O6KcWqiGzWqHk0LBsoolrp4VftEURhybg== + dependencies: + chalk "^4.1.0" + enhanced-resolve "^5.0.0" + micromatch "^4.0.0" + semver "^7.3.4" + source-map "^0.7.4" + +tsconfig-paths@^3.14.2: + version "3.14.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + +typedoc@^0.24.8: + version "0.24.8" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.8.tgz#cce9f47ba6a8d52389f5e583716a2b3b4335b63e" + integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w== + dependencies: + lunr "^2.3.9" + marked "^4.3.0" + minimatch "^9.0.0" + shiki "^0.14.1" + +typescript@^4.8.4: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +typeson-registry@^1.0.0-alpha.20: + version "1.0.0-alpha.39" + resolved "https://registry.yarnpkg.com/typeson-registry/-/typeson-registry-1.0.0-alpha.39.tgz#9e0f5aabd5eebfcffd65a796487541196f4b1211" + integrity sha512-NeGDEquhw+yfwNhguLPcZ9Oj0fzbADiX4R0WxvoY8nGhy98IbzQy1sezjoEFWOywOboj/DWehI+/aUlRVrJnnw== + dependencies: + base64-arraybuffer-es6 "^0.7.0" + typeson "^6.0.0" + whatwg-url "^8.4.0" + +typeson@^6.0.0, typeson@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/typeson/-/typeson-6.1.0.tgz#5b2a53705a5f58ff4d6f82f965917cabd0d7448b" + integrity sha512-6FTtyGr8ldU0pfbvW/eOZrEtEkczHRUtduBnA90Jh9kMPCiFNnXIon3vF41N0S4tV1HHQt4Hk1j4srpESziCaA== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +undefsafe@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" + integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +vscode-oniguruma@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" + integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== + +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + +whatwg-url@^8.4.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-builtin-type@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.3.tgz#b1b8443707cc58b6e9bf98d32110ff0c2cbd029b" + integrity sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw== + dependencies: + function.prototype.name "^1.1.5" + has-tostringtag "^1.0.0" + is-async-function "^2.0.0" + is-date-object "^1.0.5" + is-finalizationregistry "^1.0.2" + is-generator-function "^1.0.10" + is-regex "^1.1.4" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.9" + +which-collection@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" + integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== + dependencies: + is-map "^2.0.1" + is-set "^2.0.1" + is-weakmap "^2.0.1" + is-weakset "^2.0.1" + +which-typed-array@^1.1.11, which-typed-array@^1.1.9: + version "1.1.11" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" + integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^8.14.2: + version "8.14.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" + integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g== + +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/sdk/typescript/scripts/publish.sh b/sdk/typescript/scripts/publish.sh index 43084f930b..fff437da72 100755 --- a/sdk/typescript/scripts/publish.sh +++ b/sdk/typescript/scripts/publish.sh @@ -36,6 +36,8 @@ packages=( "ts/sdk/mix-fetch/esm" "ts/sdk/mix-fetch/esm-full-fat" +"ts/sdk/nodejs-client/cjs" + "ts/sdk/node-tester/cjs" "ts/sdk/node-tester/cjs-full-fat" "ts/sdk/node-tester/esm" diff --git a/sdk/typescript/scripts/unpublish.sh b/sdk/typescript/scripts/unpublish.sh index 99ef7b5e25..8d0671faa9 100755 --- a/sdk/typescript/scripts/unpublish.sh +++ b/sdk/typescript/scripts/unpublish.sh @@ -23,6 +23,8 @@ packages2=( "ts/sdk/mix-fetch/esm" "ts/sdk/mix-fetch/esm-full-fat" +"ts/sdk/nodejs-client/cjs" + "ts/sdk/node-tester/cjs" "ts/sdk/node-tester/cjs-full-fat" "ts/sdk/node-tester/esm" From 14d0d5dcbb76f49a1b0e069e2744aba8e4c1d61c Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 18 Oct 2023 07:42:06 +0200 Subject: [PATCH 067/142] Add mix-fetch for nodejs --- .../packages/mix-fetch-node/.babelrc | 3 + .../packages/mix-fetch-node/.gitignore | 2 + .../packages/mix-fetch-node/README.md | 14 + .../mix-fetch-node/internal-dev/index.mjs | 54 + .../packages/mix-fetch-node/jest.config.mjs | 16 + .../packages/mix-fetch-node/package.json | 71 + .../mix-fetch-node/rollup-cjs.config.mjs | 31 + .../mix-fetch-node/rollup-worker.config.mjs | 40 + .../scripts/build-prod-docs-collect.sh | 17 + .../mix-fetch-node/scripts/build-prod.sh | 20 + .../packages/mix-fetch-node/scripts/build.sh | 48 + .../scripts/buildPackageJson.mjs | 22 + .../mix-fetch-node/scripts/publish.sh | 17 + .../mix-fetch-node/src/create-mix-fetch.ts | 77 + .../packages/mix-fetch-node/src/index.ts | 57 + .../mix-fetch-node/src/node-adapter.ts | 43 + .../packages/mix-fetch-node/src/types.ts | 98 + .../worker/handle-response-mime-types.test.ts | 73 + .../src/worker/handle-response-mime-types.ts | 111 + .../mix-fetch-node/src/worker/index.ts | 8 + .../mix-fetch-node/src/worker/main.ts | 74 + .../mix-fetch-node/src/worker/polyfill.ts | 38 + .../mix-fetch-node/src/worker/wasm-loading.ts | 69 + .../mix-fetch-node/tsconfig.jest.json | 35 + .../packages/mix-fetch-node/tsconfig.json | 36 + .../packages/mix-fetch-node/typedoc.json | 32 + .../mix-fetch-node/typings/rollup-worker.d.ts | 6 + .../mix-fetch-node/typings/wasm_exec.d.ts | 11 + .../packages/mix-fetch-node/yarn.lock | 4428 +++++++++++++++++ sdk/typescript/scripts/publish.sh | 1 + sdk/typescript/scripts/unpublish.sh | 1 + wasm/mix-fetch/go-mix-conn/cmd/wasm/main.go | 62 + 32 files changed, 5615 insertions(+) create mode 100644 sdk/typescript/packages/mix-fetch-node/.babelrc create mode 100644 sdk/typescript/packages/mix-fetch-node/.gitignore create mode 100644 sdk/typescript/packages/mix-fetch-node/README.md create mode 100644 sdk/typescript/packages/mix-fetch-node/internal-dev/index.mjs create mode 100644 sdk/typescript/packages/mix-fetch-node/jest.config.mjs create mode 100644 sdk/typescript/packages/mix-fetch-node/package.json create mode 100644 sdk/typescript/packages/mix-fetch-node/rollup-cjs.config.mjs create mode 100644 sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs create mode 100755 sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh create mode 100755 sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh create mode 100755 sdk/typescript/packages/mix-fetch-node/scripts/build.sh create mode 100644 sdk/typescript/packages/mix-fetch-node/scripts/buildPackageJson.mjs create mode 100755 sdk/typescript/packages/mix-fetch-node/scripts/publish.sh create mode 100644 sdk/typescript/packages/mix-fetch-node/src/create-mix-fetch.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/index.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/node-adapter.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/types.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.test.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/worker/index.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/worker/main.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/src/worker/wasm-loading.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/tsconfig.jest.json create mode 100644 sdk/typescript/packages/mix-fetch-node/tsconfig.json create mode 100644 sdk/typescript/packages/mix-fetch-node/typedoc.json create mode 100644 sdk/typescript/packages/mix-fetch-node/typings/rollup-worker.d.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/typings/wasm_exec.d.ts create mode 100644 sdk/typescript/packages/mix-fetch-node/yarn.lock diff --git a/sdk/typescript/packages/mix-fetch-node/.babelrc b/sdk/typescript/packages/mix-fetch-node/.babelrc new file mode 100644 index 0000000000..0ef5ffc214 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["@babel/env"] +} diff --git a/sdk/typescript/packages/mix-fetch-node/.gitignore b/sdk/typescript/packages/mix-fetch-node/.gitignore new file mode 100644 index 0000000000..71c42dc754 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/.gitignore @@ -0,0 +1,2 @@ +src/worker/*.js +docs diff --git a/sdk/typescript/packages/mix-fetch-node/README.md b/sdk/typescript/packages/mix-fetch-node/README.md new file mode 100644 index 0000000000..dc62208cd3 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/README.md @@ -0,0 +1,14 @@ +# Nym MixFetch + +This package is a drop-in replacement for `fetch` in NodeJS to send HTTP requests over the Nym Mixnet. + +## Usage + +```js +const { mixFetch } = require('@nymproject/mix-fetch-node'); + +... + +const response = await mixFetch('https://nymtech.net'); +const html = await response.text(); +``` diff --git a/sdk/typescript/packages/mix-fetch-node/internal-dev/index.mjs b/sdk/typescript/packages/mix-fetch-node/internal-dev/index.mjs new file mode 100644 index 0000000000..a49455449d --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/internal-dev/index.mjs @@ -0,0 +1,54 @@ +import { createMixFetch, disconnectMixFetch } from '../dist/cjs/index.js'; + +/** + * The main entry point + */ +(async () => { + console.log('Tester is starting up...'); + + const addr = + 'D274yd1h3L3pNJzdxE5VgJ7izAsAVMsDrQtFSkKUegfk.8J67cGbcwvrJKF3Kb16HVWWc9AnrFnEibNCm9zCkuVFu@Emswx6KXyjRfq1c2k4d4uD2e6nBSbH1biorCZUei8UNS'; + + console.log('About to set up mixFetch...'); + const { mixFetch } = await createMixFetch({ + preferredNetworkRequester: addr, + clientId: 'node-client1', + clientOverride: { + coverTraffic: { disableLoopCoverTrafficStream: true }, + traffic: { disableMainPoissonPacketDistribution: true }, + }, + mixFetchOverride: { requestTimeoutMs: 60000 }, + responseBodyConfigMap: {}, + extra: {}, + }); + + globalThis.mixFetch = mixFetch; + + if (!globalThis.mixFetch) { + console.error('Oh no! Could not create mixFetch'); + } else { + console.log('Ready!'); + } + + let url = 'https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt'; + console.log(`Using mixFetch to get ${url}...`); + const args = { mode: 'unsafe-ignore-cors' }; + + let resp = await mixFetch(url, args); + console.log({ resp }); + const text = await resp.text(); + + console.log('disconnecting'); + await disconnectMixFetch(); + console.log('disconnected! all further usages should fail'); + + // get an image + url = 'https://nymtech.net/favicon.svg'; + resp = await mixFetch(url, args); + console.log({ resp }); + const buffer = await resp.arrayBuffer(); + const type = resp.headers.get('Content-Type') || 'image/svg'; + const blobUrl = URL.createObjectURL(new Blob([buffer], { type })); + console.log(JSON.stringify({ bufferBytes: buffer.byteLength, blobUrl }, null, 2)); + console.log(blobUrl); +})(); diff --git a/sdk/typescript/packages/mix-fetch-node/jest.config.mjs b/sdk/typescript/packages/mix-fetch-node/jest.config.mjs new file mode 100644 index 0000000000..568dd98124 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/jest.config.mjs @@ -0,0 +1,16 @@ +import preset from 'ts-jest/presets/index.js'; + +/** @type {import('ts-jest').JestConfigWithTsJest} */ +export default { + ...preset.defaults, + verbose: true, + transform: { + '^.+\\.(ts|tsx)$': [ + 'ts-jest', + { + tsconfig: 'tsconfig.jest.json', + useESM: true, + }, + ], + }, +}; diff --git a/sdk/typescript/packages/mix-fetch-node/package.json b/sdk/typescript/packages/mix-fetch-node/package.json new file mode 100644 index 0000000000..013fb344fb --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/package.json @@ -0,0 +1,71 @@ +{ + "name": "@nymproject/mix-fetch-node", + "version": "1.2.0", + "description": "This package is a drop-in replacement for `fetch` in NodeJS to send HTTP requests over the Nym Mixnet.", + "license": "Apache-2.0", + "author": "Nym Technologies SA", + "files": [ + "dist/cjs/worker.js", + "dist/**/*" + ], + "main": "dist/cjs/index.js", + "scripts": { + "build": "scripts/build-prod.sh", + "build:dev": "scripts/build.sh", + "build:worker": "rollup -c rollup-worker.config.mjs", + "clean": "rimraf dist", + "docs:dev": "run-p docs:watch docs:serve ", + "docs:generate": "typedoc", + "docs:generate:prod": "typedoc --basePath ./docs/tsdoc/nymproject/sdk/", + "docs:prod:build": "scripts/build-prod-docs-collect.sh", + "docs:serve": "reload -b -d ./docs -p 3000", + "docs:watch": "nodemon --ext ts --watch './src/**/*' --watch './typedoc.json' --exec \"yarn docs:generate\"", + "lint": "eslint src", + "lint:fix": "eslint src --fix", + "start": "tsc -w", + "start:dev": "nodemon --watch src -e ts,json --exec 'yarn build:dev:esm'", + "test": "node --experimental-fetch --experimental-vm-modules node_modules/jest/bin/jest.js -c=jest.config.mjs --no-cache", + "tsc": "tsc --noEmit true" + }, + "dependencies": { + "@nymproject/mix-fetch-wasm-node": ">=1.2.0-rc.10 || ^1", + "comlink": "^4.3.1", + "fake-indexeddb": "^5.0.0", + "node-fetch": "^3.3.2", + "ws": "^8.14.2" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^24.0.1", + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-replace": "^5.0.2", + "@rollup/plugin-typescript": "^10.0.1", + "@rollup/plugin-wasm": "^6.1.1", + "@types/jest": "^27.0.1", + "@types/node": "^16.7.13", + "@typescript-eslint/eslint-plugin": "^5.13.0", + "@typescript-eslint/parser": "^5.13.0", + "eslint": "^8.10.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-airbnb-typescript": "^16.1.0", + "eslint-config-prettier": "^8.5.0", + "eslint-import-resolver-root-import": "^1.0.4", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-jest": "^26.1.1", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-prettier": "^4.0.0", + "jest": "^29.5.0", + "nodemon": "^2.0.21", + "reload": "^3.2.1", + "rimraf": "^3.0.2", + "rollup": "^3.9.1", + "rollup-plugin-base64": "^1.0.1", + "rollup-plugin-modify": "^3.0.0", + "rollup-plugin-web-worker-loader": "^1.6.1", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.2", + "typedoc": "^0.24.8", + "typescript": "^4.8.4" + }, + "private": false, + "types": "./dist/cjs/index.d.ts" +} diff --git a/sdk/typescript/packages/mix-fetch-node/rollup-cjs.config.mjs b/sdk/typescript/packages/mix-fetch-node/rollup-cjs.config.mjs new file mode 100644 index 0000000000..7a4af49fc2 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/rollup-cjs.config.mjs @@ -0,0 +1,31 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import replace from '@rollup/plugin-replace'; +import resolve from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; +import webWorkerLoader from 'rollup-plugin-web-worker-loader'; +import { wasm } from '@rollup/plugin-wasm'; + +export default { + input: 'src/index.ts', + output: { + dir: 'dist/cjs', + format: 'cjs', + }, + plugins: [ + webWorkerLoader({ targetPlatform: 'node', inline: false }), + replace({ + values: { + "createURLWorkerFactory('web-worker-0.js')": + "createURLWorkerFactory(require('path').resolve(__dirname, 'web-worker-0.js'))", + }, + delimiters: ['', ''], + preventAssignment: true, + }), + resolve({ browser: false, extensions: ['.js', '.ts'] }), + wasm({ targetEnv: 'node', maxFileSize: 0 }), + typescript({ + compilerOptions: { outDir: 'dist/cjs', target: 'es5' }, + exclude: ['src/worker.ts'], + }), + ], +}; diff --git a/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs new file mode 100644 index 0000000000..8df9ba5cb3 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs @@ -0,0 +1,40 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import commonjs from '@rollup/plugin-commonjs'; +import modify from 'rollup-plugin-modify'; +import resolve from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; +import { wasm } from '@rollup/plugin-wasm'; + +export default { + input: 'src/worker/index.ts', + output: { + dir: 'dist/cjs', + format: 'cjs', + }, + external: ['util', 'fake-indexeddb'], + plugins: [ + resolve({ + browser: false, + preferBuiltins: true, + extensions: ['.js', '.ts'], + }), + commonjs(), + // TODO: One of the wasm functions calls `new WebSocket` at one point, which we aren't able to polyfill correctly yet. + modify({ + find: 'const ret = new WebSocket(getStringFromWasm0(arg0, arg1));', + replace: 'const ws = require("ws"); const ret = new ws.WebSocket(getStringFromWasm0(arg0, arg1));', + }), + // TODO: `getObject(...).require` seems to generate a warning on Webpack but with Rollup we get a panic since it can't require. + // By hard coding the require here, we can workaround that. + // Reference: https://github.com/rust-random/getrandom/issues/224 + modify({ find: 'getObject(arg0).require(getStringFromWasm0(arg1, arg2));', replace: 'require("crypto");' }), + wasm({ targetEnv: 'node', maxFileSize: 0, fileName: '[name].wasm' }), + typescript({ + compilerOptions: { + outDir: 'dist/cjs', + declaration: false, + target: 'es5', + }, + }), + ], +}; diff --git a/sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh new file mode 100755 index 0000000000..f672185300 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +rm -rf ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch || true + +# run the build +yarn docs:generate:prod + +# move the output outside of the yarn/npm workspaces +mkdir -p ../../../../dist/ts/docs/tsdoc/nymproject +mv docs ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch + +echo "Output can be found in:" +realpath ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch diff --git a/sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh new file mode 100755 index 0000000000..b56d1e0472 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +rm -rf dist || true +rm -rf ../../../../dist/ts/sdk/mix-fetch || true + +# run the build +scripts/build.sh +node scripts/buildPackageJson.mjs + +# move the output outside of the yarn/npm workspaces +mkdir -p ../../../../dist/ts/sdk +mv dist ../../../../dist/ts/sdk +mv ../../../../dist/ts/sdk/dist ../../../../dist/ts/sdk/mix-fetch + +echo "Output can be found in:" +realpath ../../../../dist/ts/sdk/mix-fetch diff --git a/sdk/typescript/packages/mix-fetch-node/scripts/build.sh b/sdk/typescript/packages/mix-fetch-node/scripts/build.sh new file mode 100755 index 0000000000..45196c1a2a --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/scripts/build.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +rm -rf dist || true + +#------------------------------------------------------- +# WEB WORKER (mix-fetch WASM) +#------------------------------------------------------- +# The web worker needs to be bundled because the WASM bundle needs to be loaded synchronously and all dependencies +# must be included in the worker script (because it is not loaded as an ES Module) + +# build the worker +rollup -c rollup-worker.config.mjs + +# move it next to the Typescript `src/index.ts` so it can be inlined by rollup +rm -f src/worker/*.js +rm -f src/worker/*.wasm +mv dist/cjs/index.js src/worker/worker.js + +# move WASM files out of build area +mkdir -p dist/worker +mv dist/cjs/*.wasm dist/worker + +#------------------------------------------------------- +# COMMON JS +#------------------------------------------------------- +# Some old build systems cannot fully handle ESM or ES2021, so build +# a CommonJS bundle targeting ES5 + +# build the SDK as a CommonJS bundle +rollup -c rollup-cjs.config.mjs + +# move WASM files into place +cp dist/worker/*.wasm dist/cjs + +#------------------------------------------------------- +# CLEAN UP +#------------------------------------------------------- + +rm -rf dist/cjs/worker + +# copy README +cp README.md dist/cjs/README.md + + diff --git a/sdk/typescript/packages/mix-fetch-node/scripts/buildPackageJson.mjs b/sdk/typescript/packages/mix-fetch-node/scripts/buildPackageJson.mjs new file mode 100644 index 0000000000..592b17e1e0 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/scripts/buildPackageJson.mjs @@ -0,0 +1,22 @@ +import * as fs from 'fs'; + +// parse the package.json from the SDK, so we can keep fields like the name and version +const json = JSON.parse(fs.readFileSync('package.json').toString()); + +// defaults (NB: these are in the output file locations) +const browser = 'index.js'; +const main = 'index.js'; +const types = 'index.d.ts'; + +const getPackageJson = (type, suffix) => ({ + name: `${json.name}${suffix ? `-${suffix}` : ''}`, + version: json.version, + license: json.license, + author: json.author, + type, + browser, + main, + types, +}); + +fs.writeFileSync('dist/cjs/package.json', JSON.stringify(getPackageJson('commonjs', 'commonjs'), null, 2)); diff --git a/sdk/typescript/packages/mix-fetch-node/scripts/publish.sh b/sdk/typescript/packages/mix-fetch-node/scripts/publish.sh new file mode 100755 index 0000000000..a5cb97f78f --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/scripts/publish.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +rm -rf dist || true +rm -rf ../../../../dist || true + +yarn +yarn build +cd ../../../../dist/sdk + +cd cjs +echo "Publishing CommonJS package to NPM.." +npm publish --access=public +cd .. diff --git a/sdk/typescript/packages/mix-fetch-node/src/create-mix-fetch.ts b/sdk/typescript/packages/mix-fetch-node/src/create-mix-fetch.ts new file mode 100644 index 0000000000..08e8811cf7 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/create-mix-fetch.ts @@ -0,0 +1,77 @@ +/* eslint-disable-next-line no-console */ + +import * as Comlink from 'comlink'; +import InlineWasmWebWorker from 'web-worker:./worker/worker'; +import { Worker } from 'node:worker_threads'; + +import nodeEndpoint from './node-adapter'; +import type { IMixFetchWebWorker } from './types'; +import { EventKinds, IMixFetch } from './types'; + +const createWorker = async () => + new Promise((resolve, reject) => { + // rollup will inline the built worker script, so that when the SDK is used in + // other projects, they will not need to mess around trying to bundle it + // however, it will make this SDK bundle bigger because of Base64 inline data + const worker = new InlineWasmWebWorker(); + + worker.addListener('error', reject); + worker.addListener('message', (msg: any) => { + worker.removeListener('error', reject); + if (msg.kind === EventKinds.Loaded) { + resolve(worker); + } else { + reject(msg); + } + }); + }); + +const convertHeaders = (headers: any): Headers => { + const out = new Headers(); + Object.keys(headers).forEach((key) => { + out.append(key, headers[key]); + }); + return out; +}; + +/** + * Use this method to initialise `mixFetch`. + * + * @returns An instance of `mixFetch` that you can use to make your requests using the same interface as `fetch`. + */ +export const createMixFetch = async (): Promise => { + // start the worker + const worker = await createWorker(); + + // bind with Comlink + const wrappedWorker = Comlink.wrap(nodeEndpoint(worker)); + + // handle the responses + const mixFetchWebWorker: IMixFetch = { + setupMixFetch: wrappedWorker.setupMixFetch, + mixFetch: async (url: string, args: any) => { + const workerResponse = await wrappedWorker.mixFetch(url, args); + if (!workerResponse) { + throw new Error('No response received'); + } + const { headers: headersRaw, status, statusText } = workerResponse; + + // reconstruct the Headers object instance from a plain object + const headers = convertHeaders(headersRaw); + + // handle blobs + if (workerResponse.body.blobUrl) { + const blob = await (await fetch(workerResponse.body.blobUrl)).blob(); + const body = await blob.arrayBuffer(); + return new Response(body, { headers, status, statusText }); + } + + // handle everything else + const body = Object.values(workerResponse.body)[0]; // we are expecting only one value to be set in `.body` + return new Response(body, { headers, status, statusText }); + }, + disconnectMixFetch: wrappedWorker.disconnectMixFetch, + }; + + return mixFetchWebWorker; +}; diff --git a/sdk/typescript/packages/mix-fetch-node/src/index.ts b/sdk/typescript/packages/mix-fetch-node/src/index.ts new file mode 100644 index 0000000000..e4bc233499 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/index.ts @@ -0,0 +1,57 @@ +/* eslint-disable no-underscore-dangle */ + +import type { SetupMixFetchOps, IMixFetchFn } from './types'; +import { createMixFetch as createMixFetchInternal } from './create-mix-fetch'; + +// this is the default timeout for getting a response +const REQUEST_TIMEOUT_MILLISECONDS = 60_000; + +export * from './types'; + +/** + * Create a global mixFetch instance and optionally configure settings. + * + * @param opts Optional settings + */ +export const createMixFetch = async (opts?: SetupMixFetchOps) => { + if (!(globalThis as any).__mixFetchGlobal) { + // load the worker and set up mixFetch with defaults + (globalThis as any).__mixFetchGlobal = await createMixFetchInternal(); + await (globalThis as any).__mixFetchGlobal.setupMixFetch(opts); + } + + return (globalThis as any).__mixFetchGlobal; +}; + +/** + * mixFetch is a drop-in replacement for the standard `fetch` interface. + * + * @param url The URL to fetch from. + * @param args Fetch options. + * @param opts Optionally configure mixFetch when it gets created. This only happens once, the first time it gets used. + */ +export const mixFetch: IMixFetchFn = async (url, args, opts?: SetupMixFetchOps) => { + // ensure mixFetch instance exists + const instance = await createMixFetch({ + mixFetchOverride: { + requestTimeoutMs: REQUEST_TIMEOUT_MILLISECONDS, + }, + ...opts, + }); + + // execute user request + return instance.mixFetch(url, args); +}; + +/** + * Stops the usage of mixFetch and disconnect the client from the mixnet. + */ +export const disconnectMixFetch = async (): Promise => { + // JS: I'm ignoring this lint (no-else-return) because I want to explicitly state + // that `__mixFetchGlobal` is definitely not null in the else branch. + if (!(globalThis as any).__mixFetchGlobal) { + throw new Error("mixFetch hasn't been setup"); + } else { + return (globalThis as any).__mixFetchGlobal.disconnectMixFetch(); + } +}; diff --git a/sdk/typescript/packages/mix-fetch-node/src/node-adapter.ts b/sdk/typescript/packages/mix-fetch-node/src/node-adapter.ts new file mode 100644 index 0000000000..aacc0dc6a8 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/node-adapter.ts @@ -0,0 +1,43 @@ +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// Borrowed from https://github.com/GoogleChromeLabs/comlink/blob/main/src/node-adapter.ts + +import { Endpoint } from 'comlink'; + +export interface NodeEndpoint { + postMessage(message: any, transfer?: any[]): void; + on(type: string, listener: EventListenerOrEventListenerObject, options?: {}): void; + off(type: string, listener: EventListenerOrEventListenerObject, options?: {}): void; + start?: () => void; +} + +export default function nodeEndpoint(nep: NodeEndpoint): Endpoint { + const listeners = new WeakMap(); + return { + postMessage: nep.postMessage.bind(nep), + addEventListener: (_, eh) => { + const l = (data: any) => { + if ('handleEvent' in eh) { + eh.handleEvent({ data } as MessageEvent); + } else { + eh({ data } as MessageEvent); + } + }; + nep.on('message', l); + listeners.set(eh, l); + }, + removeEventListener: (_, eh) => { + const l = listeners.get(eh); + if (!l) { + return; + } + nep.off('message', l); + listeners.delete(eh); + }, + start: nep.start && nep.start.bind(nep), + }; +} diff --git a/sdk/typescript/packages/mix-fetch-node/src/types.ts b/sdk/typescript/packages/mix-fetch-node/src/types.ts new file mode 100644 index 0000000000..be22b2b80c --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/types.ts @@ -0,0 +1,98 @@ +import type { MixFetchOpts } from '@nymproject/mix-fetch-wasm-node'; + +type IMixFetchWorkerFn = (url: string, args: any) => Promise; + +// export type IMixFetchFn = typeof fetch; +export type IMixFetchFn = (url: string, args: any, opts?: SetupMixFetchOps) => Promise; + +export type SetupMixFetchOps = MixFetchOpts & { + responseBodyConfigMap?: ResponseBodyConfigMap; +}; + +export interface IMixFetchWebWorker { + mixFetch: IMixFetchWorkerFn; + setupMixFetch: (opts?: SetupMixFetchOps) => Promise; + disconnectMixFetch: () => Promise; +} + +export interface IMixFetch { + mixFetch: IMixFetchFn; + setupMixFetch: (opts?: SetupMixFetchOps) => Promise; + disconnectMixFetch: () => Promise; +} + +export enum EventKinds { + Loaded = 'Loaded', +} + +export interface LoadedEvent { + kind: EventKinds.Loaded; + args: { + loaded: true; + }; +} + +export interface ResponseBody { + uint8array?: Uint8Array; + json?: any; + text?: string; + formData?: any; + blobUrl?: string; +} + +export type ResponseBodyMethod = 'uint8array' | 'json' | 'text' | 'formData' | 'blob'; + +export interface ResponseBodyConfigMap { + /** + * Set the response `Content-Type`s to decode as uint8array. + */ + uint8array?: Array; + + /** + * Set the response `Content-Type`s to decode with the `json()` response body method. + */ + json?: Array; + + /** + * Set the response `Content-Type`s to decode with the `text()` response body method. + */ + text?: Array; + + /** + * Set the response `Content-Type`s to decode with the `formData()` response body method. + */ + formData?: Array; + + /** + * Set the response `Content-Type`s to decode with the `blob()` response body method. + */ + blob?: Array; + /** + * Set this to the default fallback method. Set to `undefined` if you want to ignore unknown types. + */ + + fallback?: ResponseBodyMethod; +} + +/** + * Default values for the handling of response bodies. + */ +export const ResponseBodyConfigMapDefaults: ResponseBodyConfigMap = { + uint8array: ['application/octet-stream'], + json: ['application/json', 'text/json', /application\/json.*/, /text\/json\+.*/], + text: ['text/plain', /text\/plain.*/, 'text/html', /text\/html.*/], + formData: ['application/x-www-form-urlencoded', 'multipart/form-data'], + blob: [/image\/.*/, /video\/.*/], + fallback: 'blob', +}; + +export interface MixFetchWebWorkerResponse { + body: ResponseBody; + url: string; + headers: any; + status: number; + statusText: string; + type: string; + ok: boolean; + redirected: boolean; +} diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.test.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.test.ts new file mode 100644 index 0000000000..747c073b3b --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.test.ts @@ -0,0 +1,73 @@ +import { handleResponseMimeTypes } from './handle-response-mime-types'; + +describe('handleResponseMimeTypes', () => { + test('gracefully handles empty values', async () => { + const resp = await handleResponseMimeTypes(new Response()); + expect(Object.values(resp)).toHaveLength(0); + }); + + test('handles text', async () => { + const TEXT = 'This is text'; + const resp = await handleResponseMimeTypes( + new Response(TEXT, { headers: new Headers([['Content-Type', 'text/plain']]) }), + ); + expect(resp.text).toBe(TEXT); + }); + test('handles text (charset=utf-8)', async () => { + const TEXT = 'This is text'; + const resp = await handleResponseMimeTypes( + new Response(TEXT, { headers: new Headers([['Content-Type', 'text/plain; charset=utf-8']]) }), + ); + expect(resp.text).toBe(TEXT); + }); + test('handles html', async () => { + const TEXT = 'This is html'; + const resp = await handleResponseMimeTypes( + new Response(TEXT, { headers: new Headers([['Content-Type', 'text/html']]) }), + ); + expect(resp.text).toBe(TEXT); + }); + test('handles html (charset=utf-8)', async () => { + const TEXT = 'This is html'; + const resp = await handleResponseMimeTypes( + new Response(TEXT, { headers: new Headers([['Content-Type', 'text/html; charset=utf-8']]) }), + ); + expect(resp.text).toBe(TEXT); + }); + test('handles images', async () => { + const DATA = Buffer.from(new Uint8Array([0, 1, 2, 3])); + const resp = await handleResponseMimeTypes( + new Response(DATA, { headers: new Headers([['Content-Type', 'image/jpeg']]) }), + ); + expect(resp.blobUrl).toBeDefined(); + }); + test('handles videos', async () => { + const DATA = Buffer.from(new Uint8Array([0, 1, 2, 3])); + const resp = await handleResponseMimeTypes( + new Response(DATA, { headers: new Headers([['Content-Type', 'video/mpeg4']]) }), + ); + expect(resp.blobUrl).toBeDefined(); + }); + test('handles form data when URL encoded', async () => { + const formData = 'foo=bar&baz=42'; + const resp = await handleResponseMimeTypes( + new Response(formData, { headers: new Headers([['Content-Type', 'application/x-www-form-urlencoded']]) }), + ); + expect(resp.formData.foo).toBe('bar'); + expect(resp.formData.baz).toBe('42'); + }); + test('handles JSON data', async () => { + const json = '{ "foo": "bar", "baz": 42 }'; + const resp = await handleResponseMimeTypes( + new Response(json, { headers: new Headers([['Content-Type', 'application/json']]) }), + ); + expect(resp.text).toBe(json); + }); + test('handles JSON data (charset=utf-8)', async () => { + const json = '{ "foo": "bar", "baz": 42 }'; + const resp = await handleResponseMimeTypes( + new Response(json, { headers: new Headers([['Content-Type', 'application/json; charset=utf-8']]) }), + ); + expect(resp.text).toBe(json); + }); +}); diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.ts new file mode 100644 index 0000000000..abcaa845f7 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/handle-response-mime-types.ts @@ -0,0 +1,111 @@ +import type { ResponseBody, ResponseBodyConfigMap, ResponseBodyMethod } from '../types'; +import { ResponseBodyConfigMapDefaults } from '../types'; + +const getContentType = (response?: Response) => { + if (!response) { + return undefined; + } + + // this is what should be returned in the headers + if (response.headers.has('Content-Type')) { + return response.headers.get('Content-Type') as string; + } + + // handle weird servers that use lowercase headers + if (response.headers.has('content-type')) { + return response.headers.get('content-type') as string; + } + + // the Content-Type/content-type header is not part of the response + return undefined; +}; + +const doHandleResponseMethod = async (response: Response, method?: ResponseBodyMethod): Promise => { + switch (method) { + case 'uint8array': + return { + uint8array: new Uint8Array(await response.arrayBuffer()), + }; + case 'json': + case 'text': + return { text: await response.text() }; + case 'blob': { + const blob = await response.blob(); + const blobUrl = URL.createObjectURL(blob); + return { blobUrl }; + } + case 'formData': { + const formData: any = {}; + const data = await response.formData(); + // eslint-disable-next-line no-restricted-syntax + for (const pair of data.entries()) { + const [key, value] = pair; + formData[key] = value; + } + return { formData }; + } + default: + return {}; + } +}; + +const testIfIncluded = (value?: string, tests?: Array): boolean => { + if (!tests) { + return false; + } + if (!value) { + return false; + } + + for (let i = 0; i < tests.length; i += 1) { + const test = tests[i]; + if (typeof test === 'string' && value === test) { + return true; + } + if ((test as RegExp).test && (test as RegExp).test(value)) { + return true; + } + } + + // default return is false, because nothing above matched + return false; +}; + +export const handleResponseMimeTypes = async ( + response: Response, + config?: ResponseBodyConfigMap, +): Promise => { + // combine the user supplied config with the default + const finalConfig: ResponseBodyConfigMap = { ...ResponseBodyConfigMapDefaults, ...config }; + + const contentType = getContentType(response); + + // check if the headers say what the content type are, otherwise return the bytes of the response as a blob + if (!contentType) { + // no content type, or body, so the response is only the status, e.g. GET + if (!response.body) { + return {}; + } + + // handle fallback method + return doHandleResponseMethod(response, config?.fallback || 'blob'); + } + + if (testIfIncluded(contentType, finalConfig.uint8array)) { + return doHandleResponseMethod(response, 'uint8array'); + } + if (testIfIncluded(contentType, finalConfig.json)) { + return doHandleResponseMethod(response, 'json'); + } + if (testIfIncluded(contentType, finalConfig.text)) { + return doHandleResponseMethod(response, 'text'); + } + if (testIfIncluded(contentType, finalConfig.formData)) { + return doHandleResponseMethod(response, 'formData'); + } + if (testIfIncluded(contentType, finalConfig.blob)) { + return doHandleResponseMethod(response, 'blob'); + } + + return {}; +}; diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/index.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/index.ts new file mode 100644 index 0000000000..81582206e3 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/index.ts @@ -0,0 +1,8 @@ +import './polyfill'; +import { loadWasm } from './wasm-loading'; +import { run } from './main'; + +(async function main() { + await loadWasm(); + await run(); +})().catch((e: any) => console.error('Unhandled exception in mixFetch worker', e)); diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts new file mode 100644 index 0000000000..e30e6c7cf8 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts @@ -0,0 +1,74 @@ +/* eslint-disable no-console */ + +import * as Comlink from 'comlink'; +import { parentPort } from 'node:worker_threads'; +import { setupMixFetch, disconnectMixFetch } from '@nymproject/mix-fetch-wasm-node'; + +import type { IMixFetchWebWorker, LoadedEvent } from '../types'; +import nodeEndpoint from '../node-adapter'; +import { EventKinds, ResponseBodyConfigMap, ResponseBodyConfigMapDefaults } from '../types'; +import { handleResponseMimeTypes } from './handle-response-mime-types'; + +/** + * Helper method to send typed messages. + * @param event The strongly typed message to send back to the calling thread. + */ +const postMessageWithType = (event: E) => parentPort?.postMessage(event); + +export async function run() { + const { mixFetch } = globalThis as any; + let responseBodyConfigMap: ResponseBodyConfigMap = ResponseBodyConfigMapDefaults; + + const mixFetchWebWorker: IMixFetchWebWorker = { + mixFetch: async (url, args) => { + console.log('[Worker] --- mixFetch ---', { url, args }); + + const response: Response = await mixFetch(url, args); + console.log('[Worker]', { response, json: JSON.stringify(response, null, 2) }); + + const bodyResponse = await handleResponseMimeTypes(response, responseBodyConfigMap); + console.log('[Worker]', { bodyResponse }); + + const headers: any = {}; + response.headers.forEach((value, key) => { + headers[key] = value; + }); + + const output = { + body: bodyResponse, + url: response.url, + headers, + status: response.status, + statusText: response.statusText, + type: response.type, + ok: response.ok, + redirected: response.redirected, + }; + + console.log('[Worker]', { output }); + + return output; + }, + setupMixFetch: async (opts) => { + console.log('[Worker] --- setupMixFetch ---', { opts }); + if (opts?.responseBodyConfigMap) { + responseBodyConfigMap = opts.responseBodyConfigMap; + } + await setupMixFetch(opts || {}); + }, + disconnectMixFetch: async () => { + console.log('[Worker] --- disconnectMixFetch ---'); + + await disconnectMixFetch(); + }, + }; + + // start comlink listening for messages and handle them above + if (parentPort) { + Comlink.expose(mixFetchWebWorker, nodeEndpoint(parentPort)); + } + + // notify any listeners that the web worker has loaded - HOWEVER, mixFetch hasn't been setup and the client started + // call `setupMixFetch` from the main thread to start the Nym client + postMessageWithType({ kind: EventKinds.Loaded, args: { loaded: true } }); +} diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts new file mode 100644 index 0000000000..76c9dd6e2f --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts @@ -0,0 +1,38 @@ +import * as crypto from 'node:crypto'; +import * as fs from 'node:fs'; +import WebSocket from 'ws'; +import fetch, { Headers, Request, Response } from 'node-fetch'; +import { TextDecoder, TextEncoder } from 'node:util'; +import { Worker } from 'node:worker_threads'; +import { indexedDB } from 'fake-indexeddb'; + +(globalThis as any).performance = { + now() { + const [sec, nsec] = process.hrtime(); + return sec * 1000 + nsec / 1000000; + }, +}; + +(globalThis as any).TextDecoder = TextDecoder; +(globalThis as any).fetch = fetch; +(globalThis as any).Headers = Headers; +(globalThis as any).Request = Request; +(globalThis as any).Response = Response; +(globalThis as any).Headers = Headers; +(globalThis as any).fs = fs; +(globalThis as any).crypto = crypto; +(globalThis as any).WebSocket = WebSocket; +(globalThis as any).Worker = Worker; + +globalThis.process = process; +globalThis.TextEncoder = TextEncoder; +globalThis.Reflect = Reflect; +globalThis.Proxy = Proxy; +globalThis.Error = Error; +globalThis.Promise = Promise; +globalThis.Object = Object; +globalThis.indexedDB = indexedDB; + +// has to be loaded after all the polyfill action +// eslint-disable-next-line import/extensions, import/no-extraneous-dependencies +import('@nymproject/mix-fetch-wasm-node/wasm_exec'); diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/wasm-loading.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/wasm-loading.ts new file mode 100644 index 0000000000..0eb698e0ec --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/wasm-loading.ts @@ -0,0 +1,69 @@ +/* eslint-disable no-console */ +/// + +// Copyright 2020-2023 Nym Technologies SA +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import '@nymproject/mix-fetch-wasm-node/mix_fetch_wasm_bg.wasm'; + +// @ts-ignore +import getGoConnectionWasmBytes from '@nymproject/mix-fetch-wasm-node/go_conn.wasm'; + +import { + send_client_data, + start_new_mixnet_connection, + mix_fetch_initialised, + finish_mixnet_connection, + set_panic_hook, +} from '@nymproject/mix-fetch-wasm-node'; + +export async function loadGoWasm() { + // rollup will provide a function to get the Go connection WASM bytes here + const bytes = await getGoConnectionWasmBytes(); + + const go = new Go(); // Defined in wasm_exec.js + + // the WebAssembly runtime will parse the bytes and then start the Go runtime + const wasmObj = await WebAssembly.instantiate(bytes, go.importObject); + // eslint-disable-next-line no-console + console.log('Loaded GO WASM'); + + go.run(wasmObj); +} + +function setupRsGoBridge() { + const rsGoBridge = { + send_client_data, + start_new_mixnet_connection, + mix_fetch_initialised, + finish_mixnet_connection, + }; + + // and to discourage users from trying to call those methods directly) + // @ts-expect-error globalThis has index signature of any + // eslint-disable-next-line no-underscore-dangle + globalThis.__rs_go_bridge__ = rsGoBridge; +} + +export async function loadWasm() { + // load go WASM package + await loadGoWasm(); + + console.log('Loaded GO WASM'); + + // sets up better stack traces in case of in-rust panics + set_panic_hook(); + + setupRsGoBridge(); +} diff --git a/sdk/typescript/packages/mix-fetch-node/tsconfig.jest.json b/sdk/typescript/packages/mix-fetch-node/tsconfig.jest.json new file mode 100644 index 0000000000..90ad46a57b --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/tsconfig.jest.json @@ -0,0 +1,35 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "lib": ["es2021", "dom", "dom.iterable", "esnext", "webworker"], + "module": "esnext", + "target": "esnext", + "strict": true, + "moduleResolution": "node", + "skipLibCheck": true, + "skipDefaultLibCheck": true, + "declaration": true, + "baseUrl": ".", + "esModuleInterop": true, + "allowJs": true, + "downlevelIteration": true + }, + "include": ["src/**/*.ts"], + "exclude": [ + "jest.*", + "webpack.config.js", + "webpack.prod.js", + "webpack.common.js", + "node_modules", + "**/node_modules", + "dist", + "**/dist", + "scripts", + "jest", + "__tests__", + "**/__tests__", + "__jest__", + "**/__jest__", + "config/*" + ] +} diff --git a/sdk/typescript/packages/mix-fetch-node/tsconfig.json b/sdk/typescript/packages/mix-fetch-node/tsconfig.json new file mode 100644 index 0000000000..8598dd51d0 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/tsconfig.json @@ -0,0 +1,36 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "lib": ["es2021", "dom", "dom.iterable", "esnext", "webworker"], + "outDir": "./dist/", + "module": "esnext", + "target": "esnext", + "allowJs": false, + "strict": true, + "allowSyntheticDefaultImports": true, + "moduleResolution": "node", + "skipLibCheck": true, + "skipDefaultLibCheck": true, + "declaration": true, + "baseUrl": ".", + "downlevelIteration": true + }, + "include": ["src/**/*.ts", "src/*.ts", "typings"], + "exclude": [ + "jest.config.js", + "webpack.config.js", + "webpack.prod.js", + "webpack.common.js", + "node_modules", + "**/node_modules", + "dist", + "**/dist", + "scripts", + "jest", + "__tests__", + "**/__tests__", + "__jest__", + "**/__jest__", + "config/*" + ] +} diff --git a/sdk/typescript/packages/mix-fetch-node/typedoc.json b/sdk/typescript/packages/mix-fetch-node/typedoc.json new file mode 100644 index 0000000000..46a91d8237 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/typedoc.json @@ -0,0 +1,32 @@ +{ + "sort": ["kind"], + "entryPoints": ["./src/index.ts"], + "out": "./docs", + "exclude": ["./src/worker/**"], + "kindSortOrder": [ + "Function", + "Interface", + "TypeAlias", + "Reference", + "Project", + "Module", + "Namespace", + "Enum", + "EnumMember", + "Class", + "Constructor", + "Property", + "Variable", + "Accessor", + "Method", + "ObjectLiteral", + "Parameter", + "TypeParameter", + "TypeLiteral", + "CallSignature", + "ConstructorSignature", + "IndexSignature", + "GetSignature", + "SetSignature" + ] +} diff --git a/sdk/typescript/packages/mix-fetch-node/typings/rollup-worker.d.ts b/sdk/typescript/packages/mix-fetch-node/typings/rollup-worker.d.ts new file mode 100644 index 0000000000..d012fe9590 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/typings/rollup-worker.d.ts @@ -0,0 +1,6 @@ +declare module 'web-worker:*' { + import { Worker } from 'node:worker_threads'; + + const WorkerFactory: new () => Worker; + export default WorkerFactory; +} diff --git a/sdk/typescript/packages/mix-fetch-node/typings/wasm_exec.d.ts b/sdk/typescript/packages/mix-fetch-node/typings/wasm_exec.d.ts new file mode 100644 index 0000000000..82cee7251a --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/typings/wasm_exec.d.ts @@ -0,0 +1,11 @@ +declare module '@nymproject/mix-fetch-wasm-node/wasm_exec' { + export declare global { + class Go { + constructor(); + + importObject: any; + + run(goWasm: any); + } + } +} diff --git a/sdk/typescript/packages/mix-fetch-node/yarn.lock b/sdk/typescript/packages/mix-fetch-node/yarn.lock new file mode 100644 index 0000000000..e0bdcadf88 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/yarn.lock @@ -0,0 +1,4428 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + +"@babel/compat-data@^7.22.9": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" + integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== + +"@babel/core@^7.11.6", "@babel/core@^7.12.3": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" + integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.0" + "@babel/helpers" "^7.23.2" + "@babel/parser" "^7.23.0" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.23.0", "@babel/generator@^7.7.2": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== + dependencies: + "@babel/types" "^7.23.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" + integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== + dependencies: + "@babel/compat-data" "^7.22.9" + "@babel/helper-validator-option" "^7.22.15" + browserslist "^4.21.9" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== + dependencies: + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" + +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-module-imports@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== + dependencies: + "@babel/types" "^7.22.15" + +"@babel/helper-module-transforms@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz#3ec246457f6c842c0aee62a01f60739906f7047e" + integrity sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" + integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== + +"@babel/helpers@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" + integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== + dependencies: + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" + +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.8.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-import-meta@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" + integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz#aac8d383b062c5072c647a31ef990c1d0af90272" + integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/runtime@^7.20.7": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" + integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.22.15", "@babel/template@^7.3.3": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.3.3": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" + integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.51.0": + version "8.51.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.51.0.tgz#6d419c240cfb2b66da37df230f7e7eef801c32fa" + integrity sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg== + +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== + dependencies: + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" + +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" + "@types/node" "*" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" + +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== + dependencies: + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + slash "^3.0.0" + +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.2" + +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + dependencies: + "@jest/schemas" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@nymproject/mix-fetch-wasm-node@>=1.2.0-rc.10 || ^1": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@nymproject/mix-fetch-wasm-node/-/mix-fetch-wasm-node-1.2.0.tgz#76439db4eb5fd4b95dcf6b6883cb5a059aeb5ad2" + integrity sha512-vdEO4WfY1ql+DXIMR4nHvIlTB9tzhALiVjzbbf7UBgrQLxPSFTD2oGwGOVfgpNvXv0F92rDj3AHRommKKGa5pw== + +"@rollup/plugin-commonjs@^24.0.1": + version "24.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz#79e54bd83bb64396761431eee6c44152ef322100" + integrity sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + commondir "^1.0.1" + estree-walker "^2.0.2" + glob "^8.0.3" + is-reference "1.2.1" + magic-string "^0.27.0" + +"@rollup/plugin-node-resolve@^15.0.1": + version "15.2.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz#e5e0b059bd85ca57489492f295ce88c2d4b0daf9" + integrity sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + "@types/resolve" "1.20.2" + deepmerge "^4.2.2" + is-builtin-module "^3.2.1" + is-module "^1.0.0" + resolve "^1.22.1" + +"@rollup/plugin-replace@^5.0.2": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.4.tgz#fef548dc751d06747e8dca5b0e8e1fbf647ac7e1" + integrity sha512-E2hmRnlh09K8HGT0rOnnri9OTh+BILGr7NVJGB30S4E3cLRn3J0xjdiyOZ74adPs4NiAMgrjUMGAZNJDBgsdmQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + magic-string "^0.30.3" + +"@rollup/plugin-typescript@^10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-10.0.1.tgz#270b515b116ea28320e6bb62451c4767d49072d6" + integrity sha512-wBykxRLlX7EzL8BmUqMqk5zpx2onnmRMSw/l9M1sVfkJvdwfxogZQVNUM9gVMJbjRLDR5H6U0OMOrlDGmIV45A== + dependencies: + "@rollup/pluginutils" "^5.0.1" + resolve "^1.22.1" + +"@rollup/plugin-wasm@^6.1.1": + version "6.2.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-wasm/-/plugin-wasm-6.2.2.tgz#ea75fd8cc5ddba1e30bdc22e07cdbaf8d6d160bf" + integrity sha512-gpC4R1G9Ni92ZIRTexqbhX7U+9estZrbhP+9SRb0DW9xpB9g7j34r+J2hqrcW/lRI7dJaU84MxZM0Rt82tqYPQ== + dependencies: + "@rollup/pluginutils" "^5.0.2" + +"@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + +"@rollup/pluginutils@^5.0.1", "@rollup/pluginutils@^5.0.2": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.5.tgz#bbb4c175e19ebfeeb8c132c2eea0ecb89941a66c" + integrity sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@sinonjs/commons@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" + integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + +"@types/babel__core@^7.1.14": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.2.tgz#215db4f4a35d710256579784a548907237728756" + integrity sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.5" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.5.tgz#281f4764bcbbbc51fdded0f25aa587b4ce14da95" + integrity sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.2.tgz#843e9f1f47c957553b0c374481dc4772921d6a6b" + integrity sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.2.tgz#4ddf99d95cfdd946ff35d2b65c978d9c9bf2645d" + integrity sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw== + dependencies: + "@babel/types" "^7.20.7" + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.2.tgz#ff02bc3dc8317cd668dfec247b750ba1f1d62453" + integrity sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA== + +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + +"@types/graceful-fs@^4.1.3": + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.7.tgz#30443a2e64fd51113bc3e2ba0914d47109695e2a" + integrity sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw== + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" + integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== + +"@types/istanbul-lib-report@*": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#412e0725ef41cde73bfa03e0e833eaff41e0fd63" + integrity sha512-gPQuzaPR5h/djlAv2apEG1HVOyj1IUs7GpfMZixU0/0KXT3pm64ylHuMUI1/Akh+sq/iikxg6Z2j+fcMDXaaTQ== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.2.tgz#edc8e421991a3b4df875036d381fc0a5a982f549" + integrity sha512-kv43F9eb3Lhj+lr/Hn6OcLCs/sSM8bt+fIaP11rCYngfV6NVjzWXJ17owQtDQTL9tQ8WSLUrGsSJ6rJz0F1w1A== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@^27.0.1": + version "27.5.2" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" + integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== + dependencies: + jest-matcher-utils "^27.0.0" + pretty-format "^27.0.0" + +"@types/json-schema@^7.0.9": + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" + integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/node@*": + version "20.8.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.6.tgz#0dbd4ebcc82ad0128df05d0e6f57e05359ee47fa" + integrity sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ== + dependencies: + undici-types "~5.25.1" + +"@types/node@^16.7.13": + version "16.18.58" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.58.tgz#bf66f63983104ed57c754f4e84ccaf16f8235adb" + integrity sha512-YGncyA25/MaVtQkjWW9r0EFBukZ+JulsLcVZBlGUfIb96OBMjkoRWwQo5IEWJ8Fj06Go3GHw+bjYDitv6BaGsA== + +"@types/resolve@1.20.2": + version "1.20.2" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" + integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== + +"@types/semver@^7.3.12": + version "7.5.3" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" + integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== + +"@types/stack-utils@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== + +"@types/yargs-parser@*": + version "21.0.1" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.1.tgz#07773d7160494d56aa882d7531aac7319ea67c3b" + integrity sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ== + +"@types/yargs@^17.0.8": + version "17.0.28" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.28.tgz#d106e4301fbacde3d1796ab27374dd16588ec851" + integrity sha512-N3e3fkS86hNhtk6BEnc0rj3zcehaxx8QWhCROJkqpl5Zaoi7nAic3jH8q94jVD3zu5LGk+PUB6KAiDmimYOEQw== + dependencies: + "@types/yargs-parser" "*" + +"@typescript-eslint/eslint-plugin@^5.13.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.13.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== + dependencies: + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== + dependencies: + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== + +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.10.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + eslint-scope "^5.1.1" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== + dependencies: + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-sequence-parser@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +anymatch@^3.0.3, anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +aria-query@^5.1.3: + version "5.3.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" + integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== + dependencies: + dequal "^2.0.3" + +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + +array-includes@^3.1.6: + version "3.1.7" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" + integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-string "^1.0.7" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.findlastindex@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.2.1" + +array.prototype.flat@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + +ast-types-flow@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +axe-core@^4.6.2: + version "4.8.2" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.8.2.tgz#2f6f3cde40935825cf4465e3c1c9e77b240ff6ae" + integrity sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g== + +axobject-query@^3.1.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" + integrity sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg== + dependencies: + dequal "^2.0.3" + +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== + dependencies: + "@jest/transform" "^29.7.0" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^29.6.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.8.3" + "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browserslist@^4.21.9: + version "4.22.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" + integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ== + dependencies: + caniuse-lite "^1.0.30001541" + electron-to-chromium "^1.4.535" + node-releases "^2.0.13" + update-browserslist-db "^1.0.13" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +builtin-modules@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001541: + version "1.0.30001549" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz#7d1a3dce7ea78c06ed72c32c2743ea364b3615aa" + integrity sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +chokidar@^3.5.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cjs-module-lexer@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + +cli-color@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.3.tgz#73769ba969080629670f3f2ef69a4bf4e7cc1879" + integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.61" + es6-iterator "^2.0.3" + memoizee "^0.4.15" + timers-ext "^0.1.7" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +comlink@^4.3.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/comlink/-/comlink-4.4.1.tgz#e568b8e86410b809e8600eb2cf40c189371ef981" + integrity sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q== + +commander@~9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" + integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +confusing-browser-globals@^1.0.10: + version "1.0.11" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" + integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + +cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +damerau-levenshtein@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" + integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== + +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +dedent@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" + integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-data-property@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +dequal@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" + integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" + integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== + +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.4.535: + version "1.4.556" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.556.tgz#97385917eb6ea3ac6a3378cf87bb39ee1db96e76" + integrity sha512-6RPN0hHfzDU8D56E72YkDvnLw5Cj2NMXZGg3UkgyoHxjVhG99KZpsKgBWMmTy0Ei89xwan+rbRsVB9yzATmYzQ== + +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +enhanced-resolve@^5.0.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.22.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" + integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.2" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.1" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.12" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.11" + +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-airbnb-base@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236" + integrity sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig== + dependencies: + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.5" + semver "^6.3.0" + +eslint-config-airbnb-typescript@^16.1.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-16.2.0.tgz#9193fafd62f1cbf444895f4495eae334baf3265b" + integrity sha512-OUaMPZpTOZGKd5tXOjJ9PRU4iYNW/Z5DoHIynjsVK/FpkWdiY5+nxQW6TiJAlLwVI1l53xUOrnlZWtVBVQzuWA== + dependencies: + eslint-config-airbnb-base "^15.0.0" + +eslint-config-airbnb@^19.0.4: + version "19.0.4" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3" + integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew== + dependencies: + eslint-config-airbnb-base "^15.0.0" + object.assign "^4.1.2" + object.entries "^1.1.5" + +eslint-config-prettier@^8.5.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== + +eslint-import-resolver-node@^0.3.2, eslint-import-resolver-node@^0.3.7: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== + dependencies: + debug "^3.2.7" + is-core-module "^2.13.0" + resolve "^1.22.4" + +eslint-import-resolver-root-import@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-root-import/-/eslint-import-resolver-root-import-1.0.4.tgz#82991138d8014b5e2283b27622ad1ba21f535609" + integrity sha512-c8cUQcELRBe0mnblBZJKEfL+jIUGR8pctK5gdru5N7bBOIve2WZ0R3KoO5GOksXJ4WzZhtcBS2xPaTJYEe4IdQ== + dependencies: + eslint-import-resolver-node "^0.3.2" + json5 "^2.1.0" + +eslint-module-utils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== + dependencies: + debug "^3.2.7" + +eslint-plugin-import@^2.25.4: + version "2.28.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" + integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== + dependencies: + array-includes "^3.1.6" + array.prototype.findlastindex "^1.2.2" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.8.0" + has "^1.0.3" + is-core-module "^2.13.0" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.fromentries "^2.0.6" + object.groupby "^1.0.0" + object.values "^1.1.6" + semver "^6.3.1" + tsconfig-paths "^3.14.2" + +eslint-plugin-jest@^26.1.1: + version "26.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz#7931c31000b1c19e57dbfb71bbf71b817d1bf949" + integrity sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng== + dependencies: + "@typescript-eslint/utils" "^5.10.0" + +eslint-plugin-jsx-a11y@^6.5.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz#fca5e02d115f48c9a597a6894d5bcec2f7a76976" + integrity sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA== + dependencies: + "@babel/runtime" "^7.20.7" + aria-query "^5.1.3" + array-includes "^3.1.6" + array.prototype.flatmap "^1.3.1" + ast-types-flow "^0.0.7" + axe-core "^4.6.2" + axobject-query "^3.1.1" + damerau-levenshtein "^1.0.8" + emoji-regex "^9.2.2" + has "^1.0.3" + jsx-ast-utils "^3.3.3" + language-tags "=1.0.5" + minimatch "^3.1.2" + object.entries "^1.1.6" + object.fromentries "^2.0.6" + semver "^6.3.0" + +eslint-plugin-prettier@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.10.0: + version "8.51.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.51.0.tgz#4a82dae60d209ac89a5cff1604fea978ba4950f3" + integrity sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.51.0" + "@humanwhocodes/config-array" "^0.11.11" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + +estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== + dependencies: + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + +fake-indexeddb@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-5.0.0.tgz#c9f394d6d36db62760ad596ebec97ba3d700c95b" + integrity sha512-hGMsl73XgJAk5OtC8hFDSLUVzJ3Z1/C06YpFwI7DzCsEsmH5Mvkxplv3PK6uUL7XCYVBTzayp/4gD+cp7Qi8xQ== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + +fast-glob@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.1.tgz#a02a15fdec25a8f844ff7cc658f03dd99eb4609b" + integrity sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + +flatted@^3.2.9: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.2, fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^13.19.0: + version "13.23.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" + integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== + dependencies: + type-fest "^0.20.2" + +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.2.4, graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +ignore-by-default@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" + integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== + +ignore@^5.2.0: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-builtin-module@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== + dependencies: + builtin-modules "^3.3.0" + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== + +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + +is-reference@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + dependencies: + "@types/estree" "*" + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-instrument@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf" + integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.3: + version "3.1.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== + dependencies: + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^1.0.0" + is-generator-fn "^2.0.0" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== + dependencies: + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + create-jest "^29.7.0" + exit "^0.1.2" + import-local "^3.0.2" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" + integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== + dependencies: + chalk "^4.0.0" + diff-sequences "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== + dependencies: + detect-newline "^3.0.0" + +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +jest-get-type@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" + integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== + dependencies: + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-matcher-utils@^27.0.0: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" + integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== + dependencies: + chalk "^4.0.0" + jest-diff "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== + dependencies: + chalk "^4.0.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.6.3" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.7.0" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-pnp-resolver "^1.2.2" + jest-util "^29.7.0" + jest-validate "^29.7.0" + resolve "^1.20.0" + resolve.exports "^2.0.0" + slash "^3.0.0" + +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + dependencies: + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.13.1" + graceful-fs "^4.2.9" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^29.7.0" + graceful-fs "^4.2.9" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + natural-compare "^1.4.0" + pretty-format "^29.7.0" + semver "^7.5.3" + +jest-util@^29.0.0, jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== + dependencies: + "@jest/types" "^29.6.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^29.6.3" + leven "^3.1.0" + pretty-format "^29.7.0" + +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== + dependencies: + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.7.0" + string-length "^4.0.1" + +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== + dependencies: + "@types/node" "*" + jest-util "^29.7.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@^29.5.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== + dependencies: + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" + import-local "^3.0.2" + jest-cli "^29.7.0" + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + +json5@^2.1.0, json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + +jsx-ast-utils@^3.3.3: + version "3.3.5" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" + integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + object.assign "^4.1.4" + object.values "^1.1.6" + +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +language-subtag-registry@~0.3.2: + version "0.3.22" + resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d" + integrity sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w== + +language-tags@=1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a" + integrity sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ== + dependencies: + language-subtag-registry "~0.3.2" + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== + dependencies: + es5-ext "~0.10.2" + +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +magic-string@0.25.2: + version "0.25.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9" + integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg== + dependencies: + sourcemap-codec "^1.4.4" + +magic-string@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" + integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" + +magic-string@^0.30.3: + version "0.30.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9" + integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +marked@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== + +memoizee@^0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" + integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.53" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.0, micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.0: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.0, minimist@^1.2.6, minimist@~1.2.0: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +next-tick@1, next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" + integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== + +nodemon@^2.0.21: + version "2.0.22" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.22.tgz#182c45c3a78da486f673d6c1702e00728daf5258" + integrity sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ== + dependencies: + chokidar "^3.5.2" + debug "^3.2.7" + ignore-by-default "^1.0.1" + minimatch "^3.1.2" + pstree.remy "^1.1.8" + semver "^5.7.1" + simple-update-notifier "^1.0.7" + supports-color "^5.5.0" + touch "^3.1.0" + undefsafe "^2.0.5" + +nopt@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" + integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== + dependencies: + abbrev "1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.0.tgz#42695d3879e1cd5bda6df5062164d80c996e23e2" + integrity sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.2, object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.entries@^1.1.5, object.entries@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.7.tgz#2b47760e2a2e3a752f39dd874655c61a7f03c131" + integrity sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.fromentries@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" + integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.groupby@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + +object.values@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.0.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + +ospec@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ospec/-/ospec-3.1.0.tgz#d36b8e10110f58f63a463df2390a7a73fe9579a8" + integrity sha512-+nGtjV3vlADp+UGfL51miAh/hB4awPBkQrArhcgG4trAaoA2gKt5bf9w0m9ch9zOr555cHWaCHZEDiBOkNZSxw== + dependencies: + glob "^7.1.3" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +pretty-format@^27.0.0, pretty-format@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +pstree.remy@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" + integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== + +punycode@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +pure-rand@^6.0.0: + version "6.0.4" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" + integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +react-is@^17.0.1: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + set-function-name "^2.0.0" + +reload@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/reload/-/reload-3.2.1.tgz#42d43e33e327efe1348c723272c6835fe333349a" + integrity sha512-ZdM8ZSEeI72zkhh6heMEvJ0vHZoovZXcJI6Zae8CzS7o5vO/WjZsAMMr0y1+3I/fCN7y7ZxABoUwwCswcLHkjQ== + dependencies: + cli-color "~2.0.0" + commander "~9.4.0" + finalhandler "~1.2.0" + minimist "~1.2.0" + open "^8.0.0" + serve-static "~1.15.0" + supervisor "~0.12.0" + ws "~8.11.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== + +resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.4: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rollup-plugin-base64@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-base64/-/rollup-plugin-base64-1.0.1.tgz#b3529b94d23baeb66e1e3bffd04477fa792985eb" + integrity sha512-IbdX8fjuXO/Op3hYmRPjVo0VwcSenwsQDaDTFdoe+70B5ZGoLMtr96L2yhHXCfxv7HwZVvxZqLsuWj6VwzRt3g== + dependencies: + "@rollup/pluginutils" "^3.1.0" + +rollup-plugin-modify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-modify/-/rollup-plugin-modify-3.0.0.tgz#5326e11dfec247e8bbdd9507f3da1da1e5c7818b" + integrity sha512-p/ffs0Y2jz2dEnWjq1oVC7SY37tuS+aP7whoNaQz1EAAOPg+k3vKJo8cMMWx6xpdd0NzhX4y2YF9o/NPu5YR0Q== + dependencies: + magic-string "0.25.2" + ospec "3.1.0" + +rollup-plugin-web-worker-loader@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-web-worker-loader/-/rollup-plugin-web-worker-loader-1.6.1.tgz#9d7a27575b64b0780fe4e8b3bc87470d217e485f" + integrity sha512-4QywQSz1NXFHKdyiou16mH3ijpcfLtLGOrAqvAqu1Gx+P8+zj+3gwC2BSL/VW1d+LW4nIHC8F7d7OXhs9UdR2A== + +rollup@^3.9.1: + version "3.29.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" + integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== + optionalDependencies: + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + isarray "^2.0.5" + +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + +semver@^5.7.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.3.4, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +semver@~7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serve-static@~1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +set-function-name@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shiki@^0.14.1: + version "0.14.5" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.5.tgz#375dd214e57eccb04f0daf35a32aa615861deb93" + integrity sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw== + dependencies: + ansi-sequence-parser "^1.1.0" + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +simple-update-notifier@^1.0.7: + version "1.1.0" + resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz#67694c121de354af592b347cdba798463ed49c82" + integrity sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg== + dependencies: + semver "~7.0.0" + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + +sourcemap-codec@^1.4.4: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supervisor@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/supervisor/-/supervisor-0.12.0.tgz#de7e6337015b291851c10f3538c4a7f04917ecc1" + integrity sha512-iBYeU5Or4WiiIa3+ns1DpHIiHjNNXSuYUiixKcznewwo4ImBJ8EobktaAo2csOcauhrz4SvKRTou8Z2C3W28+A== + +supports-color@^5.3.0, supports-color@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +timers-ext@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +touch@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" + integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== + dependencies: + nopt "~1.0.10" + +ts-jest@^29.1.0: + version "29.1.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" + integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "^7.5.3" + yargs-parser "^21.0.1" + +ts-loader@^9.4.2: + version "9.5.0" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.0.tgz#f0a51dda37cc4d8e43e6cb14edebbc599b0c3aa2" + integrity sha512-LLlB/pkB4q9mW2yLdFMnK3dEHbrBjeZTYguaaIfusyojBgAGf5kF+O6KcWqiGzWqHk0LBsoolrp4VftEURhybg== + dependencies: + chalk "^4.1.0" + enhanced-resolve "^5.0.0" + micromatch "^4.0.0" + semver "^7.3.4" + source-map "^0.7.4" + +tsconfig-paths@^3.14.2: + version "3.14.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + +typedoc@^0.24.8: + version "0.24.8" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.8.tgz#cce9f47ba6a8d52389f5e583716a2b3b4335b63e" + integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w== + dependencies: + lunr "^2.3.9" + marked "^4.3.0" + minimatch "^9.0.0" + shiki "^0.14.1" + +typescript@^4.8.4: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +undefsafe@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" + integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== + +undici-types@~5.25.1: + version "5.25.3" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" + integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +v8-to-istanbul@^9.0.1: + version "9.1.3" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz#ea456604101cd18005ac2cae3cdd1aa058a6306b" + integrity sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +vscode-oniguruma@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" + integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== + +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +web-streams-polyfill@^3.0.3: + version "3.2.1" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" + integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-typed-array@^1.1.11: + version "1.1.11" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" + integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + +ws@^8.14.2: + version "8.14.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" + integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g== + +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^21.0.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/sdk/typescript/scripts/publish.sh b/sdk/typescript/scripts/publish.sh index fff437da72..03674df7b1 100755 --- a/sdk/typescript/scripts/publish.sh +++ b/sdk/typescript/scripts/publish.sh @@ -37,6 +37,7 @@ packages=( "ts/sdk/mix-fetch/esm-full-fat" "ts/sdk/nodejs-client/cjs" +"ts/sdk/mix-fetch-node/cjs" "ts/sdk/node-tester/cjs" "ts/sdk/node-tester/cjs-full-fat" diff --git a/sdk/typescript/scripts/unpublish.sh b/sdk/typescript/scripts/unpublish.sh index 8d0671faa9..52a02ed32b 100755 --- a/sdk/typescript/scripts/unpublish.sh +++ b/sdk/typescript/scripts/unpublish.sh @@ -24,6 +24,7 @@ packages2=( "ts/sdk/mix-fetch/esm-full-fat" "ts/sdk/nodejs-client/cjs" +"ts/sdk/mix-fetch-node/cjs" "ts/sdk/node-tester/cjs" "ts/sdk/node-tester/cjs-full-fat" diff --git a/wasm/mix-fetch/go-mix-conn/cmd/wasm/main.go b/wasm/mix-fetch/go-mix-conn/cmd/wasm/main.go index cdd2638cf1..19f7b94594 100644 --- a/wasm/mix-fetch/go-mix-conn/cmd/wasm/main.go +++ b/wasm/mix-fetch/go-mix-conn/cmd/wasm/main.go @@ -8,12 +8,74 @@ package main import ( "go-mix-conn/internal/bridge/go_bridge" "go-mix-conn/internal/state" + "syscall/js" ) var done chan struct{} func init() { println("[go init]: go module init") + + q := js.Global().Get("location") + if q.IsUndefined() { + println("location undefined") + } else { + println("location ok") + } + a := js.Global().Get("Error") + if a.IsUndefined() { + println("Error undefined") + } else { + println("Error ok") + } + b := js.Global().Get("Promise") + if b.IsUndefined() { + println("Promise undefined") + } else { + println("Promise ok") + } + c := js.Global().Get("Reflect") + if c.IsUndefined() { + println("Reflect undefined") + } else { + println("Reflect ok") + } + d := js.Global().Get("Object") + if d.IsUndefined() { + println("Object undefined") + } else { + println("Object ok") + } + e := js.Global().Get("Response") + if e.IsUndefined() { + println("Response undefined") + } else { + println("Response ok") + } + f := js.Global().Get("Request") + if f.IsUndefined() { + println("Request undefined") + } else { + println("Request ok") + } + g := js.Global().Get("Proxy") + if g.IsUndefined() { + println("Proxy undefined") + } else { + println("Proxy ok") + } + h := js.Global().Get("Headers") + if h.IsUndefined() { + println("Headers undefined") + } else { + println("Headers ok") + } + i := js.Global().Get("Uint8Array") + if i.IsUndefined() { + println("Uint8Array undefined") + } else { + println("Uint8Array ok") + } done = make(chan struct{}) state.InitialiseGlobalState() From 7129de4373d4b62e06a33dc877b7d605ac074033 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Mon, 23 Oct 2023 12:14:59 +0200 Subject: [PATCH 068/142] Add hack for working with old nym gateways Signed-off-by: Sebastian Martinez --- .../client-core/src/client/topology_control/nym_api_provider.rs | 2 +- common/client-core/src/init/helpers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/client-core/src/client/topology_control/nym_api_provider.rs b/common/client-core/src/client/topology_control/nym_api_provider.rs index 824294793b..5de16663de 100644 --- a/common/client-core/src/client/topology_control/nym_api_provider.rs +++ b/common/client-core/src/client/topology_control/nym_api_provider.rs @@ -69,7 +69,7 @@ impl NymApiTopologyProvider { Ok(mixes) => mixes, }; - let gateways = match self.validator_client.get_cached_described_gateways().await { + let gateways = match self.validator_client.get_cached_gateways().await { Err(err) => { error!("failed to get network gateways - {err}"); return None; diff --git a/common/client-core/src/init/helpers.rs b/common/client-core/src/init/helpers.rs index 4b50f0864b..b253ed44cf 100644 --- a/common/client-core/src/init/helpers.rs +++ b/common/client-core/src/init/helpers.rs @@ -67,7 +67,7 @@ pub async fn current_gateways( log::trace!("Fetching list of gateways from: {nym_api}"); - let gateways = client.get_cached_described_gateways().await?; + let gateways = client.get_cached_gateways().await?; let valid_gateways = gateways .into_iter() .filter_map(|gateway| gateway.try_into().ok()) From 06a96fa74acbf33545e152d903bac0dee251d19a Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Mon, 23 Oct 2023 12:15:25 +0200 Subject: [PATCH 069/142] Polishing nodejs-client and mix-fetch-node Signed-off-by: Sebastian Martinez --- .github/workflows/publish-sdk-npm.yml | 12 +- package.json | 6 +- .../mix-fetch/node-js/index.js} | 2 +- .../examples/mix-fetch/node-js/package.json | 14 + .../examples/mix-fetch/node-js/server.js | 55 + .../packages/mix-fetch-node/.babelrc | 3 - .../packages/mix-fetch-node/README.md | 2 +- .../packages/mix-fetch-node/package.json | 4 +- .../mix-fetch-node/rollup-worker.config.mjs | 15 +- .../scripts/build-prod-docs-collect.sh | 6 +- .../mix-fetch-node/scripts/build-prod.sh | 6 +- .../packages/mix-fetch-node/src/index.ts | 1 - .../mix-fetch-node/src/worker/index.ts | 1 + .../mix-fetch-node/src/worker/main.ts | 2 +- .../mix-fetch-node/src/worker/polyfill.ts | 3 +- .../packages/nodejs-client/README.md | 6 +- .../packages/nodejs-client/internal/index.js | 25 + .../packages/nodejs-client/package.json | 16 +- .../nodejs-client/rollup-cjs.config.mjs | 8 +- .../nodejs-client/rollup-worker.config.mjs | 12 +- .../packages/nodejs-client/src/index.ts | 4 +- .../packages/nodejs-client/src/polyfill.ts | 23 + .../packages/nodejs-client/src/types.ts | 4 +- .../packages/nodejs-client/src/worker.ts | 24 +- sdk/typescript/scripts/build-prod-sdk.sh | 2 +- sdk/typescript/scripts/publish.sh | 47 +- sdk/typescript/scripts/unpublish.sh | 31 +- yarn.lock | 1098 ++++++++++++++++- 28 files changed, 1249 insertions(+), 183 deletions(-) rename sdk/typescript/{packages/mix-fetch-node/internal-dev/index.mjs => examples/mix-fetch/node-js/index.js} (94%) create mode 100644 sdk/typescript/examples/mix-fetch/node-js/package.json create mode 100644 sdk/typescript/examples/mix-fetch/node-js/server.js delete mode 100644 sdk/typescript/packages/mix-fetch-node/.babelrc create mode 100644 sdk/typescript/packages/nodejs-client/internal/index.js create mode 100644 sdk/typescript/packages/nodejs-client/src/polyfill.ts diff --git a/.github/workflows/publish-sdk-npm.yml b/.github/workflows/publish-sdk-npm.yml index 5836a12e37..a0aa757379 100644 --- a/.github/workflows/publish-sdk-npm.yml +++ b/.github/workflows/publish-sdk-npm.yml @@ -12,7 +12,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - registry-url: 'https://registry.npmjs.org' + registry-url: "https://registry.npmjs.org" - name: Setup yarn run: npm install -g yarn @@ -28,6 +28,16 @@ jobs: - name: Install wasm-opt run: cargo install wasm-opt + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" + + - name: Install TinyGo + uses: acifani/setup-tinygo@v1 + with: + tinygo-version: "0.27.0" + - name: Install dependencies run: yarn diff --git a/package.json b/package.json index dd72164411..cd357e15a0 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "sdk/typescript/packages/mui-theme", "sdk/typescript/packages/react-components", "sdk/typescript/packages/validator-client", + "sdk/typescript/packages/mix-fetch-node", + "sdk/typescript/packages/nodejs-client", "ts-packages/*", "nym-wallet", "nym-connect/**", @@ -34,7 +36,7 @@ "prebuild:ci": "yarn dev:on && yarn", "build:ci": "run-s build:types build:packages build:wasm build:ci:sdk", "postbuild:ci": "yarn dev:off", - "build:ci:sdk": "lerna run --scope '{@nymproject/sdk,@nymproject/node-tester,@nymproject/sdk-react,@nymproject/mix-fetch}' build:dev --stream", + "build:ci:sdk": "lerna run --scope '{@nymproject/sdk,@nymproject/node-tester,@nymproject/sdk-react,@nymproject/mix-fetch,@nymproject/nodejs-client,@nymproject/mix-fetch-node}' build --stream", "docs:prod:build": "run-s docs:prod:build:ws", "docs:prod:build:ws": "lerna run docs:prod:build --stream", "sdk:build": "./sdk/typescript/scripts/build-prod-sdk.sh", @@ -53,4 +55,4 @@ "@npmcli/node-gyp": "^3.0.0", "node-gyp": "^9.3.1" } -} \ No newline at end of file +} diff --git a/sdk/typescript/packages/mix-fetch-node/internal-dev/index.mjs b/sdk/typescript/examples/mix-fetch/node-js/index.js similarity index 94% rename from sdk/typescript/packages/mix-fetch-node/internal-dev/index.mjs rename to sdk/typescript/examples/mix-fetch/node-js/index.js index a49455449d..feaa5770c3 100644 --- a/sdk/typescript/packages/mix-fetch-node/internal-dev/index.mjs +++ b/sdk/typescript/examples/mix-fetch/node-js/index.js @@ -1,4 +1,4 @@ -import { createMixFetch, disconnectMixFetch } from '../dist/cjs/index.js'; +const { createMixFetch, disconnectMixFetch } = require('@nymproject/mix-fetch-node-commonjs'); /** * The main entry point diff --git a/sdk/typescript/examples/mix-fetch/node-js/package.json b/sdk/typescript/examples/mix-fetch/node-js/package.json new file mode 100644 index 0000000000..e8117ef02d --- /dev/null +++ b/sdk/typescript/examples/mix-fetch/node-js/package.json @@ -0,0 +1,14 @@ +{ + "name": "@nymproject/mix-fetch-node-js-example", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "scripts": { + "start": "node index.js", + "start:server": "node server.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "@nymproject/mix-fetch-node-commonjs": "^1.2.1-rc.2" + } +} diff --git a/sdk/typescript/examples/mix-fetch/node-js/server.js b/sdk/typescript/examples/mix-fetch/node-js/server.js new file mode 100644 index 0000000000..7e35bc1804 --- /dev/null +++ b/sdk/typescript/examples/mix-fetch/node-js/server.js @@ -0,0 +1,55 @@ +const express = require('express'); +const { mixFetch } = require('@nymproject/mix-fetch-node-commonjs'); + +const app = express(); +app.use(express.static('public')); + +app.get('/nym-fetch', async (req, res) => { + try { + const args = { + mode: 'unsafe-ignore-cors', + headers: { + 'Content-Type': 'application/json', + }, + }; + + const url = req.query.url; + + if (!url) { + return res.status(400).send('input a valid url'); + } + + const extra = { + hiddenGateways: [ + { + owner: 'n1ns3v70ul9gnl9l9fkyz8cyxfq75vjcmx8el0t3', + host: 'sandbox-gateway1.nymtech.net', + explicitIp: '35.158.238.80', + identityKey: 'HjNEDJuotWV8VD4ufeA1jeheTnfNJ7Jorevp57hgaZua', + sphinxKey: 'BoXeUD7ERGmzRauMjJD3itVNnQiH42ncUb6kcVLrb3dy', + }, + ], + }; + + const mixFetchOptions = { + nymApiUrl: 'https://sandbox-nym-api1.nymtech.net/api', + preferredGateway: 'HjNEDJuotWV8VD4ufeA1jeheTnfNJ7Jorevp57hgaZua', + preferredNetworkRequester: + 'AzGdJ4MU78Ex22NEWfeycbN7bt3PFZr1MtKstAdhfELG.GSxnKnvKPjjQm3FdtsgG5KyhP6adGbPHRmFWDH4XfUpP@HjNEDJuotWV8VD4ufeA1jeheTnfNJ7Jorevp57hgaZua', + mixFetchOverride: { + requestTimeoutMs: 60_000, + }, + forceTls: false, + extra, + }; + + const response = await mixFetch(url, args, mixFetchOptions); + const json = await response.json(); + res.send(json); + } catch (error) { + console.log(error); + res.status(500).send(error.message); + } +}); + +app.listen(3000, () => console.log('Server running on port 3000')); diff --git a/sdk/typescript/packages/mix-fetch-node/.babelrc b/sdk/typescript/packages/mix-fetch-node/.babelrc deleted file mode 100644 index 0ef5ffc214..0000000000 --- a/sdk/typescript/packages/mix-fetch-node/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["@babel/env"] -} diff --git a/sdk/typescript/packages/mix-fetch-node/README.md b/sdk/typescript/packages/mix-fetch-node/README.md index dc62208cd3..89050cb4f8 100644 --- a/sdk/typescript/packages/mix-fetch-node/README.md +++ b/sdk/typescript/packages/mix-fetch-node/README.md @@ -5,7 +5,7 @@ This package is a drop-in replacement for `fetch` in NodeJS to send HTTP request ## Usage ```js -const { mixFetch } = require('@nymproject/mix-fetch-node'); +const { mixFetch } = require('@nymproject/mix-fetch-node-commonjs'); ... diff --git a/sdk/typescript/packages/mix-fetch-node/package.json b/sdk/typescript/packages/mix-fetch-node/package.json index 013fb344fb..2df56711de 100644 --- a/sdk/typescript/packages/mix-fetch-node/package.json +++ b/sdk/typescript/packages/mix-fetch-node/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/mix-fetch-node", - "version": "1.2.0", + "version": "1.2.1-rc.2", "description": "This package is a drop-in replacement for `fetch` in NodeJS to send HTTP requests over the Nym Mixnet.", "license": "Apache-2.0", "author": "Nym Technologies SA", @@ -28,7 +28,7 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/mix-fetch-wasm-node": ">=1.2.0-rc.10 || ^1", + "@nymproject/mix-fetch-wasm-node": ">=1.2.0 || ^1", "comlink": "^4.3.1", "fake-indexeddb": "^5.0.0", "node-fetch": "^3.3.2", diff --git a/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs index 8df9ba5cb3..bc10b36ad1 100644 --- a/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs +++ b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs @@ -11,7 +11,7 @@ export default { dir: 'dist/cjs', format: 'cjs', }, - external: ['util', 'fake-indexeddb'], + onwarn, plugins: [ resolve({ browser: false, @@ -19,11 +19,6 @@ export default { extensions: ['.js', '.ts'], }), commonjs(), - // TODO: One of the wasm functions calls `new WebSocket` at one point, which we aren't able to polyfill correctly yet. - modify({ - find: 'const ret = new WebSocket(getStringFromWasm0(arg0, arg1));', - replace: 'const ws = require("ws"); const ret = new ws.WebSocket(getStringFromWasm0(arg0, arg1));', - }), // TODO: `getObject(...).require` seems to generate a warning on Webpack but with Rollup we get a panic since it can't require. // By hard coding the require here, we can workaround that. // Reference: https://github.com/rust-random/getrandom/issues/224 @@ -38,3 +33,11 @@ export default { }), ], }; + +function onwarn(warning) { + // fake-indexeddb has a circular dependency that triggers a warning when rolled up + if (warning.code !== 'CIRCULAR_DEPENDENCY') { + // eslint-disable-next-line no-console + console.error(`(!) ${warning.message}`); + } +} diff --git a/sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh index f672185300..a40a4a4a90 100755 --- a/sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh +++ b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod-docs-collect.sh @@ -4,14 +4,14 @@ set -o errexit set -o nounset set -o pipefail -rm -rf ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch || true +rm -rf ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch-node || true # run the build yarn docs:generate:prod # move the output outside of the yarn/npm workspaces mkdir -p ../../../../dist/ts/docs/tsdoc/nymproject -mv docs ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch +mv docs ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch-node echo "Output can be found in:" -realpath ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch +realpath ../../../../dist/ts/docs/tsdoc/nymproject/mix-fetch-node diff --git a/sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh index b56d1e0472..61377bdcf7 100755 --- a/sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh +++ b/sdk/typescript/packages/mix-fetch-node/scripts/build-prod.sh @@ -5,7 +5,7 @@ set -o nounset set -o pipefail rm -rf dist || true -rm -rf ../../../../dist/ts/sdk/mix-fetch || true +rm -rf ../../../../dist/ts/sdk/mix-fetch-node || true # run the build scripts/build.sh @@ -14,7 +14,7 @@ node scripts/buildPackageJson.mjs # move the output outside of the yarn/npm workspaces mkdir -p ../../../../dist/ts/sdk mv dist ../../../../dist/ts/sdk -mv ../../../../dist/ts/sdk/dist ../../../../dist/ts/sdk/mix-fetch +mv ../../../../dist/ts/sdk/dist ../../../../dist/ts/sdk/mix-fetch-node echo "Output can be found in:" -realpath ../../../../dist/ts/sdk/mix-fetch +realpath ../../../../dist/ts/sdk/mix-fetch-node diff --git a/sdk/typescript/packages/mix-fetch-node/src/index.ts b/sdk/typescript/packages/mix-fetch-node/src/index.ts index e4bc233499..04a83ea144 100644 --- a/sdk/typescript/packages/mix-fetch-node/src/index.ts +++ b/sdk/typescript/packages/mix-fetch-node/src/index.ts @@ -1,5 +1,4 @@ /* eslint-disable no-underscore-dangle */ - import type { SetupMixFetchOps, IMixFetchFn } from './types'; import { createMixFetch as createMixFetchInternal } from './create-mix-fetch'; diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/index.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/index.ts index 81582206e3..24bfded826 100644 --- a/sdk/typescript/packages/mix-fetch-node/src/worker/index.ts +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/index.ts @@ -1,4 +1,5 @@ import './polyfill'; + import { loadWasm } from './wasm-loading'; import { run } from './main'; diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts index e30e6c7cf8..58cfb41a51 100644 --- a/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts @@ -1,10 +1,10 @@ /* eslint-disable no-console */ +import type { IMixFetchWebWorker, LoadedEvent } from '../types'; import * as Comlink from 'comlink'; import { parentPort } from 'node:worker_threads'; import { setupMixFetch, disconnectMixFetch } from '@nymproject/mix-fetch-wasm-node'; -import type { IMixFetchWebWorker, LoadedEvent } from '../types'; import nodeEndpoint from '../node-adapter'; import { EventKinds, ResponseBodyConfigMap, ResponseBodyConfigMapDefaults } from '../types'; import { handleResponseMimeTypes } from './handle-response-mime-types'; diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts index 76c9dd6e2f..7c88d9b088 100644 --- a/sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/polyfill.ts @@ -1,8 +1,8 @@ +import { TextDecoder, TextEncoder } from 'node:util'; import * as crypto from 'node:crypto'; import * as fs from 'node:fs'; import WebSocket from 'ws'; import fetch, { Headers, Request, Response } from 'node-fetch'; -import { TextDecoder, TextEncoder } from 'node:util'; import { Worker } from 'node:worker_threads'; import { indexedDB } from 'fake-indexeddb'; @@ -18,7 +18,6 @@ import { indexedDB } from 'fake-indexeddb'; (globalThis as any).Headers = Headers; (globalThis as any).Request = Request; (globalThis as any).Response = Response; -(globalThis as any).Headers = Headers; (globalThis as any).fs = fs; (globalThis as any).crypto = crypto; (globalThis as any).WebSocket = WebSocket; diff --git a/sdk/typescript/packages/nodejs-client/README.md b/sdk/typescript/packages/nodejs-client/README.md index db694fbe96..9d98f59891 100644 --- a/sdk/typescript/packages/nodejs-client/README.md +++ b/sdk/typescript/packages/nodejs-client/README.md @@ -5,15 +5,13 @@ This package is a NodeJS client that uses the wasm from the [Sphinx webassembly ## Usage ```js -const { createNymMixnetClient } = require('../dist/cjs/index.js'); +const { createNymMixnetClient } = require('@nymproject/nodejs-client-commonjs'); async () => { const nym = await createNymMixnetClient(); nym.events.subscribeToTextMessageReceivedEvent(async (e) => { - if (e.args.payload === 'Hello') { - await nym.client.stop(); - } + console.log("message received", e.args.payload); }); const nymApiUrl = 'https://validator.nymtech.net/api/'; diff --git a/sdk/typescript/packages/nodejs-client/internal/index.js b/sdk/typescript/packages/nodejs-client/internal/index.js new file mode 100644 index 0000000000..2ec5e5cb7e --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/internal/index.js @@ -0,0 +1,25 @@ +const { createNymMixnetClient } = require('../dist/cjs/index.js'); + +(async () => { + const nym = await createNymMixnetClient(); + + nym.events.subscribeToTextMessageReceivedEvent(async ({ args: { payload, mimeType } }) => { + console.log(`received message: ${payload}`); + console.log(`with mimeType: ${mimeType}`); + }); + + // start the client and connect to a gateway + await nym.client.start({ + nymApiUrl: 'https://validator.nymtech.net/api/', + clientId: 'my-client', + }); + + nym.events.subscribeToConnected(async (e) => { + // send a message to yourself + const message = 'Hello'; + const recipient = await nym.client.selfAddress(); + console.log('main thread address: ', recipient); + console.log(`sending "${message}" to ourselves...`); + await nym.client.send({ payload: { message, mimeType: 'text/plain' }, recipient }); + }); +})(); diff --git a/sdk/typescript/packages/nodejs-client/package.json b/sdk/typescript/packages/nodejs-client/package.json index 985b48bdf6..7a30d73cc3 100644 --- a/sdk/typescript/packages/nodejs-client/package.json +++ b/sdk/typescript/packages/nodejs-client/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/nodejs-client", - "version": "1.2.0-rc.10", + "version": "1.2.1-rc.3", "license": "Apache-2.0", "author": "Nym Technologies SA", "files": [ @@ -25,29 +25,20 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/nym-client-wasm-node": "^1.2.0", + "@nymproject/nym-client-wasm-node": ">=1.2.0 || ^1", "comlink": "^4.3.1", "fake-indexeddb": "^4.0.2", "rollup-plugin-polyfill": "^4.2.0", "ws": "^8.14.2" }, "devDependencies": { - "@babel/core": "^7.15.0", - "@babel/plugin-transform-async-to-generator": "^7.14.5", - "@babel/preset-env": "^7.15.0", - "@babel/preset-react": "^7.14.5", - "@babel/preset-typescript": "^7.15.0", - "@nymproject/eslint-config-react-typescript": "^1.0.0", "@rollup/plugin-commonjs": "^24.0.1", - "@rollup/plugin-inject": "^5.0.3", "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-replace": "^5.0.2", - "@rollup/plugin-terser": "^0.2.1", "@rollup/plugin-typescript": "^10.0.1", "@rollup/plugin-url": "^8.0.1", "@rollup/plugin-wasm": "^6.1.1", - "@types/jest": "^27.0.1", "@types/node": "^16.7.13", "@typescript-eslint/eslint-plugin": "^5.13.0", "@typescript-eslint/parser": "^5.13.0", @@ -62,8 +53,6 @@ "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.29.2", "eslint-plugin-react-hooks": "^4.3.0", - "handlebars": "^4.7.8", - "jest": "^29.5.0", "nodemon": "3.0.1", "reload": "^3.2.1", "rimraf": "^3.0.2", @@ -71,7 +60,6 @@ "rollup-plugin-base64": "^1.0.1", "rollup-plugin-modify": "^3.0.0", "rollup-plugin-web-worker-loader": "^1.6.1", - "ts-jest": "^29.1.0", "ts-loader": "^9.4.2", "typedoc": "^0.24.8", "typescript": "^4.8.4" diff --git a/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs b/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs index cb5fe9ac74..7a4af49fc2 100644 --- a/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs +++ b/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs @@ -1,9 +1,9 @@ /* eslint-disable import/no-extraneous-dependencies */ -import typescript from '@rollup/plugin-typescript'; -import resolve from '@rollup/plugin-node-resolve'; -import { wasm } from '@rollup/plugin-wasm'; -import webWorkerLoader from 'rollup-plugin-web-worker-loader'; import replace from '@rollup/plugin-replace'; +import resolve from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; +import webWorkerLoader from 'rollup-plugin-web-worker-loader'; +import { wasm } from '@rollup/plugin-wasm'; export default { input: 'src/index.ts', diff --git a/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs b/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs index b75c9820d1..b1b40b0a0b 100644 --- a/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs +++ b/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs @@ -1,9 +1,9 @@ /* eslint-disable import/no-extraneous-dependencies */ -import typescript from '@rollup/plugin-typescript'; -import resolve from '@rollup/plugin-node-resolve'; -import { wasm } from '@rollup/plugin-wasm'; import commonjs from '@rollup/plugin-commonjs'; import modify from 'rollup-plugin-modify'; +import resolve from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; +import { wasm } from '@rollup/plugin-wasm'; export default { input: 'src/worker.ts', @@ -11,7 +11,6 @@ export default { dir: 'dist/cjs', format: 'cjs', }, - external: ['util', 'fake-indexeddb'], plugins: [ resolve({ browser: false, @@ -19,11 +18,6 @@ export default { extensions: ['.js', '.ts'], }), commonjs(), - // TODO: One of the wasm functions calls `new WebSocket` at one point, which we aren't able to polyfill correctly yet. - modify({ - find: 'const ret = new WebSocket(getStringFromWasm0(arg0, arg1));', - replace: 'const ws = require("ws"); const ret = new ws.WebSocket(getStringFromWasm0(arg0, arg1));', - }), // TODO: `getObject(...).require` seems to generate a warning on Webpack but with Rollup we get a panic since it can't require. // By hard coding the require here, we can workaround that. // Reference: https://github.com/rust-random/getrandom/issues/224 diff --git a/sdk/typescript/packages/nodejs-client/src/index.ts b/sdk/typescript/packages/nodejs-client/src/index.ts index 88133c28c2..ccc9041a50 100644 --- a/sdk/typescript/packages/nodejs-client/src/index.ts +++ b/sdk/typescript/packages/nodejs-client/src/index.ts @@ -21,8 +21,8 @@ import nodeEndpoint from './node-adapter'; /** * Create a client to send and receive traffic from the Nym mixnet. - * @required - * @returns + * @param options - An optional of options + * @returns { Promise } A new instance of the NymMixnetClient. * @example * ```typescript * const client = await createNymMixnetClient(); diff --git a/sdk/typescript/packages/nodejs-client/src/polyfill.ts b/sdk/typescript/packages/nodejs-client/src/polyfill.ts new file mode 100644 index 0000000000..425b49b5fa --- /dev/null +++ b/sdk/typescript/packages/nodejs-client/src/polyfill.ts @@ -0,0 +1,23 @@ +import * as crypto from 'node:crypto'; +import * as fs from 'node:fs'; +import ws from 'ws'; +import { TextDecoder, TextEncoder } from 'node:util'; +import { Worker } from 'node:worker_threads'; +import { indexedDB } from 'fake-indexeddb'; +import { performance } from 'node:perf_hooks'; + +(globalThis as any).performance = performance; +(globalThis as any).TextDecoder = TextDecoder; +(globalThis as any).fs = fs; +(globalThis as any).crypto = crypto; +(globalThis as any).ws = ws; +(globalThis as any).Worker = Worker; + +globalThis.process = process; +globalThis.TextEncoder = TextEncoder; +globalThis.Reflect = Reflect; +globalThis.Proxy = Proxy; +globalThis.Error = Error; +globalThis.Promise = Promise; +globalThis.Object = Object; +globalThis.indexedDB = indexedDB; diff --git a/sdk/typescript/packages/nodejs-client/src/types.ts b/sdk/typescript/packages/nodejs-client/src/types.ts index 528dc849d5..89b7df770a 100644 --- a/sdk/typescript/packages/nodejs-client/src/types.ts +++ b/sdk/typescript/packages/nodejs-client/src/types.ts @@ -10,7 +10,6 @@ import type { DebugWasm } from '@nymproject/nym-client-wasm-node'; * }); * ``` */ - export interface NymMixnetClientOptions { autoConvertStringMimeTypes?: string[] | MimeTypes[]; } @@ -18,7 +17,8 @@ export interface NymMixnetClientOptions { /** * The client for the Nym mixnet which gives access to client methods and event subscriptions. * Returned by the {@link createNymMixnetClient} function. - * + * @property client - The sphinx nym wasm client. + * @property events - Different streams of events provided by the client. */ export interface NymMixnetClient { client: Client; diff --git a/sdk/typescript/packages/nodejs-client/src/worker.ts b/sdk/typescript/packages/nodejs-client/src/worker.ts index a3966a42de..a1a8bea3f1 100644 --- a/sdk/typescript/packages/nodejs-client/src/worker.ts +++ b/sdk/typescript/packages/nodejs-client/src/worker.ts @@ -1,9 +1,6 @@ -// eslint-disable-next-line import/first +import './polyfill'; + import * as Comlink from 'comlink'; -import * as crypto from 'node:crypto'; -import * as fs from 'node:fs'; -import * as process from 'node:process'; -import { indexedDB } from 'fake-indexeddb'; import { parentPort } from 'worker_threads'; import '@nymproject/nym-client-wasm-node/nym_client_wasm_bg.wasm'; @@ -31,19 +28,6 @@ import type { import nodeEndpoint from './node-adapter'; import { EventKinds, MimeTypes } from './types'; -// polyfill setup -const globalVar = - // eslint-disable-next-line @typescript-eslint/no-implied-eval, no-restricted-globals, no-nested-ternary - typeof WorkerGlobalScope !== 'undefined' ? self : typeof global !== 'undefined' ? global : Function('return this;')(); - -globalVar.indexedDB = indexedDB; -globalVar.fs = fs; -globalVar.process = process; -globalVar.performance = performance; -globalVar.TextEncoder = TextEncoder; -globalVar.TextDecoder = TextDecoder; -globalVar.crypto = crypto; - // eslint-disable-next-line no-console console.log('[Nym WASM client] Starting Nym WASM web worker...'); @@ -52,7 +36,6 @@ console.log('[Nym WASM client] Starting Nym WASM web worker...'); * @param event The strongly typed message to send back to the calling thread. * see https://nodejs.org/api/worker_threads.html#workerparentport */ -// eslint-disable-next-line no-restricted-globals const postMessageWithType = (event: E) => parentPort?.postMessage(event); /** @@ -152,8 +135,7 @@ class ClientWrapper { return; } // TODO: currently we don't do anything with the result, it needs some typing and exposed back on the main thread - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const res = await this.client.send_anonymous_message(payload, recipient, replySurbs); + await this.client.send_anonymous_message(payload, recipient, replySurbs); }; } diff --git a/sdk/typescript/scripts/build-prod-sdk.sh b/sdk/typescript/scripts/build-prod-sdk.sh index 70a0175abe..7dd1332b9c 100755 --- a/sdk/typescript/scripts/build-prod-sdk.sh +++ b/sdk/typescript/scripts/build-prod-sdk.sh @@ -14,7 +14,7 @@ rm -rf dist || true yarn build:wasm # build the Typescript SDK packages -yarn build:sdk +yarn build:ci:sdk # build documentation yarn docs:prod:build diff --git a/sdk/typescript/scripts/publish.sh b/sdk/typescript/scripts/publish.sh index 03674df7b1..dabea53c6c 100755 --- a/sdk/typescript/scripts/publish.sh +++ b/sdk/typescript/scripts/publish.sh @@ -10,46 +10,9 @@ set -o pipefail cd dist -#packages=( -#chat-app/parcel -#chat-app/plain-html -#chat-app/react-webpack-with-theme-example -#chrome-extension -#firefox-extension -#node-tester/parcel -#node-tester/plain-html -#node-tester/react -#react/mui-theme -#react/sdk-react -#) packages=( -"wasm/client" -"wasm/mix-fetch" -"wasm/node-tester" -"wasm/extension-storage" - -"node/wasm/client" -"node/wasm/mix-fetch" - -"ts/sdk/mix-fetch/cjs" -"ts/sdk/mix-fetch/cjs-full-fat" -"ts/sdk/mix-fetch/esm" -"ts/sdk/mix-fetch/esm-full-fat" - "ts/sdk/nodejs-client/cjs" "ts/sdk/mix-fetch-node/cjs" - -"ts/sdk/node-tester/cjs" -"ts/sdk/node-tester/cjs-full-fat" -"ts/sdk/node-tester/esm" -"ts/sdk/node-tester/esm-full-fat" - -"ts/sdk/sdk/cjs" -"ts/sdk/sdk/cjs-full-fat" -"ts/sdk/sdk/esm" -"ts/sdk/sdk/esm-full-fat" - -"ts/sdk/contract-clients" ) pushd () { @@ -57,7 +20,7 @@ pushd () { } popd () { - command popd "$@" > /dev/null + command popd > /dev/null } echo "Summary of versions of packages to publish:" @@ -65,8 +28,8 @@ echo "" for item in "${packages[@]}" do pushd "$item" - cat package.json | jq -r '. | "📦 " + .version + " " +.name' - popd + jq -r '. | "📦 " + .version + " " +.name' < package.json + popd done echo "" @@ -79,8 +42,8 @@ do (( COUNTER++ )) pushd "$item" echo "🚀 Publishing $item... (${COUNTER} of ${#packages[@]})" - cat package.json | jq -r '. | .name + " " +.version' - npm publish --access=public + jq -r '. | .name + " " +.version' < package.json + npm publish --access=public --verbose popd echo "" done diff --git a/sdk/typescript/scripts/unpublish.sh b/sdk/typescript/scripts/unpublish.sh index 52a02ed32b..aa1bf4a8ee 100755 --- a/sdk/typescript/scripts/unpublish.sh +++ b/sdk/typescript/scripts/unpublish.sh @@ -7,34 +7,8 @@ set -o pipefail cd dist packages=( -"ts/sdk/node-tester/cjs" -"ts/sdk/node-tester/cjs-full-fat" -"ts/sdk/node-tester/esm" -"ts/sdk/node-tester/esm-full-fat" -) -packages2=( -"wasm/client" -"wasm/mix-fetch" -"wasm/node-tester" -"wasm/extension-storage" - -"ts/sdk/mix-fetch/cjs" -"ts/sdk/mix-fetch/cjs-full-fat" -"ts/sdk/mix-fetch/esm" -"ts/sdk/mix-fetch/esm-full-fat" - "ts/sdk/nodejs-client/cjs" "ts/sdk/mix-fetch-node/cjs" - -"ts/sdk/node-tester/cjs" -"ts/sdk/node-tester/cjs-full-fat" -"ts/sdk/node-tester/esm" -"ts/sdk/node-tester/esm-full-fat" - -"ts/sdk/sdk/cjs" -"ts/sdk/sdk/cjs-full-fat" -"ts/sdk/sdk/esm" -"ts/sdk/sdk/esm-full-fat" ) pushd () { @@ -42,7 +16,7 @@ pushd () { } popd () { - command popd "$@" > /dev/null + command popd > /dev/null } echo "Summary of versions of packages to publish:" @@ -50,7 +24,7 @@ echo "" for item in "${packages[@]}" do pushd "$item" - cat package.json | jq -r '. | "📦 " + .version + " " +.name' + jq -r '. | "📦 " + .version + " " +.name' < package.json popd done @@ -68,4 +42,3 @@ do done echo "" echo "✅ Done" - diff --git a/yarn.lock b/yarn.lock index 1d5fec6aef..3309ce67f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -83,6 +83,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.11.6": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" + integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.0" + "@babel/helpers" "^7.23.2" + "@babel/parser" "^7.23.0" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.22.15", "@babel/generator@^7.23.0", "@babel/generator@^7.7.2": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" @@ -301,7 +322,7 @@ "@babel/traverse" "^7.23.0" "@babel/types" "^7.23.0" -"@babel/helpers@^7.22.15": +"@babel/helpers@^7.22.15", "@babel/helpers@^7.23.2": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== @@ -525,7 +546,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.22.5": +"@babel/plugin-syntax-jsx@^7.22.5", "@babel/plugin-syntax-jsx@^7.7.2": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== @@ -1920,6 +1941,18 @@ jest-util "^27.5.1" slash "^3.0.0" +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + "@jest/core@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" @@ -1954,6 +1987,40 @@ slash "^3.0.0" strip-ansi "^6.0.0" +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + "@jest/environment@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" @@ -1964,6 +2031,16 @@ "@types/node" "*" jest-mock "^27.5.1" +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== + dependencies: + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + "@jest/expect-utils@^28.1.3": version "28.1.3" resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525" @@ -1978,6 +2055,14 @@ dependencies: jest-get-type "^29.6.3" +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" + "@jest/fake-timers@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" @@ -1990,6 +2075,18 @@ jest-mock "^27.5.1" jest-util "^27.5.1" +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" + "@types/node" "*" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" + "@jest/globals@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" @@ -1999,6 +2096,16 @@ "@jest/types" "^27.5.1" expect "^27.5.1" +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" + "@jest/reporters@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" @@ -2030,6 +2137,36 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.1.0" +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + "@jest/schemas@^28.1.3": version "28.1.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" @@ -2053,6 +2190,15 @@ graceful-fs "^4.2.9" source-map "^0.6.0" +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + "@jest/test-result@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.5.1.tgz#56a6585fa80f7cdab72b8c5fc2e871d03832f5bb" @@ -2063,6 +2209,16 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== + dependencies: + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + "@jest/test-sequencer@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" @@ -2073,6 +2229,16 @@ jest-haste-map "^27.5.1" jest-runtime "^27.5.1" +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + slash "^3.0.0" + "@jest/transform@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" @@ -2115,6 +2281,27 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.2" + "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -2209,6 +2396,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.18": + version "0.3.20" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" + integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@leichtgewicht/ip-codec@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" @@ -2950,6 +3145,22 @@ is-module "^1.0.0" resolve "^1.22.1" +"@rollup/plugin-replace@^5.0.2": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.4.tgz#fef548dc751d06747e8dca5b0e8e1fbf647ac7e1" + integrity sha512-E2hmRnlh09K8HGT0rOnnri9OTh+BILGr7NVJGB30S4E3cLRn3J0xjdiyOZ74adPs4NiAMgrjUMGAZNJDBgsdmQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + magic-string "^0.30.3" + +"@rollup/plugin-typescript@^10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-10.0.1.tgz#270b515b116ea28320e6bb62451c4767d49072d6" + integrity sha512-wBykxRLlX7EzL8BmUqMqk5zpx2onnmRMSw/l9M1sVfkJvdwfxogZQVNUM9gVMJbjRLDR5H6U0OMOrlDGmIV45A== + dependencies: + "@rollup/pluginutils" "^5.0.1" + resolve "^1.22.1" + "@rollup/plugin-typescript@^11.0.0": version "11.1.5" resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz#039c763bf943a5921f3f42be255895e75764cb91" @@ -2958,6 +3169,31 @@ "@rollup/pluginutils" "^5.0.1" resolve "^1.22.1" +"@rollup/plugin-url@^8.0.1": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-url/-/plugin-url-8.0.2.tgz#aab4e209e9e012f65582bd99eb80b3bbdfe15afb" + integrity sha512-5yW2LP5NBEgkvIRSSEdJkmxe5cUNZKG3eenKtfJvSkxVm/xTTu7w+ayBtNwhozl1ZnTUCU0xFaRQR+cBl2H7TQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + make-dir "^3.1.0" + mime "^3.0.0" + +"@rollup/plugin-wasm@^6.1.1": + version "6.2.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-wasm/-/plugin-wasm-6.2.2.tgz#ea75fd8cc5ddba1e30bdc22e07cdbaf8d6d160bf" + integrity sha512-gpC4R1G9Ni92ZIRTexqbhX7U+9estZrbhP+9SRb0DW9xpB9g7j34r+J2hqrcW/lRI7dJaU84MxZM0Rt82tqYPQ== + dependencies: + "@rollup/pluginutils" "^5.0.2" + +"@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + "@rollup/pluginutils@^5.0.1": version "5.0.4" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.4.tgz#74f808f9053d33bafec0cc98e7b835c9667d32ba" @@ -2967,6 +3203,15 @@ estree-walker "^2.0.2" picomatch "^2.3.1" +"@rollup/pluginutils@^5.0.2": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.5.tgz#bbb4c175e19ebfeeb8c132c2eea0ecb89941a66c" + integrity sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + "@sapphire/utilities@^3.11.0": version "3.13.0" resolved "https://registry.yarnpkg.com/@sapphire/utilities/-/utilities-3.13.0.tgz#04fd73281ad4cd63c2c87ffbac3faa393d77cf95" @@ -3110,6 +3355,20 @@ dependencies: type-detect "4.0.8" +"@sinonjs/commons@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" + integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + "@sinonjs/fake-timers@^8.0.1": version "8.1.0" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" @@ -4645,6 +4904,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.2.tgz#ff02bc3dc8317cd668dfec247b750ba1f1d62453" integrity sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA== +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + "@types/estree@^0.0.51": version "0.0.51" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" @@ -4710,6 +4974,13 @@ dependencies: "@types/node" "*" +"@types/graceful-fs@^4.1.3": + version "4.1.8" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.8.tgz#417e461e4dc79d957dc3107f45fe4973b09c2915" + integrity sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw== + dependencies: + "@types/node" "*" + "@types/hast@^2.0.0": version "2.3.6" resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.6.tgz#bb8b05602112a26d22868acb70c4b20984ec7086" @@ -5769,6 +6040,11 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== +ansi-sequence-parser@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -6193,6 +6469,19 @@ babel-jest@^27.5.1: graceful-fs "^4.2.9" slash "^3.0.0" +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== + dependencies: + "@jest/transform" "^29.7.0" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^29.6.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + babel-loader@^8.0.0, babel-loader@^8.2.3, babel-loader@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8" @@ -6244,6 +6533,16 @@ babel-plugin-jest-hoist@^27.5.1: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + babel-plugin-macros@^3.0.1, babel-plugin-macros@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" @@ -6339,6 +6638,14 @@ babel-preset-jest@^27.5.1: babel-plugin-jest-hoist "^27.5.1" babel-preset-current-node-syntax "^1.0.0" +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + bail@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776" @@ -6361,6 +6668,11 @@ base-x@^3.0.2, base-x@^3.0.6: dependencies: safe-buffer "^5.0.1" +base64-arraybuffer-es6@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/base64-arraybuffer-es6/-/base64-arraybuffer-es6-0.7.0.tgz#dbe1e6c87b1bf1ca2875904461a7de40f21abc86" + integrity sha512-ESyU/U1CFZDJUdr+neHRhNozeCv72Y7Vm0m1DCbjX3KBjT6eYocvAJlSk6+8+HkVwXlT1FNxhGW6q3UKAlCvvw== + base64-js@^1.0.2, base64-js@^1.3.0, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -7124,6 +7436,17 @@ cli-boxes@^2.2.1: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== +cli-color@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.3.tgz#73769ba969080629670f3f2ef69a4bf4e7cc1879" + integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.61" + es6-iterator "^2.0.3" + memoizee "^0.4.15" + timers-ext "^0.1.7" + cli-cursor@3.1.0, cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -7344,6 +7667,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +comlink@^4.3.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/comlink/-/comlink-4.4.1.tgz#e568b8e86410b809e8600eb2cf40c189371ef981" + integrity sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q== + comma-separated-tokens@^1.0.0: version "1.0.8" resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" @@ -7384,6 +7712,11 @@ commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== +commander@~9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" + integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== + common-path-prefix@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" @@ -7567,6 +7900,11 @@ convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -7727,6 +8065,19 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -8119,6 +8470,14 @@ d3-zoom@^2.0.0: d3-selection "2" d3-transition "2" +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" @@ -8129,6 +8488,11 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -8223,6 +8587,11 @@ dedent@0.7.0, dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +dedent@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" + integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== + deep-equal@^2.0.5: version "2.2.2" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.2.tgz#9b2635da569a13ba8e1cc159c2f744071b115daa" @@ -8573,6 +8942,13 @@ domelementtype@^2.0.1, domelementtype@^2.2.0: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== +domexception@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== + dependencies: + webidl-conversions "^4.0.2" + domexception@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" @@ -8695,6 +9071,11 @@ elliptic@^6.5.3, elliptic@^6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + emittery@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" @@ -8941,16 +9322,52 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + es5-shim@^4.5.13: version "4.6.7" resolved "https://registry.yarnpkg.com/es5-shim/-/es5-shim-4.6.7.tgz#bc67ae0fc3dd520636e0a1601cc73b450ad3e955" integrity sha512-jg21/dmlrNQI7JyyA2w7n+yifSxBng0ZralnSfVZjoCawgNTCnS+yBCyVM9DL5itm7SUnDGgv7hcq2XCZX4iRQ== +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + es6-shim@^0.35.5: version "0.35.8" resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.8.tgz#89216f6fbf8bacba3f897c8c0e814d2a41c05fb7" integrity sha512-Twf7I2v4/1tLoIXMT8HlqaBSS5H2wQTs2wx3MNYCI8K1R1/clXyCazrcVCPm/FuO9cyV8+leEaZOWD5C253NDg== +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -9386,6 +9803,11 @@ estree-walker@^0.6.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + estree-walker@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" @@ -9408,6 +9830,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + eventemitter3@^4.0.0, eventemitter3@^4.0.1, eventemitter3@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -9518,7 +9948,7 @@ expect@^28.1.3: jest-message-util "^28.1.3" jest-util "^28.1.3" -expect@^29.0.0: +expect@^29.0.0, expect@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== @@ -9571,6 +10001,13 @@ express@^4.17.1, express@^4.17.3, express@^4.18.2: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -9614,6 +10051,18 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +fake-indexeddb@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-4.0.2.tgz#e7a884158fa576e00f03e973b9874619947013e4" + integrity sha512-SdTwEhnakbgazc7W3WUXOJfGmhH0YfG4d+dRPOFoYDRTL6U5t8tvrmkf2W/C3W1jk2ylV7Wrnj44RASqpX/lEw== + dependencies: + realistic-structured-clone "^3.0.0" + +fake-indexeddb@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-5.0.0.tgz#c9f394d6d36db62760ad596ebec97ba3d700c95b" + integrity sha512-hGMsl73XgJAk5OtC8hFDSLUVzJ3Z1/C06YpFwI7DzCsEsmH5Mvkxplv3PK6uUL7XCYVBTzayp/4gD+cp7Qi8xQ== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -9662,7 +10111,7 @@ fast-json-parse@^1.0.3: resolved "https://registry.yarnpkg.com/fast-json-parse/-/fast-json-parse-1.0.3.tgz#43e5c61ee4efa9265633046b770fb682a7577c4d" integrity sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw== -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -9732,6 +10181,14 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + fetch-retry@^5.0.2: version "5.0.6" resolved "https://registry.yarnpkg.com/fetch-retry/-/fetch-retry-5.0.6.tgz#17d0bc90423405b7a88b74355bf364acd2a7fa56" @@ -9809,7 +10266,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.2.0: +finalhandler@1.2.0, finalhandler@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== @@ -10018,6 +10475,13 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -11596,6 +12060,11 @@ is-potential-custom-element-name@^1.0.1: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + is-reference@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" @@ -11808,6 +12277,17 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" +istanbul-lib-instrument@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf" + integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + istanbul-lib-report@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" @@ -11891,6 +12371,15 @@ jest-changed-files@^27.5.1: execa "^5.0.0" throat "^6.0.1" +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== + dependencies: + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + jest-circus@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" @@ -11916,6 +12405,32 @@ jest-circus@^27.5.1: stack-utils "^2.0.3" throat "^6.0.1" +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^1.0.0" + is-generator-fn "^2.0.0" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" + slash "^3.0.0" + stack-utils "^2.0.3" + jest-cli@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" @@ -11934,6 +12449,23 @@ jest-cli@^27.5.1: prompts "^2.0.1" yargs "^16.2.0" +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== + dependencies: + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + create-jest "^29.7.0" + exit "^0.1.2" + import-local "^3.0.2" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + jest-config@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" @@ -11964,6 +12496,34 @@ jest-config@^27.5.1: slash "^3.0.0" strip-json-comments "^3.1.1" +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-json-comments "^3.1.1" + "jest-diff@>=29.4.3 < 30", jest-diff@^29.4.1, jest-diff@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" @@ -12001,6 +12561,13 @@ jest-docblock@^27.5.1: dependencies: detect-newline "^3.0.0" +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== + dependencies: + detect-newline "^3.0.0" + jest-each@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" @@ -12012,6 +12579,17 @@ jest-each@^27.5.1: jest-util "^27.5.1" pretty-format "^27.5.1" +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + jest-environment-jsdom@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" @@ -12037,6 +12615,18 @@ jest-environment-node@^27.5.1: jest-mock "^27.5.1" jest-util "^27.5.1" +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + jest-get-type@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" @@ -12093,6 +12683,25 @@ jest-haste-map@^27.5.1: optionalDependencies: fsevents "^2.3.2" +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== + dependencies: + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + jest-jasmine2@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" @@ -12124,6 +12733,14 @@ jest-leak-detector@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" @@ -12207,6 +12824,15 @@ jest-mock@^27.0.6, jest-mock@^27.5.1: "@jest/types" "^27.5.1" "@types/node" "*" +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.7.0" + jest-pnp-resolver@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" @@ -12222,6 +12848,11 @@ jest-regex-util@^27.5.1: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + jest-resolve-dependencies@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" @@ -12231,6 +12862,14 @@ jest-resolve-dependencies@^27.5.1: jest-regex-util "^27.5.1" jest-snapshot "^27.5.1" +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + jest-resolve@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" @@ -12247,6 +12886,21 @@ jest-resolve@^27.5.1: resolve.exports "^1.1.0" slash "^3.0.0" +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-pnp-resolver "^1.2.2" + jest-util "^29.7.0" + jest-validate "^29.7.0" + resolve "^1.20.0" + resolve.exports "^2.0.0" + slash "^3.0.0" + jest-runner@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" @@ -12274,6 +12928,33 @@ jest-runner@^27.5.1: source-map-support "^0.5.6" throat "^6.0.1" +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + dependencies: + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.13.1" + graceful-fs "^4.2.9" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + jest-runtime@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" @@ -12302,6 +12983,34 @@ jest-runtime@^27.5.1: slash "^3.0.0" strip-bom "^4.0.0" +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + strip-bom "^4.0.0" + jest-serializer@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" @@ -12346,6 +13055,32 @@ jest-snapshot@^27.5.1: pretty-format "^27.5.1" semver "^7.3.2" +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^29.7.0" + graceful-fs "^4.2.9" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + natural-compare "^1.4.0" + pretty-format "^29.7.0" + semver "^7.5.3" + jest-util@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" @@ -12382,7 +13117,7 @@ jest-util@^28.1.3: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.7.0: +jest-util@^29.0.0, jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== @@ -12406,6 +13141,18 @@ jest-validate@^27.5.1: leven "^3.1.0" pretty-format "^27.5.1" +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== + dependencies: + "@jest/types" "^29.6.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^29.6.3" + leven "^3.1.0" + pretty-format "^29.7.0" + jest-watcher@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" @@ -12419,6 +13166,20 @@ jest-watcher@^27.5.1: jest-util "^27.5.1" string-length "^4.0.1" +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== + dependencies: + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.7.0" + string-length "^4.0.1" + jest-worker@^26.5.0, jest-worker@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" @@ -12437,6 +13198,16 @@ jest-worker@^27.0.2, jest-worker@^27.4.5, jest-worker@^27.5.1: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== + dependencies: + "@types/node" "*" + jest-util "^29.7.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^27.1.0: version "27.5.1" resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" @@ -12446,16 +13217,15 @@ jest@^27.1.0: import-local "^3.0.2" jest-cli "^27.5.1" -joi@^17.11.0: - version "17.11.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a" - integrity sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ== +jest@^29.5.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.1" - "@sideway/pinpoint" "^2.0.0" + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" + import-local "^3.0.2" + jest-cli "^29.7.0" js-sha3@^0.8.0: version "0.8.0" @@ -12582,7 +13352,7 @@ json5@^1.0.1, json5@^1.0.2: dependencies: minimist "^1.2.0" -jsonc-parser@3.2.0, jsonc-parser@^3.0.0: +jsonc-parser@3.2.0, jsonc-parser@^3.0.0, jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== @@ -13133,6 +13903,13 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== + dependencies: + es5-ext "~0.10.2" + lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" @@ -13148,6 +13925,13 @@ lz-string@^1.5.0: resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== +magic-string@0.25.2: + version "0.25.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9" + integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg== + dependencies: + sourcemap-codec "^1.4.4" + magic-string@^0.25.3: version "0.25.9" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" @@ -13169,6 +13953,13 @@ magic-string@^0.30.2: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" +magic-string@^0.30.3: + version "0.30.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9" + integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + make-dir@4.0.0, make-dir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" @@ -13268,7 +14059,7 @@ markdown-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-1.1.1.tgz#fea03b539faeaee9b4ef02a3769b455b189f7fc3" integrity sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q== -marked@^4.0.16: +marked@^4.0.16, marked@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== @@ -13466,6 +14257,20 @@ memfs@^3.1.2, memfs@^3.2.2, memfs@^3.4.1, memfs@^3.4.3: dependencies: fs-monkey "^1.0.4" +memoizee@^0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" + integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.53" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -13897,6 +14702,11 @@ mime@^2.4.4: resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -13992,7 +14802,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6, minimist@~1.2.0: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -14287,6 +15097,11 @@ nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0: resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz#26c8a3cee6cc05fbcf1e333cd2fc3e003326c0b5" integrity sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw== +next-tick@1, next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -14334,6 +15149,11 @@ node-dir@^0.1.10: dependencies: minimatch "^3.0.2" +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -14348,6 +15168,15 @@ node-fetch@^2.6.1, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-fetch@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + node-forge@^1: version "1.3.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" @@ -14419,6 +15248,22 @@ node-releases@^2.0.13: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +nodemon@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.1.tgz#affe822a2c5f21354466b2fc8ae83277d27dadc7" + integrity sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw== + dependencies: + chokidar "^3.5.2" + debug "^3.2.7" + ignore-by-default "^1.0.1" + minimatch "^3.1.2" + pstree.remy "^1.1.8" + semver "^7.5.3" + simple-update-notifier "^2.0.0" + supports-color "^5.5.0" + touch "^3.1.0" + undefsafe "^2.0.5" + nodemon@^2.0.21: version "2.0.22" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.22.tgz#182c45c3a78da486f673d6c1702e00728daf5258" @@ -14874,7 +15719,7 @@ open@^7.0.3: is-docker "^2.0.0" is-wsl "^2.1.1" -open@^8.0.9, open@^8.4.0: +open@^8.0.0, open@^8.0.9, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -14925,6 +15770,13 @@ os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== +ospec@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ospec/-/ospec-3.1.0.tgz#d36b8e10110f58f63a463df2390a7a73fe9579a8" + integrity sha512-+nGtjV3vlADp+UGfL51miAh/hB4awPBkQrArhcgG4trAaoA2gKt5bf9w0m9ch9zOr555cHWaCHZEDiBOkNZSxw== + dependencies: + glob "^7.1.3" + p-all@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-all/-/p-all-2.1.0.tgz#91419be56b7dee8fe4c5db875d55e0da084244a0" @@ -14970,7 +15822,7 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: +p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -15364,7 +16216,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.0, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.0, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -16071,6 +16923,11 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== +pure-rand@^6.0.0: + version "6.0.4" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" + integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== + qr.js@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f" @@ -16538,6 +17395,15 @@ readonly-date@^1.0.0: resolved "https://registry.yarnpkg.com/readonly-date/-/readonly-date-1.0.0.tgz#5af785464d8c7d7c40b9d738cbde8c646f97dcd9" integrity sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ== +realistic-structured-clone@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/realistic-structured-clone/-/realistic-structured-clone-3.0.0.tgz#7b518049ce2dad41ac32b421cd297075b00e3e35" + integrity sha512-rOjh4nuWkAqf9PWu6JVpOWD4ndI+JHfgiZeMmujYcPi+fvILUu7g6l26TC1K5aBIp34nV+jE1cDO75EKOfHC5Q== + dependencies: + domexception "^1.0.1" + typeson "^6.1.0" + typeson-registry "^1.0.0-alpha.20" + recharts-scale@^0.4.4: version "0.4.5" resolved "https://registry.yarnpkg.com/recharts-scale/-/recharts-scale-0.4.5.tgz#0969271f14e732e642fcc5bd4ab270d6e87dd1d9" @@ -16678,6 +17544,20 @@ relateurl@^0.2.7: resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" integrity sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog== +reload@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/reload/-/reload-3.2.1.tgz#42d43e33e327efe1348c723272c6835fe333349a" + integrity sha512-ZdM8ZSEeI72zkhh6heMEvJ0vHZoovZXcJI6Zae8CzS7o5vO/WjZsAMMr0y1+3I/fCN7y7ZxABoUwwCswcLHkjQ== + dependencies: + cli-color "~2.0.0" + commander "~9.4.0" + finalhandler "~1.2.0" + minimist "~1.2.0" + open "^8.0.0" + serve-static "~1.15.0" + supervisor "~0.12.0" + ws "~8.11.0" + remark-external-links@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/remark-external-links/-/remark-external-links-8.0.0.tgz#308de69482958b5d1cd3692bc9b725ce0240f345" @@ -16874,6 +17754,11 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== + resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.4, resolve@^1.3.2, resolve@^1.9.0: version "1.22.6" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.6.tgz#dd209739eca3aef739c626fea1b4f3c506195362" @@ -16954,6 +17839,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-base64@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-base64/-/rollup-plugin-base64-1.0.1.tgz#b3529b94d23baeb66e1e3bffd04477fa792985eb" + integrity sha512-IbdX8fjuXO/Op3hYmRPjVo0VwcSenwsQDaDTFdoe+70B5ZGoLMtr96L2yhHXCfxv7HwZVvxZqLsuWj6VwzRt3g== + dependencies: + "@rollup/pluginutils" "^3.1.0" + rollup-plugin-dts@^5.0.0, rollup-plugin-dts@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-5.3.1.tgz#c2841269a3a5cb986b7791b0328e6a178eba108f" @@ -16972,6 +17864,14 @@ rollup-plugin-inject@^3.0.0: magic-string "^0.25.3" rollup-pluginutils "^2.8.1" +rollup-plugin-modify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-modify/-/rollup-plugin-modify-3.0.0.tgz#5326e11dfec247e8bbdd9507f3da1da1e5c7818b" + integrity sha512-p/ffs0Y2jz2dEnWjq1oVC7SY37tuS+aP7whoNaQz1EAAOPg+k3vKJo8cMMWx6xpdd0NzhX4y2YF9o/NPu5YR0Q== + dependencies: + magic-string "0.25.2" + ospec "3.1.0" + rollup-plugin-node-polyfills@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz#53092a2744837164d5b8a28812ba5f3ff61109fd" @@ -16979,6 +17879,16 @@ rollup-plugin-node-polyfills@^0.2.1: dependencies: rollup-plugin-inject "^3.0.0" +rollup-plugin-polyfill@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill/-/rollup-plugin-polyfill-4.2.0.tgz#414c7ffca0557bf29a8f4e073b8eb7f4d02dac42" + integrity sha512-6eeOyn7nr2/xUOtB+MhydvqLrNKcSybGneOuWA+t8Q4rR9NQyeapzwuu5n6nX8OFfY1WI1sHconAofaC44IpuA== + +rollup-plugin-web-worker-loader@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-web-worker-loader/-/rollup-plugin-web-worker-loader-1.6.1.tgz#9d7a27575b64b0780fe4e8b3bc87470d217e485f" + integrity sha512-4QywQSz1NXFHKdyiou16mH3ijpcfLtLGOrAqvAqu1Gx+P8+zj+3gwC2BSL/VW1d+LW4nIHC8F7d7OXhs9UdR2A== + rollup-pluginutils@^2.8.1: version "2.8.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" @@ -16993,6 +17903,13 @@ rollup@^3.17.2, rollup@^3.2.1: optionalDependencies: fsevents "~2.3.2" +rollup@^3.9.1: + version "3.29.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" + integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== + optionalDependencies: + fsevents "~2.3.2" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -17269,7 +18186,7 @@ serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.15.0: +serve-static@1.15.0, serve-static@~1.15.0: version "1.15.0" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== @@ -17399,6 +18316,16 @@ shiki@^0.10.1: vscode-oniguruma "^1.6.1" vscode-textmate "5.2.0" +shiki@^0.14.1: + version "0.14.5" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.5.tgz#375dd214e57eccb04f0daf35a32aa615861deb93" + integrity sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw== + dependencies: + ansi-sequence-parser "^1.1.0" + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -17457,6 +18384,13 @@ simple-update-notifier@^1.0.7: dependencies: semver "~7.0.0" +simple-update-notifier@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" + integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w== + dependencies: + semver "^7.5.3" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -17575,6 +18509,14 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -17603,7 +18545,7 @@ source-map@^0.7.0, source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== -sourcemap-codec@^1.4.8: +sourcemap-codec@^1.4.4, sourcemap-codec@^1.4.8: version "1.4.8" resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== @@ -18062,6 +19004,11 @@ stylis@4.2.0: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51" integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== +supervisor@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/supervisor/-/supervisor-0.12.0.tgz#de7e6337015b291851c10f3538c4a7f04917ecc1" + integrity sha512-iBYeU5Or4WiiIa3+ns1DpHIiHjNNXSuYUiixKcznewwo4ImBJ8EobktaAo2csOcauhrz4SvKRTou8Z2C3W28+A== + supports-color@8.1.1, supports-color@^8.0.0: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" @@ -18384,6 +19331,14 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +timers-ext@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + tiny-case@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-case/-/tiny-case-1.0.3.tgz#d980d66bc72b5d5a9ca86fb7c9ffdb9c898ddd03" @@ -18560,6 +19515,20 @@ ts-jest@^27.0.5: semver "7.x" yargs-parser "20.x" +ts-jest@^29.1.0: + version "29.1.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" + integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "^7.5.3" + yargs-parser "^21.0.1" + ts-loader@^9.4.2: version "9.4.4" resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.4.4.tgz#6ceaf4d58dcc6979f84125335904920884b7cee4" @@ -18753,6 +19722,16 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typed-array-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" @@ -18815,6 +19794,16 @@ typedoc@^0.22.13: minimatch "^5.1.0" shiki "^0.10.1" +typedoc@^0.24.8: + version "0.24.8" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.8.tgz#cce9f47ba6a8d52389f5e583716a2b3b4335b63e" + integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w== + dependencies: + lunr "^2.3.9" + marked "^4.3.0" + minimatch "^9.0.0" + shiki "^0.14.1" + "typescript@>=3 < 6": version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" @@ -18825,6 +19814,20 @@ typescript@^4.6.2, typescript@^4.8.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typeson-registry@^1.0.0-alpha.20: + version "1.0.0-alpha.39" + resolved "https://registry.yarnpkg.com/typeson-registry/-/typeson-registry-1.0.0-alpha.39.tgz#9e0f5aabd5eebfcffd65a796487541196f4b1211" + integrity sha512-NeGDEquhw+yfwNhguLPcZ9Oj0fzbADiX4R0WxvoY8nGhy98IbzQy1sezjoEFWOywOboj/DWehI+/aUlRVrJnnw== + dependencies: + base64-arraybuffer-es6 "^0.7.0" + typeson "^6.0.0" + whatwg-url "^8.4.0" + +typeson@^6.0.0, typeson@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/typeson/-/typeson-6.1.0.tgz#5b2a53705a5f58ff4d6f82f965917cabd0d7448b" + integrity sha512-6FTtyGr8ldU0pfbvW/eOZrEtEkczHRUtduBnA90Jh9kMPCiFNnXIon3vF41N0S4tV1HHQt4Hk1j4srpESziCaA== + uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -19272,6 +20275,15 @@ v8-to-istanbul@^9.0.0: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" +v8-to-istanbul@^9.0.1: + version "9.1.3" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz#ea456604101cd18005ac2cae3cdd1aa058a6306b" + integrity sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -19377,7 +20389,7 @@ vm-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -vscode-oniguruma@^1.6.1: +vscode-oniguruma@^1.6.1, vscode-oniguruma@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== @@ -19387,6 +20399,11 @@ vscode-textmate@5.2.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== + w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -19401,7 +20418,7 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" -walker@^1.0.7, walker@~1.0.5: +walker@^1.0.7, walker@^1.0.8, walker@~1.0.5: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== @@ -19453,11 +20470,21 @@ web-namespaces@^1.0.0: resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec" integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw== +web-streams-polyfill@^3.0.3: + version "3.2.1" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" + integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + webidl-conversions@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" @@ -19711,7 +20738,7 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -whatwg-url@^8.0.0, whatwg-url@^8.5.0: +whatwg-url@^8.0.0, whatwg-url@^8.4.0, whatwg-url@^8.5.0: version "8.7.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== @@ -19893,6 +20920,14 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" @@ -19919,11 +20954,16 @@ ws@^7, ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -ws@^8.13.0, ws@^8.2.3: +ws@^8.13.0, ws@^8.14.2, ws@^8.2.3: version "8.14.2" resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g== +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + x-default-browser@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/x-default-browser/-/x-default-browser-0.4.0.tgz#70cf0da85da7c0ab5cb0f15a897f2322a6bdd481" @@ -20024,7 +21064,7 @@ yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3, yargs-parser@^20. resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@21.1.1, yargs-parser@^21.1.1: +yargs-parser@21.1.1, yargs-parser@^21.0.1, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== @@ -20052,7 +21092,7 @@ yargs@16.2.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.6.2: +yargs@^17.3.1, yargs@^17.6.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From d941d9257101574564895bb714409baf31ef6801 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:58:41 +0100 Subject: [PATCH 070/142] add --with-exit-policy flag --- documentation/operators/src/faq/smoosh-faq.md | 8 ++++---- .../operators/src/nodes/gateway-setup.md | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 2950b7df54..e0fa8bc8f3 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -46,12 +46,12 @@ We created an [entire page](../legal/exit-gateway.md) about the technical and le The operators running Gateways would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a more permissive setup. An [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. -### How will the design be implemented? +### How will the Exit policy be implemented? -The progression will have three steps: +The progression of exit policy on Gateways will have three steps: -1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their gateways/network requesters and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ -2. Relatively soon the exit policy will become the default. To disable this exit policy, operators must use `--disable-network-requester` flag. +1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their Gateways (or Network requesters) and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ +2. Relatively soon the exit policy will be part of the Gateway setup by default. To disable this exit policy, operators must use `--disable-exit-policy` flag. 3. Further down the line, it will be the only option. Then the *allowed.list* will be completely removed. Keep in mind this only relates to changes happening on Gateway and Network Requester side. Whether this will be optional or mandatory depends on the chosen [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators). diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index 0fea8bba90..9d4a0d673a 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -50,23 +50,29 @@ You can also check the various arguments required for individual commands with: ## Initialising your Gateway -As Nym developers build towards [Exit Gateway](../legal/exit-gateway.md) functionality, operators can now run their `nym-gateway` binary with in-build Network requester. Considering the plan to [*smoosh*](../faq/smoosh-faq.md) all the nodes into one binary and have wide opened Exit Gateways, we recommend this setup, instead of operating two separate binaries. +As Nym developers build towards [Exit Gateway](../legal/exit-gateway.md) functionality, operators can now run their `nym-gateway` binary with in-build Network requester and include the our new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt). Considering the plan to [*smoosh*](../faq/smoosh-faq.md) all the nodes into one binary and have wide opened Exit Gateways, we recommend this setup, instead of operating two separate binaries. +```admonish warning +Before you start an Exit Gateway, read our [Operators Legal Forum](../legal/exit-gateway.md) page and [*Project Smoosh FAQ*](../faq/smoosh-faq.md). +``` + +```admonish info +There has been an ongoing development with dynamic upgrades. Follow the status of the Project Smoosh [changes](../faq/smoosh-faq.md#what-are-the-changes) and the progression state of Exit policy [implementation](../faq/smoosh-faq.html#how-will-the-exit-policy-be-implemented) to be up to date with the current design. +``` ### Initialising Exit Gateway -An operator can initialise the Exit Gateway functionality by: +An operator can initialise the Exit Gateway functionality by adding Network requester with the new exit policy option: ``` -./nym-gateway init --id --host $(curl icanhazip.com) --with-network-requester +./nym-gateway init --id --host $(curl icanhazip.com) --with-network-requester --with-exit-policy ``` -If we follow the previous example with `` chosen `superexitgateway`, adding the `--with-network-requester` flag, the outcome will be: - +If we follow the previous example with `` chosen `superexitgateway`, adding the `--with-network-requester` and `--with-exit-policy` flags, the outcome will be: ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ From bd50119152c3b3e7f3b4f1a28d4cd16b23d3e713 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:00:01 +0100 Subject: [PATCH 071/142] change --host -> 146.70.170.3 --- documentation/operators/src/nodes/gateway-setup.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index 9d4a0d673a..fcfb37bf46 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -65,14 +65,14 @@ There has been an ongoing development with dynamic upgrades. Follow the status o An operator can initialise the Exit Gateway functionality by adding Network requester with the new exit policy option: ``` -./nym-gateway init --id --host $(curl icanhazip.com) --with-network-requester --with-exit-policy +./nym-gateway init --id --host $(curl ifcfg.me) --with-network-requester --with-exit-policy ``` If we follow the previous example with `` chosen `superexitgateway`, adding the `--with-network-requester` and `--with-exit-policy` flags, the outcome will be: ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ @@ -146,16 +146,16 @@ To check available configuration options use: The following command returns a gateway on your current IP with the `` of `supergateway`: ``` -./nym-gateway init --id supergateway --host $(curl icanhazip.com) +./nym-gateway init --id supergateway --host $(curl ifcfg.me) ``` ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ -The `$(curl icanhazip.com)` command above returns your IP automatically using an external service. Alternatively, you can enter your IP manually if you wish. If you do this, remember to enter your IP **without** any port information. +The `$(curl ifcfg.me)` command above returns your IP automatically using an external service. Alternatively, you can enter your IP manually if you wish. If you do this, remember to enter your IP **without** any port information. ### Bonding your gateway From 5406396c3cbf2ece7c1bf885bd5f8c0bf6bf6770 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:00:43 +0100 Subject: [PATCH 072/142] syntax fix --- documentation/operators/src/faq/smoosh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index e0fa8bc8f3..99f31661a8 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -24,7 +24,7 @@ As we shared in our blog post article [*What does it take to build the wolds mos Project smoosh will have three steps: 1. Combine the `gateway` and `network-requester` into one binary ✅ -2. Create [exit gateway](../legal/exit-gateway.md): Take the gateway binary including network requester combined in \#1 and switch from [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) ✅ +2. Create [Exit Gateway](../legal/exit-gateway.md): Take the gateway binary including network requester combined in \#1 and switch from [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) ✅ 3. Combine all the nodes in the Nym Mixnet into one binary, that is `mixnode`, `gateway` (entry and exit) and `network-requester`. These three steps will be staggered over time - period of several months, and will be implemented one by one with enough time to take in feedback and fix bugs in between. From 07037341c5abbc5e00ab0be5235f30eb0e441f6f Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:06:44 +0100 Subject: [PATCH 073/142] change --host to -4 https://ifconfig.me --- documentation/operators/src/nodes/gateway-setup.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index fcfb37bf46..179f0df6f2 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -65,14 +65,14 @@ There has been an ongoing development with dynamic upgrades. Follow the status o An operator can initialise the Exit Gateway functionality by adding Network requester with the new exit policy option: ``` -./nym-gateway init --id --host $(curl ifcfg.me) --with-network-requester --with-exit-policy +./nym-gateway init --id --host $(curl -4 https://ifconfig.me) --with-network-requester --with-exit-policy ``` If we follow the previous example with `` chosen `superexitgateway`, adding the `--with-network-requester` and `--with-exit-policy` flags, the outcome will be: ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ @@ -146,16 +146,16 @@ To check available configuration options use: The following command returns a gateway on your current IP with the `` of `supergateway`: ``` -./nym-gateway init --id supergateway --host $(curl ifcfg.me) +./nym-gateway init --id supergateway --host $(curl -4 https://ifconfig.me) ``` ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ -The `$(curl ifcfg.me)` command above returns your IP automatically using an external service. Alternatively, you can enter your IP manually if you wish. If you do this, remember to enter your IP **without** any port information. +The `$(curl -4 https://ifconfig.me)` command above returns your IP automatically using an external service. Alternatively, you can enter your IP manually if you wish. If you do this, remember to enter your IP **without** any port information. ### Bonding your gateway From 1370192823b2d528adcaf25f970b956f280d5ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Wed, 1 Nov 2023 10:31:59 +0000 Subject: [PATCH 074/142] print info on exit policy on embedded NR init (#4086) --- common/types/src/gateway.rs | 2 ++ gateway/src/commands/helpers.rs | 1 + gateway/src/node/helpers.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/common/types/src/gateway.rs b/common/types/src/gateway.rs index 3b546320b6..750871e881 100644 --- a/common/types/src/gateway.rs +++ b/common/types/src/gateway.rs @@ -119,6 +119,7 @@ pub struct GatewayNetworkRequesterDetails { pub encryption_key: String, pub open_proxy: bool, + pub exit_policy: bool, pub enabled_statistics: bool, // just a convenience wrapper around all the keys @@ -140,6 +141,7 @@ impl fmt::Display for GatewayNetworkRequesterDetails { writeln!(f, "\taddress: {}", self.address)?; writeln!(f, "\tuses open proxy: {}", self.open_proxy)?; + writeln!(f, "\tuses exit policy: {}", self.exit_policy)?; writeln!(f, "\tsends statistics: {}", self.enabled_statistics)?; writeln!(f, "\tallow list path: {}", self.allow_list_path)?; diff --git a/gateway/src/commands/helpers.rs b/gateway/src/commands/helpers.rs index f4ef8640e9..23ebd77afd 100644 --- a/gateway/src/commands/helpers.rs +++ b/gateway/src/commands/helpers.rs @@ -302,6 +302,7 @@ pub(crate) async fn initialise_local_network_requester( enabled: gateway_config.network_requester.enabled, identity_key: address.identity().to_string(), encryption_key: address.encryption_key().to_string(), + exit_policy: !nr_cfg.network_requester.use_deprecated_allow_list, open_proxy: nr_cfg.network_requester.open_proxy, enabled_statistics: nr_cfg.network_requester.enabled_statistics, address: address.to_string(), diff --git a/gateway/src/node/helpers.rs b/gateway/src/node/helpers.rs index 0b8fc9c994..d3cf2fdae4 100644 --- a/gateway/src/node/helpers.rs +++ b/gateway/src/node/helpers.rs @@ -60,6 +60,7 @@ pub(crate) fn node_details(config: &Config) -> Result Date: Tue, 31 Oct 2023 20:50:24 +0100 Subject: [PATCH 075/142] ci: rename to ci-binary-config-checker --- .../{ci-binary-checker.yml => ci-binary-config-checker.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{ci-binary-checker.yml => ci-binary-config-checker.yml} (96%) diff --git a/.github/workflows/ci-binary-checker.yml b/.github/workflows/ci-binary-config-checker.yml similarity index 96% rename from .github/workflows/ci-binary-checker.yml rename to .github/workflows/ci-binary-config-checker.yml index ec08504816..07e14d6738 100644 --- a/.github/workflows/ci-binary-checker.yml +++ b/.github/workflows/ci-binary-config-checker.yml @@ -1,4 +1,4 @@ -name: Run config checks on all binaries +name: ci-binary-config-checker on: workflow_dispatch: From 143036c2a2579ec5215e962462032e44fd8ae676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 21:08:14 +0100 Subject: [PATCH 076/142] ci: rename cd-docs --- .github/workflows/cd-docs.yml | 4 ++-- .github/workflows/ci-docs.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-docs.yml b/.github/workflows/cd-docs.yml index 2e7d024f60..df0ae9dc66 100644 --- a/.github/workflows/cd-docs.yml +++ b/.github/workflows/cd-docs.yml @@ -1,4 +1,4 @@ -name: CD docs +name: cd-docs on: workflow_dispatch: @@ -26,7 +26,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --workspace --release --all + args: --workspace --release - name: Install mdbook run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4.33" mdbook) - name: Install mdbook plugins diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index b503516e70..3bcf0a2679 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -26,7 +26,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --workspace --release --all + args: --workspace --release - name: Install mdbook run: (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4.35" mdbook) - name: Install mdbook plugins From 241169140e6bea4ab93dfc164f473c1db279a311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 20:55:45 +0100 Subject: [PATCH 077/142] ci: move nightly to ubuntu-20.04 --- .github/workflows/nightly-build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 9185c9f304..0e5492539c 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -4,26 +4,26 @@ on: workflow_dispatch: schedule: - cron: '14 1 * * *' + jobs: build: strategy: fail-fast: false matrix: rust: [stable, beta] - os: [custom-linux, windows10, custom-runner-mac-m1] + os: [ubuntu-20.04, windows10, custom-runner-mac-m1] runs-on: ${{ matrix.os }} env: CARGO_TERM_COLOR: always continue-on-error: true steps: - - name: Install Dependencies (Linux) - run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler - continue-on-error: true - if: matrix.os == 'custom-linux' - - name: Check out repository code uses: actions/checkout@v3 + - name: Install Dependencies (Linux) + run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler + if: matrix.os == 'ubuntu-20.04' + - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: @@ -42,31 +42,31 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --workspace + args: --release --workspace - name: Build examples uses: actions-rs/cargo@v1 with: command: build - args: --workspace --examples + args: --release --workspace --examples - name: Run unit tests uses: actions-rs/cargo@v1 with: command: test - args: --workspace + args: --release --workspace - name: Run slow unit tests uses: actions-rs/cargo@v1 with: command: test - args: --workspace -- --ignored + args: --release --workspace -- --ignored - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --workspace --all-targets -- -D warnings + args: --release --workspace --all-targets -- -D warnings notification: needs: build From f3442c6964f1125e2ff3f52af0765a79aea180c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 21:17:13 +0100 Subject: [PATCH 078/142] ci: sort out nightly wallet build --- .../workflows/nightly-nym-wallet-build.yml | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/nightly-nym-wallet-build.yml b/.github/workflows/nightly-nym-wallet-build.yml index f4d32bd396..1cdb70def2 100644 --- a/.github/workflows/nightly-nym-wallet-build.yml +++ b/.github/workflows/nightly-nym-wallet-build.yml @@ -5,27 +5,24 @@ on: schedule: - cron: '14 1 * * *' -defaults: - run: - working-directory: nym-wallet - jobs: build: strategy: fail-fast: false matrix: - os: [custom-ubuntu-20.04, macos-latest, windows10] + os: [ubuntu-20.04, macos-latest, windows10] runs-on: ${{ matrix.os }} env: CARGO_TERM_COLOR: always + MANIFEST_PATH: --manifest-path nym-wallet/Cargo.toml continue-on-error: true steps: - name: Check out repository code uses: actions/checkout@v3 - name: Install Dependencies (Linux) - run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools protobuf-compiler - if: matrix.os == 'custom-ubuntu-20.04' + run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools + if: matrix.os == 'ubuntu-20.04' - name: Install rust toolchain uses: actions-rs/toolchain@v1 @@ -35,40 +32,29 @@ jobs: override: true components: rustfmt, clippy - - name: Install Protoc - uses: arduino/setup-protoc@v2 - if: matrix.os == 'macos-latest' - - name: Check formatting uses: actions-rs/cargo@v1 with: command: fmt - args: --all -- --check + args: ${{ env.MANIFEST_PATH }} --all -- --check - name: Build uses: actions-rs/cargo@v1 with: command: build - args: --workspace + args: ${{ env.MANIFEST_PATH }} --release --workspace - name: Unit tests uses: actions-rs/cargo@v1 with: command: test - args: --workspace - - - name: Annotate with clippy warnings - uses: actions-rs/clippy-check@v1 - continue-on-error: true - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --workspace + args: ${{ env.MANIFEST_PATH }} --workspace - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --workspace --all-targets -- -D warnings + args: ${{ env.MANIFEST_PATH }} --workspace --all-targets -- -D warnings notification: needs: build From 6e9a588c1affe0e5b124021a56af8d7718bd8639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 21:53:52 +0100 Subject: [PATCH 079/142] ci: nightly-build sed debug = false --- .github/workflows/nightly-build.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 0e5492539c..9572abfa77 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -50,23 +50,28 @@ jobs: command: build args: --release --workspace --examples + - name: Set debug to false + run: | + sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml + git diff + - name: Run unit tests uses: actions-rs/cargo@v1 with: command: test - args: --release --workspace + args: --workspace - name: Run slow unit tests uses: actions-rs/cargo@v1 with: command: test - args: --release --workspace -- --ignored + args: --workspace -- --ignored - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --release --workspace --all-targets -- -D warnings + args: --workspace --all-targets -- -D warnings notification: needs: build From f28e0b529e8b87d38372cd99fe37cfd16a73413f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 22:05:37 +0100 Subject: [PATCH 080/142] ci: use macos-latest in nightly-build --- .github/workflows/nightly-build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 9572abfa77..3365011f38 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: rust: [stable, beta] - os: [ubuntu-20.04, windows10, custom-runner-mac-m1] + os: [ubuntu-20.04, windows10, macos-latest] runs-on: ${{ matrix.os }} env: CARGO_TERM_COLOR: always @@ -32,6 +32,12 @@ jobs: override: true components: rustfmt, clippy + - name: Install Protoc + uses: arduino/setup-protoc@v2 + if: matrix.os == 'macos-latest' + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Check formatting uses: actions-rs/cargo@v1 with: From 7da2ce362dbffc4f2e3bb92fe7e69af18efd7e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Tue, 31 Oct 2023 21:32:54 +0100 Subject: [PATCH 081/142] ci: create nightly-nym-connect-desktop-build --- .../workflows/ci-nym-connect-desktop-rust.yml | 12 +-- .../nightly-nym-connect-desktop-build.yml | 92 +++++++++++++++++++ 2 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/nightly-nym-connect-desktop-build.yml diff --git a/.github/workflows/ci-nym-connect-desktop-rust.yml b/.github/workflows/ci-nym-connect-desktop-rust.yml index e5e56b8f43..77d5a0607b 100644 --- a/.github/workflows/ci-nym-connect-desktop-rust.yml +++ b/.github/workflows/ci-nym-connect-desktop-rust.yml @@ -33,6 +33,12 @@ jobs: override: true components: rustfmt, clippy + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path nym-connect/desktop/Cargo.toml --all -- --check + - name: Build all binaries uses: actions-rs/cargo@v1 with: @@ -45,12 +51,6 @@ jobs: command: test args: --manifest-path nym-connect/desktop/Cargo.toml --workspace - - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path nym-connect/desktop/Cargo.toml --all -- --check - - uses: actions-rs/clippy-check@v1 name: Clippy checks continue-on-error: true diff --git a/.github/workflows/nightly-nym-connect-desktop-build.yml b/.github/workflows/nightly-nym-connect-desktop-build.yml new file mode 100644 index 0000000000..a0705c6e1c --- /dev/null +++ b/.github/workflows/nightly-nym-connect-desktop-build.yml @@ -0,0 +1,92 @@ +name: nightly-nym-wallet-build + +on: + workflow_dispatch: + schedule: + - cron: '14 1 * * *' + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, macos-latest, windows10] + runs-on: ${{ matrix.os }} + env: + CARGO_TERM_COLOR: always + MANIFEST_PATH: --manifest-path nym-connect/desktop/Cargo.toml + continue-on-error: true + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Install Dependencies (Linux) + run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools + if: matrix.os == 'ubuntu-20.04' + + - name: Install rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: ${{ env.MANIFEST_PATH }} --all -- --check + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: ${{ env.MANIFEST_PATH }} --release --workspace + + - name: Unit tests + uses: actions-rs/cargo@v1 + with: + command: test + args: ${{ env.MANIFEST_PATH }} --workspace + + - name: Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: ${{ env.MANIFEST_PATH }} --workspace --all-targets -- -D warnings + + notification: + needs: build + runs-on: custom-linux + steps: + - name: Collect jobs status + uses: technote-space/workflow-conclusion-action@v2 + - name: Check out repository code + uses: actions/checkout@v3 + - name: install npm + uses: actions/setup-node@v3 + if: env.WORKFLOW_CONCLUSION == 'failure' + with: + node-version: 18 + - name: Matrix - Node Install + if: env.WORKFLOW_CONCLUSION == 'failure' + run: npm install + working-directory: .github/workflows/support-files + - name: Matrix - Send Notification + if: env.WORKFLOW_CONCLUSION == 'failure' + env: + NYM_NOTIFICATION_KIND: nightly + NYM_PROJECT_NAME: "nym-connect-desktop-nightly-build" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" + GIT_BRANCH: "${GITHUB_REF##*/}" + IS_SUCCESS: "${{ env.WORKFLOW_CONCLUSION == 'success' }}" + MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" + MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_NIGHTLY }}" + MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" + MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" + MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" + uses: docker://keybaseio/client:stable-node + with: + args: .github/workflows/support-files/notifications/entry_point.sh From 73fe7ebec7d40a9e4e34b6f5054841a79c97c4a8 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Wed, 1 Nov 2023 12:00:16 +0100 Subject: [PATCH 082/142] finish exit gateway setup --- .../operators/src/nodes/gateway-setup.md | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index 179f0df6f2..401323b6ff 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -65,7 +65,7 @@ There has been an ongoing development with dynamic upgrades. Follow the status o An operator can initialise the Exit Gateway functionality by adding Network requester with the new exit policy option: ``` -./nym-gateway init --id --host $(curl -4 https://ifconfig.me) --with-network-requester --with-exit-policy +./nym-gateway init --id --host $(curl -4 https://ifconfig.me) --with-network-requester --with-exit-policy true ``` If we follow the previous example with `` chosen `superexitgateway`, adding the `--with-network-requester` and `--with-exit-policy` flags, the outcome will be: @@ -76,13 +76,13 @@ If we follow the previous example with `` chosen `superexitgateway`, adding ``` ~~~ -You can see that the printed information besides *identity* and *sphinx keys* also includes a long string called *address*. This is the address to be provided to your local [socks5 client](https://nymtech.net/docs/clients/socks5-client.html) as a `--provider` if you wish to connect to your own exit gateway. +You can see that the printed information besides *identity* and *sphinx keys* also includes a long string called *address*. This is the address to be provided to your local [socks5 client](https://nymtech.net/docs/clients/socks5-client.html) as a `--provider` if you wish to connect to your own Exit Gateway. Additionally -#### Add Network requester to existing Gateway +#### Add Network requester to an existing Gateway -If you already run a gateway and got it [upgraded](./maintenance.md#upgrading-your-node) to the [newest version](./gateway-setup.md#current-version), you can easily change its functionality to exit gateway. Pause the gateway and run a command `setup-network-requester`. +If you already [upgraded](./maintenance.md#upgrading-your-node) your Gateway to the [newest version](./gateway-setup.md#current-version) and initialised without a Network requester, you can easily change its functionality to Exit Gateway with a command `setup-network-requester`. See the options: @@ -96,19 +96,28 @@ See the options: ``` ~~~ -Run with `--enabled true` flag choosing `` as `supergateway`: +To setup Exit Gateway functionality with our new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) add a flag `--with-exit-policy true`. ``` -./nym-gateway setup-network-requester --enabled true --id supergateway +./nym-gateway setup-network-requester --enabled true --with-exit-policy true --id ``` +Example choosing `` as `exit-gateway`: + +``` +./nym-gateway setup-network-requester --enabled true --with-exit-policy true --id exit-gateway +``` +(In the following output we first initialised the Gateway without the functionality and then ran the command above.) + ~~~admonish example collapsible=true title="Console output" ``` - + + + ``` ~~~ -In case there are any problems, you can also change it manually by editing the gateway config stored in `/home/user/.nym/gateways//config/config.toml` where the line under `[network_requester]` needs to be edited from `false` to `true`. +In case there are any unexpected problems, you can also change it manually by editing the Gateway config stored in `/home/user/.nym/gateways//config/config.toml` where the line under `[network_requester]` needs to be edited from `false` to `true`. ``` [network_requester] @@ -116,17 +125,15 @@ In case there are any problems, you can also change it manually by editing the g enabled = true ``` -Save, exit and restart your gateway. Now it is a post-smooshed exit gateway. +Save, exit and restart your gateway. Now you are an operator of post-smooshed Exit gateway. All information about network requester part of your exit gateway is in `/home/user/.nym/gateways/snus/config/network_requester_config.toml`. +For now you can run Gateway without Network requester or with and without the new exit policy. This will soon change as we inform in our [Project Smoosh FAQ](../faq/smoosh-faq.html#how-will-the-exit-policy-be-implemented). + To read more about the configuration like whitelisted outbound requesters in `allowed.list` and other useful information, see the page [*Network Requester Whitelist*](network-requester-setup.md#using-your-network-requester). -```admonish info -Before you bond and run your gateway, please make sure the [firewall configuration](./maintenance.md#configure-your-firewall) is setup so your gateway can be reached from the outside. -``` - #### Initialising Gateway without Network requester In case you don't want to run your Gateway with the Exit Gateway functionality, you still can run a simple Gateway. @@ -143,15 +150,15 @@ To check available configuration options use: ``` ~~~ -The following command returns a gateway on your current IP with the `` of `supergateway`: +The following command returns a gateway on your current IP with the `` of `simple-gateway`: ``` -./nym-gateway init --id supergateway --host $(curl -4 https://ifconfig.me) +./nym-gateway init --id simple-gateway --host $(curl -4 https://ifconfig.me) ``` ~~~admonish example collapsible=true title="Console output" ``` - + ``` ~~~ @@ -160,6 +167,10 @@ The `$(curl -4 https://ifconfig.me)` command above returns your IP automatically ### Bonding your gateway +```admonish info +Before you bond and run your Gateway, please make sure the [firewall configuration](./maintenance.md#configure-your-firewall) is setup so your gateway can be reached from the outside. +``` + #### Via the Desktop wallet You can bond your gateway via the Desktop wallet. @@ -187,7 +198,7 @@ It will look something like this: |_| |_|\__, |_| |_| |_| |___/ - (nym-gateway - version v1.1.29) + (nym-gateway - version v1.1.31) >>> attempting to sign 2Mf8xYytgEeyJke9LA7TjhHoGQWNBEfgHZtTyy2krFJfGHSiqy7FLgTnauSkQepCZTqKN5Yfi34JQCuog9k6FGA2EjsdpNGAWHZiuUGDipyJ6UksNKRxnFKhYW7ri4MRduyZwbR98y5fQMLAwHne1Tjm9cXYCn8McfigNt77WAYwBk5bRRKmC34BJMmWcAxphcLES2v9RdSR68tkHSpy2C8STfdmAQs3tZg8bJS5Qa8pQdqx14TnfQAPLk3QYCynfUJvgcQTrg29aqCasceGRpKdQ3Tbn81MLXAGAs7JLBbiMEAhCezAr2kEN8kET1q54zXtKz6znTPgeTZoSbP8rzf4k2JKHZYWrHYF9JriXepuZTnyxAKAxvGFPBk8Z6KAQi33NRQkwd7MPyttatHna6kG9x7knffV6ebGzgRBf7NV27LurH8x4L1uUXwm1v1UYCA1WSBQ9Pp2JW69k5v5v7G9gBy8RUcZnMbeL26Qqb8WkuGcmuHhaFfoqSfV7PRHPpPT4M8uRqUyR4bjUtSJJM1yh6QSeZk9BEazzoJqPeYeGoiFDZ3LMj2jesbJweQR4caaYuRczK92UGSSqu9zBKmE45a @@ -209,7 +220,7 @@ It will look something like this: * Your gateway is now bonded. -> You are asked to `sign` a transaction on bonding so that the mixnet smart contract is able to map your nym address to your node. This allows us to create a nonce for each account and defend against replay attacks. +> You are asked to `sign` a transaction on bonding so that the Mixnet smart contract is able to map your Nym address to your node. This allows us to create a nonce for each account and defend against replay attacks. #### Via the CLI (power users) If you want to bond your mix node via the CLI, then check out the [relevant section in the Nym CLI](https://nymtech.net/docs/tools/nym-cli.html#bond-a-mix-node) docs. From 784ee5ace8a04b4fdb6c59b5a3a541add80359ff Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 1 Nov 2023 13:28:49 +0100 Subject: [PATCH 083/142] Revert "Add hack for working with old nym gateways" This reverts commit 7129de4373d4b62e06a33dc877b7d605ac074033. To avoid breaking wss --- .../client-core/src/client/topology_control/nym_api_provider.rs | 2 +- common/client-core/src/init/helpers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/client-core/src/client/topology_control/nym_api_provider.rs b/common/client-core/src/client/topology_control/nym_api_provider.rs index 5de16663de..824294793b 100644 --- a/common/client-core/src/client/topology_control/nym_api_provider.rs +++ b/common/client-core/src/client/topology_control/nym_api_provider.rs @@ -69,7 +69,7 @@ impl NymApiTopologyProvider { Ok(mixes) => mixes, }; - let gateways = match self.validator_client.get_cached_gateways().await { + let gateways = match self.validator_client.get_cached_described_gateways().await { Err(err) => { error!("failed to get network gateways - {err}"); return None; diff --git a/common/client-core/src/init/helpers.rs b/common/client-core/src/init/helpers.rs index b253ed44cf..4b50f0864b 100644 --- a/common/client-core/src/init/helpers.rs +++ b/common/client-core/src/init/helpers.rs @@ -67,7 +67,7 @@ pub async fn current_gateways( log::trace!("Fetching list of gateways from: {nym_api}"); - let gateways = client.get_cached_gateways().await?; + let gateways = client.get_cached_described_gateways().await?; let valid_gateways = gateways .into_iter() .filter_map(|gateway| gateway.try_into().ok()) From 610f7e88ca6f643005d93e6cb9de8ac798a91d7f Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:44:51 +0100 Subject: [PATCH 084/142] add example setup-network-requester --- .../operators/src/nodes/gateway-setup.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index 401323b6ff..c6a85ec792 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -102,22 +102,22 @@ To setup Exit Gateway functionality with our new [exit policy](https://nymtech.n ./nym-gateway setup-network-requester --enabled true --with-exit-policy true --id ``` -Example choosing `` as `exit-gateway`: +Say we have a gateway with `` as `new-gateway`, originally initialised and ran without the Exit Gateway functionality. To change the setup, run: + ``` -./nym-gateway setup-network-requester --enabled true --with-exit-policy true --id exit-gateway +./nym-gateway setup-network-requester --enabled true --with-exit-policy true --id new-gateway ``` -(In the following output we first initialised the Gateway without the functionality and then ran the command above.) ~~~admonish example collapsible=true title="Console output" ``` - - - + + + ``` ~~~ -In case there are any unexpected problems, you can also change it manually by editing the Gateway config stored in `/home/user/.nym/gateways//config/config.toml` where the line under `[network_requester]` needs to be edited from `false` to `true`. +In case there are any unexpected problems, you can also change it manually by editing the Gateway config file stored in `/home/user/.nym/gateways//config/config.toml` where the line under `[network_requester]` needs to be edited from `false` to `true`. ``` [network_requester] @@ -127,7 +127,7 @@ enabled = true Save, exit and restart your gateway. Now you are an operator of post-smooshed Exit gateway. -All information about network requester part of your exit gateway is in `/home/user/.nym/gateways/snus/config/network_requester_config.toml`. +All information about network requester part of your exit gateway is in `/home/user/.nym/gateways//config/network_requester_config.toml`. For now you can run Gateway without Network requester or with and without the new exit policy. This will soon change as we inform in our [Project Smoosh FAQ](../faq/smoosh-faq.html#how-will-the-exit-policy-be-implemented). From 4262e2e2f68ca7723193e1ca2f34f06d8914bc62 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 1 Nov 2023 15:57:23 +0100 Subject: [PATCH 085/142] fix: adding some polyfills to nodejs-client and mix-fetch During the merge of the nodejs-wasm-client there seems to be some losses, this commit makes nodejs-client and the nodejs mix-fetch work with the internal tools. Still looking into Tommys qa feedback. --- .../packages/mix-fetch-node/internal/index.js | 54 +++++++++++++++++++ .../mix-fetch-node/rollup-worker.config.mjs | 14 ++--- .../nodejs-client/rollup-cjs.config.mjs | 2 +- .../nodejs-client/rollup-worker.config.mjs | 6 +++ .../packages/nodejs-client/src/polyfill.ts | 4 +- yarn.lock | 11 ++++ 6 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 sdk/typescript/packages/mix-fetch-node/internal/index.js diff --git a/sdk/typescript/packages/mix-fetch-node/internal/index.js b/sdk/typescript/packages/mix-fetch-node/internal/index.js new file mode 100644 index 0000000000..5804f8c631 --- /dev/null +++ b/sdk/typescript/packages/mix-fetch-node/internal/index.js @@ -0,0 +1,54 @@ +const { createMixFetch, disconnectMixFetch } = require('../dist/cjs/index.js'); + +/** + * The main entry point + */ +(async () => { + console.log('Tester is starting up...'); + + const addr = + 'D274yd1h3L3pNJzdxE5VgJ7izAsAVMsDrQtFSkKUegfk.8J67cGbcwvrJKF3Kb16HVWWc9AnrFnEibNCm9zCkuVFu@Emswx6KXyjRfq1c2k4d4uD2e6nBSbH1biorCZUei8UNS'; + + console.log('About to set up mixFetch...'); + const { mixFetch } = await createMixFetch({ + preferredNetworkRequester: addr, + clientId: 'node-client1', + clientOverride: { + coverTraffic: { disableLoopCoverTrafficStream: true }, + traffic: { disableMainPoissonPacketDistribution: true }, + }, + mixFetchOverride: { requestTimeoutMs: 60000 }, + responseBodyConfigMap: {}, + extra: {}, + }); + + globalThis.mixFetch = mixFetch; + + if (!globalThis.mixFetch) { + console.error('Oh no! Could not create mixFetch'); + } else { + console.log('Ready!'); + } + + let url = 'https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt'; + console.log(`Using mixFetch to get ${url}...`); + const args = { mode: 'unsafe-ignore-cors' }; + + let resp = await mixFetch(url, args); + console.log({ resp }); + const text = await resp.text(); + + console.log('disconnecting'); + await disconnectMixFetch(); + console.log('disconnected! all further usages should fail'); + + // get an image + url = 'https://nymtech.net/favicon.svg'; + resp = await mixFetch(url, args); + console.log({ resp }); + const buffer = await resp.arrayBuffer(); + const type = resp.headers.get('Content-Type') || 'image/svg'; + const blobUrl = URL.createObjectURL(new Blob([buffer], { type })); + console.log(JSON.stringify({ bufferBytes: buffer.byteLength, blobUrl }, null, 2)); + console.log(blobUrl); +})(); diff --git a/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs index bc10b36ad1..0912356e47 100644 --- a/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs +++ b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs @@ -11,7 +11,7 @@ export default { dir: 'dist/cjs', format: 'cjs', }, - onwarn, + external: ['util', 'fake-indexeddb'], plugins: [ resolve({ browser: false, @@ -19,6 +19,10 @@ export default { extensions: ['.js', '.ts'], }), commonjs(), + modify({ + find: 'const ret = new WebSocket(getStringFromWasm0(arg0, arg1));', + replace: 'const ws = require("ws"); const ret = new ws.WebSocket(getStringFromWasm0(arg0, arg1));', + }), // TODO: `getObject(...).require` seems to generate a warning on Webpack but with Rollup we get a panic since it can't require. // By hard coding the require here, we can workaround that. // Reference: https://github.com/rust-random/getrandom/issues/224 @@ -33,11 +37,3 @@ export default { }), ], }; - -function onwarn(warning) { - // fake-indexeddb has a circular dependency that triggers a warning when rolled up - if (warning.code !== 'CIRCULAR_DEPENDENCY') { - // eslint-disable-next-line no-console - console.error(`(!) ${warning.message}`); - } -} diff --git a/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs b/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs index 7a4af49fc2..a1b3701df4 100644 --- a/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs +++ b/sdk/typescript/packages/nodejs-client/rollup-cjs.config.mjs @@ -12,6 +12,7 @@ export default { format: 'cjs', }, plugins: [ + resolve({ browser: false, extensions: ['.js', '.ts'] }), webWorkerLoader({ targetPlatform: 'node', inline: false }), replace({ values: { @@ -21,7 +22,6 @@ export default { delimiters: ['', ''], preventAssignment: true, }), - resolve({ browser: false, extensions: ['.js', '.ts'] }), wasm({ targetEnv: 'node', maxFileSize: 0 }), typescript({ compilerOptions: { outDir: 'dist/cjs', target: 'es5' }, diff --git a/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs b/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs index b1b40b0a0b..484b55d010 100644 --- a/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs +++ b/sdk/typescript/packages/nodejs-client/rollup-worker.config.mjs @@ -11,6 +11,7 @@ export default { dir: 'dist/cjs', format: 'cjs', }, + external: ['util', 'fake-indexeddb'], plugins: [ resolve({ browser: false, @@ -18,6 +19,11 @@ export default { extensions: ['.js', '.ts'], }), commonjs(), + // TODO: One of the wasm functions calls `new WebSocket` at one point, which we aren't able to polyfill correctly yet. + modify({ + find: 'const ret = new WebSocket(getStringFromWasm0(arg0, arg1));', + replace: 'const ws = require("ws"); const ret = new ws.WebSocket(getStringFromWasm0(arg0, arg1));', + }), // TODO: `getObject(...).require` seems to generate a warning on Webpack but with Rollup we get a panic since it can't require. // By hard coding the require here, we can workaround that. // Reference: https://github.com/rust-random/getrandom/issues/224 diff --git a/sdk/typescript/packages/nodejs-client/src/polyfill.ts b/sdk/typescript/packages/nodejs-client/src/polyfill.ts index 425b49b5fa..3dceb23ba9 100644 --- a/sdk/typescript/packages/nodejs-client/src/polyfill.ts +++ b/sdk/typescript/packages/nodejs-client/src/polyfill.ts @@ -1,6 +1,6 @@ import * as crypto from 'node:crypto'; import * as fs from 'node:fs'; -import ws from 'ws'; +import WebSocket from 'ws'; import { TextDecoder, TextEncoder } from 'node:util'; import { Worker } from 'node:worker_threads'; import { indexedDB } from 'fake-indexeddb'; @@ -10,7 +10,7 @@ import { performance } from 'node:perf_hooks'; (globalThis as any).TextDecoder = TextDecoder; (globalThis as any).fs = fs; (globalThis as any).crypto = crypto; -(globalThis as any).ws = ws; +(globalThis as any).WebSocket = WebSocket; (globalThis as any).Worker = Worker; globalThis.process = process; diff --git a/yarn.lock b/yarn.lock index 3309ce67f6..1602bf8355 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13227,6 +13227,17 @@ jest@^29.5.0: import-local "^3.0.2" jest-cli "^29.7.0" +joi@^17.11.0: + version "17.11.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a" + integrity sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ== + dependencies: + "@hapi/hoek" "^9.0.0" + "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.3" + "@sideway/formula" "^3.0.1" + "@sideway/pinpoint" "^2.0.0" + js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" From 11e383659969e65cda14a2239af484e898f793ed Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Wed, 1 Nov 2023 16:31:02 +0100 Subject: [PATCH 086/142] spellcheck + table format fix --- documentation/docs/src/sdk/rust.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/docs/src/sdk/rust.md b/documentation/docs/src/sdk/rust.md index b62353a9d6..884c71bc9c 100644 --- a/documentation/docs/src/sdk/rust.md +++ b/documentation/docs/src/sdk/rust.md @@ -1,12 +1,12 @@ # Rust SDK -The Rust SDK allows developers building applications in Rust to import and interact with Nym clients as they would any other dependency, instead of running the client as a seperate process on their machine. This makes both developing and running applications much easier, reducing complexity in the development process (not having to restart another client in a seperate console window/tab) and being able to have a single binary for other people to use. +The Rust SDK allows developers building applications in Rust to import and interact with Nym clients as they would any other dependency, instead of running the client as a separate process on their machine. This makes both developing and running applications much easier, reducing complexity in the development process (not having to restart another client in a separate console window/tab) and being able to have a single binary for other people to use. Currently developers can use the Rust SDK to import either websocket client ([`nym-client`](../clients/websocket-client.md)) or [`socks-client`](../clients/socks5-client.md) functionality into their Rust code. ## Development status The SDK is still somewhat a work in progress: interfaces are fairly stable but still may change in subsequent releases. -The `nym-sdk` crate is **not yet availiable via [crates.io](https://crates.io)**. As such, in order to import the crate you must specify the Nym monorepo in your `Cargo.toml` file: +The `nym-sdk` crate is **not yet available via [crates.io](https://crates.io)**. As such, in order to import the crate you must specify the Nym monorepo in your `Cargo.toml` file: ```toml nym-sdk = { git = "https://github.com/nymtech/nym" } @@ -17,10 +17,10 @@ In order to generate the crate docs run `cargo doc --open` from `nym/sdk/rust/ny In the future the SDK will be made up of several components, each of which will allow developers to interact with different parts of Nym's infrastructure. | Component | Functionality | Released | -| --------- | ------------------------------------------------------------------------------------- | -------- | -| Mixnet | Create / load clients & keypairs, subscribe to Mixnet events, send & receive messages | ✔️ | -| Coconut | Create & verify Coconut credentials | 🛠️ | -| Validator | Sign & broadcast Nyx blockchain transactions, query the blockchain | ❌ | +|-----------|---------------------------------------------------------------------------------------|----------| +| Mixnet | Create / load clients & keypairs, subscribe to Mixnet events, send & receive messages | ✔️ | +| Coconut | Create & verify Coconut credentials | 🛠️ | +| Validator | Sign & broadcast Nyx blockchain transactions, query the blockchain | ❌ | The `mixnet` component currently exposes the logic of two clients: the [websocket client](../clients/websocket-client.md), and the [socks](../clients/socks5-client.md) client. From 41caad4dbfe1b7525328eb18739140339306752b Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 1 Nov 2023 16:41:11 +0100 Subject: [PATCH 087/142] Fix the getRandomValue crypto polyfill issue Signed-off-by: Sebastian Martinez --- .../packages/mix-fetch-node/rollup-worker.config.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs index 0912356e47..a471223521 100644 --- a/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs +++ b/sdk/typescript/packages/mix-fetch-node/rollup-worker.config.mjs @@ -27,6 +27,10 @@ export default { // By hard coding the require here, we can workaround that. // Reference: https://github.com/rust-random/getrandom/issues/224 modify({ find: 'getObject(arg0).require(getStringFromWasm0(arg1, arg2));', replace: 'require("crypto");' }), + modify({ + find: 'getObject(arg0).getRandomValues(getObject(arg1));', + replace: 'require("crypto").getRandomValues(getObject(arg1));', + }), wasm({ targetEnv: 'node', maxFileSize: 0, fileName: '[name].wasm' }), typescript({ compilerOptions: { From df010ef3046efb2cc6e8f8d1a63e2829590b554b Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 1 Nov 2023 16:41:50 +0100 Subject: [PATCH 088/142] Update mix-fetch-node to rc.3 Signed-off-by: Sebastian Martinez --- sdk/typescript/packages/mix-fetch-node/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/typescript/packages/mix-fetch-node/package.json b/sdk/typescript/packages/mix-fetch-node/package.json index 2df56711de..0fb709c9db 100644 --- a/sdk/typescript/packages/mix-fetch-node/package.json +++ b/sdk/typescript/packages/mix-fetch-node/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/mix-fetch-node", - "version": "1.2.1-rc.2", + "version": "1.2.1-rc.3", "description": "This package is a drop-in replacement for `fetch` in NodeJS to send HTTP requests over the Nym Mixnet.", "license": "Apache-2.0", "author": "Nym Technologies SA", From 50da1b1606637db5d48b54c5df1f1ab327848667 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:23:28 +0100 Subject: [PATCH 089/142] add wss host setup --- .../operators/src/nodes/gateway-setup.md | 4 +- .../operators/src/nodes/maintenance.md | 160 +++++++++++++++--- 2 files changed, 140 insertions(+), 24 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index c6a85ec792..fc4988c943 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -82,7 +82,7 @@ Additionally #### Add Network requester to an existing Gateway -If you already [upgraded](./maintenance.md#upgrading-your-node) your Gateway to the [newest version](./gateway-setup.md#current-version) and initialised without a Network requester, you can easily change its functionality to Exit Gateway with a command `setup-network-requester`. +If you already [upgraded](./maintenance.md#upgrading-your-node) your Gateway to the [latest version](./gateway-setup.md#current-version) and initialised without a Network requester, you can easily change its functionality to Exit Gateway with a command `setup-network-requester`. See the options: @@ -168,7 +168,7 @@ The `$(curl -4 https://ifconfig.me)` command above returns your IP automatically ### Bonding your gateway ```admonish info -Before you bond and run your Gateway, please make sure the [firewall configuration](./maintenance.md#configure-your-firewall) is setup so your gateway can be reached from the outside. +Before you bond and re-run your Gateway, please make sure the [firewall configuration](./maintenance.md#configure-your-firewall) is setup so your gateway can be reached from the outside. You can also setup WSS on your Gateway, the steps are on the [Maintenance page](./maintenance.md#configure-your-firewall) below. ``` #### Via the Desktop wallet diff --git a/documentation/operators/src/nodes/maintenance.md b/documentation/operators/src/nodes/maintenance.md index 03bb33a0f3..6ee74d59ca 100644 --- a/documentation/operators/src/nodes/maintenance.md +++ b/documentation/operators/src/nodes/maintenance.md @@ -103,36 +103,120 @@ Running the command `df -H` will return the size of the various partitions of yo If the `/dev/sda` partition is almost full, try pruning some of the `.gz` syslog archives and restart your validator process. -## Moving a node -In case of a need to move a node from one machine to another and avoiding to lose the delegation, here are few steps how to do it. +## Run Web Secure Socket (WSS) on Gateway -The following examples transfers a mix node (in case of other nodes, change the `mixnodes` in the command for the `` of your desire. +Now you can run WSS on your Gateway. -* Pause your node process. +### WSS on an existing Gateway -Assuming both machines are remote VPS. +In case you already run a working Gateway and want to add WSS on it, here are the pre-requisites to running WSS on Gateways: -* Make sure your `~/.ssh/.pub` is in both of the machines `~/.ssh/authorized_keys` file -* Create a `mixnodes` folder in the target VPS. Ssh in from your terminal and run: +* You need to use the latest `nym-gateway` binary [version](./gateway-setup.md#current-version) and restart it. +* That will add the relevant fields to update your config. +* These two values will be added and need to be amended in your config.toml: ```sh -# in case none of the nym configs was created previously -mkdir ~/.nym - -#in case no nym mix node was initialized previously -mkdir ~/.nym/mixnodes +clients_wss_port = 0 +hostname = "" ``` -* Move the node data (keys) and config file to the new machine by opening a local terminal (as that one's ssh key is authorized in both of the machines) and running: + +Then you can run this: + ```sh -scp -r -3 @:~/.nym/mixnodes/ @:~/.nym/mixnodes/ -``` -* Re-run init (remember that init doesn't overwrite existing keys) to generate a config with the new listening address etc. -* Change the node smart contract info via the wallet interface. Otherwise the keys will point to the old IP address in the smart contract, and the node will not be able to be connected, and it will fail up-time checks. -* Re-run the node from the new location. +port=$1 // in the example below we will use 9001 +host=$2 = // this would be a domain name registered for your Gateway for example: mainnet-gateway2.nymtech.net + + +sed -i "s/clients_wss_port = 0/clients_wss_port = ${port}/" ${HOME}/.nym/gateways/*/config/config.toml +sed -i "s|hostname = ''|hostname = '${host}'|" ${HOME}/.nym/gateways/*/config/config.toml +``` +The following shell script can be run: + +```sh +#!/bin/bash + +if [ "$#" -ne 2 ]; then + echo "Usage: sudo ./install_run_caddy.sh " + exit 1 +fi + +host=$1 +port_value=$2 + +apt install -y debian-keyring debian-archive-keyring apt-transport-https +apt --fix-broken install + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list + +apt update +apt install caddy + +systemctl enable caddy.service + +cd /etc/caddy + +# check if Caddyfile exists, if it does, remove and insert a new one +if [ -f Caddyfile ]; then + echo "removing caddyfile inserting a new one" + rm -f Caddyfile +fi + +cat <> Caddyfile +${host}:${port_value} { + @websockets { + header Connection *Upgrade* + header Upgrade websocket + } + reverse_proxy @websockets localhost:9000 +} +EOF + +cat Caddyfile + +echo "script completed successfully!" + +systemctl restart caddy.service +echo "have a nice day!" +exit 0 + +``` + +Although your gateway is Now ready to use its `wss_port`, your server may not be ready - the following commands will allow you to set up a properly configured firewall using `ufw`: + +```sh +ufw allow 9001/tcp +``` + +Lastly don't forget to restart your Gateway, now the API will render the WSS details for this gateway: + + +### WSS on a new Gateway + +These steps are for an operator who is setting up a Gateway for the first time and wants to run it with WSS. + +New flags will need to be added to the `init` and `run` command. The `--host` option is still accepted for now, but can and should be replaced with `--listening-address`, this is the IP address which is used for receiving sphinx packets and listening to client data. + +Another flag `--public-ips` is required; it's a comma separated list of IP’s that are announced to the `nym-api`, it is usually the address which is used for bonding. + +If the operator wishes to run WSS, an optional `--hostname` flag is also required, that can be something like `mainnet-gateway2.nymtech.net`. Make sure to enable all necessary [ports](maintenance.md#configure-your-firewall) on the Gateway. + +The gateway will then be accessible on something like: *http://85.159.211.99:8080/api/v1/swagger/index.html* + +Are you seeing something like: *this node attempted to announce an invalid public address: 0.0.0.0.*? + +Please modify `[host.public_ips]` section of your config file stored as `~/.nym/gateways//config/config.toml`. + +If so the flags are going to be slightly different: + +``` +--listening-address "0.0.0.0" --public-ips "$(curl -4 https://ifconfig.me)" +``` + +## Configure your firewall -## VPS Setup and Automation -### Configure your firewall Although your `` is now ready to receive traffic, your server may not be. The following commands will allow you to set up a firewall using `ufw`. ```sh @@ -153,7 +237,7 @@ Finally open your `` p2p port, as well as ports for ssh and ports for verl ```sh # for mix node, gateway and network requester -sudo ufw allow 1789,1790,8000,9000,22/tcp +sudo ufw allow 1789,1790,8000,9000,9001,22/tcp # for validator sudo ufw allow 1317,26656,26660,22,80,443/tcp @@ -166,6 +250,8 @@ sudo ufw status For more information about your node's port configuration, check the [port reference table](./maintenance.md#gateway-port-reference) below. +## VPS Setup and Automation + ### Automating your node with nohup, tmux and systemd Although it’s not totally necessary, it's useful to have the mix node automatically start at system boot time. @@ -398,7 +484,7 @@ Failed to accept incoming connection - Os { code: 24, kind: Other, message: "Too This means that the operating system is preventing network connections from being made. -#### Set the ulimit via `systemd` service file +#### Set the `ulimit` via `systemd` service file > Replace `` variable with `nym-mixnode`, `nym-gateway` or `nym-network-requester` according the node you running on your machine. @@ -481,6 +567,35 @@ username soft nofile 4096 Then reboot your server and restart your mix node. +## Moving a node + +In case of a need to move a node from one machine to another and avoiding to lose the delegation, here are few steps how to do it. + +The following examples transfers a mix node (in case of other nodes, change the `mixnodes` in the command for the `` of your desire. + +* Pause your node process. + +Assuming both machines are remote VPS. + +* Make sure your `~/.ssh/.pub` is in both of the machines `~/.ssh/authorized_keys` file +* Create a `mixnodes` folder in the target VPS. Ssh in from your terminal and run: + +```sh +# in case none of the nym configs was created previously +mkdir ~/.nym + +#in case no nym mix node was initialized previously +mkdir ~/.nym/mixnodes +``` +* Move the node data (keys) and config file to the new machine by opening a local terminal (as that one's ssh key is authorized in both of the machines) and running: +```sh +scp -r -3 @:~/.nym/mixnodes/ @:~/.nym/mixnodes/ +``` +* Re-run init (remember that init doesn't overwrite existing keys) to generate a config with the new listening address etc. +* Change the node smart contract info via the wallet interface. Otherwise the keys will point to the old IP address in the smart contract, and the node will not be able to be connected, and it will fail up-time checks. +* Re-run the node from the new location. + + ## Virtual IPs and hosting via Google & AWS For true internet decentralization we encourage operators to use diverse VPS providers instead of the largest companies offering such services. If for some reasons you have already running AWS or Google and want to setup a `` there, please read the following. @@ -680,6 +795,7 @@ All ``-specific port configuration can be found in `$HOME/.nym// Date: Wed, 1 Nov 2023 17:34:55 +0100 Subject: [PATCH 090/142] new directory structure for rust SDK docs --- documentation/docs/src/SUMMARY.md | 13 +++++- documentation/docs/src/clients/overview.md | 4 +- documentation/docs/src/introduction.md | 2 +- documentation/docs/src/sdk/rust/examples.md | 2 + .../docs/src/sdk/rust/message-helpers.md | 2 + .../docs/src/sdk/rust/message-types.md | 7 +++ documentation/docs/src/sdk/{ => rust}/rust.md | 46 +++++++++---------- .../docs/src/sdk/rust/troubleshooting.md | 3 ++ 8 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 documentation/docs/src/sdk/rust/examples.md create mode 100644 documentation/docs/src/sdk/rust/message-helpers.md create mode 100644 documentation/docs/src/sdk/rust/message-types.md rename documentation/docs/src/sdk/{ => rust}/rust.md (86%) create mode 100644 documentation/docs/src/sdk/rust/troubleshooting.md diff --git a/documentation/docs/src/SUMMARY.md b/documentation/docs/src/SUMMARY.md index 8e4f7c6127..b9dd5a4191 100644 --- a/documentation/docs/src/SUMMARY.md +++ b/documentation/docs/src/SUMMARY.md @@ -29,7 +29,18 @@ # SDK - [Typescript SDK](sdk/typescript.md) -- [Rust SDK](sdk/rust.md) +- [Rust SDK](sdk/rust/rust.md) + - [Message Types](sdk/rust/message-types.md) + - [Message Helpers](sdk/rust/message-helpers.md) + - [Troubleshooting](sdk/rust/troubleshooting.md) + - [Examples](sdk/rust/examples.md) + - [Simple Send](sdk/rust/examples/simple.md) + - [Create and Store Keys](sdk/rust/examples/keys.md) + - [Manual Storage](sdk/rust/examples/storage.md) + - [Use Custom Network Topology](sdk/rust/examples/custom-network.md) + - [Socks Proxy](sdk/rust/examples/socks.md) + - [Split Send and Receive](sdk/rust/examples/split-send.md) + - [Testnet Bandwidth Cred](sdk/rust/examples/credential.md) # Wallet - [Desktop Wallet](wallet/desktop-wallet.md) diff --git a/documentation/docs/src/clients/overview.md b/documentation/docs/src/clients/overview.md index c8d2db1503..b9b5686dbd 100644 --- a/documentation/docs/src/clients/overview.md +++ b/documentation/docs/src/clients/overview.md @@ -25,7 +25,7 @@ You need to choose which one you want incorporate into your app. Which one you u ### The websocket client Your first option is the native websocket client (`nym-client`). This is a compiled program that can run on Linux, Mac OS X, and Windows machines. It can be run as a persistent process on a desktop or server machine. You can connect to it with **any language that supports websockets**. -_Rust developers can import websocket client functionality into their code via the [Rust SDK](../sdk/rust.md)_. +_Rust developers can import websocket client functionality into their code via the [Rust SDK](../sdk/rust/rust.md)_. ### The webassembly client If you're working in JavaScript or Typescript in the browser, or building an [edge computing](https://en.wikipedia.org/wiki/Edge_computing) app, you'll likely want to choose the webassembly client. @@ -39,7 +39,7 @@ The `nym-socks5-client` is useful for allowing existing applications to use the When used as a standalone client, it's less flexible as a way of writing custom applications than the other clients, but able to be used to proxy application traffic through the mixnet without having to make any code changes. -_Rust developers can import socks client functionality into their code via the [Rust SDK](../sdk/rust.md)_. +_Rust developers can import socks client functionality into their code via the [Rust SDK](../sdk/rust/rust.md)_. ## Commonalities between clients All Nym client packages present basically the same capabilities to the privacy application developer. They need to run as a persistent process in order to stay connected and ready to receive any incoming messages from their gateway nodes. They register and authenticate to gateways, and encrypt Sphinx packets. diff --git a/documentation/docs/src/introduction.md b/documentation/docs/src/introduction.md index 9e5912ba07..c9b4c4a7d5 100644 --- a/documentation/docs/src/introduction.md +++ b/documentation/docs/src/introduction.md @@ -15,7 +15,7 @@ If you're specically looking for TypeScript/JavaScript related information such **SDK examples:** * [Typescript SDK](https://sdk.nymtech.net/) -* [Rust SDK](./sdk/rust.md) +* [Rust SDK](sdk/rust/rust.md) **Nyx** * [Interacting with the Nyx chain](./nyx/interacting-with-chain.md) diff --git a/documentation/docs/src/sdk/rust/examples.md b/documentation/docs/src/sdk/rust/examples.md new file mode 100644 index 0000000000..544f7fb418 --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples.md @@ -0,0 +1,2 @@ +# Examples +TODO split examples into subdirectory with their own individual files \ No newline at end of file diff --git a/documentation/docs/src/sdk/rust/message-helpers.md b/documentation/docs/src/sdk/rust/message-helpers.md new file mode 100644 index 0000000000..478e12a7ab --- /dev/null +++ b/documentation/docs/src/sdk/rust/message-helpers.md @@ -0,0 +1,2 @@ +# Message Helpers +TODO pull in dealing with incoming non-empty messages and fn()s from tutorial \ No newline at end of file diff --git a/documentation/docs/src/sdk/rust/message-types.md b/documentation/docs/src/sdk/rust/message-types.md new file mode 100644 index 0000000000..20d959b127 --- /dev/null +++ b/documentation/docs/src/sdk/rust/message-types.md @@ -0,0 +1,7 @@ +# Message Types + +TODO expand! + +There are two methods for sending messages through the mixnet using your client: +* `send_plain_message()` is the most simple: pass the recipient address and the message you wish to send as a string (this was previously `send_str()`). This is a nicer-to-use wrapper around `send_message()`. +* `send_message()` allows you to also define the amount of SURBs to send along with your message (which is sent as bytes). diff --git a/documentation/docs/src/sdk/rust.md b/documentation/docs/src/sdk/rust/rust.md similarity index 86% rename from documentation/docs/src/sdk/rust.md rename to documentation/docs/src/sdk/rust/rust.md index 884c71bc9c..c593b3aa6e 100644 --- a/documentation/docs/src/sdk/rust.md +++ b/documentation/docs/src/sdk/rust/rust.md @@ -1,20 +1,9 @@ # Rust SDK The Rust SDK allows developers building applications in Rust to import and interact with Nym clients as they would any other dependency, instead of running the client as a separate process on their machine. This makes both developing and running applications much easier, reducing complexity in the development process (not having to restart another client in a separate console window/tab) and being able to have a single binary for other people to use. -Currently developers can use the Rust SDK to import either websocket client ([`nym-client`](../clients/websocket-client.md)) or [`socks-client`](../clients/socks5-client.md) functionality into their Rust code. +Currently developers can use the Rust SDK to import either websocket client ([`nym-client`](../../clients/websocket-client.md)) or [`socks-client`](../../clients/socks5-client.md) functionality into their Rust code. -## Development status -The SDK is still somewhat a work in progress: interfaces are fairly stable but still may change in subsequent releases. - -The `nym-sdk` crate is **not yet available via [crates.io](https://crates.io)**. As such, in order to import the crate you must specify the Nym monorepo in your `Cargo.toml` file: - -```toml -nym-sdk = { git = "https://github.com/nymtech/nym" } -``` - -In order to generate the crate docs run `cargo doc --open` from `nym/sdk/rust/nym-sdk/` - -In the future the SDK will be made up of several components, each of which will allow developers to interact with different parts of Nym's infrastructure. +In the future the SDK will be made up of several components, each of which will allow developers to interact with different parts of Nym infrastructure. | Component | Functionality | Released | |-----------|---------------------------------------------------------------------------------------|----------| @@ -22,18 +11,27 @@ In the future the SDK will be made up of several components, each of which will | Coconut | Create & verify Coconut credentials | 🛠️ | | Validator | Sign & broadcast Nyx blockchain transactions, query the blockchain | ❌ | -The `mixnet` component currently exposes the logic of two clients: the [websocket client](../clients/websocket-client.md), and the [socks](../clients/socks5-client.md) client. +The `mixnet` component currently exposes the logic of two clients: the [websocket client](../../clients/websocket-client.md), and the [socks](../../clients/socks5-client.md) client. The `coconut` component is currently being worked on. Right now it exposes logic allowing for the creation of coconut credentials on the Sandbox testnet. +### Development status +The SDK is still somewhat a work in progress: interfaces are fairly stable but still may change in subsequent releases. + +### Installation +The `nym-sdk` crate is **not yet available via [crates.io](https://crates.io)**. As such, in order to import the crate you must specify the Nym monorepo in your `Cargo.toml` file: + +TODO add note on branch import for stability - `master` should be last release +```toml +nym-sdk = { git = "https://github.com/nymtech/nym" } +``` + +### Generate Crate Docs +In order to generate the crate docs run `cargo doc --open` from `nym/sdk/rust/nym-sdk/` + ## Websocket client examples > All the codeblocks below can be found in the `nym-sdk` [examples directory](https://github.com/nymtech/nym/tree/master/sdk/rust/nym-sdk/examples) in the monorepo. Just navigate to `nym/sdk/rust/nym-sdk/examples/` and run the files from there. If you wish to run these outside of the workspace - such as if you want to use one as the basis for your own project - then make sure to import the `sdk`, `tokio`, and `nym_bin_common` crates. -### Different message types -There are two methods for sending messages through the mixnet using your client: -* `send_plain_message()` is the most simple: pass the recipient address and the message you wish to send as a string (this was previously `send_str()`). This is a nicer-to-use wrapper around `send_message()`. -* `send_message()` allows you to also define the amount of SURBs to send along with your message (which is sent as bytes). - ### Simple example Lets look at a very simple example of how you can import and use the websocket client in a piece of Rust code (`examples/simple.rs`): @@ -89,7 +87,7 @@ The number of SURBs is set [here](https://github.com/nymtech/nym/blob/master/sdk {{#include ../../../../sdk/rust/nym-sdk/src/mixnet/client.rs:33}} ``` -You can read more about how SURBs function under the hood [here](../architecture/traffic-flow.md#private-replies-using-surbs). +You can read more about how SURBs function under the hood [here](../../architecture/traffic-flow.md#private-replies-using-surbs). In order to reply to an incoming message using SURBs, you can construct a `recipient` from the `sender_tag` sent along with the message you wish to reply to: @@ -124,7 +122,7 @@ If you need to split the different actions of your client across different tasks ``` ## Socks client example -There is also the option to embed the [`socks5-client`](../clients/socks5-client.md) into your app code (`examples/socks5.rs`): +There is also the option to embed the [`socks5-client`](../../clients/socks5-client.md) into your app code (`examples/socks5.rs`): ```rust,noplayground {{#include ../../../../sdk/rust/nym-sdk/examples/socks5.rs}} @@ -135,10 +133,12 @@ If you are looking at implementing Nym as a transport layer for a crypto wallet ``` ## Coconut credential generation -The following code shows how you can use the SDK to create and use a [credential](../bandwidth-credentials.md) representing paid bandwidth on the Sandbox testnet. +The following code shows how you can use the SDK to create and use a [credential](../../bandwidth-credentials.md) representing paid bandwidth on the Sandbox testnet. ```rust,noplayground {{#include ../../../../sdk/rust/nym-sdk/examples/bandwidth.rs}} ``` -You can read more about Coconut credentials (also referred to as `zk-Nym`) [here](../coconut.md). +You can read more about Coconut credentials (also referred to as `zk-Nym`) [here](../../coconut.md). + + diff --git a/documentation/docs/src/sdk/rust/troubleshooting.md b/documentation/docs/src/sdk/rust/troubleshooting.md new file mode 100644 index 0000000000..c8de2e5e37 --- /dev/null +++ b/documentation/docs/src/sdk/rust/troubleshooting.md @@ -0,0 +1,3 @@ +# Troubleshooting +TODO note on poisson dance and not immediately killing client process +TODO note on listening for non-empty messages and point towards helpers From 8cf0b3adae73040014ab4a2b299b1df3fbb5aac8 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Wed, 1 Nov 2023 21:01:47 +0100 Subject: [PATCH 091/142] first draft of expanded rust stuff --- documentation/docs/src/SUMMARY.md | 2 + documentation/docs/src/sdk/rust/examples.md | 12 +- .../docs/src/sdk/rust/examples/cargo.md | 36 ++++++ .../docs/src/sdk/rust/examples/credential.md | 9 ++ .../src/sdk/rust/examples/custom-network.md | 18 +++ .../docs/src/sdk/rust/examples/keys.md | 28 +++++ .../docs/src/sdk/rust/examples/simple.md | 8 ++ .../docs/src/sdk/rust/examples/socks.md | 10 ++ .../docs/src/sdk/rust/examples/split-send.md | 6 + .../docs/src/sdk/rust/examples/storage.md | 6 + .../docs/src/sdk/rust/examples/surbs.md | 16 +++ .../docs/src/sdk/rust/message-types.md | 4 +- documentation/docs/src/sdk/rust/rust.md | 112 ------------------ 13 files changed, 151 insertions(+), 116 deletions(-) create mode 100644 documentation/docs/src/sdk/rust/examples/cargo.md create mode 100644 documentation/docs/src/sdk/rust/examples/credential.md create mode 100644 documentation/docs/src/sdk/rust/examples/custom-network.md create mode 100644 documentation/docs/src/sdk/rust/examples/keys.md create mode 100644 documentation/docs/src/sdk/rust/examples/simple.md create mode 100644 documentation/docs/src/sdk/rust/examples/socks.md create mode 100644 documentation/docs/src/sdk/rust/examples/split-send.md create mode 100644 documentation/docs/src/sdk/rust/examples/storage.md create mode 100644 documentation/docs/src/sdk/rust/examples/surbs.md diff --git a/documentation/docs/src/SUMMARY.md b/documentation/docs/src/SUMMARY.md index b9dd5a4191..24a625cfb2 100644 --- a/documentation/docs/src/SUMMARY.md +++ b/documentation/docs/src/SUMMARY.md @@ -37,10 +37,12 @@ - [Simple Send](sdk/rust/examples/simple.md) - [Create and Store Keys](sdk/rust/examples/keys.md) - [Manual Storage](sdk/rust/examples/storage.md) + - [Anonymous Replies](sdk/rust/examples/surbs.md) - [Use Custom Network Topology](sdk/rust/examples/custom-network.md) - [Socks Proxy](sdk/rust/examples/socks.md) - [Split Send and Receive](sdk/rust/examples/split-send.md) - [Testnet Bandwidth Cred](sdk/rust/examples/credential.md) + - [Example Cargo file](sdk/rust/examples/cargo.md) # Wallet - [Desktop Wallet](wallet/desktop-wallet.md) diff --git a/documentation/docs/src/sdk/rust/examples.md b/documentation/docs/src/sdk/rust/examples.md index 544f7fb418..e612a7d59d 100644 --- a/documentation/docs/src/sdk/rust/examples.md +++ b/documentation/docs/src/sdk/rust/examples.md @@ -1,2 +1,12 @@ # Examples -TODO split examples into subdirectory with their own individual files \ No newline at end of file + +All the following examples can be found in the `nym-sdk` [examples directory](https://github.com/nymtech/nym/tree/master/sdk/rust/nym-sdk/examples) in the monorepo. Just navigate to `nym/sdk/rust/nym-sdk/examples/` and run the files from there with: + +```sh +cargo run --example +``` + +If you wish to run these outside of the workspace - such as if you want to use one as the basis for your own project - then make sure to import the `sdk`, `tokio`, and `nym_bin_common` crates. + +An example `Cargo.toml` file can be found in the examples folder. + diff --git a/documentation/docs/src/sdk/rust/examples/cargo.md b/documentation/docs/src/sdk/rust/examples/cargo.md new file mode 100644 index 0000000000..4c96e05fc5 --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/cargo.md @@ -0,0 +1,36 @@ +# Example Cargo File +This file imports the basic requirements for running these pieces of example code, and can be used as the basis for your own cargo project. + +TODO versioning check +```toml +[package] +name = "your_app" +version = "x.y.z" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +# Async runtime +tokio = { version = "1.24.1", features = ["rt-multi-thread", "macros"] } +# Used for (de)serialising incoming and outgoing messages +serde = "1.0.152" +serde_json = "1.0.91" +# Nym clients, addressing, etc +nym-sdk = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +nym-sphinx-addressing = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +nym-bin-common = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +nym-sphinx-anonymous-replies = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +# Additional dependencies if you're interacting with Nyx or another Cosmos SDK blockchain +cosmrs = "=0.14.0" +nym-validator-client = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } + +# If you're building an app with a client and server / serivce this might be a useful structure for your repo +[[bin]] +name = "client" +path = "bin/client.rs" + +[[bin]] +name = "service" +path = "bin/service.rs" +``` \ No newline at end of file diff --git a/documentation/docs/src/sdk/rust/examples/credential.md b/documentation/docs/src/sdk/rust/examples/credential.md new file mode 100644 index 0000000000..d0fe29bbbd --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/credential.md @@ -0,0 +1,9 @@ +# Coconut credential generation +The following code shows how you can use the SDK to create and use a [credential](../../bandwidth-credentials.md) representing paid bandwidth on the Sandbox testnet. + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/bandwidth.rs}} +``` + +You can read more about Coconut credentials (also referred to as `zk-Nym`) [here](../../coconut.md). + diff --git a/documentation/docs/src/sdk/rust/examples/custom-network.md b/documentation/docs/src/sdk/rust/examples/custom-network.md new file mode 100644 index 0000000000..0ad226f953 --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/custom-network.md @@ -0,0 +1,18 @@ +# Importing and using a custom network topology +If you want to send traffic through a sub-set of nodes (for instance, ones you control, or a small test setup) when developing, debugging, or performing research, you will need to import these nodes as a custom network topology, instead of grabbing it from the [`Mainnet Nym-API`](https://validator.nymtech.net/api/swagger/index.html) (`examples/custom_topology_provider.rs`). + +There are two ways to do this: + +## Import a custom Nym API endpoint +If you are also running a Validator and Nym API for your network, you can specify that endpoint as such and interact with it as clients usually do (under the hood): + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/custom_topology_provider.rs}} +``` + +## Import a specific topology manually +If you aren't running a Validator and Nym API, and just want to import a specific sub-set of mix nodes, you can simply overwrite the grabbed topology manually: + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/manually_overwrite_topology.rs}} +``` diff --git a/documentation/docs/src/sdk/rust/examples/keys.md b/documentation/docs/src/sdk/rust/examples/keys.md new file mode 100644 index 0000000000..6e2f66d986 --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/keys.md @@ -0,0 +1,28 @@ +# Key Creation and Use +The previous example involves ephemeral keys - if we want to create and then maintain a client identity over time, our code becomes a little more complex as we need to create, store, and conditionally load these keys (`examples/builder_with_storage`): + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/builder_with_storage.rs}} +``` + +As seen in the example above, the `mixnet::MixnetClientBuilder::new()` function handles checking for keys in a storage location, loading them if present, or creating them and storing them if not, making client key management very simple. + +Assuming our client config is stored in `/tmp/mixnet-client`, the following files are generated: +``` +$ tree /tmp/mixnet-client + +mixnet-client +├── ack_key.pem +├── db.sqlite +├── db.sqlite-shm +├── db.sqlite-wal +├── gateway_details.json +├── gateway_shared.pem +├── persistent_reply_store.sqlite +├── private_encryption.pem +├── private_identity.pem +├── public_encryption.pem +└── public_identity.pem + +1 directory, 11 files +``` diff --git a/documentation/docs/src/sdk/rust/examples/simple.md b/documentation/docs/src/sdk/rust/examples/simple.md new file mode 100644 index 0000000000..b3d5f9d268 --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/simple.md @@ -0,0 +1,8 @@ +# Simple Send +Lets look at a very simple example of how you can import and use the websocket client in a piece of Rust code (`examples/simple.rs`). + +Simply importing the `nym_sdk` crate into your project allows you to create a client and send traffic through the mixnet. + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/simple.rs}} +``` diff --git a/documentation/docs/src/sdk/rust/examples/socks.md b/documentation/docs/src/sdk/rust/examples/socks.md new file mode 100644 index 0000000000..5e81780e2e --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/socks.md @@ -0,0 +1,10 @@ +# Socks Proxy +There is also the option to embed the [`socks5-client`](../../clients/socks5-client.md) into your app code (`examples/socks5.rs`): + +```admonish info +If you are looking at implementing Nym as a transport layer for a crypto wallet or desktop app, this is probably the best place to start if they can speak SOCKS5, 4a, or 4. +``` + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/socks5.rs}} +``` diff --git a/documentation/docs/src/sdk/rust/examples/split-send.md b/documentation/docs/src/sdk/rust/examples/split-send.md new file mode 100644 index 0000000000..32db90c17c --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/split-send.md @@ -0,0 +1,6 @@ +# Send and Receive in Different Tasks +If you need to split the different actions of your client across different tasks, you can do so like this: + +```rust, noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/parallel_sending_and_receiving.rs}} +``` diff --git a/documentation/docs/src/sdk/rust/examples/storage.md b/documentation/docs/src/sdk/rust/examples/storage.md new file mode 100644 index 0000000000..4d430f36ac --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/storage.md @@ -0,0 +1,6 @@ +# Manually Handled Storage +If you're integrating mixnet functionality into an existing app and want to integrate saving client configs and keys into your existing storage logic, you can manually perform the actions taken automatically above (`examples/manually_handle_keys_and_config.rs`) + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/manually_handle_storage.rs}} +``` diff --git a/documentation/docs/src/sdk/rust/examples/surbs.md b/documentation/docs/src/sdk/rust/examples/surbs.md new file mode 100644 index 0000000000..013b2e82e4 --- /dev/null +++ b/documentation/docs/src/sdk/rust/examples/surbs.md @@ -0,0 +1,16 @@ +# Anonymous Replies with SURBs (Single Use Reply Blocks) +Both functions used to send messages through the mixnet (`send_message` and `send_plain_message`) send a pre-determined number of SURBs along with their messages by default. + +The number of SURBs is set [here](https://github.com/nymtech/nym/blob/master/sdk/rust/nym-sdk/src/mixnet/client.rs#L33). + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/src/mixnet/client.rs:33}} +``` + +You can read more about how SURBs function under the hood [here](../../architecture/traffic-flow.md#private-replies-using-surbs). + +In order to reply to an incoming message using SURBs, you can construct a `recipient` from the `sender_tag` sent along with the message you wish to reply to: + +```rust,noplayground +{{#include ../../../../sdk/rust/nym-sdk/examples/surb-reply.rs}} +``` diff --git a/documentation/docs/src/sdk/rust/message-types.md b/documentation/docs/src/sdk/rust/message-types.md index 20d959b127..c5adf83377 100644 --- a/documentation/docs/src/sdk/rust/message-types.md +++ b/documentation/docs/src/sdk/rust/message-types.md @@ -1,7 +1,5 @@ # Message Types - -TODO expand! - +[//]: # (TODO expand! ) There are two methods for sending messages through the mixnet using your client: * `send_plain_message()` is the most simple: pass the recipient address and the message you wish to send as a string (this was previously `send_str()`). This is a nicer-to-use wrapper around `send_message()`. * `send_message()` allows you to also define the amount of SURBs to send along with your message (which is sent as bytes). diff --git a/documentation/docs/src/sdk/rust/rust.md b/documentation/docs/src/sdk/rust/rust.md index c593b3aa6e..2ce11c4ed3 100644 --- a/documentation/docs/src/sdk/rust/rust.md +++ b/documentation/docs/src/sdk/rust/rust.md @@ -29,116 +29,4 @@ nym-sdk = { git = "https://github.com/nymtech/nym" } ### Generate Crate Docs In order to generate the crate docs run `cargo doc --open` from `nym/sdk/rust/nym-sdk/` -## Websocket client examples -> All the codeblocks below can be found in the `nym-sdk` [examples directory](https://github.com/nymtech/nym/tree/master/sdk/rust/nym-sdk/examples) in the monorepo. Just navigate to `nym/sdk/rust/nym-sdk/examples/` and run the files from there. If you wish to run these outside of the workspace - such as if you want to use one as the basis for your own project - then make sure to import the `sdk`, `tokio`, and `nym_bin_common` crates. - -### Simple example -Lets look at a very simple example of how you can import and use the websocket client in a piece of Rust code (`examples/simple.rs`): - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/simple.rs}} -``` - -Simply importing the `nym_sdk` crate into your project allows you to create a client and send traffic through the mixnet. - -### Creating and storing keypairs -The example above involves ephemeral keys - if we want to create and then maintain a client identity over time, our code becomes a little more complex as we need to create, store, and conditionally load these keys (`examples/builder_with_storage`): - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/builder_with_storage.rs}} -``` - -As seen in the example above, the `mixnet::MixnetClientBuilder::new()` function handles checking for keys in a storage location, loading them if present, or creating them and storing them if not, making client key management very simple. - -Assuming our client config is stored in `/tmp/mixnet-client`, the following files are generated: -``` -$ tree /tmp/mixnet-client - -mixnet-client -├── ack_key.pem -├── db.sqlite -├── db.sqlite-shm -├── db.sqlite-wal -├── gateway_details.json -├── gateway_shared.pem -├── persistent_reply_store.sqlite -├── private_encryption.pem -├── private_identity.pem -├── public_encryption.pem -└── public_identity.pem - -1 directory, 11 files -``` - -### Manually handling storage -If you're integrating mixnet functionality into an existing app and want to integrate saving client configs and keys into your existing storage logic, you can manually perform the actions taken automatically above (`examples/manually_handle_keys_and_config.rs`) - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/manually_handle_storage.rs}} -``` - -### Anonymous replies with SURBs -Both functions used to send messages through the mixnet (`send_message` and `send_plain_message`) send a pre-determined number of SURBs along with their messages by default. - -The number of SURBs is set [here](https://github.com/nymtech/nym/blob/master/sdk/rust/nym-sdk/src/mixnet/client.rs#L33). - - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/src/mixnet/client.rs:33}} -``` - -You can read more about how SURBs function under the hood [here](../../architecture/traffic-flow.md#private-replies-using-surbs). - -In order to reply to an incoming message using SURBs, you can construct a `recipient` from the `sender_tag` sent along with the message you wish to reply to: - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/surb-reply.rs}} -``` - -### Importing and using a custom network topology -If you want to send traffic through a sub-set of nodes (for instance, ones you control, or a small test setup) when developing, debugging, or performing research, you will need to import these nodes as a custom network topology, instead of grabbing it from the [`Mainnet Nym-API`](https://validator.nymtech.net/api/swagger/index.html) (`examples/custom_topology_provider.rs`). - -There are two ways to do this: - -#### Import a custom Nym API endpoint -If you are also running a Validator and Nym API for your network, you can specify that endpoint as such and interact with it as clients usually do (under the hood): - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/custom_topology_provider.rs}} -``` - -#### Import a specific topology manually -If you aren't running a Validator and Nym API, and just want to import a specific sub-set of mix nodes, you can simply overwrite the grabbed topology manually: - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/manually_overwrite_topology.rs}} -``` - -### Send and receive in different tasks -If you need to split the different actions of your client across different tasks, you can do so like this: - -```rust, noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/parallel_sending_and_receiving.rs}} -``` - -## Socks client example -There is also the option to embed the [`socks5-client`](../../clients/socks5-client.md) into your app code (`examples/socks5.rs`): - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/socks5.rs}} -``` - -```admonish info -If you are looking at implementing Nym as a transport layer for a crypto wallet or desktop app, this is probably the best place to start. -``` - -## Coconut credential generation -The following code shows how you can use the SDK to create and use a [credential](../../bandwidth-credentials.md) representing paid bandwidth on the Sandbox testnet. - -```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/bandwidth.rs}} -``` - -You can read more about Coconut credentials (also referred to as `zk-Nym`) [here](../../coconut.md). - From 1a6334f5484db0ceda09afcd7246ee21ef7e78ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 08:38:26 +0100 Subject: [PATCH 092/142] ci: fix typo in workflow name --- .github/workflows/nightly-nym-connect-desktop-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-nym-connect-desktop-build.yml b/.github/workflows/nightly-nym-connect-desktop-build.yml index a0705c6e1c..1022c342c1 100644 --- a/.github/workflows/nightly-nym-connect-desktop-build.yml +++ b/.github/workflows/nightly-nym-connect-desktop-build.yml @@ -1,4 +1,4 @@ -name: nightly-nym-wallet-build +name: nightly-nym-connect-build on: workflow_dispatch: From e5ef62d7e73a2099e1c0981b2df9e13461cc4971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Wed, 1 Nov 2023 15:51:44 +0100 Subject: [PATCH 093/142] ci: switch nightly-build to github hosted windows-latest --- .github/workflows/nightly-build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 3365011f38..3dcabf2b28 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: rust: [stable, beta] - os: [ubuntu-20.04, windows10, macos-latest] + os: [ubuntu-20.04, windows-latest, macos-latest] runs-on: ${{ matrix.os }} env: CARGO_TERM_COLOR: always @@ -34,7 +34,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v2 - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest' with: repo-token: ${{ secrets.GITHUB_TOKEN }} @@ -56,11 +56,20 @@ jobs: command: build args: --release --workspace --examples - - name: Set debug to false + # To avoid running out of disk space, skip generating debug symbols + - name: Set debug to false (unix) + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest' run: | sed -i.bak 's/\[profile.dev\]/\[profile.dev\]\ndebug = false/' Cargo.toml git diff + - name: Set debug to false (win) + if: matrix.os == 'windows-latest' + shell: pwsh + run: | + (Get-Content Cargo.toml) -replace '\[profile.dev\]', "`$&`ndebug = false" | Set-Content Cargo.toml + git diff + - name: Run unit tests uses: actions-rs/cargo@v1 with: From 48391d22529f519e55adb3691e494c72c635b1b0 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 2 Nov 2023 08:56:13 +0100 Subject: [PATCH 094/142] remove ./ from SUMMARY.md --- documentation/operators/src/SUMMARY.md | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/documentation/operators/src/SUMMARY.md b/documentation/operators/src/SUMMARY.md index b349782408..5d1a7049bb 100644 --- a/documentation/operators/src/SUMMARY.md +++ b/documentation/operators/src/SUMMARY.md @@ -3,32 +3,33 @@ - [Introduction](introduction.md) # Binaries -- [Pre-built Binaries](./binaries/pre-built-binaries.md) - - [Binary Initialisation and Configuration](./binaries/init-and-config.md) -- [Building from Source](./binaries/building-nym.md) + +- [Pre-built Binaries](binaries/pre-built-binaries.md) + - [Binary Initialisation and Configuration](binaries/init-and-config.md) +- [Building from Source](binaries/building-nym.md) # Operators Guides -- [Mixnet Nodes Setup](./nodes/setup-guides.md) - - [Preliminary Steps](./preliminary-steps.md) - - [Mix Node](./nodes/mix-node-setup.md) - - [Gateway](./nodes/gateway-setup.md) - - [Network Requester](./nodes/network-requester-setup.md) -- [Nyx Validator Setup](./nodes/validator-setup.md) -- [Maintenance](./nodes/maintenance.md) -- [Troubleshooting](./nodes/troubleshooting.md) +- [Mixnet Nodes Setup](nodes/setup-guides.md) + - [Preliminary Steps](preliminary-steps.md) + - [Mix Node](nodes/mix-node-setup.md) + - [Gateway](nodes/gateway-setup.md) + - [Network Requester](nodes/network-requester-setup.md) +- [Nyx Validator Setup](nodes/validator-setup.md) +- [Maintenance](nodes/maintenance.md) +- [Troubleshooting](nodes/troubleshooting.md) # FAQ -- [Mix Nodes](./faq/mixnodes-faq.md) -- [Project Smoosh](./faq/smoosh-faq.md) +- [Mix Nodes](faq/mixnodes-faq.md) +- [Project Smoosh](faq/smoosh-faq.md) # Legal Forum -- [Exit Gateway](./legal/exit-gateway.md) - - [Switzerland](./legal/swiss.md) - - [United States](./legal/united-states.md) +- [Exit Gateway](legal/exit-gateway.md) + - [Switzerland](legal/swiss.md) + - [United States](legal/united-states.md) --- # Misc. From 06e656840aa9f36160099c340dcb53f7d5dd9630 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 2 Nov 2023 08:58:56 +0100 Subject: [PATCH 095/142] change syntax *binary* -> --- documentation/operators/src/faq/smoosh-faq.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 99f31661a8..18930857e4 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -24,7 +24,7 @@ As we shared in our blog post article [*What does it take to build the wolds mos Project smoosh will have three steps: 1. Combine the `gateway` and `network-requester` into one binary ✅ -2. Create [Exit Gateway](../legal/exit-gateway.md): Take the gateway binary including network requester combined in \#1 and switch from [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) ✅ +2. Create [Exit Gateway](../legal/exit-gateway.md): Take the gateway binary including network requester combined in \#1 and switch from [`allowed.list`](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a new [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) ✅ 3. Combine all the nodes in the Nym Mixnet into one binary, that is `mixnode`, `gateway` (entry and exit) and `network-requester`. These three steps will be staggered over time - period of several months, and will be implemented one by one with enough time to take in feedback and fix bugs in between. @@ -44,15 +44,15 @@ We created an [entire page](../legal/exit-gateway.md) about the technical and le ### What is the change from allow list to deny list? -The operators running Gateways would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a more permissive setup. An [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. +The operators running Gateways would have to “open” their nodes to a wider range of online services, in a similar fashion to Tor exit relays. The main change will be to expand the original short [`allowed.list`](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) to a more permissive setup. An [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) will constrain the hosts that the users of the Nym VPN and Mixnet can connect to. This will be done in an effort to protect the operators, as Gateways will act both as SOCKS5 Network Requesters, and exit nodes for IP traffic from Nym VPN and Mixnet clients. ### How will the Exit policy be implemented? The progression of exit policy on Gateways will have three steps: -1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [*allowed.list*](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their Gateways (or Network requesters) and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the *config.toml* file. ✅ +1. By default the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) filtering will be disabled and the current [`allowed.list`](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt) filtering is going to continue be used. This is to prevent operators getting surprised by upgrading their Gateways (or Network requesters) and suddenly be widely open to the internet. To enable the new exit policy, operators must use `--with-exit-policy` flag or modify the `config.toml` file. ✅ 2. Relatively soon the exit policy will be part of the Gateway setup by default. To disable this exit policy, operators must use `--disable-exit-policy` flag. -3. Further down the line, it will be the only option. Then the *allowed.list* will be completely removed. +3. Further down the line, it will be the only option. Then the `allowed.list` will be completely removed. Keep in mind this only relates to changes happening on Gateway and Network Requester side. Whether this will be optional or mandatory depends on the chosen [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators). From 0f05f6e1ee19d7d743d4a6aeccced404068b1429 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:06:33 +0100 Subject: [PATCH 096/142] change phrasing --- documentation/operators/src/faq/smoosh-faq.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index 18930857e4..c8c5ee875d 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -58,12 +58,12 @@ Keep in mind this only relates to changes happening on Gateway and Network Reque ### Can I run a mix node only? -Depends which [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators) will be the final one. In case of the first one - yes. In case of the second option, all the nodes will be setup with gateway functionality turned on. +It depends which [design](./smoosh-faq.md#what-does-it-mean-for-nym-nodes-operators) will ultimately be used. In case of the first - yes. In case of the second option, all the nodes will be setup with Exit Gateway functionality turned on. ## Token Economics & Rewards ```admonish info -For any details on Nym token economics and Nym Mixnet reward system, please read [Nym token economics paper](https://nymtech.net/nym-cryptoecon-paper.pdf). +For any specifics on Nym token economics and Nym Mixnet reward system, please read the [Nym token economics paper](https://nymtech.net/nym-cryptoecon-paper.pdf). ``` ### What are the incentives for the node operator? @@ -84,6 +84,8 @@ The nodes which are initialized to run as mix nodes and gateways will be chosen I case we go with \#2, all nodes active in the epoch will be rewarded proportionally according their work. +In either way, Nym will share all the specifics beforehand. + ### How will be the staking and inflation after project Smoosh? We must run tests to see how many users pay. We may need to keep inflation on if not enough people pay to keep high quality gateways on in the early stage of the transition. From ca512ca1ad11b4764ddc6984f4bde89f8c5040e1 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:10:13 +0100 Subject: [PATCH 097/142] change phrasing --- documentation/operators/src/faq/smoosh-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/operators/src/faq/smoosh-faq.md b/documentation/operators/src/faq/smoosh-faq.md index c8c5ee875d..5c8705eb60 100644 --- a/documentation/operators/src/faq/smoosh-faq.md +++ b/documentation/operators/src/faq/smoosh-faq.md @@ -88,7 +88,7 @@ In either way, Nym will share all the specifics beforehand. ### How will be the staking and inflation after project Smoosh? -We must run tests to see how many users pay. We may need to keep inflation on if not enough people pay to keep high quality gateways on in the early stage of the transition. +Nym will run tests to count how much payment comes from the users of the Mixnet and if that covers the reward payments. If not, we may need to keep inflation on to secure incentives for high quality gateways in the early stage of the transition. ### When project smooth will be launched, it would be the mixmining pool that will pay for the gateway rewards based on amount of traffic routed ? From 79d9ddd463637bb764921adebc97247e50f8cab7 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:57:35 +0100 Subject: [PATCH 098/142] add correct cmdrun auto flow --- documentation/operators/src/nodes/gateway-setup.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index fc4988c943..62ea6dbe65 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -111,9 +111,8 @@ Say we have a gateway with `` as `new-gateway`, originally initialised and r ~~~admonish example collapsible=true title="Console output" ``` - - - + + ``` ~~~ From 9b93b30aede57b87f4f248012937f3f3501e05f9 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 2 Nov 2023 10:01:01 +0100 Subject: [PATCH 099/142] add reversed proxy ports --- documentation/operators/src/nodes/maintenance.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/documentation/operators/src/nodes/maintenance.md b/documentation/operators/src/nodes/maintenance.md index 6ee74d59ca..5a08724d61 100644 --- a/documentation/operators/src/nodes/maintenance.md +++ b/documentation/operators/src/nodes/maintenance.md @@ -239,6 +239,9 @@ Finally open your `` p2p port, as well as ports for ssh and ports for verl # for mix node, gateway and network requester sudo ufw allow 1789,1790,8000,9000,9001,22/tcp +# In case of reverse proxy for the Gateway swagger page add: +sudo ufw allow 8080,80/443 + # for validator sudo ufw allow 1317,26656,26660,22,80,443/tcp ``` From c667bb91c776715c66d447ac5b7faa1f594cffd4 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 10:24:03 +0100 Subject: [PATCH 100/142] tweak --- documentation/dev-portal/src/shipyard/challenges-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/dev-portal/src/shipyard/challenges-overview.md b/documentation/dev-portal/src/shipyard/challenges-overview.md index 0a815b2d42..4e02f5a797 100644 --- a/documentation/dev-portal/src/shipyard/challenges-overview.md +++ b/documentation/dev-portal/src/shipyard/challenges-overview.md @@ -8,7 +8,7 @@ The tooling challenge involves creating tooling for users, operators, or develop - Facilitate onboarding new users more easily to staking their Nym, and understanding the pros and cons, as well as finding a good node to stake on. Examples of tools like this: - [ExploreNym dashboard](https://explorenym.net/) -- Show information on a dashboard about the network. NOTE due to the amount of dashboards currently available, we expect a good justification for why / something to set this apart from existing ones e.g. it is presenting information that is not already presented, or it is presented in a different manner, such as a TUI or CLI app instead of a web dashboard - maybe an onion service, or no-JS site for those who do not wish to enable Javascript in their day to day browsing. Examples of tools like this: +- Show information on a dashboard about the network. NOTE due to the amount of dashboards currently available, we expect a good justification for why / something to set this apart from existing ones e.g. it is presenting information that is not already presented, or it is presented in a different manner, such as a TUI or CLI app instead of a web dashboard - maybe an onion service, or no-JS site for those who do not wish to enable Javascript in their day-to-day browsing. Examples of tools like this: - [NTV's node dashboard](https://status.notrustverify.ch/d/CW3L7dVVk/nym-mixnet?orgId=1) - [IsNymUp dashboard](https://isnymup.com/) From 6122817ab6018baf6a2d779f6323603a38f2dde9 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 10:24:25 +0100 Subject: [PATCH 101/142] fixed broken link --- documentation/docs/mdbook-admonish.css | 172 ++++++++++-------- .../docs/src/architecture/traffic-flow.md | 4 +- 2 files changed, 94 insertions(+), 82 deletions(-) diff --git a/documentation/docs/mdbook-admonish.css b/documentation/docs/mdbook-admonish.css index e0a3365532..244bc9ade7 100644 --- a/documentation/docs/mdbook-admonish.css +++ b/documentation/docs/mdbook-admonish.css @@ -1,18 +1,31 @@ @charset "UTF-8"; :root { - --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--note: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--abstract: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--info: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--tip: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--success: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--question: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--warning: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--failure: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--danger: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--bug: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--example: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--quote: + url("data:image/svg+xml;charset=utf-8,"); + --md-details-icon: + url("data:image/svg+xml;charset=utf-8,"); } :is(.admonition) { @@ -62,7 +75,7 @@ a.admonition-anchor-link::before { content: "§"; } -:is(.admonition-title, summary.admonition-title) { +:is(.admonition-title, summary) { position: relative; min-height: 4rem; margin-block: 0; @@ -73,13 +86,13 @@ a.admonition-anchor-link::before { background-color: rgba(68, 138, 255, 0.1); display: flex; } -:is(.admonition-title, summary.admonition-title) p { +:is(.admonition-title, summary) p { margin: 0; } -html :is(.admonition-title, summary.admonition-title):last-child { +html :is(.admonition-title, summary):last-child { margin-bottom: 0; } -:is(.admonition-title, summary.admonition-title)::before { +:is(.admonition-title, summary)::before { position: absolute; top: 0.625em; inset-inline-start: 1.6rem; @@ -94,7 +107,7 @@ html :is(.admonition-title, summary.admonition-title):last-child { -webkit-mask-size: contain; content: ""; } -:is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { +:is(.admonition-title, summary):hover a.admonition-anchor-link { display: initial; } @@ -119,204 +132,204 @@ details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } -:is(.admonition):is(.admonish-note) { +:is(.admonition):is(.note) { border-color: #448aff; } -:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { +:is(.note) > :is(.admonition-title, summary) { background-color: rgba(68, 138, 255, 0.1); } -:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { +:is(.note) > :is(.admonition-title, summary)::before { background-color: #448aff; - mask-image: var(--md-admonition-icon--admonish-note); - -webkit-mask-image: var(--md-admonition-icon--admonish-note); + mask-image: var(--md-admonition-icon--note); + -webkit-mask-image: var(--md-admonition-icon--note); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { +:is(.admonition):is(.abstract, .summary, .tldr) { border-color: #00b0ff; } -:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { background-color: rgba(0, 176, 255, 0.1); } -:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { background-color: #00b0ff; - mask-image: var(--md-admonition-icon--admonish-abstract); - -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); + mask-image: var(--md-admonition-icon--abstract); + -webkit-mask-image: var(--md-admonition-icon--abstract); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-info, .admonish-todo) { +:is(.admonition):is(.info, .todo) { border-color: #00b8d4; } -:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { +:is(.info, .todo) > :is(.admonition-title, summary) { background-color: rgba(0, 184, 212, 0.1); } -:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { +:is(.info, .todo) > :is(.admonition-title, summary)::before { background-color: #00b8d4; - mask-image: var(--md-admonition-icon--admonish-info); - -webkit-mask-image: var(--md-admonition-icon--admonish-info); + mask-image: var(--md-admonition-icon--info); + -webkit-mask-image: var(--md-admonition-icon--info); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { +:is(.admonition):is(.tip, .hint, .important) { border-color: #00bfa5; } -:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { +:is(.tip, .hint, .important) > :is(.admonition-title, summary) { background-color: rgba(0, 191, 165, 0.1); } -:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { +:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { background-color: #00bfa5; - mask-image: var(--md-admonition-icon--admonish-tip); - -webkit-mask-image: var(--md-admonition-icon--admonish-tip); + mask-image: var(--md-admonition-icon--tip); + -webkit-mask-image: var(--md-admonition-icon--tip); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { +:is(.admonition):is(.success, .check, .done) { border-color: #00c853; } -:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { +:is(.success, .check, .done) > :is(.admonition-title, summary) { background-color: rgba(0, 200, 83, 0.1); } -:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { +:is(.success, .check, .done) > :is(.admonition-title, summary)::before { background-color: #00c853; - mask-image: var(--md-admonition-icon--admonish-success); - -webkit-mask-image: var(--md-admonition-icon--admonish-success); + mask-image: var(--md-admonition-icon--success); + -webkit-mask-image: var(--md-admonition-icon--success); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { +:is(.admonition):is(.question, .help, .faq) { border-color: #64dd17; } -:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { +:is(.question, .help, .faq) > :is(.admonition-title, summary) { background-color: rgba(100, 221, 23, 0.1); } -:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { +:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { background-color: #64dd17; - mask-image: var(--md-admonition-icon--admonish-question); - -webkit-mask-image: var(--md-admonition-icon--admonish-question); + mask-image: var(--md-admonition-icon--question); + -webkit-mask-image: var(--md-admonition-icon--question); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { +:is(.admonition):is(.warning, .caution, .attention) { border-color: #ff9100; } -:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { +:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { background-color: rgba(255, 145, 0, 0.1); } -:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { +:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { background-color: #ff9100; - mask-image: var(--md-admonition-icon--admonish-warning); - -webkit-mask-image: var(--md-admonition-icon--admonish-warning); + mask-image: var(--md-admonition-icon--warning); + -webkit-mask-image: var(--md-admonition-icon--warning); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { +:is(.admonition):is(.failure, .fail, .missing) { border-color: #ff5252; } -:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { +:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { background-color: rgba(255, 82, 82, 0.1); } -:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { +:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { background-color: #ff5252; - mask-image: var(--md-admonition-icon--admonish-failure); - -webkit-mask-image: var(--md-admonition-icon--admonish-failure); + mask-image: var(--md-admonition-icon--failure); + -webkit-mask-image: var(--md-admonition-icon--failure); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-danger, .admonish-error) { +:is(.admonition):is(.danger, .error) { border-color: #ff1744; } -:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { +:is(.danger, .error) > :is(.admonition-title, summary) { background-color: rgba(255, 23, 68, 0.1); } -:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { +:is(.danger, .error) > :is(.admonition-title, summary)::before { background-color: #ff1744; - mask-image: var(--md-admonition-icon--admonish-danger); - -webkit-mask-image: var(--md-admonition-icon--admonish-danger); + mask-image: var(--md-admonition-icon--danger); + -webkit-mask-image: var(--md-admonition-icon--danger); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-bug) { +:is(.admonition):is(.bug) { border-color: #f50057; } -:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { +:is(.bug) > :is(.admonition-title, summary) { background-color: rgba(245, 0, 87, 0.1); } -:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { +:is(.bug) > :is(.admonition-title, summary)::before { background-color: #f50057; - mask-image: var(--md-admonition-icon--admonish-bug); - -webkit-mask-image: var(--md-admonition-icon--admonish-bug); + mask-image: var(--md-admonition-icon--bug); + -webkit-mask-image: var(--md-admonition-icon--bug); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-example) { +:is(.admonition):is(.example) { border-color: #7c4dff; } -:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { +:is(.example) > :is(.admonition-title, summary) { background-color: rgba(124, 77, 255, 0.1); } -:is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { +:is(.example) > :is(.admonition-title, summary)::before { background-color: #7c4dff; - mask-image: var(--md-admonition-icon--admonish-example); - -webkit-mask-image: var(--md-admonition-icon--admonish-example); + mask-image: var(--md-admonition-icon--example); + -webkit-mask-image: var(--md-admonition-icon--example); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-quote, .admonish-cite) { +:is(.admonition):is(.quote, .cite) { border-color: #9e9e9e; } -:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { +:is(.quote, .cite) > :is(.admonition-title, summary) { background-color: rgba(158, 158, 158, 0.1); } -:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { +:is(.quote, .cite) > :is(.admonition-title, summary)::before { background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--admonish-quote); - -webkit-mask-image: var(--md-admonition-icon--admonish-quote); + mask-image: var(--md-admonition-icon--quote); + -webkit-mask-image: var(--md-admonition-icon--quote); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; @@ -327,8 +340,7 @@ details[open].admonition > summary.admonition-title::after { background-color: var(--sidebar-bg); } -.ayu :is(.admonition), -.coal :is(.admonition) { +.ayu :is(.admonition), .coal :is(.admonition) { background-color: var(--theme-hover); } diff --git a/documentation/docs/src/architecture/traffic-flow.md b/documentation/docs/src/architecture/traffic-flow.md index 09a2501abd..863a03f577 100644 --- a/documentation/docs/src/architecture/traffic-flow.md +++ b/documentation/docs/src/architecture/traffic-flow.md @@ -5,7 +5,7 @@ When you send data across the internet, it can be recorded by a wide range of ob Even if the content of a network request is encrypted, observers can still see that data was transmitted, its size, frequency of transmission, and gather metadata from unencrypted parts of the data (such as IP routing information). Adversaries may then combine all the leaked information to probabilistically de-anonymize users. -The Nym mixnet provides very strong security guarantees against this sort of surveillance. It _packetizes_ and _mixes_ together IP traffic from many users inside the _mixnet_. +The Nym mixnet provides very strong security guarantees against this sort of surveillance. It _packetises_ and _mixes_ together IP traffic from many users inside the _mixnet_. > If you're into comparisons, the Nym mixnet is conceptually similar to other systems such as Tor, but provides improved protections against end-to-end timing attacks which can de-anonymize users. When Tor was first fielded, in 2002, those kinds of attacks were regarded as science fiction. But the future is now here. @@ -69,7 +69,7 @@ From your Nym client, your encrypted traffic is sent to: Whatever is on the 'other side' of the mixnet from your client, all traffic will travel this way through the mixnet. If you are sending traffic to a service external to Nym (such as a chat application's servers) then your traffic will be sent from the recieving Nym client to an application that will proxy it 'out' of the mixnet to these servers, shielding your metadata from them. P2P (peer-to-peer) applications, unlike the majority of apps, might want to keep all of their traffic entirely 'within' the mixnet, as they don't have to necessarily make outbound network requests to application servers. They would simply have their local application code communicate with their Nym clients, and not forward traffic anywhere 'outside' of the mixnet. ## Acks & Package Retransmission -Whenever a hop is completed, the recieving node will send back an acknowledgement ('ack') so that the sending node knows that the packet was recieved. If it does not recieve an ack after sending, it will resend the packet, as it assumes that the packet was dropped for some reason. This is done under the hood by the binaries themselves, and is never something that developers and node operators have to worry about dealing with themselves. +Whenever a hop is completed, the receiving node will send back an acknowledgement ('ack') so that the sending node knows that the packet was received. If it does not receive an ack after sending, it will resend the packet, as it assumes that the packet was dropped for some reason. This is done under the hood by the binaries themselves, and is never something that developers and node operators have to worry about dealing with themselves. Packet retransmission means that if a client sends 100 packets to a gateway, but only receives an acknowledgement ('ack') for 95 of them, it will resend those 5 packets to the gateway again, to make sure that all packets are received. All nodes in the mixnet support packet retransmission. From aa7dd1ecf96d10f6f90739eea694ea8bee143787 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 10:24:46 +0100 Subject: [PATCH 102/142] admonish plugin upgrade --- documentation/docs/book.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/documentation/docs/book.toml b/documentation/docs/book.toml index 093c35eea0..a11f82cbbd 100644 --- a/documentation/docs/book.toml +++ b/documentation/docs/book.toml @@ -6,6 +6,9 @@ language = "en" multilingual = false # for the moment - ideally work on chinese, brazillian, spanish next src = "src" +[rust] +edition = "2018" + ################# # PREPROCESSORS # ################# @@ -42,7 +45,7 @@ turn-off = true [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` +assets_version = "2.0.1" # do not edit: managed by `mdbook-admonish install` # variables preprocessor: import variables into files # https://gitlab.com/tglman/mdbook-variables/ From bc21fa3a7ed611c4a65f5772861f93de86de190f Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 10:25:10 +0100 Subject: [PATCH 103/142] fix broken imports --- documentation/docs/src/sdk/rust/examples/credential.md | 6 +++--- documentation/docs/src/sdk/rust/examples/custom-network.md | 4 ++-- documentation/docs/src/sdk/rust/examples/keys.md | 2 +- documentation/docs/src/sdk/rust/examples/simple.md | 2 +- documentation/docs/src/sdk/rust/examples/socks.md | 4 ++-- documentation/docs/src/sdk/rust/examples/split-send.md | 2 +- documentation/docs/src/sdk/rust/examples/storage.md | 2 +- documentation/docs/src/sdk/rust/examples/surbs.md | 6 +++--- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/documentation/docs/src/sdk/rust/examples/credential.md b/documentation/docs/src/sdk/rust/examples/credential.md index d0fe29bbbd..e62cfb454a 100644 --- a/documentation/docs/src/sdk/rust/examples/credential.md +++ b/documentation/docs/src/sdk/rust/examples/credential.md @@ -1,9 +1,9 @@ # Coconut credential generation -The following code shows how you can use the SDK to create and use a [credential](../../bandwidth-credentials.md) representing paid bandwidth on the Sandbox testnet. +The following code shows how you can use the SDK to create and use a [credential](../../../bandwidth-credentials.md) representing paid bandwidth on the Sandbox testnet. ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/bandwidth.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/bandwidth.rs}} ``` -You can read more about Coconut credentials (also referred to as `zk-Nym`) [here](../../coconut.md). +You can read more about Coconut credentials (also referred to as `zk-Nym`) [here](../../../coconut.md). diff --git a/documentation/docs/src/sdk/rust/examples/custom-network.md b/documentation/docs/src/sdk/rust/examples/custom-network.md index 0ad226f953..ae0f145a3b 100644 --- a/documentation/docs/src/sdk/rust/examples/custom-network.md +++ b/documentation/docs/src/sdk/rust/examples/custom-network.md @@ -7,12 +7,12 @@ There are two ways to do this: If you are also running a Validator and Nym API for your network, you can specify that endpoint as such and interact with it as clients usually do (under the hood): ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/custom_topology_provider.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/custom_topology_provider.rs}} ``` ## Import a specific topology manually If you aren't running a Validator and Nym API, and just want to import a specific sub-set of mix nodes, you can simply overwrite the grabbed topology manually: ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/manually_overwrite_topology.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/manually_overwrite_topology.rs}} ``` diff --git a/documentation/docs/src/sdk/rust/examples/keys.md b/documentation/docs/src/sdk/rust/examples/keys.md index 6e2f66d986..84746dcfd6 100644 --- a/documentation/docs/src/sdk/rust/examples/keys.md +++ b/documentation/docs/src/sdk/rust/examples/keys.md @@ -2,7 +2,7 @@ The previous example involves ephemeral keys - if we want to create and then maintain a client identity over time, our code becomes a little more complex as we need to create, store, and conditionally load these keys (`examples/builder_with_storage`): ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/builder_with_storage.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/builder_with_storage.rs}} ``` As seen in the example above, the `mixnet::MixnetClientBuilder::new()` function handles checking for keys in a storage location, loading them if present, or creating them and storing them if not, making client key management very simple. diff --git a/documentation/docs/src/sdk/rust/examples/simple.md b/documentation/docs/src/sdk/rust/examples/simple.md index b3d5f9d268..20872ce96b 100644 --- a/documentation/docs/src/sdk/rust/examples/simple.md +++ b/documentation/docs/src/sdk/rust/examples/simple.md @@ -4,5 +4,5 @@ Lets look at a very simple example of how you can import and use the websocket c Simply importing the `nym_sdk` crate into your project allows you to create a client and send traffic through the mixnet. ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/simple.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/simple.rs}} ``` diff --git a/documentation/docs/src/sdk/rust/examples/socks.md b/documentation/docs/src/sdk/rust/examples/socks.md index 5e81780e2e..de027e9011 100644 --- a/documentation/docs/src/sdk/rust/examples/socks.md +++ b/documentation/docs/src/sdk/rust/examples/socks.md @@ -1,10 +1,10 @@ # Socks Proxy -There is also the option to embed the [`socks5-client`](../../clients/socks5-client.md) into your app code (`examples/socks5.rs`): +There is also the option to embed the [`socks5-client`](../../../clients/socks5-client.md) into your app code (`examples/socks5.rs`): ```admonish info If you are looking at implementing Nym as a transport layer for a crypto wallet or desktop app, this is probably the best place to start if they can speak SOCKS5, 4a, or 4. ``` ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/socks5.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/socks5.rs}} ``` diff --git a/documentation/docs/src/sdk/rust/examples/split-send.md b/documentation/docs/src/sdk/rust/examples/split-send.md index 32db90c17c..6b7cf69789 100644 --- a/documentation/docs/src/sdk/rust/examples/split-send.md +++ b/documentation/docs/src/sdk/rust/examples/split-send.md @@ -2,5 +2,5 @@ If you need to split the different actions of your client across different tasks, you can do so like this: ```rust, noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/parallel_sending_and_receiving.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/parallel_sending_and_receiving.rs}} ``` diff --git a/documentation/docs/src/sdk/rust/examples/storage.md b/documentation/docs/src/sdk/rust/examples/storage.md index 4d430f36ac..bc68bca9ff 100644 --- a/documentation/docs/src/sdk/rust/examples/storage.md +++ b/documentation/docs/src/sdk/rust/examples/storage.md @@ -2,5 +2,5 @@ If you're integrating mixnet functionality into an existing app and want to integrate saving client configs and keys into your existing storage logic, you can manually perform the actions taken automatically above (`examples/manually_handle_keys_and_config.rs`) ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/manually_handle_storage.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/manually_handle_storage.rs}} ``` diff --git a/documentation/docs/src/sdk/rust/examples/surbs.md b/documentation/docs/src/sdk/rust/examples/surbs.md index 013b2e82e4..404d74ba1d 100644 --- a/documentation/docs/src/sdk/rust/examples/surbs.md +++ b/documentation/docs/src/sdk/rust/examples/surbs.md @@ -4,13 +4,13 @@ Both functions used to send messages through the mixnet (`send_message` and `sen The number of SURBs is set [here](https://github.com/nymtech/nym/blob/master/sdk/rust/nym-sdk/src/mixnet/client.rs#L33). ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/src/mixnet/client.rs:33}} +{{#include ../../../../../../sdk/rust/nym-sdk/src/mixnet/client.rs:33}} ``` -You can read more about how SURBs function under the hood [here](../../architecture/traffic-flow.md#private-replies-using-surbs). +You can read more about how SURBs function under the hood [here](../../../architecture/traffic-flow.md#private-replies-using-surbs). In order to reply to an incoming message using SURBs, you can construct a `recipient` from the `sender_tag` sent along with the message you wish to reply to: ```rust,noplayground -{{#include ../../../../sdk/rust/nym-sdk/examples/surb-reply.rs}} +{{#include ../../../../../../sdk/rust/nym-sdk/examples/surb-reply.rs}} ``` From 2334109721814bd170e8dc9126b83ac32baebf55 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 10:25:37 +0100 Subject: [PATCH 104/142] tweak --- documentation/docs/src/sdk/rust/examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/src/sdk/rust/examples.md b/documentation/docs/src/sdk/rust/examples.md index e612a7d59d..648c32fa0d 100644 --- a/documentation/docs/src/sdk/rust/examples.md +++ b/documentation/docs/src/sdk/rust/examples.md @@ -8,5 +8,5 @@ cargo run --example If you wish to run these outside of the workspace - such as if you want to use one as the basis for your own project - then make sure to import the `sdk`, `tokio`, and `nym_bin_common` crates. -An example `Cargo.toml` file can be found in the examples folder. +An example `Cargo.toml` file can be found [here](examples/cargo.md). From 9a592df4f0668df24cbb0fef66142d969189d7e7 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 10:26:07 +0100 Subject: [PATCH 105/142] updated import info --- documentation/docs/src/sdk/rust/rust.md | 18 +++++++++++++++++- .../docs/src/sdk/rust/troubleshooting.md | 5 +++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/documentation/docs/src/sdk/rust/rust.md b/documentation/docs/src/sdk/rust/rust.md index 2ce11c4ed3..3062e1ff32 100644 --- a/documentation/docs/src/sdk/rust/rust.md +++ b/documentation/docs/src/sdk/rust/rust.md @@ -21,11 +21,27 @@ The SDK is still somewhat a work in progress: interfaces are fairly stable but s ### Installation The `nym-sdk` crate is **not yet available via [crates.io](https://crates.io)**. As such, in order to import the crate you must specify the Nym monorepo in your `Cargo.toml` file: -TODO add note on branch import for stability - `master` should be last release ```toml nym-sdk = { git = "https://github.com/nymtech/nym" } ``` +By default the above command will import the current `HEAD` of the default branch, which in our case is `develop`. Assuming instead you wish to pull in another branch (e.g. `master` or a particular release) you can specify this like so: + +```toml +# importing HEAD of master branch +nym-sdk = { git = "https://github.com/nymtech/nym", branch = "master" } +# importing HEAD of the third release of 2023, codename 'kinder' +nym-sdk = { git = "https://github.com/nymtech/nym", branch = "release/2023.3-kinder" } +``` + +You can also define a particular git commit to use as your import like so: + +```toml +nym-sdk = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +``` + +Since the `HEAD` of `master` is always the most recent release, we recommend developers use that for their imports, unless they have a reason to pull in a specific historic version of the code. + ### Generate Crate Docs In order to generate the crate docs run `cargo doc --open` from `nym/sdk/rust/nym-sdk/` diff --git a/documentation/docs/src/sdk/rust/troubleshooting.md b/documentation/docs/src/sdk/rust/troubleshooting.md index c8de2e5e37..51676ff6ec 100644 --- a/documentation/docs/src/sdk/rust/troubleshooting.md +++ b/documentation/docs/src/sdk/rust/troubleshooting.md @@ -1,3 +1,4 @@ # Troubleshooting -TODO note on poisson dance and not immediately killing client process -TODO note on listening for non-empty messages and point towards helpers +TODO note on 'task client is being dropped' +TODO note on poisson dance and not immediately killing client process +TODO note on listening for non-empty messages and point towards helpers From 082886ab19e52ea9824d3ca9c1272c67e6d81977 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 10:35:57 +0100 Subject: [PATCH 106/142] removed todo - checked dependency versioning --- documentation/docs/src/sdk/rust/examples/cargo.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/documentation/docs/src/sdk/rust/examples/cargo.md b/documentation/docs/src/sdk/rust/examples/cargo.md index 4c96e05fc5..e425e124ed 100644 --- a/documentation/docs/src/sdk/rust/examples/cargo.md +++ b/documentation/docs/src/sdk/rust/examples/cargo.md @@ -1,7 +1,6 @@ # Example Cargo File This file imports the basic requirements for running these pieces of example code, and can be used as the basis for your own cargo project. -TODO versioning check ```toml [package] name = "your_app" @@ -17,13 +16,13 @@ tokio = { version = "1.24.1", features = ["rt-multi-thread", "macros"] } serde = "1.0.152" serde_json = "1.0.91" # Nym clients, addressing, etc -nym-sdk = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } -nym-sphinx-addressing = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } -nym-bin-common = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } -nym-sphinx-anonymous-replies = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +nym-sdk = { git = "https://github.com/nymtech/nym", branch = "master" } +nym-sphinx-addressing = { git = "https://github.com/nymtech/nym", branch = "master" } +nym-bin-common = { git = "https://github.com/nymtech/nym", branch = "master" } +nym-sphinx-anonymous-replies = { git = "https://github.com/nymtech/nym", branch = "master" } # Additional dependencies if you're interacting with Nyx or another Cosmos SDK blockchain cosmrs = "=0.14.0" -nym-validator-client = { git = "https://github.com/nymtech/nym", rev = "85a7ec9f02ca8262d47eebb6c3b19d832341b55d" } +nym-validator-client = { git = "https://github.com/nymtech/nym", branch = "master" } # If you're building an app with a client and server / serivce this might be a useful structure for your repo [[bin]] From 01605534f7185b7b876e04b96c34abaaaf1a6d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 07:43:45 +0100 Subject: [PATCH 107/142] ci: change nightly-nym-wallet-build to windows-latest --- .github/workflows/nightly-nym-wallet-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-nym-wallet-build.yml b/.github/workflows/nightly-nym-wallet-build.yml index 1cdb70def2..b310ca4fa0 100644 --- a/.github/workflows/nightly-nym-wallet-build.yml +++ b/.github/workflows/nightly-nym-wallet-build.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-latest, windows10] + os: [ubuntu-20.04, macos-latest, windows-latest] runs-on: ${{ matrix.os }} env: CARGO_TERM_COLOR: always From b9088a8ddad1e5589dd0f291a4633c489efc9a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 07:46:32 +0100 Subject: [PATCH 108/142] ci: switch nightly-nym-connect-desktop-build to windows-latest --- .github/workflows/nightly-nym-connect-desktop-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-nym-connect-desktop-build.yml b/.github/workflows/nightly-nym-connect-desktop-build.yml index 1022c342c1..1e4560f979 100644 --- a/.github/workflows/nightly-nym-connect-desktop-build.yml +++ b/.github/workflows/nightly-nym-connect-desktop-build.yml @@ -1,4 +1,4 @@ -name: nightly-nym-connect-build +name: nightly-nym-connect-desktop-build on: workflow_dispatch: @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-latest, windows10] + os: [ubuntu-20.04, macos-latest, windows-latest] runs-on: ${{ matrix.os }} env: CARGO_TERM_COLOR: always From 0173bc748bf717c05c90ca3b809afb206aba49d3 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:56:31 +0100 Subject: [PATCH 109/142] add smoosh link to intro --- documentation/operators/src/legal/exit-gateway.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/operators/src/legal/exit-gateway.md b/documentation/operators/src/legal/exit-gateway.md index 328633faf2..4cac80d7de 100644 --- a/documentation/operators/src/legal/exit-gateway.md +++ b/documentation/operators/src/legal/exit-gateway.md @@ -6,8 +6,9 @@ The entire content of this page is under [Creative Commons Attribution 4.0 Inter This page is a part of Nym Community Legal Forum and its content is composed by shared advices in [Node Operators Legal Forum](https://matrix.to/#/!YfoUFsJjsXbWmijbPG:nymtech.chat?via=nymtech.chat&via=matrix.org) (Matrix chat) as well as though pull requests done by the node operators directly to our [repository](https://github.com/nymtech/nym/tree/develop/documentation/operators/src), reviewed by Nym DevRels. -This document presents an initiative to further support Nym’s mission of allowing privacy for everyone everywhere. This would be achieved with the support of Nym node operators operating gateways and opening these to any online service. Such setup needs a **clear policy**, one which will remain the **same for all operators** running Nym nodes. The [proposed **Exit policy**](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) is a combination of two existing safeguards: [Tor Null ‘deny’ list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). +This document presents an initiative to further support Nym’s mission of allowing privacy for everyone everywhere. This would be achieved with the support of Nym node operators operating Gateways and opening these to any online service. Such setup needs a **clear policy**, one which will remain the **same for all operators** running Nym nodes. The [proposed **Exit policy**](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) is a combination of two existing safeguards: [Tor Null ‘deny’ list](https://tornull.org/) and [Tor reduced policy](https://tornull.org/tor-reduced-reduced-exit-policy.php). +All the technical changes on the side of Nym nodes - ***Project Smoosh** - are described in the [FAQ section](../faq/smoosh-faq.md). ```admonish warning Nym core team cannot provide comprehensive legal advice across all jurisdictions. Knowledge and experience with the legalities are being built up with the help of our counsel and with you, the community of Nym node operators. We encourage Nym node operators to join the operator channels ([Element](https://matrix.to/#/#operators:nymtech.chat), [Discord](https://discord.com/invite/nym), [Telegram](https://t.me/nymchan_help_chat)) to share best practices and experiences. @@ -54,7 +55,7 @@ Previous setup: Running nodes supporting strict SOCKS5 app-based traffic | Financial | | - Low revenues for operators due to limited product traction | -The new setup: Running nodes supporting traffic of any online service (with safeguards in the form of an denylist) +The new setup: Running nodes supporting traffic of any online service (with safeguards in the form of a denylist) | **Dimension** | **Pros** | **Cons** | | :--- | :--- | :--- | From 72553623a76ff15a0b4d040af6dcc90aaee45dab Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 13:10:05 +0100 Subject: [PATCH 110/142] first pass at troubleshooting doc --- .../docs/src/sdk/rust/troubleshooting.md | 117 +++++++++++++++++- 1 file changed, 114 insertions(+), 3 deletions(-) diff --git a/documentation/docs/src/sdk/rust/troubleshooting.md b/documentation/docs/src/sdk/rust/troubleshooting.md index 51676ff6ec..458a4eaab4 100644 --- a/documentation/docs/src/sdk/rust/troubleshooting.md +++ b/documentation/docs/src/sdk/rust/troubleshooting.md @@ -1,4 +1,115 @@ # Troubleshooting -TODO note on 'task client is being dropped' -TODO note on poisson dance and not immediately killing client process -TODO note on listening for non-empty messages and point towards helpers +Below are several common issues or questions you may have. + +If you come across something that isn't explained here, [PRs are welcome](https://github.com/nymtech/nym/issues/new/choose). + +## Verbose `task client is being dropped` logging +### On client shutdown (expected) +If this is happening at the end of your code when disconnecting your client, this is fine; we just have a verbose client! When calling `client.disconnect().await` this is simply informing you that the client is shutting down. + +On client shutdown / disconnect this is to be expected - this can be seen in many of the code examples as well. We use the [`nym_bin_common::logging`](https://github.com/nymtech/nym/blob/develop/common/bin-common/src/logging/mod.rs) import to set logging in our example code. This defaults to `INFO` level. + +If you wish to quickly lower the verbosity of your client process logs when developing you can prepend your command with `RUST_LOG=`. + +If you want to run the `builder.rs` example with only `WARN` level logging and below: + +```sh +cargo run --example builder +``` + +Becomes: + +```sh +RUST_LOG=warn cargo run --example builder +``` + +You can also make the logging _more_ verbose with: + +```sh +RUST_LOG=debug cargo run --example builder +``` + +### Not on client shutdown (unexpected) +If this is happening unexpectedly then you might be shutting your client process down too early. See the [accidentally killing your client process](#accidentally-killing-your-client-process-too-early) below for possible explanations and how to fix this issue. + +[//]: # (TODO note on poisson dance and not immediately killing client process) +## Accidentally killing your client process too early +If you are seeing either of the following errors when trying to run a client, specifically sending a message, then you may be accidentally killing your client process. + +```sh + 2023-11-02T10:31:03.930Z INFO TaskClient-BaseNymClient-real_traffic_controller-ack_control-action_controller > the task client is getting dropped + 2023-11-02T10:31:04.625Z INFO TaskClient-BaseNymClient-received_messages_buffer-request_receiver > the task client is getting dropped + 2023-11-02T10:31:04.626Z DEBUG nym_client_core::client::real_messages_control::acknowledgement_control::input_message_listener > InputMessageListener: Exiting + 2023-11-02T10:31:04.626Z INFO TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > the task client is getting dropped + 2023-11-02T10:31:04.626Z INFO TaskClient-BaseNymClient-real_traffic_controller-reply_control > the task client is getting dropped + 2023-11-02T10:31:04.626Z DEBUG nym_client_core::client::real_messages_control > The reply controller has finished execution! + 2023-11-02T10:31:04.626Z DEBUG nym_client_core::client::real_messages_control::acknowledgement_control > The input listener has finished execution! + 2023-11-02T10:31:04.626Z INFO nym_task::manager > All registered tasks succesfully shutdown +``` + +```sh + 2023-11-02T11:22:08.408Z ERROR TaskClient-BaseNymClient-topology_refresher > Assuming this means we should shutdown... + 2023-11-02T11:22:08.408Z ERROR TaskClient-BaseNymClient-mix_traffic_controller > Polling shutdown failed: channel closed + 2023-11-02T11:22:08.408Z INFO TaskClient-BaseNymClient-gateway_transceiver-child > the task client is getting dropped + 2023-11-02T11:22:08.408Z ERROR TaskClient-BaseNymClient-mix_traffic_controller > Assuming this means we should shutdown... +thread 'tokio-runtime-worker' panicked at 'action control task has died: TrySendError { kind: Disconnected }', /home/.local/share/cargo/git/checkouts/nym-fbd2f6ea2e760da9/a800cba/common/client-core/src/client/real_messages_control/message_handler.rs:634:14 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + 2023-11-02T11:22:08.477Z INFO TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > the task client is getting dropped + 2023-11-02T11:22:08.477Z ERROR TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > Polling shutdown failed: channel closed + 2023-11-02T11:22:08.477Z ERROR TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > Assuming this means we should shutdown... +``` + +Using the following piece of code as an example: + +```rust +use nym_sdk::mixnet::{MixnetClient, MixnetMessageSender, Recipient}; +use clap::Parser; + +#[derive(Debug, Clone, Parser)] +enum Opts { + Client { + recipient: Recipient + } +} + +#[tokio::main] +async fn main() { + let opts: Opts = Parser::parse(); + nym_bin_common::logging::setup_logging(); + + let mut nym_client = MixnetClient::connect_new().await.expect("Could not build Nym client"); + + match opts { + Opts::Client { recipient } => { + nym_client.send_plain_message(recipient, "some message string").await.expect("send failed"); + } + } +} +``` + +This is a simplified snippet of code for sending a simple hardcoded message with the following command: + +```sh +cargo run client +``` + +You might assume that `send`-ing your message would _just work_ as `nym_client.send_plain_message()` is an async function; you might expect that the client will block until the message is actually sent into the mixnet, then shutdown. + +However, this is not true. + +**This will only block until the message is put into client's internal queue**. Therefore in the above example, the client is being shut down before the message is _actually sent to the mixnet_; after being placed in the client's internal queue, there is still work to be done under the hood, such as route encrypting the message and placing it amongst the stream of cover traffic. + +The simple solution? Make sure the program/client stays active, either by calling `sleep`, or listening out for new messages. As sending a one-shot message without listening out for a response is likely not what you'll be doing, then you will be then awaiting a response (see the [message helpers page](message-helpers.md) for an example of this). + +Furthermore, you should always **manually disconnect your client** with `client.disconnect().await` as seen in the code examples. This is important as your client is writing to a local DB and dealing with SURB storage. + +## Client receives empty messages when listening for response +If you are sending out a message, it makes sense for your client to then listen out for incoming messages; this would probably be the reply you get from the service you've sent a message to. + +You might however be receiving messages without data attached to them / empty payloads. This is most likely because your client is receiving a message containing a [SURB request](https://nymtech.net/docs/architecture/traffic-flow.html#private-replies-using-surbs) - a SURB requesting more SURB packets to be sent to the service, in order for them to have enough packets (with a big enough overall payload) to split the entire response to your initial request across. + +Whether the `data` of a SURB request being empty is a feature or a bug is to be decided - there is some discussion surrounding whether we can use SURB requests to send additional data to streamline the process of sending large replies across the mixnet. + +You can find a few helper functions [here](message-helpers.md) to help deal with this issue in the meantime. + +> If you can think of a more succinct or different way of handling this do reach out - we're happy to hear other opinions \ No newline at end of file From a4bb4ec6c52c78ddacbefbaf2b0b9e333df01198 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 13:19:54 +0100 Subject: [PATCH 111/142] first pass at helper messages --- documentation/docs/src/sdk/rust/message-helpers.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/documentation/docs/src/sdk/rust/message-helpers.md b/documentation/docs/src/sdk/rust/message-helpers.md index 478e12a7ab..d783cd2e25 100644 --- a/documentation/docs/src/sdk/rust/message-helpers.md +++ b/documentation/docs/src/sdk/rust/message-helpers.md @@ -1,2 +1,10 @@ # Message Helpers -TODO pull in dealing with incoming non-empty messages and fn()s from tutorial \ No newline at end of file + +## Handling incoming messages +As seen in the [Chain querier tutorial](https://github.com/nymtech/developer-tutorials/blob/0130ee5a61cd6801bdcfc84608b2a520b5392714/rust/chain-query-service/) when listening out for a response to a sent message (e.g. if you have sent a request to a service, and are awaiting the response) you will want to await [non-empty messages (more info on this here)](troubleshooting.md#client-receives-empty-messages-when-listening-for-response). This can be done with something like the helper functions [here](https://github.com/nymtech/developer-tutorials/blob/0130ee5a61cd6801bdcfc84608b2a520b5392714/rust/chain-query-service/src/lib.rs#L71). + +## Iterating over incoming messages +It is recommended to use `nym_client.next().await` over `nym_client.wait_for_messages().await` as the latter will return one message at a time which will probably be easier to deal with. See the [parallel send and receive example](https://github.com/nymtech/nym/blob/2993e85c7a17bd5b68171751a48b731b2394ee03/sdk/rust/nym-sdk/examples/parallel_sending_and_receiving.rs#L23-L25) for an example. + +## Remember to disconnect your client +You should always **manually disconnect your client** with `client.disconnect().await` as seen in the code examples. This is important as your client is writing to a local DB and dealing with SURB storage. From 6e9eb26e2775df7e221efbf075363425a1dda52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Walther?= Date: Thu, 2 Nov 2023 14:07:45 +0100 Subject: [PATCH 112/142] Github Actions: fix cd-docs --- .github/workflows/cd-docs.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/cd-docs.yml b/.github/workflows/cd-docs.yml index df0ae9dc66..1cf2025534 100644 --- a/.github/workflows/cd-docs.yml +++ b/.github/workflows/cd-docs.yml @@ -51,18 +51,6 @@ jobs: TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET }}/ EXCLUDE: "/node_modules/" - - name: Deploy branch master to prod - if: github.ref == 'refs/heads/master' - uses: easingthemes/ssh-deploy@main - env: - SSH_PRIVATE_KEY: ${{ secrets.CD_WWW_SSH_PRIVATE_KEY }} - ARGS: "-rltgoDzvO --delete" - SOURCE: "dist/docs/" - REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_PROD }} - REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }} - TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET }}/ - EXCLUDE: "/node_modules/" - - name: Post process run: cd documentation && ./post_process.sh continue-on-error: false From c4be55e82467b13286d5e643363f5bed0de6ad4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Walther?= Date: Thu, 2 Nov 2023 14:52:30 +0100 Subject: [PATCH 113/142] Github actions: remove deployment to website-dev --- .github/workflows/cd-docs.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/cd-docs.yml b/.github/workflows/cd-docs.yml index 1cf2025534..a5169a3f26 100644 --- a/.github/workflows/cd-docs.yml +++ b/.github/workflows/cd-docs.yml @@ -39,18 +39,6 @@ jobs: run: cd documentation && ./build_all_to_dist.sh continue-on-error: false - - name: Deploy branch master to dev - continue-on-error: true - uses: easingthemes/ssh-deploy@main - env: - SSH_PRIVATE_KEY: ${{ secrets.CD_WWW_SSH_PRIVATE_KEY }} - ARGS: "-rltgoDzvO --delete" - SOURCE: "dist/docs/" - REMOTE_HOST: ${{ secrets.CD_WWW_REMOTE_HOST_DEV }} - REMOTE_USER: ${{ secrets.CD_WWW_REMOTE_USER }} - TARGET: ${{ secrets.CD_WWW_REMOTE_TARGET }}/ - EXCLUDE: "/node_modules/" - - name: Post process run: cd documentation && ./post_process.sh continue-on-error: false From 52736881db211e6fe723392cf4d68bdd1f1de248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 16:36:40 +0100 Subject: [PATCH 114/142] Update Cargo.lock --- nym-wallet/Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index ec32ea6a33..77fbfe47eb 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -3706,7 +3706,7 @@ dependencies = [ [[package]] name = "nym_wallet" -version = "1.2.9" +version = "1.2.10" dependencies = [ "async-trait", "base64 0.13.1", From bcfea21501392732a44bcc6537d6a538ae717553 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 17:13:37 +0100 Subject: [PATCH 115/142] upgraded mdbook-admonish version --- .github/workflows/ci-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index b503516e70..780e82bdb1 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -32,7 +32,7 @@ jobs: - name: Install mdbook plugins run: | cargo install --vers "=0.2.2" mdbook-variables && cargo install \ - --vers "^1.8.0" mdbook-admonish --force && cargo install --vers \ + --vers "^3.0.0" mdbook-admonish --force && cargo install --vers \ "^0.1.2" mdbook-last-changed && cargo install --vers "^0.1.2" mdbook-theme \ && cargo install --vers "^0.7.7" mdbook-linkcheck \ # && cd documentation \ From e9a0c6f8d0011caa0c29b3fd1e0f7d0ade02f555 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 17:13:55 +0100 Subject: [PATCH 116/142] added code example to helpers --- .../docs/src/sdk/rust/message-helpers.md | 62 ++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/documentation/docs/src/sdk/rust/message-helpers.md b/documentation/docs/src/sdk/rust/message-helpers.md index d783cd2e25..e7ce201fa7 100644 --- a/documentation/docs/src/sdk/rust/message-helpers.md +++ b/documentation/docs/src/sdk/rust/message-helpers.md @@ -1,7 +1,67 @@ # Message Helpers ## Handling incoming messages -As seen in the [Chain querier tutorial](https://github.com/nymtech/developer-tutorials/blob/0130ee5a61cd6801bdcfc84608b2a520b5392714/rust/chain-query-service/) when listening out for a response to a sent message (e.g. if you have sent a request to a service, and are awaiting the response) you will want to await [non-empty messages (more info on this here)](troubleshooting.md#client-receives-empty-messages-when-listening-for-response). This can be done with something like the helper functions [here](https://github.com/nymtech/developer-tutorials/blob/0130ee5a61cd6801bdcfc84608b2a520b5392714/rust/chain-query-service/src/lib.rs#L71). +As seen in the [Chain querier tutorial](https://github.com/nymtech/developer-tutorials/blob/0130ee5a61cd6801bdcfc84608b2a520b5392714/rust/chain-query-service/) when listening out for a response to a sent message (e.g. if you have sent a request to a service, and are awaiting the response) you will want to await [non-empty messages (if you don't know why, read the info on this here)](troubleshooting.md#client-receives-empty-messages-when-listening-for-response). This can be done with something like the helper functions [here](https://github.com/nymtech/developer-tutorials/blob/0130ee5a61cd6801bdcfc84608b2a520b5392714/rust/chain-query-service/src/lib.rs#L71): + +```rust +use nym_sdk::mixnet::ReconstructedMessage; + +pub async fn wait_for_non_empty_message( + client: &mut MixnetClient, +) -> anyhow::Result { + while let Some(mut new_message) = client.wait_for_messages().await { + if !new_message.is_empty() { + return Ok(new_message.pop().unwrap()); + } + } + + bail!("did not receive any non-empty message") +} + +pub fn handle_response(message: ReconstructedMessage) -> anyhow::Result { + ResponseTypes::try_deserialize(message.message) +} + +// Note here that the only difference between handling a request and a response +// is that a request will have a sender_tag to parse. +// +// This is used for anonymous replies with SURBs. +pub fn handle_request( + message: ReconstructedMessage, +) -> anyhow::Result<(RequestTypes, Option)> { + let request = RequestTypes::try_deserialize(message.message)?; + Ok((request, message.sender_tag)) +} +``` + +The above helper functions are used as such by the client in tutorial example: it sends a message to the service (what the message is isn't important - just that your client has sent a message _somewhere_ and you are awaiting a response), waits for a _non_empty_ message, then handles it (then logs it - but you can do whatever you want, parse it, etc): + +```rust +// [snip] + +// Send serialised request to service via mixnet what is await-ed here is +// placing the message in the client's message queue, NOT the sending itself. +let _ = client + .send_message(sp_address, message.serialize(), Default::default()) + .await; + +// Await a non-empty message +let received = wait_for_non_empty_message(client).await?; + +// Handle the response received (the non-empty message awaited above) +let sp_response = handle_response(received)?; + +// Match JSON -> ResponseType +let res = match sp_response { + crate::ResponseTypes::Balance(response) => { + println!("{:#?}", response); + response.balance + } +}; + +// [snip] +``` +([repo code on Github here](https://github.com/nymtech/developer-tutorials/blob/0130ee5a61cd6801bdcfc84608b2a520b5392714/rust/chain-query-service/src/client.rs#L19)) ## Iterating over incoming messages It is recommended to use `nym_client.next().await` over `nym_client.wait_for_messages().await` as the latter will return one message at a time which will probably be easier to deal with. See the [parallel send and receive example](https://github.com/nymtech/nym/blob/2993e85c7a17bd5b68171751a48b731b2394ee03/sdk/rust/nym-sdk/examples/parallel_sending_and_receiving.rs#L23-L25) for an example. From a9c40e76dc05be26d3b905eb63806146be1ddbc2 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 17:17:06 +0100 Subject: [PATCH 117/142] revert previous --- .github/workflows/ci-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index 780e82bdb1..b503516e70 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -32,7 +32,7 @@ jobs: - name: Install mdbook plugins run: | cargo install --vers "=0.2.2" mdbook-variables && cargo install \ - --vers "^3.0.0" mdbook-admonish --force && cargo install --vers \ + --vers "^1.8.0" mdbook-admonish --force && cargo install --vers \ "^0.1.2" mdbook-last-changed && cargo install --vers "^0.1.2" mdbook-theme \ && cargo install --vers "^0.7.7" mdbook-linkcheck \ # && cd documentation \ From 60912ff8efd017a9ddba0797f82ee114dcc0c099 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Thu, 2 Nov 2023 18:19:34 +0100 Subject: [PATCH 118/142] Fix sdk publish action (#4088) * fix: sdk publish script The bash implementation used in the GitHub CI runner seems to have an issue with incrementing a variable with `(( COUNTER++ ))` while `(( COUNTER=+1 ))` works fine. * Add more sdk packages to workspace and normalize build sdk scripts * Disable workspaces in npm publish sdk Signed-off-by: Sebastian Martinez * Continue publishing even when it fails Signed-off-by: Sebastian Martinez --------- Signed-off-by: Sebastian Martinez --- package.json | 7 ++++- sdk/typescript/scripts/publish.sh | 44 ++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cd357e15a0..bd928a454e 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,11 @@ "sdk/typescript/packages/validator-client", "sdk/typescript/packages/mix-fetch-node", "sdk/typescript/packages/nodejs-client", + "sdk/typescript/packages/node-tester", + "sdk/typescript/packages/sdk-react", + "sdk/typescript/packages/mix-fetch", + "sdk/typescript/packages/sdk", + "sdk/typescript/codegen/contract-clients", "ts-packages/*", "nym-wallet", "nym-connect/**", @@ -36,7 +41,7 @@ "prebuild:ci": "yarn dev:on && yarn", "build:ci": "run-s build:types build:packages build:wasm build:ci:sdk", "postbuild:ci": "yarn dev:off", - "build:ci:sdk": "lerna run --scope '{@nymproject/sdk,@nymproject/node-tester,@nymproject/sdk-react,@nymproject/mix-fetch,@nymproject/nodejs-client,@nymproject/mix-fetch-node}' build --stream", + "build:ci:sdk": "lerna run --scope '{@nymproject/sdk,@nymproject/node-tester,@nymproject/contract-clients,@nymproject/sdk-react,@nymproject/mix-fetch,@nymproject/nodejs-client,@nymproject/mix-fetch-node}' build --stream", "docs:prod:build": "run-s docs:prod:build:ws", "docs:prod:build:ws": "lerna run docs:prod:build --stream", "sdk:build": "./sdk/typescript/scripts/build-prod-sdk.sh", diff --git a/sdk/typescript/scripts/publish.sh b/sdk/typescript/scripts/publish.sh index dabea53c6c..3c59953776 100755 --- a/sdk/typescript/scripts/publish.sh +++ b/sdk/typescript/scripts/publish.sh @@ -10,9 +10,46 @@ set -o pipefail cd dist +#packages=( +#chat-app/parcel +#chat-app/plain-html +#chat-app/react-webpack-with-theme-example +#chrome-extension +#firefox-extension +#node-tester/parcel +#node-tester/plain-html +#node-tester/react +#react/mui-theme +#react/sdk-react +#) packages=( +"wasm/client" +"wasm/mix-fetch" +"wasm/node-tester" +"wasm/extension-storage" + +"node/wasm/client" +"node/wasm/mix-fetch" + +"ts/sdk/mix-fetch/cjs" +"ts/sdk/mix-fetch/cjs-full-fat" +"ts/sdk/mix-fetch/esm" +"ts/sdk/mix-fetch/esm-full-fat" + "ts/sdk/nodejs-client/cjs" "ts/sdk/mix-fetch-node/cjs" + +"ts/sdk/node-tester/cjs" +"ts/sdk/node-tester/cjs-full-fat" +"ts/sdk/node-tester/esm" +"ts/sdk/node-tester/esm-full-fat" + +"ts/sdk/sdk/cjs" +"ts/sdk/sdk/cjs-full-fat" +"ts/sdk/sdk/esm" +"ts/sdk/sdk/esm-full-fat" + +"ts/sdk/contract-clients" ) pushd () { @@ -39,14 +76,13 @@ COUNTER=0 for item in "${packages[@]}" do - (( COUNTER++ )) + (( COUNTER+=1 )) pushd "$item" echo "🚀 Publishing $item... (${COUNTER} of ${#packages[@]})" - jq -r '. | .name + " " +.version' < package.json - npm publish --access=public --verbose + cat package.json | jq -r '. | .name + " " +.version' + npm publish --access=public --verbose --workspaces false || true popd echo "" done echo "" echo "✅ Done" - From 554010b5cb3ee79bdcb42593eeb4aadc188f9d5a Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Thu, 2 Nov 2023 19:17:35 +0000 Subject: [PATCH 119/142] Add NodeJS mixFetch to version bump tool --- tools/internal/sdk-version-bump/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/internal/sdk-version-bump/src/main.rs b/tools/internal/sdk-version-bump/src/main.rs index e6472ca676..31528a3c4f 100644 --- a/tools/internal/sdk-version-bump/src/main.rs +++ b/tools/internal/sdk-version-bump/src/main.rs @@ -186,6 +186,7 @@ fn initialise_internal_packages>(root: P) -> InternalPackages { packages.register_json("sdk/typescript/examples/node-tester/plain-html"); packages.register_json("sdk/typescript/examples/node-tester/react"); packages.register_json("sdk/typescript/packages/mix-fetch"); + packages.register_json("sdk/typescript/packages/mix-fetch-node"); packages.register_json("sdk/typescript/packages/mix-fetch/internal-dev"); packages.register_json("sdk/typescript/packages/mix-fetch/internal-dev/parcel"); packages.register_json("sdk/typescript/packages/node-tester"); From 1582c13f622303a8da843c9baf5b4ea45c523729 Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Thu, 2 Nov 2023 19:24:53 +0000 Subject: [PATCH 120/142] Update SDK contract client --- sdk/typescript/codegen/contract-clients/package.json | 4 ++-- .../codegen/contract-clients/src/NameService.client.ts | 2 +- .../codegen/contract-clients/src/NameService.types.ts | 7 ++++++- tools/internal/sdk-version-bump/src/main.rs | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/typescript/codegen/contract-clients/package.json b/sdk/typescript/codegen/contract-clients/package.json index 856942d621..49e3d1fc99 100644 --- a/sdk/typescript/codegen/contract-clients/package.json +++ b/sdk/typescript/codegen/contract-clients/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/contract-clients", - "version": "1.2.0", + "version": "1.2.1", "description": "A client for all Nym smart contracts", "license": "Apache-2.0", "author": "Nym Technologies SA", @@ -27,4 +27,4 @@ }, "private": false, "types": "./dist/index.d.ts" -} \ No newline at end of file +} diff --git a/sdk/typescript/codegen/contract-clients/src/NameService.client.ts b/sdk/typescript/codegen/contract-clients/src/NameService.client.ts index 5f5444f0fc..a92b351fb1 100644 --- a/sdk/typescript/codegen/contract-clients/src/NameService.client.ts +++ b/sdk/typescript/codegen/contract-clients/src/NameService.client.ts @@ -6,8 +6,8 @@ import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate"; import { StdFee } from "@cosmjs/amino"; -import { Uint128, InstantiateMsg, Coin, ExecuteMsg, Address, NymName, MessageSignature, NameDetails, QueryMsg, MigrateMsg, Addr, PagedNamesListResponse, RegisteredName, NamesListResponse, ConfigResponse, ContractVersion, ContractBuildInformation, Uint32 } from "./NameService.types"; import { GetCw2ContractVersionResponse } from './types'; +import { Uint128, InstantiateMsg, Coin, ExecuteMsg, Address, NymName, MessageSignature, NameDetails, NymAddressInner, QueryMsg, MigrateMsg, Addr, PagedNamesListResponse, RegisteredName, NamesListResponse, ConfigResponse, ContractVersion, ContractBuildInformation, Uint32 } from "./NameService.types"; export interface NameServiceReadOnlyInterface { contractAddress: string; nameId: ({ diff --git a/sdk/typescript/codegen/contract-clients/src/NameService.types.ts b/sdk/typescript/codegen/contract-clients/src/NameService.types.ts index c9d80b5936..e80cdfc843 100644 --- a/sdk/typescript/codegen/contract-clients/src/NameService.types.ts +++ b/sdk/typescript/codegen/contract-clients/src/NameService.types.ts @@ -32,7 +32,7 @@ export type ExecuteMsg = { }; }; export type Address = { - nym_address: string; + nym_address: NymAddressInner; }; export type NymName = string; export type MessageSignature = number[]; @@ -41,6 +41,11 @@ export interface NameDetails { identity_key: string; name: NymName; } +export interface NymAddressInner { + client_enc: string; + client_id: string; + gateway_id: string; +} export type QueryMsg = { name_id: { name_id: number; diff --git a/tools/internal/sdk-version-bump/src/main.rs b/tools/internal/sdk-version-bump/src/main.rs index 31528a3c4f..85c82c1d3c 100644 --- a/tools/internal/sdk-version-bump/src/main.rs +++ b/tools/internal/sdk-version-bump/src/main.rs @@ -193,6 +193,7 @@ fn initialise_internal_packages>(root: P) -> InternalPackages { packages.register_json("sdk/typescript/packages/nodejs-client"); packages.register_json("sdk/typescript/packages/sdk"); packages.register_json("sdk/typescript/packages/sdk-react"); + packages.register_json("sdk/typescript/codegen/contract-clients"); // dependencies that will have their versions adjusted in the above packages packages.register_known_js_dependency("@nymproject/mix-fetch"); From d64613006cbb502502a9e92f66ecc0a6f352db15 Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Thu, 2 Nov 2023 19:29:02 +0000 Subject: [PATCH 121/142] Release Typescript SDK to version 1.2.1 --- Cargo.lock | 10 ++--- nym-browser-extension/storage/Cargo.toml | 2 +- sdk/typescript/docs/package.json | 12 +++--- .../examples/chat-app/parcel/package.json | 33 ++++++++-------- .../examples/chat-app/plain-html/package.json | 31 +++++++-------- .../package.json | 38 +++++++++---------- .../examples/chrome-extension/package.json | 15 ++++---- .../examples/firefox-extension/package.json | 21 +++++----- .../examples/mix-fetch/browser/package.json | 21 +++++----- .../examples/node-tester/parcel/package.json | 33 ++++++++-------- .../node-tester/plain-html/package.json | 31 +++++++-------- .../examples/node-tester/react/package.json | 13 ++++--- .../packages/mix-fetch-node/package.json | 4 +- .../mix-fetch/internal-dev/package.json | 17 +++++---- .../internal-dev/parcel/package.json | 19 +++++----- .../packages/mix-fetch/package.json | 4 +- .../packages/node-tester/package.json | 4 +- .../packages/nodejs-client/package.json | 4 +- .../packages/sdk-react/package.json | 6 +-- sdk/typescript/packages/sdk/package.json | 4 +- wasm/client/Cargo.toml | 2 +- wasm/full-nym-wasm/Cargo.toml | 2 +- wasm/mix-fetch/Cargo.toml | 2 +- wasm/node-tester/Cargo.toml | 2 +- 24 files changed, 170 insertions(+), 160 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72fad02808..60c1986590 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2994,7 +2994,7 @@ dependencies = [ [[package]] name = "extension-storage" -version = "1.2.0" +version = "1.2.1" dependencies = [ "bip39", "console_error_panic_hook", @@ -5559,7 +5559,7 @@ dependencies = [ [[package]] name = "mix-fetch-wasm" -version = "1.2.0" +version = "1.2.1" dependencies = [ "async-trait", "futures", @@ -6260,7 +6260,7 @@ dependencies = [ [[package]] name = "nym-client-wasm" -version = "1.2.0" +version = "1.2.1" dependencies = [ "anyhow", "futures", @@ -6953,7 +6953,7 @@ dependencies = [ [[package]] name = "nym-node-tester-wasm" -version = "1.2.0" +version = "1.2.1" dependencies = [ "futures", "js-sys", @@ -7555,7 +7555,7 @@ dependencies = [ [[package]] name = "nym-wasm-sdk" -version = "1.2.0" +version = "1.2.1" dependencies = [ "mix-fetch-wasm", "nym-client-wasm", diff --git a/nym-browser-extension/storage/Cargo.toml b/nym-browser-extension/storage/Cargo.toml index 86ee9de5f9..aee9afb118 100644 --- a/nym-browser-extension/storage/Cargo.toml +++ b/nym-browser-extension/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "extension-storage" -version = "1.2.0" +version = "1.2.1" edition = "2021" license = "Apache-2.0" repository = "https://github.com/nymtech/nym" diff --git a/sdk/typescript/docs/package.json b/sdk/typescript/docs/package.json index 0fcfab0d3d..580a99614e 100644 --- a/sdk/typescript/docs/package.json +++ b/sdk/typescript/docs/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/ts-sdk-docs", - "version": "1.2.0", + "version": "1.2.1", "description": "Nym Typescript SDK Docs", "license": "Apache-2.0", "author": "Nym Technologies SA", @@ -28,10 +28,10 @@ "@mui/icons-material": "^5.14.9", "@mui/lab": "^5.0.0-alpha.145", "@mui/material": "^5.14.8", - "@nymproject/contract-clients": ">=1.2.0-rc.10 || ^1", - "@nymproject/mix-fetch": ">=1.2.0-rc.10 || ^1", - "@nymproject/mix-fetch-full-fat": ">=1.2.0-rc.10 || ^1", - "@nymproject/sdk-full-fat": ">=1.2.0-rc.10 || ^1", + "@nymproject/contract-clients": ">=1.2.1-rc.0 || ^1", + "@nymproject/mix-fetch": ">=1.2.1-rc.0 || ^1", + "@nymproject/mix-fetch-full-fat": ">=1.2.1-rc.0 || ^1", + "@nymproject/sdk-full-fat": ">=1.2.1-rc.0 || ^1", "chain-registry": "^1.19.0", "cosmjs-types": "^0.8.0", "next": "^13.4.19", @@ -51,4 +51,4 @@ "typescript": "^4.9.3" }, "private": false -} +} \ No newline at end of file diff --git a/sdk/typescript/examples/chat-app/parcel/package.json b/sdk/typescript/examples/chat-app/parcel/package.json index bf72e13983..646d5610fe 100644 --- a/sdk/typescript/examples/chat-app/parcel/package.json +++ b/sdk/typescript/examples/chat-app/parcel/package.json @@ -1,12 +1,21 @@ { "name": "@nymproject/sdk-example-plain-html-parcel", + "version": "1.0.1", "description": "An example project that uses WASM and plain HTML bundled with Parcel v2", - "version": "1.0.0", "license": "Apache-2.0", - "source": "src/index.html", - "browserslist": "> 0.5%, last 2 versions, not dead", + "scripts": { + "build": "npx parcel build", + "build:serve": "npx serve dist", + "lint": "eslint src", + "lint:fix": "eslint src --fix", + "start": "npx parcel", + "test": "jest", + "test:watch": "jest --watch", + "tsc": "tsc", + "tsc:watch": "tsc --watch" + }, "dependencies": { - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1" + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1" }, "devDependencies": { "@types/jest": "^27.0.1", @@ -29,15 +38,7 @@ "ts-jest": "^27.0.5", "typescript": "^4.6.2" }, - "scripts": { - "start": "npx parcel", - "build": "npx parcel build", - "build:serve": "npx serve dist", - "test": "jest", - "test:watch": "jest --watch", - "tsc": "tsc", - "tsc:watch": "tsc --watch", - "lint": "eslint src", - "lint:fix": "eslint src --fix" - } -} + "private": false, + "browserslist": "> 0.5%, last 2 versions, not dead", + "source": "src/index.html" +} \ No newline at end of file diff --git a/sdk/typescript/examples/chat-app/plain-html/package.json b/sdk/typescript/examples/chat-app/plain-html/package.json index 5e6774c951..7cdf5deddc 100644 --- a/sdk/typescript/examples/chat-app/plain-html/package.json +++ b/sdk/typescript/examples/chat-app/plain-html/package.json @@ -1,10 +1,22 @@ { "name": "@nymproject/sdk-example-plain-html", + "version": "1.0.1", "description": "An example project that uses WASM and plain HTML", - "version": "1.0.0", "license": "Apache-2.0", + "scripts": { + "build": "webpack build --progress --config webpack.prod.js", + "build:dev": "webpack build --progress", + "build:serve": "npx serve dist", + "lint": "eslint src", + "lint:fix": "eslint src --fix", + "start": "webpack serve --progress --port 3000", + "test": "jest", + "test:watch": "jest --watch", + "tsc": "tsc", + "tsc:watch": "tsc --watch" + }, "dependencies": { - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1" + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1" }, "devDependencies": { "@babel/core": "^7.15.0", @@ -49,16 +61,5 @@ "webpack-dev-server": "^4.5.0", "webpack-merge": "^5.8.0" }, - "scripts": { - "start": "webpack serve --progress --port 3000", - "build": "webpack build --progress --config webpack.prod.js", - "build:dev": "webpack build --progress", - "build:serve": "npx serve dist", - "test": "jest", - "test:watch": "jest --watch", - "tsc": "tsc", - "tsc:watch": "tsc --watch", - "lint": "eslint src", - "lint:fix": "eslint src --fix" - } -} + "private": false +} \ No newline at end of file diff --git a/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/package.json b/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/package.json index 47fedbf21d..48813124dd 100644 --- a/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/package.json +++ b/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/package.json @@ -1,15 +1,26 @@ { "name": "@nymproject/sdk-example-react-webpack-wasm", + "version": "1.0.1", "description": "An example project that uses WASM, React, Webpack, Typescript and the Nym theme + components library", - "version": "1.0.0", "license": "Apache-2.0", + "scripts": { + "build": "webpack build --progress --config webpack.prod.js", + "build:dev": "webpack build --progress", + "build:serve": "npx serve dist", + "lint": "eslint src", + "lint:fix": "eslint src --fix", + "start": "webpack serve --progress --port 3000", + "test": "jest", + "test:watch": "jest --watch", + "tsc": "tsc", + "tsc:watch": "tsc --watch" + }, "dependencies": { "@mui/icons-material": "^5.5.0", "@mui/lab": "^5.0.0-alpha.72", "@mui/material": "^5.0.1", "@mui/styles": "^5.0.1", - "react-mui-dropzone": "^4.0.6", - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1", + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-dropzone": "^14.2.3", @@ -72,22 +83,11 @@ "webpack-favicons": "^1.3.8", "webpack-merge": "^5.8.0" }, + "private": false, "overrides": { - "react": "^18.2.0", - "react-dom": "^18.2.0", "@types/react": "^18.0.26", - "@types/react-dom": "^18.0.10" - }, - "scripts": { - "start": "webpack serve --progress --port 3000", - "build": "webpack build --progress --config webpack.prod.js", - "build:dev": "webpack build --progress", - "build:serve": "npx serve dist", - "test": "jest", - "test:watch": "jest --watch", - "tsc": "tsc", - "tsc:watch": "tsc --watch", - "lint": "eslint src", - "lint:fix": "eslint src --fix" + "@types/react-dom": "^18.0.10", + "react": "^18.2.0", + "react-dom": "^18.2.0" } -} +} \ No newline at end of file diff --git a/sdk/typescript/examples/chrome-extension/package.json b/sdk/typescript/examples/chrome-extension/package.json index 507b9cdec8..5880b8d4e8 100644 --- a/sdk/typescript/examples/chrome-extension/package.json +++ b/sdk/typescript/examples/chrome-extension/package.json @@ -1,20 +1,21 @@ { "name": "@nymproject/sdk-example-chrome-extension", - "version": "1.0.0", + "version": "1.0.1", "description": "This is an example of how Nym can be used within the context of a Chrome extension.", + "license": "ISC", + "author": "", "main": "index.js", "scripts": { "build": "webpack" }, - "author": "", - "license": "ISC", + "dependencies": { + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1" + }, "devDependencies": { "clean-webpack-plugin": "^4.0.0", "copy-webpack-plugin": "^11.0.0", "webpack": "^5.88.1", "webpack-cli": "^5.1.4" }, - "dependencies": { - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1" - } -} + "private": false +} \ No newline at end of file diff --git a/sdk/typescript/examples/firefox-extension/package.json b/sdk/typescript/examples/firefox-extension/package.json index 1d14e425a5..9615a1cf04 100644 --- a/sdk/typescript/examples/firefox-extension/package.json +++ b/sdk/typescript/examples/firefox-extension/package.json @@ -1,20 +1,21 @@ { "name": "@nymproject/sdk-example-firefox-extension", - "version": "1.0.0", + "version": "1.0.1", "description": "This is an example of how Nym can be used within the context of a Firefox extension.", - "main": "index.js", - "author": "", "license": "ISC", + "author": "", + "main": "index.js", + "scripts": { + "build": "yarn webpack" + }, + "dependencies": { + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1" + }, "devDependencies": { "copy-webpack-plugin": "^11.0.0", "webpack": "^5.88.1", "webpack-cli": "^5.1.4", "worker-loader": "^3.0.8" }, - "scripts": { - "build": "yarn webpack" - }, - "dependencies": { - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1" - } -} + "private": false +} \ No newline at end of file diff --git a/sdk/typescript/examples/mix-fetch/browser/package.json b/sdk/typescript/examples/mix-fetch/browser/package.json index 1ec0e2d6c6..4de1922b38 100644 --- a/sdk/typescript/examples/mix-fetch/browser/package.json +++ b/sdk/typescript/examples/mix-fetch/browser/package.json @@ -1,15 +1,16 @@ { "name": "@nymproject/mix-fetch-example-parcel", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache-2.0", - "source": "src/index.html", - "dependencies": { - "parcel": "^2.9.3", - "@nymproject/mix-fetch": ">=1.2.0-rc.10 || ^1" - }, "scripts": { - "start": "parcel --no-cache", "build": "parcel build --no-cache --no-content-hash", - "serve": "serve dist" - } -} + "serve": "serve dist", + "start": "parcel --no-cache" + }, + "dependencies": { + "@nymproject/mix-fetch": ">=1.2.1-rc.0 || ^1", + "parcel": "^2.9.3" + }, + "private": false, + "source": "src/index.html" +} \ No newline at end of file diff --git a/sdk/typescript/examples/node-tester/parcel/package.json b/sdk/typescript/examples/node-tester/parcel/package.json index 905b3747eb..015b816fda 100644 --- a/sdk/typescript/examples/node-tester/parcel/package.json +++ b/sdk/typescript/examples/node-tester/parcel/package.json @@ -1,12 +1,21 @@ { "name": "@nymproject/sdk-example-node-tester-plain-html-parcel", + "version": "1.0.1", "description": "An example project that uses WASM and plain HTML bundled with Parcel v2", - "version": "1.0.0", "license": "Apache-2.0", - "source": "src/index.html", - "browserslist": "> 0.5%, last 2 versions, not dead", + "scripts": { + "build": "npx parcel build", + "build:serve": "npx serve dist", + "lint": "eslint src", + "lint:fix": "eslint src --fix", + "start": "npx parcel", + "test": "jest", + "test:watch": "jest --watch", + "tsc": "tsc", + "tsc:watch": "tsc --watch" + }, "dependencies": { - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1" + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1" }, "devDependencies": { "@types/jest": "^27.0.1", @@ -29,15 +38,7 @@ "ts-jest": "^27.0.5", "typescript": "^4.6.2" }, - "scripts": { - "start": "npx parcel", - "build": "npx parcel build", - "build:serve": "npx serve dist", - "test": "jest", - "test:watch": "jest --watch", - "tsc": "tsc", - "tsc:watch": "tsc --watch", - "lint": "eslint src", - "lint:fix": "eslint src --fix" - } -} + "private": false, + "browserslist": "> 0.5%, last 2 versions, not dead", + "source": "src/index.html" +} \ No newline at end of file diff --git a/sdk/typescript/examples/node-tester/plain-html/package.json b/sdk/typescript/examples/node-tester/plain-html/package.json index 225060d813..bf59e74f0d 100644 --- a/sdk/typescript/examples/node-tester/plain-html/package.json +++ b/sdk/typescript/examples/node-tester/plain-html/package.json @@ -1,10 +1,22 @@ { "name": "@nymproject/sdk-example-node-tester-plain-html", + "version": "1.0.1", "description": "An example project that uses WASM node tester and plain HTML", - "version": "1.0.0", "license": "Apache-2.0", + "scripts": { + "build": "webpack build --progress --config webpack.prod.js", + "build:dev": "webpack build --progress", + "build:serve": "npx serve dist", + "lint": "eslint src", + "lint:fix": "eslint src --fix", + "start": "webpack serve --progress --port 3000", + "test": "jest", + "test:watch": "jest --watch", + "tsc": "tsc", + "tsc:watch": "tsc --watch" + }, "dependencies": { - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1" + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1" }, "devDependencies": { "@babel/core": "^7.15.0", @@ -49,16 +61,5 @@ "webpack-dev-server": "^4.5.0", "webpack-merge": "^5.8.0" }, - "scripts": { - "start": "webpack serve --progress --port 3000", - "build": "webpack build --progress --config webpack.prod.js", - "build:dev": "webpack build --progress", - "build:serve": "npx serve dist", - "test": "jest", - "test:watch": "jest --watch", - "tsc": "tsc", - "tsc:watch": "tsc --watch", - "lint": "eslint src", - "lint:fix": "eslint src --fix" - } -} + "private": false +} \ No newline at end of file diff --git a/sdk/typescript/examples/node-tester/react/package.json b/sdk/typescript/examples/node-tester/react/package.json index e07e69ad32..9f3b2394e7 100644 --- a/sdk/typescript/examples/node-tester/react/package.json +++ b/sdk/typescript/examples/node-tester/react/package.json @@ -1,19 +1,20 @@ { "name": "@nymproject/sdk-example-node-tester-react", + "version": "1.0.1", "description": "An example project that uses WASM node tester and React", - "version": "1.0.0", "license": "Apache-2.0", + "scripts": { + "start": "parcel index.html" + }, "dependencies": { "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.14.0", "@mui/material": "^5.14.0", - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1", + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1", "parcel": "^2.9.3", "react": "^18.2.0", "react-dom": "^18.2.0" }, - "scripts": { - "start": "parcel index.html" - } -} + "private": false +} \ No newline at end of file diff --git a/sdk/typescript/packages/mix-fetch-node/package.json b/sdk/typescript/packages/mix-fetch-node/package.json index 0fb709c9db..3efd987e43 100644 --- a/sdk/typescript/packages/mix-fetch-node/package.json +++ b/sdk/typescript/packages/mix-fetch-node/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/mix-fetch-node", - "version": "1.2.1-rc.3", + "version": "1.2.1", "description": "This package is a drop-in replacement for `fetch` in NodeJS to send HTTP requests over the Nym Mixnet.", "license": "Apache-2.0", "author": "Nym Technologies SA", @@ -28,7 +28,7 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/mix-fetch-wasm-node": ">=1.2.0 || ^1", + "@nymproject/mix-fetch-wasm-node": ">=1.2.1-rc.0 || ^1", "comlink": "^4.3.1", "fake-indexeddb": "^5.0.0", "node-fetch": "^3.3.2", diff --git a/sdk/typescript/packages/mix-fetch/internal-dev/package.json b/sdk/typescript/packages/mix-fetch/internal-dev/package.json index 18d4c82220..9965510bdb 100644 --- a/sdk/typescript/packages/mix-fetch/internal-dev/package.json +++ b/sdk/typescript/packages/mix-fetch/internal-dev/package.json @@ -1,9 +1,14 @@ { "name": "@nymproject/mix-fetch-tester-webpack", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache-2.0", + "scripts": { + "build": "webpack build --progress --config webpack.prod.js", + "serve": "npx serve dist", + "start": "webpack serve --progress --port 3000" + }, "dependencies": { - "@nymproject/mix-fetch": ">=1.2.0-rc.10 || ^1" + "@nymproject/mix-fetch": ">=1.2.1-rc.0 || ^1" }, "devDependencies": { "@babel/core": "^7.22.10", @@ -49,9 +54,5 @@ "webpack-dev-server": "^4.15.1", "webpack-merge": "^5.9.0" }, - "scripts": { - "start": "webpack serve --progress --port 3000", - "build": "webpack build --progress --config webpack.prod.js", - "serve": "npx serve dist" - } -} + "private": false +} \ No newline at end of file diff --git a/sdk/typescript/packages/mix-fetch/internal-dev/parcel/package.json b/sdk/typescript/packages/mix-fetch/internal-dev/parcel/package.json index 1983ca9c06..6849466cd3 100644 --- a/sdk/typescript/packages/mix-fetch/internal-dev/parcel/package.json +++ b/sdk/typescript/packages/mix-fetch/internal-dev/parcel/package.json @@ -1,14 +1,15 @@ { "name": "@nymproject/mix-fetch-tester-parcel", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache-2.0", - "source": "../src/index.html", - "dependencies": { - "@nymproject/mix-fetch": ">=1.2.0-rc.10 || ^1" - }, "scripts": { - "start": "npx parcel --no-cache", "build": "npx parcel build --no-cache --no-content-hash", - "serve": "npx serve dist" - } -} + "serve": "npx serve dist", + "start": "npx parcel --no-cache" + }, + "dependencies": { + "@nymproject/mix-fetch": ">=1.2.1-rc.0 || ^1" + }, + "private": false, + "source": "../src/index.html" +} \ No newline at end of file diff --git a/sdk/typescript/packages/mix-fetch/package.json b/sdk/typescript/packages/mix-fetch/package.json index a5350b9012..f58088197b 100644 --- a/sdk/typescript/packages/mix-fetch/package.json +++ b/sdk/typescript/packages/mix-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/mix-fetch", - "version": "1.2.0", + "version": "1.2.1", "description": "This package is a drop-in replacement for `fetch` to send HTTP requests over the Nym Mixnet.", "license": "Apache-2.0", "author": "Nym Technologies SA", @@ -33,7 +33,7 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/mix-fetch-wasm": ">=1.2.0-rc.10 || ^1", + "@nymproject/mix-fetch-wasm": ">=1.2.1-rc.0 || ^1", "comlink": "^4.3.1" }, "devDependencies": { diff --git a/sdk/typescript/packages/node-tester/package.json b/sdk/typescript/packages/node-tester/package.json index f01028da1f..acb32c0b19 100644 --- a/sdk/typescript/packages/node-tester/package.json +++ b/sdk/typescript/packages/node-tester/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/node-tester", - "version": "1.2.0", + "version": "1.2.1", "description": "This package provides a tester that can send test packets to mixnode that is part of the Nym Mixnet.", "license": "Apache-2.0", "author": "Nym Technologies SA", @@ -25,7 +25,7 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/nym-node-tester-wasm": ">=1.2.0-rc.10 || ^1", + "@nymproject/nym-node-tester-wasm": ">=1.2.1-rc.0 || ^1", "comlink": "^4.3.1" }, "devDependencies": { diff --git a/sdk/typescript/packages/nodejs-client/package.json b/sdk/typescript/packages/nodejs-client/package.json index 7a30d73cc3..d1d46f532d 100644 --- a/sdk/typescript/packages/nodejs-client/package.json +++ b/sdk/typescript/packages/nodejs-client/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/nodejs-client", - "version": "1.2.1-rc.3", + "version": "1.2.1", "license": "Apache-2.0", "author": "Nym Technologies SA", "files": [ @@ -25,7 +25,7 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/nym-client-wasm-node": ">=1.2.0 || ^1", + "@nymproject/nym-client-wasm-node": ">=1.2.1-rc.0 || ^1", "comlink": "^4.3.1", "fake-indexeddb": "^4.0.2", "rollup-plugin-polyfill": "^4.2.0", diff --git a/sdk/typescript/packages/sdk-react/package.json b/sdk/typescript/packages/sdk-react/package.json index aa298a5a9d..b6dafc5d23 100644 --- a/sdk/typescript/packages/sdk-react/package.json +++ b/sdk/typescript/packages/sdk-react/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/sdk-react", - "version": "1.2.0", + "version": "1.2.1", "license": "Apache-2.0", "author": "Nym Technologies SA", "files": [ @@ -20,7 +20,7 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/sdk": ">=1.2.0-rc.10 || ^1" + "@nymproject/sdk": ">=1.2.1-rc.0 || ^1" }, "devDependencies": { "@babel/core": "^7.17.5", @@ -67,4 +67,4 @@ "private": false, "type": "module", "types": "./dist/index.d.ts" -} +} \ No newline at end of file diff --git a/sdk/typescript/packages/sdk/package.json b/sdk/typescript/packages/sdk/package.json index 62102504ac..23e4b803ce 100644 --- a/sdk/typescript/packages/sdk/package.json +++ b/sdk/typescript/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/sdk", - "version": "1.2.0", + "version": "1.2.1", "license": "Apache-2.0", "author": "Nym Technologies SA", "files": [ @@ -30,7 +30,7 @@ "tsc": "tsc --noEmit true" }, "dependencies": { - "@nymproject/nym-client-wasm": ">=1.2.0-rc.10 || ^1", + "@nymproject/nym-client-wasm": ">=1.2.1-rc.0 || ^1", "comlink": "^4.3.1" }, "devDependencies": { diff --git a/wasm/client/Cargo.toml b/wasm/client/Cargo.toml index 5b8dda73da..8651e223d5 100644 --- a/wasm/client/Cargo.toml +++ b/wasm/client/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nym-client-wasm" authors = ["Dave Hrycyszyn ", "Jedrzej Stuczynski "] -version = "1.2.0" +version = "1.2.1" edition = "2021" keywords = ["nym", "sphinx", "wasm", "webassembly", "privacy", "client"] license = "Apache-2.0" diff --git a/wasm/full-nym-wasm/Cargo.toml b/wasm/full-nym-wasm/Cargo.toml index d2cd98d808..0902eb625c 100644 --- a/wasm/full-nym-wasm/Cargo.toml +++ b/wasm/full-nym-wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nym-wasm-sdk" authors = ["Jedrzej Stuczynski "] -version = "1.2.0" +version = "1.2.1" edition = "2021" keywords = ["nym", "sphinx", "wasm", "webassembly", "privacy"] license = "Apache-2.0" diff --git a/wasm/mix-fetch/Cargo.toml b/wasm/mix-fetch/Cargo.toml index 50e5d61af2..3416758a3a 100644 --- a/wasm/mix-fetch/Cargo.toml +++ b/wasm/mix-fetch/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "mix-fetch-wasm" authors = ["Jedrzej Stuczynski "] -version = "1.2.0" +version = "1.2.1" edition = "2021" keywords = ["nym", "fetch", "wasm", "webassembly", "privacy"] license = "Apache-2.0" diff --git a/wasm/node-tester/Cargo.toml b/wasm/node-tester/Cargo.toml index 7c75e6c9b1..0397d64349 100644 --- a/wasm/node-tester/Cargo.toml +++ b/wasm/node-tester/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nym-node-tester-wasm" authors = ["Jedrzej Stuczynski "] -version = "1.2.0" +version = "1.2.1" edition = "2021" keywords = ["nym", "sphinx", "webassembly", "privacy", "tester"] license = "Apache-2.0" From 13aeca9c8895a78bae6adc5e7f79900258eb3cef Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Thu, 2 Nov 2023 21:37:47 +0000 Subject: [PATCH 122/142] Fix lint error --- sdk/typescript/packages/mix-fetch-node/src/worker/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts b/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts index 58cfb41a51..ee3a86ad3f 100644 --- a/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts +++ b/sdk/typescript/packages/mix-fetch-node/src/worker/main.ts @@ -1,9 +1,9 @@ /* eslint-disable no-console */ -import type { IMixFetchWebWorker, LoadedEvent } from '../types'; import * as Comlink from 'comlink'; import { parentPort } from 'node:worker_threads'; import { setupMixFetch, disconnectMixFetch } from '@nymproject/mix-fetch-wasm-node'; +import type { IMixFetchWebWorker, LoadedEvent } from '../types'; import nodeEndpoint from '../node-adapter'; import { EventKinds, ResponseBodyConfigMap, ResponseBodyConfigMapDefaults } from '../types'; From 77aa58083d05a41f8acc60dda74225f23a7cf734 Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Thu, 2 Nov 2023 21:56:27 +0000 Subject: [PATCH 123/142] Fix lint error --- .../src/components/Accounts/modals/MultiAccountHowTo.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nym-wallet/src/components/Accounts/modals/MultiAccountHowTo.tsx b/nym-wallet/src/components/Accounts/modals/MultiAccountHowTo.tsx index 05ddc018ad..620a21ae8a 100644 --- a/nym-wallet/src/components/Accounts/modals/MultiAccountHowTo.tsx +++ b/nym-wallet/src/components/Accounts/modals/MultiAccountHowTo.tsx @@ -21,7 +21,8 @@ export const MultiAccountHowTo = ({ show, handleClose }: { show: boolean; handle } /> - If you don’t have a password set for your account, log out, click on login with password and follow the forgot my password flow + If you don’t have a password set for your account, log out, click on login with password and follow the forgot + my password flow If you already have a password, log in to the wallet using your password then try create/import accounts From d151b907d1fa628e41dd5638822c5437d9718297 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 2 Nov 2023 23:36:14 +0100 Subject: [PATCH 124/142] added open proxies --- documentation/dev-portal/src/shipyard/infra.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/documentation/dev-portal/src/shipyard/infra.md b/documentation/dev-portal/src/shipyard/infra.md index b5621f6ff6..21d4af6dba 100644 --- a/documentation/dev-portal/src/shipyard/infra.md +++ b/documentation/dev-portal/src/shipyard/infra.md @@ -3,3 +3,10 @@ If you are writing an application that requires sending messages through the mix If you are relying on network requesters then chances are that the IPs or domains your app relies on will not already be on the whitelist. Ideally, you would [run your own,](https://nymtech.net/operators/nodes/network-requester-setup.html) but we will also run a few nodes in ‘open proxy’ mode and share the addresses so that you can use them when beginning to develop. +## Node Details: +- NR1 + - Location: Singapore + - Nym Address: `FDeWfd8q686PWLXJDCqNJTCbydTk1KSux5HVftimsPyx.9XyThN4yh92eTMuLp1NvWicRZob8Ei5xpba9dvcMLxcN@9Byd9VAtyYMnbVAcqdoQxJnq76XEg2dbxbiF5Aa5Jj9J` +- NR2 + - Location: Frankfurt + - Nym Address: `BNypKaGiGY8GNRN4gpV95GcaVS8n7CrHuoZNgQ2ezqv2ACpaixzuaSzuMajVQj6aR7cbpbvp676tm21MiLbX1gni@678qVUJ21uwxZBhp3r56z7GRf6gMh3NYDHruTegPtgMf` \ No newline at end of file From 50c994d2edfce339d999f3b85ea67101f00aae2f Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Fri, 3 Nov 2023 00:19:33 +0100 Subject: [PATCH 125/142] fixed addr --- documentation/dev-portal/src/shipyard/infra.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/dev-portal/src/shipyard/infra.md b/documentation/dev-portal/src/shipyard/infra.md index 21d4af6dba..73c3afadb3 100644 --- a/documentation/dev-portal/src/shipyard/infra.md +++ b/documentation/dev-portal/src/shipyard/infra.md @@ -9,4 +9,4 @@ If you are relying on network requesters then chances are that the IPs or domain - Nym Address: `FDeWfd8q686PWLXJDCqNJTCbydTk1KSux5HVftimsPyx.9XyThN4yh92eTMuLp1NvWicRZob8Ei5xpba9dvcMLxcN@9Byd9VAtyYMnbVAcqdoQxJnq76XEg2dbxbiF5Aa5Jj9J` - NR2 - Location: Frankfurt - - Nym Address: `BNypKaGiGY8GNRN4gpV95GcaVS8n7CrHuoZNgQ2ezqv2ACpaixzuaSzuMajVQj6aR7cbpbvp676tm21MiLbX1gni@678qVUJ21uwxZBhp3r56z7GRf6gMh3NYDHruTegPtgMf` \ No newline at end of file + - Nym Address: `BNypKaGiGY8GNRN4gpV95GcaVS8n7CrHuoZNgQ2ezqv2.ACpaixzuaSzuMajVQj6aR7cbpbvp676tm21MiLbX1gni@678qVUJ21uwxZBhp3r56z7GRf6gMh3NYDHruTegPtgMf` \ No newline at end of file From 7e6a4c073fd357aa4697d644ea1f67e276b84c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 3 Nov 2023 09:00:27 +0100 Subject: [PATCH 126/142] ci: cargo clean before clippy in nightly build --- .github/workflows/nightly-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 3dcabf2b28..3cadf150a2 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -82,6 +82,11 @@ jobs: command: test args: --workspace -- --ignored + - name: Clean + uses: actions-rs/cargo@v1 + with: + command: clean + - name: Clippy uses: actions-rs/cargo@v1 with: From 22dbdf0cd2c7e4018639119aa6909419fa5c2f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 27 Oct 2023 12:38:11 +0200 Subject: [PATCH 127/142] Create IpForwarderService --- Cargo.lock | 3 + common/wireguard/src/lib.rs | 7 ++- common/wireguard/src/platform/linux/mod.rs | 2 +- .../src/platform/linux/tun_device.rs | 6 +- service-providers/ip-packet-router/Cargo.toml | 3 + service-providers/ip-packet-router/src/lib.rs | 55 ++++++++++++++++++- 6 files changed, 66 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72fad02808..5ed1e3fdb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6658,9 +6658,12 @@ dependencies = [ "nym-service-providers-common", "nym-sphinx", "nym-task", + "nym-wireguard", + "nym-wireguard-types", "serde", "serde_json", "thiserror", + "tokio", ] [[package]] diff --git a/common/wireguard/src/lib.rs b/common/wireguard/src/lib.rs index dc226c56fd..bd5aa47b4f 100644 --- a/common/wireguard/src/lib.rs +++ b/common/wireguard/src/lib.rs @@ -11,7 +11,7 @@ mod packet_relayer; mod platform; mod registered_peers; mod setup; -mod tun_task_channel; +pub mod tun_task_channel; mod udp_listener; mod wg_tunnel; @@ -20,7 +20,7 @@ use std::sync::Arc; // Currently the module related to setting up the virtual network device is platform specific. #[cfg(target_os = "linux")] -use platform::linux::tun_device; +pub use platform::linux::tun_device; /// Start wireguard UDP listener and TUN device /// @@ -39,7 +39,8 @@ pub async fn start_wireguard( let peers_by_tag = Arc::new(tokio::sync::Mutex::new(wg_tunnel::PeersByTag::new())); // Start the tun device that is used to relay traffic outbound - let (tun, tun_task_tx, tun_task_response_rx) = tun_device::TunDevice::new(peers_by_ip.clone()); + let (tun, tun_task_tx, tun_task_response_rx) = + tun_device::TunDevice::new(Some(peers_by_ip.clone())); tun.start(); // If we want to have the tun device on a separate host, it's the tun_task and diff --git a/common/wireguard/src/platform/linux/mod.rs b/common/wireguard/src/platform/linux/mod.rs index ebe0ba212c..fdf1de229d 100644 --- a/common/wireguard/src/platform/linux/mod.rs +++ b/common/wireguard/src/platform/linux/mod.rs @@ -1 +1 @@ -pub(crate) mod tun_device; +pub mod tun_device; diff --git a/common/wireguard/src/platform/linux/tun_device.rs b/common/wireguard/src/platform/linux/tun_device.rs index 348abdb609..1bf84eb52d 100644 --- a/common/wireguard/src/platform/linux/tun_device.rs +++ b/common/wireguard/src/platform/linux/tun_device.rs @@ -43,7 +43,7 @@ pub struct TunDevice { tun_task_response_tx: TunTaskResponseTx, // The routing table, as how wireguard does it - peers_by_ip: Arc>, + peers_by_ip: Option>>, // This is an alternative to the routing table, where we just match outgoing source IP with // incoming destination IP. @@ -52,7 +52,7 @@ pub struct TunDevice { impl TunDevice { pub fn new( - peers_by_ip: Arc>, + peers_by_ip: Option>>, ) -> (Self, TunTaskTx, TunTaskResponseRx) { let tun = setup_tokio_tun_device( format!("{TUN_BASE_NAME}%d").as_str(), @@ -123,7 +123,7 @@ impl TunDevice { // This is how wireguard does it, by consulting the AllowedIPs table. if false { - let peers = self.peers_by_ip.lock().await; + let peers = self.peers_by_ip.as_ref().unwrap().lock().await; if let Some(peer_tx) = peers.longest_match(dst_addr).map(|(_, tx)| tx) { log::info!("Forward packet to wg tunnel"); peer_tx diff --git a/service-providers/ip-packet-router/Cargo.toml b/service-providers/ip-packet-router/Cargo.toml index c01c13cfb4..93deae5a48 100644 --- a/service-providers/ip-packet-router/Cargo.toml +++ b/service-providers/ip-packet-router/Cargo.toml @@ -18,6 +18,9 @@ nym-sdk = { path = "../../sdk/rust/nym-sdk" } nym-service-providers-common = { path = "../common" } nym-sphinx = { path = "../../common/nymsphinx" } nym-task = { path = "../../common/task" } +nym-wireguard = { path = "../../common/wireguard" } +nym-wireguard-types = { path = "../../common/wireguard-types" } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } thiserror = { workspace = true } +tokio = { workspace = true, features = ["rt-multi-thread", "net", "io-util"] } diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index 9aadf5f50a..ca4f0481c1 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -1,12 +1,13 @@ use std::path::Path; use error::IpForwarderError; -use futures::channel::oneshot; +use futures::{channel::oneshot, StreamExt}; use nym_client_core::{ client::mix_traffic::transceiver::GatewayTransceiver, config::disk_persistence::CommonClientPaths, HardcodedTopologyProvider, TopologyProvider, }; use nym_sdk::{mixnet::Recipient, NymNetworkDetails}; +use nym_sphinx::receiver::ReconstructedMessage; use nym_task::{TaskClient, TaskHandle}; use crate::config::BaseClientConfig; @@ -95,12 +96,12 @@ impl IpForwarderBuilder { pub async fn run_service_provider(self) -> Result<(), IpForwarderError> { // Used to notify tasks to shutdown. Not all tasks fully supports this (yet). - let shutdown: TaskHandle = self.shutdown.map(Into::into).unwrap_or_default(); + let task_handle: TaskHandle = self.shutdown.map(Into::into).unwrap_or_default(); // Connect to the mixnet let mixnet_client = create_mixnet_client( &self.config.base, - shutdown.get_handle().named("nym_sdk::MixnetClient"), + task_handle.get_handle().named("nym_sdk::MixnetClient"), self.custom_gateway_transceiver, self.custom_topology_provider, self.wait_for_gateway, @@ -110,6 +111,19 @@ impl IpForwarderBuilder { let self_address = *mixnet_client.nym_address(); + // Create the TUN device that we interact with the rest of the world with + let (tun, tun_task_tx, tun_task_response_rx) = + nym_wireguard::tun_device::TunDevice::new(None); + + let ip_forwarder_service = IpForwarderService { + config: self.config, + tun, + tun_task_tx, + tun_task_response_rx, + mixnet_client, + task_handle, + }; + log::info!("The address of this client is: {self_address}"); log::info!("All systems go. Press CTRL-C to stop the server."); @@ -120,6 +134,41 @@ impl IpForwarderBuilder { } } + ip_forwarder_service.run().await + } +} + +struct IpForwarderService { + config: Config, + tun: nym_wireguard::tun_device::TunDevice, + tun_task_tx: nym_wireguard::tun_task_channel::TunTaskTx, + tun_task_response_rx: nym_wireguard::tun_task_channel::TunTaskResponseRx, + mixnet_client: nym_sdk::mixnet::MixnetClient, + task_handle: TaskHandle, +} + +impl IpForwarderService { + async fn run(mut self) -> Result<(), IpForwarderError> { + let mut task_client = self.task_handle.fork("main_loop"); + while !task_client.is_shutdown() { + tokio::select! { + _ = task_client.recv() => { + log::debug!("IpForwarderService [main loop]: received shutdown"); + }, + msg = self.mixnet_client.next() => match msg { + Some(msg) => self.on_message(msg).await, + None => { + log::trace!("IpForwarderService [main loop]: stopping since channel closed"); + break; + }, + } + } + } + log::info!("IpForwarderService: stopping"); + Ok(()) + } + + async fn on_message(&mut self, reconstructed: ReconstructedMessage) { todo!(); } } From 833a1b118e2282610932333de66b7ae6c3fcbdff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 27 Oct 2023 17:32:25 +0200 Subject: [PATCH 128/142] on_message --- Cargo.lock | 2 + common/wireguard/src/tun_task_channel.rs | 4 +- service-providers/ip-packet-router/Cargo.toml | 2 + .../ip-packet-router/src/error.rs | 10 ++- service-providers/ip-packet-router/src/lib.rs | 80 ++++++++++++++++--- 5 files changed, 84 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ed1e3fdb0..2916eadb0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6649,6 +6649,7 @@ dependencies = [ name = "nym-ip-packet-router" version = "0.1.0" dependencies = [ + "etherparse", "futures", "log", "nym-bin-common", @@ -6662,6 +6663,7 @@ dependencies = [ "nym-wireguard-types", "serde", "serde_json", + "tap", "thiserror", "tokio", ] diff --git a/common/wireguard/src/tun_task_channel.rs b/common/wireguard/src/tun_task_channel.rs index 1cbd6985da..8928aa6049 100644 --- a/common/wireguard/src/tun_task_channel.rs +++ b/common/wireguard/src/tun_task_channel.rs @@ -7,7 +7,7 @@ pub struct TunTaskTx(mpsc::Sender); pub(crate) struct TunTaskRx(mpsc::Receiver); impl TunTaskTx { - pub(crate) async fn send( + pub async fn send( &self, data: TunTaskPayload, ) -> Result<(), tokio::sync::mpsc::error::SendError> { @@ -40,7 +40,7 @@ impl TunTaskResponseTx { } impl TunTaskResponseRx { - pub(crate) async fn recv(&mut self) -> Option { + pub async fn recv(&mut self) -> Option { self.0.recv().await } } diff --git a/service-providers/ip-packet-router/Cargo.toml b/service-providers/ip-packet-router/Cargo.toml index 93deae5a48..3aa52688f4 100644 --- a/service-providers/ip-packet-router/Cargo.toml +++ b/service-providers/ip-packet-router/Cargo.toml @@ -9,6 +9,7 @@ edition.workspace = true license.workspace = true [dependencies] +etherparse = "0.13.0" futures = { workspace = true } log = { workspace = true } nym-bin-common = { path = "../../common/bin-common" } @@ -22,5 +23,6 @@ nym-wireguard = { path = "../../common/wireguard" } nym-wireguard-types = { path = "../../common/wireguard-types" } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } +tap.workspace = true thiserror = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread", "net", "io-util"] } diff --git a/service-providers/ip-packet-router/src/error.rs b/service-providers/ip-packet-router/src/error.rs index 7a0268fb61..1fb4be6ad6 100644 --- a/service-providers/ip-packet-router/src/error.rs +++ b/service-providers/ip-packet-router/src/error.rs @@ -12,7 +12,7 @@ pub enum IpForwarderError { FailedToLoadConfig(String), // TODO: add more details here - #[error("Failed to validate the loaded config")] + #[error("failed to validate the loaded config")] ConfigValidationFailure, #[error("failed local version check, client and config mismatch")] @@ -26,4 +26,12 @@ pub enum IpForwarderError { #[error("the entity wrapping the network requester has disconnected")] DisconnectedParent, + + #[error("failed to parse incoming packet: {source}")] + PacketParseFailed { + source: etherparse::ReadError, + }, + + #[error("parsed packet is missing IP header")] + PacketMissingHeader, } diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index ca4f0481c1..2cfaffbbe7 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -1,4 +1,4 @@ -use std::path::Path; +use std::{net::IpAddr, path::Path}; use error::IpForwarderError; use futures::{channel::oneshot, StreamExt}; @@ -6,9 +6,13 @@ use nym_client_core::{ client::mix_traffic::transceiver::GatewayTransceiver, config::disk_persistence::CommonClientPaths, HardcodedTopologyProvider, TopologyProvider, }; -use nym_sdk::{mixnet::Recipient, NymNetworkDetails}; +use nym_sdk::{ + mixnet::{InputMessage, MixnetMessageSender, Recipient}, + NymNetworkDetails, +}; use nym_sphinx::receiver::ReconstructedMessage; use nym_task::{TaskClient, TaskHandle}; +use tap::TapFallible; use crate::config::BaseClientConfig; @@ -115,7 +119,7 @@ impl IpForwarderBuilder { let (tun, tun_task_tx, tun_task_response_rx) = nym_wireguard::tun_device::TunDevice::new(None); - let ip_forwarder_service = IpForwarderService { + let ip_forwarder_service = IpForwarder { config: self.config, tun, tun_task_tx, @@ -138,7 +142,7 @@ impl IpForwarderBuilder { } } -struct IpForwarderService { +struct IpForwarder { config: Config, tun: nym_wireguard::tun_device::TunDevice, tun_task_tx: nym_wireguard::tun_task_channel::TunTaskTx, @@ -147,7 +151,7 @@ struct IpForwarderService { task_handle: TaskHandle, } -impl IpForwarderService { +impl IpForwarder { async fn run(mut self) -> Result<(), IpForwarderError> { let mut task_client = self.task_handle.fork("main_loop"); while !task_client.is_shutdown() { @@ -155,21 +159,75 @@ impl IpForwarderService { _ = task_client.recv() => { log::debug!("IpForwarderService [main loop]: received shutdown"); }, - msg = self.mixnet_client.next() => match msg { - Some(msg) => self.on_message(msg).await, - None => { + msg = self.mixnet_client.next() => { + if let Some(msg) = msg { + self.on_message(msg).await.ok(); + } else { log::trace!("IpForwarderService [main loop]: stopping since channel closed"); break; - }, + }; + }, + packet = self.tun_task_response_rx.recv() => { + if let Some((tag, packet)) = packet { + // let input_message = InputMessage { + // }; + // self.mixnet_client + // .send(input_message) + // .await + // .tap_err(|err| { + // log::error!("IpForwarderService [main loop]: failed to send packet to mixnet: {err}"); + // }) + // .ok(); + } else { + log::trace!("IpForwarderService [main loop]: stopping since channel closed"); + break; + } } + } } log::info!("IpForwarderService: stopping"); Ok(()) } - async fn on_message(&mut self, reconstructed: ReconstructedMessage) { - todo!(); + async fn on_message( + &mut self, + reconstructed: ReconstructedMessage, + ) -> Result<(), IpForwarderError> { + log::info!("Received message: {:?}", reconstructed.sender_tag); + + let headers = etherparse::SlicedPacket::from_ip(&reconstructed.message).map_err(|err| { + log::warn!("Received non-IP packet: {err}"); + IpForwarderError::PacketParseFailed { source: err } + })?; + + let (src_addr, dst_addr): (IpAddr, IpAddr) = match headers.ip { + Some(etherparse::InternetSlice::Ipv4(ipv4_header, _)) => ( + ipv4_header.source_addr().into(), + ipv4_header.destination_addr().into(), + ), + Some(etherparse::InternetSlice::Ipv6(ipv6_header, _)) => ( + ipv6_header.source_addr().into(), + ipv6_header.destination_addr().into(), + ), + None => { + log::warn!("Received non-IP packet"); + return Err(IpForwarderError::PacketMissingHeader); + } + }; + log::info!("Received packet: {src_addr} -> {dst_addr}"); + + // TODO: set the tag correctly. Can we just reuse sender_tag? + let tag = 0; + self.tun_task_tx + .send((tag, reconstructed.message)) + .await + .tap_err(|err| { + log::error!("Failed to send packet to tun device: {err}"); + }) + .ok(); + + Ok(()) } } From bb0fb71a213f17559650fc10402d3b4071d65380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 11:42:50 +0100 Subject: [PATCH 129/142] Rename remaining places to ip packet router --- gateway/src/error.rs | 4 +- gateway/src/node/mod.rs | 2 +- .../ip-packet-router/src/config/mod.rs | 22 ++++----- .../src/config/persistence.rs | 8 ++-- .../ip-packet-router/src/config/template.rs | 2 +- .../ip-packet-router/src/error.rs | 2 +- service-providers/ip-packet-router/src/lib.rs | 46 +++++++++---------- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/gateway/src/error.rs b/gateway/src/error.rs index d69b8eb480..470e5421c4 100644 --- a/gateway/src/error.rs +++ b/gateway/src/error.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::node::storage::error::StorageError; -use nym_ip_packet_router::error::IpForwarderError; +use nym_ip_packet_router::error::IpPacketRouterError; use nym_network_requester::error::{ClientCoreError, NetworkRequesterError}; use nym_validator_client::nyxd::error::NyxdError; use nym_validator_client::nyxd::AccountId; @@ -110,7 +110,7 @@ pub(crate) enum GatewayError { #[error("there was an issue with the local ip packet router: {source}")] IpPacketRouterFailure { #[from] - source: IpForwarderError, + source: IpPacketRouterError, }, #[error("failed to startup local network requester")] diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index d3851a671c..573453e3de 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -346,7 +346,7 @@ impl Gateway { // TODO: well, wire it up internally to gateway traffic, shutdowns, etc. let (on_start_tx, on_start_rx) = oneshot::channel(); - let mut ip_builder = nym_ip_packet_router::IpForwarderBuilder::new(ip_opts.config.clone()) + let mut ip_builder = nym_ip_packet_router::IpPacketRouterBuilder::new(ip_opts.config.clone()) .with_shutdown(shutdown) .with_custom_gateway_transceiver(Box::new(transceiver)) .with_wait_for_gateway(true) diff --git a/service-providers/ip-packet-router/src/config/mod.rs b/service-providers/ip-packet-router/src/config/mod.rs index 19bcaedc49..4b6b811bda 100644 --- a/service-providers/ip-packet-router/src/config/mod.rs +++ b/service-providers/ip-packet-router/src/config/mod.rs @@ -12,28 +12,28 @@ use std::{ path::{Path, PathBuf}, }; -use crate::config::persistence::IpForwarderPaths; +use crate::config::persistence::IpPacketRouterPaths; use self::template::CONFIG_TEMPLATE; mod persistence; mod template; -const DEFAULT_IP_FORWARDERS_DIR: &str = "ip-forwarder"; +const DEFAULT_IP_PACKET_ROUTER_DIR: &str = "ip-packet-router"; -/// Derive default path to ip forwarder's config directory. -/// It should get resolved to `$HOME/.nym/service-providers/ip-forwareder//config` +/// Derive default path to ip packet routers' config directory. +/// It should get resolved to `$HOME/.nym/service-providers/ip-packet-router//config` pub fn default_config_directory>(id: P) -> PathBuf { must_get_home() .join(NYM_DIR) .join(DEFAULT_SERVICE_PROVIDERS_DIR) - .join(DEFAULT_IP_FORWARDERS_DIR) + .join(DEFAULT_IP_PACKET_ROUTER_DIR) .join(id) .join(DEFAULT_CONFIG_DIR) } -/// Derive default path to ip forwarder's config file. -/// It should get resolved to `$HOME/.nym/service-providers/ip-forwarder//config/config.toml` +/// Derive default path to ip packet routers' config file. +/// It should get resolved to `$HOME/.nym/service-providers/ip-packet-router//config/config.toml` pub fn default_config_filepath>(id: P) -> PathBuf { default_config_directory(id).join(DEFAULT_CONFIG_FILENAME) } @@ -44,7 +44,7 @@ pub fn default_data_directory>(id: P) -> PathBuf { must_get_home() .join(NYM_DIR) .join(DEFAULT_SERVICE_PROVIDERS_DIR) - .join(DEFAULT_IP_FORWARDERS_DIR) + .join(DEFAULT_IP_PACKET_ROUTER_DIR) .join(id) .join(DEFAULT_DATA_DIR) } @@ -55,7 +55,7 @@ pub struct Config { #[serde(flatten)] pub base: BaseClientConfig, - pub storage_paths: IpForwarderPaths, + pub storage_paths: IpPacketRouterPaths, pub logging: LoggingSettings, } @@ -70,13 +70,13 @@ impl Config { pub fn new>(id: S) -> Self { Config { base: BaseClientConfig::new(id.as_ref(), env!("CARGO_PKG_VERSION")), - storage_paths: IpForwarderPaths::new_base(default_data_directory(id.as_ref())), + storage_paths: IpPacketRouterPaths::new_base(default_data_directory(id.as_ref())), logging: Default::default(), } } pub fn with_data_directory>(mut self, data_directory: P) -> Self { - self.storage_paths = IpForwarderPaths::new_base(data_directory); + self.storage_paths = IpPacketRouterPaths::new_base(data_directory); self } diff --git a/service-providers/ip-packet-router/src/config/persistence.rs b/service-providers/ip-packet-router/src/config/persistence.rs index 17276d36b3..7f60a98f8c 100644 --- a/service-providers/ip-packet-router/src/config/persistence.rs +++ b/service-providers/ip-packet-router/src/config/persistence.rs @@ -8,21 +8,21 @@ use std::path::{Path, PathBuf}; pub const DEFAULT_DESCRIPTION_FILENAME: &str = "description.toml"; #[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone)] -pub struct IpForwarderPaths { +pub struct IpPacketRouterPaths { #[serde(flatten)] pub common_paths: CommonClientPaths, /// Location of the file containing our description - pub ip_forwarder_description: PathBuf, + pub ip_packet_router_description: PathBuf, } -impl IpForwarderPaths { +impl IpPacketRouterPaths { pub fn new_base>(base_data_directory: P) -> Self { let base_dir = base_data_directory.as_ref(); Self { common_paths: CommonClientPaths::new_base(base_dir), - ip_forwarder_description: base_dir.join(DEFAULT_DESCRIPTION_FILENAME), + ip_packet_router_description: base_dir.join(DEFAULT_DESCRIPTION_FILENAME), } } } diff --git a/service-providers/ip-packet-router/src/config/template.rs b/service-providers/ip-packet-router/src/config/template.rs index 2da118a580..bbd9e18d5d 100644 --- a/service-providers/ip-packet-router/src/config/template.rs +++ b/service-providers/ip-packet-router/src/config/template.rs @@ -76,7 +76,7 @@ allowed_list_location = '{{ storage_paths.allowed_list_location }}' unknown_list_location = '{{ storage_paths.unknown_list_location }}' # Path to file containing description of this network-requester. -ip_forwarder_description = '{{ storage_paths.ip_forwarder_description }}' +ip_packet_router_description = '{{ storage_paths.ip_packet_router_description }}' ##### logging configuration options ##### diff --git a/service-providers/ip-packet-router/src/error.rs b/service-providers/ip-packet-router/src/error.rs index 1fb4be6ad6..20f0c3d319 100644 --- a/service-providers/ip-packet-router/src/error.rs +++ b/service-providers/ip-packet-router/src/error.rs @@ -1,7 +1,7 @@ pub use nym_client_core::error::ClientCoreError; #[derive(thiserror::Error, Debug)] -pub enum IpForwarderError { +pub enum IpPacketRouterError { #[error("I/O error: {0}")] IoError(#[from] std::io::Error), diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index 2cfaffbbe7..4e720b04ac 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -1,6 +1,6 @@ use std::{net::IpAddr, path::Path}; -use error::IpForwarderError; +use error::IpPacketRouterError; use futures::{channel::oneshot, StreamExt}; use nym_client_core::{ client::mix_traffic::transceiver::GatewayTransceiver, @@ -32,7 +32,7 @@ impl OnStartData { } } -pub struct IpForwarderBuilder { +pub struct IpPacketRouterBuilder { config: Config, wait_for_gateway: bool, custom_topology_provider: Option>, @@ -41,7 +41,7 @@ pub struct IpForwarderBuilder { on_start: Option>, } -impl IpForwarderBuilder { +impl IpPacketRouterBuilder { pub fn new(config: Config) -> Self { Self { config, @@ -92,13 +92,13 @@ impl IpForwarderBuilder { pub fn with_stored_topology>( mut self, file: P, - ) -> Result { + ) -> Result { self.custom_topology_provider = Some(Box::new(HardcodedTopologyProvider::new_from_file(file)?)); Ok(self) } - pub async fn run_service_provider(self) -> Result<(), IpForwarderError> { + pub async fn run_service_provider(self) -> Result<(), IpPacketRouterError> { // Used to notify tasks to shutdown. Not all tasks fully supports this (yet). let task_handle: TaskHandle = self.shutdown.map(Into::into).unwrap_or_default(); @@ -119,7 +119,7 @@ impl IpForwarderBuilder { let (tun, tun_task_tx, tun_task_response_rx) = nym_wireguard::tun_device::TunDevice::new(None); - let ip_forwarder_service = IpForwarder { + let ip_packet_router_service = IpPacketRouter { config: self.config, tun, tun_task_tx, @@ -134,15 +134,15 @@ impl IpForwarderBuilder { if let Some(on_start) = self.on_start { if on_start.send(OnStartData::new(self_address)).is_err() { // the parent has dropped the channel before receiving the response - return Err(IpForwarderError::DisconnectedParent); + return Err(IpPacketRouterError::DisconnectedParent); } } - ip_forwarder_service.run().await + ip_packet_router_service.run().await } } -struct IpForwarder { +struct IpPacketRouter { config: Config, tun: nym_wireguard::tun_device::TunDevice, tun_task_tx: nym_wireguard::tun_task_channel::TunTaskTx, @@ -151,19 +151,19 @@ struct IpForwarder { task_handle: TaskHandle, } -impl IpForwarder { - async fn run(mut self) -> Result<(), IpForwarderError> { +impl IpPacketRouter { + async fn run(mut self) -> Result<(), IpPacketRouterError> { let mut task_client = self.task_handle.fork("main_loop"); while !task_client.is_shutdown() { tokio::select! { _ = task_client.recv() => { - log::debug!("IpForwarderService [main loop]: received shutdown"); + log::debug!("IpPacketRouter [main loop]: received shutdown"); }, msg = self.mixnet_client.next() => { if let Some(msg) = msg { self.on_message(msg).await.ok(); } else { - log::trace!("IpForwarderService [main loop]: stopping since channel closed"); + log::trace!("IpPacketRouter [main loop]: stopping since channel closed"); break; }; }, @@ -175,30 +175,30 @@ impl IpForwarder { // .send(input_message) // .await // .tap_err(|err| { - // log::error!("IpForwarderService [main loop]: failed to send packet to mixnet: {err}"); + // log::error!("IpPacketRouter [main loop]: failed to send packet to mixnet: {err}"); // }) // .ok(); } else { - log::trace!("IpForwarderService [main loop]: stopping since channel closed"); + log::trace!("IpPacketRouter [main loop]: stopping since channel closed"); break; } } } } - log::info!("IpForwarderService: stopping"); + log::info!("IpPacketRouter: stopping"); Ok(()) } async fn on_message( &mut self, reconstructed: ReconstructedMessage, - ) -> Result<(), IpForwarderError> { + ) -> Result<(), IpPacketRouterError> { log::info!("Received message: {:?}", reconstructed.sender_tag); let headers = etherparse::SlicedPacket::from_ip(&reconstructed.message).map_err(|err| { log::warn!("Received non-IP packet: {err}"); - IpForwarderError::PacketParseFailed { source: err } + IpPacketRouterError::PacketParseFailed { source: err } })?; let (src_addr, dst_addr): (IpAddr, IpAddr) = match headers.ip { @@ -212,7 +212,7 @@ impl IpForwarder { ), None => { log::warn!("Received non-IP packet"); - return Err(IpForwarderError::PacketMissingHeader); + return Err(IpPacketRouterError::PacketMissingHeader); } }; log::info!("Received packet: {src_addr} -> {dst_addr}"); @@ -242,7 +242,7 @@ async fn create_mixnet_client( custom_topology_provider: Option>, wait_for_gateway: bool, paths: &CommonClientPaths, -) -> Result { +) -> Result { let debug_config = config.debug; let storage_paths = nym_sdk::mixnet::StoragePaths::from(paths.clone()); @@ -250,7 +250,7 @@ async fn create_mixnet_client( let mut client_builder = nym_sdk::mixnet::MixnetClientBuilder::new_with_default_storage(storage_paths) .await - .map_err(|err| IpForwarderError::FailedToSetupMixnetClient { source: err })? + .map_err(|err| IpPacketRouterError::FailedToSetupMixnetClient { source: err })? .network_details(NymNetworkDetails::new_from_env()) .debug_config(debug_config) .custom_shutdown(shutdown) @@ -267,10 +267,10 @@ async fn create_mixnet_client( let mixnet_client = client_builder .build() - .map_err(|err| IpForwarderError::FailedToSetupMixnetClient { source: err })?; + .map_err(|err| IpPacketRouterError::FailedToSetupMixnetClient { source: err })?; mixnet_client .connect_to_mixnet() .await - .map_err(|err| IpForwarderError::FailedToConnectToMixnet { source: err }) + .map_err(|err| IpPacketRouterError::FailedToConnectToMixnet { source: err }) } From 5f5ac4449c3e712d2864b6405409143627680c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 14:16:58 +0100 Subject: [PATCH 130/142] send back to mixnet --- service-providers/ip-packet-router/src/lib.rs | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index 4e720b04ac..5ef1ad41a0 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -11,7 +11,7 @@ use nym_sdk::{ NymNetworkDetails, }; use nym_sphinx::receiver::ReconstructedMessage; -use nym_task::{TaskClient, TaskHandle}; +use nym_task::{connections::TransmissionLane, TaskClient, TaskHandle}; use tap::TapFallible; use crate::config::BaseClientConfig; @@ -118,10 +118,11 @@ impl IpPacketRouterBuilder { // Create the TUN device that we interact with the rest of the world with let (tun, tun_task_tx, tun_task_response_rx) = nym_wireguard::tun_device::TunDevice::new(None); + tun.start(); let ip_packet_router_service = IpPacketRouter { config: self.config, - tun, + // tun, tun_task_tx, tun_task_response_rx, mixnet_client, @@ -144,7 +145,7 @@ impl IpPacketRouterBuilder { struct IpPacketRouter { config: Config, - tun: nym_wireguard::tun_device::TunDevice, + // tun: nym_wireguard::tun_device::TunDevice, tun_task_tx: nym_wireguard::tun_task_channel::TunTaskTx, tun_task_response_rx: nym_wireguard::tun_task_channel::TunTaskResponseRx, mixnet_client: nym_sdk::mixnet::MixnetClient, @@ -154,6 +155,7 @@ struct IpPacketRouter { impl IpPacketRouter { async fn run(mut self) -> Result<(), IpPacketRouterError> { let mut task_client = self.task_handle.fork("main_loop"); + while !task_client.is_shutdown() { tokio::select! { _ = task_client.recv() => { @@ -168,16 +170,21 @@ impl IpPacketRouter { }; }, packet = self.tun_task_response_rx.recv() => { - if let Some((tag, packet)) = packet { - // let input_message = InputMessage { - // }; - // self.mixnet_client - // .send(input_message) - // .await - // .tap_err(|err| { - // log::error!("IpPacketRouter [main loop]: failed to send packet to mixnet: {err}"); - // }) - // .ok(); + if let Some((_tag, packet)) = packet { + // TODO: basically we need to map the tag to the recipient + // For now we just hardcode the recipient + let recipient = Recipient::try_from_base58_string("sfl;sdf").unwrap(); + let lane = TransmissionLane::General; + let packet_type = None; + let input_message = InputMessage::new_regular(recipient, packet, lane, packet_type); + + self.mixnet_client + .send(input_message) + .await + .tap_err(|err| { + log::error!("IpPacketRouter [main loop]: failed to send packet to mixnet: {err}"); + }) + .ok(); } else { log::trace!("IpPacketRouter [main loop]: stopping since channel closed"); break; @@ -218,9 +225,9 @@ impl IpPacketRouter { log::info!("Received packet: {src_addr} -> {dst_addr}"); // TODO: set the tag correctly. Can we just reuse sender_tag? - let tag = 0; + let peer_tag = 0; self.tun_task_tx - .send((tag, reconstructed.message)) + .send((peer_tag, reconstructed.message)) .await .tap_err(|err| { log::error!("Failed to send packet to tun device: {err}"); From 6beb77e464f9ea26a72d9f2ace174750cb90965d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 14:18:27 +0100 Subject: [PATCH 131/142] rustfmt --- gateway/src/node/mod.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 573453e3de..d3764c635a 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -346,11 +346,12 @@ impl Gateway { // TODO: well, wire it up internally to gateway traffic, shutdowns, etc. let (on_start_tx, on_start_rx) = oneshot::channel(); - let mut ip_builder = nym_ip_packet_router::IpPacketRouterBuilder::new(ip_opts.config.clone()) - .with_shutdown(shutdown) - .with_custom_gateway_transceiver(Box::new(transceiver)) - .with_wait_for_gateway(true) - .with_on_start(on_start_tx); + let mut ip_builder = + nym_ip_packet_router::IpPacketRouterBuilder::new(ip_opts.config.clone()) + .with_shutdown(shutdown) + .with_custom_gateway_transceiver(Box::new(transceiver)) + .with_wait_for_gateway(true) + .with_on_start(on_start_tx); if let Some(custom_mixnet) = &ip_opts.custom_mixnet_path { ip_builder = ip_builder.with_stored_topology(custom_mixnet)? From 71a409cc0dcd949209574e693fa14b3f3e64ae17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 17:01:35 +0100 Subject: [PATCH 132/142] Add RoutingMode enum --- .../src/platform/linux/tun_device.rs | 84 +++++++++++++------ 1 file changed, 58 insertions(+), 26 deletions(-) diff --git a/common/wireguard/src/platform/linux/tun_device.rs b/common/wireguard/src/platform/linux/tun_device.rs index 1bf84eb52d..196102394f 100644 --- a/common/wireguard/src/platform/linux/tun_device.rs +++ b/common/wireguard/src/platform/linux/tun_device.rs @@ -42,11 +42,35 @@ pub struct TunDevice { // And when we get replies, this is where we should send it tun_task_response_tx: TunTaskResponseTx, + routing_mode: RoutingMode, +} + +enum RoutingMode { // The routing table, as how wireguard does it - peers_by_ip: Option>>, + AllowedIps(AllowedIpsInner), // This is an alternative to the routing table, where we just match outgoing source IP with // incoming destination IP. + Nat(NatInner), +} + +impl RoutingMode { + fn new_nat() -> Self { + RoutingMode::Nat(NatInner { + nat_table: HashMap::new(), + }) + } + + fn new_allowed_ips(peers_by_ip: Arc>) -> Self { + RoutingMode::AllowedIps(AllowedIpsInner { peers_by_ip }) + } +} + +struct AllowedIpsInner { + peers_by_ip: Arc>, +} + +struct NatInner { nat_table: HashMap, } @@ -65,12 +89,16 @@ impl TunDevice { let (tun_task_tx, tun_task_rx) = tun_task_channel(); let (tun_task_response_tx, tun_task_response_rx) = tun_task_response_channel(); + let routing_mode = match peers_by_ip { + Some(peers_by_ip) => RoutingMode::new_allowed_ips(peers_by_ip), + None => RoutingMode::new_nat(), + }; + let tun_device = TunDevice { tun_task_rx, tun_task_response_tx, tun, - peers_by_ip, - nat_table: HashMap::new(), + routing_mode, }; (tun_device, tun_task_tx, tun_task_response_rx) @@ -93,7 +121,9 @@ impl TunDevice { ); // TODO: expire old entries - self.nat_table.insert(src_addr, tag); + if let RoutingMode::Nat(nat_table) = &mut self.routing_mode { + nat_table.nat_table.insert(src_addr, tag); + } self.tun .write_all(&packet) @@ -121,30 +151,32 @@ impl TunDevice { // Route packet to the correct peer. - // This is how wireguard does it, by consulting the AllowedIPs table. - if false { - let peers = self.peers_by_ip.as_ref().unwrap().lock().await; - if let Some(peer_tx) = peers.longest_match(dst_addr).map(|(_, tx)| tx) { - log::info!("Forward packet to wg tunnel"); - peer_tx - .send(Event::Ip(packet.to_vec().into())) - .await - .tap_err(|err| log::error!("{err}")) - .ok(); - return; + match self.routing_mode { + // This is how wireguard does it, by consulting the AllowedIPs table. + RoutingMode::AllowedIps(ref peers_by_ip) => { + let peers = peers_by_ip.peers_by_ip.as_ref().lock().await; + if let Some(peer_tx) = peers.longest_match(dst_addr).map(|(_, tx)| tx) { + log::info!("Forward packet to wg tunnel"); + peer_tx + .send(Event::Ip(packet.to_vec().into())) + .await + .tap_err(|err| log::error!("{err}")) + .ok(); + return; + } } - } - // But we do it by consulting the NAT table. - { - if let Some(tag) = self.nat_table.get(&dst_addr) { - log::info!("Forward packet to wg tunnel with tag: {tag}"); - self.tun_task_response_tx - .send((*tag, packet.to_vec())) - .await - .tap_err(|err| log::error!("{err}")) - .ok(); - return; + // But we do it by consulting the NAT table. + RoutingMode::Nat(ref nat_table) => { + if let Some(tag) = nat_table.nat_table.get(&dst_addr) { + log::info!("Forward packet to wg tunnel with tag: {tag}"); + self.tun_task_response_tx + .send((*tag, packet.to_vec())) + .await + .tap_err(|err| log::error!("{err}")) + .ok(); + return; + } } } From 90c40b76f57c1b90feb21bf21ad391abac09a099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 2 Nov 2023 17:01:49 +0100 Subject: [PATCH 133/142] rustfmt --- service-providers/ip-packet-router/src/error.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/service-providers/ip-packet-router/src/error.rs b/service-providers/ip-packet-router/src/error.rs index 20f0c3d319..8bf599e232 100644 --- a/service-providers/ip-packet-router/src/error.rs +++ b/service-providers/ip-packet-router/src/error.rs @@ -28,9 +28,7 @@ pub enum IpPacketRouterError { DisconnectedParent, #[error("failed to parse incoming packet: {source}")] - PacketParseFailed { - source: etherparse::ReadError, - }, + PacketParseFailed { source: etherparse::ReadError }, #[error("parsed packet is missing IP header")] PacketMissingHeader, From 756aca36ad74bc70bfb287bc3d2b1af922410269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 3 Nov 2023 09:25:53 +0100 Subject: [PATCH 134/142] Take RoutingMode as argument --- common/wireguard/src/lib.rs | 17 ++++++++++++----- .../wireguard/src/platform/linux/tun_device.rs | 18 +++++++----------- service-providers/ip-packet-router/src/lib.rs | 9 +++++---- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/common/wireguard/src/lib.rs b/common/wireguard/src/lib.rs index bd5aa47b4f..9d734ce8d9 100644 --- a/common/wireguard/src/lib.rs +++ b/common/wireguard/src/lib.rs @@ -32,17 +32,24 @@ pub async fn start_wireguard( task_client: nym_task::TaskClient, gateway_client_registry: Arc, ) -> Result<(), Box> { - // We can either index peers by their IP like standard wireguard + // TODO: make this configurable + + // We can optionally index peers by their IP like standard wireguard. If we don't then we do + // plain NAT where we match incoming destination IP with outgoing source IP. let peers_by_ip = Arc::new(tokio::sync::Mutex::new(network_table::NetworkTable::new())); - // ... or by their tunnel tag, which is a random number assigned to them - let peers_by_tag = Arc::new(tokio::sync::Mutex::new(wg_tunnel::PeersByTag::new())); + // Alternative 1: + let routing_mode = tun_device::RoutingMode::new_allowed_ips(peers_by_ip.clone()); + // Alternative 2: + //let routing_mode = tun_device::RoutingMode::new_nat(); // Start the tun device that is used to relay traffic outbound - let (tun, tun_task_tx, tun_task_response_rx) = - tun_device::TunDevice::new(Some(peers_by_ip.clone())); + let (tun, tun_task_tx, tun_task_response_rx) = tun_device::TunDevice::new(routing_mode); tun.start(); + // We also index peers by a tag + let peers_by_tag = Arc::new(tokio::sync::Mutex::new(wg_tunnel::PeersByTag::new())); + // If we want to have the tun device on a separate host, it's the tun_task and // tun_task_response channels that needs to be sent over the network to the host where the tun // device is running. diff --git a/common/wireguard/src/platform/linux/tun_device.rs b/common/wireguard/src/platform/linux/tun_device.rs index 196102394f..638c00ce3f 100644 --- a/common/wireguard/src/platform/linux/tun_device.rs +++ b/common/wireguard/src/platform/linux/tun_device.rs @@ -45,7 +45,7 @@ pub struct TunDevice { routing_mode: RoutingMode, } -enum RoutingMode { +pub enum RoutingMode { // The routing table, as how wireguard does it AllowedIps(AllowedIpsInner), @@ -55,28 +55,29 @@ enum RoutingMode { } impl RoutingMode { - fn new_nat() -> Self { + pub fn new_nat() -> Self { RoutingMode::Nat(NatInner { nat_table: HashMap::new(), }) } - fn new_allowed_ips(peers_by_ip: Arc>) -> Self { + pub fn new_allowed_ips(peers_by_ip: Arc>) -> Self { RoutingMode::AllowedIps(AllowedIpsInner { peers_by_ip }) } } -struct AllowedIpsInner { +pub struct AllowedIpsInner { peers_by_ip: Arc>, } -struct NatInner { +pub struct NatInner { nat_table: HashMap, } impl TunDevice { pub fn new( - peers_by_ip: Option>>, + routing_mode: RoutingMode, + // peers_by_ip: Option>>, ) -> (Self, TunTaskTx, TunTaskResponseRx) { let tun = setup_tokio_tun_device( format!("{TUN_BASE_NAME}%d").as_str(), @@ -89,11 +90,6 @@ impl TunDevice { let (tun_task_tx, tun_task_rx) = tun_task_channel(); let (tun_task_response_tx, tun_task_response_rx) = tun_task_response_channel(); - let routing_mode = match peers_by_ip { - Some(peers_by_ip) => RoutingMode::new_allowed_ips(peers_by_ip), - None => RoutingMode::new_nat(), - }; - let tun_device = TunDevice { tun_task_rx, tun_task_response_tx, diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index 5ef1ad41a0..2dd483817d 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -116,12 +116,13 @@ impl IpPacketRouterBuilder { let self_address = *mixnet_client.nym_address(); // Create the TUN device that we interact with the rest of the world with - let (tun, tun_task_tx, tun_task_response_rx) = - nym_wireguard::tun_device::TunDevice::new(None); + let (tun, tun_task_tx, tun_task_response_rx) = nym_wireguard::tun_device::TunDevice::new( + nym_wireguard::tun_device::RoutingMode::new_nat(), + ); tun.start(); let ip_packet_router_service = IpPacketRouter { - config: self.config, + _config: self.config, // tun, tun_task_tx, tun_task_response_rx, @@ -144,7 +145,7 @@ impl IpPacketRouterBuilder { } struct IpPacketRouter { - config: Config, + _config: Config, // tun: nym_wireguard::tun_device::TunDevice, tun_task_tx: nym_wireguard::tun_task_channel::TunTaskTx, tun_task_response_rx: nym_wireguard::tun_task_channel::TunTaskResponseRx, From 60b1c1208a2f6eba2fde4fa6023884ce0ef321b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 3 Nov 2023 09:31:17 +0100 Subject: [PATCH 135/142] NYM_CLIENT_ADDR --- service-providers/ip-packet-router/src/lib.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index 2dd483817d..2abd76c129 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -172,9 +172,15 @@ impl IpPacketRouter { }, packet = self.tun_task_response_rx.recv() => { if let Some((_tag, packet)) = packet { - // TODO: basically we need to map the tag to the recipient - // For now we just hardcode the recipient - let recipient = Recipient::try_from_base58_string("sfl;sdf").unwrap(); + // Read recipient from env variable NYM_CLIENT_ADDR which is a base58 + // string of the nym-address of the client that the packet should be + // sent back to. + let recipient_addr = std::env::var("NYM_CLIENT_ADDR").expect("NYM_CLIENT_ADDR not set"); + let recipient = Recipient::try_from_base58_string(recipient_addr).expect("NYM_CLIENT_ADDR is not a valid nym address"); + + // In the near future we will let the client expose it's nym-address + // directly, and after that, provide SURBS + let lane = TransmissionLane::General; let packet_type = None; let input_message = InputMessage::new_regular(recipient, packet, lane, packet_type); From 462c15887eb65cde1b6be0ca38139002b5a11551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 3 Nov 2023 10:03:05 +0100 Subject: [PATCH 136/142] Fix compilation on non-linux --- service-providers/ip-packet-router/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index 2abd76c129..6369e87774 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -33,6 +33,7 @@ impl OnStartData { } pub struct IpPacketRouterBuilder { + #[allow(unused)] config: Config, wait_for_gateway: bool, custom_topology_provider: Option>, @@ -98,6 +99,12 @@ impl IpPacketRouterBuilder { Ok(self) } + #[cfg(not(target_os = "linux"))] + pub async fn run_service_provider(self) -> Result<(), IpPacketRouterError> { + todo!("service provider is not yet supported on this platform") + } + + #[cfg(target_os = "linux")] pub async fn run_service_provider(self) -> Result<(), IpPacketRouterError> { // Used to notify tasks to shutdown. Not all tasks fully supports this (yet). let task_handle: TaskHandle = self.shutdown.map(Into::into).unwrap_or_default(); @@ -144,6 +151,7 @@ impl IpPacketRouterBuilder { } } +#[allow(unused)] struct IpPacketRouter { _config: Config, // tun: nym_wireguard::tun_device::TunDevice, @@ -153,6 +161,7 @@ struct IpPacketRouter { task_handle: TaskHandle, } +#[allow(unused)] impl IpPacketRouter { async fn run(mut self) -> Result<(), IpPacketRouterError> { let mut task_client = self.task_handle.fork("main_loop"); @@ -249,6 +258,7 @@ impl IpPacketRouter { // This is NOT in the SDK since we don't want to expose any of the client-core config types. // We could however consider moving it to a crate in common in the future. // TODO: refactor this function and its arguments +#[allow(unused)] async fn create_mixnet_client( config: &BaseClientConfig, shutdown: TaskClient, From 807e7e588f9fe43880f9ff0fb95f920afb59f2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 3 Nov 2023 10:49:39 +0100 Subject: [PATCH 137/142] Remove expect on NYM_CLIENT_ADDR --- service-providers/ip-packet-router/src/lib.rs | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/service-providers/ip-packet-router/src/lib.rs b/service-providers/ip-packet-router/src/lib.rs index 6369e87774..4957c2c02d 100644 --- a/service-providers/ip-packet-router/src/lib.rs +++ b/service-providers/ip-packet-router/src/lib.rs @@ -184,23 +184,28 @@ impl IpPacketRouter { // Read recipient from env variable NYM_CLIENT_ADDR which is a base58 // string of the nym-address of the client that the packet should be // sent back to. - let recipient_addr = std::env::var("NYM_CLIENT_ADDR").expect("NYM_CLIENT_ADDR not set"); - let recipient = Recipient::try_from_base58_string(recipient_addr).expect("NYM_CLIENT_ADDR is not a valid nym address"); - + // // In the near future we will let the client expose it's nym-address // directly, and after that, provide SURBS + let recipient = std::env::var("NYM_CLIENT_ADDR").ok().and_then(|addr| { + Recipient::try_from_base58_string(addr).ok() + }); - let lane = TransmissionLane::General; - let packet_type = None; - let input_message = InputMessage::new_regular(recipient, packet, lane, packet_type); + if let Some(recipient) = recipient { + let lane = TransmissionLane::General; + let packet_type = None; + let input_message = InputMessage::new_regular(recipient, packet, lane, packet_type); - self.mixnet_client - .send(input_message) - .await - .tap_err(|err| { - log::error!("IpPacketRouter [main loop]: failed to send packet to mixnet: {err}"); - }) - .ok(); + self.mixnet_client + .send(input_message) + .await + .tap_err(|err| { + log::error!("IpPacketRouter [main loop]: failed to send packet to mixnet: {err}"); + }) + .ok(); + } else { + log::error!("NYM_CLIENT_ADDR not set or invalid"); + } } else { log::trace!("IpPacketRouter [main loop]: stopping since channel closed"); break; From 43bd1ba419bb1048c1a8fb20fe18cdfd385fb30b Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Fri, 3 Nov 2023 10:59:00 +0100 Subject: [PATCH 138/142] updated mdbook admonish assets --- documentation/operators/book.toml | 2 +- documentation/operators/mdbook-admonish.css | 172 +++++++++++--------- 2 files changed, 93 insertions(+), 81 deletions(-) diff --git a/documentation/operators/book.toml b/documentation/operators/book.toml index 56a5b00162..d238a5c745 100644 --- a/documentation/operators/book.toml +++ b/documentation/operators/book.toml @@ -42,7 +42,7 @@ turn-off = true [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` +assets_version = "2.0.1" # do not edit: managed by `mdbook-admonish install` # variables preprocessor: import variables into files # https://gitlab.com/tglman/mdbook-variables/ diff --git a/documentation/operators/mdbook-admonish.css b/documentation/operators/mdbook-admonish.css index e0a3365532..244bc9ade7 100644 --- a/documentation/operators/mdbook-admonish.css +++ b/documentation/operators/mdbook-admonish.css @@ -1,18 +1,31 @@ @charset "UTF-8"; :root { - --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--note: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--abstract: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--info: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--tip: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--success: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--question: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--warning: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--failure: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--danger: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--bug: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--example: + url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--quote: + url("data:image/svg+xml;charset=utf-8,"); + --md-details-icon: + url("data:image/svg+xml;charset=utf-8,"); } :is(.admonition) { @@ -62,7 +75,7 @@ a.admonition-anchor-link::before { content: "§"; } -:is(.admonition-title, summary.admonition-title) { +:is(.admonition-title, summary) { position: relative; min-height: 4rem; margin-block: 0; @@ -73,13 +86,13 @@ a.admonition-anchor-link::before { background-color: rgba(68, 138, 255, 0.1); display: flex; } -:is(.admonition-title, summary.admonition-title) p { +:is(.admonition-title, summary) p { margin: 0; } -html :is(.admonition-title, summary.admonition-title):last-child { +html :is(.admonition-title, summary):last-child { margin-bottom: 0; } -:is(.admonition-title, summary.admonition-title)::before { +:is(.admonition-title, summary)::before { position: absolute; top: 0.625em; inset-inline-start: 1.6rem; @@ -94,7 +107,7 @@ html :is(.admonition-title, summary.admonition-title):last-child { -webkit-mask-size: contain; content: ""; } -:is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { +:is(.admonition-title, summary):hover a.admonition-anchor-link { display: initial; } @@ -119,204 +132,204 @@ details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } -:is(.admonition):is(.admonish-note) { +:is(.admonition):is(.note) { border-color: #448aff; } -:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { +:is(.note) > :is(.admonition-title, summary) { background-color: rgba(68, 138, 255, 0.1); } -:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { +:is(.note) > :is(.admonition-title, summary)::before { background-color: #448aff; - mask-image: var(--md-admonition-icon--admonish-note); - -webkit-mask-image: var(--md-admonition-icon--admonish-note); + mask-image: var(--md-admonition-icon--note); + -webkit-mask-image: var(--md-admonition-icon--note); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { +:is(.admonition):is(.abstract, .summary, .tldr) { border-color: #00b0ff; } -:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { background-color: rgba(0, 176, 255, 0.1); } -:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { +:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { background-color: #00b0ff; - mask-image: var(--md-admonition-icon--admonish-abstract); - -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); + mask-image: var(--md-admonition-icon--abstract); + -webkit-mask-image: var(--md-admonition-icon--abstract); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-info, .admonish-todo) { +:is(.admonition):is(.info, .todo) { border-color: #00b8d4; } -:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { +:is(.info, .todo) > :is(.admonition-title, summary) { background-color: rgba(0, 184, 212, 0.1); } -:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { +:is(.info, .todo) > :is(.admonition-title, summary)::before { background-color: #00b8d4; - mask-image: var(--md-admonition-icon--admonish-info); - -webkit-mask-image: var(--md-admonition-icon--admonish-info); + mask-image: var(--md-admonition-icon--info); + -webkit-mask-image: var(--md-admonition-icon--info); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { +:is(.admonition):is(.tip, .hint, .important) { border-color: #00bfa5; } -:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { +:is(.tip, .hint, .important) > :is(.admonition-title, summary) { background-color: rgba(0, 191, 165, 0.1); } -:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { +:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { background-color: #00bfa5; - mask-image: var(--md-admonition-icon--admonish-tip); - -webkit-mask-image: var(--md-admonition-icon--admonish-tip); + mask-image: var(--md-admonition-icon--tip); + -webkit-mask-image: var(--md-admonition-icon--tip); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { +:is(.admonition):is(.success, .check, .done) { border-color: #00c853; } -:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { +:is(.success, .check, .done) > :is(.admonition-title, summary) { background-color: rgba(0, 200, 83, 0.1); } -:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { +:is(.success, .check, .done) > :is(.admonition-title, summary)::before { background-color: #00c853; - mask-image: var(--md-admonition-icon--admonish-success); - -webkit-mask-image: var(--md-admonition-icon--admonish-success); + mask-image: var(--md-admonition-icon--success); + -webkit-mask-image: var(--md-admonition-icon--success); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { +:is(.admonition):is(.question, .help, .faq) { border-color: #64dd17; } -:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { +:is(.question, .help, .faq) > :is(.admonition-title, summary) { background-color: rgba(100, 221, 23, 0.1); } -:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { +:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { background-color: #64dd17; - mask-image: var(--md-admonition-icon--admonish-question); - -webkit-mask-image: var(--md-admonition-icon--admonish-question); + mask-image: var(--md-admonition-icon--question); + -webkit-mask-image: var(--md-admonition-icon--question); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { +:is(.admonition):is(.warning, .caution, .attention) { border-color: #ff9100; } -:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { +:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { background-color: rgba(255, 145, 0, 0.1); } -:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { +:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { background-color: #ff9100; - mask-image: var(--md-admonition-icon--admonish-warning); - -webkit-mask-image: var(--md-admonition-icon--admonish-warning); + mask-image: var(--md-admonition-icon--warning); + -webkit-mask-image: var(--md-admonition-icon--warning); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { +:is(.admonition):is(.failure, .fail, .missing) { border-color: #ff5252; } -:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { +:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { background-color: rgba(255, 82, 82, 0.1); } -:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { +:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { background-color: #ff5252; - mask-image: var(--md-admonition-icon--admonish-failure); - -webkit-mask-image: var(--md-admonition-icon--admonish-failure); + mask-image: var(--md-admonition-icon--failure); + -webkit-mask-image: var(--md-admonition-icon--failure); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-danger, .admonish-error) { +:is(.admonition):is(.danger, .error) { border-color: #ff1744; } -:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { +:is(.danger, .error) > :is(.admonition-title, summary) { background-color: rgba(255, 23, 68, 0.1); } -:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { +:is(.danger, .error) > :is(.admonition-title, summary)::before { background-color: #ff1744; - mask-image: var(--md-admonition-icon--admonish-danger); - -webkit-mask-image: var(--md-admonition-icon--admonish-danger); + mask-image: var(--md-admonition-icon--danger); + -webkit-mask-image: var(--md-admonition-icon--danger); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-bug) { +:is(.admonition):is(.bug) { border-color: #f50057; } -:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { +:is(.bug) > :is(.admonition-title, summary) { background-color: rgba(245, 0, 87, 0.1); } -:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { +:is(.bug) > :is(.admonition-title, summary)::before { background-color: #f50057; - mask-image: var(--md-admonition-icon--admonish-bug); - -webkit-mask-image: var(--md-admonition-icon--admonish-bug); + mask-image: var(--md-admonition-icon--bug); + -webkit-mask-image: var(--md-admonition-icon--bug); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-example) { +:is(.admonition):is(.example) { border-color: #7c4dff; } -:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { +:is(.example) > :is(.admonition-title, summary) { background-color: rgba(124, 77, 255, 0.1); } -:is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { +:is(.example) > :is(.admonition-title, summary)::before { background-color: #7c4dff; - mask-image: var(--md-admonition-icon--admonish-example); - -webkit-mask-image: var(--md-admonition-icon--admonish-example); + mask-image: var(--md-admonition-icon--example); + -webkit-mask-image: var(--md-admonition-icon--example); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.admonish-quote, .admonish-cite) { +:is(.admonition):is(.quote, .cite) { border-color: #9e9e9e; } -:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { +:is(.quote, .cite) > :is(.admonition-title, summary) { background-color: rgba(158, 158, 158, 0.1); } -:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { +:is(.quote, .cite) > :is(.admonition-title, summary)::before { background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--admonish-quote); - -webkit-mask-image: var(--md-admonition-icon--admonish-quote); + mask-image: var(--md-admonition-icon--quote); + -webkit-mask-image: var(--md-admonition-icon--quote); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; @@ -327,8 +340,7 @@ details[open].admonition > summary.admonition-title::after { background-color: var(--sidebar-bg); } -.ayu :is(.admonition), -.coal :is(.admonition) { +.ayu :is(.admonition), .coal :is(.admonition) { background-color: var(--theme-hover); } From ba48b71b23f2bade86f41c84c4f7124d2d3a2885 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Fri, 3 Nov 2023 11:29:20 +0100 Subject: [PATCH 139/142] install admonish to all books --- documentation/dev-portal/book.toml | 2 +- documentation/dev-portal/mdbook-admonish.css | 172 +++++++++---------- documentation/docs/book.toml | 2 +- documentation/docs/mdbook-admonish.css | 172 +++++++++---------- documentation/operators/book.toml | 2 +- documentation/operators/mdbook-admonish.css | 172 +++++++++---------- 6 files changed, 243 insertions(+), 279 deletions(-) diff --git a/documentation/dev-portal/book.toml b/documentation/dev-portal/book.toml index 1012ec22f9..d0dfbe0674 100644 --- a/documentation/dev-portal/book.toml +++ b/documentation/dev-portal/book.toml @@ -43,7 +43,7 @@ turn-off = true [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "2.0.1" # do not edit: managed by `mdbook-admonish install` +assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` # variables preprocessor: import variables into files # https://gitlab.com/tglman/mdbook-variables/ diff --git a/documentation/dev-portal/mdbook-admonish.css b/documentation/dev-portal/mdbook-admonish.css index 244bc9ade7..e0a3365532 100644 --- a/documentation/dev-portal/mdbook-admonish.css +++ b/documentation/dev-portal/mdbook-admonish.css @@ -1,31 +1,18 @@ @charset "UTF-8"; :root { - --md-admonition-icon--note: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--abstract: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--info: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--tip: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--success: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--question: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--warning: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--failure: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--danger: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--bug: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--example: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--quote: - url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: - url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); + --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); } :is(.admonition) { @@ -75,7 +62,7 @@ a.admonition-anchor-link::before { content: "§"; } -:is(.admonition-title, summary) { +:is(.admonition-title, summary.admonition-title) { position: relative; min-height: 4rem; margin-block: 0; @@ -86,13 +73,13 @@ a.admonition-anchor-link::before { background-color: rgba(68, 138, 255, 0.1); display: flex; } -:is(.admonition-title, summary) p { +:is(.admonition-title, summary.admonition-title) p { margin: 0; } -html :is(.admonition-title, summary):last-child { +html :is(.admonition-title, summary.admonition-title):last-child { margin-bottom: 0; } -:is(.admonition-title, summary)::before { +:is(.admonition-title, summary.admonition-title)::before { position: absolute; top: 0.625em; inset-inline-start: 1.6rem; @@ -107,7 +94,7 @@ html :is(.admonition-title, summary):last-child { -webkit-mask-size: contain; content: ""; } -:is(.admonition-title, summary):hover a.admonition-anchor-link { +:is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { display: initial; } @@ -132,204 +119,204 @@ details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } -:is(.admonition):is(.note) { +:is(.admonition):is(.admonish-note) { border-color: #448aff; } -:is(.note) > :is(.admonition-title, summary) { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(68, 138, 255, 0.1); } -:is(.note) > :is(.admonition-title, summary)::before { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { background-color: #448aff; - mask-image: var(--md-admonition-icon--note); - -webkit-mask-image: var(--md-admonition-icon--note); + mask-image: var(--md-admonition-icon--admonish-note); + -webkit-mask-image: var(--md-admonition-icon--admonish-note); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.abstract, .summary, .tldr) { +:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { border-color: #00b0ff; } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 176, 255, 0.1); } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b0ff; - mask-image: var(--md-admonition-icon--abstract); - -webkit-mask-image: var(--md-admonition-icon--abstract); + mask-image: var(--md-admonition-icon--admonish-abstract); + -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.info, .todo) { +:is(.admonition):is(.admonish-info, .admonish-todo) { border-color: #00b8d4; } -:is(.info, .todo) > :is(.admonition-title, summary) { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 184, 212, 0.1); } -:is(.info, .todo) > :is(.admonition-title, summary)::before { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b8d4; - mask-image: var(--md-admonition-icon--info); - -webkit-mask-image: var(--md-admonition-icon--info); + mask-image: var(--md-admonition-icon--admonish-info); + -webkit-mask-image: var(--md-admonition-icon--admonish-info); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.tip, .hint, .important) { +:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { border-color: #00bfa5; } -:is(.tip, .hint, .important) > :is(.admonition-title, summary) { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 191, 165, 0.1); } -:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00bfa5; - mask-image: var(--md-admonition-icon--tip); - -webkit-mask-image: var(--md-admonition-icon--tip); + mask-image: var(--md-admonition-icon--admonish-tip); + -webkit-mask-image: var(--md-admonition-icon--admonish-tip); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.success, .check, .done) { +:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { border-color: #00c853; } -:is(.success, .check, .done) > :is(.admonition-title, summary) { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 200, 83, 0.1); } -:is(.success, .check, .done) > :is(.admonition-title, summary)::before { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00c853; - mask-image: var(--md-admonition-icon--success); - -webkit-mask-image: var(--md-admonition-icon--success); + mask-image: var(--md-admonition-icon--admonish-success); + -webkit-mask-image: var(--md-admonition-icon--admonish-success); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.question, .help, .faq) { +:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { border-color: #64dd17; } -:is(.question, .help, .faq) > :is(.admonition-title, summary) { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(100, 221, 23, 0.1); } -:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { background-color: #64dd17; - mask-image: var(--md-admonition-icon--question); - -webkit-mask-image: var(--md-admonition-icon--question); + mask-image: var(--md-admonition-icon--admonish-question); + -webkit-mask-image: var(--md-admonition-icon--admonish-question); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.warning, .caution, .attention) { +:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { border-color: #ff9100; } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 145, 0, 0.1); } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff9100; - mask-image: var(--md-admonition-icon--warning); - -webkit-mask-image: var(--md-admonition-icon--warning); + mask-image: var(--md-admonition-icon--admonish-warning); + -webkit-mask-image: var(--md-admonition-icon--admonish-warning); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.failure, .fail, .missing) { +:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { border-color: #ff5252; } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 82, 82, 0.1); } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff5252; - mask-image: var(--md-admonition-icon--failure); - -webkit-mask-image: var(--md-admonition-icon--failure); + mask-image: var(--md-admonition-icon--admonish-failure); + -webkit-mask-image: var(--md-admonition-icon--admonish-failure); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.danger, .error) { +:is(.admonition):is(.admonish-danger, .admonish-error) { border-color: #ff1744; } -:is(.danger, .error) > :is(.admonition-title, summary) { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 23, 68, 0.1); } -:is(.danger, .error) > :is(.admonition-title, summary)::before { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff1744; - mask-image: var(--md-admonition-icon--danger); - -webkit-mask-image: var(--md-admonition-icon--danger); + mask-image: var(--md-admonition-icon--admonish-danger); + -webkit-mask-image: var(--md-admonition-icon--admonish-danger); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.bug) { +:is(.admonition):is(.admonish-bug) { border-color: #f50057; } -:is(.bug) > :is(.admonition-title, summary) { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(245, 0, 87, 0.1); } -:is(.bug) > :is(.admonition-title, summary)::before { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { background-color: #f50057; - mask-image: var(--md-admonition-icon--bug); - -webkit-mask-image: var(--md-admonition-icon--bug); + mask-image: var(--md-admonition-icon--admonish-bug); + -webkit-mask-image: var(--md-admonition-icon--admonish-bug); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.example) { +:is(.admonition):is(.admonish-example) { border-color: #7c4dff; } -:is(.example) > :is(.admonition-title, summary) { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(124, 77, 255, 0.1); } -:is(.example) > :is(.admonition-title, summary)::before { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { background-color: #7c4dff; - mask-image: var(--md-admonition-icon--example); - -webkit-mask-image: var(--md-admonition-icon--example); + mask-image: var(--md-admonition-icon--admonish-example); + -webkit-mask-image: var(--md-admonition-icon--admonish-example); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.quote, .cite) { +:is(.admonition):is(.admonish-quote, .admonish-cite) { border-color: #9e9e9e; } -:is(.quote, .cite) > :is(.admonition-title, summary) { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(158, 158, 158, 0.1); } -:is(.quote, .cite) > :is(.admonition-title, summary)::before { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--quote); - -webkit-mask-image: var(--md-admonition-icon--quote); + mask-image: var(--md-admonition-icon--admonish-quote); + -webkit-mask-image: var(--md-admonition-icon--admonish-quote); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; @@ -340,7 +327,8 @@ details[open].admonition > summary.admonition-title::after { background-color: var(--sidebar-bg); } -.ayu :is(.admonition), .coal :is(.admonition) { +.ayu :is(.admonition), +.coal :is(.admonition) { background-color: var(--theme-hover); } diff --git a/documentation/docs/book.toml b/documentation/docs/book.toml index a11f82cbbd..d87f16e8f9 100644 --- a/documentation/docs/book.toml +++ b/documentation/docs/book.toml @@ -45,7 +45,7 @@ turn-off = true [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "2.0.1" # do not edit: managed by `mdbook-admonish install` +assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` # variables preprocessor: import variables into files # https://gitlab.com/tglman/mdbook-variables/ diff --git a/documentation/docs/mdbook-admonish.css b/documentation/docs/mdbook-admonish.css index 244bc9ade7..e0a3365532 100644 --- a/documentation/docs/mdbook-admonish.css +++ b/documentation/docs/mdbook-admonish.css @@ -1,31 +1,18 @@ @charset "UTF-8"; :root { - --md-admonition-icon--note: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--abstract: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--info: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--tip: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--success: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--question: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--warning: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--failure: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--danger: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--bug: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--example: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--quote: - url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: - url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); + --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); } :is(.admonition) { @@ -75,7 +62,7 @@ a.admonition-anchor-link::before { content: "§"; } -:is(.admonition-title, summary) { +:is(.admonition-title, summary.admonition-title) { position: relative; min-height: 4rem; margin-block: 0; @@ -86,13 +73,13 @@ a.admonition-anchor-link::before { background-color: rgba(68, 138, 255, 0.1); display: flex; } -:is(.admonition-title, summary) p { +:is(.admonition-title, summary.admonition-title) p { margin: 0; } -html :is(.admonition-title, summary):last-child { +html :is(.admonition-title, summary.admonition-title):last-child { margin-bottom: 0; } -:is(.admonition-title, summary)::before { +:is(.admonition-title, summary.admonition-title)::before { position: absolute; top: 0.625em; inset-inline-start: 1.6rem; @@ -107,7 +94,7 @@ html :is(.admonition-title, summary):last-child { -webkit-mask-size: contain; content: ""; } -:is(.admonition-title, summary):hover a.admonition-anchor-link { +:is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { display: initial; } @@ -132,204 +119,204 @@ details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } -:is(.admonition):is(.note) { +:is(.admonition):is(.admonish-note) { border-color: #448aff; } -:is(.note) > :is(.admonition-title, summary) { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(68, 138, 255, 0.1); } -:is(.note) > :is(.admonition-title, summary)::before { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { background-color: #448aff; - mask-image: var(--md-admonition-icon--note); - -webkit-mask-image: var(--md-admonition-icon--note); + mask-image: var(--md-admonition-icon--admonish-note); + -webkit-mask-image: var(--md-admonition-icon--admonish-note); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.abstract, .summary, .tldr) { +:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { border-color: #00b0ff; } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 176, 255, 0.1); } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b0ff; - mask-image: var(--md-admonition-icon--abstract); - -webkit-mask-image: var(--md-admonition-icon--abstract); + mask-image: var(--md-admonition-icon--admonish-abstract); + -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.info, .todo) { +:is(.admonition):is(.admonish-info, .admonish-todo) { border-color: #00b8d4; } -:is(.info, .todo) > :is(.admonition-title, summary) { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 184, 212, 0.1); } -:is(.info, .todo) > :is(.admonition-title, summary)::before { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b8d4; - mask-image: var(--md-admonition-icon--info); - -webkit-mask-image: var(--md-admonition-icon--info); + mask-image: var(--md-admonition-icon--admonish-info); + -webkit-mask-image: var(--md-admonition-icon--admonish-info); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.tip, .hint, .important) { +:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { border-color: #00bfa5; } -:is(.tip, .hint, .important) > :is(.admonition-title, summary) { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 191, 165, 0.1); } -:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00bfa5; - mask-image: var(--md-admonition-icon--tip); - -webkit-mask-image: var(--md-admonition-icon--tip); + mask-image: var(--md-admonition-icon--admonish-tip); + -webkit-mask-image: var(--md-admonition-icon--admonish-tip); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.success, .check, .done) { +:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { border-color: #00c853; } -:is(.success, .check, .done) > :is(.admonition-title, summary) { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 200, 83, 0.1); } -:is(.success, .check, .done) > :is(.admonition-title, summary)::before { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00c853; - mask-image: var(--md-admonition-icon--success); - -webkit-mask-image: var(--md-admonition-icon--success); + mask-image: var(--md-admonition-icon--admonish-success); + -webkit-mask-image: var(--md-admonition-icon--admonish-success); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.question, .help, .faq) { +:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { border-color: #64dd17; } -:is(.question, .help, .faq) > :is(.admonition-title, summary) { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(100, 221, 23, 0.1); } -:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { background-color: #64dd17; - mask-image: var(--md-admonition-icon--question); - -webkit-mask-image: var(--md-admonition-icon--question); + mask-image: var(--md-admonition-icon--admonish-question); + -webkit-mask-image: var(--md-admonition-icon--admonish-question); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.warning, .caution, .attention) { +:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { border-color: #ff9100; } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 145, 0, 0.1); } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff9100; - mask-image: var(--md-admonition-icon--warning); - -webkit-mask-image: var(--md-admonition-icon--warning); + mask-image: var(--md-admonition-icon--admonish-warning); + -webkit-mask-image: var(--md-admonition-icon--admonish-warning); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.failure, .fail, .missing) { +:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { border-color: #ff5252; } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 82, 82, 0.1); } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff5252; - mask-image: var(--md-admonition-icon--failure); - -webkit-mask-image: var(--md-admonition-icon--failure); + mask-image: var(--md-admonition-icon--admonish-failure); + -webkit-mask-image: var(--md-admonition-icon--admonish-failure); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.danger, .error) { +:is(.admonition):is(.admonish-danger, .admonish-error) { border-color: #ff1744; } -:is(.danger, .error) > :is(.admonition-title, summary) { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 23, 68, 0.1); } -:is(.danger, .error) > :is(.admonition-title, summary)::before { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff1744; - mask-image: var(--md-admonition-icon--danger); - -webkit-mask-image: var(--md-admonition-icon--danger); + mask-image: var(--md-admonition-icon--admonish-danger); + -webkit-mask-image: var(--md-admonition-icon--admonish-danger); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.bug) { +:is(.admonition):is(.admonish-bug) { border-color: #f50057; } -:is(.bug) > :is(.admonition-title, summary) { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(245, 0, 87, 0.1); } -:is(.bug) > :is(.admonition-title, summary)::before { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { background-color: #f50057; - mask-image: var(--md-admonition-icon--bug); - -webkit-mask-image: var(--md-admonition-icon--bug); + mask-image: var(--md-admonition-icon--admonish-bug); + -webkit-mask-image: var(--md-admonition-icon--admonish-bug); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.example) { +:is(.admonition):is(.admonish-example) { border-color: #7c4dff; } -:is(.example) > :is(.admonition-title, summary) { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(124, 77, 255, 0.1); } -:is(.example) > :is(.admonition-title, summary)::before { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { background-color: #7c4dff; - mask-image: var(--md-admonition-icon--example); - -webkit-mask-image: var(--md-admonition-icon--example); + mask-image: var(--md-admonition-icon--admonish-example); + -webkit-mask-image: var(--md-admonition-icon--admonish-example); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.quote, .cite) { +:is(.admonition):is(.admonish-quote, .admonish-cite) { border-color: #9e9e9e; } -:is(.quote, .cite) > :is(.admonition-title, summary) { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(158, 158, 158, 0.1); } -:is(.quote, .cite) > :is(.admonition-title, summary)::before { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--quote); - -webkit-mask-image: var(--md-admonition-icon--quote); + mask-image: var(--md-admonition-icon--admonish-quote); + -webkit-mask-image: var(--md-admonition-icon--admonish-quote); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; @@ -340,7 +327,8 @@ details[open].admonition > summary.admonition-title::after { background-color: var(--sidebar-bg); } -.ayu :is(.admonition), .coal :is(.admonition) { +.ayu :is(.admonition), +.coal :is(.admonition) { background-color: var(--theme-hover); } diff --git a/documentation/operators/book.toml b/documentation/operators/book.toml index d238a5c745..56a5b00162 100644 --- a/documentation/operators/book.toml +++ b/documentation/operators/book.toml @@ -42,7 +42,7 @@ turn-off = true [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "2.0.1" # do not edit: managed by `mdbook-admonish install` +assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` # variables preprocessor: import variables into files # https://gitlab.com/tglman/mdbook-variables/ diff --git a/documentation/operators/mdbook-admonish.css b/documentation/operators/mdbook-admonish.css index 244bc9ade7..e0a3365532 100644 --- a/documentation/operators/mdbook-admonish.css +++ b/documentation/operators/mdbook-admonish.css @@ -1,31 +1,18 @@ @charset "UTF-8"; :root { - --md-admonition-icon--note: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--abstract: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--info: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--tip: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--success: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--question: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--warning: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--failure: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--danger: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--bug: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--example: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--quote: - url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: - url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); + --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); } :is(.admonition) { @@ -75,7 +62,7 @@ a.admonition-anchor-link::before { content: "§"; } -:is(.admonition-title, summary) { +:is(.admonition-title, summary.admonition-title) { position: relative; min-height: 4rem; margin-block: 0; @@ -86,13 +73,13 @@ a.admonition-anchor-link::before { background-color: rgba(68, 138, 255, 0.1); display: flex; } -:is(.admonition-title, summary) p { +:is(.admonition-title, summary.admonition-title) p { margin: 0; } -html :is(.admonition-title, summary):last-child { +html :is(.admonition-title, summary.admonition-title):last-child { margin-bottom: 0; } -:is(.admonition-title, summary)::before { +:is(.admonition-title, summary.admonition-title)::before { position: absolute; top: 0.625em; inset-inline-start: 1.6rem; @@ -107,7 +94,7 @@ html :is(.admonition-title, summary):last-child { -webkit-mask-size: contain; content: ""; } -:is(.admonition-title, summary):hover a.admonition-anchor-link { +:is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { display: initial; } @@ -132,204 +119,204 @@ details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } -:is(.admonition):is(.note) { +:is(.admonition):is(.admonish-note) { border-color: #448aff; } -:is(.note) > :is(.admonition-title, summary) { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(68, 138, 255, 0.1); } -:is(.note) > :is(.admonition-title, summary)::before { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { background-color: #448aff; - mask-image: var(--md-admonition-icon--note); - -webkit-mask-image: var(--md-admonition-icon--note); + mask-image: var(--md-admonition-icon--admonish-note); + -webkit-mask-image: var(--md-admonition-icon--admonish-note); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.abstract, .summary, .tldr) { +:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { border-color: #00b0ff; } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 176, 255, 0.1); } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b0ff; - mask-image: var(--md-admonition-icon--abstract); - -webkit-mask-image: var(--md-admonition-icon--abstract); + mask-image: var(--md-admonition-icon--admonish-abstract); + -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.info, .todo) { +:is(.admonition):is(.admonish-info, .admonish-todo) { border-color: #00b8d4; } -:is(.info, .todo) > :is(.admonition-title, summary) { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 184, 212, 0.1); } -:is(.info, .todo) > :is(.admonition-title, summary)::before { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b8d4; - mask-image: var(--md-admonition-icon--info); - -webkit-mask-image: var(--md-admonition-icon--info); + mask-image: var(--md-admonition-icon--admonish-info); + -webkit-mask-image: var(--md-admonition-icon--admonish-info); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.tip, .hint, .important) { +:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { border-color: #00bfa5; } -:is(.tip, .hint, .important) > :is(.admonition-title, summary) { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 191, 165, 0.1); } -:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00bfa5; - mask-image: var(--md-admonition-icon--tip); - -webkit-mask-image: var(--md-admonition-icon--tip); + mask-image: var(--md-admonition-icon--admonish-tip); + -webkit-mask-image: var(--md-admonition-icon--admonish-tip); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.success, .check, .done) { +:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { border-color: #00c853; } -:is(.success, .check, .done) > :is(.admonition-title, summary) { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 200, 83, 0.1); } -:is(.success, .check, .done) > :is(.admonition-title, summary)::before { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00c853; - mask-image: var(--md-admonition-icon--success); - -webkit-mask-image: var(--md-admonition-icon--success); + mask-image: var(--md-admonition-icon--admonish-success); + -webkit-mask-image: var(--md-admonition-icon--admonish-success); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.question, .help, .faq) { +:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { border-color: #64dd17; } -:is(.question, .help, .faq) > :is(.admonition-title, summary) { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(100, 221, 23, 0.1); } -:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { background-color: #64dd17; - mask-image: var(--md-admonition-icon--question); - -webkit-mask-image: var(--md-admonition-icon--question); + mask-image: var(--md-admonition-icon--admonish-question); + -webkit-mask-image: var(--md-admonition-icon--admonish-question); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.warning, .caution, .attention) { +:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { border-color: #ff9100; } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 145, 0, 0.1); } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff9100; - mask-image: var(--md-admonition-icon--warning); - -webkit-mask-image: var(--md-admonition-icon--warning); + mask-image: var(--md-admonition-icon--admonish-warning); + -webkit-mask-image: var(--md-admonition-icon--admonish-warning); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.failure, .fail, .missing) { +:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { border-color: #ff5252; } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 82, 82, 0.1); } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff5252; - mask-image: var(--md-admonition-icon--failure); - -webkit-mask-image: var(--md-admonition-icon--failure); + mask-image: var(--md-admonition-icon--admonish-failure); + -webkit-mask-image: var(--md-admonition-icon--admonish-failure); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.danger, .error) { +:is(.admonition):is(.admonish-danger, .admonish-error) { border-color: #ff1744; } -:is(.danger, .error) > :is(.admonition-title, summary) { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 23, 68, 0.1); } -:is(.danger, .error) > :is(.admonition-title, summary)::before { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff1744; - mask-image: var(--md-admonition-icon--danger); - -webkit-mask-image: var(--md-admonition-icon--danger); + mask-image: var(--md-admonition-icon--admonish-danger); + -webkit-mask-image: var(--md-admonition-icon--admonish-danger); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.bug) { +:is(.admonition):is(.admonish-bug) { border-color: #f50057; } -:is(.bug) > :is(.admonition-title, summary) { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(245, 0, 87, 0.1); } -:is(.bug) > :is(.admonition-title, summary)::before { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { background-color: #f50057; - mask-image: var(--md-admonition-icon--bug); - -webkit-mask-image: var(--md-admonition-icon--bug); + mask-image: var(--md-admonition-icon--admonish-bug); + -webkit-mask-image: var(--md-admonition-icon--admonish-bug); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.example) { +:is(.admonition):is(.admonish-example) { border-color: #7c4dff; } -:is(.example) > :is(.admonition-title, summary) { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(124, 77, 255, 0.1); } -:is(.example) > :is(.admonition-title, summary)::before { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { background-color: #7c4dff; - mask-image: var(--md-admonition-icon--example); - -webkit-mask-image: var(--md-admonition-icon--example); + mask-image: var(--md-admonition-icon--admonish-example); + -webkit-mask-image: var(--md-admonition-icon--admonish-example); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.quote, .cite) { +:is(.admonition):is(.admonish-quote, .admonish-cite) { border-color: #9e9e9e; } -:is(.quote, .cite) > :is(.admonition-title, summary) { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(158, 158, 158, 0.1); } -:is(.quote, .cite) > :is(.admonition-title, summary)::before { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--quote); - -webkit-mask-image: var(--md-admonition-icon--quote); + mask-image: var(--md-admonition-icon--admonish-quote); + -webkit-mask-image: var(--md-admonition-icon--admonish-quote); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; @@ -340,7 +327,8 @@ details[open].admonition > summary.admonition-title::after { background-color: var(--sidebar-bg); } -.ayu :is(.admonition), .coal :is(.admonition) { +.ayu :is(.admonition), +.coal :is(.admonition) { background-color: var(--theme-hover); } From 02459f5d53a333b76ac73109861e758e906e68b6 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Mon, 6 Nov 2023 12:51:37 +0100 Subject: [PATCH 140/142] added links + typo fixes --- .../community-resources/community-applications-and-guides.md | 4 +--- documentation/dev-portal/src/examples/browser-only.md | 4 ++-- documentation/dev-portal/src/examples/custom-services.md | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/documentation/dev-portal/src/community-resources/community-applications-and-guides.md b/documentation/dev-portal/src/community-resources/community-applications-and-guides.md index 5186dceae1..85a842342d 100644 --- a/documentation/dev-portal/src/community-resources/community-applications-and-guides.md +++ b/documentation/dev-portal/src/community-resources/community-applications-and-guides.md @@ -1,8 +1,6 @@ # Community Applications -We love seeing our developer community create applications using Nym. If you would like to share your application with the community, please submit a pull request to the `main` branch of the `nymtech/dev-portal` [repository](https://github.com/nymtech/dev-portal). - - +If you would like to share your application here, please submit a pull request to the `main` branch of the `nymtech/dev-portal` [repository](https://github.com/nymtech/dev-portal). ## Pastenym diff --git a/documentation/dev-portal/src/examples/browser-only.md b/documentation/dev-portal/src/examples/browser-only.md index 9ee22ef1d8..e9f8a74a06 100644 --- a/documentation/dev-portal/src/examples/browser-only.md +++ b/documentation/dev-portal/src/examples/browser-only.md @@ -1,9 +1,9 @@ # Browser only With the Typescript SDK you can run a Nym client in a webworker - meaning you can connect to the mixnet through the browser without having to worry about any other code than your web framework. -- NoTrustVerify have set up an example application using [`mixFetch`](https://sdk.nymtech.net/examples/mix-fetch) to fetch crypto prices from CoinGecko over the mixnet. +- [NoTrustVerify](https://notrustverify.ch/) have set up an example application using [`mixFetch`](https://sdk.nymtech.net/examples/mix-fetch) to fetch crypto prices from CoinGecko over the mixnet. - [Website](https://notrustverify.github.io/mixfetch-examples/) - - [Coinbase](https://github.com/notrustverify/mixfetch-examples) + - [Codebase](https://github.com/notrustverify/mixfetch-examples) - There is a coconut-scheme based Credential Library playground [here](https://coco-demo.nymtech.net/). This is a WASM implementation of our Coconut libraries which generate raw Coconut credentials. Test it to create and re-randomize your own credentials. For more information on what is happening here check out the [Coconut docs](https://nymtech.net/docs/coconut.html). diff --git a/documentation/dev-portal/src/examples/custom-services.md b/documentation/dev-portal/src/examples/custom-services.md index ce8262bb36..4602ffa7f0 100644 --- a/documentation/dev-portal/src/examples/custom-services.md +++ b/documentation/dev-portal/src/examples/custom-services.md @@ -5,7 +5,7 @@ Custom services involve two pieces of code that communicate via the mixnet: a cl - [Frontend codebase](https://github.com/notrustverify/pastenym) - [Backend codebase](https://github.com/notrustverify/pastenym-frontend) -- Nostr-Nym is another application written by NoTrustVerify, standing between mixnet users and a Nostr server in order to protect their metadata from being revealed when gossiping. **Useful for Go and Python developers**. +- Nostr-Nym is another application written by [NoTrustVerify](https://notrustverify.ch/), standing between mixnet users and a Nostr server in order to protect their metadata from being revealed when gossiping. **Useful for Go and Python developers**. - [Codebase](https://github.com/notrustverify/nostr-nym) - Spook and Nym-Ethtx are both examples of Ethereum transaction broadcasters utilising the mixnet, written in Rust. Since they were written before the release of the Rust SDK, they utilise standalone clients to communicate with the mixnet. From 66f012c70eb80149d425331b14e0171f998ed4c9 Mon Sep 17 00:00:00 2001 From: serinko <97586125+serinko@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:18:13 +0100 Subject: [PATCH 141/142] add exit policy to existing NR --- .../operators/src/nodes/gateway-setup.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/documentation/operators/src/nodes/gateway-setup.md b/documentation/operators/src/nodes/gateway-setup.md index 62ea6dbe65..93ca3e7735 100644 --- a/documentation/operators/src/nodes/gateway-setup.md +++ b/documentation/operators/src/nodes/gateway-setup.md @@ -57,7 +57,7 @@ Before you start an Exit Gateway, read our [Operators Legal Forum](../legal/exit ``` ```admonish info -There has been an ongoing development with dynamic upgrades. Follow the status of the Project Smoosh [changes](../faq/smoosh-faq.md#what-are-the-changes) and the progression state of Exit policy [implementation](../faq/smoosh-faq.html#how-will-the-exit-policy-be-implemented) to be up to date with the current design. +There has been an ongoing development with dynamic upgrades. Follow the status of the Project Smoosh [changes](../faq/smoosh-faq.md#what-are-the-changes) and the progression state of exit policy [implementation](../faq/smoosh-faq.html#how-will-the-exit-policy-be-implemented) to be up to date with the current design. ``` ### Initialising Exit Gateway @@ -126,11 +126,23 @@ enabled = true Save, exit and restart your gateway. Now you are an operator of post-smooshed Exit gateway. -All information about network requester part of your exit gateway is in `/home/user/.nym/gateways//config/network_requester_config.toml`. +#### Enable Nym exit policy to an existing Gateway with Network requester functionality + +In case you already added Network Requester functionality to your Gateway as described above but haven't enabled the [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt) there is an easy tweak to do so and turn your node into [Nym Exit Gateway](../faq/smoosh-faq.md#what-are-the-changes). + +Open the config file stored at `.nym/gateways//config/network_requester_config.tom` and set: +```sh +use_deprecated_allow_list = false +``` +Save, exit and restart your gateway. Now you are an operator of post-smooshed Exit gateway. + +```admonish info +All information about network requester part of your Exit Gateway is in `/home/user/.nym/gateways//config/network_requester_config.toml`. +``` For now you can run Gateway without Network requester or with and without the new exit policy. This will soon change as we inform in our [Project Smoosh FAQ](../faq/smoosh-faq.html#how-will-the-exit-policy-be-implemented). -To read more about the configuration like whitelisted outbound requesters in `allowed.list` and other useful information, see the page [*Network Requester Whitelist*](network-requester-setup.md#using-your-network-requester). +To read more about the configuration like whitelisted outbound requesters in `allowed.list` and other useful information, see the page [*Network requester whitelist*](network-requester-setup.md#using-your-network-requester). #### Initialising Gateway without Network requester From 91f383d5aced819feaeed236d8ec670822880223 Mon Sep 17 00:00:00 2001 From: benedettadavico Date: Tue, 7 Nov 2023 07:58:27 +0100 Subject: [PATCH 142/142] Bump mixnode version and update changelog --- CHANGELOG.md | 14 ++++++++++++++ Cargo.lock | 2 +- mixnode/Cargo.toml | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04209d93f7..554b9bcb3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// ## [Unreleased] +## [2023.4-galaxy] (2023-11-07) + +- DRY up client cli ([#4077]) +- [mixnode] replace rocket with axum ([#4071]) +- incorporate the nym node HTTP api into the mixnode ([#4070]) +- replaced '--disable-sign-ext' with '--signext-lowering' when running wasm-opt ([#3896]) + +[#4077]: https://github.com/nymtech/nym/pull/4077 +[#4071]: https://github.com/nymtech/nym/pull/4071 +[#4070]: https://github.com/nymtech/nym/issues/4070 +[#3896]: https://github.com/nymtech/nym/pull/3896 + ## [2023.3-kinder] (2023-10-31) - suppress error output ([#4056]) @@ -15,6 +27,7 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// - use saturating sub in case outfox is not enabled ([#3986]) - Fix sorting for mixnodes and gateways ([#3985]) - Gateway client registry and api routes ([#3955]) +- Feature/configurable socks5 bind address ([#3992]) [#4056]: https://github.com/nymtech/nym/pull/4056 [#4042]: https://github.com/nymtech/nym/pull/4042 @@ -25,6 +38,7 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// [#3986]: https://github.com/nymtech/nym/pull/3986 [#3985]: https://github.com/nymtech/nym/pull/3985 [#3955]: https://github.com/nymtech/nym/pull/3955 +[#3992]: https://github.com/nymtech/nym/pull/3992 ## [2023.1-milka] (2023-09-24) diff --git a/Cargo.lock b/Cargo.lock index 4190432be9..943d8d6ebf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6703,7 +6703,7 @@ dependencies = [ [[package]] name = "nym-mixnode" -version = "1.1.32" +version = "1.1.33" dependencies = [ "anyhow", "axum", diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 2c8636f94b..872ca55b92 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-mixnode" -version = "1.1.32" +version = "1.1.33" authors = [ "Dave Hrycyszyn ", "Jędrzej Stuczyński ",