Definition
Post a definition to create an autonomous agent.
Arguments
Returns
Example
const { Client, utils } = require('obyte');
const client = new Client('wss://obyte.org/bb-test', { testnet: true });
const definition = [
'autonomous agent',
{
bounce_fees: {
base: 10000
},
messages: [
{
app: 'payment',
payload: {
asset: 'base',
outputs: [
{
address: "{trigger.address}",
amount: "{trigger.output[[asset=base]] - 1000}"
}
]
}
}
]
}
];
const params = {
address: utils.getChash160(definition),
definition
}
client.post.definition(params, wif, function(err, result) {
console.log(result);
});Learn more
Last updated