---
title: "Sign arbitrary unsigned transaction with wallet secrets and also secrets provided."
method: POST
path: "/wallet/transaction/sign"
tags: ["wallet"]
---

# Sign arbitrary unsigned transaction with wallet secrets and also secrets provided.

`POST /wallet/transaction/sign`

## Request body

- TransactionSigningRequest — A request to sign a transaction with secrets provided
  - `tx` UnsignedErgoTransaction, required — Unsigned Ergo transaction
    - `id` string, base16 — Base16-encoded transaction id bytes
    - `inputs` ErgoTransactionUnsignedInput[], required — Unsigned inputs of the transaction
      - `boxId` string, base16, required — Base16-encoded transaction box id bytes. Should be 32 bytes long
      - `extension` object
    - `dataInputs` ErgoTransactionDataInput[], required — Data inputs of the transaction
      - `boxId` string, base16, required — Base16-encoded transaction box id bytes. Should be 32 bytes long
    - `outputs` ErgoTransactionOutput[], required — Outputs of the transaction
      - `boxId` string, base16 — Base16-encoded transaction box id bytes. Should be 32 bytes long
      - `value` integer, required — Amount of Ergo token
      - `ergoTree` string, base16, required — Base16-encoded ergo tree bytes
      - `creationHeight` integer, required — Height the output was created at
      - `assets` Asset[] — Assets list in the transaction
        - `tokenId` string, base16, required — Base16-encoded 32 byte digest
        - `amount` integer, required — Amount of the token
      - `additionalRegisters` Registers, required — Ergo box registers
      - `transactionId` string, base16 — Base16-encoded transaction id bytes
      - `index` integer — Index in the transaction outputs
  - `inputsRaw` string[] — Optional list of inputs to be used in serialized form
  - `dataInputsRaw` string[] — Optional list of inputs to be used in serialized form
  - `hints` TransactionHintsBag — prover hints extracted from a transaction
    - `secretHints` InputHints[] — Hints which contain secrets, do not share them!
    - `publicHints` InputHints[] — Hints which contain public data only, share them freely!
  - `secrets` object, required — Secrets used for signing
    - `dlog` DlogSecret[] — Sequence of secret exponents (DLOG secrets)
    - `dht` DhtSecret[] — Sequence of secret Diffie-Hellman tuple exponents (DHT secrets)
      - `secret` string, required — Hex-encoded big-endian 256-bits secret exponent
      - `g` string, required — Hex-encoded "g" generator for the Diffie-Hellman tuple (secp256k1 curve point)
      - `h` string, required — Hex-encoded "h" generator for the Diffie-Hellman tuple (secp256k1 curve point)
      - `u` string, required — Hex-encoded "u" group element of the Diffie-Hellman tuple (secp256k1 curve point)
      - `v` string, required — Hex-encoded "v" group element of the Diffie-Hellman tuple (secp256k1 curve point)

## Response `200`

Generated Ergo transaction

- ErgoTransaction — ErgoTransaction is an atomic operation which changes UTXO state.
  - `id` string, base16 — Base16-encoded transaction id bytes
  - `inputs` ErgoTransactionInput[], required — Inputs, that will be spent by this transaction
    - `boxId` string, base16, required — Base16-encoded transaction box id bytes. Should be 32 bytes long
    - `spendingProof` SpendingProof, required — Spending proof for transaction input
      - `proofBytes` string, base16, required — Base16-encoded spending proofs
      - `extension` object, required — Variables to be put into context
  - `dataInputs` ErgoTransactionDataInput[], required — Read-only inputs, that are not going to be spent by transaction.
    - `boxId` string, base16, required — Base16-encoded transaction box id bytes. Should be 32 bytes long
  - `outputs` ErgoTransactionOutput[], required — Outputs of the transaction, i.e. box candidates to be created by this transaction.
    - `boxId` string, base16 — Base16-encoded transaction box id bytes. Should be 32 bytes long
    - `value` integer, required — Amount of Ergo token
    - `ergoTree` string, base16, required — Base16-encoded ergo tree bytes
    - `creationHeight` integer, required — Height the output was created at
    - `assets` Asset[] — Assets list in the transaction
      - `tokenId` string, base16, required — Base16-encoded 32 byte digest
      - `amount` integer, required — Amount of the token
    - `additionalRegisters` Registers, required — Ergo box registers
    - `transactionId` string, base16 — Base16-encoded transaction id bytes
    - `index` integer — Index in the transaction outputs
  - `size` integer — Size of ErgoTransaction in bytes

## Other responses

- `400` — Bad transaction request
- `default` — Error

---

[API](https://skmtc.net/ergoplatform/apis/ergo-node-api.md) · [All operations](https://skmtc.net/ergoplatform/apis/ergo-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ergoplatform/ergo-node-api/versions/ef97e678f020/schema)
