LabiciIvan / exchange-bot

1 stars 0 forks source link

PRO - Account Backend #36

Open LabiciIvan opened 1 year ago

LabiciIvan commented 1 year ago

Add EXCHANGE_KEY and EXCHANGE_SECRET to the environment variables or configuration file for your project.

Implement the createSignature() function, which should take the EXCHANGE_SECRET as input and generate a signature based on the data you want to sign. You may need to use cryptographic functions or libraries to generate the signature.

Implement the decodeSignature() function, which should take the signature as input and return the decoded value. The function should also verify that the signature is valid by comparing it against the EXCHANGE_SECRET. If the signature is not valid, an error should be thrown.

Implement the isExchangeSecure() function, which should check if the current exchange is secure by verifying the signature using the decodeSignature() function. If the signature is valid, the function should return true. Otherwise, it should return false.

Make any necessary changes to the user routes to handle account-related actions. For example, you might need to add routes for creating, updating, or deleting user accounts.

Create a CRUD (Create, Read, Update, Delete) system for handling exchange actions. This should include functions or routes for adding, retrieving, updating, and deleting exchange data. You should also use the createSignature() function to sign any data that is sent to the exchange.

Test your project thoroughly to ensure that everything is working as expected. This should include unit tests for each function or route, as well as end-to-end tests that cover all of the functionality of your project.