Sending Transactions with Stacks.js
Last updated
Was this helpful?
Last updated
Was this helpful?
Any Stacks dapp is going to require sending transaction at some point, so how do we do that? We use the @stacks/transactions
package.
Again, this particular snippet is pulled from our Hello Stacks tutorial.
When you send Stacks transactions, don't forget to utilize post conditions.
But first, you'll need to install the right NPM package.
Assuming you are authenticated, you'll need to import from the network
package to connect and import the right Clarity values to convert.
You need to convert values from JS into the right format for Clarity values to ingest. You can view the complete list of types on the .
Let's assume we have a message that we need to send.
For more details on the different types of transactions you can send, the have multiple examples.