SignTransaction
Signs an unsigned transaction with a secret phrase, returning the signed transaction JSON and bytes.
Endpoint
POST /nxt?requestType=signTransaction
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
unsignedTransactionJSON | string | No | Unsigned transaction JSON |
unsignedTransactionBytes | string | No | Unsigned transaction bytes (hex) |
prunableAttachmentJSON | string | No | Prunable attachment JSON |
secretPhrase | string | Yes | Sender's secret passphrase |
validate | boolean | No | true |
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
| Field | Type | Description |
|---|---|---|
transactionJSON | string | Signed transaction JSON |
fullHash | string | Transaction full hash |
signatureHash | string | Signature hash |
transactionBytes | string | Signed transaction bytes (hex) |
verify | boolean | Whether signature verification passed |
requestProcessingTime | number | API request processing time in milliseconds |
Source
SignTransaction.java
Tags
TRANSACTIONS