[
"autonomous agent",
{
"messages": {
"cases": [
{
"if": "{trigger.data.num == 0}",
"messages": [
{
"app": "data",
"payload": {
"numMax": "{trigger.data.numMax}",
"addressSend": "{trigger.address}"
}
},
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "
4OI7UBKFSGFPIYYFXDALPUAK6LDZEBQV",
"amount": "{trigger.output[[asset=base]]-1000}"
}
]
}
}
]
},
{
"if": "{trigger.data.num != 0}",
"messages": [
{
"app": "data",
"payload": {
"num": "{trigger.data.num}"
}
},
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{trigger.address}",
"amount": "{trigger.output[[asset=base]]-1000}"
}
]
}
}
]
},
{
"messages": [
{
"app": "payment",
"payload": {
"outputs": [
{
"address": "{ trigger.address }"
}
]
}
}
]
}
]
}
}
]