Acurast / acurast-cli

A cli to interact with the Acurast Cloud
https://acurast.com
7 stars 0 forks source link

Documentation Clarifications #40

Closed VR-Architect closed 1 month ago

VR-Architect commented 2 months ago

Hello. Could you please clarify on the readme and/or this page https://docs.acurast.com/developers/deploy-first-app these items for the newbies to Acurast that are developers?

On this page https://docs.acurast.com/developers/deployment-runtime-environment it shows many commands and libraries provided in the Node.js on the phones.

Lastly:

Thanks for the clarification. I am working to learn the development role as fast as possible but a small challenge to port over from C# corporate development.

Thanks,

VR Architect

AndreasGassmann commented 2 months ago

Hi, welcome to Acurast. Let's dive right in:

  1. I'm not sure how we can improve that in the tutorial, because we never mention a signup. You can use any API you like, even host your own one, but that's outside the scope of the tutorial.
  2. Pinata is a platform that provides tools and services for managing files on the InterPlanetary File System (IPFS), a decentralized storage network. At the time of deployment, code is added to IPFS and before the execution, the coad is loaded from IPFS by the processors. We use Pinata specifically because they provide an API to upload files, which they then "pin" on the IPFS network, without having to run your own IPFS node. Note: In the latest CLI version you do not need a Pinata account anymore. You can optionally create one so the code is uploaded to your account, but you don't have to anymore.
  3. The address you see in the CLI is derived from the key located in the .env file. If you use Talisman, SubWallet or Polkadot.js, then you can add your manager mnemonic to the .env file and you will get the same address (manager address). But it is not possible to use your processor addresses, because the processors themselves don't hold a balance, and because the private key of that address is inaccessible (because it's on the secure chip of the processor).
  4. See 2)
  5. Yes, you have to remove the "#" if you want to enable the environment variables. The "#" indicates that this line is a comment.
  6. MetaMask uses a different derivation, which currently is not compatible with the CLI. This means if you add your MetaMask mnemonic to the CLI, you will get a different address. This is functionality that we plan to add in the future.
  7. You don't technically need webpack. But you do somehow need to get a single javascript bundle with all dependencies bundled. Our recommendation is webpack, but you can also use rollup, browserify, or any other bundler. That's up to you. I would stick to the examples that we have, because there we will be able to give the best support.
  8. Yes, you can add more dependencies to your app. However, they all need to be bundled into a single js file, which is what webpack is used for. You should probably take a look here: https://github.com/Acurast/acurast-example-apps (Note: The APIs documented on https://docs.acurast.com/developers/deployment-runtime-environment are not exposed by node.js, those are features that were developed by us to be used in the processor environment.
  9. If you use one of the examples here that does not use blockchain (eg. the fetch example), you will never have to select any blockchain. We recommend to use the CLI, the web-console is a bit outdated UI wise.
  10. We currently do not have an out-of-the-box solution for DNS on the processors. Once we have a solution for this, we'll create an example for it in the example repository.

Thanks for giving Acurast a try! It's still early days, so we're happy for all the feedback. Let us know if you have any other questions :).

VR-Architect commented 1 month ago

Thank you. All of your responses helped to clarify for me a lot. Please consider adding where it makes sense to the documents :)