> ## 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/getspendingkey | TRON

> TRON API method that generates a new spending key for shielded TRC20 transactions. Available on TRON via Chainstack JSON-RPC nodes.

TRON API method that generates a new spending key for shielded TRC20 transactions. The spending key is the master private key used to derive other keys in the shielded transaction system and must be kept secure.

## Parameters

This method takes no parameters.

## Response

* `value` — the generated spending key as a hexadecimal string

## Use case

The `wallet/getspendingkey` method is essential for:

* Creating new shielded addresses for privacy-preserving transactions
* Setting up wallets that support shielded TRC20 transfers
* Generating the master key from which all other shielded transaction keys are derived
* Enabling users to participate in private transactions on the TRON network


## OpenAPI

````yaml openapi/tron_node_api/shielded_getspendingkey.json post /95e61622bf6a8af293978377718e3b77/wallet/getspendingkey
openapi: 3.0.0
info:
  title: wallet/getspendingkey TRON API
  version: 1.0.0
  description: Generate a new spending key for shielded TRC20 transactions
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/getspendingkey:
    post:
      tags:
        - Shielded Contract Methods
      summary: wallet/getspendingkey
      operationId: getSpendingKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
      responses:
        '200':
          description: Successfully generated spending key
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: string
                    description: >-
                      The generated spending key in hexadecimal format (64 hex
                      characters, no 0x prefix)
                    example: >-
                      02a1b2c3d4e5f67890123456789012345678901234567890123456789012345678

````