> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet/getexpandedspendingkey | TRON

> TRON API method that derives an expanded spending key from a spending key for shielded TRC20 transactions. Chainstack TRON reference.

TRON API method that derives an expanded spending key from a spending key for shielded TRC20 transactions. The expanded spending key contains additional cryptographic material used in the shielded transaction protocol.

## Parameters

* `value` — spending key as a 32‑byte (64‑hex) string, no `0x` prefix.

## Response

* `ask` — the authentication secret key component
* `nsk` — the nullifier secret key component
* `ovk` — the outgoing viewing key component

## Use case

The `wallet/getexpandedspendingkey` method is used for:

* Deriving cryptographic components needed for shielded transactions
* Generating keys required for creating shielded TRC20 transfers
* Supporting wallet implementations of the shielded transaction protocol
* Enabling advanced privacy features in TRON applications

## curl example

```shell Shell theme={"system"}
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getexpandedspendingkey' \
  --header 'Content-Type: application/json' \
  --data '{
    "value": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
  }'
```

<Info>
  Ensure the key is exactly 64 hexadecimal characters without a prefix. Including `0x` or using the wrong length (for example, 66 hex chars) produces the error: "the length of spendingKey's hexString should be 64".
</Info>


## OpenAPI

````yaml openapi/tron_node_api/shielded_getexpandedspendingkey.json post /95e61622bf6a8af293978377718e3b77/wallet/getexpandedspendingkey
openapi: 3.0.0
info:
  title: wallet/getexpandedspendingkey TRON API
  version: 1.0.0
  description: Derive expanded spending key from spending key for shielded transactions
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/getexpandedspendingkey:
    post:
      tags:
        - Shielded Contract Methods
      summary: wallet/getexpandedspendingkey
      operationId: getExpandedSpendingKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - value
              properties:
                value:
                  type: string
                  description: Spending key as a 32‑byte (64‑hex) string without 0x prefix.
                  pattern: ^[0-9a-fA-F]{64}$
                  example: >-
                    0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
      responses:
        '200':
          description: Successfully derived expanded spending key
          content:
            application/json:
              schema:
                type: object
                properties:
                  ask:
                    type: string
                    description: Authentication secret key component
                  nsk:
                    type: string
                    description: Nullifier secret key component
                  ovk:
                    type: string
                    description: Outgoing viewing key component

````