EOS Ricardian contract parser
This library strips out the {{ param }}
tags and replaces it with data from the transaction
itself.
Installation
npm i -S eos-rc-parser
Usage
const parser = ; const abi = await eos;const data = abifc;const actionAbi = abifcabiactions; const parsedRicardianContract = parser; // Optional HTML formattingconst htmlOptions = h1:'b' h2:'div class="someclass"';const parsedRicardianContract = parser;
Or constitution:
const ricardian = systemAbiabiricardian_clauses0body;const parsedRicardianContract = parser;
Examples results:
No HTML formatting
parser;
# Action - "bidname"
## Description
The "bidname" action places a bid on a premium account name, in the knowledge that the high bid will purchase the name.
As an authorized party I "testaccount" wish to bid on behalf of "testaccount" the amount of "3 EOS" toward purchase of the account name "somename".
HTML formatting.
parser;
<b>Action</b> - "bidname"<br><br><i class="test">Action</i><br><br>The "bidname" action places a bid on a premium account name, in the knowledge that the high bid will purchase the name.<br><br>As an authorized party I "testaccount" wish to bid on behalf of "testac
count" the amount of "3 EOS" toward purchase of the account name "somename".<br>