Get the hex representation of a transaction without input data.
POST/wallet/p2sh/tx-proposal
Get the hex representation of a transaction without input data.
Request
Header Parameters
Defines the key of the wallet on which the request will be executed.
- application/json
Body
required
Data to create the transaction
Array [
]
Array [
]
outputs
object[]
required
Outputs to create the transaction.
Destination address of the output.
The value parameter must be an integer with the value in cents, i.e., 123 means 1.23 HTR.
Token id of the output. If not sent, HTR will be chosen.
inputs
object[]
Inputs to create the transaction.
Id of the transaction being spent in this input.
Index of the output being spent in this input.
Optional address to send the change amount.
If we should lock the utxos chosen as inputs so they are not chosen when creating another transaction.
Responses
- 200
Create a transaction and get the hex representation of it
- application/json
- Schema
- error
- success
- wallet-not-ready
- no-wallet-id
- invalid-wallet-id
Schema
any
Insuficient amount of tokens
{
"success": false,
"error": "Token HTR: Insufficient amount of tokens"
}
Success
{
"success": true,
"txHex": "0123abc..."
}
Wallet is not ready yet
{
"success": false,
"message": "Wallet is not ready.",
"state": 1
}
No wallet id parameter
{
"success": false,
"message": "Parameter 'wallet-id' is required."
}
Wallet id parameter is invalid
{
"success": false,
"message": "Invalid wallet-id parameter."
}