diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..70bb5e71d --- /dev/null +++ b/.env.example @@ -0,0 +1,16 @@ +PROXEUS_EMAIL_FROM= + +PROXEUS_INFURA_API_KEY= + +PROXEUS_SPARKPOST_API_KEY= + +PROXEUS_ENCRYPTION_SECRET_KEY= + +# Sepolia test-net +PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS=0x9bc518Fd070BE3DBB07399261688015744a7FB02 + +# For a local development environment without SSL +PROXEUS_ALLOW_HTTP=true + +# To see additional debugging information +PROXEUS_TEST_MODE=true diff --git a/Makefile b/Makefile index dd75b8349..0ded508ba 100644 --- a/Makefile +++ b/Makefile @@ -79,12 +79,12 @@ all: ui server init: @for d in $(dependencies); do (echo "Checking $$d is installed... " && which $$d ) || ( echo "Please install $$d before continuing" && exit 1 ); done @go version - go install github.com/go-bindata/go-bindata/... - go install github.com/golang/mock/mockgen - go install github.com/wadey/gocovmerge - go install golang.org/x/tools/... - go install golang.org/x/tools/cmd/goimports - go install golang.org/x/tools/cmd/godoc + go install github.com/go-bindata/go-bindata/...@latest + go install github.com/golang/mock/mockgen@latest + go install github.com/wadey/gocovmerge@latest + go install golang.org/x/tools/...@latest + go install golang.org/x/tools/cmd/goimports@latest + go install golang.org/x/tools/cmd/godoc@latest .PHONY: update update: diff --git a/README.md b/README.md index 0aab7c870..66d105792 100644 --- a/README.md +++ b/README.md @@ -31,24 +31,6 @@ If you wish to build the project form the source code, follow the instructions i Please read the [Developer Manual](https://doc.proxeus.com) to learn more about the Proxeus platform. -### Infura and SparkPost - -The Proxeus platform currently depends on [Infura](https://infura.io/) for blockchain services. Supported chains include: - -- ethereum: sepolia -- ethereum: goerli -- ethereum: mainnet -- polygon: mumbai -- polygon: mainnet - -Create an account to get an API Keys. These keys need to be added to corresponding environment variables, or entered when deploying a "one-click" instance. - -Proxeus works best with [SparkPost](https://www.sparkpost.com/) for email integration. - -Please note that the domain you set up on SparkPost MUST match the **reply-to** e-mail address that you configure in the next step in order to create accounts and receive e-mails on your instance. - -If all goes well, Proxeus should be available at http://localhost:1323. The next step will be to [configure](docs/configure.md) your instance for the first time. - ## Contributing As an open-source project, we welcome any kind of community involvement, whether that is by contributing code, reporting issues or diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..032158028 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +## Reporting a Vulnerability + +Please use our public [Issue Tracker](https://github.com/ProxeusApp/proxeus-core/issues) to open improvement and bug tickets. + +If you find a **Security Issue** - a vulnerability that may affect live or testnet deployments please send your report privately to info@proxeus.org - Please DO NOT file a public issue in this case. diff --git a/docker-compose-example.override.yml b/docker-compose-example.override.yml new file mode 100644 index 000000000..f70c84a48 --- /dev/null +++ b/docker-compose-example.override.yml @@ -0,0 +1,21 @@ +--- +# This file is an override and needs to be used like this: +# +# docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up + +version: '3.7' + +services: + node-crypto-forex-rates: + networks: + - reverse-proxy + labels: + com.centurylinklabs.watchtower.enable: "true" + environment: + # Replace values for reverse-proxy + VIRTUAL_HOST: ${NODE_CRYPTO_FOREX_RATES_VIRTUAL_HOST:-proxeus.example.com} + VIRTUAL_PORT: 8011 + # Replace values for letsencrypt + LETSENCRYPT_HOST: ${NODE_CRYPTO_FOREX_RATES_VIRTUAL_HOST:-proxeus.example.com} + LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-admin@example.com} + restart: unless-stopped diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 96cd7ecd4..74d7fd833 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -4,27 +4,26 @@ - [Quick start](quickstart.md) - [User handbook](handbook.md) + - [Formulas guide](formulas.md) + - [F.A.Q.](faq.md) - Build and Run + - [Docker](build_docker.md) - [Build All](build_all.md) - [Configure Sever](configure.md) - - [Test](test.md) - [Front End Only](build_frontend.md) - [Back End Only](build_backend.md) - - [Docker](build_docker.md) + - [Test](test.md) - Development - [Software Architecture](architecture.md) + - [Components](components.md) - [Back End](backend.md) - [Front End](frontend.md) - -- Deployment - - - [Components](components.md) - - [Docker](docker.md) - - [Smart Contract](contract_deployment.md) + - [Database](database.md) + - [Smart Contracts](contract_deployment.md) - API @@ -33,18 +32,10 @@ - [List All Workflows](api_list_all_workflows.md) - [Get Workflow Schema](api_get_workflow_schema.md) - [Execute Workflow](api_execute_workflow.md) - - -- Workflow Extension - - [External Workflow Nodes](external_workflow_nodes.md) -- [Database](database.md) - - [Contributing](contributing.md) - [Code of Conduct](code_of_conduct.md) - [Coding Style](coding_style.md) -- [FAQ](faq.md) - - [License](license.md) diff --git a/docs/build_docker.md b/docs/build_docker.md index 3990f7978..501fde13c 100644 --- a/docs/build_docker.md +++ b/docs/build_docker.md @@ -1,5 +1,38 @@ # Docker +Please make sure that you always pull Docker images from the official `proxeus` DockerHub repository and that you are using the latest version. + +## Start Proxeus + +Run the following command in the directory containing your `docker-compose.yml` file (Linux and OSX): +``` +export PROXEUS_EMAIL_FROM= +export PROXEUS_INFURA_API_KEY= +export PROXEUS_SPARKPOST_API_KEY= +export PROXEUS_ENCRYPTION_SECRET_KEY= +export PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS=0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71 +export PROXEUS_ALLOW_HTTP=true +docker-compose up +``` + +You can also put these settings into an `.env` file in the same folder as the application. + +See [Configuration settings](configure.md) for more details. + +## Tweak your Docker setup + +Besides the basic Docker Compose configuration, you can extend your installation as follows: + +- `docker-compose-cloud.override` for cloud installations, which includes Nginx and Let's Encrypt +- `docker-compose-example.override` shows how to add another Proxeus Node to your installation +- `docker-compose-extra.override` includes all officially supported Proxeus Nodes +- `docker-compose-local.override` if you want to use your local Docker image (details below) + +To use one or more of these overrides, start Proxeus as follows: + +`docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up` + +(you always have to first include `docker-compose.yml`) ## Build a Docker image @@ -42,7 +75,11 @@ docker-compose restart This will build the proxeus-core image based on your current project and use a deployed image for the document service. -## Using Docker for the build +## Tips + +Having an issue with Go? Make sure it's in your path, e.g.: + +`export PATH=$PATH:/usr/local/go/bin` If you're having trouble, try a clean full Docker build, specifying each of the configuration files: @@ -60,10 +97,11 @@ For deployment, a `docker-compose-cloud.override.yml` file is provided which inc docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml up ``` -You may also want to include custom nodes. There is a sample configuration which can be started like this: +You may also want to include custom nodes. There is a sample configuration which can be started like this (also possibly in combination with `docker-compose-cloud`): ``` -docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml -f docker-compose-cnode.override.yml up +docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up + ``` See `docker-compose-extra.override.yml` for examples with several other nodes. diff --git a/docs/configure.md b/docs/configure.md index 04d2f575a..c450b4ae9 100644 --- a/docs/configure.md +++ b/docs/configure.md @@ -5,15 +5,17 @@ When starting the server for the first time, you will need to configure it. Open http://localhost:1323/init to configure your server. Use the configuration below as an example. -## Document Service URL -``` -https://dev-ds.proxeus.com/ -``` +**Note:** that your system configuration at this point will be reflected in the local configuration database under `data/proxeus-platform/settings/main.json`. Any future changes to the configuration must be made here - the environment variables will not be propagated, unless you delete this file to reset the deployment. ## Infura API Key -Generate a [infura API Key](https://infura.io) + +Generate an [Infura API Key](https://infura.io) ## Blockchain File Storage contract address + +You can switch between the networks using the environment configuration `PROXEUS_BLOCKCHAIN_NET`. +For your convenience, a smart contract is deployed on several networks at the following addresses: + ### Sepolia ``` 0x9bc518Fd070BE3DBB07399261688015744a7FB02 @@ -46,15 +48,15 @@ Generate a [infura API Key](https://infura.io) ``` [Verify on Etherscan](https://polygonscan.com/address/0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4) - - Alternatively: deploy your own smart contract from [ProxeusFS.sol](https://github.com/ProxeusApp/storage-app/blob/master/spp/eth/solidity/ProxeusFS.sol) ## Email from + ``` no-reply@proxeus.com ``` + ## Sparkpost API Key Set up a free account on [SparkPost](https://www.sparkpost.com) @@ -70,6 +72,12 @@ youremail@address.com This is a salt to hash your user's passwords in the database. You can use any value, with preference to hard generated strings. Make sure that it is exactly 32 characters long. Do not change the key on a running instance. This can only be set using an environment variable. +## Document Service URL + +This only needs to be changed if you are running the service on a separate machine. See the documentation at https://github.com/ProxeusApp/document-service + +--- + # Full Configuration You can get the full list of configuration parameters using the `-h` parameter: diff --git a/docs/faq.md b/docs/faq.md index e2d96523c..8996e7b82 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,4 +1,4 @@ -# FAQ +# Frequently Asked Questions To see new tips from the community, or if you have other questions, please visit our [Community Discussions](https://github.com/orgs/ProxeusApp/discussions). @@ -7,12 +7,14 @@ To see new tips from the community, or if you have other questions, please visit **Q:** Can I build it on on Windows? **A:** There's no support for Windows yet; the whole init, build system has been tested on Linux and Mac only. -## + +--- **Q:** I'm getting an error when trying to run the frontend. **A:** Make sure you have NodeJS v8 and yarn 1.12. It hasn't been tested with superior versions yet. -## + +--- ## Settings @@ -21,11 +23,12 @@ To see new tips from the community, or if you have other questions, please visit **A:** Yes, pretty much all the are changeable through the Internationalization settings. A SUPERADMIN or higher user can change that. That menu item should be shown on the sidebar in the backend or under `/admin/i18n` -## +--- ## Forms **Q:** Why the name field is red? **A:** Components need to be unique and only a-z, A-Z, 0-9 is allowed. Do not use special characters and spaces for the naming of components. -## + +--- diff --git a/docs/formulas.md b/docs/formulas.md new file mode 100644 index 000000000..ad9460ab8 --- /dev/null +++ b/docs/formulas.md @@ -0,0 +1,281 @@ +# Formulas Guide + +As introduced in the [Proxeus Handbook](handbook) ([section 5.3](handbook#5.3.4-formulas)), this page describes the most commonly used formulas that will suffice for many users when creating template files. + +For more advanced formulas, please refer to the [advanced section](#advanced), or, for the full reference, visit the [Jtwig Book](https://github.com/jtwig/book). + +#### IF-Formula + +The IF-Formula contains a “condition” and content. This means, if the user enters a certain “Value” (= “condition”), a certain content will be displayed in the document. +Example: + +`{%if input.Gender == 'male' %} Dear Mr. {%endif%}` + +Use “or” to add another “Value” to the condition, displaying the content in both cases. +Example: + +`{%if input.Gender == 'male' or input.Gender == 'female' %} Dear Mr./Mrs. {%endif%}` + +Use “!=” instead of “==” to display the content if the “condition” does not match the “Value”. +Example: + +`{%if input.Gender != 'male' %} Dear Mrs. {%endif%}` + +The same could also be achieved using the IF-ELSE-Formula. + +#### IF-ELSE-Formula + +The IF-ELSE-Formula displays different content, depending on the “Value” entered. + +Example: + +`{%if input.Gender == 'male' %} Dear Mr. {%else%} Dear Mrs. {%endif%}` + +#### IF-ELSEIF-ELSE-Formula + +Use the IF-ELSEIF-ELSE-Formula to check two “conditions”, displaying different content if the “condition” is matched and showing the content after ELSE when both “conditions” don’t match. + +Example: + +`{%if input.Gender == 'male' %} Dear Mr. {%elseif input.Gender == 'female' %} Dear Mrs. {%else%} Dear Mr./Mrs. {%endif%}` + +#### FOR Formula + +The “FOR” Formula is used to loop through an array of values (i.e. from the Dynamic Lists or Checkboxes) and create a list output. + +To gather the birthdays of our friends we have created a field, where multiple entries can be made. + +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_8a570ce7f4d583b2.png) + +To add all the entries from this “Dynamic List” to the document the following formula is used: + +``` +{% for item in input.FirstName %} +* {{input.FirstName\[loop.index0\]}} {{input.LastName\[loop.index0\]}}, {{input.Birthdate\[loop.index0\]}} +{% endfor %} +``` + +This will create a bullet point list (it works with other formatting too): + + +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_d241ff7211167f3a.png) + +For checkboxes, the following formula can be used: + +``` +{%for item in input.Content %} +• {{item}} +{% endfor %} +``` + +#### Mathematical Operations + +Calculations can be made using the following operators: +, -, \*, / +Example: Adding one value to another + +`{{input.Value1 + input.Value2}}` + +#### Variables + +Use the “Set Formula” to define “Values” that are not entered in the form but are needed in your document. + +`Use {% set MyValue = 'Content' %} to set a variable.` + +Example 1: `{% set MyValue1 = 'This is my set variable one.' %}` + +Example 2: `{% set MyValue2 = 'This is my set variable two.' %}` + +To set a number for the variable, leave out the ''. + +Example 1: `{% set MyNumber1 = 3 %}` + +Example 2: `{% set MyNumber2 = 5 %}` + +There’s a possibility to set a text list. + +Example: `{% set MyList = \['My Value 1', 'My Value 2', 'My Value 3'\] %}` + +There are different options to include the variables in the document: + +**Input (ODT template file)** + +**Output (Document)** + +`{{MyValue1}}` + +This is my set variable one. + +`{{MyValue1 ~ MyValue2}}` + +This is my set variable one. This is my set variable two. + +`{{MyValue1 ~ ' and ' ~ MyValue2}}` + +This is my set variable one. and This is my set variable two. + +`{{MyNumber1+MyNumber2}}` + +8 + +`{{MyValue1.contains('is')}}` + +true + +`{{MyValue1.substring(MyValue1.lastIndexOf('set'))}}` + +set variable one. + +`{{MyValue1.startsWith('This')}}` + +true + +`{{MyValue1.endsWith('!')}}` + +false + +#### Tips + +* IF-Formulas are helpful, if you want to display (or hide) certain text elements in the document, depending on “Values” entered by the user + +* IF-Formulas don’t work if... + * they contain umlaute (ä, ö, ü, ...) or special characters (/, &, %, …) + * the checkbox or dynamic list component is used (because they allow multiple values) + +* There doesn’t have to be content after `{% else %}`, in this case nothing will be displayed +* Use `{{myNumber|number\_format(2, '.', ',')}}` to format numbers. The first parameter defines the number of decimal places, the second parameter defines the decimal point and the third parameter defines the thousands separator. The example formula turns 1234 into 1,234.00 +* To check if an optional field has been completed or not (= is empty), use `{% if MyValue1 == '' %} TEXT\_IF\_EMPTY {% else %} TEXT\_IF\_NOT\_EMPTY {% endif %}.` You can also use `{% if MyValue1 != '' %} TEXT\_IF\_NOT\_EMPTY {% endif %}`. + +--- + + + +# Advanced Formulas + +This section describes some useful advanced formulas that might be of interest when creating template files. For the full reference, visit [Jtwig](https://github.com/jtwig/book). + +#### Simple Input Output + +**Input (ODT template file)** + +**Output (Document)** + +Current time + +`{{'now'|date('dd.MM.yyyy HH:mm:ss.SSSZ')}}` + +_See other [](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)_ [_date patterns_](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) + += `23.08.2019 12:08:33.018+0200.` + +Handling null as math value + +`{{(null)|number\_format(2, '.', ',')}}` + += 0.00 + +Calc with text + +`{{('2')|number\_format \* ('4')|number\_format}}` + += 8 + +Custom style for output + +``` +{% set MyValue3 = 'Value 3' %} + +{{MyValue3}} +``` + += **Text Value** + +Inline Condition + +`{{(MyValue3 == 'Value 3')?'MyValue3 equals Value 3':'MyValue3 does not equal Value 3'}}` + += MyValue3 equals Value 3 + +Replace Text + +`{{'I like this and that.'|replace({'this': 'foo', 'that': 'bar'})}}` + += I like foo and bar. + +Checks + +``` +{{defined(\[1,2\]\[5\])}} += False + +{{empty(\[1,2\])}} += False + +{{even(2)}} += True + +{{odd(2)}} += False + +{{iterable(2)}} += True + +{{iterable(\[2,3\])}} += True + +{{first(\[1,2\])}} += 1 + +{{last(\[1,2\])}} += 2 +``` + +Join / Merge + +``` +{{join(\[1,null,2\],', ')}} += 1, 2 +``` + +``` +{{merge(\[1, 2\], 3)}} +=\[1, 2, 3\] +``` + +Length + +``` +{{length(\[1,2\])}} += 2 + +{{length(null)}} += 0 + +{{length(9)}} += 1 +``` + +Round + +``` +{{round(1.33,'CEIL')}} +2 + +{{round(1.33,'FLOOR')}} +1 +``` + +Capitalize + +``` +{{capitalize('hello world')}} +Hello world + +{{title('hello world')}} +Hello World + +{{upper('jtwig')}} +JTWIG + +{{lower('jtwig')}} +jtwig +``` diff --git a/docs/handbook.md b/docs/handbook.md index f09a91599..a6ceb4149 100644 --- a/docs/handbook.md +++ b/docs/handbook.md @@ -153,6 +153,8 @@ In the account settings, you can: 4 User View =========== + + 4.1 Documents ------------- @@ -258,7 +260,6 @@ The Admin Panel is the backstage area of the platform. It can only be accessed b The following description is an example process for creating a workflow on the Proxeus platform: - 1. Think about the workflow and the documents that should be generated, perhaps map out the process on a piece of paper 2. Start by creating the “Forms” you need 3. Create the document template files in the ODT format @@ -267,114 +268,80 @@ The following description is an example process for creating a workflow on the P 6. Create a workflow and add all forms and templates to it 7. Switch to the “User View” and try out your workflow +This should give you an idea how to start things off. We think that, with a little practice, you will get the hang of it! +In the following sections, the process of creating Forms (5.2), Templates (5.3) and Workflows (5.4) is described. -This should give you an idea how to start things off. You’ll get the hang of it quickly. - - - - ------- - -5.2 Workflows -------------- +5.2 Forms +--------- -Workflows are built by connecting templates, forms and other workflow elements. Create your templates and forms before you start building a workflow. +Forms are used to collect user input throughout a workflow process. The variables defined in the components will be used to reflect the user input on a document template. -### 5.2.1 Creating a Workflow +### 5.2.1 Create a Form To create a new workflow, click on “Workflows” in the navigation panel and click on the “Create new” button. -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_5481d85d82acc650.png) - - - -Enter a “Name” for your new workflow. Optionally, you can add further information in the “Details” field. Click on “✓” and your workflow is created. Click on the newly created workflow to access it. - -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_7139fb3de33c357a.png) - - - -When building a workflow, the templates have to be inserted as the first steps, followed by the forms (as shown in the example below). It is also possible to create conditions that split workflows into different paths. - - - -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_64aa240a167179fa.png) -_A simple workflow with one template (pink) and one form (green)_ - -### 5.2.2 Price - -Creators can decide to make a workflow available to users for a fee. A price of 0 means that it can be executed for free. Consumers will be charged the price set in XES on a pay-per-use basis (the purchase grants the right for one complete workflow execution). - - - -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_ce291de963f4a5c7.png) - -_The workflow settings with the price on the right_ - - - -In order to receive payments, the workflow owner must have an Ethereum account linked to their user profile. - -### 5.2.3 Publish - -Since the sharing of workflows and its elements does not work recursively, the “Publish” function can be used to easily make the workflow executable by other users. This is done by giving read permission (for the workflow and all its elements) to everyone with a “User” role. - -Publishing only grants execution rights in the front area of the platform, it does not share anything to be viewed by other Creators in the backend. Publishing can be undone by removing the group permission of the workflow. - -### 5.2.4 Condition - -Conditions can be used to guide the user through different paths of a workflow, depending on input from a previous form. It requires a basic understanding of JavaScript to customize. New conditions come with default code. For normal usage you may just have to exchange some variables without touching the code in any other way. To add a condition to your workflow, simply drag & drop it onto the canvas and a configuration window will pop up. "someVar" is the “Name” of the form component you want to evaluate, and "someValue" is the “Value”, which is set in the component. "something else" is the other “Value” of the component. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_ed735f78a5c0be77.png) +Enter a “Name” for your new form. Optionally, you can add further information in the “Details” field. Click on “✓” and your form is created. Click on the newly created form to access the form editor. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_3f41852b7dfa724d.png) -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_10299e76126cc024.png) +The forms editor is split into two parts. On the left side you’re building your form, on the right side you will find all available form components. Add components to your form by performing a simple drag & drop action. -_A workflow with a condition, sending the user to different forms based on inputs from a previous form_ +The basic steps are: -### 5.2.5 Custom Nodes +1. Drag & drop a component into the form area on the left +2. Click on it to open its properties and set the name, label etc. +3. Repeat 1 & 2 until your form is complete +4. Activate the “Test” mode on the left to verify the result -Proxeus allows you to develop custom nodes and to make them available to all users to be used in workflows. When adding elements to a workflow, you may encounter custom nodes like this: +![Shape2](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_30ebd5a287e6c904.gif) +_The two form editor areas: your form (left) and the form component templates (right)_ +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_8f8c4dee1c7f180e.png) -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_4225235e26b8c178.png) +_A correctly configured component. The name is used as a variable in the ODT Template file._ +**Important:** Your component names must not include any spaces or special characters. +### 5.2.2 Workspace -You can add custom nodes at any position in the workflow. +In the default view “Workspace”, the forms are built by dragging & dropping form components onto the canvas. Components include simple fields, radio buttons, checkboxes, and many more. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_c9ff17083ce623b0.png) +### 5.2.3 Action -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_951d02a5e7f5dc31.png) -_A custom node at the end of our example workflow_ +Under Action, the form components can be conditionally linked to each other. This is useful if depending on a form input, more form components should be shown. Simply connect the blue dots of the components. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_f2247b1e55d57403.png) +_Demonstration of the action mode: depending on the user’s radio button choice,_ _simple_ _field_ _A or B is shown._ -### 5.2.6 Sub-workflows +### 5.2.4 Test -In Proxeus, you can also build workflows that call other workflows. The main workflow will start normally and then guide the user through the sub-workflow. After the user has completed this sub-workflow or “workflow in a workflow”, they will be brought back to the main workflow. +In the “Test” tab, the form can be tested live in action without having to switch to the “User View”. Do your components behave as intended? You will find out here. -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_d7693cee8e9aac78.png) -_A workflow with a sub-workflow. The user will see form 1A first, then the forms of the sub-workflow and finally form 2A._ +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_7c16ff586c91d22.png) -### 5.2.7 Deleting connections & elements +_Demonstration of the Test mode using the “Actions Example” from above._ -You can remove connections between workflow elements by clicking on the connection itself and then using the “delete selected” button that appears on top. Removing elements works the same. You can always re-add them afterwards. +In the footer of the test tab, there is a “Reset” button to re-initialize the form and a “Play” button that activates the validation to check if the form can be finished with your current inputs. Validation errors such as empty required fields will then be displayed. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_7082734f41d7a205.png) +_The Form Reset and Form Validation buttons_ -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_e1ea58a054e536e0.png) -_Deleting the connection between the template and the form_ +--- 5.3 Templates ------------- Entries in the “Templates” section are used to upload ODT template files, which were created in a document editor that supports the OpenDocument Text format, the most common being LibreOffice, OpenOffice, and Microsoft Word. The ODT files need to contain the placeholder variables that are defined in your form components. - - If the platform has multiple active languages, you may upload one version of the template for every language. ### 5.3.1 Creating an ODT Template File @@ -383,30 +350,21 @@ Open the document creator of your choice and save the empty file in ODT format o ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_90e0d496413daf75.png) - - ### 5.3.2 Creating a Template Click on “Templates” in the navigation panel and click on the “Create new” button to create a new template. ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_64cf037526a23d7.png) - - Enter a “Name” for your new template. Optionally, you can add further information in the “Details” field. Click on “✓” and your template is created. ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_c928046a2a552f00.png) - - - Click on the newly created template to access it. Drag the ODT file onto the upload area of the respective language or click on the area to browse your local directory and select the right file. ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_9375dbc8240de8f6.png) - - If your ODT file is already complete with all the content and variables needed, click on “Save”. If your ODT file is still empty, do not click on “Save” yet and proceed with transferring variables into the ODT file, which is explained in the next chapter. ### 5.3.3 Templating Assistance @@ -417,107 +375,33 @@ The template management view offers you assistance in getting your ODT template To start, you have to access the template you want to work on, upload the template file and open it on your local machine in your preferred document editor. Each time you save the file locally, all changes to your local file will be replicated in the preview window on the right-hand side of the view. If you then hit the save button on the Proxeus platform, your changes will be made on the server as well without a new manual upload. Therefore, when you are satisfied with the state of the document in the preview, it is important that you click the “Save” button. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_71ee1bf264a4edea.png) - - - - **Important:** The connection between the freshly uploaded file on your local machine and the preview only persists as long as you don’t exit the template. In case you want to re-establish that connection, you have to re-upload the template file from your local machine. - - #### Copy-Paste Variables To directly copy and paste variables, below the upload field, search for your form, click on it, and select the variable you want to copy. The confirmation “copied to clipboard” appears. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_f74a14eaebbef02b.png) - - To insert the variables into your local ODT file, which is open in the document editor (not in the preview in the browser), simply paste them in the desired location. Of course, it is also possible to write the variables into the ODT file manually. - - - - **Important:** Dynamic Lists and Checkboxes need to be added to the ODT template with the use of [FOR Formulas](#_for-formula). - - #### Test on the fly In order to test whether the template file you uploaded behaves as desired, a testing on the fly functionality is available. In the search bar below the upload field, search for the form which contains the variable you want to test. Click on it, enter the values you want to test in the respective field and see the result in the preview. - - ![Shape1](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_ead9a2bf0849694e.gif) +### 5.3.4 Formulas +Inside of the template, you can also formulas - similar to the ones you probably already know from spreadsheets. Please see the [Formulas guide](formulas) for a full reference. Here are a few useful examples to get you started. -### 5.3.4 Common Formulas - -This section describes the most commonly used formulas that will suffice for many users when creating template files. For more advanced formulas, please refer to section 5.3.5., or, for the full reference, visit [Jtwig](https://github.com/jtwig/book). - -#### IF-Formula - -The IF-Formula contains a “condition” and content. This means, if the user enters a certain “Value” (= “condition”), a certain content will be displayed in the document. -Example: - -`{%if input.Gender == 'male' %} Dear Mr. {%endif%}` - -Use “or” to add another “Value” to the condition, displaying the content in both cases. -Example: - -`{%if input.Gender == 'male' or input.Gender == 'female' %} Dear Mr./Mrs. {%endif%}` - -Use “!=” instead of “==” to display the content if the “condition” does not match the “Value”. -Example: +To test a condition: -`{%if input.Gender != 'male' %} Dear Mrs. {%endif%}` - -The same could also be achieved using the IF-ELSE-Formula. - -#### IF-ELSE-Formula - -The IF-ELSE-Formula displays different content, depending on the “Value” entered. - -Example: - -`{%if input.Gender == 'male' %} Dear Mr. {%else%} Dear Mrs. {%endif%}` - -#### IF-ELSEIF-ELSE-Formula - -Use the IF-ELSEIF-ELSE-Formula to check two “conditions”, displaying different content if the “condition” is matched and showing the content after ELSE when both “conditions” don’t match. - -Example: - -`{%if input.Gender == 'male' %} Dear Mr. {%elseif input.Gender == 'female' %} Dear Mrs. {%else%} Dear Mr./Mrs. {%endif%}` - -#### FOR Formula - -The “FOR” Formula is used to loop through an array of values (i.e. from the Dynamic Lists or Checkboxes) and create a list output. - -To gather the birthdays of our friends we have created a field, where multiple entries can be made. - -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_8a570ce7f4d583b2.png) - -To add all the entries from this “Dynamic List” to the document the following formula is used: - -``` -{% for item in input.FirstName %} -* {{input.FirstName\[loop.index0\]}} {{input.LastName\[loop.index0\]}}, {{input.Birthdate\[loop.index0\]}} -{% endfor %} -``` - -This will create a bullet point list (it works with other formatting too): - - -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_d241ff7211167f3a.png) +`{%if input.Color == 'blue' %} My favorite color! {%endif%}` For checkboxes, the following formula can be used: @@ -527,316 +411,108 @@ For checkboxes, the following formula can be used: {% endfor %} ``` -#### Mathematical Operations - -Calculations can be made using the following operators: +, -, \*, / -Example: Adding one value to another +Calculations can be made using the following operators: +, -, \*, / - for example: `{{input.Value1 + input.Value2}}` -#### Variables - -Use the “Set Formula” to define “Values” that are not entered in the form but are needed in your document. - -`Use {% set MyValue = 'Content' %} to set a variable.` - -Example 1: `{% set MyValue1 = 'This is my set variable one.' %}` - -Example 2: `{% set MyValue2 = 'This is my set variable two.' %}` - -To set a number for the variable, leave out the ''. - -Example 1: `{% set MyNumber1 = 3 %}` - -Example 2: `{% set MyNumber2 = 5 %}` - -There’s a possibility to set a text list. - -Example: `{% set MyList = \['My Value 1', 'My Value 2', 'My Value 3'\] %}` - -There are different options to include the variables in the document: - -**Input (ODT template file)** - -**Output (Document)** - -`{{MyValue1}}` - -This is my set variable one. - -`{{MyValue1 ~ MyValue2}}` - -This is my set variable one. This is my set variable two. - -`{{MyValue1 ~ ' and ' ~ MyValue2}}` - -This is my set variable one. and This is my set variable two. - -`{{MyNumber1+MyNumber2}}` - -8 - -`{{MyValue1.contains('is')}}` - -true - -`{{MyValue1.substring(MyValue1.lastIndexOf('set'))}}` - -set variable one. - -`{{MyValue1.startsWith('This')}}` - -true - -`{{MyValue1.endsWith('!')}}` - -false - -#### Tips - -* IF-Formulas are helpful, if you want to display (or hide) certain text elements in the document, depending on “Values” entered by the user - -* IF-Formulas don’t work if... - * they contain umlaute (ä, ö, ü, ...) or special characters (/, &, %, …) - * the checkbox or dynamic list component is used (because they allow multiple values) - -* There doesn’t have to be content after `{% else %}`, in this case nothing will be displayed -* Use `{{myNumber|number\_format(2, '.', ',')}}` to format numbers. The first parameter defines the number of decimal places, the second parameter defines the decimal point and the third parameter defines the thousands separator. The example formula turns 1234 into 1,234.00 -* To check if an optional field has been completed or not (= is empty), use `{% if MyValue1 == '' %} TEXT\_IF\_EMPTY {% else %} TEXT\_IF\_NOT\_EMPTY {% endif %}.` You can also use `{% if MyValue1 != '' %} TEXT\_IF\_NOT\_EMPTY {% endif %}`. - - -### 5.3.5 Advanced Formulas - -This section describes some useful advanced formulas that might be of interest when creating template files. For the full reference, visit [Jtwig](https://github.com/jtwig/book). - - - -#### Simple Input Output - - -**Input (ODT template file)** - -**Output (Document)** - -Current time +The current time or date can be visualised like this: `{{'now'|date('dd.MM.yyyy HH:mm:ss.SSSZ')}}` -_See other [](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)_ [_date patterns_](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) - -= `23.08.2019 12:08:33.018+0200.` - -Handling null as math value - -`{{(null)|number\_format(2, '.', ',')}}` - -= 0.00 - -Calc with text - -`{{('2')|number\_format \* ('4')|number\_format}}` - -= 8 - -Custom style for output - -``` -{% set MyValue3 = 'Value 3' %} - -{{MyValue3}} -``` - -= **Text Value** - -Inline Condition - -`{{(MyValue3 == 'Value 3')?'MyValue3 equals Value 3':'MyValue3 does not equal Value 3'}}` - -= MyValue3 equals Value 3 - -Replace Text - -`{{'I like this and that.'|replace({'this': 'foo', 'that': 'bar'})}}` - -= I like foo and bar. - -Checks - -``` -{{defined(\[1,2\]\[5\])}} -= False - -{{empty(\[1,2\])}} -= False - -{{even(2)}} -= True - -{{odd(2)}} -= False - -{{iterable(2)}} -= True - -{{iterable(\[2,3\])}} -= True - -{{first(\[1,2\])}} -= 1 - -{{last(\[1,2\])}} -= 2 -``` - -Join / Merge +We can Title Case or CAPITALIZE some text: ``` -{{join(\[1,null,2\],', ')}} -= 1, 2 -``` - -``` -{{merge(\[1, 2\], 3)}} -=\[1, 2, 3\] -``` - -Length - -``` -{{length(\[1,2\])}} -= 2 - -{{length(null)}} -= 0 - -{{length(9)}} -= 1 -``` - -Round - -``` -{{round(1.33,'CEIL')}} -2 - -{{round(1.33,'FLOOR')}} -1 -``` - -Capitalize - -``` -{{capitalize('hello world')}} -Hello world - {{title('hello world')}} Hello World {{upper('jtwig')}} JTWIG - -{{lower('jtwig')}} -jtwig ``` -5.4 Forms ---------- - -Forms are used to collect user input throughout a workflow process. The variables defined in the components will be used to reflect the user input on a document template. - -### 5.4.1 Create a Form - -To create a new workflow, click on “Workflows” in the navigation panel and click on the “Create new” button. - -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_ed735f78a5c0be77.png) - - - -Enter a “Name” for your new form. Optionally, you can add further information in the “Details” field. Click on “✓” and your form is created. Click on the newly created form to access the form editor. - -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_3f41852b7dfa724d.png) - - - -The forms editor is split into two parts. On the left side you’re building your form, on the right side you will find all available form components. Add components to your form by performing a simple drag & drop action. - - - -The basic steps are: -1. Drag & drop a component into the form area on the left -2. Click on it to open its properties and set the name, label etc. -3. Repeat 1 & 2 until your form is complete -4. Activate the “Test” mode on the left to verify the result +------ +5.4 Workflows +------------- +Workflows are built by connecting templates, forms and other workflow elements. Create your templates and forms before you start building a workflow. +### 5.4.1 Creating a Workflow -![Shape2](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_30ebd5a287e6c904.gif) +To create a new workflow, click on “Workflows” in the navigation panel and click on the “Create new” button. -_The two form editor areas: your form (left) and the form component templates (right)_ +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_5481d85d82acc650.png) +Enter a “Name” for your new workflow. Optionally, you can add further information in the “Details” field. Click on “✓” and your workflow is created. Click on the newly created workflow to access it. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_7139fb3de33c357a.png) -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_8f8c4dee1c7f180e.png) +When building a workflow, the templates have to be inserted as the first steps, followed by the forms (as shown in the example below). It is also possible to create conditions that split workflows into different paths. -_A correctly configured component. The name is used as a variable in the ODT Template file._ +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_64aa240a167179fa.png) +_A simple workflow with one template (pink) and one form (green)_ +### 5.4.2 Price +Creators can decide to make a workflow available to users for a fee. A price of 0 means that it can be executed for free. Consumers will be charged the price set in XES on a pay-per-use basis (the purchase grants the right for one complete workflow execution). -**Important:** Your component names must not include any spaces or special characters. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_ce291de963f4a5c7.png) +_The workflow settings with the price on the right_ +In order to receive payments, the workflow owner must have an Ethereum account linked to their user profile. -### 5.4.2 Workspace +### 5.4.3 Publish -In the default view “Workspace”, the forms are built by dragging & dropping form components onto the canvas. Components include simple fields, radio buttons, checkboxes, and many more. +Since the sharing of workflows and its elements does not work recursively, the “Publish” function can be used to easily make the workflow executable by other users. This is done by giving read permission (for the workflow and all its elements) to everyone with a “User” role. +Publishing only grants execution rights in the front area of the platform, it does not share anything to be viewed by other Creators in the backend. Publishing can be undone by removing the group permission of the workflow. +### 5.4.4 Condition -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_c9ff17083ce623b0.png) +Conditions can be used to guide the user through different paths of a workflow, depending on input from a previous form. It requires a basic understanding of JavaScript to customize. New conditions come with default code. For normal usage you may just have to exchange some variables without touching the code in any other way. To add a condition to your workflow, simply drag & drop it onto the canvas and a configuration window will pop up. "someVar" is the “Name” of the form component you want to evaluate, and "someValue" is the “Value”, which is set in the component. "something else" is the other “Value” of the component. -### 5.4.3 Action +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_10299e76126cc024.png) -Under Action, the form components can be conditionally linked to each other. This is useful if depending on a form input, more form components should be shown. Simply connect the blue dots of the components. +_A workflow with a condition, sending the user to different forms based on inputs from a previous form_ -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_f2247b1e55d57403.png) +### 5.4.5 Custom Nodes -_Demonstration of the action mode: depending on the user’s radio button choice,_ _simple_ _field_ _A or B is shown._ +Proxeus allows you to develop custom nodes and to make them available to all users to be used in workflows. When adding elements to a workflow, you may encounter custom nodes like this: -### 5.4.4 Test +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_4225235e26b8c178.png) -In the “Test” tab, the form can be tested live in action without having to switch to the “User View”. Do your components behave as intended? You will find out here. +You can add custom nodes at any position in the workflow. +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_951d02a5e7f5dc31.png) +_A custom node at the end of our example workflow_ +### 5.4.6 Sub-workflows -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_7c16ff586c91d22.png) +In Proxeus, you can also build workflows that call other workflows. The main workflow will start normally and then guide the user through the sub-workflow. After the user has completed this sub-workflow or “workflow in a workflow”, they will be brought back to the main workflow. -_Demonstration of the Test mode using the “Actions Example” from above._ +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_d7693cee8e9aac78.png) +_A workflow with a sub-workflow. The user will see form 1A first, then the forms of the sub-workflow and finally form 2A._ -In the footer of the test tab, there is a “Reset” button to re-initialize the form and a “Play” button that activates the validation to check if the form can be finished with your current inputs. Validation errors such as empty required fields will then be displayed. +### 5.4.7 Deleting connections & elements -![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_7082734f41d7a205.png) +You can remove connections between workflow elements by clicking on the connection itself and then using the “delete selected” button that appears on top. Removing elements works the same. You can always re-add them afterwards. -_The Form Reset and Form Validation buttons_ +![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_e1ea58a054e536e0.png) +_Deleting the connection between the template and the form_ +--- 5.5 Sharing ----------- The sharing dialog can be found in several places and is therefore explained in this separate subchapter to prevent redundancy. - - **Important:** The sharing feature is designed for experienced users who would like to collaborate with other users or publish their work for others to use or copy. Using the sharing feature without a clear plan may lead to unintended results. Testing on a dedicated testing platform is recommended. - - All entities such as forms, workflows and templates are protected by permissions. By default only their owner can see, edit and use them. However, permissions can be extended to other users by using the “Sharing” feature present in the editing tools of all elements. The Proxeus permission model consists of “change owner”, “share by link”, “share with all users of a role” and “grant access to specific users”. Depending on your permissions on the element, this dialog might look different. The ownership grants full rights over the respective element and can be transferred. - - Sharing does not work recursively on Proxeus; access rights can be granted at a fine granularity. 5.6 User Management @@ -844,25 +520,16 @@ Sharing does not work recursively on Proxeus; access rights can be granted at a Superadmins and Root users can access the user management. They can search through all users, overriding the privacy flag (do not want to be found). - - The following actions are available: + * Change the name and description (“More about me”) * Change the role * Remove API keys - - - You may not delete users or change their email or Ethereum address. You may change your own role, but only to lower ranks. - - The user database can be exported completely or selectively. To only export specific users, you can use the search function and only export the results or open a profile for a single user export. Exported users can then be imported on another platform. Existing entries will be ignored when importing. Imported users will be marked. - - - ------ 5.7 Internationalization @@ -870,71 +537,41 @@ The user database can be exported completely or selectively. To only export spec Operators can access the “Internationalization” page. All titles, labels and texts of the platform can be found and edited. - - Proxeus out of the box is configured using English as a default language. Scroll down to the “Languages” section to add additional languages. You can activate and deactivate languages there, too. If multiple languages are available, all users will find a language selection dropdown next to their profile icon when executing a workflow. - - Translations can be exported language by language. You can prepare a new language on your testing environment, then import it to the productive environment when it is ready. - - **For developers:** New labels are automatically detected and added to the translations database. There is no need to manually add them. - - ### 5.7.1 Creating multilingual workflows Once the platform has two activated languages, workflows can be made multilingual. There are two possible ways to do so: - -1. Duplicate the workflow completely, translate all the labels and upload the template(s) in the new language. Add the language to the workflow name. The users will see two entries and start the workflow in the prefered language. - -2. Add translation codes for all texts of your forms in the “Internationalization” editor. Activate the “i18n” in the forms and select the translation codes. Open the template entry and upload a second document template in the new language. - - +1. Duplicate the workflow completely, translate all the labels and upload the template(s) in the new language. Add the language to the workflow name. The users will see two entries and start the workflow in the prefered language. +2. Add translation codes for all texts of your forms in the “Internationalization” editor. Activate the “i18n” in the forms and select the translation codes. Open the template entry and upload a second document template in the new language. The second method is only available to Operators. It offers more possibilities but requires a well-structured approach. The steps are described below. - - Add a new code in the translations by filling in the code search and the text search. This will enable the “+” button. The “text” field will be translated in your active language and can be changed later. Regarding the code, you could use a numbering system or a convention such as
.. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_7be2670d2f1892cb.png) - - The result looks like this: ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_93d98c7a37d04dc3.png) - - Then navigate to your form and on the component property (e.g. label) that you wish to translate, activate the “i18n” slider. Now enter the translation code. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_a1d0a25615f373f4.png) _Form builder: selecting a translation code to be used for the “Label” property._ - - - - When multiple languages are active, you can upload translated versions of templates: ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_463f7d37dd1f0f7e.png) - - - - ------ 5.8 Data @@ -942,28 +579,16 @@ When multiple languages are active, you can upload translated versions of templa Exports can either be done under “Data” or under “Workflows”, “Templates” and “Forms”. - - **Warning:** Be careful when sharing your exports with others. Make sure it only contains elements that you are willing to share - and not any intellectual property that you want to keep for yourself. - - Under “Data”, User data, Templates, Forms, Workflows, Users, Translations and Settings can be imported and exported. The elements, which are allowed to be imported/exported depend on the user role. - - Proxeus imports data with a “best effort” approach, meaning that errors will not block the rest of the import. Imported entries will be marked in the application. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_6544c8b9845e4ce8.png) - - Under “Workflows”, “Templates” and “Forms”, it is possible to only export the workflows, templates and forms. Also, the search function can be used to filter the elements which are to be exported. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_bd6b023a95f49a54.png) _Using the search function to only export the “Proxeus Form”._ @@ -973,17 +598,11 @@ _Using the search function to only export the “Proxeus Form”._ Operators with the “Root” role can access the “System Settings” page. It is the same page that is also displayed on the “Power Up” screen during the installation of the platform. Please refer to the chapter “Platform Installation” for further information. - - Changes made to the system settings are effective immediately. You can even switch to another Ethereum network without any code changes or service restarts. - - **Important:** To avoid unintended results, the testing of System Setting changes on a dedicated testing platform is highly recommended. - - 6 UI Guides =========== @@ -1162,41 +781,25 @@ Operators with “Superadmin” or “Root” roles can see other users’ conte The platform can be installed in two different ways: you can use the latest Docker containers to quickly configure and run it or you can get the complete open-source code and compile an application yourself. After the installation, a power up screen will guide you through the basic platform configuration. - - -For more information regarding the installation, please consult the technical information in the project’s GitHub repository. - - +For more information regarding the installation, please consult the technical information in the project repository: https://github.com/proxeusapp/proxeus-core **Important:** Please read through all the steps before starting in order to gain a better understanding of what needs to be done in which order. If you decide to make a Proxeus platform available to the public, we recommend that you work with a legal counsel in order to ensure that your setup is compliant with your local laws and regulations (e.g. publication of a privacy policy), as well as to define usage terms and conditions. - - 8.1 Power Up ------------ For the following explanations we’ll assume that you are already working with an operational platform and can access the “Power Up” screen. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_8649382b98149ec0.png) _The “Power up” screen after successful installation_ - - The settings are mostly self-explanatory and described on the configuration page itself. The default values usually don’t have to be changed. - - In the power up mode, you are asked to create the “Root” account of the platform. This user has universal rights and can also give the role to other users. Root accounts should be kept secure by a strong password and/or a well-protected MetaMask wallet. - - On the power up screen you may also set the default role all new users get. It’s recommended to choose “User” and to carefully promote select accounts. - - In the Blockchain settings you can choose between “Mainnet” (the live Ethereum blockchain) and “ropsten”. Other networks should work as well, but have not been tested. Connecting to the Ropsten test network first means you can try your workflows with toy money - ropsten Ethers and ropsten XES. The root user can switch the active network of the platform at any time, effective immediately. Please be aware that the smart contract needs to be deployed on the network you are using. 8.2 Data migration @@ -1204,14 +807,10 @@ In the Blockchain settings you can choose between “Mainnet” (the live Ethere If you have an export file from a backup or from a different platform, you can load it in the “Import” tab. Proxeus imports data with a “best effort” approach, meaning that errors will not block the rest of the import. Imported entries will be marked in the application. - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_5658bd1d0e8a3e71.png) _A successful data import_ - - 8.3 Customization ----------------- @@ -1231,8 +830,6 @@ After setting up your own platform powered by Proxeus, you will be able to custo * Replace the help documentation of Proxeus with your own. By default it point to the Proxeus handbook. Change the link to your own document by navigating to “Internationalization” and changing the “Support Button Link” code. - - 8.4 Using the API ----------------- @@ -1242,8 +839,6 @@ If you wish to programmatically use the API, your users need to create an API au _Name the API key you are generating_ - - ![](handbook/Proxeus%20-%20The%20Complete%20Handbook_html_f622e65eb6e6449c.png) _A successful key generation - use this key for API authentication_ @@ -1254,4 +849,4 @@ _A successful key generation - use this key for API authentication_ Last updated -August 2023 +October 2023 diff --git a/docs/quickstart.md b/docs/quickstart.md index bda41e8fb..9f21c5b5b 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,156 +1,66 @@ # Quick Start -A brief installation guide. Find more details and explanation of the configuration settings in [configure.md](configure.md). +This document is a brief installation guide, with links to further details to get started with Proxeus. We hope that you, too, will enjoy working with our product! Please remember to star us on GitHub drop us any questions or feedback in the [Discussion Forum](https://github.com/ProxeusApp/community/discussions). + _"Proxeus is a platform for quick and convenient document digitalization, signing, processing, and distribution. It allows users to keep their important documents secure and registered on the blockchain. Proxeus empowers anyone to create blockchain applications and is available for free as an open-source project." --[S-Pro](https://s-pro.io/)_ +## One-Click Installation + +Proxeus is primarily a Web application, intended for access with a web browser. The [Proxeus Association](https://proxeus.org) maintains a demo instances you can use to test the product, and can recommend a service provider to help you or your business get set up. There is also a prototype [desktop application](https://github.com/ProxeusApp/storage-app/blob/master/docs/overview.md). + +In addition to the developer guidelines below, several "one-click" deployment configurations are available for select cloud platforms: + +- [Docker Compose](docs/docker.md) +- [Linode StackScript](deploy/linode/README.md) +- [DigitalOcean Droplet](deploy/digitalocean/README.md) + +You will still need API keys for Infura and Sparkpost, as [detailed below](#get-keys). + +Join the [Discussions](https://github.com/ProxeusApp/community/discussions/3) if you are interested in seeing additional providers on this list. -## Source Code +Please read the [Developer Manual](https://doc.proxeus.com) to learn more about developing for the Proxeus platform. -You can access the source code of this application on the [Proxeus GitHub repository](https://github.com/ProxeusApp). +**By installing and using the Proxeus software you agree with the terms of the [Proxeus License Agreement](https://github.com/ProxeusApp/proxeus-core/blob/main/LICENSE).** -**By installing and using the Proxeus software you agree with the terms of the [Proxeus License Agreement](LICENSE).** +## Installing from Source -## Install docker and docker-compose +You can access the source code of this application on the [Proxeus repository](https://github.com/ProxeusApp) on GitHub (a mirror is available on [Codeberg/Proxeus](https://codeberg.org/proxeus/). -The quickest way to try Proxeus is to use `docker-compose`. +If you wish to build the project from source, follow the instructions in [Build all](build_all.md). -1. [Install Docker Engine](https://docs.docker.com/install/) -2. [Install docker-compose](https://docs.docker.com/compose/install/) +The quickest way to try Proxeus is to use `docker compose`: + +1. Install [Docker Engine](https://docs.docker.com/install/) or [Docker Desktop](https://docs.docker.com/desktop/) +2. Install [Docker Compose](https://docs.docker.com/compose/install/) if you are not using Docker Desktop +3. Get API keys for Infura and Sparkpost as [detailed below](#get-keys) +4. Configure your environment variables by copying `.env.example` to `.env` and modifying it +5. Start the application using `docker compose up` + +Please make sure that you always pull Docker images from the official `proxeus` DockerHub repository and that you are using the latest version. + +A `docker-compose.yml` file and some other possible configuraitons are in the root folder of the proxeus-core repository. See [Configuration settings](configure.md) and [Building with Docker](build_docker.md) for more details. + + ## Get API Keys for Infura and SparkPost -The Proxeus platform depends on [Infura](https://infura.io/) and [SparkPost](https://www.sparkpost.com/) -for Ethereum and email integration respectively. +The Proxeus platform depends on [Infura](https://infura.io/) and [SparkPost](https://www.sparkpost.com/). Please create an account on those platforms to get API Keys. These keys need to be added to corresponding environment variables, or entered when deploying a "one-click" instance. + +We use [Infura](https://infura.io/) for blockchain services. Supported chains include: -Please create an account on those platform and get an API Keys. +- Ethereum: sepolia, goerli, mainnet +- Polygon: mumbai, mainnet -## Proxeus Demo Smart Contract +Create an account on [SparkPost](https://www.sparkpost.com/) for email integration. -For your convenience, a demo smart contract is deployed on several networks at the following addresses. +- Please note that the domain you set up on SparkPost MUST match the **reply-to** e-mail address that you configure in the next step in order to create accounts and receive e-mails on your instance. -You can switch between the networks using the environment configuration `PROXEUS_BLOCKCHAIN_NET` - -### Ethereum: Sepolia - -``` -0x9bc518Fd070BE3DBB07399261688015744a7FB02 -``` -[Verify on Etherscan](https://sepolia.etherscan.io/address/0x9bc518Fd070BE3DBB07399261688015744a7FB02#code) +## Next steps -`PROXEUS_BLOCKCHAIN_NET=sepolia` - -### Ethereum: Goerli - -``` -0x66FF4FBF80D4a3C85a54974446309a2858221689 -``` -[Verify on Etherscan](https://goerli.etherscan.io/address/0x66FF4FBF80D4a3C85a54974446309a2858221689#code) - -`PROXEUS_BLOCKCHAIN_NET=goerli` - -### Ethereum: Mainnet - -``` -0xf63e471d8cbc57517c37c39c35381a385628e012 -``` -[Verify on Etherscan](https://etherscan.io/address/0xf63e471d8cbc57517c37c39c35381a385628e012) - -`PROXEUS_BLOCKCHAIN_NET=main` - -### Polygon: mumbai - -``` -0x00119d8C02bbC4c1231D054BB2813792B4411Ed5 -``` -[Verify on Etherscan](https://mumbai.polygonscan.com/address/0x00119d8C02bbC4c1231D054BB2813792B4411Ed5) - -`PROXEUS_BLOCKCHAIN_NET=polygon-mumbai` - -### Polygon: main - -``` -0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4 -``` -[Verify on Etherscan](https://polygonscan.com/address/0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4) - -`PROXEUS_BLOCKCHAIN_NET=polygon` - -## Create a docker-compose.yml file - -**Note: Please make sure that you always pull Docker images from the official `proxeus` DockerHub repository and that you are using the latest version.** - -User the example below as your `docker-compose.yml` file: - -``` ---- -version: '3.7' - -networks: - xes-platform-network: - name: xes-platform-network - -services: - platform: - image: proxeus/proxeus-core:latest - container_name: xes-platform - depends_on: - - document-service - networks: - - xes-platform-network - restart: unless-stopped - environment: - TZ: Europe/Zurich - PROXEUS_PLATFORM_DOMAIN: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}" - PROXEUS_DOCUMENT_SERVICE_URL: "http://document-service:2115/" - PROXEUS_ENCRYPTION_SECRET_KEY: "${PROXEUS_ENCRYPTION_SECRET_KEY}" - PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS: "${PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS}" - PROXEUS_INFURA_API_KEY: "${PROXEUS_INFURA_API_KEY}" - PROXEUS_SPARKPOST_API_KEY: "${PROXEUS_SPARKPOST_API_KEY}" - PROXEUS_EMAIL_FROM: "${PROXEUS_EMAIL_FROM:-no-reply@example.com}" - PROXEUS_AIRDROP_WALLET_FILE: "${PROXEUS_AIRDROP_WALLET_FILE:-/root/.proxeus/settings/airdropwallet.json}" - PROXEUS_AIRDROP_WALLET_KEY: "${PROXEUS_AIRDROP_WALLET_KEY:-/root/.proxeus/settings/airdropwallet.key}" - PROXEUS_DATABASE_ENGINE: "${PROXEUS_DATABASE_ENGINE:-storm}" - PROXEUS_DATABASE_URI: "${PROXEUS_DATABASE_URI:-mongodb://root:root@mongo:27017}" - PROXEUS_TEST_MODE: "${PROXEUS_TEST_MODE:-false}" - PROXEUS_ALLOW_HTTP: "${PROXEUS_ALLOW_HTTP:-false}" - ports: - - "1323:1323" - volumes: - - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted - - ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings - - document-service: - image: proxeus/document-service:latest - container_name: xes_document_service - networks: - - xes-platform-network - restart: unless-stopped - environment: - TZ: Europe/Zurich - ports: - - "2115:2115" - volumes: - - ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs - - ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts -``` - -## Start Proxeus - -Run the following command in the directory containing your `docker-compose.yml` file (Linux and OSX): -``` -export PROXEUS_EMAIL_FROM= -export PROXEUS_INFURA_API_KEY= -export PROXEUS_SPARKPOST_API_KEY= -export PROXEUS_ENCRYPTION_SECRET_KEY= -export PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS=0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71 -export PROXEUS_ALLOW_HTTP=true -docker-compose up -``` - -Proxeus should be available at http://localhost:1323 - -**Note:** that your system configuration at this point will be reflected in the local configuration database under `data/proxeus-platform/settings/main.json`. Any future changes to the configuration must be made here - the environment variables will not be propagated, unless you delete this file to reset the deployment. +Proxeus should at this point be available at http://localhost:1323 or the IP address of your new cloud machine. The next step is to [configure](configure.md) your instance for the first time. + +To learn more about Smart Contracts using Solidity, see the documentation in the [proxeus-contract](https://github.com/ProxeusApp/proxeus-contract). For detailed information about token setup, check the [XES-Payment](xes-payment.md) project. Software architecture and other details are in the [Developer Manual](develop.md). For creating a custom node, visit [External workflow nodes](external_workflow_nodes.md). diff --git a/go.mod b/go.mod index a6e888eef..62b1fec00 100644 --- a/go.mod +++ b/go.mod @@ -10,18 +10,17 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/disintegration/imaging v1.6.2 - github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 - github.com/ethereum/go-ethereum v1.12.1 + github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d + github.com/ethereum/go-ethereum v1.13.5 github.com/fatih/structs v1.1.0 // indirect github.com/golang/mock v1.6.0 github.com/google/go-querystring v1.1.0 // indirect github.com/google/renameio v1.0.1 - github.com/gorilla/sessions v1.2.1 + github.com/gorilla/sessions v1.2.2 github.com/h2non/filetype v1.1.3 github.com/imkira/go-interpol v1.1.0 // indirect - github.com/labstack/gommon v0.4.0 - github.com/mattn/go-runewidth v0.0.10 // indirect - github.com/onsi/gomega v1.27.10 + github.com/labstack/gommon v0.4.1 + github.com/onsi/gomega v1.30.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/errors v0.9.1 github.com/robertkrimen/otto v0.2.1 @@ -30,10 +29,10 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.etcd.io/bbolt v1.3.7 // indirect - golang.org/x/crypto v0.12.0 - golang.org/x/net v0.14.0 - gopkg.in/gavv/httpexpect.v2 v2.15.0 + go.etcd.io/bbolt v1.3.8 // indirect + golang.org/x/crypto v0.15.0 + golang.org/x/net v0.18.0 + gopkg.in/gavv/httpexpect.v2 v2.16.0 ) require ( @@ -42,68 +41,72 @@ require ( github.com/fasthttp/websocket v1.4.3-rc.10 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/gorilla/context v1.1.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect + github.com/gorilla/context v1.1.2 // indirect + github.com/gorilla/websocket v1.5.1 // indirect + github.com/klauspost/compress v1.17.3 // indirect github.com/labstack/echo v3.3.10+incompatible github.com/labstack/echo-contrib v0.15.0 github.com/mattn/go-colorable v0.1.13 // indirect - github.com/rivo/uniseg v0.2.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/valyala/fasthttp v1.48.0 // indirect + github.com/valyala/fasthttp v1.51.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - golang.org/x/image v0.11.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + golang.org/x/image v0.14.0 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.31.0 // indirect ) -require go.mongodb.org/mongo-driver v1.12.1 +require go.mongodb.org/mongo-driver v1.13.0 require ( + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ajg/form v1.5.1 // indirect - github.com/andybalholm/brotli v1.0.5 // indirect + github.com/andybalholm/brotli v1.0.6 // indirect + github.com/bits-and-blooms/bitset v1.11.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/consensys/bavard v0.1.13 // indirect + github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/deckarep/golang-set/v2 v2.3.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/pprof v0.0.0-20230808223545-4887780b67fb // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/gorilla/securecookie v1.1.1 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect + github.com/google/uuid v1.4.0 // indirect + github.com/gorilla/securecookie v1.1.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/montanaflynn/stats v0.7.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect - github.com/yuin/goldmark v1.4.13 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.12.0 // indirect - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.15.0 // indirect gopkg.in/sourcemap.v1 v1.0.5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e // indirect + rsc.io/tmplfunc v0.0.3 // indirect ) replace ( diff --git a/go.sum b/go.sum index 163a0fb49..6db30eb10 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,22 @@ -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Sereal/Sereal v0.0.0-20181211220259-509a78ddbda3/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM= github.com/Sereal/Sereal v0.0.0-20200820125258-a016b7cda3f3 h1:XgiXcABXIRyuLNyKHIk6gICrVXcGooDUxR+XMRr2QDM= github.com/Sereal/Sereal v0.0.0-20200820125258-a016b7cda3f3/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM= github.com/SparkPost/gosparkpost v0.2.0 h1:yzhHQT7cE+rqzd5tANNC74j+2x3lrPznqPJrxC1yR8s= github.com/SparkPost/gosparkpost v0.2.0/go.mod h1:S9WKcGeou7cbPpx0kTIgo8Q69WZvUmVeVzbD+djalJ4= -github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= +github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/asdine/storm v0.0.0-20190418133842-e0f77eada154 h1:2lbe+CPe6eQf2EA3jjLdLFZKGv3cbYqVIDjKnzcyOXg= github.com/asdine/storm v0.0.0-20190418133842-e0f77eada154/go.mod h1:cMLKpjHSP4q0P133fV15ojQgwWWB2IMv+hrFsmBF/wI= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= +github.com/bits-and-blooms/bitset v1.11.0 h1:RMyy2mBBShArUAhfVRZJ2xyBO58KCBCtZFShw3umo6k= +github.com/bits-and-blooms/bitset v1.11.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= @@ -27,14 +30,19 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= +github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/gnark-crypto v0.10.0 h1:zRh22SR7o4K35SoNqouS9J/TKHTyU2QWaj5ldehyXtA= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/crate-crypto/go-kzg-4844 v0.3.0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A= +github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= +github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -53,13 +61,14 @@ github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnm github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= -github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d h1:wi6jN5LVt/ljaBG4ue79Ekzb12QfJ52L9Q98tl8SWhw= +github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= -github.com/ethereum/c-kzg-4844 v0.3.0 h1:3Y3hD6l5i0dEYsBL50C+Om644kve3pNqoAcvE26o9zI= -github.com/ethereum/go-ethereum v1.12.1 h1:1kXDPxhLfyySuQYIfRxVBGYuaHdxNNxevA73vjIwsgk= -github.com/ethereum/go-ethereum v1.12.1/go.mod h1:zKetLweqBR8ZS+1O9iJWI8DvmmD2NzD19apjEWDCsnw= +github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= +github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.13.5 h1:U6TCRciCqZRe4FPXmy1sMGxTfuk8P7u2UoinF3VbaFk= +github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= github.com/fasthttp/websocket v1.4.2/go.mod h1:smsv/h4PBEBaU0XDTY5UwJTpZv69fQ0FfcLJr21mA6Y= github.com/fasthttp/websocket v1.4.3-rc.10 h1:LlOEMGqRyJAJIZ4DSVyEtKjSLBZ7LCZgWAr78VHEh20= github.com/fasthttp/websocket v1.4.3-rc.10/go.mod h1:xU7SHrziVFuFx3IO24nLKcu4tm3QykCFXhwtwRk9Xd0= @@ -68,18 +77,16 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gavv/httpexpect/v2 v2.2.0 h1:0VwaEBmQaNFHX9x591A8Up+8shCwdF/nF0qlRd/nI48= github.com/gavv/httpexpect/v2 v2.2.0/go.mod h1:lnd0TqJLrP+wkJk3SFwtrpSlOAZQ7HaaIFuOYbgqgUM= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= -github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -89,12 +96,12 @@ github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3a github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14= -github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -104,27 +111,30 @@ github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXi github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20230808223545-4887780b67fb h1:oqpb3Cwpc7EOml5PVGMYbSGmwNui2R7i8IW83gs4W0c= -github.com/google/pprof v0.0.0-20230808223545-4887780b67fb/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= +github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a h1:fEBsGL/sjAuJrgah5XqmmYsTLzJp/TO9Lhy39gkverk= +github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU= github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWUAweKUpk= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= -github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/context v1.1.2 h1:WRkNAv2uoa03QNIc1A6u4O7DAGMUVoopZhkiXWA2V1o= +github.com/gorilla/context v1.1.2/go.mod h1:KDPwT9i/MeWHiLl90fuTgrt4/wPcv75vFAZLaOOcbxM= +github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= +github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= +github.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTjY= +github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ= github.com/gorilla/websocket v1.0.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= @@ -134,7 +144,7 @@ github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imkira/go-interpol v1.0.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= @@ -146,8 +156,8 @@ github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= +github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -163,24 +173,24 @@ github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8 github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= github.com/labstack/echo-contrib v0.0.0-20180222075343-7d9d9632a4aa h1:Vvq1WVdHKCWY5VhBRFsyNtaAlqzPIBHYN1nzVhlGUqs= github.com/labstack/echo-contrib v0.0.0-20180222075343-7d9d9632a4aa/go.mod h1:LxvV1dZxPwuEAtf6bdhS9c/iOzpy+gt9b0gvdElU334= -github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= -github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/labstack/gommon v0.4.1 h1:gqEff0p/hTENGMABzezPoPSRtIh1Cvw0ueMOe0/dfOk= +github.com/labstack/gommon v0.4.1/go.mod h1:TyTrpPqxR5KMk8LKVtLmfMjeQ5FEkBYdxLYPw/WfrOM= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg= -github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= @@ -189,10 +199,10 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -200,13 +210,11 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/prometheus/client_golang v1.12.0 h1:C+UIj/QWtmqY13Arb8kwMt5j34/0Z2iKamrJ+ryC0Gg= +github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a h1:CmF68hwI0XsOQ5UwlBopMi2Ow4Pbg32akc4KIVCOm+Y= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robertkrimen/otto v0.2.1 h1:FVP0PJ0AHIjC+N4pKCG9yCDz6LHNPCwi/GKID5pGGF0= github.com/robertkrimen/otto v0.2.1/go.mod h1:UPwtJ1Xu7JrLcZjNWN8orJaM5n5YEtqL//farB5FlRY= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -227,28 +235,26 @@ github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMT github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b h1:u49mjRnygnB34h8OKbnNJFVUtWSKIKb1KukdV8bILUM= +github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= +github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= -github.com/urfave/cli/v2 v2.24.1 h1:/QYYr7g0EhwXEML8jO+8OYt5trPnLHS0p3mrgExJ5NU= +github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.9.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fasthttp v1.31.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= -github.com/valyala/fasthttp v1.48.0 h1:oJWvHb9BIZToTQS3MuQ2R3bJZiNSa2KiNdeI8A+79Tc= -github.com/valyala/fasthttp v1.48.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= +github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= @@ -256,8 +262,6 @@ github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7Fw github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad h1:W0LEBv82YCGEtcmPA3uNZBI33/qF//HAAs3MawDjRa0= -github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad/go.mod h1:Hy8o65+MXnS6EwGElrSRjUzQDLXreJlzYLlWiHtt8hM= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -285,40 +289,33 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.0/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= -go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.mongodb.org/mongo-driver v1.13.0 h1:67DgFFjYOCMWdtTEmKFpV3ffWlFnh+CYZ8ZS/tXWUfY= +go.mongodb.org/mongo-driver v1.13.0/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.11.0 h1:ds2RoQvBvYTiJkwpSFDwCcDFNX7DqjL2WsUgTNk0Ooo= -golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8= +golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= +golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -327,16 +324,14 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -348,22 +343,18 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -371,24 +362,21 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= @@ -402,8 +390,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= @@ -412,10 +398,9 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e h1:C7q+e9M5nggAvWfVg9Nl66kebKeuJlP3FD58V4RR5wo= moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e/go.mod h1:nejbQVfXh96n9dSF6cH3Jsk/QI1Z2oEL7sSI2ifXFNA= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/ui/core/package.json b/ui/core/package.json index 8f55d899a..21d617a6e 100644 --- a/ui/core/package.json +++ b/ui/core/package.json @@ -17,7 +17,7 @@ "@mdi/font": "^2.6.95", "@proxeus/wallet": "1.0.0", "ajv": "^6.5.2", - "async": "^2.6.4", + "async": "^3.2.4", "axios": "^0.21.1", "babel-runtime": "^6.26.0", "bootstrap": "^4.1.2", @@ -25,7 +25,7 @@ "brace": "^0.11.1", "codemirror": "^5.39.2", "core-js": "^3.19.3", - "ethereumjs-util": "^5.2.0", + "ethereumjs-util": "^7.1.5", "flatpickr": "^4.5.1", "font-awesome": "^4.7.0", "handlebars": "^4.0.11", @@ -38,9 +38,9 @@ "js-sha3": "^0.7.0", "moment": "^2.29.4", "popper.js": "^1.14.4", - "sass": "^1.66.1", + "sass": "^1.69.5", "sortablejs": "^1.7.0", - "tippy.js": "^2.5.4", + "tippy.js": "^6.3.7", "underscore": "^1.8.3", "v-tooltip": "^2.0.0-rc.33", "velocity-animate": "^1.5.1", @@ -78,7 +78,7 @@ "zxcvbn": "^4.4.2" }, "devDependencies": { - "@cypress/webpack-preprocessor": "^3.0.0", + "@cypress/webpack-preprocessor": "^4.1.5", "@vue/cli-plugin-babel": "^4", "@vue/cli-plugin-e2e-cypress": "^4", "@vue/cli-plugin-eslint": "^4", @@ -91,8 +91,8 @@ "eslint-plugin-import": "^2.20.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.0", - "eslint-plugin-vue": "^9.17.0", + "eslint-plugin-standard": "^5.0.0", + "eslint-plugin-vue": "^9.18.1", "file-loader": "^3.0.1", "less": "^3.8.1", "less-loader": "^4.1.0", diff --git a/ui/core/src/baseApp.js b/ui/core/src/baseApp.js index 4db360309..024cbaf2b 100644 --- a/ui/core/src/baseApp.js +++ b/ui/core/src/baseApp.js @@ -383,7 +383,7 @@ export default { this.handleError(err) }) }, - setConfig (d) { + async setConfig (d) { if (d.blockchainNet) { this.blockchainNet = d.blockchainNet } @@ -395,6 +395,8 @@ export default { } if (this.blockchainNet && this.blockchainProxeusFSAddress) { this.wallet = new WalletInterface(this.blockchainNet, this.blockchainProxeusFSAddress) + + await this.wallet.validateUserNetwork(() => this.$root.$emit('service-off'), () => this.$root.$emit('service-on')) } }, acknowledgeFirstLogin () { diff --git a/ui/core/src/components/document/Verification.vue b/ui/core/src/components/document/Verification.vue index 1431398b6..3afb50343 100644 --- a/ui/core/src/components/document/Verification.vue +++ b/ui/core/src/components/document/Verification.vue @@ -6,7 +6,7 @@
{{ $t('Connecting with the blockchain ...') }}
-

@@ -15,11 +15,16 @@

-
+
+
+ +
@@ -65,6 +70,9 @@ export default { created () { }, computed: { + hasPreinitError () { + return this.wallet().isIncorrectNetwork === true + } }, methods: { drop (file) { diff --git a/ui/core/src/components/document/VerificationFileEntry.vue b/ui/core/src/components/document/VerificationFileEntry.vue index 7d065cc79..2b5d8c181 100644 --- a/ui/core/src/components/document/VerificationFileEntry.vue +++ b/ui/core/src/components/document/VerificationFileEntry.vue @@ -5,16 +5,16 @@ - +

{{ $t('Verified file is valid', 'The file {filename} is valid.', {filename: file.name}) }}

+ class="text-success">{{ $t('Verified file is valid', 'The file {filename} is valid.', {filename: file?.name}) }}

{{ $t('Verified file revoked', 'The file {filename} has been revoked.', {filename: file.name}) }}

+ class="text-danger">{{ $t('Verified file revoked', 'The file {filename} has been revoked.', {filename: file?.name}) }}

{{ $t('Verified file is invalid', 'The file {filename} is invalid.', {filename: file.name}) }}

+ class="text-danger">{{ $t('Verified file is invalid', 'The file {filename} is invalid.', {filename: file?.name}) }}
-
+
{{ $t('Verified file invalid explanation', 'This file has been recognised as authentic but has since been declared invalid. It may have expired or been recalled by the issuer.') }}

{{ $t('Error while verifying file', 'File hash could not been verified due to technical problems. Please try again.') }}

+

{{ $t('Error while using public RPC', 'Please install Metamask extension to verify file.') }}


@@ -101,6 +103,24 @@
+
+
+ +
+
+
+

{{ $t('Unable to verify a document', 'Unable to verify a document') }}

+
+
+
+
+

{{ $t('Error incorrect network', 'Document can not be verified within incorrect network.') }}

+
+
+
+
+
@@ -108,22 +128,22 @@ - +
-

{{ file.name }}

+

{{ file?.name }}

{{ $t('Verified file is valid', 'The file {filename} is valid.', {filename: file.name}) }} + class="text-success">{{ $t('Verified file is valid', 'The file {filename} is valid.', {filename: file?.name}) }} {{ $t('Verified file revoked', 'The file {filename} has been revoked.', {filename: file.name}) }} + class="text-danger">{{ $t('Verified file revoked', 'The file {filename} has been revoked.', {filename: file?.name}) }} {{ $t('Verified file is invalid', 'The file {filename} is invalid.', {filename: file.name}) }} + class="text-danger">{{ $t('Verified file is invalid', 'The file {filename} is invalid.', {filename: file?.name}) }}
@@ -145,6 +165,9 @@ {{ $t('Error while verifying file', 'File could not been verified due to technical problems. Please try again.') }} + + {{ $t('Error while using public RPC', 'Please install Metamask extension to verify file.') }} + @@ -203,7 +226,7 @@ import Spinner from '../Spinner' export default { name: 'verification-file-entry', - props: ['file', 'wallet', 'singleFile'], + props: ['file', 'wallet', 'singleFile', 'hasPreinitError'], components: { Spinner }, @@ -220,23 +243,30 @@ export default { signatures: [], contract: undefined, errorValidating: false, + errorPublicRPC: false, + validationException: false, showDetails: false } }, mounted () { - this.verify() + if (!this.hasPreinitError) { + this.verify() + } }, computed: { valid () { - return this.errorValidating === false && this.loading === false && this.loading === false && this.status === true + return this.validationException === false && this.loading === false && this.loading === false && this.status === true }, invalid () { - return this.errorValidating === false && this.loading === false && this.status === false && + return this.validationException === false && this.loading === false && this.status === false && this.isFileInvalidated === true }, notFound () { - return this.errorValidating === false && this.loading === false && this.status === false && - this.isFileInvalidated !== true + return this.validationException === false && this.loading === false && this.status === false && + this.isFileInvalidated !== true && !this.hasPreinitError + }, + isIncorrectNetwork () { + return this.wallet().isIncorrectNetwork === true } }, filters: { @@ -252,6 +282,7 @@ export default { methods: { async verify () { this.loading = true + try { // use hash if it already comes with the file object if (this.file.hash) { @@ -264,48 +295,44 @@ export default { this.isFileInvalidated = false - let result - try { - result = await this.wallet().verifyHash(this.hash) - } catch (e) { - result = false - } - if (result) { - const transaction = await this.wallet().web3.eth.getTransaction(result) - this.creator = transaction.from - this.contract = transaction.to - const block = await this.wallet().web3.eth.getBlock(transaction.blockNumber) - // *1000 is conversion to seconds - this.timestamp = (new Date(block.timestamp * 1000)).toUTCString() + const result = await this.wallet().verifyHash(this.hash) - const signersArr = await this.wallet().proxeusFS.contract.methods.getFileSigners(this.hash).call() - Promise.all(signersArr.map(async signerAddr => { - const registrationTxBlock = await this.wallet().getRegistrationTxBlock(signerAddr) - return { - address: signerAddr, - txHash: registrationTxBlock.txHash, - block: block, - time: (new Date(registrationTxBlock.block.timestamp * 1000)).toUTCString() - } - })).then((sn) => { - this.signatures = sn - }) + const transaction = await this.wallet().web3.eth.getTransaction(result) + this.creator = transaction.from + this.contract = transaction.to + const block = await this.wallet().web3.eth.getBlock(transaction.blockNumber) + // *1000 is conversion to seconds + this.timestamp = (new Date(block.timestamp * 1000)).toUTCString() - this.loading = false - this.tx = result - this.status = true - // emit event to alert parent component of status - this.$emit('updateFileState', true) - } else { - this.status = false - this.tx = null - this.loading = false - } + const signersArr = await this.wallet().proxeusFS.contract.methods.getFileSigners(this.hash).call() + Promise.all(signersArr.map(async signerAddr => { + const registrationTxBlock = await this.wallet().getRegistrationTxBlock(signerAddr) + return { + address: signerAddr, + txHash: registrationTxBlock.txHash, + block: block, + time: (new Date(registrationTxBlock.block.timestamp * 1000)).toUTCString() + } + })).then((sn) => { + this.signatures = sn + }) + + this.loading = false + this.tx = result + this.status = true + // emit event to alert parent component of status + this.$emit('updateFileState', true) } catch (e) { this.status = false this.loading = false this.tx = null - this.errorValidating = true + this.validationException = true + + if (this.wallet().isPublicRPCUsing) { + this.errorPublicRPC = true + } else { + this.errorValidating = true + } } }, async hashFile (file) { diff --git a/ui/core/src/views/Admin.vue b/ui/core/src/views/Admin.vue index a9f324056..572d4a97c 100644 --- a/ui/core/src/views/Admin.vue +++ b/ui/core/src/views/Admin.vue @@ -8,7 +8,7 @@ + :preview-url="$t('First login admin', 'https://doc.proxeus.org/#/handbook')">
diff --git a/ui/wallet/package.json b/ui/wallet/package.json index fb4d900d2..f5b1b7448 100644 --- a/ui/wallet/package.json +++ b/ui/wallet/package.json @@ -11,13 +11,13 @@ "dependencies": { "@mdi/font": "^2.6.95", "ajv": "^6.5.2", - "async": "^2.6.4", + "async": "^3.2.4", "axios": "^0.21.1", "bootstrap": "^4.1.2", "bootstrap-vue": "2.0.0-rc.12", "brace": "^0.11.1", "codemirror": "^5.39.2", - "ethereumjs-util": "^5.2.0", + "ethereumjs-util": "^7.1.5", "flatpickr": "^4.5.1", "font-awesome": "^4.7.0", "handlebars": "^4.0.11", @@ -29,9 +29,9 @@ "js-sha3": "^0.7.0", "moment": "^2.29.4", "popper.js": "^1.14.4", - "sass": "^1.66.1", + "sass": "^1.69.5", "sortablejs": "^1.7.0", - "tippy.js": "^2.5.4", + "tippy.js": "^6.3.7", "truffle-assertions": "^0.9.1", "typeahead": "^0.2.2", "underscore": "^1.8.3", @@ -70,17 +70,17 @@ "zxcvbn": "^4.4.2" }, "devDependencies": { - "@cypress/webpack-preprocessor": "^3.0.0", + "@cypress/webpack-preprocessor": "^4.1.5", "@vue/cli-plugin-babel": "^4", "@vue/cli-plugin-e2e-cypress": "^4", "@vue/cli-plugin-eslint": "^4", "@vue/cli-service": "^4", - "@vue/eslint-config-standard": "^4", + "@vue/eslint-config-standard": "^5", "autoprefixer": "^9.0.1", "babel-eslint": "^10.0.1", "check-node-version": "^3.2.0", "eslint": "^6.8.0", - "eslint-plugin-vue": "^9.17.0", + "eslint-plugin-vue": "^9.18.1", "less": "^3.8.1", "less-loader": "^4.1.0", "postcss-loader": "^3.0.0", diff --git a/ui/wallet/src/ProxeusEthereum/MetamaskUtil.js b/ui/wallet/src/ProxeusEthereum/MetamaskUtil.js index ce0f6ebb0..02aac5c7d 100644 --- a/ui/wallet/src/ProxeusEthereum/MetamaskUtil.js +++ b/ui/wallet/src/ProxeusEthereum/MetamaskUtil.js @@ -15,11 +15,11 @@ class MetamaskUtil { gwei: '1000000000', szabo: '1000000', finney: '1000', - ether: '1', - kether: '0.001', - mether: '0.000001', - gether: '0.000000001', - tether: '0.000000000001' + ether: 1, + kether: 0.001, + mether: 0.000001, + gether: 0.000000001, + tether: 0.000000000001 } this.multiple = new this.ethUtil.BN('10000', 10) diff --git a/ui/wallet/src/ProxeusEthereum/WalletInterface.js b/ui/wallet/src/ProxeusEthereum/WalletInterface.js index abdd63a85..f44348bd6 100644 --- a/ui/wallet/src/ProxeusEthereum/WalletInterface.js +++ b/ui/wallet/src/ProxeusEthereum/WalletInterface.js @@ -1,10 +1,15 @@ import serviceConfig from './config/service-config' -import { PROXEUS_FS_ABI, XES_TOKEN_ABI } from './config/ABI' +import { + PROXEUS_FS_ABI, + XES_TOKEN_ABI +} from './config/ABI' import ProxeusWallet from './ProxeusWallet' import ProxeusFS from './services/ProxeusFS' import MetamaskWallet from './MetamaskWallet' -import { keccak256 } from 'js-sha3' +import { + keccak256 +} from 'js-sha3' import MetamaskUtil from './MetamaskUtil' import Web3 from 'web3' @@ -14,11 +19,12 @@ import getTransactionReceiptMined from './helpers/getTransactionReceiptMined' class WalletInterface { // TODO improve checking that current network matches what is expected // TODO: network param only for compatibility reasons with blockchain/dapp - constructor (network = 'sepolia', proxeusFSAddress, forceProxeusWallet = false) { - this.useProxeusWallet = forceProxeusWallet || typeof window.ethereum === 'undefined' - + constructor(network = 'sepolia', proxeusFSAddress, forceProxeusWallet = false) { // make sure we are using the web3 we want and not the one provided by metamask this.web3 = new Web3(Web3.givenProvider || 'ws://localhost:8545') + this.systemNetworkId = this.getNetworkIdByName(network) + + this.useProxeusWallet = forceProxeusWallet || typeof window.ethereum === 'undefined' this.web3.eth.getTransactionReceiptMined = getTransactionReceiptMined this.serviceConfig = serviceConfig[network] @@ -31,7 +37,8 @@ class WalletInterface { // connect to the network using what was given in the constructor this.web3.setProvider( new this.web3.providers.HttpProvider( - 'https://' + network + '.infura.io/')) + this.getPublicRPC(network))) + this.isPublicRPCUsing = true } else { if (window.ethereum) { this.web3.setProvider(window.ethereum) @@ -43,8 +50,9 @@ class WalletInterface { // add the XES smart contract to the config this.xesTokenContract = new this.web3.eth.Contract( XES_TOKEN_ABI, - this.serviceConfig.XES_TOKEN_ADDRESS, - { gas: this.serviceConfig.DEFAULT_GAS_REGULAR } + this.serviceConfig.XES_TOKEN_ADDRESS, { + gas: this.serviceConfig.DEFAULT_GAS_REGULAR + } ) this.setProxeusFsContract(this.serviceConfig.PROXEUS_FS_ADDRESS) @@ -55,24 +63,51 @@ class WalletInterface { // set the default from address to use on the proxeusFS smart contract this.wallet.setupDefaultAccount().then(() => { - if (this.wallet.getCurrentAddress() !== null) { this.proxeusFSContract.options.from = this.wallet.getCurrentAddress() } + if (this.wallet.getCurrentAddress() !== null) { + this.proxeusFSContract.options.from = this.wallet.getCurrentAddress() + } }) } } - signMessage (message) { + async validateUserNetwork(blockCb, unblockCb) { + if (window.ethereum && this.systemNetworkId.toString() !== window.ethereum.networkVersion) { + try { + if (blockCb) { + blockCb() + } + + await window.ethereum.request({ + method: 'wallet_switchEthereumChain', + params: [{ + chainId: this.web3.utils.toHex(this.systemNetworkId) + }] + }) + + this.isIncorrectNetwork = false + } catch { + this.isIncorrectNetwork = true + } finally { + if (unblockCb) { + unblockCb() + } + } + } + } + + signMessage(message) { return this.wallet.signMessage(message) } - getCurrentAddress () { + getCurrentAddress() { return this.wallet.getCurrentAddress() } - hasAccount () { + hasAccount() { return this.wallet.getCurrentAddress() !== undefined } - importKeystore (keystore, password) { + importKeystore(keystore, password) { // optional function on wallet if (!this.wallet.importKeystore) { return null @@ -81,7 +116,7 @@ class WalletInterface { return this.wallet.importKeystore(keystore, password) } - exportKeystore (password) { + exportKeystore(password) { // optional function on wallet if (!this.wallet.exportKeystore) { return null @@ -90,7 +125,7 @@ class WalletInterface { return this.wallet.exportKeystore(password) } - importPrivateKey (privateKey) { + importPrivateKey(privateKey) { // optional function on wallet if (!this.wallet.importPrivateKey) { return null @@ -99,7 +134,7 @@ class WalletInterface { return this.wallet.importPrivateKey(privateKey) } - exportPrivateKey () { + exportPrivateKey() { // optional function on wallet if (!this.wallet.exportPrivateKey) { return null @@ -108,17 +143,17 @@ class WalletInterface { return this.wallet.exportPrivateKey() } - storePGPPublicKey (pgpPublicKey) { + storePGPPublicKey(pgpPublicKey) { pgpPublicKey = btoa(pgpPublicKey) // TODO: Store keys in constants localStorage.setItem('pgpPk', pgpPublicKey) } - loadPGPPublicKey () { + loadPGPPublicKey() { return atob(localStorage.getItem('pgpPk')) } - exportWalletToBlob (password = '') { + exportWalletToBlob(password = '') { if (password === '') { try { const authObj = localStorage.getItem('mnidmao') @@ -137,10 +172,13 @@ class WalletInterface { btoa(JSON.stringify({ keystore: encryptedKeystore, pgpKeys: this.web3.eth.accounts.wallet.PGPKeys - }))], { type: 'text/plain' }) + })) + ], { + type: 'text/plain' + }) } - importWalletFromBlob (blob, password) { + importWalletFromBlob(blob, password) { const reader = new FileReader() // first set the reader event listener and wrap it in a promise const promise = new Promise((resolve, reject) => { @@ -157,7 +195,9 @@ class WalletInterface { this.proxeusFSContract.options.from = this.getCurrentAddress() // save the pgp keys, encrypted keystore, and password on local storage - localStorage.setItem('mnidmao', btoa(JSON.stringify({ password }))) + localStorage.setItem('mnidmao', btoa(JSON.stringify({ + password + }))) localStorage.setItem('mnidmpgp', btoa(JSON.stringify(parsed.pgpKeys[this.getCurrentAddress()]))) localStorage.setItem('mnidmks', @@ -187,7 +227,7 @@ class WalletInterface { * * @param password - the password that protects the keystore */ - saveWallet (password) { + saveWallet(password) { let encryptedKeystore = this.exportKeystore(password) if (encryptedKeystore.length === 0) { return false @@ -216,7 +256,7 @@ class WalletInterface { * * @param password - the password that protects the keystore */ - loadWallet (password = '') { + loadWallet(password = '') { const authObj = localStorage.getItem('mnidmao') let pgp = localStorage.getItem('mnidmpgp') let encryptedKeystore = this.getKeystoreFromLocalStorage() @@ -250,11 +290,11 @@ class WalletInterface { return true } - lockAccount () { + lockAccount() { localStorage.removeItem('mnidmao') } - logout () { + logout() { localStorage.removeItem('mnidmao') localStorage.removeItem('mnidmks') localStorage.removeItem('mnidmpgp') @@ -264,11 +304,11 @@ class WalletInterface { this.web3.eth.accounts.wallet.clear() } - getKeystoreFromLocalStorage () { + getKeystoreFromLocalStorage() { return localStorage.getItem('mnidmks') } - getPasswordFromLocalStorage () { + getPasswordFromLocalStorage() { try { const authObj = localStorage.getItem('mnidmao') return JSON.parse(atob(authObj)).password @@ -284,9 +324,12 @@ class WalletInterface { * @param publicKey * @param privateKey */ - importPGPKeyPair (address, publicKey, privateKey) { + importPGPKeyPair(address, publicKey, privateKey) { if (!this.web3.eth.accounts.wallet.PGPKeys) this.web3.eth.accounts.wallet.PGPKeys = {} - this.web3.eth.accounts.wallet.PGPKeys[address] = { publicKey, privateKey } + this.web3.eth.accounts.wallet.PGPKeys[address] = { + publicKey, + privateKey + } } /* @@ -295,11 +338,11 @@ class WalletInterface { * @param address - the ethereum wallet address to which the PGP key pair relates to * @return Object with two fields: "privateKey" and "publicKey" */ - exportPGPKeyPair (address) { + exportPGPKeyPair(address) { return this.web3.eth.accounts.wallet.PGPKeys[address] } - createNewAccount () { + createNewAccount() { return this.web3.eth.accounts.wallet.create(1) } @@ -307,16 +350,18 @@ class WalletInterface { * Everything below this comment needs to be moved outside of the wallet libray */ - hashFile (arrBuffer) { + hashFile(arrBuffer) { return keccak256(arrBuffer) } - getDocumentRegistrationTx (hash, proxeusFSContract) { + getDocumentRegistrationTx(hash, proxeusFSContract) { const contract = (proxeusFSContract === undefined) ? this.proxeusFSContract : proxeusFSContract.contract // this one is based on events and not promises, so can't use async return new Promise((resolve, reject) => { contract.getPastEvents('UpdatedEvent', { - filter: { hash: hash }, + filter: { + hash: hash + }, fromBlock: 0 }, (error, result) => { if (error) { @@ -331,12 +376,13 @@ class WalletInterface { }) } - setProxeusFsContract (address) { + setProxeusFsContract(address) { // add the document registry smart contract to the config this.proxeusFSContract = new this.web3.eth.Contract( PROXEUS_FS_ABI, - address, - { gas: this.serviceConfig.DEFAULT_GAS_REGULAR } + address, { + gas: this.serviceConfig.DEFAULT_GAS_REGULAR + } ) // Attach proxeus FS Service @@ -348,13 +394,14 @@ class WalletInterface { * * @return array of past contract instances */ - getAllProxeusFsServices () { + getAllProxeusFsServices() { const proxeusFSPastContracts = [] for (const address of this.serviceConfig.PROXEUS_FS_PAST_ADDRESSES) { const proxeusFSContract = new this.web3.eth.Contract( PROXEUS_FS_ABI, - address, - { gas: this.serviceConfig.DEFAULT_GAS_REGULAR } + address, { + gas: this.serviceConfig.DEFAULT_GAS_REGULAR + } ) proxeusFSPastContracts.push(new ProxeusFS(this.web3, proxeusFSContract)) } @@ -366,8 +413,12 @@ class WalletInterface { * * @return string */ - async getClientProvidedNetwork () { + async getClientProvidedNetwork() { const netId = await this.web3.eth.getChainId() + return this.getNetworkNameById(netId) + } + + getNetworkNameById(netId) { switch (netId) { case 5: return 'goerli' @@ -382,12 +433,37 @@ class WalletInterface { } } - async XESAmountPerFile ({ providers }) { - const tokensRaw = await this.proxeusFS.XESAmountPerFile({ providers }) - return this.metamaskUtil.formatBalance(this.web3.utils.toHex(tokensRaw)) + getNetworkIdByName(name) { + switch (name) { + case 'goerli': + return 5 + case 'sepolia': + return 11155111 + case 'polygon': + return 137 + case 'polygon-mumbai': + return 80001 + default: + return 1 + } + } + + getPublicRPC(network) { + switch (network) { + case 'goerli': + return 'https://goerli.rpc.thirdweb.com/' + case 'sepolia': + return 'https://sepolia.rpc.thirdweb.com/' + case 'polygon': + return 'https://polygon.rpc.thirdweb.com/' + case 'polygon-mumbai': + return 'https://mumbai.rpc.thirdweb.com/' + default: + return 'https://ethereum.rpc.thirdweb.com/' + } } - async verifyHash (hash) { + async verifyHash(hash) { const result = await this.proxeusFS.fileVerify(hash) if (result && result[0] === true) { @@ -403,7 +479,7 @@ class WalletInterface { throw new Error('Could not verify hash.') } - async fileVerify (hash) { + async fileVerify(hash) { const result = await this.proxeusFS.fileVerify(hash) if (result && result[0] === true) { @@ -419,7 +495,7 @@ class WalletInterface { throw new Error('Could not verify hash.') } - formatBalance (decimalsToKeep, tokensRaw) { + formatBalance(decimalsToKeep, tokensRaw) { if (decimalsToKeep !== undefined) { return this.metamaskUtil.formatBalance(this.web3.utils.toHex(tokensRaw), decimalsToKeep) @@ -428,7 +504,7 @@ class WalletInterface { } } - transferETH (to, amount) { + transferETH(to, amount) { return this.web3.eth.sendTransaction({ to: to, value: amount, @@ -436,16 +512,16 @@ class WalletInterface { }) } - async getETHBalance (decimalsToKeep) { + async getETHBalance(decimalsToKeep) { return this.formatBalance(decimalsToKeep, await this.web3.eth.getBalance(this.getCurrentAddress())) } // optional callback parameter - transferXES (to, amount, callback) { + transferXES(to, amount, callback) { return this.wallet.transferXES(to, amount, callback) } - async getXESBalance (decimalsToKeep, address) { + async getXESBalance(decimalsToKeep, address) { if (address === undefined) { address = this.getCurrentAddress() } @@ -455,13 +531,18 @@ class WalletInterface { return this.formatBalance(decimalsToKeep, tokensRaw) } - approveXES (spender, value) { + approveXES(spender, value) { return this.xesTokenContract.methods.approve(spender, - this.web3.utils.toWei(value.toString())) - .send({ from: this.getCurrentAddress() }) + this.web3.utils.toWei(value.toString())) + .send({ + from: this.getCurrentAddress() + }) } - async getAllowance ({ spender, decimalsToKeep }) { + async getAllowance({ + spender, + decimalsToKeep + }) { const owner = this.getCurrentAddress() const tokensRaw = await this.xesTokenContract.methods.allowance(owner, spender).call() @@ -474,20 +555,22 @@ class WalletInterface { } } - txMined (tx) { + txMined(tx) { return this.web3.eth.getTransactionReceiptMined(tx) } - async getFileSignedEvent (signerAddress) { + async getFileSignedEvent(signerAddress) { const arrEvents = await this.proxeusFSContract.getPastEvents( 'FileSignedEvent', { - filter: { signer: signerAddress }, + filter: { + signer: signerAddress + }, fromBlock: 0 }) return arrEvents[0] || null } - async getRegistrationTxBlock (signerAddress) { + async getRegistrationTxBlock(signerAddress) { const event = await this.getFileSignedEvent(signerAddress) if (event === null) { return null @@ -499,7 +582,7 @@ class WalletInterface { } } - async getBlock (blockHash) { + async getBlock(blockHash) { return await this.web3.eth.getBlock(blockHash) } } diff --git a/ui/wallet/src/ProxeusEthereum/services/ProxeusFS.js b/ui/wallet/src/ProxeusEthereum/services/ProxeusFS.js index 67bbbaf8e..8869ad059 100644 --- a/ui/wallet/src/ProxeusEthereum/services/ProxeusFS.js +++ b/ui/wallet/src/ProxeusEthereum/services/ProxeusFS.js @@ -4,46 +4,10 @@ export default class { this.contract = proxeusFSContract } - async XESAmountPerFile ({ providers }) { - return this.contract.methods.getXESPrice().call() - } - - /** - ** Free calls - **/ - - /* - * Returns expiry information of a file - */ - fileExpiry (hash) { - } - - fileGetPerm (hash, address, write) { - return this.contract.methods.fileGetPerm(hash, address, write).call() - } - - fileHasSP (hash, spAddress) { - return this.contract.methods.fileHasSP(hash, spAddress).call() - } - - /* - * Returns file metadata - */ - fileInfo (hash) { - return this.contract.methods.fileInfo(hash).call() - } - - /* - * Returns a list of files - */ - async fileList () { - return this.contract.methods.fileList().call() - } - /* * Returns a list of signers for a specific file */ - getFileSigners (hash) { + async getFileSigners (hash) { return this.contract.methods.getFileSigners(hash).call() } @@ -54,87 +18,40 @@ export default class { return this.contract.methods.verifyFile(hash).call() } - /* - * Returns metadata about a Service Provider - */ - spInfo (hash) { - return this.contract.methods.spInfo(hash).call() - } - - /* - * Returns a list of storage providers - */ - spList () { - return this.contract.methods.spList().call() - } - - /* - * Paid calls + /** + * Sign file */ - - fileRemove (hash) { - return this.contract.methods.fileRemove(hash).send() - } - - signFile ({ hash }) { + async signFile ({ + hash + }) { return this.contract.methods.signFile(hash).send() } - fileSetPerm (hash, address) { - return this.contract.methods.fileSetPerm(hash, address).send() - } - - createFileDefinedSigners ({ hash, definedSigners, expiry, replaces, providers }) { - return this.contract.methods.createFileDefinedSigners( - hash, - definedSigners, - expiry / 1000 || 0, - this.web3.utils.fromAscii('0x0'), - providers - ).send() - } - - createFileUndefinedSigners ({ hash, data, mandatorySigners, expiry, replaces, providers, xes }) { + /** + * Create a file with undefined signers + */ + async createFileUndefinedSigners ({ + hash, + data + }) { return this.contract.methods.registerFile( hash, data ).send() } - createFileUndefinedSignersEstimateGas ( - { from, hash, data, mandatorySigners, expiry, replaces, providers }, cb, xes) { - const opt = from ? { from } : {} + /** + * Estimate gas for freate a file with undefined signers + */ + async createFileUndefinedSignersEstimateGas ({ + from, + hash + }, cb, xes) { + const opt = from ? { + from + } : {} return this.contract.methods.registerFile( hash ).estimateGas(opt, cb) } - - createFileThumbnail (hash, pParent, pPublic) { - return this.contract.methods.createFileThumbnail( - hash, - pParent, - pPublic - ).send() - } - - fileRequestSign (hash, address) { - return this.contract.methods.fileRequestSign(hash, address).send() - } - - fileRequestAccess () { - } - - getRequestSignEvents (address, fromBlock) { - return this.contract.getPastEvents('RequestSign', { - filter: { to: address }, - fromBlock: fromBlock || 0 - }) - } - - getNotifySignEvents (hash, address, fromBlock) { - return this.contract.getPastEvents('NotifySign', { - filter: { hash: hash, who: address }, - fromBlock: fromBlock || 0 - }) - } }