inblockio / mediawiki-extensions-Aqua

This MediaWiki extension includes the Aqua implementation. Turning MediaWiki into a powerful versioned notary service with API's for import and export of Data in JSON format.
GNU General Public License v3.0
7 stars 6 forks source link

API Documentation rework <-> API cleanup #367

Closed FantasticoFox closed 2 months ago

FantasticoFox commented 4 months ago

Prosed: merged_verification_hash (must be hashed in metadata)

Currently: structured_merkle_proof not named

WitnessEntity (Witness Object)

Those information are not hash and could be manipulated -> we need to review if they are really needed and what for.

"witness_event_id": 1, 
                 "domain_id": null, 
                 "domain_snapshot_title": "N\/A",
                 "witness_event_verification_hash": "39cff24a0eebc962ec1e5e78e69dc2ac508799c646f722a580d8ab58bcc523db225e64a10edcb43b2c511e6734793f179ee027c0207e1c328b014b820f146291",
                 "smart_contract_address": "0x45f59310ADD88E6d23ca58A0Fa7A55BEE6d2a611",
                 "sender_account_address": "0x1ad5da43de60aa7d311f9b4e9c3342c155e6d2e0",
                 "source": "imported",

This data is verifiable and or part of the witness_data hash:

"domain_snapshot_genesis_hash": "305ca37488e0d1e20535f08f073290c564040f6574a84ab73fd5d4c6def175bc02260585bae9f6fc4a584a8367881ef5257c364692ff07378b6caa28d1450d9e",
"merkle_root": "c2c84eb0f69b769493e39b6e86268957be98fe735b5782cfcbb49a216ec17684dabda30082212080bb522dc3665fb226ad4932f7d8e1baf5808efd08f38a2ac8",
"witness_network": "goerli",
"witness_event_transaction_hash": "0x17cb36e3abfe5cd2894f7b324102c3864d202bc7b85e4f3e5ec78ca2c3db79d7",
"structured_merkle_proof": []

Line 516: time_stamp type not defined

it-spiderman commented 4 months ago
is revision id relevant for import? If not please do not export.
>> No, already removed in another issue

content is currently missing file
>> Added

content_hash is not part of content_content but of content
>> fixed

what is main? --> written article content
>> yes, added desc

transclusion hash not described -> please define data types and structure -> json encoded?
>> added, wont be json encoded in the future (already in another commit)

signature Line 526 and after (Also for API verify_page)
-> siganture starts with 0x
-> 652 characters type: hex alpha numeric
-> public: length 652+2
-> Wallet address should not be included as it can be derrived from the public-key and is not hashed within the protocol therefore not secured
Test: if wallet address is used -> if not braking change -> remove

Dont understand first 3 points, what should be changed there. As for wallet address, import does require it and i dont know how to get it from public key. Currently that info is part of the VerificationEntity, which should not be the case if it can be derived from public key

Prosed: merged_verification_hash (must be hashed in metadata)

will be done once revision merge change is merged

it-spiderman commented 4 months ago

parts of this done in https://github.com/inblockio/mediawiki-extensions-Aqua/pull/382