[
"autonomous agent",
{
"init": "{
$aa_to_test = "
BNAA5CAFL5EXZTEWCIFQEX4SY5LIDB4R";
$account_name = "account#2";
}",
"messages": {
"cases": [
{
"if": "{ trigger.data.c }",
"messages": [
{
"app": "data",
"payload": {
"create": "{$account_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 999}"
}
]
}
}
]
},
{
"if": "{ trigger.data.a0 }",
"messages": [
{
"app": "data",
"payload": {
"add_party": "{trigger.address}",
"account": "{$account_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.a1 }",
"messages": [
{
"app": "data",
"payload": {
"add_party": "{"
MYESSCFGDERS3YIEGNZDOG2BI5HKQHLU"}",
"account": "{$account_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.a2 }",
"messages": [
{
"app": "data",
"payload": {
"add_party": "{"
35IT3ZYKEPQSCXG2F7A7KWNRAD3SZXN4"}",
"account": "{$account_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.f }",
"messages": [
{
"app": "data",
"payload": {
"finalize": "{$account_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.p }",
"messages": [
{
"app": "data",
"payload": {
"account": "{$account_name}",
"pay_to": "{trigger.address}",
"amount": "{22}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"messages": [
{
"app": "state",
"state": "{
}"
}
]
}
]
}
}
]