Skip to main content

SignTransaction

Signs an unsigned transaction with a secret phrase, returning the signed transaction JSON and bytes.

Endpoint

POST /nxt?requestType=signTransaction

Parameters

NameTypeRequiredDescription
unsignedTransactionJSONstringNoUnsigned transaction JSON
unsignedTransactionBytesstringNoUnsigned transaction bytes (hex)
prunableAttachmentJSONstringNoPrunable attachment JSON
secretPhrasestringYesSender's secret passphrase
validatebooleanNotrue

Either unsignedTransactionJSON or unsignedTransactionBytes is required.

Request Example

curl -X POST http://localhost:22024/nxt \
-d "requestType=signTransaction" \
-d "unsignedTransactionBytes=abc123..." \
-d "secretPhrase=your_phrase" \
-d "validate=true"

Response

{
"transactionJSON": "{...}",
"fullHash": "abc123...",
"signatureHash": "def456...",
"transactionBytes": "hexBytes",
"verify": true,
"requestProcessingTime": 5
}

Response Fields

FieldTypeDescription
transactionJSONstringSigned transaction JSON
fullHashstringTransaction full hash
signatureHashstringSignature hash
transactionBytesstringSigned transaction bytes (hex)
verifybooleanWhether signature verification passed
requestProcessingTimenumberAPI request processing time in milliseconds

Source

SignTransaction.java

Tags

TRANSACTIONS