From 4c79dc3a6bb8c720fb0d07b2f8cf67e37535aa86 Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Mon, 18 Oct 2021 22:03:00 +0300 Subject: [PATCH 01/17] initial config for gh actions --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..ad6688d44 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +name: Aepp-Base Build + +on: + push: + branches: [ master, develop ] + tags: + - 'v*' + pull_request: [ master, develop ] + +jobs: + main: + runs-on: ubuntu-latest + + name: Build Docker + steps: + + - uses: actions/checkout@v2 + + - name: Log in to Docker Hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + + - name: Build and push Docker image + id: gen_tags + run: | + if [[ $GITHUB_REF == 'refs/tags/'* ]]; then + TAGS='["aeternity/aepp-base:latest","aeternity/aepp-base:'${GITHUB_REF/refs\/tags\//}'"]' + else + TAGS='["aeternity/aepp-base:latest"]' + fi + echo '::set-output name=tags::'$TAGS + + - name: Build and push Docker image + id: build_push + uses: docker/build-push-action@v2 + with: + context: . + file: nginx.Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ fromJson(steps.gen_tags.outputs.tags) }} From 19ddf32be449eab736b6b6fe2d68c88e051a9a12 Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Mon, 18 Oct 2021 22:05:41 +0300 Subject: [PATCH 02/17] fix on pr config --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad6688d44..757ee3f7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,8 +5,9 @@ on: branches: [ master, develop ] tags: - 'v*' - pull_request: [ master, develop ] - + pull_request: + branches: [ master, develop ] + jobs: main: runs-on: ubuntu-latest From a69d33fe9ae79069f6cd4f27efa6a2ee5054f1f1 Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Mon, 18 Oct 2021 22:13:16 +0300 Subject: [PATCH 03/17] test tags --- .github/workflows/main.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 757ee3f7f..4491ac915 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,21 +24,19 @@ jobs: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASS }} - - name: Build and push Docker image - id: gen_tags - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - TAGS='["aeternity/aepp-base:latest","aeternity/aepp-base:'${GITHUB_REF/refs\/tags\//}'"]' - else - TAGS='["aeternity/aepp-base:latest"]' - fi - echo '::set-output name=tags::'$TAGS - + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: aeternity/aepp-base + tags: | + type=ref,event=tag + type=ref,event=pr + - name: Build and push Docker image id: build_push uses: docker/build-push-action@v2 with: context: . file: nginx.Dockerfile - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ fromJson(steps.gen_tags.outputs.tags) }} + tags: ${{ steps.meta.outputs.tags }} From 2d9b0d92202f7cf0bb8f91acc0c6d2b1f614dd5c Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Mon, 18 Oct 2021 22:20:00 +0300 Subject: [PATCH 04/17] make tags on gh tag and push to master --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4491ac915..e4ad8d4c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: images: aeternity/aepp-base tags: | type=ref,event=tag - type=ref,event=pr + type=ref,event=push - name: Build and push Docker image id: build_push @@ -39,4 +39,5 @@ jobs: with: context: . file: nginx.Dockerfile + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} From 80476ee418c97367e1e2376ee9d05c4d72eef203 Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Mon, 18 Oct 2021 22:20:48 +0300 Subject: [PATCH 05/17] fix make tags on gh tag and push to master --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4ad8d4c3..6d3f34c02 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,8 +31,7 @@ jobs: images: aeternity/aepp-base tags: | type=ref,event=tag - type=ref,event=push - + - name: Build and push Docker image id: build_push uses: docker/build-push-action@v2 From 67537fdf0fcb715ab8d3db03ed772945d99a74d3 Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Mon, 18 Oct 2021 22:28:23 +0300 Subject: [PATCH 06/17] make build only on branch --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6d3f34c02..38e1905ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,11 +2,10 @@ name: Aepp-Base Build on: push: - branches: [ master, develop ] + branches: + - master tags: - 'v*' - pull_request: - branches: [ master, develop ] jobs: main: From 49f905a0128b6f33c1bea154cc9f4b3d14c6fb92 Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Tue, 2 Nov 2021 22:35:33 +0200 Subject: [PATCH 07/17] add on pr and tags --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38e1905ff..0a052c112 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,9 @@ on: - master tags: - 'v*' + pull_request: + branches: + - master jobs: main: @@ -29,7 +32,11 @@ jobs: with: images: aeternity/aepp-base tags: | + type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'master') }} type=ref,event=tag + type=ref,event=pr + flavor: | + latest=false - name: Build and push Docker image id: build_push From 1b5d753bf7d2984c126c001f873ca9b769f16bdc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Feb 2022 07:01:18 +0000 Subject: [PATCH 08/17] Bump follow-redirects from 1.14.7 to 1.14.8 Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1823f8421..815299ba1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14953,9 +14953,9 @@ "integrity": "sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==" }, "node_modules/follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "dev": true, "funding": [ { @@ -46915,9 +46915,9 @@ "integrity": "sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==" }, "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "dev": true }, "for-in": { From 8d352edf872f54488e8c9d2b37d8306afff37c03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 03:23:30 +0000 Subject: [PATCH 09/17] Bump url-parse from 1.5.4 to 1.5.10 Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.4 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.4...1.5.10) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 815299ba1..8c7abbbdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31641,9 +31641,9 @@ } }, "node_modules/url-parse": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.4.tgz", - "integrity": "sha512-ITeAByWWoqutFClc/lRZnFplgXgEZr3WJ6XngMM/N9DMIm4K8zXPCZ1Jdu0rERwO84w1WC5wkle2ubwTA4NTBg==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, "dependencies": { "querystringify": "^2.1.1", @@ -60381,9 +60381,9 @@ } }, "url-parse": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.4.tgz", - "integrity": "sha512-ITeAByWWoqutFClc/lRZnFplgXgEZr3WJ6XngMM/N9DMIm4K8zXPCZ1Jdu0rERwO84w1WC5wkle2ubwTA4NTBg==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, "requires": { "querystringify": "^2.1.1", From 94e713381f7071db26b322ebff57c7e64608129f Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Tue, 29 Mar 2022 14:17:31 +0300 Subject: [PATCH 10/17] gh actions pipelines and remove circleci/travis configs --- .circleci/config.yml | 48 ---------- .github/workflows/main.yml | 48 ---------- .github/workflows/prod-docker.yml | 112 +++++++++++++++++++++++ .github/workflows/staging-docker.yml | 131 +++++++++++++++++++++++++++ .travis.yml | 47 ---------- nginx.Dockerfile => Dockerfile | 0 6 files changed, 243 insertions(+), 143 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/prod-docker.yml create mode 100644 .github/workflows/staging-docker.yml delete mode 100644 .travis.yml rename nginx.Dockerfile => Dockerfile (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2f042341b..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,48 +0,0 @@ -version: 2.1 - -executors: - docker_builder: - docker: - - image: circleci/buildpack-deps:bionic - user: root - -references: - docker_parameters: &docker_parameters - DOCKERHUB_REPO: - type: string - -commands: - docker_build: - parameters: *docker_parameters - steps: - - checkout - - setup_remote_docker: - docker_layer_caching: true - - run: - name: Build and push Docker image to DockerHub - command: | - docker login -u $DOCKER_USER -p $DOCKER_PASS - docker build -t << parameters.DOCKERHUB_REPO >>:${CIRCLE_TAG:-master} -f nginx.Dockerfile . - docker push << parameters.DOCKERHUB_REPO >>:${CIRCLE_TAG:-master} -jobs: - docker_push_tag: - parameters: *docker_parameters - executor: docker_builder - steps: - - docker_build: - DOCKERHUB_REPO: << parameters.DOCKERHUB_REPO >> - -workflows: - version: 2 - build_push: - jobs: - - docker_push_tag: - name: docker_push_tag - DOCKERHUB_REPO: "aeternity/aepp-base" - context: ae-dockerhub - filters: - branches: - only: - - master - tags: - only: /^v.*$/ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 0a052c112..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Aepp-Base Build - -on: - push: - branches: - - master - tags: - - 'v*' - pull_request: - branches: - - master - -jobs: - main: - runs-on: ubuntu-latest - - name: Build Docker - steps: - - - uses: actions/checkout@v2 - - - name: Log in to Docker Hub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASS }} - - - name: Docker meta - id: meta - uses: docker/metadata-action@v3 - with: - images: aeternity/aepp-base - tags: | - type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'master') }} - type=ref,event=tag - type=ref,event=pr - flavor: | - latest=false - - - name: Build and push Docker image - id: build_push - uses: docker/build-push-action@v2 - with: - context: . - file: nginx.Dockerfile - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/prod-docker.yml b/.github/workflows/prod-docker.yml new file mode 100644 index 000000000..45385c5d3 --- /dev/null +++ b/.github/workflows/prod-docker.yml @@ -0,0 +1,112 @@ +name: Production Aepp Base Pipeline + +on: + push: + branches: + - master + release: + types: [created] + +env: + ENV: "prd" + APP: "aepp-base" + +jobs: + main: + runs-on: ubuntu-latest + name: Web build docker + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 100 + + - uses: GoogleCloudPlatform/release-please-action@v2 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + package-name: "" + changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"ci","section":"CI / CD","hidden":false},{"type":"test","section":"Testing","hidden":false},{"type":"refactor","section":"Refactorings","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]' + + - name: Set up Docker Buildx + id: buildx + # Use the action from the master, as we've seen some inconsistencies with @v1 + # Issue: https://github.com/docker/build-push-action/issues/286 + uses: docker/setup-buildx-action@master + # Only worked for us with this option on �‍♂️ + with: + install: true + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + # Key is named differently to avoid collision + key: ${{ runner.os }}-${{ env.ENV }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-${{ env.ENV }}-buildx + + - name: Log in to dockerhub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + + - name: Extract metadata for docker + if: | + github.event_name == 'push' || + startsWith(github.ref, 'refs/tags/v') + id: meta + uses: docker/metadata-action@v3 + with: + images: aeternity/aepp-base + tags: | + type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'master') }} + type=raw,value=${{ steps.release.outputs.tag_name }},enable=${{ endsWith(GitHub.ref, 'master') }} + type=ref,event=tag + type=ref,event=pr + + - name: Build and push docker image + if: | + github.event_name == 'push' || + startsWith(github.ref, 'refs/tags/v') + uses: docker/build-push-action@v2 + with: + context: . + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + # Note the mode=max here + # More: https://github.com/moby/buildkit#--export-cache-options + # And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new + + - name: Move cache + if: github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize' + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + - uses: actions/checkout@v2 + with: + repository: aeternity/gitops-apps.git + ref: prd + persist-credentials: false + fetch-depth: 0 + + - name: Production Deploy + if: ${{ steps.release.outputs.release_created }} + uses: aeternity/ae-github-actions/argocd-deploy@v4 + with: + url-prefix: ${{ steps.release.outputs.tag_name }} + env: ${{ env.ENV }} + app: ${{ env.APP }} + + - name: Push changes + uses: ad-m/github-push-action@master + with: + repository: aeternity/gitops-apps + github_token: ${{ secrets.BOT_GITHUB_TOKEN }} + branch: prd diff --git a/.github/workflows/staging-docker.yml b/.github/workflows/staging-docker.yml new file mode 100644 index 000000000..7e546ff26 --- /dev/null +++ b/.github/workflows/staging-docker.yml @@ -0,0 +1,131 @@ +name: Staging Aepp Base Pipeline + +on: + pull_request: + branches: [ master ] + types: [ opened, synchronize, closed ] + +env: + PR_NUMBER: ${{ github.event.pull_request.number }} + ENV: "stg" + APP: "aepp-base" + +jobs: + main: + runs-on: ubuntu-latest + name: Web build docker + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + id: buildx + # Use the action from the master, as we've seen some inconsistencies with @v1 + # Issue: https://github.com/docker/build-push-action/issues/286 + uses: docker/setup-buildx-action@master + # Only worked for us with this option on + with: + install: true + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + # Key is named differently to avoid collision + key: ${{ runner.os }}-${{ env.ENV }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-${{ env.ENV }}-buildx + + - name: Log in to dockerhub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + + - name: Extract metadata for docker + if: github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize' + id: meta + uses: docker/metadata-action@v3 + with: + images: aeternity/aepp-base + tags: | + type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'master') }} + type=ref,event=tag + type=ref,event=pr + + - name: Get commit sha on PR Sync + if: github.event_name == 'pull_request' && github.event.action == 'synchronize' + id: git-sha + shell: bash + run: | + echo "::set-output name=git-sha::$(git rev-parse --short HEAD)" + + - name: Build and push docker image + if: github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize' + uses: docker/build-push-action@v2 + with: + context: . + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + # Note the mode=max here + # More: https://github.com/moby/buildkit#--export-cache-options + # And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new + + - name: Move cache + if: github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize' + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + - uses: actions/checkout@v2 + with: + repository: aeternity/gitops-apps.git + ref: stg + persist-credentials: false + fetch-depth: 0 + + - name: Staging PR Sync + if: github.event_name == 'pull_request' && github.event.action == 'synchronize' + uses: aeternity/ae-github-actions/argocd-pr-sync@v4 + with: + git-sha: ${{ steps.git-sha.outputs.git-sha }} + url-prefix: pr-${{ env.PR_NUMBER }} + env: ${{ env.ENV }} + app: ${{ env.APP }} + + - name: Staging deploy + if: github.event_name == 'pull_request' && github.event.action == 'opened' + uses: aeternity/ae-github-actions/argocd-deploy@v4 + with: + url-prefix: pr-${{ env.PR_NUMBER }} + env: ${{ env.ENV }} + app: ${{ env.APP }} + + - name: Staging undeploy + if: github.event_name == 'pull_request' && github.event.action == 'closed' && startsWith(github.head_ref, 'release') != true + uses: aeternity/ae-github-actions/argocd-undeploy@v4 + with: + url-prefix: pr-${{ env.PR_NUMBER }} + env: ${{ env.ENV }} + app: ${{ env.APP }} + + - name: Print PR url + uses: unsplash/comment-on-pr@v1.3.0 + if: github.event_name == 'pull_request' && github.event.action == 'opened' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + msg: Deployed to https://pr-${{ env.PR_NUMBER }}-${{ env.APP }}.${{ env.ENV }}.aepps.com + check_for_duplicate_msg: true + + - name: Push changes + uses: ad-m/github-push-action@master + with: + repository: aeternity/gitops-apps + github_token: ${{ secrets.BOT_GITHUB_TOKEN }} + branch: stg diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 09295a0a7..000000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -matrix: - include: - - language: node_js - dist: trusty - node_js: '10' - script: scripts/test.sh - - - language: android - dist: trusty - android: - components: - - build-tools-28.0.3 - - android-28 - before_install: - - yes | sdkmanager "platforms;android-28" - - nvm install 10 - script: scripts/build-cordova.sh - - - language: objective-c - os: osx - osx_image: xcode10.2 - before_install: nvm install 10 - script: scripts/build-cordova.sh - -cache: - directories: - - platforms - - plugins - - /home/travis/.cache/Cypress - -install: travis_wait 30 scripts/install.sh - -deploy: - - provider: script - skip_cleanup: true - script: scripts/deploy.sh - on: - all_branches: true - - provider: releases - api_key: $GITHUB_TOKEN - file: - - aeternity.tar.gz - - aeternity.apk - - aeternity.app.tar.gz - skip_cleanup: true - on: - tags: true diff --git a/nginx.Dockerfile b/Dockerfile similarity index 100% rename from nginx.Dockerfile rename to Dockerfile From 73ddaf897132273282950a3667f88048e126df1c Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Tue, 29 Mar 2022 15:54:44 +0300 Subject: [PATCH 11/17] add develop branch for prs in staging deployments --- .github/workflows/staging-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-docker.yml b/.github/workflows/staging-docker.yml index 7e546ff26..a0d957ade 100644 --- a/.github/workflows/staging-docker.yml +++ b/.github/workflows/staging-docker.yml @@ -2,7 +2,7 @@ name: Staging Aepp Base Pipeline on: pull_request: - branches: [ master ] + branches: [ master, develop ] types: [ opened, synchronize, closed ] env: From 7e6c91965dd29197b0174606365f0a57afd7f7de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 09:56:30 +0000 Subject: [PATCH 12/17] Bump plist from 3.0.4 to 3.0.5 Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5. - [Release notes](https://github.com/TooTallNate/node-plist/releases) - [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md) - [Commits](https://github.com/TooTallNate/node-plist/commits) --- updated-dependencies: - dependency-name: plist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 815299ba1..e68f9b99c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25444,9 +25444,9 @@ } }, "node_modules/plist": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.4.tgz", - "integrity": "sha512-ksrr8y9+nXOxQB2osVNqrgvX/XQPOXaU4BQMKjYq8PvaY1U18mo+fKgBSwzK+luSyinOuPae956lSVcBwxlAMg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.5.tgz", + "integrity": "sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==", "dev": true, "dependencies": { "base64-js": "^1.5.1", @@ -55351,9 +55351,9 @@ } }, "plist": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.4.tgz", - "integrity": "sha512-ksrr8y9+nXOxQB2osVNqrgvX/XQPOXaU4BQMKjYq8PvaY1U18mo+fKgBSwzK+luSyinOuPae956lSVcBwxlAMg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.5.tgz", + "integrity": "sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==", "dev": true, "requires": { "base64-js": "^1.5.1", From 8ce0631356f2935166777bce86758ef719f63ae4 Mon Sep 17 00:00:00 2001 From: Petar Peshev Date: Mon, 4 Apr 2022 23:24:44 +0300 Subject: [PATCH 13/17] change gh actions pipelines names --- .github/workflows/prod-docker.yml | 2 +- .github/workflows/staging-docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prod-docker.yml b/.github/workflows/prod-docker.yml index 45385c5d3..0269e51dc 100644 --- a/.github/workflows/prod-docker.yml +++ b/.github/workflows/prod-docker.yml @@ -14,7 +14,7 @@ env: jobs: main: runs-on: ubuntu-latest - name: Web build docker + name: Production Aepp Base Pipeline steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/staging-docker.yml b/.github/workflows/staging-docker.yml index a0d957ade..eefcf1a38 100644 --- a/.github/workflows/staging-docker.yml +++ b/.github/workflows/staging-docker.yml @@ -13,7 +13,7 @@ env: jobs: main: runs-on: ubuntu-latest - name: Web build docker + name: Staging Aepp Base Pipeline steps: - uses: actions/checkout@v2 with: From 7cfde7c0446261d9f727d08c9eb064c5e3c2eb19 Mon Sep 17 00:00:00 2001 From: CedrikNikita Date: Mon, 4 Apr 2022 21:50:08 +1000 Subject: [PATCH 14/17] chore: update SDK to 11.0.0 --- package-lock.json | 376 ++++++++---------- package.json | 2 +- .../mobile/ConfirmTransactionSignModal.vue | 4 +- src/components/mobile/details-fields.js | 10 - src/store/modules/accounts/hdWallet.js | 2 +- 5 files changed, 166 insertions(+), 228 deletions(-) diff --git a/package-lock.json b/package-lock.json index 815299ba1..fe2d33ec2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "aepp-base", "version": "1.0.1", "dependencies": { - "@aeternity/aepp-sdk": "github:aeternity/aepp-sdk-js#develop", + "@aeternity/aepp-sdk": "^11.0.0", "@aeternity/bip39": "^0.1.0", "@aeternity/hd-wallet": "^0.2.0", "@aeternity/ledger-app-api": "0.2.1", @@ -72,71 +72,50 @@ } }, "node_modules/@aeternity/aepp-calldata": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@aeternity/aepp-calldata/-/aepp-calldata-1.1.0.tgz", - "integrity": "sha512-welvt4Lrg2T9O+wHqQqlXQ6R4zkctqxJw5IzMvAGSa0Mjxg+9Ts/tTfXekA3nY5H3xCsV7jWZMicIM/3gZM7hA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-calldata/-/aepp-calldata-1.1.1.tgz", + "integrity": "sha512-1c8KgDMMOrtQFUq3XJ4mSt62mLaFnyiWCLaKeX4smmaEYW/C9sc4RfjzUzL/cb/ou/+G8XTqv5U1exgn1OcTrw==", "dependencies": { - "blakejs": "^1.1.0", - "bs58check": "^2.1.2", - "rlp": "^2.2.4", + "@aeternity/blakejs": "^1.1.2", + "bs58": "^4.0.1", + "rlp": "^3.0.0", + "safe-buffer": "^5.2.1", "sha.js": "^2.4.11" } }, - "node_modules/@aeternity/aepp-calldata/node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } - }, "node_modules/@aeternity/aepp-sdk": { - "version": "10.0.0", - "resolved": "git+ssh://git@github.com/aeternity/aepp-sdk-js.git#07bc105055b0bf59bc99c088983f9ba4233cc17e", - "license": "ISC", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-11.0.0.tgz", + "integrity": "sha512-u3/h+2T2em95b/Q2DWWKqQ5xU6St0dQriqET+bHkLrk5Zf7EekB20r1nq2UoQcYQi44ErlPHF6lVMqFqKhnK3w==", "dependencies": { - "@aeternity/aepp-calldata": "^1.1.0", - "@aeternity/bip39": "^0.1.0", + "@aeternity/aepp-calldata": "^1.1.1", + "@aeternity/argon2-browser": "^0.1.2", + "@aeternity/blakejs": "^1.1.2", "@aeternity/json-bigint": "^0.3.1", - "@babel/runtime-corejs3": "^7.16.8", + "@aeternity/uuid": "^0.0.1", + "@babel/runtime-corejs3": "^7.17.2", "@stamp/it": "^1.1.0", "@stamp/required": "^1.0.1", "aes-js": "^3.1.2", "bignumber.js": "^9.0.2", "bip32-path": "^0.4.2", - "blakejs": "^1.1.1", - "bs58check": "^2.1.2", + "bs58": "^4.0.1", "buffer": "^6.0.3", "cross-fetch": "^3.1.5", - "crypto-browserify": "^3.12.0", "events": "^3.3.0", - "libsodium-wrappers-sumo": "^0.7.9", - "path-browserify": "^1.0.1", "process": "^0.11.10", - "ramda": "^0.28.0", - "rlp": "^2.2.7", + "rlp": "^3.0.0", "sha.js": "^2.4.11", - "stream-browserify": "^3.0.0", - "swagger-client": "^3.18.2", + "swagger-client": "^3.18.4", "tweetnacl": "^1.0.3", "tweetnacl-auth": "^1.0.1", - "uuid": "^8.3.2", "websocket": "^1.0.34" } }, - "node_modules/@aeternity/aepp-sdk/node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } + "node_modules/@aeternity/argon2-browser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@aeternity/argon2-browser/-/argon2-browser-0.1.2.tgz", + "integrity": "sha512-nL3xZYf0JXVIm6HFyppXn9fgHjmSjYa1PBYXzD1/pLbECdikD+r3IuhIR3dAwn8nq9xShjHPr9ZnJUbbUvva4g==" }, "node_modules/@aeternity/bip39": { "version": "0.1.0", @@ -149,6 +128,11 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/@aeternity/blakejs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@aeternity/blakejs/-/blakejs-1.1.2.tgz", + "integrity": "sha512-RoLxLy3huy3glASelIzVMHjtXNgdFCVbYwHZYBSFcQ08KIWSBH2H6S67SzHzWf3+8bWUCMuvgt7qhamWlZV6eQ==" + }, "node_modules/@aeternity/hd-wallet": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@aeternity/hd-wallet/-/hd-wallet-0.2.0.tgz", @@ -178,6 +162,14 @@ "@ledgerhq/hw-transport": "^4.21.0" } }, + "node_modules/@aeternity/uuid": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@aeternity/uuid/-/uuid-0.0.1.tgz", + "integrity": "sha512-ecE01IM9ZJwN27v6rlB0fKZVk4j8vOlcBj1/VdtF+rb5Kfy65H+QyHL1laNM84vRdz484UvxwrG/SXHYeA3IkQ==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -1777,9 +1769,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz", - "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.17.8.tgz", + "integrity": "sha512-ZbYSUvoSF6dXZmMl/CYTMOvzIFnbGfv4W3SEHYgMvNsFTeLaF2gkGAF4K2ddmtSK4Emej+0aYcnSC6N5dPCXUQ==", "dependencies": { "core-js-pure": "^3.20.2", "regenerator-runtime": "^0.13.4" @@ -7280,6 +7272,7 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -7290,7 +7283,8 @@ "node_modules/asn1.js/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true }, "node_modules/assert": { "version": "1.5.0", @@ -8141,11 +8135,6 @@ "ieee754": "^1.1.13" } }, - "node_modules/blakejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", - "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" - }, "node_modules/blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -8159,7 +8148,8 @@ "node_modules/bn.js": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true }, "node_modules/body-parser": { "version": "1.19.1", @@ -8399,7 +8389,8 @@ "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true }, "node_modules/browser-process-hrtime": { "version": "1.0.0", @@ -8426,6 +8417,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -8439,6 +8431,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, "dependencies": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -8449,6 +8442,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, "dependencies": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -8460,6 +8454,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, "dependencies": { "bn.js": "^5.0.0", "randombytes": "^2.0.1" @@ -8469,6 +8464,7 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, "dependencies": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", @@ -8539,16 +8535,6 @@ "base-x": "^3.0.2" } }, - "node_modules/bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "dependencies": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, "node_modules/bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -8622,7 +8608,8 @@ "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true }, "node_modules/bufferutil": { "version": "4.0.6", @@ -11248,6 +11235,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, "dependencies": { "bn.js": "^4.1.0", "elliptic": "^6.5.3" @@ -11256,7 +11244,8 @@ "node_modules/create-ecdh/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true }, "node_modules/create-hash": { "version": "1.2.0", @@ -11309,6 +11298,7 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, "dependencies": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -12354,6 +12344,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, "dependencies": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -12414,6 +12405,7 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, "dependencies": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -12423,7 +12415,8 @@ "node_modules/diffie-hellman/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true }, "node_modules/dir-glob": { "version": "2.2.2", @@ -12787,6 +12780,7 @@ "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -12800,7 +12794,8 @@ "node_modules/elliptic/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true }, "node_modules/emoji-datasource-apple": { "version": "7.0.2", @@ -14051,6 +14046,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, "dependencies": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -15976,6 +15972,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -16009,6 +16006,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -22078,19 +22076,6 @@ "node": ">= 0.8.0" } }, - "node_modules/libsodium-sumo": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium-sumo/-/libsodium-sumo-0.7.9.tgz", - "integrity": "sha512-DcfJ57zlSlcmQU4s8KOX78pT0zKx5S9RLi0oyDuoIgm4K95+VNSaOidK/y9lUK4lxft14PtTPjoBy8tmLk1TDQ==" - }, - "node_modules/libsodium-wrappers-sumo": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.7.9.tgz", - "integrity": "sha512-XLgLkqY973PngrRElbjOH0y7bJKYEfMWVpWPmW5iuhBjO6zXvHYQWtN52MVEeie/h98ZXN1Aw9BE+GzxQVAfLg==", - "dependencies": { - "libsodium-sumo": "^0.7.0" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -23039,6 +23024,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, "dependencies": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -23050,7 +23036,8 @@ "node_modules/miller-rabin/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true }, "node_modules/mime": { "version": "1.6.0", @@ -23141,12 +23128,14 @@ "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true }, "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true }, "node_modules/minimatch": { "version": "3.0.4", @@ -25145,6 +25134,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, "dependencies": { "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", @@ -25209,11 +25199,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" - }, "node_modules/path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -26593,6 +26578,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, "dependencies": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -26605,7 +26591,8 @@ "node_modules/public-encrypt/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true }, "node_modules/pump": { "version": "3.0.0", @@ -26735,15 +26722,6 @@ } ] }, - "node_modules/ramda": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", - "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/ramda" - } - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -26756,6 +26734,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, "dependencies": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -27794,7 +27773,8 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "devOptional": true }, "node_modules/sane": { "version": "4.1.0", @@ -29433,15 +29413,6 @@ "node": ">=0.10.0" } }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, "node_modules/stream-buffers": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", @@ -31746,6 +31717,7 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, "bin": { "uuid": "dist/bin/uuid" } @@ -34992,69 +34964,51 @@ }, "dependencies": { "@aeternity/aepp-calldata": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@aeternity/aepp-calldata/-/aepp-calldata-1.1.0.tgz", - "integrity": "sha512-welvt4Lrg2T9O+wHqQqlXQ6R4zkctqxJw5IzMvAGSa0Mjxg+9Ts/tTfXekA3nY5H3xCsV7jWZMicIM/3gZM7hA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-calldata/-/aepp-calldata-1.1.1.tgz", + "integrity": "sha512-1c8KgDMMOrtQFUq3XJ4mSt62mLaFnyiWCLaKeX4smmaEYW/C9sc4RfjzUzL/cb/ou/+G8XTqv5U1exgn1OcTrw==", "requires": { - "blakejs": "^1.1.0", - "bs58check": "^2.1.2", - "rlp": "^2.2.4", + "@aeternity/blakejs": "^1.1.2", + "bs58": "^4.0.1", + "rlp": "^3.0.0", + "safe-buffer": "^5.2.1", "sha.js": "^2.4.11" - }, - "dependencies": { - "rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "requires": { - "bn.js": "^5.2.0" - } - } } }, "@aeternity/aepp-sdk": { - "version": "git+ssh://git@github.com/aeternity/aepp-sdk-js.git#07bc105055b0bf59bc99c088983f9ba4233cc17e", - "from": "@aeternity/aepp-sdk@github:aeternity/aepp-sdk-js#develop", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-11.0.0.tgz", + "integrity": "sha512-u3/h+2T2em95b/Q2DWWKqQ5xU6St0dQriqET+bHkLrk5Zf7EekB20r1nq2UoQcYQi44ErlPHF6lVMqFqKhnK3w==", "requires": { - "@aeternity/aepp-calldata": "^1.1.0", - "@aeternity/bip39": "^0.1.0", + "@aeternity/aepp-calldata": "^1.1.1", + "@aeternity/argon2-browser": "^0.1.2", + "@aeternity/blakejs": "^1.1.2", "@aeternity/json-bigint": "^0.3.1", - "@babel/runtime-corejs3": "^7.16.8", + "@aeternity/uuid": "^0.0.1", + "@babel/runtime-corejs3": "^7.17.2", "@stamp/it": "^1.1.0", "@stamp/required": "^1.0.1", "aes-js": "^3.1.2", "bignumber.js": "^9.0.2", "bip32-path": "^0.4.2", - "blakejs": "^1.1.1", - "bs58check": "^2.1.2", + "bs58": "^4.0.1", "buffer": "^6.0.3", "cross-fetch": "^3.1.5", - "crypto-browserify": "^3.12.0", "events": "^3.3.0", - "libsodium-wrappers-sumo": "^0.7.9", - "path-browserify": "^1.0.1", "process": "^0.11.10", - "ramda": "^0.28.0", - "rlp": "^2.2.7", + "rlp": "^3.0.0", "sha.js": "^2.4.11", - "stream-browserify": "^3.0.0", - "swagger-client": "^3.18.2", + "swagger-client": "^3.18.4", "tweetnacl": "^1.0.3", "tweetnacl-auth": "^1.0.1", - "uuid": "^8.3.2", "websocket": "^1.0.34" - }, - "dependencies": { - "rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "requires": { - "bn.js": "^5.2.0" - } - } } }, + "@aeternity/argon2-browser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@aeternity/argon2-browser/-/argon2-browser-0.1.2.tgz", + "integrity": "sha512-nL3xZYf0JXVIm6HFyppXn9fgHjmSjYa1PBYXzD1/pLbECdikD+r3IuhIR3dAwn8nq9xShjHPr9ZnJUbbUvva4g==" + }, "@aeternity/bip39": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@aeternity/bip39/-/bip39-0.1.0.tgz", @@ -35066,6 +35020,11 @@ "safe-buffer": "^5.0.1" } }, + "@aeternity/blakejs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@aeternity/blakejs/-/blakejs-1.1.2.tgz", + "integrity": "sha512-RoLxLy3huy3glASelIzVMHjtXNgdFCVbYwHZYBSFcQ08KIWSBH2H6S67SzHzWf3+8bWUCMuvgt7qhamWlZV6eQ==" + }, "@aeternity/hd-wallet": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@aeternity/hd-wallet/-/hd-wallet-0.2.0.tgz", @@ -35094,6 +35053,11 @@ "@ledgerhq/hw-transport": "^4.21.0" } }, + "@aeternity/uuid": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@aeternity/uuid/-/uuid-0.0.1.tgz", + "integrity": "sha512-ecE01IM9ZJwN27v6rlB0fKZVk4j8vOlcBj1/VdtF+rb5Kfy65H+QyHL1laNM84vRdz484UvxwrG/SXHYeA3IkQ==" + }, "@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -36197,9 +36161,9 @@ } }, "@babel/runtime-corejs3": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz", - "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.17.8.tgz", + "integrity": "sha512-ZbYSUvoSF6dXZmMl/CYTMOvzIFnbGfv4W3SEHYgMvNsFTeLaF2gkGAF4K2ddmtSK4Emej+0aYcnSC6N5dPCXUQ==", "requires": { "core-js-pure": "^3.20.2", "regenerator-runtime": "^0.13.4" @@ -40716,6 +40680,7 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -40726,7 +40691,8 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true } } }, @@ -41415,11 +41381,6 @@ } } }, - "blakejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", - "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" - }, "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -41433,7 +41394,8 @@ "bn.js": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true }, "body-parser": { "version": "1.19.1", @@ -41628,7 +41590,8 @@ "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true }, "browser-process-hrtime": { "version": "1.0.0", @@ -41657,6 +41620,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -41670,6 +41634,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -41680,6 +41645,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -41691,6 +41657,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, "requires": { "bn.js": "^5.0.0", "randombytes": "^2.0.1" @@ -41700,6 +41667,7 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, "requires": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", @@ -41759,16 +41727,6 @@ "base-x": "^3.0.2" } }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, "bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -41819,7 +41777,8 @@ "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true }, "bufferutil": { "version": "4.0.6", @@ -43885,6 +43844,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, "requires": { "bn.js": "^4.1.0", "elliptic": "^6.5.3" @@ -43893,7 +43853,8 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true } } }, @@ -43945,6 +43906,7 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -44781,6 +44743,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -44826,6 +44789,7 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -44835,7 +44799,8 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true } } }, @@ -45151,6 +45116,7 @@ "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, "requires": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -45164,7 +45130,8 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true } } }, @@ -46138,6 +46105,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -47741,6 +47709,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -47768,6 +47737,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -52650,19 +52620,6 @@ "type-check": "~0.4.0" } }, - "libsodium-sumo": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium-sumo/-/libsodium-sumo-0.7.9.tgz", - "integrity": "sha512-DcfJ57zlSlcmQU4s8KOX78pT0zKx5S9RLi0oyDuoIgm4K95+VNSaOidK/y9lUK4lxft14PtTPjoBy8tmLk1TDQ==" - }, - "libsodium-wrappers-sumo": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.7.9.tgz", - "integrity": "sha512-XLgLkqY973PngrRElbjOH0y7bJKYEfMWVpWPmW5iuhBjO6zXvHYQWtN52MVEeie/h98ZXN1Aw9BE+GzxQVAfLg==", - "requires": { - "libsodium-sumo": "^0.7.0" - } - }, "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -53427,6 +53384,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -53435,7 +53393,8 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true } } }, @@ -53500,12 +53459,14 @@ "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true }, "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true }, "minimatch": { "version": "3.0.4", @@ -55114,6 +55075,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, "requires": { "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", @@ -55169,11 +55131,6 @@ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, - "path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" - }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -56336,6 +56293,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -56348,7 +56306,8 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true } } }, @@ -56445,11 +56404,6 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "ramda": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", - "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==" - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -56462,6 +56416,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -57269,7 +57224,8 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "devOptional": true }, "sane": { "version": "4.1.0", @@ -58619,15 +58575,6 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, - "stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "requires": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, "stream-buffers": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", @@ -60468,7 +60415,8 @@ "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true }, "v8-compile-cache": { "version": "2.3.0", diff --git a/package.json b/package.json index 6fe04032c..c7c435f89 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "i18n:report": "vue-i18n-extract report --vueFiles './src/**/*.?(js|vue)' --languageFiles './src/locales/**/*.json'" }, "dependencies": { - "@aeternity/aepp-sdk": "github:aeternity/aepp-sdk-js#develop", + "@aeternity/aepp-sdk": "^11.0.0", "@aeternity/bip39": "^0.1.0", "@aeternity/hd-wallet": "^0.2.0", "@aeternity/ledger-app-api": "0.2.1", diff --git a/src/components/mobile/ConfirmTransactionSignModal.vue b/src/components/mobile/ConfirmTransactionSignModal.vue index da885e455..6ca9eb974 100644 --- a/src/components/mobile/ConfirmTransactionSignModal.vue +++ b/src/components/mobile/ConfirmTransactionSignModal.vue @@ -70,7 +70,7 @@ import DetailsFeeInput from './DetailsFeeInput.vue'; import DetailsList from './DetailsList.vue'; import { Payload, RecipientId, Code, CallData, ContractId, - CommitmentId, NameEncoded, NameSalt, NameId, NameFee, + CommitmentId, Name, NameSalt, NameId, NameFee, } from './details-fields'; import DetailsNamePointers from './DetailsNamePointers.vue'; import AeButtonGroup from '../AeButtonGroup.vue'; @@ -104,7 +104,7 @@ export default { callData: CallData, contractId: ContractId, commitmentId: CommitmentId, - name: NameEncoded, + name: Name, nameFee: NameFee, nameSalt: NameSalt, nameId: NameId, diff --git a/src/components/mobile/details-fields.js b/src/components/mobile/details-fields.js index b0ab4217b..7b812e247 100644 --- a/src/components/mobile/details-fields.js +++ b/src/components/mobile/details-fields.js @@ -42,16 +42,6 @@ export const ContractId = genDetailsAddress(() => i18n.t('modal.confirm-transact export const CommitmentId = genDetailsRawData(() => i18n.t('modal.confirm-transaction-sign.commitment')); export const Name = genDetailsField(() => i18n.t('name.details.name')); -export const NameEncoded = { - functional: true, - render: (createElement, { props: { value } }) => createElement(DetailsField, { - attrs: { - name: i18n.t('name.details.name'), - value: TxBuilderHelper.decode(value, 'nm').toString(), - }, - }), -}; - export const NameSalt = genDetailsField(() => i18n.t('modal.confirm-transaction-sign.name-salt')); export const NameId = genDetailsRawData(() => i18n.t('modal.confirm-transaction-sign.name-id')); export const NameFee = genDetailsAmountCurrency(() => i18n.t('modal.confirm-transaction-sign.name-fee')); diff --git a/src/store/modules/accounts/hdWallet.js b/src/store/modules/accounts/hdWallet.js index 725d9512e..d1818bfec 100644 --- a/src/store/modules/accounts/hdWallet.js +++ b/src/store/modules/accounts/hdWallet.js @@ -294,7 +294,7 @@ export default { const encodedTx = await dispatch('confirmTxSigning', TxBuilderHelper.decode(txBase64, 'tx')); const signature = await dispatch( 'signWithoutConfirmation', - Buffer.concat([Buffer.from(sdk.getNetworkId()), encodedTx]), + Buffer.concat([Buffer.from(sdk.getNetworkId()), Buffer.from(encodedTx)]), ); return TxBuilder.buildTx({ encodedTx, signatures: [signature] }, SCHEMA.TX_TYPE.signed).tx; }, From 00f70e8e4935c148bf5a4c6d1b9f1f6e4cb12f06 Mon Sep 17 00:00:00 2001 From: CedrikNikita Date: Tue, 29 Mar 2022 15:00:57 +1000 Subject: [PATCH 15/17] feat: use webusb transport for ledger connection --- package-lock.json | 127 +++++++++++------------ package.json | 2 +- src/store/modules/accounts/ledger.js | 46 ++++---- src/store/plugins/ui/ledgerConnection.js | 4 +- 4 files changed, 88 insertions(+), 91 deletions(-) diff --git a/package-lock.json b/package-lock.json index 895047812..19c61b343 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@aeternity/hd-wallet": "^0.2.0", "@aeternity/ledger-app-api": "0.2.1", "@download/blockies": "^1.0.3", - "@ledgerhq/hw-transport-u2f": "^5.36.0-deprecated", + "@ledgerhq/hw-transport-webusb": "^6.24.1", "@zxing/library": "^0.19.1", "bignumber.js": "^9.0.2", "bluebird": "^3.7.2", @@ -4519,50 +4519,49 @@ "events": "^3.0.0" } }, - "node_modules/@ledgerhq/hw-transport-u2f": { - "version": "5.36.0-deprecated", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-5.36.0-deprecated.tgz", - "integrity": "sha512-T/+mGHIiUK/ZQATad6DMDmobCMZ1mVST952009jKzhaE1Et2Uy2secU+QhRkx3BfEAkvwa0zSRSYCL9d20Iqjg==", - "deprecated": "@ledgerhq/hw-transport-u2f is deprecated. Please use @ledgerhq/hw-transport-webusb or @ledgerhq/hw-transport-webhid. https://github.com/LedgerHQ/ledgerjs/blob/master/docs/migrate_webusb.md", + "node_modules/@ledgerhq/hw-transport-webusb": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.24.1.tgz", + "integrity": "sha512-+bAkVF/5MbbGIXobtmc5st/gFEjSRqACk+UPJGSxT21Z2SVm+FgG0Bui5wy24H+Ts/tC4IA3Mff8cz4PGbZhPA==", "dependencies": { - "@ledgerhq/errors": "^5.34.0", - "@ledgerhq/hw-transport": "^5.34.0", - "@ledgerhq/logs": "^5.30.0", - "u2f-api": "0.2.7" + "@ledgerhq/devices": "^6.24.1", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/hw-transport": "^6.24.1", + "@ledgerhq/logs": "^6.10.0" } }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/@ledgerhq/devices": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz", - "integrity": "sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==", + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/@ledgerhq/devices": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.24.1.tgz", + "integrity": "sha512-6SNXWXxojUF6WKXMVIbRs15Mveg+9k0RKJK/PKlwZh929Lnr/NcbONWdwPjWKZAp1g82eEPT4jIkG6qc4QXlcA==", "dependencies": { - "@ledgerhq/errors": "^5.50.0", - "@ledgerhq/logs": "^5.50.0", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/logs": "^6.10.0", "rxjs": "6", "semver": "^7.3.5" } }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/@ledgerhq/errors": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.50.0.tgz", - "integrity": "sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==" + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/@ledgerhq/errors": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", + "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/@ledgerhq/hw-transport": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz", - "integrity": "sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==", + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/@ledgerhq/hw-transport": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.24.1.tgz", + "integrity": "sha512-cOhxkQJrN7DvPFLLXAS2nqAZ7NIDaFqnbgu9ugTccgbJm2/z7ClRZX/uQoI4FscswZ47MuJQdXqz4nK48phteQ==", "dependencies": { - "@ledgerhq/devices": "^5.51.1", - "@ledgerhq/errors": "^5.50.0", + "@ledgerhq/devices": "^6.24.1", + "@ledgerhq/errors": "^6.10.0", "events": "^3.3.0" } }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/@ledgerhq/logs": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.50.0.tgz", - "integrity": "sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==" + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/@ledgerhq/logs": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", + "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/lru-cache": { + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", @@ -4573,7 +4572,7 @@ "node": ">=10" } }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/rxjs": { + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/rxjs": { "version": "6.6.7", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", @@ -4584,7 +4583,7 @@ "npm": ">=2.0.0" } }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/semver": { + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", @@ -4598,12 +4597,12 @@ "node": ">=10" } }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/tslib": { + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@ledgerhq/hw-transport-u2f/node_modules/yallist": { + "node_modules/@ledgerhq/hw-transport-webusb/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" @@ -31068,11 +31067,6 @@ "is-typedarray": "^1.0.0" } }, - "node_modules/u2f-api": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/u2f-api/-/u2f-api-0.2.7.tgz", - "integrity": "sha512-fqLNg8vpvLOD5J/z4B6wpPg4Lvowz1nJ9xdHcCzdUPKcFE/qNCceV2gNZxSJd5vhAZemHr/K/hbzVA0zxB5mkg==" - }, "node_modules/uglify-js": { "version": "3.4.10", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", @@ -38391,47 +38385,47 @@ "events": "^3.0.0" } }, - "@ledgerhq/hw-transport-u2f": { - "version": "5.36.0-deprecated", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-5.36.0-deprecated.tgz", - "integrity": "sha512-T/+mGHIiUK/ZQATad6DMDmobCMZ1mVST952009jKzhaE1Et2Uy2secU+QhRkx3BfEAkvwa0zSRSYCL9d20Iqjg==", + "@ledgerhq/hw-transport-webusb": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.24.1.tgz", + "integrity": "sha512-+bAkVF/5MbbGIXobtmc5st/gFEjSRqACk+UPJGSxT21Z2SVm+FgG0Bui5wy24H+Ts/tC4IA3Mff8cz4PGbZhPA==", "requires": { - "@ledgerhq/errors": "^5.34.0", - "@ledgerhq/hw-transport": "^5.34.0", - "@ledgerhq/logs": "^5.30.0", - "u2f-api": "0.2.7" + "@ledgerhq/devices": "^6.24.1", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/hw-transport": "^6.24.1", + "@ledgerhq/logs": "^6.10.0" }, "dependencies": { "@ledgerhq/devices": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz", - "integrity": "sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==", + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.24.1.tgz", + "integrity": "sha512-6SNXWXxojUF6WKXMVIbRs15Mveg+9k0RKJK/PKlwZh929Lnr/NcbONWdwPjWKZAp1g82eEPT4jIkG6qc4QXlcA==", "requires": { - "@ledgerhq/errors": "^5.50.0", - "@ledgerhq/logs": "^5.50.0", + "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/logs": "^6.10.0", "rxjs": "6", "semver": "^7.3.5" } }, "@ledgerhq/errors": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.50.0.tgz", - "integrity": "sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==" + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", + "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" }, "@ledgerhq/hw-transport": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz", - "integrity": "sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==", + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.24.1.tgz", + "integrity": "sha512-cOhxkQJrN7DvPFLLXAS2nqAZ7NIDaFqnbgu9ugTccgbJm2/z7ClRZX/uQoI4FscswZ47MuJQdXqz4nK48phteQ==", "requires": { - "@ledgerhq/devices": "^5.51.1", - "@ledgerhq/errors": "^5.50.0", + "@ledgerhq/devices": "^6.24.1", + "@ledgerhq/errors": "^6.10.0", "events": "^3.3.0" } }, "@ledgerhq/logs": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.50.0.tgz", - "integrity": "sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==" + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", + "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" }, "lru-cache": { "version": "6.0.0", @@ -59902,11 +59896,6 @@ "is-typedarray": "^1.0.0" } }, - "u2f-api": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/u2f-api/-/u2f-api-0.2.7.tgz", - "integrity": "sha512-fqLNg8vpvLOD5J/z4B6wpPg4Lvowz1nJ9xdHcCzdUPKcFE/qNCceV2gNZxSJd5vhAZemHr/K/hbzVA0zxB5mkg==" - }, "uglify-js": { "version": "3.4.10", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", diff --git a/package.json b/package.json index c7c435f89..7648f413e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@aeternity/hd-wallet": "^0.2.0", "@aeternity/ledger-app-api": "0.2.1", "@download/blockies": "^1.0.3", - "@ledgerhq/hw-transport-u2f": "^5.36.0-deprecated", + "@ledgerhq/hw-transport-webusb": "^6.24.1", "@zxing/library": "^0.19.1", "bignumber.js": "^9.0.2", "bluebird": "^3.7.2", diff --git a/src/store/modules/accounts/ledger.js b/src/store/modules/accounts/ledger.js index 42e8c2270..846cb5436 100644 --- a/src/store/modules/accounts/ledger.js +++ b/src/store/modules/accounts/ledger.js @@ -1,6 +1,6 @@ /* eslint no-param-reassign: ["error", { "ignorePropertyModificationsFor": ["state"] }] */ -import TransportU2F from '@ledgerhq/hw-transport-u2f'; +import TransportWebUSB from '@ledgerhq/hw-transport-webusb'; import Ae from '@aeternity/ledger-app-api'; import { TxBuilder, SCHEMA } from '@aeternity/aepp-sdk'; import { i18n } from '../../plugins/ui/languages'; @@ -27,48 +27,56 @@ export default { ...rootGetters['accounts/getByType']('ledger').map(({ source: { idx } }) => idx), -1, ) + 1, - ledgerAppApi: () => new Ae(new TransportU2F()), }, actions: process.env.IS_MOBILE_DEVICE ? { sign: signOnMobile, signTransaction: signOnMobile, } : { - async request({ getters: { ledgerAppApi }, dispatch }, { name, args }) { + async request({ dispatch }, { name, args }) { + const transport = await TransportWebUSB.create(); + const ledgerAppApi = new Ae(transport); if (process.env.RUNNING_IN_FRAME) return ledgerAppApi[name](...args); const modalName = { signTransaction: 'ledgerSignTransaction' }[name] || 'ledgerRequest'; let result; let error; - do { - if (error) { - // eslint-disable-next-line no-await-in-loop - await dispatch('modals/open', { name: 'retryLedgerRequest' }, { root: true }); - } - const modalPromise = dispatch('modals/open', { name: modalName }, { root: true }); - try { - result = await ledgerAppApi[name](...args); // eslint-disable-line no-await-in-loop - error = false; - } catch (err) { - error = true; - } finally { - modalPromise.cancel(); - } - } while (error); + try { + do { + if (error) { + // eslint-disable-next-line no-await-in-loop + await dispatch('modals/open', { name: 'retryLedgerRequest' }, { root: true }); + } + const modalPromise = dispatch('modals/open', { name: modalName }, { root: true }); + try { + result = await ledgerAppApi[name](...args); // eslint-disable-line no-await-in-loop + error = false; + } catch (err) { + error = true; + } finally { + modalPromise.cancel(); + } + } while (error); + } finally { + await transport.close(); + } return result; }, - async create({ getters: { nextIdx, ledgerAppApi }, commit, dispatch }) { + async create({ getters: { nextIdx }, commit, dispatch }) { const modalPromise = dispatch('modals/open', { name: 'confirmLedgerAddress', address: await dispatch('request', { name: 'getAddress', args: [nextIdx] }), create: true, }, { root: true }); + const transport = await TransportWebUSB.create(); + const ledgerAppApi = new Ae(transport); try { const address = await ledgerAppApi.getAddress(nextIdx, true); commit('accounts/add', { address, type: 'ledger', idx: nextIdx }, { root: true }); } catch (error) { dispatch('modals/open', { name: 'ledgerAddressNotConfirmed' }, { root: true }); } finally { + await transport.close(); modalPromise.cancel(); } }, diff --git a/src/store/plugins/ui/ledgerConnection.js b/src/store/plugins/ui/ledgerConnection.js index f46a2db44..4194ce85a 100644 --- a/src/store/plugins/ui/ledgerConnection.js +++ b/src/store/plugins/ui/ledgerConnection.js @@ -1,6 +1,6 @@ -import TransportU2F from '@ledgerhq/hw-transport-u2f'; +import TransportWebUSB from '@ledgerhq/hw-transport-webusb'; export default async (store) => { - const isSupported = await TransportU2F.isSupported(); + const isSupported = await TransportWebUSB.isSupported(); store.commit('setLedgerSupported', isSupported); }; From b6fd8ca90a03aca17c06ae7413006e426e6f1881 Mon Sep 17 00:00:00 2001 From: marc0olo Date: Mon, 11 Apr 2022 16:07:41 +0200 Subject: [PATCH 16/17] chore(deps): aepp-sdk v11.0.1 --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 19c61b343..b1fbdba8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,10 +5,9 @@ "requires": true, "packages": { "": { - "name": "aepp-base", "version": "1.0.1", "dependencies": { - "@aeternity/aepp-sdk": "^11.0.0", + "@aeternity/aepp-sdk": "^11.0.1", "@aeternity/bip39": "^0.1.0", "@aeternity/hd-wallet": "^0.2.0", "@aeternity/ledger-app-api": "0.2.1", @@ -84,9 +83,10 @@ } }, "node_modules/@aeternity/aepp-sdk": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-11.0.0.tgz", - "integrity": "sha512-u3/h+2T2em95b/Q2DWWKqQ5xU6St0dQriqET+bHkLrk5Zf7EekB20r1nq2UoQcYQi44ErlPHF6lVMqFqKhnK3w==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-11.0.1.tgz", + "integrity": "sha512-kx9lgaSItXE1VYqtAk1IFk9UtRJ+vyPfd7Z2X5BavAWvxzcThabX1NGLnw1JjEFNwDddqFzQuzoZu4hFzPIPMQ==", + "license": "ISC", "dependencies": { "@aeternity/aepp-calldata": "^1.1.1", "@aeternity/argon2-browser": "^0.1.2", @@ -34970,9 +34970,9 @@ } }, "@aeternity/aepp-sdk": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-11.0.0.tgz", - "integrity": "sha512-u3/h+2T2em95b/Q2DWWKqQ5xU6St0dQriqET+bHkLrk5Zf7EekB20r1nq2UoQcYQi44ErlPHF6lVMqFqKhnK3w==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-11.0.1.tgz", + "integrity": "sha512-kx9lgaSItXE1VYqtAk1IFk9UtRJ+vyPfd7Z2X5BavAWvxzcThabX1NGLnw1JjEFNwDddqFzQuzoZu4hFzPIPMQ==", "requires": { "@aeternity/aepp-calldata": "^1.1.1", "@aeternity/argon2-browser": "^0.1.2", diff --git a/package.json b/package.json index 7648f413e..40ca08f1e 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "i18n:report": "vue-i18n-extract report --vueFiles './src/**/*.?(js|vue)' --languageFiles './src/locales/**/*.json'" }, "dependencies": { - "@aeternity/aepp-sdk": "^11.0.0", + "@aeternity/aepp-sdk": "^11.0.1", "@aeternity/bip39": "^0.1.0", "@aeternity/hd-wallet": "^0.2.0", "@aeternity/ledger-app-api": "0.2.1", From b3e460388741541cc38cf6db766ac56e92352a07 Mon Sep 17 00:00:00 2001 From: marc0olo Date: Mon, 11 Apr 2022 16:56:32 +0200 Subject: [PATCH 17/17] chore: release v1.0.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b1fbdba8c..feb28282b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "aepp-base", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "1.0.1", + "version": "1.0.2", "dependencies": { "@aeternity/aepp-sdk": "^11.0.1", "@aeternity/bip39": "^0.1.0", diff --git a/package.json b/package.json index 40ca08f1e..8752c1fb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aepp-base", - "version": "1.0.1", + "version": "1.0.2", "author": "Sascha Hanse ", "private": true, "scripts": {