diff --git a/main.js b/main.js index 6ea12bcfb4170701edca7c3142c94053577b89df..9e33ec9ed3227130207569eb0d7a9c17991089b6 100644 --- a/main.js +++ b/main.js @@ -35,6 +35,55 @@ module.exports = function(data=[]){ const parameter = parametersOrder[i]; resultat[parameter] = parseFloat(data[i]); } + resultat.doc = { + en:{ + c:"The %growth of the UD every [dtReeval] period", + growthSpeed:"The %growth of the UD every [udReevaluationInterval] period", + dt:"Time period between two UD.", + udInterval:"Time period between two UD.", + dtReeval:"Time period between two re-evaluations of the UD.", + udReevaluationInterval:"Time period between two re-evaluations of the UD.", + ud0:"UD(0), i.e. initial Universal Dividend", + ud0Amount:"UD(0), i.e. initial Universal Dividend", + udTime0:"Timestamp of first UD.", + ud0Time:"Timestamp of first UD.", + udReevalTime0:"Timestamp of first reevaluation of the UD.", + udReevaluationFirstTime:"Timestamp of first reevaluation of the UD.", + sigPeriod:"Minimum delay between 2 certifications of a same issuer, in seconds. Must be positive or zero.", + certifMinInterval:"Minimum delay between 2 certifications of a same issuer, in seconds. Must be positive or zero.", + msPeriod:"Minimum delay between 2 memberships of a same issuer, in seconds. Must be positive or zero.", + membershipAttemptMinInterval:"Minimum delay between 2 memberships of a same issuer, in seconds. Must be positive or zero.", + sigStock:"Maximum quantity of active certifications made by member.", + maxActiveCertif:"Maximum quantity of active certifications made by member.", + sigWindow:"Maximum delay a certification can wait before being expired for non-writing.", + pendingCertifLifetime:"Maximum delay a certification can wait before being expired for non-writing.", + sigValidity:"Maximum age of an active signature (in seconds)", + certifLifetime:"Maximum age of an active signature (in seconds)", + sigQty:"Minimum quantity of signatures to be part of the WoT", + membershipRequirements_minCertifQty:"Minimum quantity of signatures to be part of the WoT", + idtyWindow:"Maximum delay an identity can wait before being expired for non-writing.", + pendingIdentityLifetime:"Maximum delay an identity can wait before being expired for non-writing.", + msWindow:"Maximum delay a membership can wait before being expired for non-writing.", + pendingMembershipLifetime:"Maximum delay a membership can wait before being expired for non-writing.", + xpercent:"Minimum percent of sentries to reach to match the distance rule", + membershipRequirements_reachableFromMinPercentSentry:"Minimum percent of sentries to reach to match the distance rule", + msValidity:"Maximum age of an active membership (in seconds)", + membershipLifetime:"Maximum age of an active membership (in seconds)", + stepMax:"Maximum distance between each WoT member and a newcomer", + membershipRequirements_maxStepFromSentry:"Maximum distance between each WoT member and a newcomer", + medianTimeBlocks:"Number of blocks used for calculating median time.", + blocksRangeToComputeMedianTime:"Number of blocks used for calculating median time.", + avgGenTime:"The average time for writing 1 block (wished time)", + blockComputationAvgTime:"The average time for writing 1 block (wished time)", + dtDiffEval:"The number of blocks required to evaluate again PoWMin value", + blocksRangeForBlockComputationDifficultyCalculation:"The number of blocks required to evaluate again PoWMin value", + percentRot:"The percent of previous issuers to reach for personalized difficulty", + blockComputationCustomDifficultyMagic:"The percent of previous issuers to reach for personalized difficulty", + txWindow:"= 3600 * 24 * 7. Maximum delay a transaction can wait before being expired for non-writing.", + pendingTransactionLifetime:"= 3600 * 24 * 7. Maximum delay a transaction can wait before being expired for non-writing." + }, + fr:{} + } //TODO: doc.fr et doc.en //TODO: humanReadable //TODO: longName.fr .en diff --git a/main.test.js b/main.test.js index 79a11c658adeacc685caec7447bcaddd9e18978d..a91feb8d193de0350b6dc2c653a1bb95623dd830 100644 --- a/main.test.js +++ b/main.test.js @@ -33,3 +33,12 @@ describe('app returns Ǧ1 parameters by default', () => { }); } }); +describe('app expose doc', () => { + it(`doc.en.c has value`, () => { + expect(app().doc.en.c).toBeDefined();//("The %growth of the UD every [dt] period"); + }); + it(`doc.en also exist with longName`, () => { + expect(app().doc.en.growthSpeed).toBeDefined();//("The %growth of the UD every [dt] period"); + }); + +});