Error message from defender-relay-client

Hi, I am currently using OpenZeppelin Relay function to automate sending transactions from my side to my user side.

I am following the documentation (https://docs.openzeppelin.com/defender/relay) , but whenever I load my website, I receive an error.

The error is as follows:
Uncaught TypeError: Failed to resolve module specifier "defender-relay-client". Relative references must start with either "/", "./", or "../".

Would greatly appreciate anybody assistance! Thanks a lot!

Hi @SY_Tan thanks for getting in touch. It seems like you're trying to use a "defender-relay-client" on the client-side, which is not a good idea as your private keys can be exposed to public.

Can you show an example of what you're trying to do?

Hi Aleksandr,

Thank you very much for your reply!

This is my user interface as of now. After the user spins the lucky wheel, he/she will be awarded with x amount of ethereum. Currently, I have already stored the player's wallet address into my backend and what I envision is that whenever the player presses the 'redeem' button, a transfer transaction would occur. I am currently using rinkeby test network.

I would kindly appreciate your comments and any ideas going forward with this project.

Thanks alot

Hi @SY_Tan, can you please share a code snippet where it fails? It's hard to know why this is happening without seeing your implementation. And make sure you are not using the defender-relay-client on your front-end.

You can use Autotask to call your Relayer:

If you want to call your Relayer from a webapp, the recommended way is to do so via an Autotask triggered through a webhook.