For the complete documentation index, see llms.txt. This page is also available as Markdown.

Definition template

The template looks like normal definition but may include references to variables in the syntax @param1, @param2. Definition templates enable code reuse. They may in turn reference other templates.

Returns

Returns the unit hash.

Example

This template depends on two variables: $address and $ts.

const params = ['and', [
  ['address', '$address'], 
  ['in data feed', [['MO7ZZIU5VXHRZGGHVSZWLWL64IEND5K2'], 'timestamp', '>=', '$ts']]
]];

client.post.definitionTemplate(params, wif, function(err, result) {
  console.log(result);
});

Learn more

Last updated