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

> TRON API method that creates a transaction to register an account as a witness (validator) on the TRON network. TRON via Chainstack.

TRON API method that creates a transaction to register an account as a witness (validator) on the TRON network. Witnesses participate in block production and network governance through the Delegated Proof of Stake (DPoS) consensus mechanism.

## Parameters

* `owner_address` — address of the account that will become a witness. Use base58 with `visible: true`, or hex with `visible: false`.
* `url` — witness website URL providing information about the witness (must be a valid URL)
* `visible` — optional boolean. When `true`, addresses are base58; when `false`, hex. Default is `true`.

## Response

* `visible` — boolean indicating whether addresses are in visible format
* `txID` — unique transaction ID for the witness creation transaction
* `raw_data` — raw transaction data containing:
  * `contract` — array with witness creation contract details
  * `ref_block_bytes` — reference block bytes for transaction validation
  * `ref_block_hash` — hash of the reference block
  * `expiration` — transaction expiration timestamp
  * `timestamp` — transaction creation timestamp
* `raw_data_hex` — complete transaction data encoded in hexadecimal format

## Use case

The `wallet/createwitness` method is used for:

* Registering an account as a witness to participate in TRON network governance.
* Setting up block production capabilities for earning rewards from the network.
* Establishing a public presence for community voting and trust building.
* Preparing to compete for one of the 27 Super Representative positions.
* Contributing to network security and decentralization through validation services.
* Building reputation and credibility within the TRON ecosystem.

<Note>
  This method only creates the witness registration transaction. You must sign the transaction and use `wallet/broadcasttransaction` to complete the witness registration. Becoming an active block producer requires receiving votes from TRX holders.
</Note>

## curl example

```shell Shell theme={"system"}
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/createwitness' \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC",
  "url": "https://mywitness.example.com",
  "visible": true
}'
```

<Info>
  seeing `INVALID hex String`? Provide a base58 address with `visible: true`, or a 21‑byte hex address (starts with `41…`) with `visible: false`.
</Info>


## OpenAPI

````yaml openapi/tron_node_api/createwitness.json post /95e61622bf6a8af293978377718e3b77/wallet/createwitness
openapi: 3.0.0
info:
  title: wallet/createwitness TRON API
  version: 1.0.0
  description: Create a witness (validator) account on the TRON network
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/createwitness:
    post:
      tags:
        - Witness and Governance
      summary: wallet/createwitness
      operationId: createWitness
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                owner_address:
                  type: string
                  description: >-
                    Address that will become a witness. Use base58 with
                    `visible: true`, or hex with `visible: false`.
                url:
                  type: string
                  description: Witness website URL (must be a valid URL)
                visible:
                  type: boolean
                  description: When true, addresses are base58; when false, hex.
                  default: true
              required:
                - owner_address
                - url
              example:
                owner_address: THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC
                url: https://mywitness.example.com
                visible: true
      responses:
        '200':
          description: Witness creation transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  visible:
                    type: boolean
                    description: Whether addresses are in visible format
                  txID:
                    type: string
                    description: Transaction ID for witness creation
                  raw_data:
                    type: object
                    properties:
                      contract:
                        type: array
                        description: Contract details for witness creation
                      ref_block_bytes:
                        type: string
                        description: Reference block bytes
                      ref_block_hash:
                        type: string
                        description: Reference block hash
                      expiration:
                        type: number
                        description: Transaction expiration timestamp
                      timestamp:
                        type: number
                        description: Transaction creation timestamp
                  raw_data_hex:
                    type: string
                    description: Raw transaction data in hex format

````