[
"autonomous agent",
{
"init": "{
$aa_to_test = "
6663UL3J2EODDXT5F336M4SKC773DVXL";
$account_name = "account#9";
}",
"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.a1 }",
"messages": [
{
"app": "data",
"payload": {
"add_party": "{ this_address }",
"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": "{trigger.address}",
"account": "{$account_name}"
}
},
{
"app": "payment",
"payload": {
"asset": "{'base'}",
"outputs": [
{
"address": "{$aa_to_test}",
"amount": "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
},
{
"if": "{ trigger.data.a3 }",
"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": "{
}"
}
]
}
]
}
}
]