Create unsigned unmined raw transaction
POST/create_tx
Create unsigned unmined raw transaction
Request
- application/json
Body
required
Inputs and outputs to use
Array [
]
Array [
- AddressOutput
- ScriptOutput
]
inputs
object[]
tx_id string
Hash in hex of the spending transaction
index integer
Index of the output is being spent
data string
Data appended to input for verifying utxo, aka signature
outputs
object[]
oneOf
address stringrequired
Destination address in base58
value integerrequired
Value to be sent to the address (without decimal places, e.g. if you want to send 10.02 the value must be 1002)
timelock integer
Timestamp until when the output is locked
token_uid string
Hex encoded token uid, ommit for HTR
script stringrequired
Output script in base64
value integerrequired
Value to be sent to the address (without decimal places, e.g. if you want to send 10.02 the value must be 1002)
token_uid string
Hex encoded token uid, ommit for HTR
Responses
- 200
Success
- application/json
- Schema
- tx
Schema
any
This is what could be returned from the example request.
{
"success": true,
"hex_data": "0001000101000005551d7740fd7d3c0acc50b5677fdd844f1225985aa431e1712af2a2fd89010000000015e000001976a914afa600556bf43ece9b8e0486baa31bd46a82c3af88ac40310c373eed982e5f63d94d0200000000b0e8be665f308f1d48d2201060846203280062b1cccc4e3d657486e90000000071c0d2cafa192b421bb5727c84174c999f9400d3be74331e7feba08a00000000",
"data": {
"timestamp": 1600379213,
"version": 1,
"weight": 17.047717984205683,
"parents": [
"00000000b0e8be665f308f1d48d2201060846203280062b1cccc4e3d657486e9",
"0000000071c0d2cafa192b421bb5727c84174c999f9400d3be74331e7feba08a"
],
"inputs": [
{
"tx_id": "000005551d7740fd7d3c0acc50b5677fdd844f1225985aa431e1712af2a2fd89",
"index": 1,
"data": ""
}
],
"outputs": [
{
"value": 5600,
"token_data": 0,
"script": "dqkUr6YAVWv0Ps6bjgSGuqMb1GqCw6+IrA=="
}
],
"tokens": []
}
}
Loading...