Learn how to authenticate users, create embedded wallets, and send transactions in your NodeJS app
privy
. If you have not already set up your Server SDK environment, go through those steps now.
id
in future calls to sign messages and send transactions.
signMessage
method. Make sure to specify your wallet ID (not address) from creation in the input.
sendTransaction
method. It will populate missing network-related values (gas limit, gas fee values, nonce, type), sign your transaction, broadcast it to the network, and return the transaction hash to you.
In the request, make sure to specify your wallet id
from your wallet creation above, as well as the caip2
chain ID and chainId
values for the network you want to transact on. Also, input your recipient or smart contract address in the to
field.