# Scan shielded TRC20 notes by OVK

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://tron-mainnet.g.alchemy.com/v2/docs-demo/wallet/scanshieldedtrc20notesbyovk

Scans for outgoing shielded TRC20 notes using an outgoing viewing key (OVK) to find notes you have sent.

Reference: https://www.alchemy.com/docs/chains/tron/tron-http-api-endpoints/tron-http-api-endpoints/scan-shielded-trc-20-notes-by-ovk

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://tron-mainnet.g.alchemy.com/v2/docs-demo/wallet/scanshieldedtrc20notesbyovk \
  --header 'Content-Type: application/json' \
  --data '{
  "ovk": "outgoing_view_key",
  "ciphertexts": [
    "cipher1",
    "cipher2"
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({ovk: 'outgoing_view_key', ciphertexts: ['cipher1', 'cipher2']})
};

fetch('https://tron-mainnet.g.alchemy.com/v2/docs-demo/wallet/scanshieldedtrc20notesbyovk', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://tron-mainnet.g.alchemy.com/v2/docs-demo/wallet/scanshieldedtrc20notesbyovk"

payload = {
    "ovk": "outgoing_view_key",
    "ciphertexts": ["cipher1", "cipher2"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tron-mainnet.g.alchemy.com/v2/docs-demo/wallet/scanshieldedtrc20notesbyovk"

	payload := strings.NewReader("{\n  \"ovk\": \"outgoing_view_key\",\n  \"ciphertexts\": [\n    \"cipher1\",\n    \"cipher2\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://tron-mainnet.g.alchemy.com/v2/docs-demo/wallet/scanshieldedtrc20notesbyovk")
  .header("Content-Type", "application/json")
  .body("{\n  \"ovk\": \"outgoing_view_key\",\n  \"ciphertexts\": [\n    \"cipher1\",\n    \"cipher2\"\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://tron-mainnet.g.alchemy.com/v2/docs-demo/wallet/scanshieldedtrc20notesbyovk");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"ovk\": \"outgoing_view_key\",\n  \"ciphertexts\": [\n    \"cipher1\",\n    \"cipher2\"\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /wallet/scanshieldedtrc20notesbyovk
method: POST
operation:
  summary: Scan shielded TRC20 notes by OVK
  description: Scans for outgoing shielded TRC20 notes using an outgoing viewing key (OVK) to find notes you have sent.
  tags:
    - Tron HTTP API Endpoints
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            ovk:
              type: string
            ciphertexts:
              type: array
              items:
                type: string
        example:
          ovk: outgoing_view_key
          ciphertexts:
            - cipher1
            - cipher2
  responses:
    '200':
      description: Notes scanned using OVK
      content:
        application/json:
          example:
            notes:
              - noteA
              - noteB
```
