Call Reach API from node.js backend application #1334
-
I am working on a frontend application with a node.js backend that would need to connect to an admin wallet and call a Reach API to fetch information from an Algorand smart contract. What is the recommended approach to do this? Shall I use I would like to avoid having to rely on the end user to connect to their wallet and make the Reach API call from the frontend, so that the network fees would be paid by the admin wallet, rather than the end user, as this information is not related to the user, but rather general information about the current state of the application. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
If you are going to be sending publications, then you need to have a real account with money in it. You should not share your secrets with your users. So, they need to use their own account, or you need to provide a traditional Web2 frontend where your secrets are known. If you are just observing the chain, then you just need a Reach account abstraction, so you should use |
Beta Was this translation helpful? Give feedback.
If you are going to be sending publications, then you need to have a real account with money in it. You should not share your secrets with your users. So, they need to use their own account, or you need to provide a traditional Web2 frontend where your secrets are known.
If you are just observing the chain, then you just need a Reach account abstraction, so you should use
stdlib.createAccount
--- https://docs.reach.sh/frontend/#js_createAccount --- to get one. It will have no money, but that doesn't matter, because you won't be sending any transactions.