# TRON

This document show Tron network qrcode protocol in TokenPocket. The TokenPocket Android version supports this protocol from 1.6.7, and Tron network watch-wallet uses this protocol interact with cold wallet, also the new version of the app will compatible with old version qrcode protocol.

### Sign transaction

```

tron:signTransaction-version=1.0&protocol=TokenPocket&network=tron&chain_id=11111&data={
	"tx":{ 
            "visible": false,
            "txID": "a08fd7a3ad426a4dd9fa6654c36293d8dd8db3bf961bd9820696477f82b7572e",
            "raw_data": {
                "contract": [{
                    "parameter": {
                        "value": {
                            "amount": 100,
                            "owner_address": "41f90a4115ca0859c0db8415d73b3a22626506cbbe",
                            "to_address": "41be9cd66315067fd1c588b2cf7dd15969de15f556"
                        },
                        "type_url": "type.googleapis.com/protocol.TransferContract"
                    },
                    "type": "TransferContract"
                }],
                "ref_block_bytes": "7cea",
                "ref_block_hash": "cb7295aa4aa80650",
                "expiration": 1676983275000,
                "timestamp": 1676983215610
            },
            "raw_data_hex": "0a027cea2208cb7295aa4aa8065040f89bf89fe7305a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a1541f90a4115ca0859c0db8415d73b3a22626506cbbe121541be9cd66315067fd1c588b2cf7dd15969de15f556186470facbf49fe730"
        },
	"address":"xxx",
	"useTronHeader":true
}

tron:signTransaction //action 
tx //Full tron transaction tx data
address //necessary, app will use the wallet with this address to sign transaction

//sign transaction result
tron:signTransactionSignature-version=1.0&protocol=TokenPocket&network=tron&chain_id=11111&data={
	"visible": false,
	"txID": "2d93a1c8e561c40af3685cdcb18421fdf6beb30ec503457701d4e54a7bafd990",
	"raw_data": {
		"contract": [{
			"parameter": {
				"value": {
					"amount": 100,
					"owner_address": "41f90a4115ca0859c0db8415d73b3a22626506cbbe",
					"to_address": "41be9cd66315067fd1c588b2cf7dd15969de15f556"
				},
				"type_url": "type.googleapis.com\/protocol.TransferContract"
			},
			"type": "TransferContract"
		}],
		"ref_block_bytes": "7e1a",
		"ref_block_hash": "629f76b26bb8f439",
		"expiration": 1676984190000,
		"timestamp": 1676984131233
	},
	"raw_data_hex": "0a027e1a2208629f76b26bb8f43940b088b0a0e7305a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a1541f90a4115ca0859c0db8415d73b3a22626506cbbe121541be9cd66315067fd1c588b2cf7dd15969de15f556186470a1bdaca0e730",
	"__payload__": {
		"to_address": "41be9cd66315067fd1c588b2cf7dd15969de15f556",
		"owner_address": "41f90a4115ca0859c0db8415d73b3a22626506cbbe",
		"amount": 100
	},
	"useTronHeader": true,
	"signature": ["1a5cc4447f5cc5e3fee31ca57cadd6da653634a8f4c7d991554ec687558d009016c552d635f8ed8045b1fecab35fb43a0f1c7bb5a6391431199d5d7003d2e81c00"],
}

```

### Sign and send transaction

```
tron:signAndSendTransaction-version=1.0&protocol=TokenPocket&network=tron&chain_id=11111&data={
	"tx":{ 
            "visible": false,
            "txID": "a08fd7a3ad426a4dd9fa6654c36293d8dd8db3bf961bd9820696477f82b7572e",
            "raw_data": {
                "contract": [{
                    "parameter": {
                        "value": {
                            "amount": 100,
                            "owner_address": "41f90a4115ca0859c0db8415d73b3a22626506cbbe",
                            "to_address": "41be9cd66315067fd1c588b2cf7dd15969de15f556"
                        },
                        "type_url": "type.googleapis.com/protocol.TransferContract"
                    },
                    "type": "TransferContract"
                }],
                "ref_block_bytes": "7cea",
                "ref_block_hash": "cb7295aa4aa80650",
                "expiration": 1676983275000,
                "timestamp": 1676983215610
            },
            "raw_data_hex": "0a027cea2208cb7295aa4aa8065040f89bf89fe7305a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a1541f90a4115ca0859c0db8415d73b3a22626506cbbe121541be9cd66315067fd1c588b2cf7dd15969de15f556186470facbf49fe730"
        },
	"address":"xxx",
	"useTronHeader":true
}

tron:signAndSendTransaction //action 
tx //Full tron transaction tx data
address //necessary, app will use the wallet with this address to sign transaction
```

### Sign message

```
tron:signMessage-version=1.0&protocol=TokenPocket&network=tron&chain_id=11111&data=
{
    "message":"abc",
    "useTronHeader":true,
    "address":"TYg1YJTQqaeWF8yhFFcnkEExYpFbAHuyyc" //optional, if set app will use the wallet with this address to sign message
}

//sign message result
tron:signMessageSignature-version=1.0&protocol=TokenPocket&network=tron&chain_id=11111&data=
{
     "signature": "0x56fca61bc9460b7bf706f79a31bb55e9f50f9a7903d31bae63aa01e7c6d52f7d002c6fc3b4909f45a5ce79e98c32adecf7eda58414f9d7d6521af04fb10cc1cb1c",
     "address": "TYg1YJTQqaeWF8yhFFcnkEExYpFbAHuyyc" //sign address
}
```

### SignMessageV2

<pre><code>// 
tron:signMessageV2-version=1.0&#x26;protocol=TokenPocket&#x26;network=tron&#x26;chain_id=11111&#x26;data=
{
    "message":"abc",
<strong>    "address":"TYg1YJTQqaeWF8yhFFcnkEExYpFbAHuyyc", //optional, if set app will use the wallet with this address to sign message
</strong>}

//sign message result
tron:signMessageV2Signature-version=1.0&#x26;protocol=TokenPocket&#x26;network=tron&#x26;chain_id=11111&#x26;data=
{
     "signature": "0x56fca61bc9460b7bf706f79a31bb55e9f50f9a7903d31bae63aa01e7c6d52f7d002c6fc3b4909f45a5ce79e98c32adecf7eda58414f9d7d6521af04fb10cc1cb1c",
     "address": "xxx" //sign address
}
</code></pre>


---

# 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://help.tokenpocket.pro/developer-en/scan-protocol/tron.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.
