# SwisstronikJS SDK

{% hint style="info" %}
**SwisstronikJS SDK is required for** **any smart contract interaction** (e.g. calling a function within a smart contract)
{% endhint %}

To make sure your interactions with the Swisstronik blockchain go smoothly, it's essential to use SwisstronikJS. This guarantees the security of your data by encrypting it before sending transactions and decrypting responses from the nodes.&#x20;

{% hint style="info" %}
No encryption is needed for smart contract **deployment**.
{% endhint %}

### What is SwisstronikJS SDK?

Swisstronik JS SDK is a JavaScript library designed to enhance the privacy of interactions within the Swisstronik blockchain by encrypting the data of the transactions & decrypting the queries from the nodes. It offers a suite of encryption and decryption functionalities, enabling developers to safeguard sensitive data within Swisstronik decentralized applications (dApps).

### How to Install SwisstronikJS SDK?

Open your terminal and navigate to the main root of your Hardhat project. From there, you can run the command `npm i @swisstronik/utils`

### Blockchain interaction

There are 2 types of functions you can invoke within a blockchain:

1. **Writing functions** [**(Transactions)**](/swisstronik-docs/development/swisstronikjs-sdk/swisstronik-and-ethereum-transactions.md)**:** Functions that write, change, or delete any value in a smart contract.
2. **Reading functions** [**(Calls or Queries)**](/swisstronik-docs/development/swisstronikjs-sdk/swisstronik-and-ethereum-calls.md)**:** View functions in the blockchain, where you don't change any state of a smart contract, instead, you retrieve the value of a variable within a smart contract.


---

# 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.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.
