I am writing a contract that will store specific data in the table. And I want to trigger a node js function on my server that will call a specific action on a contract with specific parameters. The transaction should be signed and action should be called on the server with maximum security. Can someone tell me what is the process of calling actions using node RPC API? Because I can't figure out what parameters and functions should I use to do the equivalent with RPC API:

cleos wallet unlock
cleos push action contract_name action_name'[param1,param2]' -p contract_name

1 Answer 1


You can use the official eosjs library which can be installed via npm.

You can refer to their documentation on how to use the functions to create transactions.

  • I know how to use it, but I don't like the idea of exposing the private key by putting it in "Key provider" Is there any way to sign transaction locally and only send the signature to the network? I'm afraid that the private key will be exposed
    – JustinZ
    Sep 20, 2018 at 17:10
  • Basically I need to sign and push transactions separately
    – JustinZ
    Sep 20, 2018 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.