> For the complete documentation index, see [llms.txt](https://docs.swisstronik.com/swisstronik-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swisstronik.com/swisstronik-docs/development/swisstronikjs-sdk/swisstronik-and-ethereum-transactions.md).

# Swisstronik & Ethereum transactions

### Ethereum Transactions

When sending transactions in the Ethereum blockchain, there are several fields you need to fill out such as `from`, `to`, `value`, `nonce`, `data`, etc... so the nodes can process and validate your transactions before adding them to the blockchain.

<pre class="language-javascript"><code class="lang-javascript"><strong>signer.sendTransaction({
</strong>    from: //Address of the sender,
    to: //Address of the recipient,
    data: //Data to include in the transaction
    value: //Amount of Ether to send,
  });

</code></pre>

### Swisstronik Transactions

Sending transactions in the Swisstronik blockchain is similar to Ethereum, with one crucial distinction: **when the data field is not empty, the value of the data field must be encrypted**. This encryption step is vital for maintaining confidentiality. By sending encrypted values to the nodes, we ensure that only the nodes can decrypt the data within the [Intel SGX enclave](/swisstronik-docs/general/intel-sgx.md), ensuring the secure validation of your transaction.&#x20;

{% hint style="info" %}
The data field is empty only when sending value between accounts (e.g., sending 1 SWTR from Alice to Bob). For transactions of this type, there is no need for any encryption.
{% endhint %}

```javascript
signer.sendTransaction({
    from: //Address of the sender,
    to: //Address of the recipient,
    data: //THIS VALUE MUST BE ENCRYPTED USING SWISSTRONIKJS
    value: //Amount of Swtr to send,
  });
```

For a deeper dive into transactions `data` field on EVM-based blockchains, check out the article [Decoding the “data” field in Ethereum Transactions](https://medium.com/@santiagotrujilloz/decoding-the-data-field-in-ethereum-transactions-with-code-snippets-7142bc6751ed)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.swisstronik.com/swisstronik-docs/development/swisstronikjs-sdk/swisstronik-and-ethereum-transactions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
