Definition template
'정의형 템플릿'은 기존 선언형 스크립트와 같지만 @param1, @param2 등의 문법을 통해 변수에 대한 참조를 포함하고 있는 선언형 스크립트이다. 코드의 재사용성을 높이고 아울러 다른 템플릿도 참조할 수 있다.
Returns
결과가 기록된 유닛 해시
Example
아래 템플릿은 두 변수를 참조한다: $address, $ts.
const params = ['and', [
['address', '$address'],
['in data feed', [['MO7ZZIU5VXHRZGGHVSZWLWL64IEND5K2'], 'timestamp', '>=', '$ts']]
]];
client.post.definitionTemplate(params, wif, function(err, result) {
console.log(result);
});Last updated
Was this helpful?