Execute nano contract
POST/wallet/nano-contract/execute
Returns the hexadecimal of the propagated transaction
Request
- application/json
Body
required
Data to execute nano contract
spent_tx_id stringrequired
Id in hex of the transaction being spent
spent_tx_index indexrequired
Index of the output of the transaction being spent
oracle_data stringrequired
Data in base64 provided by the oracle
oracle_signature stringrequired
Signature in base64 of the oracle data
oracle_pubkey stringrequired
Public key of the oracle in base64
address stringrequired
Winning address in base58
value integerrequired
Total value of the nano contract (without decimal places)
Responses
- 200
Success
- application/json
- Schema
- success
- error1
- error2
Schema
any
Success
{
"success": true,
"hex_tx": "00013ff00000000000005c3899fc0000000000000000000100010002005d9e609fb85c512ac590221aed8cc5e7b7f646a4511e61ec401eba7bda794bd30002bb171de3490828028ec5eef3325956acb6bcffa6a50466bb9a81d38363c25d9e609fb85c512ac590221aed8cc5e7b7f646a4511e61ec401eba7bda794bd300007b1007736f6d655f6964045bfc631902012c473045022067aa6e62d123a96b817332e2c40480af781799b5e2854be59ee82cb54823b054022100a4a4ccb96970bf0b39ef8fa3b6a296e7f02e1fe2020f4bbe1f23321ded1aae27210309a5a288617b2f1685a8dd0d4460bdb935cf72475f6bf10d2063cfdb86f70129000007d000001976a914f7934a91973cd100d753304f9a98267c8d4e6c0a88ac00000000"
}
Parameter error
{
"success": false,
"message": "Parameter error message"
}
Propagation error
{
"success": false,
"message": "Propagation error message"
}
Loading...