Closed tiero closed 2 years ago
Test need to be updated and keys must be sorted lexographically to produce right contract hash @sekulicd
https://docs.blockstream.com/liquid/developer-guide/proof-of-issuance.html#contract-hash
As per doc, json sorts key lexographically by default, as for the tests need to check with pietro on how fixtures were generated since there were no pubkey
As per doc, json sorts key lexographically by default, as for the tests need to check with pietro on how fixtures were generated since there were no pubkey
Actually this is not true as only maps are sorted and not structs. @tiero
json sorts key lexographically
good to know, thanks
how fixtures were generated
I guess they have been generated manually.
You can use POST /contract/validate
to add test for the contract hash
ie.
{"version":0,"issuer_pubkey":"02a9a7399de89ec2e7de876bbe0b512f78f13d5d0a3315047e5b14109c8bac38f2","name":"Tiero Token","ticker":"TIERO","entity":{"domain":"tiero.github.io"},"precision":0}
Expected hash
cc64512512e0bc75ff028115bb6c466393dc91f257e3f883a58154b34dbca836
Here we should include the Issuer Pub Key as weel
reference specification
https://docs.blockstream.com/liquid/developer-guide/proof-of-issuance.html#contract-json-fields