# Easier Send Transaction

**Type**:

Types of transactions:

* **C\_TYPE\_COIN:** Transaction involving native coins (CIRX) without the use of Hyper Code (Smart Contracts).
* **C\_TYPE\_TOKEN:** Transaction involving specified tokens without the use of Hyper Code.
* **C\_TYPE\_ASSET:** Transaction involving a generic digital asset that is not represented by a token.
* **C\_TYPE\_CERTIFICATE:** Transaction where the payload doesn't require processing and is a generic string.
* **C\_TYPE\_REGISTERWALLET:** Transaction used to register a new wallet on a specified blockchain.
* **C\_TYPE\_HC\_DEPLOYMENT:** Transaction to deploy a new Hyper Code Program.
* **C\_TYPE\_HC\_REQUEST:** Transaction to call a specified endpoint of a Hyper Program.
* **C\_TYPE\_USERDEF:** Unspecified type, defined by the user (not available yet).

**Parameters**

| Name         | Type                  | Description                                                  |
| ------------ | --------------------- | ------------------------------------------------------------ |
| `sender`     | string or hexadecimal | Wallet address                                               |
| `sender_pk`  | string or hexadecimal | Sender's private key                                         |
| `To`         | string or hexadecimal | Receiver's wallet address                                    |
| `payload`    | string or hexadecimal | String in hexadecimal format                                 |
| `blockchain` | string or hexadecimal | Blockchain address excluding the "0x" hexadecimal identifier |
| `type`       | string                | One of the types listed before                               |

**Example**

```python
from circular_protocol_api import CircularProtocolAPI
from circular_protocol_api import helper

timestamp = helper.getFormattedTimestamp()
blockchain = helper.hexFix(blockchain)
nonce = int(self.getWalletNonce(blockchain, sender)["Response"]["Nonce"]) + 1
payload = helper.hexFix(json.dumps(payload).encode().hex())
sender = helper.hexFix(sender)
sender_pk = helper.hexFix(sender_pk)
to = helper.hexFix(to)
ID = str(blockchain + sender + to + payload + str(nonce) + timestamp)
hashID = helper.sha256(ID)
signature = helper.signMessage(hashID, sender_pk)

data = {
    'ID': hashID,
    'From': sender,
    'To': to,
    'Timestamp': timestamp,
    'Type': type,
    'Payload': payload,
    'Nonce': f"{nonce}",
    'Signature': signature,
    'Blockchain': blockchain,
    'Version': self.__version__
}

return helper.sendRequest(data, nag._SEND_TRANSACTION, self.__NAG_URL__)
```

**Result**

{% tabs %}
{% tab title="200" %}

```json
{
  "Result": 200,
  "Response": {
    "TxID": "138dd7a19685c71f281d8f5b9d0de15dc7ce7e9433e1715ec6e45e0fade74c82",
    "Timestamp": "2024:09:26-21:57:12"
  },
  "Node": "8a93c6b6f8d166097ddfeb3e5e3a2998b35e0b6f0bd2e31a8a130a11b6749279"
}
```

{% endtab %}
{% endtabs %}
