123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)(* Copyright (c) 2020 Metastate AG <hello@metastate.dev> *)(* Copyright (c) 2022 Nomadic Labs. <contact@nomadic-labs.com> *)(* *)(* Permission is hereby granted, free of charge, to any person obtaining a *)(* copy of this software and associated documentation files (the "Software"),*)(* to deal in the Software without restriction, including without limitation *)(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *)(* and/or sell copies of the Software, and to permit persons to whom the *)(* Software is furnished to do so, subject to the following conditions: *)(* *)(* The above copyright notice and this permission notice shall be included *)(* in all copies or substantial portions of the Software. *)(* *)(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *)(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *)(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *)(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *)(* DEALINGS IN THE SOFTWARE. *)(* *)(*****************************************************************************)moduletypeCONV=sigmoduleV_from:S.COMMON_SIGNATUREmoduleV_to:S.COMMON_SIGNATUREvalpublic_key_hash:V_from.Public_key_hash.t->V_to.Public_key_hash.tvalpublic_key:V_from.Public_key.t->V_to.Public_key.tvalsecret_key:V_from.Secret_key.t->V_to.Secret_key.tvalsignature:V_from.t->V_to.tendmoduletypeCONV_OPT=sigmoduleV_from:S.COMMON_SIGNATUREmoduleV_to :S.COMMON_SIGNATUREvalpublic_key_hash:V_from.Public_key_hash.t->V_to.Public_key_hash.toptionvalpublic_key:V_from.Public_key.t->V_to.Public_key.toptionvalsecret_key:V_from.Secret_key.t->V_to.Secret_key.toptionvalsignature:V_from.t->V_to.toptionendmoduleV_latest=Signature_v1moduleV0=structincludeSignature_v0moduleOf_V_latest:CONV_OPTwithmoduleV_from:=V_latestandmoduleV_to:=Signature_v0=structletpublic_key_hash:V_latest.Public_key_hash.t->Public_key_hash.toption=function|V_latest.Ed25519k->Some(Ed25519k)|V_latest.Secp256k1k->Some(Secp256k1k)|V_latest.P256k->Some(P256k)|V_latest.Bls_->Noneletpublic_key:V_latest.Public_key.t->Public_key.toption=function|V_latest.Ed25519k->Some(Ed25519k)|V_latest.Secp256k1k->Some(Secp256k1k)|V_latest.P256k->Some(P256k)|V_latest.Bls_->Noneletsecret_key:V_latest.Secret_key.t->Secret_key.toption=function|V_latest.Ed25519k->Some(Ed25519k)|V_latest.Secp256k1k->Some(Secp256k1k)|V_latest.P256k->Some(P256k)|V_latest.Bls_->Noneletsignature:V_latest.t->toption=function|V_latest.Ed25519k->Some(Ed25519k)|V_latest.Secp256k1k->Some(Secp256k1k)|V_latest.P256k->Some(P256k)|V_latest.Unknownk->Some(Unknownk)|V_latest.Bls_->NoneendendmoduleV1=structincludeSignature_v1moduleOf_V_latest:CONV_OPTwithmoduleV_from:=V_latestandmoduleV_to:=Signature_v1=structletpublic_key_hash=Option.someletpublic_key=Option.someletsecret_key=Option.someletsignature=Option.someendendincludeV_latestmoduleOf_V_latest=V1.Of_V_latestmoduleOf_V1:CONVwithmoduleV_from:=V1andmoduleV_to:=V1=structletpublic_key_hash=Fun.idletpublic_key=Fun.idletsecret_key=Fun.idletsignature=Fun.idend