# 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](https://docs.swisstronik.com/swisstronik-docs/general/intel-sgx), 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
