From 970e23126c6587322611c3711f126b7b8a6ba4b0 Mon Sep 17 00:00:00 2001 From: Pratap2018 Date: Fri, 29 Mar 2024 00:07:58 +0530 Subject: [PATCH] update imports --- .../04608cfb-8139-411a-881f-328cfff1e91d.json | 1 - .../32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json | 1 - .../3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json | 1 - .../4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json | 1 + .../64bb629b-5f21-4a45-a083-7a0d3c970242.json | 1 - .../922fb093-6f0c-4fc4-8fed-ced17ae31879.json | 1 - .../acb70a44-2367-45d4-8b18-cd9ac932f10b.json | 1 - .../d24c19a2-493f-4f7b-b271-8e87167b6445.json | 1 - .../e0b8a14a-7346-4903-92e9-173f65c36a9c.json | 1 - .../04608cfb-8139-411a-881f-328cfff1e91d.json | 1 - .../32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json | 1 - .../3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json | 1 - .../4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json | 1 + .../64bb629b-5f21-4a45-a083-7a0d3c970242.json | 1 - .../922fb093-6f0c-4fc4-8fed-ced17ae31879.json | 1 - .../acb70a44-2367-45d4-8b18-cd9ac932f10b.json | 1 - .../d24c19a2-493f-4f7b-b271-8e87167b6445.json | 1 - .../e0b8a14a-7346-4903-92e9-173f65c36a9c.json | 1 - .nyc_output/processinfo/index.json | 2 +- lib/src/Context/v1/index.d.ts.map | 2 +- lib/src/Context/v1/index.js | 5 +++-- .../EthereumEip712Signature2021.d.ts | 2 +- .../EthereumEip712Signature2021.d.ts.map | 2 +- .../EthereumEip712Signature2021.js | 10 ++++++---- lib/src/TypedData/Eip712Types.js | 4 ++-- src/Context/v1/index.ts | 5 +++-- .../EthereumEip712Signature2021.ts | 13 +++++++++++-- src/TypedData/Eip712Types.ts | 2 +- 28 files changed, 32 insertions(+), 33 deletions(-) delete mode 100644 .nyc_output/04608cfb-8139-411a-881f-328cfff1e91d.json delete mode 100644 .nyc_output/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json delete mode 100644 .nyc_output/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json create mode 100644 .nyc_output/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json delete mode 100644 .nyc_output/64bb629b-5f21-4a45-a083-7a0d3c970242.json delete mode 100644 .nyc_output/922fb093-6f0c-4fc4-8fed-ced17ae31879.json delete mode 100644 .nyc_output/acb70a44-2367-45d4-8b18-cd9ac932f10b.json delete mode 100644 .nyc_output/d24c19a2-493f-4f7b-b271-8e87167b6445.json delete mode 100644 .nyc_output/e0b8a14a-7346-4903-92e9-173f65c36a9c.json delete mode 100644 .nyc_output/processinfo/04608cfb-8139-411a-881f-328cfff1e91d.json delete mode 100644 .nyc_output/processinfo/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json delete mode 100644 .nyc_output/processinfo/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json create mode 100644 .nyc_output/processinfo/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json delete mode 100644 .nyc_output/processinfo/64bb629b-5f21-4a45-a083-7a0d3c970242.json delete mode 100644 .nyc_output/processinfo/922fb093-6f0c-4fc4-8fed-ced17ae31879.json delete mode 100644 .nyc_output/processinfo/acb70a44-2367-45d4-8b18-cd9ac932f10b.json delete mode 100644 .nyc_output/processinfo/d24c19a2-493f-4f7b-b271-8e87167b6445.json delete mode 100644 .nyc_output/processinfo/e0b8a14a-7346-4903-92e9-173f65c36a9c.json diff --git a/.nyc_output/04608cfb-8139-411a-881f-328cfff1e91d.json b/.nyc_output/04608cfb-8139-411a-881f-328cfff1e91d.json deleted file mode 100644 index fdbaf29..0000000 --- a/.nyc_output/04608cfb-8139-411a-881f-328cfff1e91d.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"a71243928bd34eeb8bb59a49700c5a6a47e44fd86582e3002009cbf00fac3d00"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":39,"column":19},"end":{"line":39,"column":47}},"41":{"start":{"line":41,"column":17},"end":{"line":41,"column":51}},"42":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"43":{"start":{"line":43,"column":27},"end":{"line":43,"column":58}},"44":{"start":{"line":44,"column":17},"end":{"line":44,"column":34}},"45":{"start":{"line":45,"column":14},"end":{"line":45,"column":44}},"46":{"start":{"line":46,"column":16},"end":{"line":46,"column":35}},"47":{"start":{"line":47,"column":22},"end":{"line":47,"column":57}},"48":{"start":{"line":48,"column":13},"end":{"line":48,"column":37}},"49":{"start":{"line":49,"column":23},"end":{"line":49,"column":46}},"50":{"start":{"line":50,"column":18},"end":{"line":60,"column":2}},"51":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"52":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"53":{"start":{"line":52,"column":8},"end":{"line":56,"column":10}},"54":{"start":{"line":59,"column":4},"end":{"line":59,"column":35}},"55":{"start":{"line":61,"column":16},"end":{"line":61,"column":30}},"56":{"start":{"line":63,"column":0},"end":{"line":63,"column":34}},"57":{"start":{"line":67,"column":8},"end":{"line":67,"column":55}},"58":{"start":{"line":68,"column":8},"end":{"line":68,"column":23}},"59":{"start":{"line":69,"column":8},"end":{"line":69,"column":27}},"60":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"61":{"start":{"line":71,"column":12},"end":{"line":71,"column":29}},"62":{"start":{"line":74,"column":12},"end":{"line":74,"column":45}},"63":{"start":{"line":76,"column":39},"end":{"line":76,"column":46}},"64":{"start":{"line":77,"column":8},"end":{"line":79,"column":10}},"65":{"start":{"line":80,"column":8},"end":{"line":80,"column":37}},"66":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"67":{"start":{"line":82,"column":12},"end":{"line":82,"column":33}},"68":{"start":{"line":84,"column":8},"end":{"line":84,"column":46}},"69":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"70":{"start":{"line":88,"column":12},"end":{"line":88,"column":51}},"71":{"start":{"line":90,"column":8},"end":{"line":90,"column":29}},"72":{"start":{"line":93,"column":8},"end":{"line":112,"column":11}},"73":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"74":{"start":{"line":95,"column":16},"end":{"line":95,"column":37}},"75":{"start":{"line":99,"column":16},"end":{"line":99,"column":96}},"76":{"start":{"line":101,"column":29},"end":{"line":101,"column":78}},"77":{"start":{"line":102,"column":27},"end":{"line":102,"column":109}},"78":{"start":{"line":103,"column":12},"end":{"line":103,"column":33}},"79":{"start":{"line":104,"column":28},"end":{"line":104,"column":95}},"80":{"start":{"line":105,"column":12},"end":{"line":105,"column":35}},"81":{"start":{"line":106,"column":12},"end":{"line":106,"column":33}},"82":{"start":{"line":107,"column":12},"end":{"line":111,"column":14}},"83":{"start":{"line":115,"column":24},"end":{"line":115,"column":78}},"84":{"start":{"line":116,"column":8},"end":{"line":116,"column":31}},"85":{"start":{"line":117,"column":8},"end":{"line":117,"column":83}},"86":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"87":{"start":{"line":119,"column":8},"end":{"line":122,"column":10}},"88":{"start":{"line":125,"column":8},"end":{"line":136,"column":11}},"89":{"start":{"line":126,"column":29},"end":{"line":126,"column":83}},"90":{"start":{"line":127,"column":27},"end":{"line":127,"column":104}},"91":{"start":{"line":128,"column":12},"end":{"line":128,"column":33}},"92":{"start":{"line":129,"column":28},"end":{"line":129,"column":95}},"93":{"start":{"line":130,"column":12},"end":{"line":130,"column":35}},"94":{"start":{"line":131,"column":12},"end":{"line":135,"column":14}},"95":{"start":{"line":139,"column":8},"end":{"line":139,"column":44}},"96":{"start":{"line":142,"column":8},"end":{"line":152,"column":11}},"97":{"start":{"line":143,"column":33},"end":{"line":148,"column":14}},"98":{"start":{"line":149,"column":27},"end":{"line":149,"column":64}},"99":{"start":{"line":150,"column":23},"end":{"line":150,"column":50}},"100":{"start":{"line":151,"column":12},"end":{"line":151,"column":38}},"101":{"start":{"line":156,"column":8},"end":{"line":200,"column":11}},"102":{"start":{"line":157,"column":24},"end":{"line":159,"column":13}},"103":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"104":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"105":{"start":{"line":162,"column":16},"end":{"line":162,"column":77}},"106":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"107":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"108":{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},"109":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"110":{"start":{"line":169,"column":16},"end":{"line":169,"column":50}},"111":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"112":{"start":{"line":172,"column":16},"end":{"line":172,"column":37}},"113":{"start":{"line":174,"column":12},"end":{"line":174,"column":66}},"114":{"start":{"line":175,"column":12},"end":{"line":180,"column":15}},"115":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"116":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"117":{"start":{"line":183,"column":36},"end":{"line":183,"column":71}},"118":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"119":{"start":{"line":185,"column":39},"end":{"line":190,"column":13}},"120":{"start":{"line":191,"column":12},"end":{"line":191,"column":101}},"121":{"start":{"line":192,"column":54},"end":{"line":192,"column":122}},"122":{"start":{"line":193,"column":30},"end":{"line":197,"column":13}},"123":{"start":{"line":198,"column":12},"end":{"line":198,"column":49}},"124":{"start":{"line":199,"column":12},"end":{"line":199,"column":25}},"125":{"start":{"line":204,"column":8},"end":{"line":264,"column":11}},"126":{"start":{"line":205,"column":40},"end":{"line":205,"column":47}},"127":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"128":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"129":{"start":{"line":208,"column":36},"end":{"line":208,"column":71}},"130":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"131":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"132":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"133":{"start":{"line":212,"column":20},"end":{"line":212,"column":87}},"134":{"start":{"line":214,"column":16},"end":{"line":214,"column":69}},"135":{"start":{"line":216,"column":41},"end":{"line":221,"column":13}},"136":{"start":{"line":222,"column":12},"end":{"line":263,"column":13}},"137":{"start":{"line":223,"column":58},"end":{"line":226,"column":18}},"138":{"start":{"line":227,"column":27},"end":{"line":227,"column":68}},"139":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"140":{"start":{"line":229,"column":33},"end":{"line":236,"column":18}},"141":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"142":{"start":{"line":238,"column":20},"end":{"line":238,"column":53}},"143":{"start":{"line":240,"column":39},"end":{"line":245,"column":18}},"144":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"145":{"start":{"line":247,"column":20},"end":{"line":247,"column":47}},"146":{"start":{"line":249,"column":34},"end":{"line":255,"column":17}},"147":{"start":{"line":256,"column":16},"end":{"line":258,"column":17}},"148":{"start":{"line":257,"column":20},"end":{"line":257,"column":64}},"149":{"start":{"line":259,"column":16},"end":{"line":259,"column":33}},"150":{"start":{"line":262,"column":16},"end":{"line":262,"column":69}},"151":{"start":{"line":268,"column":8},"end":{"line":268,"column":48}},"152":{"start":{"line":271,"column":8},"end":{"line":271,"column":41}},"153":{"start":{"line":272,"column":8},"end":{"line":272,"column":45}},"154":{"start":{"line":273,"column":8},"end":{"line":273,"column":36}},"155":{"start":{"line":276,"column":8},"end":{"line":282,"column":11}},"156":{"start":{"line":277,"column":40},"end":{"line":277,"column":47}},"157":{"start":{"line":279,"column":34},"end":{"line":279,"column":59}},"158":{"start":{"line":280,"column":37},"end":{"line":280,"column":60}},"159":{"start":{"line":281,"column":12},"end":{"line":281,"column":53}},"160":{"start":{"line":285,"column":33},"end":{"line":285,"column":57}},"161":{"start":{"line":286,"column":8},"end":{"line":288,"column":9}},"162":{"start":{"line":287,"column":12},"end":{"line":287,"column":55}},"163":{"start":{"line":289,"column":8},"end":{"line":291,"column":9}},"164":{"start":{"line":290,"column":12},"end":{"line":290,"column":71}},"165":{"start":{"line":293,"column":8},"end":{"line":293,"column":34}},"166":{"start":{"line":296,"column":8},"end":{"line":326,"column":11}},"167":{"start":{"line":297,"column":42},"end":{"line":297,"column":49}},"168":{"start":{"line":300,"column":12},"end":{"line":316,"column":13}},"169":{"start":{"line":302,"column":29},"end":{"line":302,"column":70}},"170":{"start":{"line":303,"column":31},"end":{"line":303,"column":65}},"171":{"start":{"line":304,"column":31},"end":{"line":304,"column":53}},"172":{"start":{"line":306,"column":16},"end":{"line":306,"column":97}},"173":{"start":{"line":308,"column":17},"end":{"line":316,"column":13}},"174":{"start":{"line":309,"column":16},"end":{"line":309,"column":76}},"175":{"start":{"line":314,"column":20},"end":{"line":314,"column":160}},"176":{"start":{"line":317,"column":12},"end":{"line":317,"column":55}},"177":{"start":{"line":318,"column":12},"end":{"line":324,"column":13}},"178":{"start":{"line":319,"column":16},"end":{"line":323,"column":18}},"179":{"start":{"line":325,"column":12},"end":{"line":325,"column":25}},"180":{"start":{"line":329,"column":33},"end":{"line":337,"column":10}},"181":{"start":{"line":339,"column":8},"end":{"line":342,"column":9}},"182":{"start":{"line":341,"column":12},"end":{"line":341,"column":24}},"183":{"start":{"line":343,"column":8},"end":{"line":343,"column":21}},"184":{"start":{"line":346,"column":25},"end":{"line":346,"column":39}},"185":{"start":{"line":348,"column":22},"end":{"line":348,"column":51}},"186":{"start":{"line":349,"column":8},"end":{"line":349,"column":40}},"187":{"start":{"line":350,"column":8},"end":{"line":350,"column":43}},"188":{"start":{"line":353,"column":8},"end":{"line":368,"column":11}},"189":{"start":{"line":354,"column":12},"end":{"line":367,"column":15}},"190":{"start":{"line":355,"column":16},"end":{"line":366,"column":19}},"191":{"start":{"line":360,"column":20},"end":{"line":365,"column":21}},"192":{"start":{"line":361,"column":24},"end":{"line":361,"column":36}},"193":{"start":{"line":364,"column":24},"end":{"line":364,"column":47}},"194":{"start":{"line":371,"column":0},"end":{"line":371,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":50,"column":18},"end":{"line":50,"column":19}},"loc":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"line":50},"15":{"name":"(anonymous_15)","decl":{"start":{"line":50,"column":70},"end":{"line":50,"column":71}},"loc":{"start":{"line":50,"column":83},"end":{"line":60,"column":1}},"line":50},"16":{"name":"(anonymous_16)","decl":{"start":{"line":65,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":65,"column":31},"end":{"line":85,"column":5}},"line":65},"17":{"name":"(anonymous_17)","decl":{"start":{"line":86,"column":4},"end":{"line":86,"column":5}},"loc":{"start":{"line":86,"column":18},"end":{"line":91,"column":5}},"line":86},"18":{"name":"(anonymous_18)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":26},"end":{"line":113,"column":5}},"line":92},"19":{"name":"(anonymous_19)","decl":{"start":{"line":93,"column":47},"end":{"line":93,"column":48}},"loc":{"start":{"line":93,"column":60},"end":{"line":112,"column":9}},"line":93},"20":{"name":"(anonymous_20)","decl":{"start":{"line":114,"column":4},"end":{"line":114,"column":5}},"loc":{"start":{"line":114,"column":31},"end":{"line":123,"column":5}},"line":114},"21":{"name":"(anonymous_21)","decl":{"start":{"line":124,"column":4},"end":{"line":124,"column":5}},"loc":{"start":{"line":124,"column":25},"end":{"line":137,"column":5}},"line":124},"22":{"name":"(anonymous_22)","decl":{"start":{"line":125,"column":47},"end":{"line":125,"column":48}},"loc":{"start":{"line":125,"column":60},"end":{"line":136,"column":9}},"line":125},"23":{"name":"(anonymous_23)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":5}},"loc":{"start":{"line":138,"column":12},"end":{"line":140,"column":5}},"line":138},"24":{"name":"(anonymous_24)","decl":{"start":{"line":141,"column":4},"end":{"line":141,"column":5}},"loc":{"start":{"line":141,"column":34},"end":{"line":153,"column":5}},"line":141},"25":{"name":"(anonymous_25)","decl":{"start":{"line":142,"column":47},"end":{"line":142,"column":48}},"loc":{"start":{"line":142,"column":60},"end":{"line":152,"column":9}},"line":142},"26":{"name":"(anonymous_26)","decl":{"start":{"line":154,"column":4},"end":{"line":154,"column":5}},"loc":{"start":{"line":154,"column":25},"end":{"line":201,"column":5}},"line":154},"27":{"name":"(anonymous_27)","decl":{"start":{"line":156,"column":47},"end":{"line":156,"column":48}},"loc":{"start":{"line":156,"column":60},"end":{"line":200,"column":9}},"line":156},"28":{"name":"(anonymous_28)","decl":{"start":{"line":202,"column":4},"end":{"line":202,"column":5}},"loc":{"start":{"line":202,"column":25},"end":{"line":265,"column":5}},"line":202},"29":{"name":"(anonymous_29)","decl":{"start":{"line":204,"column":47},"end":{"line":204,"column":48}},"loc":{"start":{"line":204,"column":60},"end":{"line":264,"column":9}},"line":204},"30":{"name":"(anonymous_30)","decl":{"start":{"line":266,"column":4},"end":{"line":266,"column":5}},"loc":{"start":{"line":266,"column":20},"end":{"line":269,"column":5}},"line":266},"31":{"name":"(anonymous_31)","decl":{"start":{"line":270,"column":4},"end":{"line":270,"column":5}},"loc":{"start":{"line":270,"column":25},"end":{"line":274,"column":5}},"line":270},"32":{"name":"(anonymous_32)","decl":{"start":{"line":275,"column":4},"end":{"line":275,"column":5}},"loc":{"start":{"line":275,"column":30},"end":{"line":283,"column":5}},"line":275},"33":{"name":"(anonymous_33)","decl":{"start":{"line":276,"column":47},"end":{"line":276,"column":48}},"loc":{"start":{"line":276,"column":60},"end":{"line":282,"column":9}},"line":276},"34":{"name":"(anonymous_34)","decl":{"start":{"line":284,"column":4},"end":{"line":284,"column":5}},"loc":{"start":{"line":284,"column":33},"end":{"line":294,"column":5}},"line":284},"35":{"name":"(anonymous_35)","decl":{"start":{"line":295,"column":4},"end":{"line":295,"column":5}},"loc":{"start":{"line":295,"column":18},"end":{"line":327,"column":5}},"line":295},"36":{"name":"(anonymous_36)","decl":{"start":{"line":296,"column":47},"end":{"line":296,"column":48}},"loc":{"start":{"line":296,"column":60},"end":{"line":326,"column":9}},"line":296},"37":{"name":"(anonymous_37)","decl":{"start":{"line":328,"column":4},"end":{"line":328,"column":5}},"loc":{"start":{"line":328,"column":29},"end":{"line":344,"column":5}},"line":328},"38":{"name":"(anonymous_38)","decl":{"start":{"line":345,"column":4},"end":{"line":345,"column":5}},"loc":{"start":{"line":345,"column":31},"end":{"line":351,"column":5}},"line":345},"39":{"name":"(anonymous_39)","decl":{"start":{"line":352,"column":4},"end":{"line":352,"column":5}},"loc":{"start":{"line":352,"column":50},"end":{"line":369,"column":5}},"line":352},"40":{"name":"(anonymous_40)","decl":{"start":{"line":353,"column":47},"end":{"line":353,"column":48}},"loc":{"start":{"line":353,"column":60},"end":{"line":368,"column":9}},"line":353},"41":{"name":"(anonymous_41)","decl":{"start":{"line":354,"column":31},"end":{"line":354,"column":32}},"loc":{"start":{"line":354,"column":52},"end":{"line":367,"column":13}},"line":354},"42":{"name":"(anonymous_42)","decl":{"start":{"line":359,"column":19},"end":{"line":359,"column":20}},"loc":{"start":{"line":359,"column":36},"end":{"line":366,"column":17}},"line":359}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},{"start":{"line":51,"column":4},"end":{"line":57,"column":5}}],"line":51},"25":{"loc":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},{"start":{"line":70,"column":8},"end":{"line":75,"column":9}}],"line":70},"26":{"loc":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},{"start":{"line":81,"column":8},"end":{"line":83,"column":9}}],"line":81},"27":{"loc":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},{"start":{"line":87,"column":8},"end":{"line":89,"column":9}}],"line":87},"28":{"loc":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},{"start":{"line":94,"column":12},"end":{"line":100,"column":13}}],"line":94},"29":{"loc":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"type":"cond-expr","locations":[{"start":{"line":160,"column":40},"end":{"line":160,"column":53}},{"start":{"line":160,"column":56},"end":{"line":160,"column":60}}],"line":160},"30":{"loc":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"type":"if","locations":[{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},{"start":{"line":161,"column":12},"end":{"line":163,"column":13}}],"line":161},"31":{"loc":{"start":{"line":161,"column":16},"end":{"line":161,"column":106}},"type":"binary-expr","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":56}},{"start":{"line":161,"column":60},"end":{"line":161,"column":106}}],"line":161},"32":{"loc":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"type":"cond-expr","locations":[{"start":{"line":164,"column":38},"end":{"line":164,"column":70}},{"start":{"line":164,"column":73},"end":{"line":164,"column":82}}],"line":164},"33":{"loc":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},{"start":{"line":165,"column":12},"end":{"line":167,"column":13}}],"line":165},"34":{"loc":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"type":"if","locations":[{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},{"start":{"line":168,"column":12},"end":{"line":170,"column":13}}],"line":168},"35":{"loc":{"start":{"line":168,"column":16},"end":{"line":168,"column":62}},"type":"binary-expr","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},{"start":{"line":168,"column":38},"end":{"line":168,"column":62}}],"line":168},"36":{"loc":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"type":"if","locations":[{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},{"start":{"line":171,"column":12},"end":{"line":173,"column":13}}],"line":171},"37":{"loc":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"type":"cond-expr","locations":[{"start":{"line":181,"column":42},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":61}}],"line":181},"38":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"type":"cond-expr","locations":[{"start":{"line":182,"column":87},"end":{"line":182,"column":89}},{"start":{"line":182,"column":92},"end":{"line":182,"column":102}}],"line":182},"39":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":84}},"type":"binary-expr","locations":[{"start":{"line":182,"column":32},"end":{"line":182,"column":67}},{"start":{"line":182,"column":71},"end":{"line":182,"column":84}}],"line":182},"40":{"loc":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"type":"cond-expr","locations":[{"start":{"line":184,"column":40},"end":{"line":184,"column":53}},{"start":{"line":184,"column":56},"end":{"line":184,"column":116}}],"line":184},"41":{"loc":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"type":"cond-expr","locations":[{"start":{"line":206,"column":42},"end":{"line":206,"column":56}},{"start":{"line":206,"column":59},"end":{"line":206,"column":61}}],"line":206},"42":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"type":"cond-expr","locations":[{"start":{"line":207,"column":87},"end":{"line":207,"column":89}},{"start":{"line":207,"column":92},"end":{"line":207,"column":102}}],"line":207},"43":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":84}},"type":"binary-expr","locations":[{"start":{"line":207,"column":32},"end":{"line":207,"column":67}},{"start":{"line":207,"column":71},"end":{"line":207,"column":84}}],"line":207},"44":{"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"type":"cond-expr","locations":[{"start":{"line":209,"column":40},"end":{"line":209,"column":53}},{"start":{"line":209,"column":56},"end":{"line":209,"column":116}}],"line":209},"45":{"loc":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"type":"if","locations":[{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},{"start":{"line":210,"column":12},"end":{"line":215,"column":13}}],"line":210},"46":{"loc":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"type":"if","locations":[{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},{"start":{"line":211,"column":16},"end":{"line":213,"column":17}}],"line":211},"47":{"loc":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"type":"cond-expr","locations":[{"start":{"line":228,"column":82},"end":{"line":228,"column":156}},{"start":{"line":228,"column":159},"end":{"line":228,"column":163}}],"line":228},"48":{"loc":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"type":"if","locations":[{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},{"start":{"line":237,"column":16},"end":{"line":239,"column":17}}],"line":237},"49":{"loc":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"type":"if","locations":[{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},{"start":{"line":246,"column":16},"end":{"line":248,"column":17}}],"line":246},"50":{"loc":{"start":{"line":256,"column":16},"end":{"line":258,"column":17}},"type":"if","locations":[{"start":{"line":256,"column":16},"end":{"line":258,"column":17}},{"start":{"line":256,"column":16},"end":{"line":258,"column":17}}],"line":256},"51":{"loc":{"start":{"line":256,"column":20},"end":{"line":256,"column":88}},"type":"binary-expr","locations":[{"start":{"line":256,"column":20},"end":{"line":256,"column":46}},{"start":{"line":256,"column":50},"end":{"line":256,"column":88}}],"line":256},"52":{"loc":{"start":{"line":286,"column":8},"end":{"line":288,"column":9}},"type":"if","locations":[{"start":{"line":286,"column":8},"end":{"line":288,"column":9}},{"start":{"line":286,"column":8},"end":{"line":288,"column":9}}],"line":286},"53":{"loc":{"start":{"line":289,"column":8},"end":{"line":291,"column":9}},"type":"if","locations":[{"start":{"line":289,"column":8},"end":{"line":291,"column":9}},{"start":{"line":289,"column":8},"end":{"line":291,"column":9}}],"line":289},"54":{"loc":{"start":{"line":300,"column":12},"end":{"line":316,"column":13}},"type":"if","locations":[{"start":{"line":300,"column":12},"end":{"line":316,"column":13}},{"start":{"line":300,"column":12},"end":{"line":316,"column":13}}],"line":300},"55":{"loc":{"start":{"line":300,"column":16},"end":{"line":300,"column":81}},"type":"binary-expr","locations":[{"start":{"line":300,"column":16},"end":{"line":300,"column":49}},{"start":{"line":300,"column":53},"end":{"line":300,"column":81}}],"line":300},"56":{"loc":{"start":{"line":308,"column":17},"end":{"line":316,"column":13}},"type":"if","locations":[{"start":{"line":308,"column":17},"end":{"line":316,"column":13}},{"start":{"line":308,"column":17},"end":{"line":316,"column":13}}],"line":308},"57":{"loc":{"start":{"line":318,"column":12},"end":{"line":324,"column":13}},"type":"if","locations":[{"start":{"line":318,"column":12},"end":{"line":324,"column":13}},{"start":{"line":318,"column":12},"end":{"line":324,"column":13}}],"line":318},"58":{"loc":{"start":{"line":339,"column":8},"end":{"line":342,"column":9}},"type":"if","locations":[{"start":{"line":339,"column":8},"end":{"line":342,"column":9}},{"start":{"line":339,"column":8},"end":{"line":342,"column":9}}],"line":339},"59":{"loc":{"start":{"line":360,"column":20},"end":{"line":365,"column":21}},"type":"if","locations":[{"start":{"line":360,"column":20},"end":{"line":365,"column":21}},{"start":{"line":360,"column":20},"end":{"line":365,"column":21}}],"line":360}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAwB;AACxB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAG/C,YAAY;AACZ,oDAA2B;AAE3B,oDAA4B;AAC5B,MAAM,kBAAkB,GAAG,gBAAM,CAAC,cAAc,CAAC;AAGjD,mCAAiH;AAGjH,6CAA+B;AAE/B,oCAAmC;AACnC,0DAA2D;AAI3D,sCAAwC;AACxC,+CAA0E;AAE1E,MAAM,SAAS,GAAG,CAAO,GAAQ,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,aAAQ,EAAE;QACnB,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,aAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACnE,CAAC;KACH;IACD,kCAAkC;IAElC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC,CAAA,CAAA;AAID,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAA;AAIjC,MAAM,2BAA4B,SAAQ,MAAM,CAAC,mBAAmB;IAalE,YAAY,OAA8B,EAAE,IAAW;QACrD,2CAA2C;QAC3C,KAAK,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,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,WAAW;aACjC,EAAE,GAAG,EAAE,OAAO,CAAC,SAAS;SAC1B,CACF,CAAC;QAEF,wCAAwC;QAExC,IACE,gBAAgB,CAAC,WAAW,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,WAAW,EAAE,EACpE;YACA,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,qBAAqB,CAAC,GAAW;QAE/B,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,qBAAqB;QACrB,IAAI,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5C,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,OAAO,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAGrC,CAAC;IAIK,mBAAmB,CAAC,MAAc,EAAE,MAAa,EAAE,QAAa;;YACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,QAAQ,CAAC,SAAS,CAChB;oBACE,MAAM;oBACN,MAAM;oBACN,IAAI,EAAE,QAAQ,CAAC,eAAe;iBAC/B,EACD,CAAC,GAAQ,EAAE,MAAW,EAAE,EAAE;oBACxB,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;qBACxB;gBACH,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAID,kBAAe,2BAA2B,CAAC;AAG3C,gFAAgF","sourcesContent":["\nimport Web3 from \"web3\";\nconst { suites } = require('jsonld-signatures')\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\nconst { JCS } = require('jcs')\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n })) \n \n if(!purposeResult.valid){\n throw Error(purposeResult)\n } \n \n const returnObj = {\n verified: true,\n status: {\n canonicalizationHashVerified,\n signatureVerified: verified,\n }\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj\n } catch (error) {\n return { verified: false, status: undefined, error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4600be2819715de85a58880e26d523ba0a85b3f2","contentHash":"70d4e95d16b3c7a568e5940c9a65c01c3ffcd8e3506c586e2d4c41f282f7d4d5"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"97a7f2b272566ccb11018a61e6aa132e95dc517a39cafc75011c28cebbbe292c"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":16},"end":{"line":5,"column":30}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9B,4BAA4B;AAE5B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAA;AAKjC,MAAM,eAAe;IAArB;QACY,SAAI,GAAwB,IAAI,GAAG,EAAkB,CAAA;QAC7D,gBAAW,GAAQ,EAAE,CAAA;IAsHzB,CAAC;IArHW,GAAG,CAAC,KAAU,EAAE,IAAY,EAAE,WAAgB;QAClD,IAAI,GAAG,GAAQ,EAAE,CAAA;QACjB,IAAI,KAAK,GAAG,EAAE,CAAA;QACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAErB,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;YAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBACtC,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;gBAE9B,IAAI,IAAI,IAAI,QAAQ,EAAE;oBAClB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;wBAC3B,MAAM,QAAQ,GAAG,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AI,WAAW,IAAI,SAAS,EAAE;YAC1B,WAAW,GAAG,UAAU,CAAA;SAC3B;QACD,gHAAgH;QAGhH,8BAA8B;QAC9B,YAAY;QACZ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;QACxC,IAAI,GAAG,GAAQ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QAEnC,YAAY;QACZ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAIrC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CAEJ;AAIQ,0CAAe","sourcesContent":["// https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation\n\n\nconst { JCS } = require('jcs')\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ecd53451cb8a4b59f3d5c6a0d0f18152ced7e949","contentHash":"75e5160656050bf91b1337df3b48812fc5a02960da6174d5a9ed21ef9bf28354"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":21,"column":15},"end":{"line":21,"column":32}},"22":{"start":{"line":22,"column":25},"end":{"line":22,"column":70}},"23":{"start":{"line":23,"column":33},"end":{"line":23,"column":85}},"24":{"start":{"line":24,"column":48},"end":{"line":24,"column":115}},"25":{"start":{"line":27,"column":27},"end":{"line":27,"column":56}},"26":{"start":{"line":28,"column":17},"end":{"line":37,"column":2}},"27":{"start":{"line":38,"column":0},"end":{"line":38,"column":28}},"28":{"start":{"line":39,"column":18},"end":{"line":48,"column":2}},"29":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"30":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"31":{"start":{"line":41,"column":8},"end":{"line":45,"column":10}},"32":{"start":{"line":47,"column":4},"end":{"line":47,"column":35}},"33":{"start":{"line":49,"column":0},"end":{"line":49,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":39,"column":18},"end":{"line":39,"column":19}},"loc":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"line":39},"9":{"name":"(anonymous_9)","decl":{"start":{"line":39,"column":70},"end":{"line":39,"column":71}},"loc":{"start":{"line":39,"column":83},"end":{"line":48,"column":1}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},{"start":{"line":40,"column":4},"end":{"line":46,"column":5}}],"line":40}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":8,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":8,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,8],"7":[8,8],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;AACzD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\nconst jsonld = require('jsonld');\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoaders.node();\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"01c391d5ad03546c4b7858d181b4e60185df2808","contentHash":"2ac01c860fb772f1cc3eae7e790c0af2229d41b6433c967b679e210d2a00ac92"}} \ No newline at end of file diff --git a/.nyc_output/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json b/.nyc_output/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json deleted file mode 100644 index 3dfef14..0000000 --- a/.nyc_output/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":0,"2":1,"3":1,"4":1,"5":0},"f":{"0":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"1c7f99d8f7b9d4cb0b676bf67d98ec1e7bf5f7cde5ee3a6a2563bc7b3b060c32"}} \ No newline at end of file diff --git a/.nyc_output/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json b/.nyc_output/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json deleted file mode 100644 index e066347..0000000 --- a/.nyc_output/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"1c7f99d8f7b9d4cb0b676bf67d98ec1e7bf5f7cde5ee3a6a2563bc7b3b060c32"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":39,"column":19},"end":{"line":39,"column":47}},"41":{"start":{"line":41,"column":17},"end":{"line":41,"column":51}},"42":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"43":{"start":{"line":43,"column":27},"end":{"line":43,"column":58}},"44":{"start":{"line":44,"column":17},"end":{"line":44,"column":34}},"45":{"start":{"line":45,"column":14},"end":{"line":45,"column":44}},"46":{"start":{"line":46,"column":16},"end":{"line":46,"column":35}},"47":{"start":{"line":47,"column":22},"end":{"line":47,"column":57}},"48":{"start":{"line":48,"column":13},"end":{"line":48,"column":37}},"49":{"start":{"line":49,"column":23},"end":{"line":49,"column":46}},"50":{"start":{"line":50,"column":18},"end":{"line":60,"column":2}},"51":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"52":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"53":{"start":{"line":52,"column":8},"end":{"line":56,"column":10}},"54":{"start":{"line":59,"column":4},"end":{"line":59,"column":35}},"55":{"start":{"line":61,"column":16},"end":{"line":61,"column":30}},"56":{"start":{"line":63,"column":0},"end":{"line":63,"column":34}},"57":{"start":{"line":67,"column":8},"end":{"line":67,"column":55}},"58":{"start":{"line":68,"column":8},"end":{"line":68,"column":23}},"59":{"start":{"line":69,"column":8},"end":{"line":69,"column":27}},"60":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"61":{"start":{"line":71,"column":12},"end":{"line":71,"column":29}},"62":{"start":{"line":74,"column":12},"end":{"line":74,"column":45}},"63":{"start":{"line":76,"column":39},"end":{"line":76,"column":46}},"64":{"start":{"line":77,"column":8},"end":{"line":79,"column":10}},"65":{"start":{"line":80,"column":8},"end":{"line":80,"column":37}},"66":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"67":{"start":{"line":82,"column":12},"end":{"line":82,"column":33}},"68":{"start":{"line":84,"column":8},"end":{"line":84,"column":46}},"69":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"70":{"start":{"line":88,"column":12},"end":{"line":88,"column":51}},"71":{"start":{"line":90,"column":8},"end":{"line":90,"column":29}},"72":{"start":{"line":93,"column":8},"end":{"line":112,"column":11}},"73":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"74":{"start":{"line":95,"column":16},"end":{"line":95,"column":37}},"75":{"start":{"line":99,"column":16},"end":{"line":99,"column":96}},"76":{"start":{"line":101,"column":29},"end":{"line":101,"column":78}},"77":{"start":{"line":102,"column":27},"end":{"line":102,"column":109}},"78":{"start":{"line":103,"column":12},"end":{"line":103,"column":33}},"79":{"start":{"line":104,"column":28},"end":{"line":104,"column":95}},"80":{"start":{"line":105,"column":12},"end":{"line":105,"column":35}},"81":{"start":{"line":106,"column":12},"end":{"line":106,"column":33}},"82":{"start":{"line":107,"column":12},"end":{"line":111,"column":14}},"83":{"start":{"line":115,"column":24},"end":{"line":115,"column":78}},"84":{"start":{"line":116,"column":8},"end":{"line":116,"column":31}},"85":{"start":{"line":117,"column":8},"end":{"line":117,"column":83}},"86":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"87":{"start":{"line":119,"column":8},"end":{"line":122,"column":10}},"88":{"start":{"line":125,"column":8},"end":{"line":136,"column":11}},"89":{"start":{"line":126,"column":29},"end":{"line":126,"column":83}},"90":{"start":{"line":127,"column":27},"end":{"line":127,"column":104}},"91":{"start":{"line":128,"column":12},"end":{"line":128,"column":33}},"92":{"start":{"line":129,"column":28},"end":{"line":129,"column":95}},"93":{"start":{"line":130,"column":12},"end":{"line":130,"column":35}},"94":{"start":{"line":131,"column":12},"end":{"line":135,"column":14}},"95":{"start":{"line":139,"column":8},"end":{"line":139,"column":44}},"96":{"start":{"line":142,"column":8},"end":{"line":152,"column":11}},"97":{"start":{"line":143,"column":33},"end":{"line":148,"column":14}},"98":{"start":{"line":149,"column":27},"end":{"line":149,"column":64}},"99":{"start":{"line":150,"column":23},"end":{"line":150,"column":50}},"100":{"start":{"line":151,"column":12},"end":{"line":151,"column":38}},"101":{"start":{"line":156,"column":8},"end":{"line":200,"column":11}},"102":{"start":{"line":157,"column":24},"end":{"line":159,"column":13}},"103":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"104":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"105":{"start":{"line":162,"column":16},"end":{"line":162,"column":77}},"106":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"107":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"108":{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},"109":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"110":{"start":{"line":169,"column":16},"end":{"line":169,"column":50}},"111":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"112":{"start":{"line":172,"column":16},"end":{"line":172,"column":37}},"113":{"start":{"line":174,"column":12},"end":{"line":174,"column":66}},"114":{"start":{"line":175,"column":12},"end":{"line":180,"column":15}},"115":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"116":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"117":{"start":{"line":183,"column":36},"end":{"line":183,"column":71}},"118":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"119":{"start":{"line":185,"column":39},"end":{"line":190,"column":13}},"120":{"start":{"line":191,"column":12},"end":{"line":191,"column":101}},"121":{"start":{"line":192,"column":54},"end":{"line":192,"column":122}},"122":{"start":{"line":193,"column":30},"end":{"line":197,"column":13}},"123":{"start":{"line":198,"column":12},"end":{"line":198,"column":49}},"124":{"start":{"line":199,"column":12},"end":{"line":199,"column":25}},"125":{"start":{"line":204,"column":8},"end":{"line":269,"column":11}},"126":{"start":{"line":205,"column":40},"end":{"line":205,"column":47}},"127":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"128":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"129":{"start":{"line":208,"column":36},"end":{"line":208,"column":71}},"130":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"131":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"132":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"133":{"start":{"line":212,"column":20},"end":{"line":212,"column":87}},"134":{"start":{"line":214,"column":16},"end":{"line":214,"column":69}},"135":{"start":{"line":216,"column":41},"end":{"line":221,"column":13}},"136":{"start":{"line":222,"column":12},"end":{"line":268,"column":13}},"137":{"start":{"line":223,"column":58},"end":{"line":226,"column":18}},"138":{"start":{"line":227,"column":27},"end":{"line":227,"column":68}},"139":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"140":{"start":{"line":229,"column":33},"end":{"line":236,"column":18}},"141":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"142":{"start":{"line":238,"column":20},"end":{"line":238,"column":53}},"143":{"start":{"line":240,"column":39},"end":{"line":245,"column":18}},"144":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"145":{"start":{"line":247,"column":20},"end":{"line":247,"column":47}},"146":{"start":{"line":249,"column":34},"end":{"line":259,"column":17}},"147":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"148":{"start":{"line":261,"column":20},"end":{"line":261,"column":64}},"149":{"start":{"line":263,"column":16},"end":{"line":263,"column":33}},"150":{"start":{"line":266,"column":16},"end":{"line":267,"column":35}},"151":{"start":{"line":273,"column":8},"end":{"line":273,"column":48}},"152":{"start":{"line":276,"column":8},"end":{"line":276,"column":41}},"153":{"start":{"line":277,"column":8},"end":{"line":277,"column":45}},"154":{"start":{"line":278,"column":8},"end":{"line":278,"column":36}},"155":{"start":{"line":281,"column":8},"end":{"line":287,"column":11}},"156":{"start":{"line":282,"column":40},"end":{"line":282,"column":47}},"157":{"start":{"line":284,"column":34},"end":{"line":284,"column":59}},"158":{"start":{"line":285,"column":37},"end":{"line":285,"column":60}},"159":{"start":{"line":286,"column":12},"end":{"line":286,"column":53}},"160":{"start":{"line":290,"column":33},"end":{"line":290,"column":57}},"161":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"162":{"start":{"line":292,"column":12},"end":{"line":292,"column":55}},"163":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"164":{"start":{"line":295,"column":12},"end":{"line":295,"column":71}},"165":{"start":{"line":298,"column":8},"end":{"line":298,"column":34}},"166":{"start":{"line":301,"column":8},"end":{"line":331,"column":11}},"167":{"start":{"line":302,"column":42},"end":{"line":302,"column":49}},"168":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"169":{"start":{"line":307,"column":29},"end":{"line":307,"column":70}},"170":{"start":{"line":308,"column":31},"end":{"line":308,"column":65}},"171":{"start":{"line":309,"column":31},"end":{"line":309,"column":53}},"172":{"start":{"line":311,"column":16},"end":{"line":311,"column":97}},"173":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"174":{"start":{"line":314,"column":16},"end":{"line":314,"column":76}},"175":{"start":{"line":319,"column":20},"end":{"line":319,"column":160}},"176":{"start":{"line":322,"column":12},"end":{"line":322,"column":55}},"177":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"178":{"start":{"line":324,"column":16},"end":{"line":328,"column":18}},"179":{"start":{"line":330,"column":12},"end":{"line":330,"column":25}},"180":{"start":{"line":334,"column":33},"end":{"line":342,"column":10}},"181":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"182":{"start":{"line":346,"column":12},"end":{"line":346,"column":24}},"183":{"start":{"line":348,"column":8},"end":{"line":348,"column":21}},"184":{"start":{"line":351,"column":25},"end":{"line":351,"column":39}},"185":{"start":{"line":353,"column":22},"end":{"line":353,"column":51}},"186":{"start":{"line":354,"column":8},"end":{"line":354,"column":40}},"187":{"start":{"line":355,"column":8},"end":{"line":355,"column":43}},"188":{"start":{"line":358,"column":8},"end":{"line":373,"column":11}},"189":{"start":{"line":359,"column":12},"end":{"line":372,"column":15}},"190":{"start":{"line":360,"column":16},"end":{"line":371,"column":19}},"191":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"192":{"start":{"line":366,"column":24},"end":{"line":366,"column":36}},"193":{"start":{"line":369,"column":24},"end":{"line":369,"column":47}},"194":{"start":{"line":376,"column":0},"end":{"line":376,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":50,"column":18},"end":{"line":50,"column":19}},"loc":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"line":50},"15":{"name":"(anonymous_15)","decl":{"start":{"line":50,"column":70},"end":{"line":50,"column":71}},"loc":{"start":{"line":50,"column":83},"end":{"line":60,"column":1}},"line":50},"16":{"name":"(anonymous_16)","decl":{"start":{"line":65,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":65,"column":31},"end":{"line":85,"column":5}},"line":65},"17":{"name":"(anonymous_17)","decl":{"start":{"line":86,"column":4},"end":{"line":86,"column":5}},"loc":{"start":{"line":86,"column":18},"end":{"line":91,"column":5}},"line":86},"18":{"name":"(anonymous_18)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":26},"end":{"line":113,"column":5}},"line":92},"19":{"name":"(anonymous_19)","decl":{"start":{"line":93,"column":47},"end":{"line":93,"column":48}},"loc":{"start":{"line":93,"column":60},"end":{"line":112,"column":9}},"line":93},"20":{"name":"(anonymous_20)","decl":{"start":{"line":114,"column":4},"end":{"line":114,"column":5}},"loc":{"start":{"line":114,"column":31},"end":{"line":123,"column":5}},"line":114},"21":{"name":"(anonymous_21)","decl":{"start":{"line":124,"column":4},"end":{"line":124,"column":5}},"loc":{"start":{"line":124,"column":25},"end":{"line":137,"column":5}},"line":124},"22":{"name":"(anonymous_22)","decl":{"start":{"line":125,"column":47},"end":{"line":125,"column":48}},"loc":{"start":{"line":125,"column":60},"end":{"line":136,"column":9}},"line":125},"23":{"name":"(anonymous_23)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":5}},"loc":{"start":{"line":138,"column":12},"end":{"line":140,"column":5}},"line":138},"24":{"name":"(anonymous_24)","decl":{"start":{"line":141,"column":4},"end":{"line":141,"column":5}},"loc":{"start":{"line":141,"column":34},"end":{"line":153,"column":5}},"line":141},"25":{"name":"(anonymous_25)","decl":{"start":{"line":142,"column":47},"end":{"line":142,"column":48}},"loc":{"start":{"line":142,"column":60},"end":{"line":152,"column":9}},"line":142},"26":{"name":"(anonymous_26)","decl":{"start":{"line":154,"column":4},"end":{"line":154,"column":5}},"loc":{"start":{"line":154,"column":25},"end":{"line":201,"column":5}},"line":154},"27":{"name":"(anonymous_27)","decl":{"start":{"line":156,"column":47},"end":{"line":156,"column":48}},"loc":{"start":{"line":156,"column":60},"end":{"line":200,"column":9}},"line":156},"28":{"name":"(anonymous_28)","decl":{"start":{"line":202,"column":4},"end":{"line":202,"column":5}},"loc":{"start":{"line":202,"column":25},"end":{"line":270,"column":5}},"line":202},"29":{"name":"(anonymous_29)","decl":{"start":{"line":204,"column":47},"end":{"line":204,"column":48}},"loc":{"start":{"line":204,"column":60},"end":{"line":269,"column":9}},"line":204},"30":{"name":"(anonymous_30)","decl":{"start":{"line":271,"column":4},"end":{"line":271,"column":5}},"loc":{"start":{"line":271,"column":20},"end":{"line":274,"column":5}},"line":271},"31":{"name":"(anonymous_31)","decl":{"start":{"line":275,"column":4},"end":{"line":275,"column":5}},"loc":{"start":{"line":275,"column":25},"end":{"line":279,"column":5}},"line":275},"32":{"name":"(anonymous_32)","decl":{"start":{"line":280,"column":4},"end":{"line":280,"column":5}},"loc":{"start":{"line":280,"column":30},"end":{"line":288,"column":5}},"line":280},"33":{"name":"(anonymous_33)","decl":{"start":{"line":281,"column":47},"end":{"line":281,"column":48}},"loc":{"start":{"line":281,"column":60},"end":{"line":287,"column":9}},"line":281},"34":{"name":"(anonymous_34)","decl":{"start":{"line":289,"column":4},"end":{"line":289,"column":5}},"loc":{"start":{"line":289,"column":33},"end":{"line":299,"column":5}},"line":289},"35":{"name":"(anonymous_35)","decl":{"start":{"line":300,"column":4},"end":{"line":300,"column":5}},"loc":{"start":{"line":300,"column":18},"end":{"line":332,"column":5}},"line":300},"36":{"name":"(anonymous_36)","decl":{"start":{"line":301,"column":47},"end":{"line":301,"column":48}},"loc":{"start":{"line":301,"column":60},"end":{"line":331,"column":9}},"line":301},"37":{"name":"(anonymous_37)","decl":{"start":{"line":333,"column":4},"end":{"line":333,"column":5}},"loc":{"start":{"line":333,"column":29},"end":{"line":349,"column":5}},"line":333},"38":{"name":"(anonymous_38)","decl":{"start":{"line":350,"column":4},"end":{"line":350,"column":5}},"loc":{"start":{"line":350,"column":31},"end":{"line":356,"column":5}},"line":350},"39":{"name":"(anonymous_39)","decl":{"start":{"line":357,"column":4},"end":{"line":357,"column":5}},"loc":{"start":{"line":357,"column":50},"end":{"line":374,"column":5}},"line":357},"40":{"name":"(anonymous_40)","decl":{"start":{"line":358,"column":47},"end":{"line":358,"column":48}},"loc":{"start":{"line":358,"column":60},"end":{"line":373,"column":9}},"line":358},"41":{"name":"(anonymous_41)","decl":{"start":{"line":359,"column":31},"end":{"line":359,"column":32}},"loc":{"start":{"line":359,"column":52},"end":{"line":372,"column":13}},"line":359},"42":{"name":"(anonymous_42)","decl":{"start":{"line":364,"column":19},"end":{"line":364,"column":20}},"loc":{"start":{"line":364,"column":36},"end":{"line":371,"column":17}},"line":364}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},{"start":{"line":51,"column":4},"end":{"line":57,"column":5}}],"line":51},"25":{"loc":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},{"start":{"line":70,"column":8},"end":{"line":75,"column":9}}],"line":70},"26":{"loc":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},{"start":{"line":81,"column":8},"end":{"line":83,"column":9}}],"line":81},"27":{"loc":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},{"start":{"line":87,"column":8},"end":{"line":89,"column":9}}],"line":87},"28":{"loc":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},{"start":{"line":94,"column":12},"end":{"line":100,"column":13}}],"line":94},"29":{"loc":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"type":"cond-expr","locations":[{"start":{"line":160,"column":40},"end":{"line":160,"column":53}},{"start":{"line":160,"column":56},"end":{"line":160,"column":60}}],"line":160},"30":{"loc":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"type":"if","locations":[{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},{"start":{"line":161,"column":12},"end":{"line":163,"column":13}}],"line":161},"31":{"loc":{"start":{"line":161,"column":16},"end":{"line":161,"column":106}},"type":"binary-expr","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":56}},{"start":{"line":161,"column":60},"end":{"line":161,"column":106}}],"line":161},"32":{"loc":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"type":"cond-expr","locations":[{"start":{"line":164,"column":38},"end":{"line":164,"column":70}},{"start":{"line":164,"column":73},"end":{"line":164,"column":82}}],"line":164},"33":{"loc":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},{"start":{"line":165,"column":12},"end":{"line":167,"column":13}}],"line":165},"34":{"loc":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"type":"if","locations":[{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},{"start":{"line":168,"column":12},"end":{"line":170,"column":13}}],"line":168},"35":{"loc":{"start":{"line":168,"column":16},"end":{"line":168,"column":62}},"type":"binary-expr","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},{"start":{"line":168,"column":38},"end":{"line":168,"column":62}}],"line":168},"36":{"loc":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"type":"if","locations":[{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},{"start":{"line":171,"column":12},"end":{"line":173,"column":13}}],"line":171},"37":{"loc":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"type":"cond-expr","locations":[{"start":{"line":181,"column":42},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":61}}],"line":181},"38":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"type":"cond-expr","locations":[{"start":{"line":182,"column":87},"end":{"line":182,"column":89}},{"start":{"line":182,"column":92},"end":{"line":182,"column":102}}],"line":182},"39":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":84}},"type":"binary-expr","locations":[{"start":{"line":182,"column":32},"end":{"line":182,"column":67}},{"start":{"line":182,"column":71},"end":{"line":182,"column":84}}],"line":182},"40":{"loc":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"type":"cond-expr","locations":[{"start":{"line":184,"column":40},"end":{"line":184,"column":53}},{"start":{"line":184,"column":56},"end":{"line":184,"column":116}}],"line":184},"41":{"loc":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"type":"cond-expr","locations":[{"start":{"line":206,"column":42},"end":{"line":206,"column":56}},{"start":{"line":206,"column":59},"end":{"line":206,"column":61}}],"line":206},"42":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"type":"cond-expr","locations":[{"start":{"line":207,"column":87},"end":{"line":207,"column":89}},{"start":{"line":207,"column":92},"end":{"line":207,"column":102}}],"line":207},"43":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":84}},"type":"binary-expr","locations":[{"start":{"line":207,"column":32},"end":{"line":207,"column":67}},{"start":{"line":207,"column":71},"end":{"line":207,"column":84}}],"line":207},"44":{"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"type":"cond-expr","locations":[{"start":{"line":209,"column":40},"end":{"line":209,"column":53}},{"start":{"line":209,"column":56},"end":{"line":209,"column":116}}],"line":209},"45":{"loc":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"type":"if","locations":[{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},{"start":{"line":210,"column":12},"end":{"line":215,"column":13}}],"line":210},"46":{"loc":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"type":"if","locations":[{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},{"start":{"line":211,"column":16},"end":{"line":213,"column":17}}],"line":211},"47":{"loc":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"type":"cond-expr","locations":[{"start":{"line":228,"column":82},"end":{"line":228,"column":156}},{"start":{"line":228,"column":159},"end":{"line":228,"column":163}}],"line":228},"48":{"loc":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"type":"if","locations":[{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},{"start":{"line":237,"column":16},"end":{"line":239,"column":17}}],"line":237},"49":{"loc":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"type":"if","locations":[{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},{"start":{"line":246,"column":16},"end":{"line":248,"column":17}}],"line":246},"50":{"loc":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"type":"if","locations":[{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},{"start":{"line":260,"column":16},"end":{"line":262,"column":17}}],"line":260},"51":{"loc":{"start":{"line":260,"column":20},"end":{"line":260,"column":88}},"type":"binary-expr","locations":[{"start":{"line":260,"column":20},"end":{"line":260,"column":46}},{"start":{"line":260,"column":50},"end":{"line":260,"column":88}}],"line":260},"52":{"loc":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"type":"if","locations":[{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},{"start":{"line":291,"column":8},"end":{"line":293,"column":9}}],"line":291},"53":{"loc":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"type":"if","locations":[{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},{"start":{"line":294,"column":8},"end":{"line":296,"column":9}}],"line":294},"54":{"loc":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},{"start":{"line":305,"column":12},"end":{"line":321,"column":13}}],"line":305},"55":{"loc":{"start":{"line":305,"column":16},"end":{"line":305,"column":81}},"type":"binary-expr","locations":[{"start":{"line":305,"column":16},"end":{"line":305,"column":49}},{"start":{"line":305,"column":53},"end":{"line":305,"column":81}}],"line":305},"56":{"loc":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},{"start":{"line":313,"column":17},"end":{"line":321,"column":13}}],"line":313},"57":{"loc":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"type":"if","locations":[{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},{"start":{"line":323,"column":12},"end":{"line":329,"column":13}}],"line":323},"58":{"loc":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"type":"if","locations":[{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},{"start":{"line":344,"column":8},"end":{"line":347,"column":9}}],"line":344},"59":{"loc":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"type":"if","locations":[{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},{"start":{"line":365,"column":20},"end":{"line":370,"column":21}}],"line":365}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":";;;;;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AAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,qBAAqB,CAAC,GAAW;QAE/B,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,qBAAqB;QACrB,IAAI,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5C,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,OAAO,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAGrC,CAAC;IAIK,mBAAmB,CAAC,MAAc,EAAE,MAAa,EAAE,QAAa;;YACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,QAAQ,CAAC,SAAS,CAChB;oBACE,MAAM;oBACN,MAAM;oBACN,IAAI,EAAE,QAAQ,CAAC,eAAe;iBAC/B,EACD,CAAC,GAAQ,EAAE,MAAW,EAAE,EAAE;oBACxB,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;qBACxB;gBACH,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAID,kBAAe,2BAA2B,CAAC;AAG3C,gFAAgF","sourcesContent":["\nimport Web3 from \"web3\";\nconst { suites } = require('jsonld-signatures')\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\nconst { JCS } = require('jcs')\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n }))\n\n if (!purposeResult.valid) {\n throw Error(purposeResult)\n }\n\n const returnObj = {\n verified: true,\n results: [\n {\n proof,\n verified,\n verficationMethod: vm,\n purposeResult,\n \n }\n ],\n\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj;\n } catch (error) {\n return { verified: false,\n error: error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"13d29f0635b713ea3db362b6575ad662d48c2e89","contentHash":"3746ac2e6c9f63cb4b1bb696c2b62e1dac164742816df4f754b75960707bf1a8"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"403682b59f606ef0e156c46bc50aa72495e52e83db4cb627ea22402c19e3116e"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":16},"end":{"line":5,"column":30}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9B,4BAA4B;AAE5B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAA;AAKjC,MAAM,eAAe;IAArB;QACY,SAAI,GAAwB,IAAI,GAAG,EAAkB,CAAA;QAC7D,gBAAW,GAAQ,EAAE,CAAA;IAsHzB,CAAC;IArHW,GAAG,CAAC,KAAU,EAAE,IAAY,EAAE,WAAgB;QAClD,IAAI,GAAG,GAAQ,EAAE,CAAA;QACjB,IAAI,KAAK,GAAG,EAAE,CAAA;QACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAErB,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;YAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBACtC,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;gBAE9B,IAAI,IAAI,IAAI,QAAQ,EAAE;oBAClB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;wBAC3B,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;4BACtE,OAAO,OAAO,KAAK,IAAI,QAAQ,CAAA;wBACnC,CAAC,CAAC,CAAC;wBAEH,MAAM,MAAM,G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,GAAG,GAAQ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QAEnC,YAAY;QACZ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAIrC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CAEJ;AAIQ,0CAAe","sourcesContent":["// https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation\n\n\nconst { JCS } = require('jcs')\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ecd53451cb8a4b59f3d5c6a0d0f18152ced7e949","contentHash":"122fdc729852d405c995336375071f0aed5a7f82811606d35cd4898eca473c20"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":21,"column":15},"end":{"line":21,"column":32}},"22":{"start":{"line":22,"column":25},"end":{"line":22,"column":70}},"23":{"start":{"line":23,"column":33},"end":{"line":23,"column":85}},"24":{"start":{"line":24,"column":48},"end":{"line":24,"column":115}},"25":{"start":{"line":27,"column":27},"end":{"line":27,"column":56}},"26":{"start":{"line":28,"column":17},"end":{"line":37,"column":2}},"27":{"start":{"line":38,"column":0},"end":{"line":38,"column":28}},"28":{"start":{"line":39,"column":18},"end":{"line":48,"column":2}},"29":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"30":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"31":{"start":{"line":41,"column":8},"end":{"line":45,"column":10}},"32":{"start":{"line":47,"column":4},"end":{"line":47,"column":35}},"33":{"start":{"line":49,"column":0},"end":{"line":49,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":39,"column":18},"end":{"line":39,"column":19}},"loc":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"line":39},"9":{"name":"(anonymous_9)","decl":{"start":{"line":39,"column":70},"end":{"line":39,"column":71}},"loc":{"start":{"line":39,"column":83},"end":{"line":48,"column":1}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},{"start":{"line":40,"column":4},"end":{"line":46,"column":5}}],"line":40}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":8,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":8,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,8],"7":[8,8],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;AACzD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\nconst jsonld = require('jsonld');\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoaders.node();\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"01c391d5ad03546c4b7858d181b4e60185df2808","contentHash":"6d6590c771aae1a9faef90c6be91b6da8ebdfa7f9339166779e34eafb5cc32ee"}} \ No newline at end of file diff --git a/.nyc_output/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json b/.nyc_output/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json new file mode 100644 index 0000000..605e8fe --- /dev/null +++ b/.nyc_output/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json @@ -0,0 +1 @@ +{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"a71243928bd34eeb8bb59a49700c5a6a47e44fd86582e3002009cbf00fac3d00"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":40,"column":17},"end":{"line":40,"column":56}},"41":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"42":{"start":{"line":43,"column":17},"end":{"line":43,"column":51}},"43":{"start":{"line":44,"column":27},"end":{"line":44,"column":58}},"44":{"start":{"line":45,"column":17},"end":{"line":45,"column":34}},"45":{"start":{"line":46,"column":14},"end":{"line":46,"column":44}},"46":{"start":{"line":47,"column":16},"end":{"line":47,"column":35}},"47":{"start":{"line":48,"column":22},"end":{"line":48,"column":57}},"48":{"start":{"line":49,"column":13},"end":{"line":49,"column":37}},"49":{"start":{"line":50,"column":23},"end":{"line":50,"column":46}},"50":{"start":{"line":51,"column":18},"end":{"line":61,"column":2}},"51":{"start":{"line":51,"column":36},"end":{"line":61,"column":2}},"52":{"start":{"line":52,"column":4},"end":{"line":58,"column":5}},"53":{"start":{"line":53,"column":8},"end":{"line":57,"column":10}},"54":{"start":{"line":60,"column":4},"end":{"line":60,"column":35}},"55":{"start":{"line":62,"column":14},"end":{"line":62,"column":28}},"56":{"start":{"line":64,"column":0},"end":{"line":64,"column":40}},"57":{"start":{"line":68,"column":8},"end":{"line":68,"column":55}},"58":{"start":{"line":69,"column":8},"end":{"line":69,"column":23}},"59":{"start":{"line":70,"column":8},"end":{"line":70,"column":27}},"60":{"start":{"line":71,"column":8},"end":{"line":76,"column":9}},"61":{"start":{"line":72,"column":12},"end":{"line":72,"column":29}},"62":{"start":{"line":75,"column":12},"end":{"line":75,"column":45}},"63":{"start":{"line":77,"column":39},"end":{"line":77,"column":46}},"64":{"start":{"line":78,"column":8},"end":{"line":80,"column":10}},"65":{"start":{"line":81,"column":8},"end":{"line":81,"column":37}},"66":{"start":{"line":82,"column":8},"end":{"line":84,"column":9}},"67":{"start":{"line":83,"column":12},"end":{"line":83,"column":33}},"68":{"start":{"line":85,"column":8},"end":{"line":85,"column":46}},"69":{"start":{"line":88,"column":8},"end":{"line":90,"column":9}},"70":{"start":{"line":89,"column":12},"end":{"line":89,"column":51}},"71":{"start":{"line":91,"column":8},"end":{"line":91,"column":29}},"72":{"start":{"line":94,"column":8},"end":{"line":113,"column":11}},"73":{"start":{"line":95,"column":12},"end":{"line":101,"column":13}},"74":{"start":{"line":96,"column":16},"end":{"line":96,"column":37}},"75":{"start":{"line":100,"column":16},"end":{"line":100,"column":96}},"76":{"start":{"line":102,"column":29},"end":{"line":102,"column":78}},"77":{"start":{"line":103,"column":27},"end":{"line":103,"column":109}},"78":{"start":{"line":104,"column":12},"end":{"line":104,"column":33}},"79":{"start":{"line":105,"column":28},"end":{"line":105,"column":95}},"80":{"start":{"line":106,"column":12},"end":{"line":106,"column":35}},"81":{"start":{"line":107,"column":12},"end":{"line":107,"column":33}},"82":{"start":{"line":108,"column":12},"end":{"line":112,"column":14}},"83":{"start":{"line":116,"column":24},"end":{"line":116,"column":78}},"84":{"start":{"line":117,"column":8},"end":{"line":117,"column":31}},"85":{"start":{"line":118,"column":8},"end":{"line":118,"column":83}},"86":{"start":{"line":119,"column":8},"end":{"line":119,"column":34}},"87":{"start":{"line":120,"column":8},"end":{"line":123,"column":10}},"88":{"start":{"line":126,"column":8},"end":{"line":137,"column":11}},"89":{"start":{"line":127,"column":29},"end":{"line":127,"column":83}},"90":{"start":{"line":128,"column":27},"end":{"line":128,"column":104}},"91":{"start":{"line":129,"column":12},"end":{"line":129,"column":33}},"92":{"start":{"line":130,"column":28},"end":{"line":130,"column":95}},"93":{"start":{"line":131,"column":12},"end":{"line":131,"column":35}},"94":{"start":{"line":132,"column":12},"end":{"line":136,"column":14}},"95":{"start":{"line":140,"column":8},"end":{"line":140,"column":44}},"96":{"start":{"line":143,"column":8},"end":{"line":153,"column":11}},"97":{"start":{"line":144,"column":33},"end":{"line":149,"column":14}},"98":{"start":{"line":150,"column":27},"end":{"line":150,"column":64}},"99":{"start":{"line":151,"column":23},"end":{"line":151,"column":50}},"100":{"start":{"line":152,"column":12},"end":{"line":152,"column":38}},"101":{"start":{"line":157,"column":8},"end":{"line":202,"column":11}},"102":{"start":{"line":158,"column":24},"end":{"line":161,"column":13}},"103":{"start":{"line":162,"column":24},"end":{"line":162,"column":60}},"104":{"start":{"line":163,"column":12},"end":{"line":165,"column":13}},"105":{"start":{"line":164,"column":16},"end":{"line":164,"column":77}},"106":{"start":{"line":166,"column":23},"end":{"line":166,"column":82}},"107":{"start":{"line":167,"column":12},"end":{"line":169,"column":13}},"108":{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},"109":{"start":{"line":170,"column":12},"end":{"line":172,"column":13}},"110":{"start":{"line":171,"column":16},"end":{"line":171,"column":50}},"111":{"start":{"line":173,"column":12},"end":{"line":175,"column":13}},"112":{"start":{"line":174,"column":16},"end":{"line":174,"column":37}},"113":{"start":{"line":176,"column":12},"end":{"line":176,"column":66}},"114":{"start":{"line":177,"column":12},"end":{"line":182,"column":15}},"115":{"start":{"line":183,"column":25},"end":{"line":183,"column":61}},"116":{"start":{"line":184,"column":32},"end":{"line":184,"column":102}},"117":{"start":{"line":185,"column":36},"end":{"line":185,"column":71}},"118":{"start":{"line":186,"column":24},"end":{"line":186,"column":116}},"119":{"start":{"line":187,"column":39},"end":{"line":192,"column":13}},"120":{"start":{"line":193,"column":12},"end":{"line":193,"column":101}},"121":{"start":{"line":194,"column":54},"end":{"line":194,"column":122}},"122":{"start":{"line":195,"column":30},"end":{"line":199,"column":13}},"123":{"start":{"line":200,"column":12},"end":{"line":200,"column":49}},"124":{"start":{"line":201,"column":12},"end":{"line":201,"column":25}},"125":{"start":{"line":206,"column":8},"end":{"line":275,"column":11}},"126":{"start":{"line":207,"column":40},"end":{"line":207,"column":47}},"127":{"start":{"line":208,"column":25},"end":{"line":208,"column":61}},"128":{"start":{"line":209,"column":32},"end":{"line":209,"column":102}},"129":{"start":{"line":210,"column":36},"end":{"line":210,"column":71}},"130":{"start":{"line":211,"column":24},"end":{"line":211,"column":116}},"131":{"start":{"line":212,"column":12},"end":{"line":217,"column":13}},"132":{"start":{"line":213,"column":16},"end":{"line":215,"column":17}},"133":{"start":{"line":214,"column":20},"end":{"line":214,"column":87}},"134":{"start":{"line":216,"column":16},"end":{"line":216,"column":69}},"135":{"start":{"line":218,"column":41},"end":{"line":223,"column":13}},"136":{"start":{"line":224,"column":12},"end":{"line":274,"column":13}},"137":{"start":{"line":225,"column":58},"end":{"line":228,"column":18}},"138":{"start":{"line":229,"column":27},"end":{"line":229,"column":68}},"139":{"start":{"line":230,"column":53},"end":{"line":230,"column":163}},"140":{"start":{"line":231,"column":33},"end":{"line":238,"column":18}},"141":{"start":{"line":239,"column":16},"end":{"line":241,"column":17}},"142":{"start":{"line":240,"column":20},"end":{"line":240,"column":53}},"143":{"start":{"line":242,"column":39},"end":{"line":247,"column":18}},"144":{"start":{"line":248,"column":16},"end":{"line":250,"column":17}},"145":{"start":{"line":249,"column":20},"end":{"line":249,"column":47}},"146":{"start":{"line":251,"column":34},"end":{"line":265,"column":17}},"147":{"start":{"line":266,"column":16},"end":{"line":268,"column":17}},"148":{"start":{"line":267,"column":20},"end":{"line":267,"column":64}},"149":{"start":{"line":269,"column":16},"end":{"line":269,"column":33}},"150":{"start":{"line":272,"column":16},"end":{"line":273,"column":35}},"151":{"start":{"line":279,"column":8},"end":{"line":279,"column":48}},"152":{"start":{"line":282,"column":8},"end":{"line":282,"column":41}},"153":{"start":{"line":283,"column":8},"end":{"line":283,"column":45}},"154":{"start":{"line":284,"column":8},"end":{"line":284,"column":36}},"155":{"start":{"line":287,"column":8},"end":{"line":293,"column":11}},"156":{"start":{"line":288,"column":40},"end":{"line":288,"column":47}},"157":{"start":{"line":290,"column":34},"end":{"line":290,"column":59}},"158":{"start":{"line":291,"column":37},"end":{"line":291,"column":60}},"159":{"start":{"line":292,"column":12},"end":{"line":292,"column":53}},"160":{"start":{"line":296,"column":33},"end":{"line":296,"column":57}},"161":{"start":{"line":297,"column":8},"end":{"line":299,"column":9}},"162":{"start":{"line":298,"column":12},"end":{"line":298,"column":55}},"163":{"start":{"line":300,"column":8},"end":{"line":302,"column":9}},"164":{"start":{"line":301,"column":12},"end":{"line":301,"column":71}},"165":{"start":{"line":304,"column":8},"end":{"line":304,"column":34}},"166":{"start":{"line":307,"column":8},"end":{"line":337,"column":11}},"167":{"start":{"line":308,"column":42},"end":{"line":308,"column":49}},"168":{"start":{"line":311,"column":12},"end":{"line":327,"column":13}},"169":{"start":{"line":313,"column":29},"end":{"line":313,"column":70}},"170":{"start":{"line":314,"column":31},"end":{"line":314,"column":65}},"171":{"start":{"line":315,"column":31},"end":{"line":315,"column":53}},"172":{"start":{"line":317,"column":16},"end":{"line":317,"column":97}},"173":{"start":{"line":319,"column":17},"end":{"line":327,"column":13}},"174":{"start":{"line":320,"column":16},"end":{"line":320,"column":76}},"175":{"start":{"line":325,"column":20},"end":{"line":325,"column":160}},"176":{"start":{"line":328,"column":12},"end":{"line":328,"column":55}},"177":{"start":{"line":329,"column":12},"end":{"line":335,"column":13}},"178":{"start":{"line":330,"column":16},"end":{"line":334,"column":18}},"179":{"start":{"line":336,"column":12},"end":{"line":336,"column":25}},"180":{"start":{"line":340,"column":33},"end":{"line":348,"column":10}},"181":{"start":{"line":350,"column":8},"end":{"line":353,"column":9}},"182":{"start":{"line":352,"column":12},"end":{"line":352,"column":24}},"183":{"start":{"line":354,"column":8},"end":{"line":354,"column":21}},"184":{"start":{"line":357,"column":25},"end":{"line":357,"column":39}},"185":{"start":{"line":359,"column":22},"end":{"line":359,"column":51}},"186":{"start":{"line":360,"column":8},"end":{"line":360,"column":40}},"187":{"start":{"line":361,"column":8},"end":{"line":361,"column":43}},"188":{"start":{"line":364,"column":8},"end":{"line":379,"column":11}},"189":{"start":{"line":365,"column":12},"end":{"line":378,"column":15}},"190":{"start":{"line":366,"column":16},"end":{"line":377,"column":19}},"191":{"start":{"line":371,"column":20},"end":{"line":376,"column":21}},"192":{"start":{"line":372,"column":24},"end":{"line":372,"column":36}},"193":{"start":{"line":375,"column":24},"end":{"line":375,"column":47}},"194":{"start":{"line":382,"column":0},"end":{"line":382,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":51,"column":18},"end":{"line":51,"column":19}},"loc":{"start":{"line":51,"column":36},"end":{"line":61,"column":2}},"line":51},"15":{"name":"(anonymous_15)","decl":{"start":{"line":51,"column":70},"end":{"line":51,"column":71}},"loc":{"start":{"line":51,"column":83},"end":{"line":61,"column":1}},"line":51},"16":{"name":"(anonymous_16)","decl":{"start":{"line":66,"column":4},"end":{"line":66,"column":5}},"loc":{"start":{"line":66,"column":31},"end":{"line":86,"column":5}},"line":66},"17":{"name":"(anonymous_17)","decl":{"start":{"line":87,"column":4},"end":{"line":87,"column":5}},"loc":{"start":{"line":87,"column":18},"end":{"line":92,"column":5}},"line":87},"18":{"name":"(anonymous_18)","decl":{"start":{"line":93,"column":4},"end":{"line":93,"column":5}},"loc":{"start":{"line":93,"column":26},"end":{"line":114,"column":5}},"line":93},"19":{"name":"(anonymous_19)","decl":{"start":{"line":94,"column":47},"end":{"line":94,"column":48}},"loc":{"start":{"line":94,"column":60},"end":{"line":113,"column":9}},"line":94},"20":{"name":"(anonymous_20)","decl":{"start":{"line":115,"column":4},"end":{"line":115,"column":5}},"loc":{"start":{"line":115,"column":31},"end":{"line":124,"column":5}},"line":115},"21":{"name":"(anonymous_21)","decl":{"start":{"line":125,"column":4},"end":{"line":125,"column":5}},"loc":{"start":{"line":125,"column":25},"end":{"line":138,"column":5}},"line":125},"22":{"name":"(anonymous_22)","decl":{"start":{"line":126,"column":47},"end":{"line":126,"column":48}},"loc":{"start":{"line":126,"column":60},"end":{"line":137,"column":9}},"line":126},"23":{"name":"(anonymous_23)","decl":{"start":{"line":139,"column":4},"end":{"line":139,"column":5}},"loc":{"start":{"line":139,"column":12},"end":{"line":141,"column":5}},"line":139},"24":{"name":"(anonymous_24)","decl":{"start":{"line":142,"column":4},"end":{"line":142,"column":5}},"loc":{"start":{"line":142,"column":34},"end":{"line":154,"column":5}},"line":142},"25":{"name":"(anonymous_25)","decl":{"start":{"line":143,"column":47},"end":{"line":143,"column":48}},"loc":{"start":{"line":143,"column":60},"end":{"line":153,"column":9}},"line":143},"26":{"name":"(anonymous_26)","decl":{"start":{"line":155,"column":4},"end":{"line":155,"column":5}},"loc":{"start":{"line":155,"column":25},"end":{"line":203,"column":5}},"line":155},"27":{"name":"(anonymous_27)","decl":{"start":{"line":157,"column":47},"end":{"line":157,"column":48}},"loc":{"start":{"line":157,"column":60},"end":{"line":202,"column":9}},"line":157},"28":{"name":"(anonymous_28)","decl":{"start":{"line":204,"column":4},"end":{"line":204,"column":5}},"loc":{"start":{"line":204,"column":25},"end":{"line":276,"column":5}},"line":204},"29":{"name":"(anonymous_29)","decl":{"start":{"line":206,"column":47},"end":{"line":206,"column":48}},"loc":{"start":{"line":206,"column":60},"end":{"line":275,"column":9}},"line":206},"30":{"name":"(anonymous_30)","decl":{"start":{"line":277,"column":4},"end":{"line":277,"column":5}},"loc":{"start":{"line":277,"column":20},"end":{"line":280,"column":5}},"line":277},"31":{"name":"(anonymous_31)","decl":{"start":{"line":281,"column":4},"end":{"line":281,"column":5}},"loc":{"start":{"line":281,"column":25},"end":{"line":285,"column":5}},"line":281},"32":{"name":"(anonymous_32)","decl":{"start":{"line":286,"column":4},"end":{"line":286,"column":5}},"loc":{"start":{"line":286,"column":30},"end":{"line":294,"column":5}},"line":286},"33":{"name":"(anonymous_33)","decl":{"start":{"line":287,"column":47},"end":{"line":287,"column":48}},"loc":{"start":{"line":287,"column":60},"end":{"line":293,"column":9}},"line":287},"34":{"name":"(anonymous_34)","decl":{"start":{"line":295,"column":4},"end":{"line":295,"column":5}},"loc":{"start":{"line":295,"column":33},"end":{"line":305,"column":5}},"line":295},"35":{"name":"(anonymous_35)","decl":{"start":{"line":306,"column":4},"end":{"line":306,"column":5}},"loc":{"start":{"line":306,"column":18},"end":{"line":338,"column":5}},"line":306},"36":{"name":"(anonymous_36)","decl":{"start":{"line":307,"column":47},"end":{"line":307,"column":48}},"loc":{"start":{"line":307,"column":60},"end":{"line":337,"column":9}},"line":307},"37":{"name":"(anonymous_37)","decl":{"start":{"line":339,"column":4},"end":{"line":339,"column":5}},"loc":{"start":{"line":339,"column":29},"end":{"line":355,"column":5}},"line":339},"38":{"name":"(anonymous_38)","decl":{"start":{"line":356,"column":4},"end":{"line":356,"column":5}},"loc":{"start":{"line":356,"column":31},"end":{"line":362,"column":5}},"line":356},"39":{"name":"(anonymous_39)","decl":{"start":{"line":363,"column":4},"end":{"line":363,"column":5}},"loc":{"start":{"line":363,"column":50},"end":{"line":380,"column":5}},"line":363},"40":{"name":"(anonymous_40)","decl":{"start":{"line":364,"column":47},"end":{"line":364,"column":48}},"loc":{"start":{"line":364,"column":60},"end":{"line":379,"column":9}},"line":364},"41":{"name":"(anonymous_41)","decl":{"start":{"line":365,"column":31},"end":{"line":365,"column":32}},"loc":{"start":{"line":365,"column":52},"end":{"line":378,"column":13}},"line":365},"42":{"name":"(anonymous_42)","decl":{"start":{"line":370,"column":19},"end":{"line":370,"column":20}},"loc":{"start":{"line":370,"column":36},"end":{"line":377,"column":17}},"line":370}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":52,"column":4},"end":{"line":58,"column":5}},"type":"if","locations":[{"start":{"line":52,"column":4},"end":{"line":58,"column":5}},{"start":{"line":52,"column":4},"end":{"line":58,"column":5}}],"line":52},"25":{"loc":{"start":{"line":71,"column":8},"end":{"line":76,"column":9}},"type":"if","locations":[{"start":{"line":71,"column":8},"end":{"line":76,"column":9}},{"start":{"line":71,"column":8},"end":{"line":76,"column":9}}],"line":71},"26":{"loc":{"start":{"line":82,"column":8},"end":{"line":84,"column":9}},"type":"if","locations":[{"start":{"line":82,"column":8},"end":{"line":84,"column":9}},{"start":{"line":82,"column":8},"end":{"line":84,"column":9}}],"line":82},"27":{"loc":{"start":{"line":88,"column":8},"end":{"line":90,"column":9}},"type":"if","locations":[{"start":{"line":88,"column":8},"end":{"line":90,"column":9}},{"start":{"line":88,"column":8},"end":{"line":90,"column":9}}],"line":88},"28":{"loc":{"start":{"line":95,"column":12},"end":{"line":101,"column":13}},"type":"if","locations":[{"start":{"line":95,"column":12},"end":{"line":101,"column":13}},{"start":{"line":95,"column":12},"end":{"line":101,"column":13}}],"line":95},"29":{"loc":{"start":{"line":162,"column":24},"end":{"line":162,"column":60}},"type":"cond-expr","locations":[{"start":{"line":162,"column":40},"end":{"line":162,"column":53}},{"start":{"line":162,"column":56},"end":{"line":162,"column":60}}],"line":162},"30":{"loc":{"start":{"line":163,"column":12},"end":{"line":165,"column":13}},"type":"if","locations":[{"start":{"line":163,"column":12},"end":{"line":165,"column":13}},{"start":{"line":163,"column":12},"end":{"line":165,"column":13}}],"line":163},"31":{"loc":{"start":{"line":163,"column":16},"end":{"line":163,"column":106}},"type":"binary-expr","locations":[{"start":{"line":163,"column":16},"end":{"line":163,"column":56}},{"start":{"line":163,"column":60},"end":{"line":163,"column":106}}],"line":163},"32":{"loc":{"start":{"line":166,"column":23},"end":{"line":166,"column":82}},"type":"cond-expr","locations":[{"start":{"line":166,"column":38},"end":{"line":166,"column":70}},{"start":{"line":166,"column":73},"end":{"line":166,"column":82}}],"line":166},"33":{"loc":{"start":{"line":167,"column":12},"end":{"line":169,"column":13}},"type":"if","locations":[{"start":{"line":167,"column":12},"end":{"line":169,"column":13}},{"start":{"line":167,"column":12},"end":{"line":169,"column":13}}],"line":167},"34":{"loc":{"start":{"line":170,"column":12},"end":{"line":172,"column":13}},"type":"if","locations":[{"start":{"line":170,"column":12},"end":{"line":172,"column":13}},{"start":{"line":170,"column":12},"end":{"line":172,"column":13}}],"line":170},"35":{"loc":{"start":{"line":170,"column":16},"end":{"line":170,"column":62}},"type":"binary-expr","locations":[{"start":{"line":170,"column":16},"end":{"line":170,"column":34}},{"start":{"line":170,"column":38},"end":{"line":170,"column":62}}],"line":170},"36":{"loc":{"start":{"line":173,"column":12},"end":{"line":175,"column":13}},"type":"if","locations":[{"start":{"line":173,"column":12},"end":{"line":175,"column":13}},{"start":{"line":173,"column":12},"end":{"line":175,"column":13}}],"line":173},"37":{"loc":{"start":{"line":183,"column":25},"end":{"line":183,"column":61}},"type":"cond-expr","locations":[{"start":{"line":183,"column":42},"end":{"line":183,"column":56}},{"start":{"line":183,"column":59},"end":{"line":183,"column":61}}],"line":183},"38":{"loc":{"start":{"line":184,"column":32},"end":{"line":184,"column":102}},"type":"cond-expr","locations":[{"start":{"line":184,"column":87},"end":{"line":184,"column":89}},{"start":{"line":184,"column":92},"end":{"line":184,"column":102}}],"line":184},"39":{"loc":{"start":{"line":184,"column":32},"end":{"line":184,"column":84}},"type":"binary-expr","locations":[{"start":{"line":184,"column":32},"end":{"line":184,"column":67}},{"start":{"line":184,"column":71},"end":{"line":184,"column":84}}],"line":184},"40":{"loc":{"start":{"line":186,"column":24},"end":{"line":186,"column":116}},"type":"cond-expr","locations":[{"start":{"line":186,"column":40},"end":{"line":186,"column":53}},{"start":{"line":186,"column":56},"end":{"line":186,"column":116}}],"line":186},"41":{"loc":{"start":{"line":208,"column":25},"end":{"line":208,"column":61}},"type":"cond-expr","locations":[{"start":{"line":208,"column":42},"end":{"line":208,"column":56}},{"start":{"line":208,"column":59},"end":{"line":208,"column":61}}],"line":208},"42":{"loc":{"start":{"line":209,"column":32},"end":{"line":209,"column":102}},"type":"cond-expr","locations":[{"start":{"line":209,"column":87},"end":{"line":209,"column":89}},{"start":{"line":209,"column":92},"end":{"line":209,"column":102}}],"line":209},"43":{"loc":{"start":{"line":209,"column":32},"end":{"line":209,"column":84}},"type":"binary-expr","locations":[{"start":{"line":209,"column":32},"end":{"line":209,"column":67}},{"start":{"line":209,"column":71},"end":{"line":209,"column":84}}],"line":209},"44":{"loc":{"start":{"line":211,"column":24},"end":{"line":211,"column":116}},"type":"cond-expr","locations":[{"start":{"line":211,"column":40},"end":{"line":211,"column":53}},{"start":{"line":211,"column":56},"end":{"line":211,"column":116}}],"line":211},"45":{"loc":{"start":{"line":212,"column":12},"end":{"line":217,"column":13}},"type":"if","locations":[{"start":{"line":212,"column":12},"end":{"line":217,"column":13}},{"start":{"line":212,"column":12},"end":{"line":217,"column":13}}],"line":212},"46":{"loc":{"start":{"line":213,"column":16},"end":{"line":215,"column":17}},"type":"if","locations":[{"start":{"line":213,"column":16},"end":{"line":215,"column":17}},{"start":{"line":213,"column":16},"end":{"line":215,"column":17}}],"line":213},"47":{"loc":{"start":{"line":230,"column":53},"end":{"line":230,"column":163}},"type":"cond-expr","locations":[{"start":{"line":230,"column":82},"end":{"line":230,"column":156}},{"start":{"line":230,"column":159},"end":{"line":230,"column":163}}],"line":230},"48":{"loc":{"start":{"line":239,"column":16},"end":{"line":241,"column":17}},"type":"if","locations":[{"start":{"line":239,"column":16},"end":{"line":241,"column":17}},{"start":{"line":239,"column":16},"end":{"line":241,"column":17}}],"line":239},"49":{"loc":{"start":{"line":248,"column":16},"end":{"line":250,"column":17}},"type":"if","locations":[{"start":{"line":248,"column":16},"end":{"line":250,"column":17}},{"start":{"line":248,"column":16},"end":{"line":250,"column":17}}],"line":248},"50":{"loc":{"start":{"line":266,"column":16},"end":{"line":268,"column":17}},"type":"if","locations":[{"start":{"line":266,"column":16},"end":{"line":268,"column":17}},{"start":{"line":266,"column":16},"end":{"line":268,"column":17}}],"line":266},"51":{"loc":{"start":{"line":266,"column":20},"end":{"line":266,"column":88}},"type":"binary-expr","locations":[{"start":{"line":266,"column":20},"end":{"line":266,"column":46}},{"start":{"line":266,"column":50},"end":{"line":266,"column":88}}],"line":266},"52":{"loc":{"start":{"line":297,"column":8},"end":{"line":299,"column":9}},"type":"if","locations":[{"start":{"line":297,"column":8},"end":{"line":299,"column":9}},{"start":{"line":297,"column":8},"end":{"line":299,"column":9}}],"line":297},"53":{"loc":{"start":{"line":300,"column":8},"end":{"line":302,"column":9}},"type":"if","locations":[{"start":{"line":300,"column":8},"end":{"line":302,"column":9}},{"start":{"line":300,"column":8},"end":{"line":302,"column":9}}],"line":300},"54":{"loc":{"start":{"line":311,"column":12},"end":{"line":327,"column":13}},"type":"if","locations":[{"start":{"line":311,"column":12},"end":{"line":327,"column":13}},{"start":{"line":311,"column":12},"end":{"line":327,"column":13}}],"line":311},"55":{"loc":{"start":{"line":311,"column":16},"end":{"line":311,"column":81}},"type":"binary-expr","locations":[{"start":{"line":311,"column":16},"end":{"line":311,"column":49}},{"start":{"line":311,"column":53},"end":{"line":311,"column":81}}],"line":311},"56":{"loc":{"start":{"line":319,"column":17},"end":{"line":327,"column":13}},"type":"if","locations":[{"start":{"line":319,"column":17},"end":{"line":327,"column":13}},{"start":{"line":319,"column":17},"end":{"line":327,"column":13}}],"line":319},"57":{"loc":{"start":{"line":329,"column":12},"end":{"line":335,"column":13}},"type":"if","locations":[{"start":{"line":329,"column":12},"end":{"line":335,"column":13}},{"start":{"line":329,"column":12},"end":{"line":335,"column":13}}],"line":329},"58":{"loc":{"start":{"line":350,"column":8},"end":{"line":353,"column":9}},"type":"if","locations":[{"start":{"line":350,"column":8},"end":{"line":353,"column":9}},{"start":{"line":350,"column":8},"end":{"line":353,"column":9}}],"line":350},"59":{"loc":{"start":{"line":371,"column":20},"end":{"line":376,"column":21}},"type":"if","locations":[{"start":{"line":371,"column":20},"end":{"line":376,"column":21}},{"start":{"line":371,"column":20},"end":{"line":376,"column":21}}],"line":371}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAwB;AACxB,YAAY;AAEZ,yDAAqD;AAKrD,YAAY;AACZ,oDAA2B;AAE3B,oDAA4B;AAC5B,MAAM,kBAAkB,GAAG,gBAAM,CAAC,cAAc,CAAC;AAGjD,mCAAiH;AAGjH,6CAA+B;AAE/B,oCAAmC;AACnC,0DAA2D;AAI3D,sCAAwC;AACxC,+CAA0E;AAE1E,MAAM,SAAS,GAAG,CAAO,GAAQ,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,aAAQ,EAAE;QACnB,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,aAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACnE,CAAC;KACH;IACD,kCAAkC;IAElC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC,CAAA,CAAA;AAKD,6BAAuB;AAIvB,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,SAAG,CAAC,aAAa,CAAA;AAIjC,MAAM,2BAA4B,SAAQ,eAAM,CAAC,mBAAmB;IAalE,YAAY,OAA8B,EAAE,IAAW;QACrD,2CAA2C;QAC3C,KAAK,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,IAAI,EA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port Web3 from \"web3\";\n//@ts-ignore\n\nimport {suites } from 'jsonld-signatures/lib/suites'\n\n// import {suites} from 'jsonld-signatures'\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\n\nimport {JCS} from 'jcs'\n\n\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n // @ts-ignore\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n }))\n\n if (!purposeResult.valid) {\n throw Error(purposeResult)\n }\n\n const returnObj = {\n verified: true,\n results: [\n {\n proof,\n verified,\n verficationMethod: vm,\n purposeResult: {valid:purposeResult.valid},\n \n }\n ],\n statusResult: {\n canonicalizationHashVerified,\n signatureVerified: verified,\n }\n\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj;\n } catch (error) {\n return { verified: false,\n error: error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"2ce307ed4488b3297e8f4c925e2e0d55bb16a2f7","contentHash":"cdeaf9f53e78be36bd82cf9cf7fe9c19572214c854af774282fdea6c40606dda"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"97a7f2b272566ccb11018a61e6aa132e95dc517a39cafc75011c28cebbbe292c"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":14},"end":{"line":5,"column":28}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":40}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,6BAAyB;AACzB,4BAA4B;AAE5B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,SAAG,CAAC,aAAa,CAAA;AAKjC,MAAM,eAAe;IAArB;QACY,SAAI,GAAwB,IAAI,GAAG,EAAkB,CAAA;QAC7D,gBAAW,GAAQ,EAAE,CAAA;IAsHzB,CAAC;IArHW,GAAG,CAAC,KAAU,EAAE,IAAY,EAAE,WAAgB;QAClD,IAAI,GAAG,GAAQ,EAAE,CAAA;QACjB,IAAI,KAAK,GAAG,EAAE,CAAA;QACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAErB,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;YAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KA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AAA;SACL;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;IACxE,CAAC;IAEM,aAAa,CAAC,KAAU,EAAE,WAAoB;QAGjD,IAAI,WAAW,IAAI,SAAS,EAAE;YAC1B,WAAW,GAAG,UAAU,CAAA;SAC3B;QACD,gHAAgH;QAGhH,8BAA8B;QAC9B,YAAY;QACZ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;QACxC,IAAI,GAAG,GAAQ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QAEnC,YAAY;QACZ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAIrC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CAEJ;AAIQ,0CAAe","sourcesContent":["// https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation\n\n\nimport { JCS } from \"jcs\"\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"2fb46eda6e702169fe40ed7d5a3ce18962283938","contentHash":"d51665e82536f973a5796f1c8f2900706d31c570829cdfe0f569a18073643835"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":22,"column":17},"end":{"line":22,"column":51}},"22":{"start":{"line":23,"column":25},"end":{"line":23,"column":70}},"23":{"start":{"line":24,"column":33},"end":{"line":24,"column":85}},"24":{"start":{"line":25,"column":48},"end":{"line":25,"column":115}},"25":{"start":{"line":28,"column":27},"end":{"line":28,"column":58}},"26":{"start":{"line":29,"column":17},"end":{"line":38,"column":2}},"27":{"start":{"line":39,"column":0},"end":{"line":39,"column":28}},"28":{"start":{"line":40,"column":18},"end":{"line":49,"column":2}},"29":{"start":{"line":40,"column":36},"end":{"line":49,"column":2}},"30":{"start":{"line":41,"column":4},"end":{"line":47,"column":5}},"31":{"start":{"line":42,"column":8},"end":{"line":46,"column":10}},"32":{"start":{"line":48,"column":4},"end":{"line":48,"column":35}},"33":{"start":{"line":50,"column":0},"end":{"line":50,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":40,"column":18},"end":{"line":40,"column":19}},"loc":{"start":{"line":40,"column":36},"end":{"line":49,"column":2}},"line":40},"9":{"name":"(anonymous_9)","decl":{"start":{"line":40,"column":70},"end":{"line":40,"column":71}},"loc":{"start":{"line":40,"column":83},"end":{"line":49,"column":1}},"line":40}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":41,"column":4},"end":{"line":47,"column":5}},"type":"if","locations":[{"start":{"line":41,"column":4},"end":{"line":47,"column":5}},{"start":{"line":41,"column":4},"end":{"line":47,"column":5}}],"line":41}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":9,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":9,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,9],"7":[9,9],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,aAAa;AACb,oDAA2B;AAC3B,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,gBAAM,CAAC,cAAc,CAAC;AACjD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\n// @ts-ignore\nimport jsonld from 'jsonld'\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoader;\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"c7e0c616ae5e9e3791baa9c1af3759a83ab5dd57","contentHash":"e74fe161ea6f7b539d55b3bfb0ee50b3ffb54a1e5664047f4c07ebda6613696f"}} \ No newline at end of file diff --git a/.nyc_output/64bb629b-5f21-4a45-a083-7a0d3c970242.json b/.nyc_output/64bb629b-5f21-4a45-a083-7a0d3c970242.json deleted file mode 100644 index 2e34ce8..0000000 --- a/.nyc_output/64bb629b-5f21-4a45-a083-7a0d3c970242.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"1c7f99d8f7b9d4cb0b676bf67d98ec1e7bf5f7cde5ee3a6a2563bc7b3b060c32"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":39,"column":19},"end":{"line":39,"column":47}},"41":{"start":{"line":41,"column":17},"end":{"line":41,"column":51}},"42":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"43":{"start":{"line":43,"column":27},"end":{"line":43,"column":58}},"44":{"start":{"line":44,"column":17},"end":{"line":44,"column":34}},"45":{"start":{"line":45,"column":14},"end":{"line":45,"column":44}},"46":{"start":{"line":46,"column":16},"end":{"line":46,"column":35}},"47":{"start":{"line":47,"column":22},"end":{"line":47,"column":57}},"48":{"start":{"line":48,"column":13},"end":{"line":48,"column":37}},"49":{"start":{"line":49,"column":23},"end":{"line":49,"column":46}},"50":{"start":{"line":50,"column":18},"end":{"line":60,"column":2}},"51":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"52":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"53":{"start":{"line":52,"column":8},"end":{"line":56,"column":10}},"54":{"start":{"line":59,"column":4},"end":{"line":59,"column":35}},"55":{"start":{"line":61,"column":16},"end":{"line":61,"column":30}},"56":{"start":{"line":63,"column":0},"end":{"line":63,"column":34}},"57":{"start":{"line":67,"column":8},"end":{"line":67,"column":55}},"58":{"start":{"line":68,"column":8},"end":{"line":68,"column":23}},"59":{"start":{"line":69,"column":8},"end":{"line":69,"column":27}},"60":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"61":{"start":{"line":71,"column":12},"end":{"line":71,"column":29}},"62":{"start":{"line":74,"column":12},"end":{"line":74,"column":45}},"63":{"start":{"line":76,"column":39},"end":{"line":76,"column":46}},"64":{"start":{"line":77,"column":8},"end":{"line":79,"column":10}},"65":{"start":{"line":80,"column":8},"end":{"line":80,"column":37}},"66":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"67":{"start":{"line":82,"column":12},"end":{"line":82,"column":33}},"68":{"start":{"line":84,"column":8},"end":{"line":84,"column":46}},"69":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"70":{"start":{"line":88,"column":12},"end":{"line":88,"column":51}},"71":{"start":{"line":90,"column":8},"end":{"line":90,"column":29}},"72":{"start":{"line":93,"column":8},"end":{"line":112,"column":11}},"73":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"74":{"start":{"line":95,"column":16},"end":{"line":95,"column":37}},"75":{"start":{"line":99,"column":16},"end":{"line":99,"column":96}},"76":{"start":{"line":101,"column":29},"end":{"line":101,"column":78}},"77":{"start":{"line":102,"column":27},"end":{"line":102,"column":109}},"78":{"start":{"line":103,"column":12},"end":{"line":103,"column":33}},"79":{"start":{"line":104,"column":28},"end":{"line":104,"column":95}},"80":{"start":{"line":105,"column":12},"end":{"line":105,"column":35}},"81":{"start":{"line":106,"column":12},"end":{"line":106,"column":33}},"82":{"start":{"line":107,"column":12},"end":{"line":111,"column":14}},"83":{"start":{"line":115,"column":24},"end":{"line":115,"column":78}},"84":{"start":{"line":116,"column":8},"end":{"line":116,"column":31}},"85":{"start":{"line":117,"column":8},"end":{"line":117,"column":83}},"86":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"87":{"start":{"line":119,"column":8},"end":{"line":122,"column":10}},"88":{"start":{"line":125,"column":8},"end":{"line":136,"column":11}},"89":{"start":{"line":126,"column":29},"end":{"line":126,"column":83}},"90":{"start":{"line":127,"column":27},"end":{"line":127,"column":104}},"91":{"start":{"line":128,"column":12},"end":{"line":128,"column":33}},"92":{"start":{"line":129,"column":28},"end":{"line":129,"column":95}},"93":{"start":{"line":130,"column":12},"end":{"line":130,"column":35}},"94":{"start":{"line":131,"column":12},"end":{"line":135,"column":14}},"95":{"start":{"line":139,"column":8},"end":{"line":139,"column":44}},"96":{"start":{"line":142,"column":8},"end":{"line":152,"column":11}},"97":{"start":{"line":143,"column":33},"end":{"line":148,"column":14}},"98":{"start":{"line":149,"column":27},"end":{"line":149,"column":64}},"99":{"start":{"line":150,"column":23},"end":{"line":150,"column":50}},"100":{"start":{"line":151,"column":12},"end":{"line":151,"column":38}},"101":{"start":{"line":156,"column":8},"end":{"line":200,"column":11}},"102":{"start":{"line":157,"column":24},"end":{"line":159,"column":13}},"103":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"104":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"105":{"start":{"line":162,"column":16},"end":{"line":162,"column":77}},"106":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"107":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"108":{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},"109":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"110":{"start":{"line":169,"column":16},"end":{"line":169,"column":50}},"111":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"112":{"start":{"line":172,"column":16},"end":{"line":172,"column":37}},"113":{"start":{"line":174,"column":12},"end":{"line":174,"column":66}},"114":{"start":{"line":175,"column":12},"end":{"line":180,"column":15}},"115":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"116":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"117":{"start":{"line":183,"column":36},"end":{"line":183,"column":71}},"118":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"119":{"start":{"line":185,"column":39},"end":{"line":190,"column":13}},"120":{"start":{"line":191,"column":12},"end":{"line":191,"column":101}},"121":{"start":{"line":192,"column":54},"end":{"line":192,"column":122}},"122":{"start":{"line":193,"column":30},"end":{"line":197,"column":13}},"123":{"start":{"line":198,"column":12},"end":{"line":198,"column":49}},"124":{"start":{"line":199,"column":12},"end":{"line":199,"column":25}},"125":{"start":{"line":204,"column":8},"end":{"line":264,"column":11}},"126":{"start":{"line":205,"column":40},"end":{"line":205,"column":47}},"127":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"128":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"129":{"start":{"line":208,"column":36},"end":{"line":208,"column":71}},"130":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"131":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"132":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"133":{"start":{"line":212,"column":20},"end":{"line":212,"column":87}},"134":{"start":{"line":214,"column":16},"end":{"line":214,"column":69}},"135":{"start":{"line":216,"column":41},"end":{"line":221,"column":13}},"136":{"start":{"line":222,"column":12},"end":{"line":263,"column":13}},"137":{"start":{"line":223,"column":58},"end":{"line":226,"column":18}},"138":{"start":{"line":227,"column":27},"end":{"line":227,"column":68}},"139":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"140":{"start":{"line":229,"column":33},"end":{"line":236,"column":18}},"141":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"142":{"start":{"line":238,"column":20},"end":{"line":238,"column":53}},"143":{"start":{"line":240,"column":39},"end":{"line":245,"column":18}},"144":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"145":{"start":{"line":247,"column":20},"end":{"line":247,"column":47}},"146":{"start":{"line":249,"column":34},"end":{"line":255,"column":17}},"147":{"start":{"line":256,"column":16},"end":{"line":258,"column":17}},"148":{"start":{"line":257,"column":20},"end":{"line":257,"column":64}},"149":{"start":{"line":259,"column":16},"end":{"line":259,"column":33}},"150":{"start":{"line":262,"column":16},"end":{"line":262,"column":69}},"151":{"start":{"line":268,"column":8},"end":{"line":268,"column":48}},"152":{"start":{"line":271,"column":8},"end":{"line":271,"column":41}},"153":{"start":{"line":272,"column":8},"end":{"line":272,"column":45}},"154":{"start":{"line":273,"column":8},"end":{"line":273,"column":36}},"155":{"start":{"line":276,"column":8},"end":{"line":282,"column":11}},"156":{"start":{"line":277,"column":40},"end":{"line":277,"column":47}},"157":{"start":{"line":279,"column":34},"end":{"line":279,"column":59}},"158":{"start":{"line":280,"column":37},"end":{"line":280,"column":60}},"159":{"start":{"line":281,"column":12},"end":{"line":281,"column":53}},"160":{"start":{"line":285,"column":33},"end":{"line":285,"column":57}},"161":{"start":{"line":286,"column":8},"end":{"line":288,"column":9}},"162":{"start":{"line":287,"column":12},"end":{"line":287,"column":55}},"163":{"start":{"line":289,"column":8},"end":{"line":291,"column":9}},"164":{"start":{"line":290,"column":12},"end":{"line":290,"column":71}},"165":{"start":{"line":293,"column":8},"end":{"line":293,"column":34}},"166":{"start":{"line":296,"column":8},"end":{"line":326,"column":11}},"167":{"start":{"line":297,"column":42},"end":{"line":297,"column":49}},"168":{"start":{"line":300,"column":12},"end":{"line":316,"column":13}},"169":{"start":{"line":302,"column":29},"end":{"line":302,"column":70}},"170":{"start":{"line":303,"column":31},"end":{"line":303,"column":65}},"171":{"start":{"line":304,"column":31},"end":{"line":304,"column":53}},"172":{"start":{"line":306,"column":16},"end":{"line":306,"column":97}},"173":{"start":{"line":308,"column":17},"end":{"line":316,"column":13}},"174":{"start":{"line":309,"column":16},"end":{"line":309,"column":76}},"175":{"start":{"line":314,"column":20},"end":{"line":314,"column":160}},"176":{"start":{"line":317,"column":12},"end":{"line":317,"column":55}},"177":{"start":{"line":318,"column":12},"end":{"line":324,"column":13}},"178":{"start":{"line":319,"column":16},"end":{"line":323,"column":18}},"179":{"start":{"line":325,"column":12},"end":{"line":325,"column":25}},"180":{"start":{"line":329,"column":33},"end":{"line":337,"column":10}},"181":{"start":{"line":339,"column":8},"end":{"line":342,"column":9}},"182":{"start":{"line":341,"column":12},"end":{"line":341,"column":24}},"183":{"start":{"line":343,"column":8},"end":{"line":343,"column":21}},"184":{"start":{"line":346,"column":25},"end":{"line":346,"column":39}},"185":{"start":{"line":348,"column":22},"end":{"line":348,"column":51}},"186":{"start":{"line":349,"column":8},"end":{"line":349,"column":40}},"187":{"start":{"line":350,"column":8},"end":{"line":350,"column":43}},"188":{"start":{"line":353,"column":8},"end":{"line":368,"column":11}},"189":{"start":{"line":354,"column":12},"end":{"line":367,"column":15}},"190":{"start":{"line":355,"column":16},"end":{"line":366,"column":19}},"191":{"start":{"line":360,"column":20},"end":{"line":365,"column":21}},"192":{"start":{"line":361,"column":24},"end":{"line":361,"column":36}},"193":{"start":{"line":364,"column":24},"end":{"line":364,"column":47}},"194":{"start":{"line":371,"column":0},"end":{"line":371,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":50,"column":18},"end":{"line":50,"column":19}},"loc":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"line":50},"15":{"name":"(anonymous_15)","decl":{"start":{"line":50,"column":70},"end":{"line":50,"column":71}},"loc":{"start":{"line":50,"column":83},"end":{"line":60,"column":1}},"line":50},"16":{"name":"(anonymous_16)","decl":{"start":{"line":65,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":65,"column":31},"end":{"line":85,"column":5}},"line":65},"17":{"name":"(anonymous_17)","decl":{"start":{"line":86,"column":4},"end":{"line":86,"column":5}},"loc":{"start":{"line":86,"column":18},"end":{"line":91,"column":5}},"line":86},"18":{"name":"(anonymous_18)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":26},"end":{"line":113,"column":5}},"line":92},"19":{"name":"(anonymous_19)","decl":{"start":{"line":93,"column":47},"end":{"line":93,"column":48}},"loc":{"start":{"line":93,"column":60},"end":{"line":112,"column":9}},"line":93},"20":{"name":"(anonymous_20)","decl":{"start":{"line":114,"column":4},"end":{"line":114,"column":5}},"loc":{"start":{"line":114,"column":31},"end":{"line":123,"column":5}},"line":114},"21":{"name":"(anonymous_21)","decl":{"start":{"line":124,"column":4},"end":{"line":124,"column":5}},"loc":{"start":{"line":124,"column":25},"end":{"line":137,"column":5}},"line":124},"22":{"name":"(anonymous_22)","decl":{"start":{"line":125,"column":47},"end":{"line":125,"column":48}},"loc":{"start":{"line":125,"column":60},"end":{"line":136,"column":9}},"line":125},"23":{"name":"(anonymous_23)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":5}},"loc":{"start":{"line":138,"column":12},"end":{"line":140,"column":5}},"line":138},"24":{"name":"(anonymous_24)","decl":{"start":{"line":141,"column":4},"end":{"line":141,"column":5}},"loc":{"start":{"line":141,"column":34},"end":{"line":153,"column":5}},"line":141},"25":{"name":"(anonymous_25)","decl":{"start":{"line":142,"column":47},"end":{"line":142,"column":48}},"loc":{"start":{"line":142,"column":60},"end":{"line":152,"column":9}},"line":142},"26":{"name":"(anonymous_26)","decl":{"start":{"line":154,"column":4},"end":{"line":154,"column":5}},"loc":{"start":{"line":154,"column":25},"end":{"line":201,"column":5}},"line":154},"27":{"name":"(anonymous_27)","decl":{"start":{"line":156,"column":47},"end":{"line":156,"column":48}},"loc":{"start":{"line":156,"column":60},"end":{"line":200,"column":9}},"line":156},"28":{"name":"(anonymous_28)","decl":{"start":{"line":202,"column":4},"end":{"line":202,"column":5}},"loc":{"start":{"line":202,"column":25},"end":{"line":265,"column":5}},"line":202},"29":{"name":"(anonymous_29)","decl":{"start":{"line":204,"column":47},"end":{"line":204,"column":48}},"loc":{"start":{"line":204,"column":60},"end":{"line":264,"column":9}},"line":204},"30":{"name":"(anonymous_30)","decl":{"start":{"line":266,"column":4},"end":{"line":266,"column":5}},"loc":{"start":{"line":266,"column":20},"end":{"line":269,"column":5}},"line":266},"31":{"name":"(anonymous_31)","decl":{"start":{"line":270,"column":4},"end":{"line":270,"column":5}},"loc":{"start":{"line":270,"column":25},"end":{"line":274,"column":5}},"line":270},"32":{"name":"(anonymous_32)","decl":{"start":{"line":275,"column":4},"end":{"line":275,"column":5}},"loc":{"start":{"line":275,"column":30},"end":{"line":283,"column":5}},"line":275},"33":{"name":"(anonymous_33)","decl":{"start":{"line":276,"column":47},"end":{"line":276,"column":48}},"loc":{"start":{"line":276,"column":60},"end":{"line":282,"column":9}},"line":276},"34":{"name":"(anonymous_34)","decl":{"start":{"line":284,"column":4},"end":{"line":284,"column":5}},"loc":{"start":{"line":284,"column":33},"end":{"line":294,"column":5}},"line":284},"35":{"name":"(anonymous_35)","decl":{"start":{"line":295,"column":4},"end":{"line":295,"column":5}},"loc":{"start":{"line":295,"column":18},"end":{"line":327,"column":5}},"line":295},"36":{"name":"(anonymous_36)","decl":{"start":{"line":296,"column":47},"end":{"line":296,"column":48}},"loc":{"start":{"line":296,"column":60},"end":{"line":326,"column":9}},"line":296},"37":{"name":"(anonymous_37)","decl":{"start":{"line":328,"column":4},"end":{"line":328,"column":5}},"loc":{"start":{"line":328,"column":29},"end":{"line":344,"column":5}},"line":328},"38":{"name":"(anonymous_38)","decl":{"start":{"line":345,"column":4},"end":{"line":345,"column":5}},"loc":{"start":{"line":345,"column":31},"end":{"line":351,"column":5}},"line":345},"39":{"name":"(anonymous_39)","decl":{"start":{"line":352,"column":4},"end":{"line":352,"column":5}},"loc":{"start":{"line":352,"column":50},"end":{"line":369,"column":5}},"line":352},"40":{"name":"(anonymous_40)","decl":{"start":{"line":353,"column":47},"end":{"line":353,"column":48}},"loc":{"start":{"line":353,"column":60},"end":{"line":368,"column":9}},"line":353},"41":{"name":"(anonymous_41)","decl":{"start":{"line":354,"column":31},"end":{"line":354,"column":32}},"loc":{"start":{"line":354,"column":52},"end":{"line":367,"column":13}},"line":354},"42":{"name":"(anonymous_42)","decl":{"start":{"line":359,"column":19},"end":{"line":359,"column":20}},"loc":{"start":{"line":359,"column":36},"end":{"line":366,"column":17}},"line":359}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},{"start":{"line":51,"column":4},"end":{"line":57,"column":5}}],"line":51},"25":{"loc":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},{"start":{"line":70,"column":8},"end":{"line":75,"column":9}}],"line":70},"26":{"loc":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},{"start":{"line":81,"column":8},"end":{"line":83,"column":9}}],"line":81},"27":{"loc":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},{"start":{"line":87,"column":8},"end":{"line":89,"column":9}}],"line":87},"28":{"loc":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},{"start":{"line":94,"column":12},"end":{"line":100,"column":13}}],"line":94},"29":{"loc":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"type":"cond-expr","locations":[{"start":{"line":160,"column":40},"end":{"line":160,"column":53}},{"start":{"line":160,"column":56},"end":{"line":160,"column":60}}],"line":160},"30":{"loc":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"type":"if","locations":[{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},{"start":{"line":161,"column":12},"end":{"line":163,"column":13}}],"line":161},"31":{"loc":{"start":{"line":161,"column":16},"end":{"line":161,"column":106}},"type":"binary-expr","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":56}},{"start":{"line":161,"column":60},"end":{"line":161,"column":106}}],"line":161},"32":{"loc":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"type":"cond-expr","locations":[{"start":{"line":164,"column":38},"end":{"line":164,"column":70}},{"start":{"line":164,"column":73},"end":{"line":164,"column":82}}],"line":164},"33":{"loc":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},{"start":{"line":165,"column":12},"end":{"line":167,"column":13}}],"line":165},"34":{"loc":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"type":"if","locations":[{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},{"start":{"line":168,"column":12},"end":{"line":170,"column":13}}],"line":168},"35":{"loc":{"start":{"line":168,"column":16},"end":{"line":168,"column":62}},"type":"binary-expr","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},{"start":{"line":168,"column":38},"end":{"line":168,"column":62}}],"line":168},"36":{"loc":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"type":"if","locations":[{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},{"start":{"line":171,"column":12},"end":{"line":173,"column":13}}],"line":171},"37":{"loc":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"type":"cond-expr","locations":[{"start":{"line":181,"column":42},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":61}}],"line":181},"38":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"type":"cond-expr","locations":[{"start":{"line":182,"column":87},"end":{"line":182,"column":89}},{"start":{"line":182,"column":92},"end":{"line":182,"column":102}}],"line":182},"39":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":84}},"type":"binary-expr","locations":[{"start":{"line":182,"column":32},"end":{"line":182,"column":67}},{"start":{"line":182,"column":71},"end":{"line":182,"column":84}}],"line":182},"40":{"loc":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"type":"cond-expr","locations":[{"start":{"line":184,"column":40},"end":{"line":184,"column":53}},{"start":{"line":184,"column":56},"end":{"line":184,"column":116}}],"line":184},"41":{"loc":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"type":"cond-expr","locations":[{"start":{"line":206,"column":42},"end":{"line":206,"column":56}},{"start":{"line":206,"column":59},"end":{"line":206,"column":61}}],"line":206},"42":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"type":"cond-expr","locations":[{"start":{"line":207,"column":87},"end":{"line":207,"column":89}},{"start":{"line":207,"column":92},"end":{"line":207,"column":102}}],"line":207},"43":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":84}},"type":"binary-expr","locations":[{"start":{"line":207,"column":32},"end":{"line":207,"column":67}},{"start":{"line":207,"column":71},"end":{"line":207,"column":84}}],"line":207},"44":{"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"type":"cond-expr","locations":[{"start":{"line":209,"column":40},"end":{"line":209,"column":53}},{"start":{"line":209,"column":56},"end":{"line":209,"column":116}}],"line":209},"45":{"loc":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"type":"if","locations":[{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},{"start":{"line":210,"column":12},"end":{"line":215,"column":13}}],"line":210},"46":{"loc":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"type":"if","locations":[{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},{"start":{"line":211,"column":16},"end":{"line":213,"column":17}}],"line":211},"47":{"loc":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"type":"cond-expr","locations":[{"start":{"line":228,"column":82},"end":{"line":228,"column":156}},{"start":{"line":228,"column":159},"end":{"line":228,"column":163}}],"line":228},"48":{"loc":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"type":"if","locations":[{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},{"start":{"line":237,"column":16},"end":{"line":239,"column":17}}],"line":237},"49":{"loc":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"type":"if","locations":[{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},{"start":{"line":246,"column":16},"end":{"line":248,"column":17}}],"line":246},"50":{"loc":{"start":{"line":256,"column":16},"end":{"line":258,"column":17}},"type":"if","locations":[{"start":{"line":256,"column":16},"end":{"line":258,"column":17}},{"start":{"line":256,"column":16},"end":{"line":258,"column":17}}],"line":256},"51":{"loc":{"start":{"line":256,"column":20},"end":{"line":256,"column":88}},"type":"binary-expr","locations":[{"start":{"line":256,"column":20},"end":{"line":256,"column":46}},{"start":{"line":256,"column":50},"end":{"line":256,"column":88}}],"line":256},"52":{"loc":{"start":{"line":286,"column":8},"end":{"line":288,"column":9}},"type":"if","locations":[{"start":{"line":286,"column":8},"end":{"line":288,"column":9}},{"start":{"line":286,"column":8},"end":{"line":288,"column":9}}],"line":286},"53":{"loc":{"start":{"line":289,"column":8},"end":{"line":291,"column":9}},"type":"if","locations":[{"start":{"line":289,"column":8},"end":{"line":291,"column":9}},{"start":{"line":289,"column":8},"end":{"line":291,"column":9}}],"line":289},"54":{"loc":{"start":{"line":300,"column":12},"end":{"line":316,"column":13}},"type":"if","locations":[{"start":{"line":300,"column":12},"end":{"line":316,"column":13}},{"start":{"line":300,"column":12},"end":{"line":316,"column":13}}],"line":300},"55":{"loc":{"start":{"line":300,"column":16},"end":{"line":300,"column":81}},"type":"binary-expr","locations":[{"start":{"line":300,"column":16},"end":{"line":300,"column":49}},{"start":{"line":300,"column":53},"end":{"line":300,"column":81}}],"line":300},"56":{"loc":{"start":{"line":308,"column":17},"end":{"line":316,"column":13}},"type":"if","locations":[{"start":{"line":308,"column":17},"end":{"line":316,"column":13}},{"start":{"line":308,"column":17},"end":{"line":316,"column":13}}],"line":308},"57":{"loc":{"start":{"line":318,"column":12},"end":{"line":324,"column":13}},"type":"if","locations":[{"start":{"line":318,"column":12},"end":{"line":324,"column":13}},{"start":{"line":318,"column":12},"end":{"line":324,"column":13}}],"line":318},"58":{"loc":{"start":{"line":339,"column":8},"end":{"line":342,"column":9}},"type":"if","locations":[{"start":{"line":339,"column":8},"end":{"line":342,"column":9}},{"start":{"line":339,"column":8},"end":{"line":342,"column":9}}],"line":339},"59":{"loc":{"start":{"line":360,"column":20},"end":{"line":365,"column":21}},"type":"if","locations":[{"start":{"line":360,"column":20},"end":{"line":365,"column":21}},{"start":{"line":360,"column":20},"end":{"line":365,"column":21}}],"line":360}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAwB;AACxB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAG/C,YAAY;AACZ,oDAA2B;AAE3B,oDAA4B;AAC5B,MAAM,kBAAkB,GAAG,gBAAM,CAAC,cAAc,CAAC;AAGjD,mCAAiH;AAGjH,6CAA+B;AAE/B,oCAAmC;AACnC,0DAA2D;AAI3D,sCAAwC;AACxC,+CAA0E;AAE1E,MAAM,SAAS,GAAG,CAAO,GAAQ,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,aAAQ,EAAE;QACnB,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,aAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD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BACN,IAAI,EAAE,QAAQ,CAAC,eAAe;iBAC/B,EACD,CAAC,GAAQ,EAAE,MAAW,EAAE,EAAE;oBACxB,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;qBACxB;gBACH,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAID,kBAAe,2BAA2B,CAAC;AAG3C,gFAAgF","sourcesContent":["\nimport Web3 from \"web3\";\nconst { suites } = require('jsonld-signatures')\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\nconst { JCS } = require('jcs')\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n })) \n \n if(!purposeResult.valid){\n throw Error(purposeResult)\n } \n \n const returnObj = {\n verified: true,\n status: {\n canonicalizationHashVerified,\n signatureVerified: verified,\n }\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj\n } catch (error) {\n return { verified: false, status: undefined, error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4600be2819715de85a58880e26d523ba0a85b3f2","contentHash":"2bfe3de7611eba13a9e937e831338cba28196187ded1ce4fd8c9d37846e16d88"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"403682b59f606ef0e156c46bc50aa72495e52e83db4cb627ea22402c19e3116e"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":16},"end":{"line":5,"column":30}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9B,4BAA4B;AAE5B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAA;AAKjC,MAAM,eAAe;IAArB;QACY,SAAI,GAAwB,IAAI,GAAG,EAAkB,CAAA;QAC7D,gBAAW,GAAQ,EAAE,CAAA;IAsHzB,CAAC;IArHW,GAAG,CAAC,KAAU,EAAE,IAAY,EAAE,WAAgB;QAClD,IAAI,GAAG,GAAQ,EAAE,CAAA;QACjB,IAAI,KAAK,GAAG,EAAE,C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C;wBACL,IAAI,EAAE,GAAG;wBACT,IAAI,EAAE,MAAM;qBACf,CAAC,CAAA;iBACL;gBACD,IAAI,IAAI,IAAI,QAAQ,EAAE;oBAClB,GAAG,CAAC,IAAI,CAAC;wBACL,IAAI,EAAE,GAAG;wBACT,IAAI,EAAE,SAAS;qBAClB,CAAC,CAAA;iBACL;YAGL,CAAC,CAAC,CAAA;SACL;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;IACxE,CAAC;IAEM,aAAa,CAAC,KAAU,EAAE,WAAoB;QAGjD,IAAI,WAAW,IAAI,SAAS,EAAE;YAC1B,WAAW,GAAG,UAAU,CAAA;SAC3B;QACD,gHAAgH;QAGhH,8BAA8B;QAC9B,YAAY;QACZ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;QACxC,IAAI,GAAG,GAAQ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QAEnC,YAAY;QACZ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAIrC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CAEJ;AAIQ,0CAAe","sourcesContent":["// https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation\n\n\nconst { JCS } = require('jcs')\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ecd53451cb8a4b59f3d5c6a0d0f18152ced7e949","contentHash":"122fdc729852d405c995336375071f0aed5a7f82811606d35cd4898eca473c20"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":21,"column":15},"end":{"line":21,"column":32}},"22":{"start":{"line":22,"column":25},"end":{"line":22,"column":70}},"23":{"start":{"line":23,"column":33},"end":{"line":23,"column":85}},"24":{"start":{"line":24,"column":48},"end":{"line":24,"column":115}},"25":{"start":{"line":27,"column":27},"end":{"line":27,"column":56}},"26":{"start":{"line":28,"column":17},"end":{"line":37,"column":2}},"27":{"start":{"line":38,"column":0},"end":{"line":38,"column":28}},"28":{"start":{"line":39,"column":18},"end":{"line":48,"column":2}},"29":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"30":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"31":{"start":{"line":41,"column":8},"end":{"line":45,"column":10}},"32":{"start":{"line":47,"column":4},"end":{"line":47,"column":35}},"33":{"start":{"line":49,"column":0},"end":{"line":49,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":39,"column":18},"end":{"line":39,"column":19}},"loc":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"line":39},"9":{"name":"(anonymous_9)","decl":{"start":{"line":39,"column":70},"end":{"line":39,"column":71}},"loc":{"start":{"line":39,"column":83},"end":{"line":48,"column":1}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},{"start":{"line":40,"column":4},"end":{"line":46,"column":5}}],"line":40}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":8,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":8,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,8],"7":[8,8],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;AACzD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\nconst jsonld = require('jsonld');\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoaders.node();\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"01c391d5ad03546c4b7858d181b4e60185df2808","contentHash":"6d6590c771aae1a9faef90c6be91b6da8ebdfa7f9339166779e34eafb5cc32ee"}} \ No newline at end of file diff --git a/.nyc_output/922fb093-6f0c-4fc4-8fed-ced17ae31879.json b/.nyc_output/922fb093-6f0c-4fc4-8fed-ced17ae31879.json deleted file mode 100644 index 67b666f..0000000 --- a/.nyc_output/922fb093-6f0c-4fc4-8fed-ced17ae31879.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"1c7f99d8f7b9d4cb0b676bf67d98ec1e7bf5f7cde5ee3a6a2563bc7b3b060c32"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":39,"column":19},"end":{"line":39,"column":47}},"41":{"start":{"line":41,"column":17},"end":{"line":41,"column":51}},"42":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"43":{"start":{"line":43,"column":27},"end":{"line":43,"column":58}},"44":{"start":{"line":44,"column":17},"end":{"line":44,"column":34}},"45":{"start":{"line":45,"column":14},"end":{"line":45,"column":44}},"46":{"start":{"line":46,"column":16},"end":{"line":46,"column":35}},"47":{"start":{"line":47,"column":22},"end":{"line":47,"column":57}},"48":{"start":{"line":48,"column":13},"end":{"line":48,"column":37}},"49":{"start":{"line":49,"column":23},"end":{"line":49,"column":46}},"50":{"start":{"line":50,"column":18},"end":{"line":60,"column":2}},"51":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"52":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"53":{"start":{"line":52,"column":8},"end":{"line":56,"column":10}},"54":{"start":{"line":59,"column":4},"end":{"line":59,"column":35}},"55":{"start":{"line":61,"column":16},"end":{"line":61,"column":30}},"56":{"start":{"line":63,"column":0},"end":{"line":63,"column":34}},"57":{"start":{"line":67,"column":8},"end":{"line":67,"column":55}},"58":{"start":{"line":68,"column":8},"end":{"line":68,"column":23}},"59":{"start":{"line":69,"column":8},"end":{"line":69,"column":27}},"60":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"61":{"start":{"line":71,"column":12},"end":{"line":71,"column":29}},"62":{"start":{"line":74,"column":12},"end":{"line":74,"column":45}},"63":{"start":{"line":76,"column":39},"end":{"line":76,"column":46}},"64":{"start":{"line":77,"column":8},"end":{"line":79,"column":10}},"65":{"start":{"line":80,"column":8},"end":{"line":80,"column":37}},"66":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"67":{"start":{"line":82,"column":12},"end":{"line":82,"column":33}},"68":{"start":{"line":84,"column":8},"end":{"line":84,"column":46}},"69":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"70":{"start":{"line":88,"column":12},"end":{"line":88,"column":51}},"71":{"start":{"line":90,"column":8},"end":{"line":90,"column":29}},"72":{"start":{"line":93,"column":8},"end":{"line":112,"column":11}},"73":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"74":{"start":{"line":95,"column":16},"end":{"line":95,"column":37}},"75":{"start":{"line":99,"column":16},"end":{"line":99,"column":96}},"76":{"start":{"line":101,"column":29},"end":{"line":101,"column":78}},"77":{"start":{"line":102,"column":27},"end":{"line":102,"column":109}},"78":{"start":{"line":103,"column":12},"end":{"line":103,"column":33}},"79":{"start":{"line":104,"column":28},"end":{"line":104,"column":95}},"80":{"start":{"line":105,"column":12},"end":{"line":105,"column":35}},"81":{"start":{"line":106,"column":12},"end":{"line":106,"column":33}},"82":{"start":{"line":107,"column":12},"end":{"line":111,"column":14}},"83":{"start":{"line":115,"column":24},"end":{"line":115,"column":78}},"84":{"start":{"line":116,"column":8},"end":{"line":116,"column":31}},"85":{"start":{"line":117,"column":8},"end":{"line":117,"column":83}},"86":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"87":{"start":{"line":119,"column":8},"end":{"line":122,"column":10}},"88":{"start":{"line":125,"column":8},"end":{"line":136,"column":11}},"89":{"start":{"line":126,"column":29},"end":{"line":126,"column":83}},"90":{"start":{"line":127,"column":27},"end":{"line":127,"column":104}},"91":{"start":{"line":128,"column":12},"end":{"line":128,"column":33}},"92":{"start":{"line":129,"column":28},"end":{"line":129,"column":95}},"93":{"start":{"line":130,"column":12},"end":{"line":130,"column":35}},"94":{"start":{"line":131,"column":12},"end":{"line":135,"column":14}},"95":{"start":{"line":139,"column":8},"end":{"line":139,"column":44}},"96":{"start":{"line":142,"column":8},"end":{"line":152,"column":11}},"97":{"start":{"line":143,"column":33},"end":{"line":148,"column":14}},"98":{"start":{"line":149,"column":27},"end":{"line":149,"column":64}},"99":{"start":{"line":150,"column":23},"end":{"line":150,"column":50}},"100":{"start":{"line":151,"column":12},"end":{"line":151,"column":38}},"101":{"start":{"line":156,"column":8},"end":{"line":200,"column":11}},"102":{"start":{"line":157,"column":24},"end":{"line":159,"column":13}},"103":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"104":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"105":{"start":{"line":162,"column":16},"end":{"line":162,"column":77}},"106":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"107":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"108":{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},"109":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"110":{"start":{"line":169,"column":16},"end":{"line":169,"column":50}},"111":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"112":{"start":{"line":172,"column":16},"end":{"line":172,"column":37}},"113":{"start":{"line":174,"column":12},"end":{"line":174,"column":66}},"114":{"start":{"line":175,"column":12},"end":{"line":180,"column":15}},"115":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"116":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"117":{"start":{"line":183,"column":36},"end":{"line":183,"column":71}},"118":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"119":{"start":{"line":185,"column":39},"end":{"line":190,"column":13}},"120":{"start":{"line":191,"column":12},"end":{"line":191,"column":101}},"121":{"start":{"line":192,"column":54},"end":{"line":192,"column":122}},"122":{"start":{"line":193,"column":30},"end":{"line":197,"column":13}},"123":{"start":{"line":198,"column":12},"end":{"line":198,"column":49}},"124":{"start":{"line":199,"column":12},"end":{"line":199,"column":25}},"125":{"start":{"line":204,"column":8},"end":{"line":269,"column":11}},"126":{"start":{"line":205,"column":40},"end":{"line":205,"column":47}},"127":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"128":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"129":{"start":{"line":208,"column":36},"end":{"line":208,"column":71}},"130":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"131":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"132":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"133":{"start":{"line":212,"column":20},"end":{"line":212,"column":87}},"134":{"start":{"line":214,"column":16},"end":{"line":214,"column":69}},"135":{"start":{"line":216,"column":41},"end":{"line":221,"column":13}},"136":{"start":{"line":222,"column":12},"end":{"line":268,"column":13}},"137":{"start":{"line":223,"column":58},"end":{"line":226,"column":18}},"138":{"start":{"line":227,"column":27},"end":{"line":227,"column":68}},"139":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"140":{"start":{"line":229,"column":33},"end":{"line":236,"column":18}},"141":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"142":{"start":{"line":238,"column":20},"end":{"line":238,"column":53}},"143":{"start":{"line":240,"column":39},"end":{"line":245,"column":18}},"144":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"145":{"start":{"line":247,"column":20},"end":{"line":247,"column":47}},"146":{"start":{"line":249,"column":34},"end":{"line":259,"column":17}},"147":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"148":{"start":{"line":261,"column":20},"end":{"line":261,"column":64}},"149":{"start":{"line":263,"column":16},"end":{"line":263,"column":33}},"150":{"start":{"line":266,"column":16},"end":{"line":267,"column":35}},"151":{"start":{"line":273,"column":8},"end":{"line":273,"column":48}},"152":{"start":{"line":276,"column":8},"end":{"line":276,"column":41}},"153":{"start":{"line":277,"column":8},"end":{"line":277,"column":45}},"154":{"start":{"line":278,"column":8},"end":{"line":278,"column":36}},"155":{"start":{"line":281,"column":8},"end":{"line":287,"column":11}},"156":{"start":{"line":282,"column":40},"end":{"line":282,"column":47}},"157":{"start":{"line":284,"column":34},"end":{"line":284,"column":59}},"158":{"start":{"line":285,"column":37},"end":{"line":285,"column":60}},"159":{"start":{"line":286,"column":12},"end":{"line":286,"column":53}},"160":{"start":{"line":290,"column":33},"end":{"line":290,"column":57}},"161":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"162":{"start":{"line":292,"column":12},"end":{"line":292,"column":55}},"163":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"164":{"start":{"line":295,"column":12},"end":{"line":295,"column":71}},"165":{"start":{"line":298,"column":8},"end":{"line":298,"column":34}},"166":{"start":{"line":301,"column":8},"end":{"line":331,"column":11}},"167":{"start":{"line":302,"column":42},"end":{"line":302,"column":49}},"168":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"169":{"start":{"line":307,"column":29},"end":{"line":307,"column":70}},"170":{"start":{"line":308,"column":31},"end":{"line":308,"column":65}},"171":{"start":{"line":309,"column":31},"end":{"line":309,"column":53}},"172":{"start":{"line":311,"column":16},"end":{"line":311,"column":97}},"173":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"174":{"start":{"line":314,"column":16},"end":{"line":314,"column":76}},"175":{"start":{"line":319,"column":20},"end":{"line":319,"column":160}},"176":{"start":{"line":322,"column":12},"end":{"line":322,"column":55}},"177":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"178":{"start":{"line":324,"column":16},"end":{"line":328,"column":18}},"179":{"start":{"line":330,"column":12},"end":{"line":330,"column":25}},"180":{"start":{"line":334,"column":33},"end":{"line":342,"column":10}},"181":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"182":{"start":{"line":346,"column":12},"end":{"line":346,"column":24}},"183":{"start":{"line":348,"column":8},"end":{"line":348,"column":21}},"184":{"start":{"line":351,"column":25},"end":{"line":351,"column":39}},"185":{"start":{"line":353,"column":22},"end":{"line":353,"column":51}},"186":{"start":{"line":354,"column":8},"end":{"line":354,"column":40}},"187":{"start":{"line":355,"column":8},"end":{"line":355,"column":43}},"188":{"start":{"line":358,"column":8},"end":{"line":373,"column":11}},"189":{"start":{"line":359,"column":12},"end":{"line":372,"column":15}},"190":{"start":{"line":360,"column":16},"end":{"line":371,"column":19}},"191":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"192":{"start":{"line":366,"column":24},"end":{"line":366,"column":36}},"193":{"start":{"line":369,"column":24},"end":{"line":369,"column":47}},"194":{"start":{"line":376,"column":0},"end":{"line":376,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":50,"column":18},"end":{"line":50,"column":19}},"loc":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"line":50},"15":{"name":"(anonymous_15)","decl":{"start":{"line":50,"column":70},"end":{"line":50,"column":71}},"loc":{"start":{"line":50,"column":83},"end":{"line":60,"column":1}},"line":50},"16":{"name":"(anonymous_16)","decl":{"start":{"line":65,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":65,"column":31},"end":{"line":85,"column":5}},"line":65},"17":{"name":"(anonymous_17)","decl":{"start":{"line":86,"column":4},"end":{"line":86,"column":5}},"loc":{"start":{"line":86,"column":18},"end":{"line":91,"column":5}},"line":86},"18":{"name":"(anonymous_18)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":26},"end":{"line":113,"column":5}},"line":92},"19":{"name":"(anonymous_19)","decl":{"start":{"line":93,"column":47},"end":{"line":93,"column":48}},"loc":{"start":{"line":93,"column":60},"end":{"line":112,"column":9}},"line":93},"20":{"name":"(anonymous_20)","decl":{"start":{"line":114,"column":4},"end":{"line":114,"column":5}},"loc":{"start":{"line":114,"column":31},"end":{"line":123,"column":5}},"line":114},"21":{"name":"(anonymous_21)","decl":{"start":{"line":124,"column":4},"end":{"line":124,"column":5}},"loc":{"start":{"line":124,"column":25},"end":{"line":137,"column":5}},"line":124},"22":{"name":"(anonymous_22)","decl":{"start":{"line":125,"column":47},"end":{"line":125,"column":48}},"loc":{"start":{"line":125,"column":60},"end":{"line":136,"column":9}},"line":125},"23":{"name":"(anonymous_23)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":5}},"loc":{"start":{"line":138,"column":12},"end":{"line":140,"column":5}},"line":138},"24":{"name":"(anonymous_24)","decl":{"start":{"line":141,"column":4},"end":{"line":141,"column":5}},"loc":{"start":{"line":141,"column":34},"end":{"line":153,"column":5}},"line":141},"25":{"name":"(anonymous_25)","decl":{"start":{"line":142,"column":47},"end":{"line":142,"column":48}},"loc":{"start":{"line":142,"column":60},"end":{"line":152,"column":9}},"line":142},"26":{"name":"(anonymous_26)","decl":{"start":{"line":154,"column":4},"end":{"line":154,"column":5}},"loc":{"start":{"line":154,"column":25},"end":{"line":201,"column":5}},"line":154},"27":{"name":"(anonymous_27)","decl":{"start":{"line":156,"column":47},"end":{"line":156,"column":48}},"loc":{"start":{"line":156,"column":60},"end":{"line":200,"column":9}},"line":156},"28":{"name":"(anonymous_28)","decl":{"start":{"line":202,"column":4},"end":{"line":202,"column":5}},"loc":{"start":{"line":202,"column":25},"end":{"line":270,"column":5}},"line":202},"29":{"name":"(anonymous_29)","decl":{"start":{"line":204,"column":47},"end":{"line":204,"column":48}},"loc":{"start":{"line":204,"column":60},"end":{"line":269,"column":9}},"line":204},"30":{"name":"(anonymous_30)","decl":{"start":{"line":271,"column":4},"end":{"line":271,"column":5}},"loc":{"start":{"line":271,"column":20},"end":{"line":274,"column":5}},"line":271},"31":{"name":"(anonymous_31)","decl":{"start":{"line":275,"column":4},"end":{"line":275,"column":5}},"loc":{"start":{"line":275,"column":25},"end":{"line":279,"column":5}},"line":275},"32":{"name":"(anonymous_32)","decl":{"start":{"line":280,"column":4},"end":{"line":280,"column":5}},"loc":{"start":{"line":280,"column":30},"end":{"line":288,"column":5}},"line":280},"33":{"name":"(anonymous_33)","decl":{"start":{"line":281,"column":47},"end":{"line":281,"column":48}},"loc":{"start":{"line":281,"column":60},"end":{"line":287,"column":9}},"line":281},"34":{"name":"(anonymous_34)","decl":{"start":{"line":289,"column":4},"end":{"line":289,"column":5}},"loc":{"start":{"line":289,"column":33},"end":{"line":299,"column":5}},"line":289},"35":{"name":"(anonymous_35)","decl":{"start":{"line":300,"column":4},"end":{"line":300,"column":5}},"loc":{"start":{"line":300,"column":18},"end":{"line":332,"column":5}},"line":300},"36":{"name":"(anonymous_36)","decl":{"start":{"line":301,"column":47},"end":{"line":301,"column":48}},"loc":{"start":{"line":301,"column":60},"end":{"line":331,"column":9}},"line":301},"37":{"name":"(anonymous_37)","decl":{"start":{"line":333,"column":4},"end":{"line":333,"column":5}},"loc":{"start":{"line":333,"column":29},"end":{"line":349,"column":5}},"line":333},"38":{"name":"(anonymous_38)","decl":{"start":{"line":350,"column":4},"end":{"line":350,"column":5}},"loc":{"start":{"line":350,"column":31},"end":{"line":356,"column":5}},"line":350},"39":{"name":"(anonymous_39)","decl":{"start":{"line":357,"column":4},"end":{"line":357,"column":5}},"loc":{"start":{"line":357,"column":50},"end":{"line":374,"column":5}},"line":357},"40":{"name":"(anonymous_40)","decl":{"start":{"line":358,"column":47},"end":{"line":358,"column":48}},"loc":{"start":{"line":358,"column":60},"end":{"line":373,"column":9}},"line":358},"41":{"name":"(anonymous_41)","decl":{"start":{"line":359,"column":31},"end":{"line":359,"column":32}},"loc":{"start":{"line":359,"column":52},"end":{"line":372,"column":13}},"line":359},"42":{"name":"(anonymous_42)","decl":{"start":{"line":364,"column":19},"end":{"line":364,"column":20}},"loc":{"start":{"line":364,"column":36},"end":{"line":371,"column":17}},"line":364}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},{"start":{"line":51,"column":4},"end":{"line":57,"column":5}}],"line":51},"25":{"loc":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},{"start":{"line":70,"column":8},"end":{"line":75,"column":9}}],"line":70},"26":{"loc":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},{"start":{"line":81,"column":8},"end":{"line":83,"column":9}}],"line":81},"27":{"loc":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},{"start":{"line":87,"column":8},"end":{"line":89,"column":9}}],"line":87},"28":{"loc":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},{"start":{"line":94,"column":12},"end":{"line":100,"column":13}}],"line":94},"29":{"loc":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"type":"cond-expr","locations":[{"start":{"line":160,"column":40},"end":{"line":160,"column":53}},{"start":{"line":160,"column":56},"end":{"line":160,"column":60}}],"line":160},"30":{"loc":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"type":"if","locations":[{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},{"start":{"line":161,"column":12},"end":{"line":163,"column":13}}],"line":161},"31":{"loc":{"start":{"line":161,"column":16},"end":{"line":161,"column":106}},"type":"binary-expr","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":56}},{"start":{"line":161,"column":60},"end":{"line":161,"column":106}}],"line":161},"32":{"loc":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"type":"cond-expr","locations":[{"start":{"line":164,"column":38},"end":{"line":164,"column":70}},{"start":{"line":164,"column":73},"end":{"line":164,"column":82}}],"line":164},"33":{"loc":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},{"start":{"line":165,"column":12},"end":{"line":167,"column":13}}],"line":165},"34":{"loc":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"type":"if","locations":[{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},{"start":{"line":168,"column":12},"end":{"line":170,"column":13}}],"line":168},"35":{"loc":{"start":{"line":168,"column":16},"end":{"line":168,"column":62}},"type":"binary-expr","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},{"start":{"line":168,"column":38},"end":{"line":168,"column":62}}],"line":168},"36":{"loc":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"type":"if","locations":[{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},{"start":{"line":171,"column":12},"end":{"line":173,"column":13}}],"line":171},"37":{"loc":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"type":"cond-expr","locations":[{"start":{"line":181,"column":42},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":61}}],"line":181},"38":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"type":"cond-expr","locations":[{"start":{"line":182,"column":87},"end":{"line":182,"column":89}},{"start":{"line":182,"column":92},"end":{"line":182,"column":102}}],"line":182},"39":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":84}},"type":"binary-expr","locations":[{"start":{"line":182,"column":32},"end":{"line":182,"column":67}},{"start":{"line":182,"column":71},"end":{"line":182,"column":84}}],"line":182},"40":{"loc":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"type":"cond-expr","locations":[{"start":{"line":184,"column":40},"end":{"line":184,"column":53}},{"start":{"line":184,"column":56},"end":{"line":184,"column":116}}],"line":184},"41":{"loc":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"type":"cond-expr","locations":[{"start":{"line":206,"column":42},"end":{"line":206,"column":56}},{"start":{"line":206,"column":59},"end":{"line":206,"column":61}}],"line":206},"42":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"type":"cond-expr","locations":[{"start":{"line":207,"column":87},"end":{"line":207,"column":89}},{"start":{"line":207,"column":92},"end":{"line":207,"column":102}}],"line":207},"43":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":84}},"type":"binary-expr","locations":[{"start":{"line":207,"column":32},"end":{"line":207,"column":67}},{"start":{"line":207,"column":71},"end":{"line":207,"column":84}}],"line":207},"44":{"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"type":"cond-expr","locations":[{"start":{"line":209,"column":40},"end":{"line":209,"column":53}},{"start":{"line":209,"column":56},"end":{"line":209,"column":116}}],"line":209},"45":{"loc":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"type":"if","locations":[{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},{"start":{"line":210,"column":12},"end":{"line":215,"column":13}}],"line":210},"46":{"loc":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"type":"if","locations":[{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},{"start":{"line":211,"column":16},"end":{"line":213,"column":17}}],"line":211},"47":{"loc":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"type":"cond-expr","locations":[{"start":{"line":228,"column":82},"end":{"line":228,"column":156}},{"start":{"line":228,"column":159},"end":{"line":228,"column":163}}],"line":228},"48":{"loc":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"type":"if","locations":[{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},{"start":{"line":237,"column":16},"end":{"line":239,"column":17}}],"line":237},"49":{"loc":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"type":"if","locations":[{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},{"start":{"line":246,"column":16},"end":{"line":248,"column":17}}],"line":246},"50":{"loc":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"type":"if","locations":[{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},{"start":{"line":260,"column":16},"end":{"line":262,"column":17}}],"line":260},"51":{"loc":{"start":{"line":260,"column":20},"end":{"line":260,"column":88}},"type":"binary-expr","locations":[{"start":{"line":260,"column":20},"end":{"line":260,"column":46}},{"start":{"line":260,"column":50},"end":{"line":260,"column":88}}],"line":260},"52":{"loc":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"type":"if","locations":[{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},{"start":{"line":291,"column":8},"end":{"line":293,"column":9}}],"line":291},"53":{"loc":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"type":"if","locations":[{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},{"start":{"line":294,"column":8},"end":{"line":296,"column":9}}],"line":294},"54":{"loc":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},{"start":{"line":305,"column":12},"end":{"line":321,"column":13}}],"line":305},"55":{"loc":{"start":{"line":305,"column":16},"end":{"line":305,"column":81}},"type":"binary-expr","locations":[{"start":{"line":305,"column":16},"end":{"line":305,"column":49}},{"start":{"line":305,"column":53},"end":{"line":305,"column":81}}],"line":305},"56":{"loc":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},{"start":{"line":313,"column":17},"end":{"line":321,"column":13}}],"line":313},"57":{"loc":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"type":"if","locations":[{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},{"start":{"line":323,"column":12},"end":{"line":329,"column":13}}],"line":323},"58":{"loc":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"type":"if","locations":[{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},{"start":{"line":344,"column":8},"end":{"line":347,"column":9}}],"line":344},"59":{"loc":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"type":"if","locations":[{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},{"start":{"line":365,"column":20},"end":{"line":370,"column":21}}],"line":365}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAwB;AACxB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAG/C,YAAY;AACZ,oDAA2B;AAE3B,oDAA4B;AAC5B,MAAM,kBAAkB,GAAG,gBAAM,CAAC,cAAc,CAAC;AAGjD,mCAAiH;AAGjH,6CAA+B;AAE/B,oC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O,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,OAAO,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAGrC,CAAC;IAIK,mBAAmB,CAAC,MAAc,EAAE,MAAa,EAAE,QAAa;;YACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,QAAQ,CAAC,SAAS,CAChB;oBACE,MAAM;oBACN,MAAM;oBACN,IAAI,EAAE,QAAQ,CAAC,eAAe;iBAC/B,EACD,CAAC,GAAQ,EAAE,MAAW,EAAE,EAAE;oBACxB,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;qBACxB;gBACH,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAID,kBAAe,2BAA2B,CAAC;AAG3C,gFAAgF","sourcesContent":["\nimport Web3 from \"web3\";\nconst { suites } = require('jsonld-signatures')\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\nconst { JCS } = require('jcs')\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n }))\n\n if (!purposeResult.valid) {\n throw Error(purposeResult)\n }\n\n const returnObj = {\n verified: true as boolean,\n results: [\n {\n proof,\n verified,\n verficationMethod: vm,\n purposeResult,\n \n }\n ],\n\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj;\n } catch (error) {\n return { verified: false,\n error: error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"351f9a481af160c0e2a3e3c1355434847998e7e6","contentHash":"80f051015bb5f283a8775bb25607906c9e2500e6ab4c41e3fab37793bda279b5"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"403682b59f606ef0e156c46bc50aa72495e52e83db4cb627ea22402c19e3116e"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":16},"end":{"line":5,"column":30}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9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AAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CAEJ;AAIQ,0CAAe","sourcesContent":["// https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation\n\n\nconst { JCS } = require('jcs')\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ecd53451cb8a4b59f3d5c6a0d0f18152ced7e949","contentHash":"122fdc729852d405c995336375071f0aed5a7f82811606d35cd4898eca473c20"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":21,"column":15},"end":{"line":21,"column":32}},"22":{"start":{"line":22,"column":25},"end":{"line":22,"column":70}},"23":{"start":{"line":23,"column":33},"end":{"line":23,"column":85}},"24":{"start":{"line":24,"column":48},"end":{"line":24,"column":115}},"25":{"start":{"line":27,"column":27},"end":{"line":27,"column":56}},"26":{"start":{"line":28,"column":17},"end":{"line":37,"column":2}},"27":{"start":{"line":38,"column":0},"end":{"line":38,"column":28}},"28":{"start":{"line":39,"column":18},"end":{"line":48,"column":2}},"29":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"30":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"31":{"start":{"line":41,"column":8},"end":{"line":45,"column":10}},"32":{"start":{"line":47,"column":4},"end":{"line":47,"column":35}},"33":{"start":{"line":49,"column":0},"end":{"line":49,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":39,"column":18},"end":{"line":39,"column":19}},"loc":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"line":39},"9":{"name":"(anonymous_9)","decl":{"start":{"line":39,"column":70},"end":{"line":39,"column":71}},"loc":{"start":{"line":39,"column":83},"end":{"line":48,"column":1}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},{"start":{"line":40,"column":4},"end":{"line":46,"column":5}}],"line":40}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":8,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":8,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,8],"7":[8,8],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;AACzD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\nconst jsonld = require('jsonld');\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoaders.node();\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"01c391d5ad03546c4b7858d181b4e60185df2808","contentHash":"6d6590c771aae1a9faef90c6be91b6da8ebdfa7f9339166779e34eafb5cc32ee"}} \ No newline at end of file diff --git a/.nyc_output/acb70a44-2367-45d4-8b18-cd9ac932f10b.json b/.nyc_output/acb70a44-2367-45d4-8b18-cd9ac932f10b.json deleted file mode 100644 index ac72f4d..0000000 --- a/.nyc_output/acb70a44-2367-45d4-8b18-cd9ac932f10b.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"1c7f99d8f7b9d4cb0b676bf67d98ec1e7bf5f7cde5ee3a6a2563bc7b3b060c32"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":39,"column":19},"end":{"line":39,"column":47}},"41":{"start":{"line":41,"column":17},"end":{"line":41,"column":51}},"42":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"43":{"start":{"line":43,"column":27},"end":{"line":43,"column":58}},"44":{"start":{"line":44,"column":17},"end":{"line":44,"column":34}},"45":{"start":{"line":45,"column":14},"end":{"line":45,"column":44}},"46":{"start":{"line":46,"column":16},"end":{"line":46,"column":35}},"47":{"start":{"line":47,"column":22},"end":{"line":47,"column":57}},"48":{"start":{"line":48,"column":13},"end":{"line":48,"column":37}},"49":{"start":{"line":49,"column":23},"end":{"line":49,"column":46}},"50":{"start":{"line":50,"column":18},"end":{"line":60,"column":2}},"51":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"52":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"53":{"start":{"line":52,"column":8},"end":{"line":56,"column":10}},"54":{"start":{"line":59,"column":4},"end":{"line":59,"column":35}},"55":{"start":{"line":61,"column":16},"end":{"line":61,"column":30}},"56":{"start":{"line":63,"column":0},"end":{"line":63,"column":34}},"57":{"start":{"line":67,"column":8},"end":{"line":67,"column":55}},"58":{"start":{"line":68,"column":8},"end":{"line":68,"column":23}},"59":{"start":{"line":69,"column":8},"end":{"line":69,"column":27}},"60":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"61":{"start":{"line":71,"column":12},"end":{"line":71,"column":29}},"62":{"start":{"line":74,"column":12},"end":{"line":74,"column":45}},"63":{"start":{"line":76,"column":39},"end":{"line":76,"column":46}},"64":{"start":{"line":77,"column":8},"end":{"line":79,"column":10}},"65":{"start":{"line":80,"column":8},"end":{"line":80,"column":37}},"66":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"67":{"start":{"line":82,"column":12},"end":{"line":82,"column":33}},"68":{"start":{"line":84,"column":8},"end":{"line":84,"column":46}},"69":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"70":{"start":{"line":88,"column":12},"end":{"line":88,"column":51}},"71":{"start":{"line":90,"column":8},"end":{"line":90,"column":29}},"72":{"start":{"line":93,"column":8},"end":{"line":112,"column":11}},"73":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"74":{"start":{"line":95,"column":16},"end":{"line":95,"column":37}},"75":{"start":{"line":99,"column":16},"end":{"line":99,"column":96}},"76":{"start":{"line":101,"column":29},"end":{"line":101,"column":78}},"77":{"start":{"line":102,"column":27},"end":{"line":102,"column":109}},"78":{"start":{"line":103,"column":12},"end":{"line":103,"column":33}},"79":{"start":{"line":104,"column":28},"end":{"line":104,"column":95}},"80":{"start":{"line":105,"column":12},"end":{"line":105,"column":35}},"81":{"start":{"line":106,"column":12},"end":{"line":106,"column":33}},"82":{"start":{"line":107,"column":12},"end":{"line":111,"column":14}},"83":{"start":{"line":115,"column":24},"end":{"line":115,"column":78}},"84":{"start":{"line":116,"column":8},"end":{"line":116,"column":31}},"85":{"start":{"line":117,"column":8},"end":{"line":117,"column":83}},"86":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"87":{"start":{"line":119,"column":8},"end":{"line":122,"column":10}},"88":{"start":{"line":125,"column":8},"end":{"line":136,"column":11}},"89":{"start":{"line":126,"column":29},"end":{"line":126,"column":83}},"90":{"start":{"line":127,"column":27},"end":{"line":127,"column":104}},"91":{"start":{"line":128,"column":12},"end":{"line":128,"column":33}},"92":{"start":{"line":129,"column":28},"end":{"line":129,"column":95}},"93":{"start":{"line":130,"column":12},"end":{"line":130,"column":35}},"94":{"start":{"line":131,"column":12},"end":{"line":135,"column":14}},"95":{"start":{"line":139,"column":8},"end":{"line":139,"column":44}},"96":{"start":{"line":142,"column":8},"end":{"line":152,"column":11}},"97":{"start":{"line":143,"column":33},"end":{"line":148,"column":14}},"98":{"start":{"line":149,"column":27},"end":{"line":149,"column":64}},"99":{"start":{"line":150,"column":23},"end":{"line":150,"column":50}},"100":{"start":{"line":151,"column":12},"end":{"line":151,"column":38}},"101":{"start":{"line":156,"column":8},"end":{"line":200,"column":11}},"102":{"start":{"line":157,"column":24},"end":{"line":159,"column":13}},"103":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"104":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"105":{"start":{"line":162,"column":16},"end":{"line":162,"column":77}},"106":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"107":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"108":{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},"109":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"110":{"start":{"line":169,"column":16},"end":{"line":169,"column":50}},"111":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"112":{"start":{"line":172,"column":16},"end":{"line":172,"column":37}},"113":{"start":{"line":174,"column":12},"end":{"line":174,"column":66}},"114":{"start":{"line":175,"column":12},"end":{"line":180,"column":15}},"115":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"116":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"117":{"start":{"line":183,"column":36},"end":{"line":183,"column":71}},"118":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"119":{"start":{"line":185,"column":39},"end":{"line":190,"column":13}},"120":{"start":{"line":191,"column":12},"end":{"line":191,"column":101}},"121":{"start":{"line":192,"column":54},"end":{"line":192,"column":122}},"122":{"start":{"line":193,"column":30},"end":{"line":197,"column":13}},"123":{"start":{"line":198,"column":12},"end":{"line":198,"column":49}},"124":{"start":{"line":199,"column":12},"end":{"line":199,"column":25}},"125":{"start":{"line":204,"column":8},"end":{"line":273,"column":11}},"126":{"start":{"line":205,"column":40},"end":{"line":205,"column":47}},"127":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"128":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"129":{"start":{"line":208,"column":36},"end":{"line":208,"column":71}},"130":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"131":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"132":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"133":{"start":{"line":212,"column":20},"end":{"line":212,"column":87}},"134":{"start":{"line":214,"column":16},"end":{"line":214,"column":69}},"135":{"start":{"line":216,"column":41},"end":{"line":221,"column":13}},"136":{"start":{"line":222,"column":12},"end":{"line":272,"column":13}},"137":{"start":{"line":223,"column":58},"end":{"line":226,"column":18}},"138":{"start":{"line":227,"column":27},"end":{"line":227,"column":68}},"139":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"140":{"start":{"line":229,"column":33},"end":{"line":236,"column":18}},"141":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"142":{"start":{"line":238,"column":20},"end":{"line":238,"column":53}},"143":{"start":{"line":240,"column":39},"end":{"line":245,"column":18}},"144":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"145":{"start":{"line":247,"column":20},"end":{"line":247,"column":47}},"146":{"start":{"line":249,"column":34},"end":{"line":263,"column":17}},"147":{"start":{"line":264,"column":16},"end":{"line":266,"column":17}},"148":{"start":{"line":265,"column":20},"end":{"line":265,"column":64}},"149":{"start":{"line":267,"column":16},"end":{"line":267,"column":33}},"150":{"start":{"line":270,"column":16},"end":{"line":271,"column":35}},"151":{"start":{"line":277,"column":8},"end":{"line":277,"column":48}},"152":{"start":{"line":280,"column":8},"end":{"line":280,"column":41}},"153":{"start":{"line":281,"column":8},"end":{"line":281,"column":45}},"154":{"start":{"line":282,"column":8},"end":{"line":282,"column":36}},"155":{"start":{"line":285,"column":8},"end":{"line":291,"column":11}},"156":{"start":{"line":286,"column":40},"end":{"line":286,"column":47}},"157":{"start":{"line":288,"column":34},"end":{"line":288,"column":59}},"158":{"start":{"line":289,"column":37},"end":{"line":289,"column":60}},"159":{"start":{"line":290,"column":12},"end":{"line":290,"column":53}},"160":{"start":{"line":294,"column":33},"end":{"line":294,"column":57}},"161":{"start":{"line":295,"column":8},"end":{"line":297,"column":9}},"162":{"start":{"line":296,"column":12},"end":{"line":296,"column":55}},"163":{"start":{"line":298,"column":8},"end":{"line":300,"column":9}},"164":{"start":{"line":299,"column":12},"end":{"line":299,"column":71}},"165":{"start":{"line":302,"column":8},"end":{"line":302,"column":34}},"166":{"start":{"line":305,"column":8},"end":{"line":335,"column":11}},"167":{"start":{"line":306,"column":42},"end":{"line":306,"column":49}},"168":{"start":{"line":309,"column":12},"end":{"line":325,"column":13}},"169":{"start":{"line":311,"column":29},"end":{"line":311,"column":70}},"170":{"start":{"line":312,"column":31},"end":{"line":312,"column":65}},"171":{"start":{"line":313,"column":31},"end":{"line":313,"column":53}},"172":{"start":{"line":315,"column":16},"end":{"line":315,"column":97}},"173":{"start":{"line":317,"column":17},"end":{"line":325,"column":13}},"174":{"start":{"line":318,"column":16},"end":{"line":318,"column":76}},"175":{"start":{"line":323,"column":20},"end":{"line":323,"column":160}},"176":{"start":{"line":326,"column":12},"end":{"line":326,"column":55}},"177":{"start":{"line":327,"column":12},"end":{"line":333,"column":13}},"178":{"start":{"line":328,"column":16},"end":{"line":332,"column":18}},"179":{"start":{"line":334,"column":12},"end":{"line":334,"column":25}},"180":{"start":{"line":338,"column":33},"end":{"line":346,"column":10}},"181":{"start":{"line":348,"column":8},"end":{"line":351,"column":9}},"182":{"start":{"line":350,"column":12},"end":{"line":350,"column":24}},"183":{"start":{"line":352,"column":8},"end":{"line":352,"column":21}},"184":{"start":{"line":355,"column":25},"end":{"line":355,"column":39}},"185":{"start":{"line":357,"column":22},"end":{"line":357,"column":51}},"186":{"start":{"line":358,"column":8},"end":{"line":358,"column":40}},"187":{"start":{"line":359,"column":8},"end":{"line":359,"column":43}},"188":{"start":{"line":362,"column":8},"end":{"line":377,"column":11}},"189":{"start":{"line":363,"column":12},"end":{"line":376,"column":15}},"190":{"start":{"line":364,"column":16},"end":{"line":375,"column":19}},"191":{"start":{"line":369,"column":20},"end":{"line":374,"column":21}},"192":{"start":{"line":370,"column":24},"end":{"line":370,"column":36}},"193":{"start":{"line":373,"column":24},"end":{"line":373,"column":47}},"194":{"start":{"line":380,"column":0},"end":{"line":380,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":50,"column":18},"end":{"line":50,"column":19}},"loc":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"line":50},"15":{"name":"(anonymous_15)","decl":{"start":{"line":50,"column":70},"end":{"line":50,"column":71}},"loc":{"start":{"line":50,"column":83},"end":{"line":60,"column":1}},"line":50},"16":{"name":"(anonymous_16)","decl":{"start":{"line":65,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":65,"column":31},"end":{"line":85,"column":5}},"line":65},"17":{"name":"(anonymous_17)","decl":{"start":{"line":86,"column":4},"end":{"line":86,"column":5}},"loc":{"start":{"line":86,"column":18},"end":{"line":91,"column":5}},"line":86},"18":{"name":"(anonymous_18)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":26},"end":{"line":113,"column":5}},"line":92},"19":{"name":"(anonymous_19)","decl":{"start":{"line":93,"column":47},"end":{"line":93,"column":48}},"loc":{"start":{"line":93,"column":60},"end":{"line":112,"column":9}},"line":93},"20":{"name":"(anonymous_20)","decl":{"start":{"line":114,"column":4},"end":{"line":114,"column":5}},"loc":{"start":{"line":114,"column":31},"end":{"line":123,"column":5}},"line":114},"21":{"name":"(anonymous_21)","decl":{"start":{"line":124,"column":4},"end":{"line":124,"column":5}},"loc":{"start":{"line":124,"column":25},"end":{"line":137,"column":5}},"line":124},"22":{"name":"(anonymous_22)","decl":{"start":{"line":125,"column":47},"end":{"line":125,"column":48}},"loc":{"start":{"line":125,"column":60},"end":{"line":136,"column":9}},"line":125},"23":{"name":"(anonymous_23)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":5}},"loc":{"start":{"line":138,"column":12},"end":{"line":140,"column":5}},"line":138},"24":{"name":"(anonymous_24)","decl":{"start":{"line":141,"column":4},"end":{"line":141,"column":5}},"loc":{"start":{"line":141,"column":34},"end":{"line":153,"column":5}},"line":141},"25":{"name":"(anonymous_25)","decl":{"start":{"line":142,"column":47},"end":{"line":142,"column":48}},"loc":{"start":{"line":142,"column":60},"end":{"line":152,"column":9}},"line":142},"26":{"name":"(anonymous_26)","decl":{"start":{"line":154,"column":4},"end":{"line":154,"column":5}},"loc":{"start":{"line":154,"column":25},"end":{"line":201,"column":5}},"line":154},"27":{"name":"(anonymous_27)","decl":{"start":{"line":156,"column":47},"end":{"line":156,"column":48}},"loc":{"start":{"line":156,"column":60},"end":{"line":200,"column":9}},"line":156},"28":{"name":"(anonymous_28)","decl":{"start":{"line":202,"column":4},"end":{"line":202,"column":5}},"loc":{"start":{"line":202,"column":25},"end":{"line":274,"column":5}},"line":202},"29":{"name":"(anonymous_29)","decl":{"start":{"line":204,"column":47},"end":{"line":204,"column":48}},"loc":{"start":{"line":204,"column":60},"end":{"line":273,"column":9}},"line":204},"30":{"name":"(anonymous_30)","decl":{"start":{"line":275,"column":4},"end":{"line":275,"column":5}},"loc":{"start":{"line":275,"column":20},"end":{"line":278,"column":5}},"line":275},"31":{"name":"(anonymous_31)","decl":{"start":{"line":279,"column":4},"end":{"line":279,"column":5}},"loc":{"start":{"line":279,"column":25},"end":{"line":283,"column":5}},"line":279},"32":{"name":"(anonymous_32)","decl":{"start":{"line":284,"column":4},"end":{"line":284,"column":5}},"loc":{"start":{"line":284,"column":30},"end":{"line":292,"column":5}},"line":284},"33":{"name":"(anonymous_33)","decl":{"start":{"line":285,"column":47},"end":{"line":285,"column":48}},"loc":{"start":{"line":285,"column":60},"end":{"line":291,"column":9}},"line":285},"34":{"name":"(anonymous_34)","decl":{"start":{"line":293,"column":4},"end":{"line":293,"column":5}},"loc":{"start":{"line":293,"column":33},"end":{"line":303,"column":5}},"line":293},"35":{"name":"(anonymous_35)","decl":{"start":{"line":304,"column":4},"end":{"line":304,"column":5}},"loc":{"start":{"line":304,"column":18},"end":{"line":336,"column":5}},"line":304},"36":{"name":"(anonymous_36)","decl":{"start":{"line":305,"column":47},"end":{"line":305,"column":48}},"loc":{"start":{"line":305,"column":60},"end":{"line":335,"column":9}},"line":305},"37":{"name":"(anonymous_37)","decl":{"start":{"line":337,"column":4},"end":{"line":337,"column":5}},"loc":{"start":{"line":337,"column":29},"end":{"line":353,"column":5}},"line":337},"38":{"name":"(anonymous_38)","decl":{"start":{"line":354,"column":4},"end":{"line":354,"column":5}},"loc":{"start":{"line":354,"column":31},"end":{"line":360,"column":5}},"line":354},"39":{"name":"(anonymous_39)","decl":{"start":{"line":361,"column":4},"end":{"line":361,"column":5}},"loc":{"start":{"line":361,"column":50},"end":{"line":378,"column":5}},"line":361},"40":{"name":"(anonymous_40)","decl":{"start":{"line":362,"column":47},"end":{"line":362,"column":48}},"loc":{"start":{"line":362,"column":60},"end":{"line":377,"column":9}},"line":362},"41":{"name":"(anonymous_41)","decl":{"start":{"line":363,"column":31},"end":{"line":363,"column":32}},"loc":{"start":{"line":363,"column":52},"end":{"line":376,"column":13}},"line":363},"42":{"name":"(anonymous_42)","decl":{"start":{"line":368,"column":19},"end":{"line":368,"column":20}},"loc":{"start":{"line":368,"column":36},"end":{"line":375,"column":17}},"line":368}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},{"start":{"line":51,"column":4},"end":{"line":57,"column":5}}],"line":51},"25":{"loc":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},{"start":{"line":70,"column":8},"end":{"line":75,"column":9}}],"line":70},"26":{"loc":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},{"start":{"line":81,"column":8},"end":{"line":83,"column":9}}],"line":81},"27":{"loc":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},{"start":{"line":87,"column":8},"end":{"line":89,"column":9}}],"line":87},"28":{"loc":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},{"start":{"line":94,"column":12},"end":{"line":100,"column":13}}],"line":94},"29":{"loc":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"type":"cond-expr","locations":[{"start":{"line":160,"column":40},"end":{"line":160,"column":53}},{"start":{"line":160,"column":56},"end":{"line":160,"column":60}}],"line":160},"30":{"loc":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"type":"if","locations":[{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},{"start":{"line":161,"column":12},"end":{"line":163,"column":13}}],"line":161},"31":{"loc":{"start":{"line":161,"column":16},"end":{"line":161,"column":106}},"type":"binary-expr","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":56}},{"start":{"line":161,"column":60},"end":{"line":161,"column":106}}],"line":161},"32":{"loc":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"type":"cond-expr","locations":[{"start":{"line":164,"column":38},"end":{"line":164,"column":70}},{"start":{"line":164,"column":73},"end":{"line":164,"column":82}}],"line":164},"33":{"loc":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},{"start":{"line":165,"column":12},"end":{"line":167,"column":13}}],"line":165},"34":{"loc":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"type":"if","locations":[{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},{"start":{"line":168,"column":12},"end":{"line":170,"column":13}}],"line":168},"35":{"loc":{"start":{"line":168,"column":16},"end":{"line":168,"column":62}},"type":"binary-expr","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},{"start":{"line":168,"column":38},"end":{"line":168,"column":62}}],"line":168},"36":{"loc":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"type":"if","locations":[{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},{"start":{"line":171,"column":12},"end":{"line":173,"column":13}}],"line":171},"37":{"loc":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"type":"cond-expr","locations":[{"start":{"line":181,"column":42},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":61}}],"line":181},"38":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"type":"cond-expr","locations":[{"start":{"line":182,"column":87},"end":{"line":182,"column":89}},{"start":{"line":182,"column":92},"end":{"line":182,"column":102}}],"line":182},"39":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":84}},"type":"binary-expr","locations":[{"start":{"line":182,"column":32},"end":{"line":182,"column":67}},{"start":{"line":182,"column":71},"end":{"line":182,"column":84}}],"line":182},"40":{"loc":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"type":"cond-expr","locations":[{"start":{"line":184,"column":40},"end":{"line":184,"column":53}},{"start":{"line":184,"column":56},"end":{"line":184,"column":116}}],"line":184},"41":{"loc":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"type":"cond-expr","locations":[{"start":{"line":206,"column":42},"end":{"line":206,"column":56}},{"start":{"line":206,"column":59},"end":{"line":206,"column":61}}],"line":206},"42":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"type":"cond-expr","locations":[{"start":{"line":207,"column":87},"end":{"line":207,"column":89}},{"start":{"line":207,"column":92},"end":{"line":207,"column":102}}],"line":207},"43":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":84}},"type":"binary-expr","locations":[{"start":{"line":207,"column":32},"end":{"line":207,"column":67}},{"start":{"line":207,"column":71},"end":{"line":207,"column":84}}],"line":207},"44":{"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"type":"cond-expr","locations":[{"start":{"line":209,"column":40},"end":{"line":209,"column":53}},{"start":{"line":209,"column":56},"end":{"line":209,"column":116}}],"line":209},"45":{"loc":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"type":"if","locations":[{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},{"start":{"line":210,"column":12},"end":{"line":215,"column":13}}],"line":210},"46":{"loc":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"type":"if","locations":[{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},{"start":{"line":211,"column":16},"end":{"line":213,"column":17}}],"line":211},"47":{"loc":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"type":"cond-expr","locations":[{"start":{"line":228,"column":82},"end":{"line":228,"column":156}},{"start":{"line":228,"column":159},"end":{"line":228,"column":163}}],"line":228},"48":{"loc":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"type":"if","locations":[{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},{"start":{"line":237,"column":16},"end":{"line":239,"column":17}}],"line":237},"49":{"loc":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"type":"if","locations":[{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},{"start":{"line":246,"column":16},"end":{"line":248,"column":17}}],"line":246},"50":{"loc":{"start":{"line":264,"column":16},"end":{"line":266,"column":17}},"type":"if","locations":[{"start":{"line":264,"column":16},"end":{"line":266,"column":17}},{"start":{"line":264,"column":16},"end":{"line":266,"column":17}}],"line":264},"51":{"loc":{"start":{"line":264,"column":20},"end":{"line":264,"column":88}},"type":"binary-expr","locations":[{"start":{"line":264,"column":20},"end":{"line":264,"column":46}},{"start":{"line":264,"column":50},"end":{"line":264,"column":88}}],"line":264},"52":{"loc":{"start":{"line":295,"column":8},"end":{"line":297,"column":9}},"type":"if","locations":[{"start":{"line":295,"column":8},"end":{"line":297,"column":9}},{"start":{"line":295,"column":8},"end":{"line":297,"column":9}}],"line":295},"53":{"loc":{"start":{"line":298,"column":8},"end":{"line":300,"column":9}},"type":"if","locations":[{"start":{"line":298,"column":8},"end":{"line":300,"column":9}},{"start":{"line":298,"column":8},"end":{"line":300,"column":9}}],"line":298},"54":{"loc":{"start":{"line":309,"column":12},"end":{"line":325,"column":13}},"type":"if","locations":[{"start":{"line":309,"column":12},"end":{"line":325,"column":13}},{"start":{"line":309,"column":12},"end":{"line":325,"column":13}}],"line":309},"55":{"loc":{"start":{"line":309,"column":16},"end":{"line":309,"column":81}},"type":"binary-expr","locations":[{"start":{"line":309,"column":16},"end":{"line":309,"column":49}},{"start":{"line":309,"column":53},"end":{"line":309,"column":81}}],"line":309},"56":{"loc":{"start":{"line":317,"column":17},"end":{"line":325,"column":13}},"type":"if","locations":[{"start":{"line":317,"column":17},"end":{"line":325,"column":13}},{"start":{"line":317,"column":17},"end":{"line":325,"column":13}}],"line":317},"57":{"loc":{"start":{"line":327,"column":12},"end":{"line":333,"column":13}},"type":"if","locations":[{"start":{"line":327,"column":12},"end":{"line":333,"column":13}},{"start":{"line":327,"column":12},"end":{"line":333,"column":13}}],"line":327},"58":{"loc":{"start":{"line":348,"column":8},"end":{"line":351,"column":9}},"type":"if","locations":[{"start":{"line":348,"column":8},"end":{"line":351,"column":9}},{"start":{"line":348,"column":8},"end":{"line":351,"column":9}}],"line":348},"59":{"loc":{"start":{"line":369,"column":20},"end":{"line":374,"column":21}},"type":"if","locations":[{"start":{"line":369,"column":20},"end":{"line":374,"column":21}},{"start":{"line":369,"column":20},"end":{"line":374,"column":21}}],"line":369}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/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SAAS;SAC1B,CACF,CAAC;QAEF,wCAAwC;QAExC,IACE,gBAAgB,CAAC,WAAW,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,WAAW,EAAE,EACpE;YACA,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,qBAAqB,CAAC,GAAW;QAE/B,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,qBAAqB;QACrB,IAAI,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5C,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,OAAO,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAGrC,CAAC;IAIK,mBAAmB,CAAC,MAAc,EAAE,MAAa,EAAE,QAAa;;YACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,QAAQ,CAAC,SAAS,CAChB;oBACE,MAAM;oBACN,MAAM;oBACN,IAAI,EAAE,QAAQ,CAAC,eAAe;iBAC/B,EACD,CAAC,GAAQ,EAAE,MAAW,EAAE,EAAE;oBACxB,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;qBACxB;gBACH,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAID,kBAAe,2BAA2B,CAAC;AAG3C,gFAAgF","sourcesContent":["\nimport Web3 from \"web3\";\nconst { suites } = require('jsonld-signatures')\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\nconst { JCS } = require('jcs')\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n }))\n\n if (!purposeResult.valid) {\n throw Error(purposeResult)\n }\n\n const returnObj = {\n verified: true,\n results: [\n {\n proof,\n verified,\n verficationMethod: vm,\n purposeResult: {valid:purposeResult.valid},\n \n }\n ],\n statusResult: {\n canonicalizationHashVerified,\n signatureVerified: verified,\n }\n\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj;\n } catch (error) {\n return { verified: false,\n error: error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"e43201a1e0a289e97e230013881e414e9fc95164","contentHash":"b5ac0bac5006c39fdabdde5e1f3c8f207b4ceece9fc9e2125fdb4cd54c83c8ea"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"403682b59f606ef0e156c46bc50aa72495e52e83db4cb627ea22402c19e3116e"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":16},"end":{"line":5,"column":30}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9B,4BAA4B;AAE5B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAA;AAKjC,MAAM,eAAe;IAArB;QACY,SAAI,GAAwB,IAAI,GAAG,EAAkB,CAAA;QAC7D,gBAAW,GAAQ,EAAE,CAAA;IAsHzB,CAAC;IArHW,GAAG,CAAC,KAAU,EAAE,IAAY,EAAE,WAAgB;QAClD,IAAI,GAAG,GAAQ,EAAE,CAAA;QACjB,IAAI,KAAK,GAAG,EAAE,CAAA;QACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAErB,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;YAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBACtC,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;gBAE9B,IAAI,IAAI,IAAI,QAAQ,EAAE;oBAClB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,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AAC,KAAU,EAAE,WAAoB;QAGjD,IAAI,WAAW,IAAI,SAAS,EAAE;YAC1B,WAAW,GAAG,UAAU,CAAA;SAC3B;QACD,gHAAgH;QAGhH,8BAA8B;QAC9B,YAAY;QACZ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;QACxC,IAAI,GAAG,GAAQ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QAEnC,YAAY;QACZ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAIrC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CAEJ;AAIQ,0CAAe","sourcesContent":["// https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation\n\n\nconst { JCS } = require('jcs')\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ecd53451cb8a4b59f3d5c6a0d0f18152ced7e949","contentHash":"122fdc729852d405c995336375071f0aed5a7f82811606d35cd4898eca473c20"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":21,"column":15},"end":{"line":21,"column":32}},"22":{"start":{"line":22,"column":25},"end":{"line":22,"column":70}},"23":{"start":{"line":23,"column":33},"end":{"line":23,"column":85}},"24":{"start":{"line":24,"column":48},"end":{"line":24,"column":115}},"25":{"start":{"line":27,"column":27},"end":{"line":27,"column":56}},"26":{"start":{"line":28,"column":17},"end":{"line":37,"column":2}},"27":{"start":{"line":38,"column":0},"end":{"line":38,"column":28}},"28":{"start":{"line":39,"column":18},"end":{"line":48,"column":2}},"29":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"30":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"31":{"start":{"line":41,"column":8},"end":{"line":45,"column":10}},"32":{"start":{"line":47,"column":4},"end":{"line":47,"column":35}},"33":{"start":{"line":49,"column":0},"end":{"line":49,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":39,"column":18},"end":{"line":39,"column":19}},"loc":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"line":39},"9":{"name":"(anonymous_9)","decl":{"start":{"line":39,"column":70},"end":{"line":39,"column":71}},"loc":{"start":{"line":39,"column":83},"end":{"line":48,"column":1}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},{"start":{"line":40,"column":4},"end":{"line":46,"column":5}}],"line":40}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":8,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":8,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,8],"7":[8,8],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;AACzD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\nconst jsonld = require('jsonld');\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoaders.node();\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"01c391d5ad03546c4b7858d181b4e60185df2808","contentHash":"6d6590c771aae1a9faef90c6be91b6da8ebdfa7f9339166779e34eafb5cc32ee"}} \ No newline at end of file diff --git a/.nyc_output/d24c19a2-493f-4f7b-b271-8e87167b6445.json b/.nyc_output/d24c19a2-493f-4f7b-b271-8e87167b6445.json deleted file mode 100644 index e066347..0000000 --- a/.nyc_output/d24c19a2-493f-4f7b-b271-8e87167b6445.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"1c7f99d8f7b9d4cb0b676bf67d98ec1e7bf5f7cde5ee3a6a2563bc7b3b060c32"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":39,"column":19},"end":{"line":39,"column":47}},"41":{"start":{"line":41,"column":17},"end":{"line":41,"column":51}},"42":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"43":{"start":{"line":43,"column":27},"end":{"line":43,"column":58}},"44":{"start":{"line":44,"column":17},"end":{"line":44,"column":34}},"45":{"start":{"line":45,"column":14},"end":{"line":45,"column":44}},"46":{"start":{"line":46,"column":16},"end":{"line":46,"column":35}},"47":{"start":{"line":47,"column":22},"end":{"line":47,"column":57}},"48":{"start":{"line":48,"column":13},"end":{"line":48,"column":37}},"49":{"start":{"line":49,"column":23},"end":{"line":49,"column":46}},"50":{"start":{"line":50,"column":18},"end":{"line":60,"column":2}},"51":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"52":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"53":{"start":{"line":52,"column":8},"end":{"line":56,"column":10}},"54":{"start":{"line":59,"column":4},"end":{"line":59,"column":35}},"55":{"start":{"line":61,"column":16},"end":{"line":61,"column":30}},"56":{"start":{"line":63,"column":0},"end":{"line":63,"column":34}},"57":{"start":{"line":67,"column":8},"end":{"line":67,"column":55}},"58":{"start":{"line":68,"column":8},"end":{"line":68,"column":23}},"59":{"start":{"line":69,"column":8},"end":{"line":69,"column":27}},"60":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"61":{"start":{"line":71,"column":12},"end":{"line":71,"column":29}},"62":{"start":{"line":74,"column":12},"end":{"line":74,"column":45}},"63":{"start":{"line":76,"column":39},"end":{"line":76,"column":46}},"64":{"start":{"line":77,"column":8},"end":{"line":79,"column":10}},"65":{"start":{"line":80,"column":8},"end":{"line":80,"column":37}},"66":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"67":{"start":{"line":82,"column":12},"end":{"line":82,"column":33}},"68":{"start":{"line":84,"column":8},"end":{"line":84,"column":46}},"69":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"70":{"start":{"line":88,"column":12},"end":{"line":88,"column":51}},"71":{"start":{"line":90,"column":8},"end":{"line":90,"column":29}},"72":{"start":{"line":93,"column":8},"end":{"line":112,"column":11}},"73":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"74":{"start":{"line":95,"column":16},"end":{"line":95,"column":37}},"75":{"start":{"line":99,"column":16},"end":{"line":99,"column":96}},"76":{"start":{"line":101,"column":29},"end":{"line":101,"column":78}},"77":{"start":{"line":102,"column":27},"end":{"line":102,"column":109}},"78":{"start":{"line":103,"column":12},"end":{"line":103,"column":33}},"79":{"start":{"line":104,"column":28},"end":{"line":104,"column":95}},"80":{"start":{"line":105,"column":12},"end":{"line":105,"column":35}},"81":{"start":{"line":106,"column":12},"end":{"line":106,"column":33}},"82":{"start":{"line":107,"column":12},"end":{"line":111,"column":14}},"83":{"start":{"line":115,"column":24},"end":{"line":115,"column":78}},"84":{"start":{"line":116,"column":8},"end":{"line":116,"column":31}},"85":{"start":{"line":117,"column":8},"end":{"line":117,"column":83}},"86":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"87":{"start":{"line":119,"column":8},"end":{"line":122,"column":10}},"88":{"start":{"line":125,"column":8},"end":{"line":136,"column":11}},"89":{"start":{"line":126,"column":29},"end":{"line":126,"column":83}},"90":{"start":{"line":127,"column":27},"end":{"line":127,"column":104}},"91":{"start":{"line":128,"column":12},"end":{"line":128,"column":33}},"92":{"start":{"line":129,"column":28},"end":{"line":129,"column":95}},"93":{"start":{"line":130,"column":12},"end":{"line":130,"column":35}},"94":{"start":{"line":131,"column":12},"end":{"line":135,"column":14}},"95":{"start":{"line":139,"column":8},"end":{"line":139,"column":44}},"96":{"start":{"line":142,"column":8},"end":{"line":152,"column":11}},"97":{"start":{"line":143,"column":33},"end":{"line":148,"column":14}},"98":{"start":{"line":149,"column":27},"end":{"line":149,"column":64}},"99":{"start":{"line":150,"column":23},"end":{"line":150,"column":50}},"100":{"start":{"line":151,"column":12},"end":{"line":151,"column":38}},"101":{"start":{"line":156,"column":8},"end":{"line":200,"column":11}},"102":{"start":{"line":157,"column":24},"end":{"line":159,"column":13}},"103":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"104":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"105":{"start":{"line":162,"column":16},"end":{"line":162,"column":77}},"106":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"107":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"108":{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},"109":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"110":{"start":{"line":169,"column":16},"end":{"line":169,"column":50}},"111":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"112":{"start":{"line":172,"column":16},"end":{"line":172,"column":37}},"113":{"start":{"line":174,"column":12},"end":{"line":174,"column":66}},"114":{"start":{"line":175,"column":12},"end":{"line":180,"column":15}},"115":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"116":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"117":{"start":{"line":183,"column":36},"end":{"line":183,"column":71}},"118":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"119":{"start":{"line":185,"column":39},"end":{"line":190,"column":13}},"120":{"start":{"line":191,"column":12},"end":{"line":191,"column":101}},"121":{"start":{"line":192,"column":54},"end":{"line":192,"column":122}},"122":{"start":{"line":193,"column":30},"end":{"line":197,"column":13}},"123":{"start":{"line":198,"column":12},"end":{"line":198,"column":49}},"124":{"start":{"line":199,"column":12},"end":{"line":199,"column":25}},"125":{"start":{"line":204,"column":8},"end":{"line":269,"column":11}},"126":{"start":{"line":205,"column":40},"end":{"line":205,"column":47}},"127":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"128":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"129":{"start":{"line":208,"column":36},"end":{"line":208,"column":71}},"130":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"131":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"132":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"133":{"start":{"line":212,"column":20},"end":{"line":212,"column":87}},"134":{"start":{"line":214,"column":16},"end":{"line":214,"column":69}},"135":{"start":{"line":216,"column":41},"end":{"line":221,"column":13}},"136":{"start":{"line":222,"column":12},"end":{"line":268,"column":13}},"137":{"start":{"line":223,"column":58},"end":{"line":226,"column":18}},"138":{"start":{"line":227,"column":27},"end":{"line":227,"column":68}},"139":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"140":{"start":{"line":229,"column":33},"end":{"line":236,"column":18}},"141":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"142":{"start":{"line":238,"column":20},"end":{"line":238,"column":53}},"143":{"start":{"line":240,"column":39},"end":{"line":245,"column":18}},"144":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"145":{"start":{"line":247,"column":20},"end":{"line":247,"column":47}},"146":{"start":{"line":249,"column":34},"end":{"line":259,"column":17}},"147":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"148":{"start":{"line":261,"column":20},"end":{"line":261,"column":64}},"149":{"start":{"line":263,"column":16},"end":{"line":263,"column":33}},"150":{"start":{"line":266,"column":16},"end":{"line":267,"column":35}},"151":{"start":{"line":273,"column":8},"end":{"line":273,"column":48}},"152":{"start":{"line":276,"column":8},"end":{"line":276,"column":41}},"153":{"start":{"line":277,"column":8},"end":{"line":277,"column":45}},"154":{"start":{"line":278,"column":8},"end":{"line":278,"column":36}},"155":{"start":{"line":281,"column":8},"end":{"line":287,"column":11}},"156":{"start":{"line":282,"column":40},"end":{"line":282,"column":47}},"157":{"start":{"line":284,"column":34},"end":{"line":284,"column":59}},"158":{"start":{"line":285,"column":37},"end":{"line":285,"column":60}},"159":{"start":{"line":286,"column":12},"end":{"line":286,"column":53}},"160":{"start":{"line":290,"column":33},"end":{"line":290,"column":57}},"161":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"162":{"start":{"line":292,"column":12},"end":{"line":292,"column":55}},"163":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"164":{"start":{"line":295,"column":12},"end":{"line":295,"column":71}},"165":{"start":{"line":298,"column":8},"end":{"line":298,"column":34}},"166":{"start":{"line":301,"column":8},"end":{"line":331,"column":11}},"167":{"start":{"line":302,"column":42},"end":{"line":302,"column":49}},"168":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"169":{"start":{"line":307,"column":29},"end":{"line":307,"column":70}},"170":{"start":{"line":308,"column":31},"end":{"line":308,"column":65}},"171":{"start":{"line":309,"column":31},"end":{"line":309,"column":53}},"172":{"start":{"line":311,"column":16},"end":{"line":311,"column":97}},"173":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"174":{"start":{"line":314,"column":16},"end":{"line":314,"column":76}},"175":{"start":{"line":319,"column":20},"end":{"line":319,"column":160}},"176":{"start":{"line":322,"column":12},"end":{"line":322,"column":55}},"177":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"178":{"start":{"line":324,"column":16},"end":{"line":328,"column":18}},"179":{"start":{"line":330,"column":12},"end":{"line":330,"column":25}},"180":{"start":{"line":334,"column":33},"end":{"line":342,"column":10}},"181":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"182":{"start":{"line":346,"column":12},"end":{"line":346,"column":24}},"183":{"start":{"line":348,"column":8},"end":{"line":348,"column":21}},"184":{"start":{"line":351,"column":25},"end":{"line":351,"column":39}},"185":{"start":{"line":353,"column":22},"end":{"line":353,"column":51}},"186":{"start":{"line":354,"column":8},"end":{"line":354,"column":40}},"187":{"start":{"line":355,"column":8},"end":{"line":355,"column":43}},"188":{"start":{"line":358,"column":8},"end":{"line":373,"column":11}},"189":{"start":{"line":359,"column":12},"end":{"line":372,"column":15}},"190":{"start":{"line":360,"column":16},"end":{"line":371,"column":19}},"191":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"192":{"start":{"line":366,"column":24},"end":{"line":366,"column":36}},"193":{"start":{"line":369,"column":24},"end":{"line":369,"column":47}},"194":{"start":{"line":376,"column":0},"end":{"line":376,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":50,"column":18},"end":{"line":50,"column":19}},"loc":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"line":50},"15":{"name":"(anonymous_15)","decl":{"start":{"line":50,"column":70},"end":{"line":50,"column":71}},"loc":{"start":{"line":50,"column":83},"end":{"line":60,"column":1}},"line":50},"16":{"name":"(anonymous_16)","decl":{"start":{"line":65,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":65,"column":31},"end":{"line":85,"column":5}},"line":65},"17":{"name":"(anonymous_17)","decl":{"start":{"line":86,"column":4},"end":{"line":86,"column":5}},"loc":{"start":{"line":86,"column":18},"end":{"line":91,"column":5}},"line":86},"18":{"name":"(anonymous_18)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":26},"end":{"line":113,"column":5}},"line":92},"19":{"name":"(anonymous_19)","decl":{"start":{"line":93,"column":47},"end":{"line":93,"column":48}},"loc":{"start":{"line":93,"column":60},"end":{"line":112,"column":9}},"line":93},"20":{"name":"(anonymous_20)","decl":{"start":{"line":114,"column":4},"end":{"line":114,"column":5}},"loc":{"start":{"line":114,"column":31},"end":{"line":123,"column":5}},"line":114},"21":{"name":"(anonymous_21)","decl":{"start":{"line":124,"column":4},"end":{"line":124,"column":5}},"loc":{"start":{"line":124,"column":25},"end":{"line":137,"column":5}},"line":124},"22":{"name":"(anonymous_22)","decl":{"start":{"line":125,"column":47},"end":{"line":125,"column":48}},"loc":{"start":{"line":125,"column":60},"end":{"line":136,"column":9}},"line":125},"23":{"name":"(anonymous_23)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":5}},"loc":{"start":{"line":138,"column":12},"end":{"line":140,"column":5}},"line":138},"24":{"name":"(anonymous_24)","decl":{"start":{"line":141,"column":4},"end":{"line":141,"column":5}},"loc":{"start":{"line":141,"column":34},"end":{"line":153,"column":5}},"line":141},"25":{"name":"(anonymous_25)","decl":{"start":{"line":142,"column":47},"end":{"line":142,"column":48}},"loc":{"start":{"line":142,"column":60},"end":{"line":152,"column":9}},"line":142},"26":{"name":"(anonymous_26)","decl":{"start":{"line":154,"column":4},"end":{"line":154,"column":5}},"loc":{"start":{"line":154,"column":25},"end":{"line":201,"column":5}},"line":154},"27":{"name":"(anonymous_27)","decl":{"start":{"line":156,"column":47},"end":{"line":156,"column":48}},"loc":{"start":{"line":156,"column":60},"end":{"line":200,"column":9}},"line":156},"28":{"name":"(anonymous_28)","decl":{"start":{"line":202,"column":4},"end":{"line":202,"column":5}},"loc":{"start":{"line":202,"column":25},"end":{"line":270,"column":5}},"line":202},"29":{"name":"(anonymous_29)","decl":{"start":{"line":204,"column":47},"end":{"line":204,"column":48}},"loc":{"start":{"line":204,"column":60},"end":{"line":269,"column":9}},"line":204},"30":{"name":"(anonymous_30)","decl":{"start":{"line":271,"column":4},"end":{"line":271,"column":5}},"loc":{"start":{"line":271,"column":20},"end":{"line":274,"column":5}},"line":271},"31":{"name":"(anonymous_31)","decl":{"start":{"line":275,"column":4},"end":{"line":275,"column":5}},"loc":{"start":{"line":275,"column":25},"end":{"line":279,"column":5}},"line":275},"32":{"name":"(anonymous_32)","decl":{"start":{"line":280,"column":4},"end":{"line":280,"column":5}},"loc":{"start":{"line":280,"column":30},"end":{"line":288,"column":5}},"line":280},"33":{"name":"(anonymous_33)","decl":{"start":{"line":281,"column":47},"end":{"line":281,"column":48}},"loc":{"start":{"line":281,"column":60},"end":{"line":287,"column":9}},"line":281},"34":{"name":"(anonymous_34)","decl":{"start":{"line":289,"column":4},"end":{"line":289,"column":5}},"loc":{"start":{"line":289,"column":33},"end":{"line":299,"column":5}},"line":289},"35":{"name":"(anonymous_35)","decl":{"start":{"line":300,"column":4},"end":{"line":300,"column":5}},"loc":{"start":{"line":300,"column":18},"end":{"line":332,"column":5}},"line":300},"36":{"name":"(anonymous_36)","decl":{"start":{"line":301,"column":47},"end":{"line":301,"column":48}},"loc":{"start":{"line":301,"column":60},"end":{"line":331,"column":9}},"line":301},"37":{"name":"(anonymous_37)","decl":{"start":{"line":333,"column":4},"end":{"line":333,"column":5}},"loc":{"start":{"line":333,"column":29},"end":{"line":349,"column":5}},"line":333},"38":{"name":"(anonymous_38)","decl":{"start":{"line":350,"column":4},"end":{"line":350,"column":5}},"loc":{"start":{"line":350,"column":31},"end":{"line":356,"column":5}},"line":350},"39":{"name":"(anonymous_39)","decl":{"start":{"line":357,"column":4},"end":{"line":357,"column":5}},"loc":{"start":{"line":357,"column":50},"end":{"line":374,"column":5}},"line":357},"40":{"name":"(anonymous_40)","decl":{"start":{"line":358,"column":47},"end":{"line":358,"column":48}},"loc":{"start":{"line":358,"column":60},"end":{"line":373,"column":9}},"line":358},"41":{"name":"(anonymous_41)","decl":{"start":{"line":359,"column":31},"end":{"line":359,"column":32}},"loc":{"start":{"line":359,"column":52},"end":{"line":372,"column":13}},"line":359},"42":{"name":"(anonymous_42)","decl":{"start":{"line":364,"column":19},"end":{"line":364,"column":20}},"loc":{"start":{"line":364,"column":36},"end":{"line":371,"column":17}},"line":364}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},{"start":{"line":51,"column":4},"end":{"line":57,"column":5}}],"line":51},"25":{"loc":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},{"start":{"line":70,"column":8},"end":{"line":75,"column":9}}],"line":70},"26":{"loc":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},{"start":{"line":81,"column":8},"end":{"line":83,"column":9}}],"line":81},"27":{"loc":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},{"start":{"line":87,"column":8},"end":{"line":89,"column":9}}],"line":87},"28":{"loc":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},{"start":{"line":94,"column":12},"end":{"line":100,"column":13}}],"line":94},"29":{"loc":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"type":"cond-expr","locations":[{"start":{"line":160,"column":40},"end":{"line":160,"column":53}},{"start":{"line":160,"column":56},"end":{"line":160,"column":60}}],"line":160},"30":{"loc":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"type":"if","locations":[{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},{"start":{"line":161,"column":12},"end":{"line":163,"column":13}}],"line":161},"31":{"loc":{"start":{"line":161,"column":16},"end":{"line":161,"column":106}},"type":"binary-expr","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":56}},{"start":{"line":161,"column":60},"end":{"line":161,"column":106}}],"line":161},"32":{"loc":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"type":"cond-expr","locations":[{"start":{"line":164,"column":38},"end":{"line":164,"column":70}},{"start":{"line":164,"column":73},"end":{"line":164,"column":82}}],"line":164},"33":{"loc":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},{"start":{"line":165,"column":12},"end":{"line":167,"column":13}}],"line":165},"34":{"loc":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"type":"if","locations":[{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},{"start":{"line":168,"column":12},"end":{"line":170,"column":13}}],"line":168},"35":{"loc":{"start":{"line":168,"column":16},"end":{"line":168,"column":62}},"type":"binary-expr","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},{"start":{"line":168,"column":38},"end":{"line":168,"column":62}}],"line":168},"36":{"loc":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"type":"if","locations":[{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},{"start":{"line":171,"column":12},"end":{"line":173,"column":13}}],"line":171},"37":{"loc":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"type":"cond-expr","locations":[{"start":{"line":181,"column":42},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":61}}],"line":181},"38":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"type":"cond-expr","locations":[{"start":{"line":182,"column":87},"end":{"line":182,"column":89}},{"start":{"line":182,"column":92},"end":{"line":182,"column":102}}],"line":182},"39":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":84}},"type":"binary-expr","locations":[{"start":{"line":182,"column":32},"end":{"line":182,"column":67}},{"start":{"line":182,"column":71},"end":{"line":182,"column":84}}],"line":182},"40":{"loc":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"type":"cond-expr","locations":[{"start":{"line":184,"column":40},"end":{"line":184,"column":53}},{"start":{"line":184,"column":56},"end":{"line":184,"column":116}}],"line":184},"41":{"loc":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"type":"cond-expr","locations":[{"start":{"line":206,"column":42},"end":{"line":206,"column":56}},{"start":{"line":206,"column":59},"end":{"line":206,"column":61}}],"line":206},"42":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"type":"cond-expr","locations":[{"start":{"line":207,"column":87},"end":{"line":207,"column":89}},{"start":{"line":207,"column":92},"end":{"line":207,"column":102}}],"line":207},"43":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":84}},"type":"binary-expr","locations":[{"start":{"line":207,"column":32},"end":{"line":207,"column":67}},{"start":{"line":207,"column":71},"end":{"line":207,"column":84}}],"line":207},"44":{"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"type":"cond-expr","locations":[{"start":{"line":209,"column":40},"end":{"line":209,"column":53}},{"start":{"line":209,"column":56},"end":{"line":209,"column":116}}],"line":209},"45":{"loc":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"type":"if","locations":[{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},{"start":{"line":210,"column":12},"end":{"line":215,"column":13}}],"line":210},"46":{"loc":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"type":"if","locations":[{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},{"start":{"line":211,"column":16},"end":{"line":213,"column":17}}],"line":211},"47":{"loc":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"type":"cond-expr","locations":[{"start":{"line":228,"column":82},"end":{"line":228,"column":156}},{"start":{"line":228,"column":159},"end":{"line":228,"column":163}}],"line":228},"48":{"loc":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"type":"if","locations":[{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},{"start":{"line":237,"column":16},"end":{"line":239,"column":17}}],"line":237},"49":{"loc":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"type":"if","locations":[{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},{"start":{"line":246,"column":16},"end":{"line":248,"column":17}}],"line":246},"50":{"loc":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"type":"if","locations":[{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},{"start":{"line":260,"column":16},"end":{"line":262,"column":17}}],"line":260},"51":{"loc":{"start":{"line":260,"column":20},"end":{"line":260,"column":88}},"type":"binary-expr","locations":[{"start":{"line":260,"column":20},"end":{"line":260,"column":46}},{"start":{"line":260,"column":50},"end":{"line":260,"column":88}}],"line":260},"52":{"loc":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"type":"if","locations":[{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},{"start":{"line":291,"column":8},"end":{"line":293,"column":9}}],"line":291},"53":{"loc":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"type":"if","locations":[{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},{"start":{"line":294,"column":8},"end":{"line":296,"column":9}}],"line":294},"54":{"loc":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},{"start":{"line":305,"column":12},"end":{"line":321,"column":13}}],"line":305},"55":{"loc":{"start":{"line":305,"column":16},"end":{"line":305,"column":81}},"type":"binary-expr","locations":[{"start":{"line":305,"column":16},"end":{"line":305,"column":49}},{"start":{"line":305,"column":53},"end":{"line":305,"column":81}}],"line":305},"56":{"loc":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},{"start":{"line":313,"column":17},"end":{"line":321,"column":13}}],"line":313},"57":{"loc":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"type":"if","locations":[{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},{"start":{"line":323,"column":12},"end":{"line":329,"column":13}}],"line":323},"58":{"loc":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"type":"if","locations":[{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},{"start":{"line":344,"column":8},"end":{"line":347,"column":9}}],"line":344},"59":{"loc":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"type":"if","locations":[{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},{"start":{"line":365,"column":20},"end":{"line":370,"column":21}}],"line":365}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAwB;AACxB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAG/C,YAAY;AACZ,oDAA2B;AAE3B,oDAA4B;AAC5B,MAAM,kBAAkB,GAAG,gBAAM,CAAC,cAAc,CAAC;AAGjD,mCAAiH;AAGjH,6CAA+B;AAE/B,oCAAmC;AACnC,0DAA2D;AAI3D,sCAAwC;AACxC,+CAA0E;AAE1E,MAAM,SAAS,GAAG,CAAO,GAAQ,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,aAAQ,EAAE;QACnB,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,aAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACnE,CAAC;KACH;IACD,kCAAkC;IAElC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC,CAAA,CAAA;AAID,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,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AAC,CAAC;qBACb;yBAAM;wBACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;qBACxB;gBACH,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAID,kBAAe,2BAA2B,CAAC;AAG3C,gFAAgF","sourcesContent":["\nimport Web3 from \"web3\";\nconst { suites } = require('jsonld-signatures')\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\nconst { JCS } = require('jcs')\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n }))\n\n if (!purposeResult.valid) {\n throw Error(purposeResult)\n }\n\n const returnObj = {\n verified: true,\n results: [\n {\n proof,\n verified,\n verficationMethod: vm,\n purposeResult,\n \n }\n ],\n\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj;\n } catch (error) {\n return { verified: false,\n error: error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"13d29f0635b713ea3db362b6575ad662d48c2e89","contentHash":"3746ac2e6c9f63cb4b1bb696c2b62e1dac164742816df4f754b75960707bf1a8"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"403682b59f606ef0e156c46bc50aa72495e52e83db4cb627ea22402c19e3116e"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":16},"end":{"line":5,"column":30}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9B,4BAA4B;AAE5B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAA;AAKjC,MAAM,eAAe;IAArB;QACY,SAAI,GAAwB,IAAI,GAAG,EAAkB,CAAA;QAC7D,gBAAW,GAAQ,EAAE,CAAA;IAsHzB,CAAC;IArHW,GAAG,CAAC,KAAU,EAAE,IAAY,EAAE,WAAgB;QAClD,IAAI,GAAG,GAAQ,EAAE,CAAA;QACjB,IAAI,KAAK,GAAG,EAAE,CAAA;QACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAErB,IAAI,OAA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ClB,GAAG,CAAC,IAAI,CAAC;wBACL,IAAI,EAAE,GAAG;wBACT,IAAI,EAAE,SAAS;qBAClB,CAAC,CAAA;iBACL;YAGL,CAAC,CAAC,CAAA;SACL;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;IACxE,CAAC;IAEM,aAAa,CAAC,KAAU,EAAE,WAAoB;QAGjD,IAAI,WAAW,IAAI,SAAS,EAAE;YAC1B,WAAW,GAAG,UAAU,CAAA;SAC3B;QACD,gHAAgH;QAGhH,8BAA8B;QAC9B,YAAY;QACZ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;QACxC,IAAI,GAAG,GAAQ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QAEnC,YAAY;QACZ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAIrC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CAEJ;AAIQ,0CAAe","sourcesContent":["// https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation\n\n\nconst { JCS } = require('jcs')\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ecd53451cb8a4b59f3d5c6a0d0f18152ced7e949","contentHash":"122fdc729852d405c995336375071f0aed5a7f82811606d35cd4898eca473c20"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":21,"column":15},"end":{"line":21,"column":32}},"22":{"start":{"line":22,"column":25},"end":{"line":22,"column":70}},"23":{"start":{"line":23,"column":33},"end":{"line":23,"column":85}},"24":{"start":{"line":24,"column":48},"end":{"line":24,"column":115}},"25":{"start":{"line":27,"column":27},"end":{"line":27,"column":56}},"26":{"start":{"line":28,"column":17},"end":{"line":37,"column":2}},"27":{"start":{"line":38,"column":0},"end":{"line":38,"column":28}},"28":{"start":{"line":39,"column":18},"end":{"line":48,"column":2}},"29":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"30":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"31":{"start":{"line":41,"column":8},"end":{"line":45,"column":10}},"32":{"start":{"line":47,"column":4},"end":{"line":47,"column":35}},"33":{"start":{"line":49,"column":0},"end":{"line":49,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":39,"column":18},"end":{"line":39,"column":19}},"loc":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"line":39},"9":{"name":"(anonymous_9)","decl":{"start":{"line":39,"column":70},"end":{"line":39,"column":71}},"loc":{"start":{"line":39,"column":83},"end":{"line":48,"column":1}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},{"start":{"line":40,"column":4},"end":{"line":46,"column":5}}],"line":40}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":8,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":8,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,8],"7":[8,8],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;AACzD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\nconst jsonld = require('jsonld');\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoaders.node();\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"01c391d5ad03546c4b7858d181b4e60185df2808","contentHash":"6d6590c771aae1a9faef90c6be91b6da8ebdfa7f9339166779e34eafb5cc32ee"}} \ No newline at end of file diff --git a/.nyc_output/e0b8a14a-7346-4903-92e9-173f65c36a9c.json b/.nyc_output/e0b8a14a-7346-4903-92e9-173f65c36a9c.json deleted file mode 100644 index e066347..0000000 --- a/.nyc_output/e0b8a14a-7346-4903-92e9-173f65c36a9c.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":45}},"4":{"start":{"line":7,"column":38},"end":{"line":7,"column":123}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":76}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":57}},"loc":{"start":{"line":2,"column":71},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":11},"end":{"line":3,"column":61}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}],"line":3},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":33}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}],"line":3}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1},"b":{"0":[1,1,1],"1":[1,0],"2":[1,1]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"],"names":[],"mappings":";;;;;;AAAA,4HAAoG;AAS3F,sCATF,qCAA2B,CASE","sourcesContent":["import EthereumEip712Signature2021 from \"./EthereumEip712Signature2021/EthereumEip712Signature2021\";\nimport { EIP712SignatureOptions } from \"./types/EIP712SignatureOptions\";\nimport { CreateProofOptions } from \"./types/ProofOptions\";\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"./types/SuiteOptions\";\nimport { SuiteSignOptions } from \"./types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"./types/VerifyProofOptions\";\n\n\n\nexport { EthereumEip712Signature2021, EIP712SignatureOptions, CreateProofOptions, SuiteVerifyOptions, SuiteSignOptions, SignatureSuiteOptions, VerifyProofOptions, VerifyProofResult }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"df57159067a742b091357a2832ac63fb5daafc03","contentHash":"1c7f99d8f7b9d4cb0b676bf67d98ec1e7bf5f7cde5ee3a6a2563bc7b3b060c32"},"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"2":{"start":{"line":3,"column":26},"end":{"line":3,"column":33}},"3":{"start":{"line":4,"column":15},"end":{"line":4,"column":52}},"4":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"5":{"start":{"line":6,"column":6},"end":{"line":6,"column":68}},"6":{"start":{"line":6,"column":51},"end":{"line":6,"column":63}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":39}},"8":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"9":{"start":{"line":10,"column":26},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":17}},"11":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":72}},"13":{"start":{"line":16,"column":4},"end":{"line":16,"column":21}},"14":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"15":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"16":{"start":{"line":19,"column":31},"end":{"line":19,"column":42}},"17":{"start":{"line":20,"column":17},"end":{"line":20,"column":19}},"18":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"19":{"start":{"line":21,"column":21},"end":{"line":21,"column":141}},"20":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"21":{"start":{"line":21,"column":109},"end":{"line":21,"column":141}},"22":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"23":{"start":{"line":23,"column":4},"end":{"line":23,"column":18}},"24":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"25":{"start":{"line":26,"column":28},"end":{"line":26,"column":110}},"26":{"start":{"line":26,"column":91},"end":{"line":26,"column":106}},"27":{"start":{"line":27,"column":4},"end":{"line":32,"column":7}},"28":{"start":{"line":28,"column":36},"end":{"line":28,"column":97}},"29":{"start":{"line":28,"column":42},"end":{"line":28,"column":70}},"30":{"start":{"line":28,"column":85},"end":{"line":28,"column":95}},"31":{"start":{"line":29,"column":35},"end":{"line":29,"column":100}},"32":{"start":{"line":29,"column":41},"end":{"line":29,"column":73}},"33":{"start":{"line":29,"column":88},"end":{"line":29,"column":98}},"34":{"start":{"line":30,"column":32},"end":{"line":30,"column":116}},"35":{"start":{"line":31,"column":8},"end":{"line":31,"column":78}},"36":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"37":{"start":{"line":35,"column":4},"end":{"line":35,"column":62}},"38":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"39":{"start":{"line":38,"column":15},"end":{"line":38,"column":47}},"40":{"start":{"line":39,"column":19},"end":{"line":39,"column":47}},"41":{"start":{"line":41,"column":17},"end":{"line":41,"column":51}},"42":{"start":{"line":42,"column":17},"end":{"line":42,"column":51}},"43":{"start":{"line":43,"column":27},"end":{"line":43,"column":58}},"44":{"start":{"line":44,"column":17},"end":{"line":44,"column":34}},"45":{"start":{"line":45,"column":14},"end":{"line":45,"column":44}},"46":{"start":{"line":46,"column":16},"end":{"line":46,"column":35}},"47":{"start":{"line":47,"column":22},"end":{"line":47,"column":57}},"48":{"start":{"line":48,"column":13},"end":{"line":48,"column":37}},"49":{"start":{"line":49,"column":23},"end":{"line":49,"column":46}},"50":{"start":{"line":50,"column":18},"end":{"line":60,"column":2}},"51":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"52":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"53":{"start":{"line":52,"column":8},"end":{"line":56,"column":10}},"54":{"start":{"line":59,"column":4},"end":{"line":59,"column":35}},"55":{"start":{"line":61,"column":16},"end":{"line":61,"column":30}},"56":{"start":{"line":63,"column":0},"end":{"line":63,"column":34}},"57":{"start":{"line":67,"column":8},"end":{"line":67,"column":55}},"58":{"start":{"line":68,"column":8},"end":{"line":68,"column":23}},"59":{"start":{"line":69,"column":8},"end":{"line":69,"column":27}},"60":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"61":{"start":{"line":71,"column":12},"end":{"line":71,"column":29}},"62":{"start":{"line":74,"column":12},"end":{"line":74,"column":45}},"63":{"start":{"line":76,"column":39},"end":{"line":76,"column":46}},"64":{"start":{"line":77,"column":8},"end":{"line":79,"column":10}},"65":{"start":{"line":80,"column":8},"end":{"line":80,"column":37}},"66":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"67":{"start":{"line":82,"column":12},"end":{"line":82,"column":33}},"68":{"start":{"line":84,"column":8},"end":{"line":84,"column":46}},"69":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"70":{"start":{"line":88,"column":12},"end":{"line":88,"column":51}},"71":{"start":{"line":90,"column":8},"end":{"line":90,"column":29}},"72":{"start":{"line":93,"column":8},"end":{"line":112,"column":11}},"73":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"74":{"start":{"line":95,"column":16},"end":{"line":95,"column":37}},"75":{"start":{"line":99,"column":16},"end":{"line":99,"column":96}},"76":{"start":{"line":101,"column":29},"end":{"line":101,"column":78}},"77":{"start":{"line":102,"column":27},"end":{"line":102,"column":109}},"78":{"start":{"line":103,"column":12},"end":{"line":103,"column":33}},"79":{"start":{"line":104,"column":28},"end":{"line":104,"column":95}},"80":{"start":{"line":105,"column":12},"end":{"line":105,"column":35}},"81":{"start":{"line":106,"column":12},"end":{"line":106,"column":33}},"82":{"start":{"line":107,"column":12},"end":{"line":111,"column":14}},"83":{"start":{"line":115,"column":24},"end":{"line":115,"column":78}},"84":{"start":{"line":116,"column":8},"end":{"line":116,"column":31}},"85":{"start":{"line":117,"column":8},"end":{"line":117,"column":83}},"86":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"87":{"start":{"line":119,"column":8},"end":{"line":122,"column":10}},"88":{"start":{"line":125,"column":8},"end":{"line":136,"column":11}},"89":{"start":{"line":126,"column":29},"end":{"line":126,"column":83}},"90":{"start":{"line":127,"column":27},"end":{"line":127,"column":104}},"91":{"start":{"line":128,"column":12},"end":{"line":128,"column":33}},"92":{"start":{"line":129,"column":28},"end":{"line":129,"column":95}},"93":{"start":{"line":130,"column":12},"end":{"line":130,"column":35}},"94":{"start":{"line":131,"column":12},"end":{"line":135,"column":14}},"95":{"start":{"line":139,"column":8},"end":{"line":139,"column":44}},"96":{"start":{"line":142,"column":8},"end":{"line":152,"column":11}},"97":{"start":{"line":143,"column":33},"end":{"line":148,"column":14}},"98":{"start":{"line":149,"column":27},"end":{"line":149,"column":64}},"99":{"start":{"line":150,"column":23},"end":{"line":150,"column":50}},"100":{"start":{"line":151,"column":12},"end":{"line":151,"column":38}},"101":{"start":{"line":156,"column":8},"end":{"line":200,"column":11}},"102":{"start":{"line":157,"column":24},"end":{"line":159,"column":13}},"103":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"104":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"105":{"start":{"line":162,"column":16},"end":{"line":162,"column":77}},"106":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"107":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"108":{"start":{"line":166,"column":16},"end":{"line":166,"column":34}},"109":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"110":{"start":{"line":169,"column":16},"end":{"line":169,"column":50}},"111":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"112":{"start":{"line":172,"column":16},"end":{"line":172,"column":37}},"113":{"start":{"line":174,"column":12},"end":{"line":174,"column":66}},"114":{"start":{"line":175,"column":12},"end":{"line":180,"column":15}},"115":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"116":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"117":{"start":{"line":183,"column":36},"end":{"line":183,"column":71}},"118":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"119":{"start":{"line":185,"column":39},"end":{"line":190,"column":13}},"120":{"start":{"line":191,"column":12},"end":{"line":191,"column":101}},"121":{"start":{"line":192,"column":54},"end":{"line":192,"column":122}},"122":{"start":{"line":193,"column":30},"end":{"line":197,"column":13}},"123":{"start":{"line":198,"column":12},"end":{"line":198,"column":49}},"124":{"start":{"line":199,"column":12},"end":{"line":199,"column":25}},"125":{"start":{"line":204,"column":8},"end":{"line":269,"column":11}},"126":{"start":{"line":205,"column":40},"end":{"line":205,"column":47}},"127":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"128":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"129":{"start":{"line":208,"column":36},"end":{"line":208,"column":71}},"130":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"131":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"132":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"133":{"start":{"line":212,"column":20},"end":{"line":212,"column":87}},"134":{"start":{"line":214,"column":16},"end":{"line":214,"column":69}},"135":{"start":{"line":216,"column":41},"end":{"line":221,"column":13}},"136":{"start":{"line":222,"column":12},"end":{"line":268,"column":13}},"137":{"start":{"line":223,"column":58},"end":{"line":226,"column":18}},"138":{"start":{"line":227,"column":27},"end":{"line":227,"column":68}},"139":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"140":{"start":{"line":229,"column":33},"end":{"line":236,"column":18}},"141":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"142":{"start":{"line":238,"column":20},"end":{"line":238,"column":53}},"143":{"start":{"line":240,"column":39},"end":{"line":245,"column":18}},"144":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"145":{"start":{"line":247,"column":20},"end":{"line":247,"column":47}},"146":{"start":{"line":249,"column":34},"end":{"line":259,"column":17}},"147":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"148":{"start":{"line":261,"column":20},"end":{"line":261,"column":64}},"149":{"start":{"line":263,"column":16},"end":{"line":263,"column":33}},"150":{"start":{"line":266,"column":16},"end":{"line":267,"column":35}},"151":{"start":{"line":273,"column":8},"end":{"line":273,"column":48}},"152":{"start":{"line":276,"column":8},"end":{"line":276,"column":41}},"153":{"start":{"line":277,"column":8},"end":{"line":277,"column":45}},"154":{"start":{"line":278,"column":8},"end":{"line":278,"column":36}},"155":{"start":{"line":281,"column":8},"end":{"line":287,"column":11}},"156":{"start":{"line":282,"column":40},"end":{"line":282,"column":47}},"157":{"start":{"line":284,"column":34},"end":{"line":284,"column":59}},"158":{"start":{"line":285,"column":37},"end":{"line":285,"column":60}},"159":{"start":{"line":286,"column":12},"end":{"line":286,"column":53}},"160":{"start":{"line":290,"column":33},"end":{"line":290,"column":57}},"161":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"162":{"start":{"line":292,"column":12},"end":{"line":292,"column":55}},"163":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"164":{"start":{"line":295,"column":12},"end":{"line":295,"column":71}},"165":{"start":{"line":298,"column":8},"end":{"line":298,"column":34}},"166":{"start":{"line":301,"column":8},"end":{"line":331,"column":11}},"167":{"start":{"line":302,"column":42},"end":{"line":302,"column":49}},"168":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"169":{"start":{"line":307,"column":29},"end":{"line":307,"column":70}},"170":{"start":{"line":308,"column":31},"end":{"line":308,"column":65}},"171":{"start":{"line":309,"column":31},"end":{"line":309,"column":53}},"172":{"start":{"line":311,"column":16},"end":{"line":311,"column":97}},"173":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"174":{"start":{"line":314,"column":16},"end":{"line":314,"column":76}},"175":{"start":{"line":319,"column":20},"end":{"line":319,"column":160}},"176":{"start":{"line":322,"column":12},"end":{"line":322,"column":55}},"177":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"178":{"start":{"line":324,"column":16},"end":{"line":328,"column":18}},"179":{"start":{"line":330,"column":12},"end":{"line":330,"column":25}},"180":{"start":{"line":334,"column":33},"end":{"line":342,"column":10}},"181":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"182":{"start":{"line":346,"column":12},"end":{"line":346,"column":24}},"183":{"start":{"line":348,"column":8},"end":{"line":348,"column":21}},"184":{"start":{"line":351,"column":25},"end":{"line":351,"column":39}},"185":{"start":{"line":353,"column":22},"end":{"line":353,"column":51}},"186":{"start":{"line":354,"column":8},"end":{"line":354,"column":40}},"187":{"start":{"line":355,"column":8},"end":{"line":355,"column":43}},"188":{"start":{"line":358,"column":8},"end":{"line":373,"column":11}},"189":{"start":{"line":359,"column":12},"end":{"line":372,"column":15}},"190":{"start":{"line":360,"column":16},"end":{"line":371,"column":19}},"191":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"192":{"start":{"line":366,"column":24},"end":{"line":366,"column":36}},"193":{"start":{"line":369,"column":24},"end":{"line":369,"column":47}},"194":{"start":{"line":376,"column":0},"end":{"line":376,"column":46}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":74},"end":{"line":2,"column":75}},"loc":{"start":{"line":2,"column":96},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":38},"end":{"line":6,"column":39}},"loc":{"start":{"line":6,"column":49},"end":{"line":6,"column":65}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":6},"end":{"line":9,"column":7}},"loc":{"start":{"line":9,"column":28},"end":{"line":12,"column":1}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":80},"end":{"line":13,"column":81}},"loc":{"start":{"line":13,"column":95},"end":{"line":15,"column":1}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":5},"end":{"line":15,"column":6}},"loc":{"start":{"line":15,"column":20},"end":{"line":17,"column":1}},"line":15},"5":{"name":"(anonymous_5)","decl":{"start":{"line":18,"column":50},"end":{"line":18,"column":51}},"loc":{"start":{"line":18,"column":65},"end":{"line":24,"column":1}},"line":18},"6":{"name":"(anonymous_6)","decl":{"start":{"line":25,"column":44},"end":{"line":25,"column":45}},"loc":{"start":{"line":25,"column":89},"end":{"line":33,"column":1}},"line":25},"7":{"name":"adopt","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":18}},"loc":{"start":{"line":26,"column":26},"end":{"line":26,"column":112}},"line":26},"8":{"name":"(anonymous_8)","decl":{"start":{"line":26,"column":70},"end":{"line":26,"column":71}},"loc":{"start":{"line":26,"column":89},"end":{"line":26,"column":108}},"line":26},"9":{"name":"(anonymous_9)","decl":{"start":{"line":27,"column":36},"end":{"line":27,"column":37}},"loc":{"start":{"line":27,"column":63},"end":{"line":32,"column":5}},"line":27},"10":{"name":"fulfilled","decl":{"start":{"line":28,"column":17},"end":{"line":28,"column":26}},"loc":{"start":{"line":28,"column":34},"end":{"line":28,"column":99}},"line":28},"11":{"name":"rejected","decl":{"start":{"line":29,"column":17},"end":{"line":29,"column":25}},"loc":{"start":{"line":29,"column":33},"end":{"line":29,"column":102}},"line":29},"12":{"name":"step","decl":{"start":{"line":30,"column":17},"end":{"line":30,"column":21}},"loc":{"start":{"line":30,"column":30},"end":{"line":30,"column":118}},"line":30},"13":{"name":"(anonymous_13)","decl":{"start":{"line":34,"column":56},"end":{"line":34,"column":57}},"loc":{"start":{"line":34,"column":71},"end":{"line":36,"column":1}},"line":34},"14":{"name":"(anonymous_14)","decl":{"start":{"line":50,"column":18},"end":{"line":50,"column":19}},"loc":{"start":{"line":50,"column":36},"end":{"line":60,"column":2}},"line":50},"15":{"name":"(anonymous_15)","decl":{"start":{"line":50,"column":70},"end":{"line":50,"column":71}},"loc":{"start":{"line":50,"column":83},"end":{"line":60,"column":1}},"line":50},"16":{"name":"(anonymous_16)","decl":{"start":{"line":65,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":65,"column":31},"end":{"line":85,"column":5}},"line":65},"17":{"name":"(anonymous_17)","decl":{"start":{"line":86,"column":4},"end":{"line":86,"column":5}},"loc":{"start":{"line":86,"column":18},"end":{"line":91,"column":5}},"line":86},"18":{"name":"(anonymous_18)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":26},"end":{"line":113,"column":5}},"line":92},"19":{"name":"(anonymous_19)","decl":{"start":{"line":93,"column":47},"end":{"line":93,"column":48}},"loc":{"start":{"line":93,"column":60},"end":{"line":112,"column":9}},"line":93},"20":{"name":"(anonymous_20)","decl":{"start":{"line":114,"column":4},"end":{"line":114,"column":5}},"loc":{"start":{"line":114,"column":31},"end":{"line":123,"column":5}},"line":114},"21":{"name":"(anonymous_21)","decl":{"start":{"line":124,"column":4},"end":{"line":124,"column":5}},"loc":{"start":{"line":124,"column":25},"end":{"line":137,"column":5}},"line":124},"22":{"name":"(anonymous_22)","decl":{"start":{"line":125,"column":47},"end":{"line":125,"column":48}},"loc":{"start":{"line":125,"column":60},"end":{"line":136,"column":9}},"line":125},"23":{"name":"(anonymous_23)","decl":{"start":{"line":138,"column":4},"end":{"line":138,"column":5}},"loc":{"start":{"line":138,"column":12},"end":{"line":140,"column":5}},"line":138},"24":{"name":"(anonymous_24)","decl":{"start":{"line":141,"column":4},"end":{"line":141,"column":5}},"loc":{"start":{"line":141,"column":34},"end":{"line":153,"column":5}},"line":141},"25":{"name":"(anonymous_25)","decl":{"start":{"line":142,"column":47},"end":{"line":142,"column":48}},"loc":{"start":{"line":142,"column":60},"end":{"line":152,"column":9}},"line":142},"26":{"name":"(anonymous_26)","decl":{"start":{"line":154,"column":4},"end":{"line":154,"column":5}},"loc":{"start":{"line":154,"column":25},"end":{"line":201,"column":5}},"line":154},"27":{"name":"(anonymous_27)","decl":{"start":{"line":156,"column":47},"end":{"line":156,"column":48}},"loc":{"start":{"line":156,"column":60},"end":{"line":200,"column":9}},"line":156},"28":{"name":"(anonymous_28)","decl":{"start":{"line":202,"column":4},"end":{"line":202,"column":5}},"loc":{"start":{"line":202,"column":25},"end":{"line":270,"column":5}},"line":202},"29":{"name":"(anonymous_29)","decl":{"start":{"line":204,"column":47},"end":{"line":204,"column":48}},"loc":{"start":{"line":204,"column":60},"end":{"line":269,"column":9}},"line":204},"30":{"name":"(anonymous_30)","decl":{"start":{"line":271,"column":4},"end":{"line":271,"column":5}},"loc":{"start":{"line":271,"column":20},"end":{"line":274,"column":5}},"line":271},"31":{"name":"(anonymous_31)","decl":{"start":{"line":275,"column":4},"end":{"line":275,"column":5}},"loc":{"start":{"line":275,"column":25},"end":{"line":279,"column":5}},"line":275},"32":{"name":"(anonymous_32)","decl":{"start":{"line":280,"column":4},"end":{"line":280,"column":5}},"loc":{"start":{"line":280,"column":30},"end":{"line":288,"column":5}},"line":280},"33":{"name":"(anonymous_33)","decl":{"start":{"line":281,"column":47},"end":{"line":281,"column":48}},"loc":{"start":{"line":281,"column":60},"end":{"line":287,"column":9}},"line":281},"34":{"name":"(anonymous_34)","decl":{"start":{"line":289,"column":4},"end":{"line":289,"column":5}},"loc":{"start":{"line":289,"column":33},"end":{"line":299,"column":5}},"line":289},"35":{"name":"(anonymous_35)","decl":{"start":{"line":300,"column":4},"end":{"line":300,"column":5}},"loc":{"start":{"line":300,"column":18},"end":{"line":332,"column":5}},"line":300},"36":{"name":"(anonymous_36)","decl":{"start":{"line":301,"column":47},"end":{"line":301,"column":48}},"loc":{"start":{"line":301,"column":60},"end":{"line":331,"column":9}},"line":301},"37":{"name":"(anonymous_37)","decl":{"start":{"line":333,"column":4},"end":{"line":333,"column":5}},"loc":{"start":{"line":333,"column":29},"end":{"line":349,"column":5}},"line":333},"38":{"name":"(anonymous_38)","decl":{"start":{"line":350,"column":4},"end":{"line":350,"column":5}},"loc":{"start":{"line":350,"column":31},"end":{"line":356,"column":5}},"line":350},"39":{"name":"(anonymous_39)","decl":{"start":{"line":357,"column":4},"end":{"line":357,"column":5}},"loc":{"start":{"line":357,"column":50},"end":{"line":374,"column":5}},"line":357},"40":{"name":"(anonymous_40)","decl":{"start":{"line":358,"column":47},"end":{"line":358,"column":48}},"loc":{"start":{"line":358,"column":60},"end":{"line":373,"column":9}},"line":358},"41":{"name":"(anonymous_41)","decl":{"start":{"line":359,"column":31},"end":{"line":359,"column":32}},"loc":{"start":{"line":359,"column":52},"end":{"line":372,"column":13}},"line":359},"42":{"name":"(anonymous_42)","decl":{"start":{"line":364,"column":19},"end":{"line":364,"column":20}},"loc":{"start":{"line":364,"column":36},"end":{"line":371,"column":17}},"line":364}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":22},"end":{"line":12,"column":3}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":57},"end":{"line":12,"column":2}}],"line":2},"1":{"loc":{"start":{"line":2,"column":57},"end":{"line":12,"column":2}},"type":"cond-expr","locations":[{"start":{"line":2,"column":74},"end":{"line":9,"column":1}},{"start":{"line":9,"column":6},"end":{"line":12,"column":1}}],"line":2},"2":{"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},"type":"if","locations":[{"start":{"line":3,"column":4},"end":{"line":3,"column":33}},{"start":{"line":3,"column":4},"end":{"line":3,"column":33}}],"line":3},"3":{"loc":{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},"type":"if","locations":[{"start":{"line":5,"column":4},"end":{"line":7,"column":5}},{"start":{"line":5,"column":4},"end":{"line":7,"column":5}}],"line":5},"4":{"loc":{"start":{"line":5,"column":8},"end":{"line":5,"column":85}},"type":"binary-expr","locations":[{"start":{"line":5,"column":8},"end":{"line":5,"column":13}},{"start":{"line":5,"column":18},"end":{"line":5,"column":84}}],"line":5},"5":{"loc":{"start":{"line":5,"column":18},"end":{"line":5,"column":84}},"type":"cond-expr","locations":[{"start":{"line":5,"column":34},"end":{"line":5,"column":47}},{"start":{"line":5,"column":50},"end":{"line":5,"column":84}}],"line":5},"6":{"loc":{"start":{"line":5,"column":50},"end":{"line":5,"column":84}},"type":"binary-expr","locations":[{"start":{"line":5,"column":50},"end":{"line":5,"column":63}},{"start":{"line":5,"column":67},"end":{"line":5,"column":84}}],"line":5},"7":{"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"type":"if","locations":[{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},{"start":{"line":10,"column":4},"end":{"line":10,"column":33}}],"line":10},"8":{"loc":{"start":{"line":13,"column":25},"end":{"line":17,"column":2}},"type":"binary-expr","locations":[{"start":{"line":13,"column":26},"end":{"line":13,"column":30}},{"start":{"line":13,"column":34},"end":{"line":13,"column":57}},{"start":{"line":13,"column":63},"end":{"line":17,"column":1}}],"line":13},"9":{"loc":{"start":{"line":13,"column":63},"end":{"line":17,"column":1}},"type":"cond-expr","locations":[{"start":{"line":13,"column":80},"end":{"line":15,"column":1}},{"start":{"line":15,"column":5},"end":{"line":17,"column":1}}],"line":13},"10":{"loc":{"start":{"line":18,"column":19},"end":{"line":24,"column":1}},"type":"binary-expr","locations":[{"start":{"line":18,"column":20},"end":{"line":18,"column":24}},{"start":{"line":18,"column":28},"end":{"line":18,"column":45}},{"start":{"line":18,"column":50},"end":{"line":24,"column":1}}],"line":18},"11":{"loc":{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},"type":"if","locations":[{"start":{"line":19,"column":4},"end":{"line":19,"column":42}},{"start":{"line":19,"column":4},"end":{"line":19,"column":42}}],"line":19},"12":{"loc":{"start":{"line":19,"column":8},"end":{"line":19,"column":29}},"type":"binary-expr","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":11}},{"start":{"line":19,"column":15},"end":{"line":19,"column":29}}],"line":19},"13":{"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":4},"end":{"line":21,"column":141}},{"start":{"line":21,"column":4},"end":{"line":21,"column":141}}],"line":21},"14":{"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},"type":"if","locations":[{"start":{"line":21,"column":40},"end":{"line":21,"column":141}},{"start":{"line":21,"column":40},"end":{"line":21,"column":141}}],"line":21},"15":{"loc":{"start":{"line":21,"column":44},"end":{"line":21,"column":107}},"type":"binary-expr","locations":[{"start":{"line":21,"column":44},"end":{"line":21,"column":59}},{"start":{"line":21,"column":63},"end":{"line":21,"column":107}}],"line":21},"16":{"loc":{"start":{"line":25,"column":16},"end":{"line":33,"column":1}},"type":"binary-expr","locations":[{"start":{"line":25,"column":17},"end":{"line":25,"column":21}},{"start":{"line":25,"column":25},"end":{"line":25,"column":39}},{"start":{"line":25,"column":44},"end":{"line":33,"column":1}}],"line":25},"17":{"loc":{"start":{"line":26,"column":35},"end":{"line":26,"column":109}},"type":"cond-expr","locations":[{"start":{"line":26,"column":56},"end":{"line":26,"column":61}},{"start":{"line":26,"column":64},"end":{"line":26,"column":109}}],"line":26},"18":{"loc":{"start":{"line":27,"column":16},"end":{"line":27,"column":34}},"type":"binary-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":17}},{"start":{"line":27,"column":22},"end":{"line":27,"column":33}}],"line":27},"19":{"loc":{"start":{"line":30,"column":32},"end":{"line":30,"column":115}},"type":"cond-expr","locations":[{"start":{"line":30,"column":46},"end":{"line":30,"column":67}},{"start":{"line":30,"column":70},"end":{"line":30,"column":115}}],"line":30},"20":{"loc":{"start":{"line":31,"column":51},"end":{"line":31,"column":67}},"type":"binary-expr","locations":[{"start":{"line":31,"column":51},"end":{"line":31,"column":61}},{"start":{"line":31,"column":65},"end":{"line":31,"column":67}}],"line":31},"21":{"loc":{"start":{"line":34,"column":22},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":34,"column":23},"end":{"line":34,"column":27}},{"start":{"line":34,"column":31},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":36,"column":1}}],"line":34},"22":{"loc":{"start":{"line":35,"column":11},"end":{"line":35,"column":61}},"type":"cond-expr","locations":[{"start":{"line":35,"column":37},"end":{"line":35,"column":40}},{"start":{"line":35,"column":43},"end":{"line":35,"column":61}}],"line":35},"23":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":33}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":15}},{"start":{"line":35,"column":19},"end":{"line":35,"column":33}}],"line":35},"24":{"loc":{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":57,"column":5}},{"start":{"line":51,"column":4},"end":{"line":57,"column":5}}],"line":51},"25":{"loc":{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},"type":"if","locations":[{"start":{"line":70,"column":8},"end":{"line":75,"column":9}},{"start":{"line":70,"column":8},"end":{"line":75,"column":9}}],"line":70},"26":{"loc":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},{"start":{"line":81,"column":8},"end":{"line":83,"column":9}}],"line":81},"27":{"loc":{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},"type":"if","locations":[{"start":{"line":87,"column":8},"end":{"line":89,"column":9}},{"start":{"line":87,"column":8},"end":{"line":89,"column":9}}],"line":87},"28":{"loc":{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},"type":"if","locations":[{"start":{"line":94,"column":12},"end":{"line":100,"column":13}},{"start":{"line":94,"column":12},"end":{"line":100,"column":13}}],"line":94},"29":{"loc":{"start":{"line":160,"column":24},"end":{"line":160,"column":60}},"type":"cond-expr","locations":[{"start":{"line":160,"column":40},"end":{"line":160,"column":53}},{"start":{"line":160,"column":56},"end":{"line":160,"column":60}}],"line":160},"30":{"loc":{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},"type":"if","locations":[{"start":{"line":161,"column":12},"end":{"line":163,"column":13}},{"start":{"line":161,"column":12},"end":{"line":163,"column":13}}],"line":161},"31":{"loc":{"start":{"line":161,"column":16},"end":{"line":161,"column":106}},"type":"binary-expr","locations":[{"start":{"line":161,"column":16},"end":{"line":161,"column":56}},{"start":{"line":161,"column":60},"end":{"line":161,"column":106}}],"line":161},"32":{"loc":{"start":{"line":164,"column":23},"end":{"line":164,"column":82}},"type":"cond-expr","locations":[{"start":{"line":164,"column":38},"end":{"line":164,"column":70}},{"start":{"line":164,"column":73},"end":{"line":164,"column":82}}],"line":164},"33":{"loc":{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":167,"column":13}},{"start":{"line":165,"column":12},"end":{"line":167,"column":13}}],"line":165},"34":{"loc":{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},"type":"if","locations":[{"start":{"line":168,"column":12},"end":{"line":170,"column":13}},{"start":{"line":168,"column":12},"end":{"line":170,"column":13}}],"line":168},"35":{"loc":{"start":{"line":168,"column":16},"end":{"line":168,"column":62}},"type":"binary-expr","locations":[{"start":{"line":168,"column":16},"end":{"line":168,"column":34}},{"start":{"line":168,"column":38},"end":{"line":168,"column":62}}],"line":168},"36":{"loc":{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},"type":"if","locations":[{"start":{"line":171,"column":12},"end":{"line":173,"column":13}},{"start":{"line":171,"column":12},"end":{"line":173,"column":13}}],"line":171},"37":{"loc":{"start":{"line":181,"column":25},"end":{"line":181,"column":61}},"type":"cond-expr","locations":[{"start":{"line":181,"column":42},"end":{"line":181,"column":56}},{"start":{"line":181,"column":59},"end":{"line":181,"column":61}}],"line":181},"38":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":102}},"type":"cond-expr","locations":[{"start":{"line":182,"column":87},"end":{"line":182,"column":89}},{"start":{"line":182,"column":92},"end":{"line":182,"column":102}}],"line":182},"39":{"loc":{"start":{"line":182,"column":32},"end":{"line":182,"column":84}},"type":"binary-expr","locations":[{"start":{"line":182,"column":32},"end":{"line":182,"column":67}},{"start":{"line":182,"column":71},"end":{"line":182,"column":84}}],"line":182},"40":{"loc":{"start":{"line":184,"column":24},"end":{"line":184,"column":116}},"type":"cond-expr","locations":[{"start":{"line":184,"column":40},"end":{"line":184,"column":53}},{"start":{"line":184,"column":56},"end":{"line":184,"column":116}}],"line":184},"41":{"loc":{"start":{"line":206,"column":25},"end":{"line":206,"column":61}},"type":"cond-expr","locations":[{"start":{"line":206,"column":42},"end":{"line":206,"column":56}},{"start":{"line":206,"column":59},"end":{"line":206,"column":61}}],"line":206},"42":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":102}},"type":"cond-expr","locations":[{"start":{"line":207,"column":87},"end":{"line":207,"column":89}},{"start":{"line":207,"column":92},"end":{"line":207,"column":102}}],"line":207},"43":{"loc":{"start":{"line":207,"column":32},"end":{"line":207,"column":84}},"type":"binary-expr","locations":[{"start":{"line":207,"column":32},"end":{"line":207,"column":67}},{"start":{"line":207,"column":71},"end":{"line":207,"column":84}}],"line":207},"44":{"loc":{"start":{"line":209,"column":24},"end":{"line":209,"column":116}},"type":"cond-expr","locations":[{"start":{"line":209,"column":40},"end":{"line":209,"column":53}},{"start":{"line":209,"column":56},"end":{"line":209,"column":116}}],"line":209},"45":{"loc":{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},"type":"if","locations":[{"start":{"line":210,"column":12},"end":{"line":215,"column":13}},{"start":{"line":210,"column":12},"end":{"line":215,"column":13}}],"line":210},"46":{"loc":{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},"type":"if","locations":[{"start":{"line":211,"column":16},"end":{"line":213,"column":17}},{"start":{"line":211,"column":16},"end":{"line":213,"column":17}}],"line":211},"47":{"loc":{"start":{"line":228,"column":53},"end":{"line":228,"column":163}},"type":"cond-expr","locations":[{"start":{"line":228,"column":82},"end":{"line":228,"column":156}},{"start":{"line":228,"column":159},"end":{"line":228,"column":163}}],"line":228},"48":{"loc":{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},"type":"if","locations":[{"start":{"line":237,"column":16},"end":{"line":239,"column":17}},{"start":{"line":237,"column":16},"end":{"line":239,"column":17}}],"line":237},"49":{"loc":{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},"type":"if","locations":[{"start":{"line":246,"column":16},"end":{"line":248,"column":17}},{"start":{"line":246,"column":16},"end":{"line":248,"column":17}}],"line":246},"50":{"loc":{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},"type":"if","locations":[{"start":{"line":260,"column":16},"end":{"line":262,"column":17}},{"start":{"line":260,"column":16},"end":{"line":262,"column":17}}],"line":260},"51":{"loc":{"start":{"line":260,"column":20},"end":{"line":260,"column":88}},"type":"binary-expr","locations":[{"start":{"line":260,"column":20},"end":{"line":260,"column":46}},{"start":{"line":260,"column":50},"end":{"line":260,"column":88}}],"line":260},"52":{"loc":{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},"type":"if","locations":[{"start":{"line":291,"column":8},"end":{"line":293,"column":9}},{"start":{"line":291,"column":8},"end":{"line":293,"column":9}}],"line":291},"53":{"loc":{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},"type":"if","locations":[{"start":{"line":294,"column":8},"end":{"line":296,"column":9}},{"start":{"line":294,"column":8},"end":{"line":296,"column":9}}],"line":294},"54":{"loc":{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":305,"column":12},"end":{"line":321,"column":13}},{"start":{"line":305,"column":12},"end":{"line":321,"column":13}}],"line":305},"55":{"loc":{"start":{"line":305,"column":16},"end":{"line":305,"column":81}},"type":"binary-expr","locations":[{"start":{"line":305,"column":16},"end":{"line":305,"column":49}},{"start":{"line":305,"column":53},"end":{"line":305,"column":81}}],"line":305},"56":{"loc":{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},"type":"if","locations":[{"start":{"line":313,"column":17},"end":{"line":321,"column":13}},{"start":{"line":313,"column":17},"end":{"line":321,"column":13}}],"line":313},"57":{"loc":{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},"type":"if","locations":[{"start":{"line":323,"column":12},"end":{"line":329,"column":13}},{"start":{"line":323,"column":12},"end":{"line":329,"column":13}}],"line":323},"58":{"loc":{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},"type":"if","locations":[{"start":{"line":344,"column":8},"end":{"line":347,"column":9}},{"start":{"line":344,"column":8},"end":{"line":347,"column":9}}],"line":344},"59":{"loc":{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},"type":"if","locations":[{"start":{"line":365,"column":20},"end":{"line":370,"column":21}},{"start":{"line":365,"column":20},"end":{"line":370,"column":21}}],"line":365}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":1,"15":1,"16":1,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":1,"25":30,"26":3,"27":39,"28":30,"29":30,"30":0,"31":0,"32":0,"33":0,"34":69,"35":39,"36":1,"37":3,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":18,"52":18,"53":12,"54":6,"55":1,"56":1,"57":5,"58":5,"59":5,"60":5,"61":0,"62":5,"63":5,"64":5,"65":5,"66":5,"67":0,"68":5,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":5,"84":5,"85":5,"86":5,"87":5,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":6,"97":6,"98":6,"99":6,"100":6,"101":3,"102":3,"103":3,"104":3,"105":0,"106":3,"107":3,"108":0,"109":3,"110":3,"111":3,"112":3,"113":3,"114":3,"115":3,"116":3,"117":3,"118":3,"119":3,"120":3,"121":3,"122":3,"123":3,"124":3,"125":3,"126":3,"127":3,"128":3,"129":3,"130":3,"131":3,"132":0,"133":0,"134":0,"135":3,"136":3,"137":3,"138":3,"139":3,"140":3,"141":3,"142":0,"143":3,"144":3,"145":0,"146":3,"147":3,"148":0,"149":3,"150":0,"151":12,"152":6,"153":6,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":3,"161":3,"162":0,"163":3,"164":0,"165":3,"166":3,"167":3,"168":3,"169":0,"170":0,"171":0,"172":0,"173":3,"174":0,"175":3,"176":3,"177":3,"178":3,"179":3,"180":3,"181":3,"182":3,"183":0,"184":3,"185":3,"186":3,"187":3,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":1,"6":39,"7":30,"8":3,"9":39,"10":30,"11":0,"12":69,"13":3,"14":18,"15":18,"16":5,"17":0,"18":0,"19":0,"20":5,"21":0,"22":0,"23":0,"24":6,"25":6,"26":3,"27":3,"28":3,"29":3,"30":12,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":3,"39":0,"40":0,"41":0,"42":0},"b":{"0":[1,1,1],"1":[1,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[1,1,1],"9":[1,0],"10":[1,1,1],"11":[1,0],"12":[1,1],"13":[0,0],"14":[0,0],"15":[0,0],"16":[1,1,1],"17":[27,3],"18":[39,39],"19":[39,30],"20":[39,39],"21":[1,1,1],"22":[0,3],"23":[3,3],"24":[12,6],"25":[0,5],"26":[0,5],"27":[0,0],"28":[0,0],"29":[0,3],"30":[0,3],"31":[3,3],"32":[3,0],"33":[0,3],"34":[3,0],"35":[3,3],"36":[3,0],"37":[2,1],"38":[0,3],"39":[3,3],"40":[0,3],"41":[2,1],"42":[0,3],"43":[3,3],"44":[2,1],"45":[0,3],"46":[0,0],"47":[3,0],"48":[0,3],"49":[0,3],"50":[0,3],"51":[3,3],"52":[0,3],"53":[0,3],"54":[0,3],"55":[3,3],"56":[0,3],"57":[3,0],"58":[3,0],"59":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAAwB;AACxB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAG/C,YAAY;AACZ,oDAA2B;AAE3B,oDAA4B;AAC5B,MAAM,kBAAkB,GAAG,gBAAM,CAAC,cAAc,CAAC;AAGjD,mCAAiH;AAGjH,6CAA+B;AAE/B,oCAAmC;AACnC,0DAA2D;AAI3D,sCAAwC;AACxC,+CAA0E;AAE1E,MAAM,SAAS,GAAG,CAAO,GAAQ,EAAE,OAAY,EAAE,EAAE;IACjD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,mBAAmB,CAAC,MAAc,EAAE,MAAa,EAAE,QAAa;;YACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,QAAQ,CAAC,SAAS,CAChB;oBACE,MAAM;oBACN,MAAM;oBACN,IAAI,EAAE,QAAQ,CAAC,eAAe;iBAC/B,EACD,CAAC,GAAQ,EAAE,MAAW,EAAE,EAAE;oBACxB,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;qBACxB;gBACH,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAID,kBAAe,2BAA2B,CAAC;AAG3C,gFAAgF","sourcesContent":["\nimport Web3 from \"web3\";\nconst { suites } = require('jsonld-signatures')\nimport { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util'\n\n//@ts-ignore\nimport jsonld from 'jsonld'\n\nimport crypto from \"crypto\";\nconst nodeDocumentLoader = jsonld.documentLoader;\n\n\nimport { Mnemonic, HDNodeWallet, TypedDataField, verifyTypedData, Wallet, BaseWallet, SigningKey } from \"ethers\";\nimport * as ethsigutil from 'eth-sig-util';\nimport { SignatureSuiteOptions, SuiteVerifyOptions } from \"../types/SuiteOptions\";\nimport * as bip39 from \"bip39\";\nimport { CreateProofOptions } from \"../types/ProofOptions\";\nimport { w3cDate } from \"../utils\";\nimport { EIP712TypedData } from \"../TypedData/Eip712Types\";\nimport { EIP712SignatureOptions } from \"../types/EIP712SignatureOptions\";\nimport { SuiteSignOptions } from \"../types/SuiteSignType\";\nimport { VerifyProofOptions, VerifyProofResult } from \"../types/VerifyProofOptions\";\nimport { CONTEXTS } from '../Context/v1'\nimport { signTypedData_v4, recoverTypedSignature_v4 } from \"eth-sig-util\";\n\nconst docloader = async (url: any, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n // call the default documentLoader\n\n return nodeDocumentLoader(url);\n}\n\n\n\nconst { JCS } = require('jcs')\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\nclass EthereumEip712Signature2021 extends suites.LinkedDataSignature {\n index: number;\n web3: Web3;\n wallet: any;\n account: any;\n mnemonic: string;\n\n proof: Record;\n LDKeyClass: any;\n signer: any;\n proofSignatureKey: string;\n\n\n constructor(options: SignatureSuiteOptions, web3?: Web3) {\n // web3 send web3 wrapper arround webwallet\n super({ type: \"EthereumEip712Signature2021\" });\n this.index = 0;\n this.mnemonic = \"\";\n if (web3) { this.web3 = web3 }\n else {\n this.web3 = new Web3();\n }\n const { signer, LDKeyClass } = options;\n this.proof = {\n type: \"EthereumEip712Signature2021\",\n };\n\n this.LDKeyClass = LDKeyClass;\n if (signer) {\n this.signer = signer;\n }\n this.proofSignatureKey = \"proofValue\";\n }\n\n\n\n getMnemonic() {\n if (this.mnemonic === \"\") {\n throw new Error(\"Mnemonic is not set\")\n }\n return this.mnemonic;\n }\n\n async generateKeyPair(seed?: string) {\n if (seed) {\n this.mnemonic = seed;\n } else {\n // @ts-ignore\n this.mnemonic = await bip39.generateMnemonic(256, crypto.randomBytes);\n }\n const mnemonic = await Mnemonic.fromPhrase(this.mnemonic);\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${this.index}`);\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n this.signer = wallet;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n fromPrivateKey(privateKey: string) {\n const account = this.web3.eth.accounts.privateKeyToAccount(privateKey);\n\n this.account = account;\n this.signer = new BaseWallet(new SigningKey(privateKey));\n this.wallet = this.signer;\n return {\n address: account.address,\n privateKey: privateKey,\n }\n }\n\n\n async switchAccount(index: number) {\n const mnemonic = await Mnemonic.fromPhrase(this.getMnemonic());\n const wallet = await HDNodeWallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${index}`);\n\n this.wallet = wallet;\n const account = await this.web3.eth.accounts.privateKeyToAccount(wallet.privateKey);\n this.account = account;\n return {\n publicKey: wallet.publicKey,\n privateKey: wallet.privateKey,\n address: account.address\n }\n }\n\n\n\n toJWK() {\n return new Error(\"Not Implemented\");\n\n }\n\n\n\n async canonicalizationHash(message: object) {\n const c14nDocument = await jsonld.canonize(message, {\n algorithm: \"URDNA2015\",\n format: \"application/n-quads\",\n useNative: false,\n documentLoader: docloader\n })\n\n\n const sha256 = crypto.createHash('sha256');\n let hash = sha256.update(c14nDocument);\n return hash.digest('hex');\n }\n\n async createProof(options: CreateProofOptions): Promise {\n let proof: Record = {\n type: this.type,\n\n }\n\n\n let embed = options.embed ? options.embed : true;\n\n if (options.verificationMethod !== undefined && typeof options.verificationMethod !== \"string\") {\n throw TypeError(`\"verificationMethod\" must be a URI string`);\n }\n\n let date: string | number | undefined = options.date ? new Date(options.date).getTime() : undefined;\n if (date === undefined) {\n date = Date.now();\n }\n\n if (date !== undefined && typeof date !== \"string\") {\n date = w3cDate(date);\n }\n if (date !== undefined) {\n proof.created = date;\n }\n proof.verificationMethod = options.verificationMethod;\n\n\n\n proof = await options.purpose.update(proof, {\n document: options.document,\n suite: this,\n documentLoader: options.documentLoader,\n expansionMap: options.expansionMap,\n });\n\n\n let domain = options.domain ? options.domain : {};\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n const toBeSignedDocument: EIP712SignatureOptions = {\n types,\n domain,\n primaryType,\n message: options.document,\n };\n\n proof.canonicalizationHash = await this.canonicalizationHash(toBeSignedDocument.message)\n\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({ document: toBeSignedDocument, proof })\n\n\n\n\n\n let signOptions: SuiteSignOptions = {\n proof: canonizeProof,\n verifyData: canonizeDocument as EIP712SignatureOptions,\n embed: embed,\n };\n\n proof = await this.sign(signOptions);\n\n return proof;\n }\n\n async verifyProof(options: VerifyProofOptions): Promise {\n const { proof, document } = options;\n\n let domain = options.domain ? options.domain : {};\n\n const primaryType = options.primaryType ?? \"Document\";\n const eip712TypedData = new EIP712TypedData()\n\n let types = options.types ? options.types : eip712TypedData.generateTypes(options.document, primaryType);\n if (typeof types === \"string\") {\n if (options.documentLoader === undefined) {\n throw new Error(\"documentLoader must be defined for remote types\")\n }\n types = await options.documentLoader(types).document\n\n }\n const toBeVerifiedDocument: EIP712SignatureOptions = {\n types: types as Record>,\n domain,\n primaryType: \"Document\",\n message: document,\n };\n\n try {\n const [canonizeProof, canonizeDocument] = await this.createVerifyData({\n proof,\n document: toBeVerifiedDocument,\n });\n\n const vm = this.getVerificationMethod(canonizeProof);\n\n const canonicalizationHashVerified = proof.canonicalizationHash ? await this.canonicalizationHash(document) === proof.canonicalizationHash : null\n\n const verified = this.verifySignature({\n signature: proof[this.proofSignatureKey],\n verificationMethod: vm,\n domain: canonizeDocument.domain,\n types: canonizeDocument.types,\n message: canonizeDocument.message,\n primaryType: canonizeDocument.primaryType,\n });\n\n if (!verified) {\n throw Error(`Invalid signature`);\n }\n\n const purposeResult = (await options.purpose.validate(canonizeProof, {\n verificationMethod: {\n id: vm,\n },\n documentLoader: options.documentLoader\n\n }))\n\n if (!purposeResult.valid) {\n throw Error(purposeResult)\n }\n\n const returnObj = {\n verified: true,\n results: [\n {\n proof,\n verified,\n verficationMethod: vm,\n purposeResult,\n \n }\n ],\n\n };\n\n if (proof.canonicalizationHash && canonicalizationHashVerified === false) {\n throw Error(`Invalid canonicalizationHash`);\n }\n return returnObj;\n } catch (error) {\n return { verified: false,\n error: error };\n }\n\n }\n\n canonize(input: any): Record {\n // @ts-ignore\n return JSON.parse(JSON.canonify(input));\n }\n\n canonizeProof(proof: any): Record {\n proof = { ...proof };\n delete proof[this.proofSignatureKey];\n\n return this.canonize(proof);\n }\n async createVerifyData(\n options:\n { document: any, proof: any }\n ): Promise[]> {\n const { proof, document } = options;\n // JCS RFC 8785\n const canonizeProof = this.canonizeProof(proof);\n const canonizeDocument = this.canonize(document);\n\n return [canonizeProof, canonizeDocument];\n }\n\n getVerificationMethod(proof: any): string {\n let verificationMethod = proof.verificationMethod;\n\n if (typeof verificationMethod === \"object\") {\n verificationMethod = verificationMethod.id;\n }\n\n if (!verificationMethod) {\n throw new Error('No \"verificationMethod\" found in proof.');\n }\n\n // TODO: resolve DID to check if DID belongs to the controller of the proof or the status of the DID\n return verificationMethod;\n }\n\n\n\n async sign(options: SuiteSignOptions): Promise> {\n const { verifyData, proof } = options;\n\n let proofValue: any;\n //@ts-ignore\n if (this.web3._provider !== undefined && this.web3._provider !== null) {\n //@ts-ignore\n const from = await this.web3._provider.selectedAddress;\n const params = [from, JSON.stringify(verifyData)]\n const method = 'eth_signTypedData_v4'\n\n //@ts-ignore\n proofValue = await this.getSignFromMetamask(method, params, this.web3._provider)\n } else if (!this.signer) {\n throw new Error(\"A Web3 Signer API has not been specified\");\n } else {\n {\n //@ts-ignore\n proofValue = await signTypedData_v4(Buffer.from(this.wallet.privateKey.replace('0x', ''), 'hex'), { data: verifyData })\n }\n }\n\n proof[this.proofSignatureKey] = proofValue;\n if (options.embed) {\n proof[\"eip712\"] = {\n domain: options.verifyData.domain,\n types: options.verifyData.types,\n primaryType: options.verifyData.primaryType,\n };\n }\n return proof;\n }\n\n verifySignature(options: SuiteVerifyOptions): boolean {\n\n const recoveredAddress = recoverTypedSignature_v4(\n {\n //@ts-ignore\n data: {\n domain: options.domain,\n message: options.message,\n types: options.types,\n primaryType: options.primaryType,\n }, sig: options.signature\n }\n );\n\n // TODO: add DID resolver (did-resolver)\n\n if (\n recoveredAddress.toLowerCase() ===\n this.extractAddressFromDID(options.verificationMethod).toLowerCase()\n ) {\n return true;\n }\n return false;\n }\n\n\n extractAddressFromDID(did: string): string {\n\n const didParts = did.split(\":\");\n // last elem of array\n let address = didParts[didParts.length - 1];\n address = address.split(\"#\")[0];\n return address.toLocaleLowerCase();\n\n\n }\n\n\n\n async getSignFromMetamask(method: string, params: any[], provider: any) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(\n {\n method,\n params,\n from: provider.selectedAddress,\n },\n (err: any, result: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(result.result);\n }\n }\n );\n })\n }\n}\n\n\n\nexport default EthereumEip712Signature2021;\n\n\n//mesh short coral rescue height arrive bitter improve lift mystery point invite"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"13d29f0635b713ea3db362b6575ad662d48c2e89","contentHash":"3746ac2e6c9f63cb4b1bb696c2b62e1dac164742816df4f754b75960707bf1a8"},"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":25}},"2":{"start":{"line":5,"column":17},"end":{"line":5,"column":27}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":8},"end":{"line":7,"column":32}},"5":{"start":{"line":9,"column":16},"end":{"line":9,"column":36}},"6":{"start":{"line":10,"column":4},"end":{"line":10,"column":47}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":26}}},"fnMap":{"0":{"name":"w3cDate","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":16}},"loc":{"start":{"line":4,"column":23},"end":{"line":11,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{"line":6,"column":4},"end":{"line":8,"column":5}}],"line":6},"1":{"loc":{"start":{"line":6,"column":8},"end":{"line":6,"column":60}},"type":"binary-expr","locations":[{"start":{"line":6,"column":8},"end":{"line":6,"column":32}},{"start":{"line":6,"column":36},"end":{"line":6,"column":60}}],"line":6}},"s":{"0":1,"1":1,"2":3,"3":3,"4":3,"5":3,"6":3,"7":1},"f":{"0":3},"b":{"0":[3,0],"1":[3,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,IAAsB;IAC1C,IAAI,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACxD,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAPH,0BAOG","sourcesContent":["export function w3cDate(date?: number | string): string {\n let result = new Date();\n if (typeof date === \"number\" || typeof date === \"string\") {\n result = new Date(date);\n }\n const str = result.toISOString();\n return str.substr(0, str.length - 5) + \"Z\";\n }"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4870f28a9413d0a07974bc41c35938bce8601aff","contentHash":"403682b59f606ef0e156c46bc50aa72495e52e83db4cb627ea22402c19e3116e"},"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":62}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"2":{"start":{"line":5,"column":16},"end":{"line":5,"column":30}},"3":{"start":{"line":8,"column":0},"end":{"line":8,"column":34}},"4":{"start":{"line":11,"column":8},"end":{"line":11,"column":30}},"5":{"start":{"line":12,"column":8},"end":{"line":12,"column":30}},"6":{"start":{"line":15,"column":18},"end":{"line":15,"column":20}},"7":{"start":{"line":16,"column":20},"end":{"line":16,"column":22}},"8":{"start":{"line":17,"column":8},"end":{"line":17,"column":25}},"9":{"start":{"line":18,"column":8},"end":{"line":89,"column":9}},"10":{"start":{"line":19,"column":26},"end":{"line":19,"column":39}},"11":{"start":{"line":20,"column":12},"end":{"line":88,"column":15}},"12":{"start":{"line":21,"column":29},"end":{"line":21,"column":46}},"13":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"14":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"15":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"16":{"start":{"line":25,"column":28},"end":{"line":25,"column":60}},"17":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"18":{"start":{"line":28,"column":28},"end":{"line":28,"column":61}},"19":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"20":{"start":{"line":31,"column":28},"end":{"line":31,"column":60}},"21":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"22":{"start":{"line":34,"column":28},"end":{"line":37,"column":31}},"23":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"24":{"start":{"line":40,"column":28},"end":{"line":43,"column":31}},"25":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"26":{"start":{"line":46,"column":28},"end":{"line":49,"column":31}},"27":{"start":{"line":53,"column":41},"end":{"line":53,"column":43}},"28":{"start":{"line":54,"column":28},"end":{"line":57,"column":31}},"29":{"start":{"line":58,"column":28},"end":{"line":58,"column":113}},"30":{"start":{"line":63,"column":24},"end":{"line":66,"column":27}},"31":{"start":{"line":67,"column":24},"end":{"line":67,"column":63}},"32":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"33":{"start":{"line":71,"column":20},"end":{"line":74,"column":23}},"34":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"35":{"start":{"line":77,"column":20},"end":{"line":80,"column":23}},"36":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"37":{"start":{"line":83,"column":20},"end":{"line":86,"column":23}},"38":{"start":{"line":90,"column":8},"end":{"line":90,"column":77}},"39":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"40":{"start":{"line":94,"column":12},"end":{"line":94,"column":37}},"41":{"start":{"line":99,"column":8},"end":{"line":99,"column":49}},"42":{"start":{"line":100,"column":18},"end":{"line":100,"column":64}},"43":{"start":{"line":101,"column":8},"end":{"line":101,"column":44}},"44":{"start":{"line":103,"column":8},"end":{"line":103,"column":46}},"45":{"start":{"line":104,"column":8},"end":{"line":104,"column":31}},"46":{"start":{"line":107,"column":0},"end":{"line":107,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":5}},"loc":{"start":{"line":10,"column":18},"end":{"line":13,"column":5}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":5}},"loc":{"start":{"line":14,"column":34},"end":{"line":91,"column":5}},"line":14},"2":{"name":"(anonymous_2)","decl":{"start":{"line":20,"column":39},"end":{"line":20,"column":40}},"loc":{"start":{"line":20,"column":55},"end":{"line":88,"column":13}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":83},"end":{"line":24,"column":84}},"loc":{"start":{"line":24,"column":94},"end":{"line":26,"column":25}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":81},"end":{"line":27,"column":82}},"loc":{"start":{"line":27,"column":92},"end":{"line":29,"column":25}},"line":27},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":83},"end":{"line":30,"column":84}},"loc":{"start":{"line":30,"column":94},"end":{"line":32,"column":25}},"line":30},"6":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":5}},"loc":{"start":{"line":92,"column":38},"end":{"line":105,"column":5}},"line":92}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},"type":"if","locations":[{"start":{"line":22,"column":16},"end":{"line":69,"column":17}},{"start":{"line":22,"column":16},"end":{"line":69,"column":17}}],"line":22},"1":{"loc":{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},"type":"if","locations":[{"start":{"line":23,"column":20},"end":{"line":68,"column":21}},{"start":{"line":23,"column":20},"end":{"line":68,"column":21}}],"line":23},"2":{"loc":{"start":{"line":24,"column":41},"end":{"line":26,"column":26}},"type":"binary-expr","locations":[{"start":{"line":24,"column":41},"end":{"line":24,"column":62}},{"start":{"line":24,"column":66},"end":{"line":26,"column":26}}],"line":24},"3":{"loc":{"start":{"line":27,"column":39},"end":{"line":29,"column":26}},"type":"binary-expr","locations":[{"start":{"line":27,"column":39},"end":{"line":27,"column":60}},{"start":{"line":27,"column":64},"end":{"line":29,"column":26}}],"line":27},"4":{"loc":{"start":{"line":30,"column":41},"end":{"line":32,"column":26}},"type":"binary-expr","locations":[{"start":{"line":30,"column":41},"end":{"line":30,"column":62}},{"start":{"line":30,"column":66},"end":{"line":32,"column":26}}],"line":30},"5":{"loc":{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":33,"column":24},"end":{"line":60,"column":25}},{"start":{"line":33,"column":24},"end":{"line":60,"column":25}}],"line":33},"6":{"loc":{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":39,"column":29},"end":{"line":60,"column":25}},{"start":{"line":39,"column":29},"end":{"line":60,"column":25}}],"line":39},"7":{"loc":{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},"type":"if","locations":[{"start":{"line":45,"column":29},"end":{"line":60,"column":25}},{"start":{"line":45,"column":29},"end":{"line":60,"column":25}}],"line":45},"8":{"loc":{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},"type":"if","locations":[{"start":{"line":70,"column":16},"end":{"line":75,"column":17}},{"start":{"line":70,"column":16},"end":{"line":75,"column":17}}],"line":70},"9":{"loc":{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},"type":"if","locations":[{"start":{"line":76,"column":16},"end":{"line":81,"column":17}},{"start":{"line":76,"column":16},"end":{"line":81,"column":17}}],"line":76},"10":{"loc":{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":87,"column":17}},{"start":{"line":82,"column":16},"end":{"line":87,"column":17}}],"line":82},"11":{"loc":{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},"type":"if","locations":[{"start":{"line":93,"column":8},"end":{"line":95,"column":9}},{"start":{"line":93,"column":8},"end":{"line":95,"column":9}}],"line":93}},"s":{"0":1,"1":1,"2":1,"3":1,"4":8,"5":8,"6":19,"7":19,"8":19,"9":19,"10":19,"11":19,"12":55,"13":55,"14":20,"15":8,"16":16,"17":8,"18":8,"19":8,"20":8,"21":8,"22":7,"23":1,"24":0,"25":1,"26":0,"27":1,"28":1,"29":1,"30":12,"31":12,"32":54,"33":34,"34":54,"35":0,"36":54,"37":1,"38":19,"39":7,"40":0,"41":7,"42":7,"43":7,"44":7,"45":7,"46":1},"f":{"0":8,"1":19,"2":55,"3":16,"4":8,"5":8,"6":7},"b":{"0":[20,35],"1":[8,12],"2":[8,8],"3":[8,8],"4":[8,8],"5":[7,1],"6":[0,1],"7":[0,1],"8":[34,20],"9":[0,54],"10":[1,53],"11":[0,7]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts"],"names":[],"mappings":";AAAA,kFAAkF;;;AAGlF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAC9B,4BAA4B;AAE5B,aAAa;AACb,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAA;AAKjC,MAAM,eAAe;IAArB;QACY,SAAI,GAAwB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types-generation\n\n\nconst { JCS } = require('jcs')\n// add canonnicalize to JSON\n\n// @ts-ignore\nJSON.canonify = JCS.cannonicalize\n\n\n\n\nclass EIP712TypedData {\n private keys: Map = new Map()\n finalOutput: any = {}\n private BFS(input: any, type: string, finalOutput: any) {\n let out: any = []\n let queue = []\n queue.push(type)\n while (queue.length > 0) {\n\n let current = queue.shift()\n Object.keys(input).forEach((key, index) => {\n const type = typeof input[key]\n\n if (type == \"object\") {\n if (Array.isArray(input[key])) {\n const isString = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"string\"\n });\n\n const isBool = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"boolean\"\n });\n\n const isNumber = input[key].length > 0 && input[key].every((value: any) => {\n return typeof value == \"number\"\n });\n\n if (isString) {\n out.push({\n name: key,\n type: \"string[]\"\n })\n } else if (isBool) {\n out.push({\n name: key,\n type: \"bool[]\"\n })\n } else if (isNumber) {\n out.push({\n name: key,\n type: \"uint256[]\"\n })\n\n } else {\n\n // throw new Error(\"Array of objects not supported\")\n\n\n\n let output = {}\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1) + \"[]\"\n })\n return this.generateTypes(input[key][0], key.charAt(0).toUpperCase() + key.slice(1))\n // return this.BFS(input[key], key,output,key.charAt(0).toUpperCase() + key.slice(1))\n\n }\n } else {\n\n\n out.push({\n name: key,\n type: key.charAt(0).toUpperCase() + key.slice(1)\n })\n\n this.BFS(input[key], key, finalOutput)\n }\n\n }\n if (type == \"string\") {\n\n\n out.push({\n name: key,\n type: \"string\"\n })\n }\n if (type == \"boolean\") {\n out.push({\n name: key,\n type: \"bool\"\n })\n }\n if (type == \"number\") {\n out.push({\n name: key,\n type: \"uint256\"\n })\n }\n\n\n })\n }\n this.finalOutput[type.charAt(0).toUpperCase() + type.slice(1)] = out\n }\n\n public generateTypes(input: any, primaryType?: string) {\n\n\n if (primaryType == undefined) {\n primaryType = \"Document\"\n }\n // DFS is used to traverse graph dependencies but we need to explore first object properties first so we use BFS\n\n\n // Canonicalize the type names\n //@ts-ignore\n input = JSON.parse(JSON.canonify(input))\n let out: any = this.BFS(input, primaryType, this.finalOutput)\n this.finalOutput = this.finalOutput\n\n //@ts-ignore\n out = JSON.canonify(this.finalOutput)\n\n\n\n return JSON.parse(out)\n }\n\n}\n\n\n\nexport { EIP712TypedData }\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ecd53451cb8a4b59f3d5c6a0d0f18152ced7e949","contentHash":"122fdc729852d405c995336375071f0aed5a7f82811606d35cd4898eca473c20"},"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":{"path":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"1":{"start":{"line":3,"column":28},"end":{"line":3,"column":110}},"2":{"start":{"line":3,"column":91},"end":{"line":3,"column":106}},"3":{"start":{"line":4,"column":4},"end":{"line":9,"column":7}},"4":{"start":{"line":5,"column":36},"end":{"line":5,"column":97}},"5":{"start":{"line":5,"column":42},"end":{"line":5,"column":70}},"6":{"start":{"line":5,"column":85},"end":{"line":5,"column":95}},"7":{"start":{"line":6,"column":35},"end":{"line":6,"column":100}},"8":{"start":{"line":6,"column":41},"end":{"line":6,"column":73}},"9":{"start":{"line":6,"column":88},"end":{"line":6,"column":98}},"10":{"start":{"line":7,"column":32},"end":{"line":7,"column":116}},"11":{"start":{"line":8,"column":8},"end":{"line":8,"column":78}},"12":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"13":{"start":{"line":12,"column":4},"end":{"line":12,"column":62}},"14":{"start":{"line":14,"column":0},"end":{"line":14,"column":62}},"15":{"start":{"line":15,"column":0},"end":{"line":15,"column":46}},"16":{"start":{"line":16,"column":19},"end":{"line":16,"column":57}},"17":{"start":{"line":17,"column":38},"end":{"line":17,"column":95}},"18":{"start":{"line":18,"column":27},"end":{"line":18,"column":73}},"19":{"start":{"line":19,"column":27},"end":{"line":19,"column":73}},"20":{"start":{"line":20,"column":43},"end":{"line":20,"column":105}},"21":{"start":{"line":21,"column":15},"end":{"line":21,"column":32}},"22":{"start":{"line":22,"column":25},"end":{"line":22,"column":70}},"23":{"start":{"line":23,"column":33},"end":{"line":23,"column":85}},"24":{"start":{"line":24,"column":48},"end":{"line":24,"column":115}},"25":{"start":{"line":27,"column":27},"end":{"line":27,"column":56}},"26":{"start":{"line":28,"column":17},"end":{"line":37,"column":2}},"27":{"start":{"line":38,"column":0},"end":{"line":38,"column":28}},"28":{"start":{"line":39,"column":18},"end":{"line":48,"column":2}},"29":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"30":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"31":{"start":{"line":41,"column":8},"end":{"line":45,"column":10}},"32":{"start":{"line":47,"column":4},"end":{"line":47,"column":35}},"33":{"start":{"line":49,"column":0},"end":{"line":49,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":10,"column":1}},"line":2},"1":{"name":"adopt","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":112}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":3,"column":70},"end":{"line":3,"column":71}},"loc":{"start":{"line":3,"column":89},"end":{"line":3,"column":108}},"line":3},"3":{"name":"(anonymous_3)","decl":{"start":{"line":4,"column":36},"end":{"line":4,"column":37}},"loc":{"start":{"line":4,"column":63},"end":{"line":9,"column":5}},"line":4},"4":{"name":"fulfilled","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":26}},"loc":{"start":{"line":5,"column":34},"end":{"line":5,"column":99}},"line":5},"5":{"name":"rejected","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":33},"end":{"line":6,"column":102}},"line":6},"6":{"name":"step","decl":{"start":{"line":7,"column":17},"end":{"line":7,"column":21}},"loc":{"start":{"line":7,"column":30},"end":{"line":7,"column":118}},"line":7},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":56},"end":{"line":11,"column":57}},"loc":{"start":{"line":11,"column":71},"end":{"line":13,"column":1}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":39,"column":18},"end":{"line":39,"column":19}},"loc":{"start":{"line":39,"column":36},"end":{"line":48,"column":2}},"line":39},"9":{"name":"(anonymous_9)","decl":{"start":{"line":39,"column":70},"end":{"line":39,"column":71}},"loc":{"start":{"line":39,"column":83},"end":{"line":48,"column":1}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":10,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":10,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":35},"end":{"line":3,"column":109}},"type":"cond-expr","locations":[{"start":{"line":3,"column":56},"end":{"line":3,"column":61}},{"start":{"line":3,"column":64},"end":{"line":3,"column":109}}],"line":3},"2":{"loc":{"start":{"line":4,"column":16},"end":{"line":4,"column":34}},"type":"binary-expr","locations":[{"start":{"line":4,"column":16},"end":{"line":4,"column":17}},{"start":{"line":4,"column":22},"end":{"line":4,"column":33}}],"line":4},"3":{"loc":{"start":{"line":7,"column":32},"end":{"line":7,"column":115}},"type":"cond-expr","locations":[{"start":{"line":7,"column":46},"end":{"line":7,"column":67}},{"start":{"line":7,"column":70},"end":{"line":7,"column":115}}],"line":7},"4":{"loc":{"start":{"line":8,"column":51},"end":{"line":8,"column":67}},"type":"binary-expr","locations":[{"start":{"line":8,"column":51},"end":{"line":8,"column":61}},{"start":{"line":8,"column":65},"end":{"line":8,"column":67}}],"line":8},"5":{"loc":{"start":{"line":11,"column":22},"end":{"line":13,"column":1}},"type":"binary-expr","locations":[{"start":{"line":11,"column":23},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":51}},{"start":{"line":11,"column":56},"end":{"line":13,"column":1}}],"line":11},"6":{"loc":{"start":{"line":12,"column":11},"end":{"line":12,"column":61}},"type":"cond-expr","locations":[{"start":{"line":12,"column":37},"end":{"line":12,"column":40}},{"start":{"line":12,"column":43},"end":{"line":12,"column":61}}],"line":12},"7":{"loc":{"start":{"line":12,"column":12},"end":{"line":12,"column":33}},"type":"binary-expr","locations":[{"start":{"line":12,"column":12},"end":{"line":12,"column":15}},{"start":{"line":12,"column":19},"end":{"line":12,"column":33}}],"line":12},"8":{"loc":{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":46,"column":5}},{"start":{"line":40,"column":4},"end":{"line":46,"column":5}}],"line":40}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":1,"13":8,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":8,"8":0,"9":0},"b":{"0":[1,1,1],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[1,1,1],"6":[0,8],"7":[8,8],"8":[0,0]},"inputSourceMap":{"version":3,"file":"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts","sources":["/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,gGAAgE;AAChE,0EAA2C;AAC3C,0EAA4C;AAC5C,0GAA4E;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,uEAAgD;AAChD,sFAAoD;AACpD,oHAAmE;AACnE,0EAA0E;AAC1E,aAAa;AACb,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;AACzD,MAAM,QAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC;IAChC,oDAAoD,oBAAM,0CAA2B,CAAC;IACtF,oBAAoB,EAAE,wBAAgB;IAGtC,8BAA8B,oBACvB,kBAAG,CACT;IACD,kDAAkD,oBAC3C,qCAAoB,CAC1B;IACD,8BAA8B,oBACvB,0BAAU,CAChB;IACD,wCAAwC,oBACjC,0BAAW,CACjB;IACD,0EAA0E,oBACnE,gCAAa,CACnB;IACD,4DAA4D,oBACrD,+CAAa,CACnB;CACJ,CAAC,CAAA;AAekB,4BAAQ;AAb5B,MAAM,SAAS,GAAE,CAAO,GAAW,EAAE,OAAY,EAAE,EAAE;IACjD,IAAI,GAAG,IAAI,QAAQ,EAAE;QACjB,OAAO;YACH,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC;YACvB,WAAW,EAAE,GAAG,CAAC,iDAAiD;SACrE,CAAC;KACL;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAIO,8BAAS","sourcesContent":["import did from './did.json'\nimport ed25519signature2020 from './ed25519-signature-2020.json'\nimport securityv2 from './security-v2.json'\nimport credentials from './credentials.json'\nimport EthereumEip712Signature2021 from './EthereumEip712Signature2021.json'\nconst jsonld = require('jsonld');\nimport schemaOrgContext from '../schemaOrg.json'\nimport dataintegrety from './vc-data-integrety.json'\nimport ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json'\n// Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader\n// @ts-ignore\nconst nodeDocumentLoader = jsonld.documentLoaders.node();\nconst CONTEXTS: any = Object.freeze({\n \"https://w3id.org/security/suites/eip712sig-2021/v1\": {...EthereumEip712Signature2021},\n \"https://schema.org\": schemaOrgContext,\n\n\n \"https://www.w3.org/ns/did/v1\": {\n ...did\n },\n \"https://w3id.org/security/suites/ed25519-2020/v1\": {\n ...ed25519signature2020\n },\n \"https://w3id.org/security/v2\": {\n ...securityv2\n },\n \"https://www.w3.org/2018/credentials/v1\": {\n ...credentials\n },\n \"https://w3c.github.io/vc-data-integrity/vocab/security/vocabulary.jsonld\": {\n ...dataintegrety\n },\n \"https://w3id.org/security/suites/secp256k1recovery-2020/v2\": {\n ...ecdsasecp2020\n }\n})\n\nconst docloader= async (url: string, options: any) => {\n if (url in CONTEXTS) {\n return {\n contextUrl: null, // this is for a context via a link header\n document: CONTEXTS[url], // this is the actual document that was loaded\n documentUrl: url // this is the actual context URL after redirects\n };\n }\n return nodeDocumentLoader(url);\n};\n\n\n\nexport { docloader, CONTEXTS}\n"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"01c391d5ad03546c4b7858d181b4e60185df2808","contentHash":"6d6590c771aae1a9faef90c6be91b6da8ebdfa7f9339166779e34eafb5cc32ee"}} \ No newline at end of file diff --git a/.nyc_output/processinfo/04608cfb-8139-411a-881f-328cfff1e91d.json b/.nyc_output/processinfo/04608cfb-8139-411a-881f-328cfff1e91d.json deleted file mode 100644 index ab29855..0000000 --- a/.nyc_output/processinfo/04608cfb-8139-411a-881f-328cfff1e91d.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":30457,"argv":["/home/pratap/.nvm/versions/node/v16.20.0/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689143590191,"ppid":30446,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/04608cfb-8139-411a-881f-328cfff1e91d.json","externalId":"","uuid":"04608cfb-8139-411a-881f-328cfff1e91d","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json b/.nyc_output/processinfo/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json deleted file mode 100644 index 708b903..0000000 --- a/.nyc_output/processinfo/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":72269,"argv":["/home/pratap/.nvm/versions/node/v14.21.3/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689165454368,"ppid":72258,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/32a6c28c-d96e-4e53-9c3c-fdcb299dddd6.json","externalId":"","uuid":"32a6c28c-d96e-4e53-9c3c-fdcb299dddd6","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json b/.nyc_output/processinfo/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json deleted file mode 100644 index 9cbded2..0000000 --- a/.nyc_output/processinfo/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":73564,"argv":["/home/pratap/.nvm/versions/node/v14.21.3/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689166096155,"ppid":73553,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/3f5b2b7e-1767-4c5b-a01a-13bdc856110e.json","externalId":"","uuid":"3f5b2b7e-1767-4c5b-a01a-13bdc856110e","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json b/.nyc_output/processinfo/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json new file mode 100644 index 0000000..eecb41c --- /dev/null +++ b/.nyc_output/processinfo/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json @@ -0,0 +1 @@ +{"parent":null,"pid":109512,"argv":["/home/pratap/.nvm/versions/node/v18.18.0/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1711651060504,"ppid":109501,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/4bd7bccb-5ff6-438b-a18f-1ab48439eed6.json","externalId":"","uuid":"4bd7bccb-5ff6-438b-a18f-1ab48439eed6","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/64bb629b-5f21-4a45-a083-7a0d3c970242.json b/.nyc_output/processinfo/64bb629b-5f21-4a45-a083-7a0d3c970242.json deleted file mode 100644 index f55b078..0000000 --- a/.nyc_output/processinfo/64bb629b-5f21-4a45-a083-7a0d3c970242.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":33239,"argv":["/home/pratap/.nvm/versions/node/v14.21.3/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689143984111,"ppid":33228,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/64bb629b-5f21-4a45-a083-7a0d3c970242.json","externalId":"","uuid":"64bb629b-5f21-4a45-a083-7a0d3c970242","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/922fb093-6f0c-4fc4-8fed-ced17ae31879.json b/.nyc_output/processinfo/922fb093-6f0c-4fc4-8fed-ced17ae31879.json deleted file mode 100644 index 054434c..0000000 --- a/.nyc_output/processinfo/922fb093-6f0c-4fc4-8fed-ced17ae31879.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":72843,"argv":["/home/pratap/.nvm/versions/node/v14.21.3/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689165962340,"ppid":72830,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/922fb093-6f0c-4fc4-8fed-ced17ae31879.json","externalId":"","uuid":"922fb093-6f0c-4fc4-8fed-ced17ae31879","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/acb70a44-2367-45d4-8b18-cd9ac932f10b.json b/.nyc_output/processinfo/acb70a44-2367-45d4-8b18-cd9ac932f10b.json deleted file mode 100644 index ba0a06a..0000000 --- a/.nyc_output/processinfo/acb70a44-2367-45d4-8b18-cd9ac932f10b.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":76766,"argv":["/home/pratap/.nvm/versions/node/v14.21.3/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689166830403,"ppid":76754,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/acb70a44-2367-45d4-8b18-cd9ac932f10b.json","externalId":"","uuid":"acb70a44-2367-45d4-8b18-cd9ac932f10b","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/d24c19a2-493f-4f7b-b271-8e87167b6445.json b/.nyc_output/processinfo/d24c19a2-493f-4f7b-b271-8e87167b6445.json deleted file mode 100644 index a3dc1cc..0000000 --- a/.nyc_output/processinfo/d24c19a2-493f-4f7b-b271-8e87167b6445.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":74910,"argv":["/home/pratap/.nvm/versions/node/v14.21.3/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689166295289,"ppid":74899,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/d24c19a2-493f-4f7b-b271-8e87167b6445.json","externalId":"","uuid":"d24c19a2-493f-4f7b-b271-8e87167b6445","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/e0b8a14a-7346-4903-92e9-173f65c36a9c.json b/.nyc_output/processinfo/e0b8a14a-7346-4903-92e9-173f65c36a9c.json deleted file mode 100644 index fb89c0f..0000000 --- a/.nyc_output/processinfo/e0b8a14a-7346-4903-92e9-173f65c36a9c.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":74690,"argv":["/home/pratap/.nvm/versions/node/v14.21.3/bin/node","/home/pratap/EthereumEip712Signature2021Suite/node_modules/.bin/mocha","--timeout","20000"],"execArgv":[],"cwd":"/home/pratap/EthereumEip712Signature2021Suite","time":1689166220950,"ppid":74679,"coverageFilename":"/home/pratap/EthereumEip712Signature2021Suite/.nyc_output/e0b8a14a-7346-4903-92e9-173f65c36a9c.json","externalId":"","uuid":"e0b8a14a-7346-4903-92e9-173f65c36a9c","files":["/home/pratap/EthereumEip712Signature2021Suite/src/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts","/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts","/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts","/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/index.json b/.nyc_output/processinfo/index.json index e747cc1..22108cb 100644 --- a/.nyc_output/processinfo/index.json +++ b/.nyc_output/processinfo/index.json @@ -1 +1 @@ -{"processes":{"04608cfb-8139-411a-881f-328cfff1e91d":{"parent":null,"children":[]},"32a6c28c-d96e-4e53-9c3c-fdcb299dddd6":{"parent":null,"children":[]},"3f5b2b7e-1767-4c5b-a01a-13bdc856110e":{"parent":null,"children":[]},"64bb629b-5f21-4a45-a083-7a0d3c970242":{"parent":null,"children":[]},"922fb093-6f0c-4fc4-8fed-ced17ae31879":{"parent":null,"children":[]},"acb70a44-2367-45d4-8b18-cd9ac932f10b":{"parent":null,"children":[]},"d24c19a2-493f-4f7b-b271-8e87167b6445":{"parent":null,"children":[]},"e0b8a14a-7346-4903-92e9-173f65c36a9c":{"parent":null,"children":[]}},"files":{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":["04608cfb-8139-411a-881f-328cfff1e91d","32a6c28c-d96e-4e53-9c3c-fdcb299dddd6","3f5b2b7e-1767-4c5b-a01a-13bdc856110e","64bb629b-5f21-4a45-a083-7a0d3c970242","922fb093-6f0c-4fc4-8fed-ced17ae31879","acb70a44-2367-45d4-8b18-cd9ac932f10b","d24c19a2-493f-4f7b-b271-8e87167b6445","e0b8a14a-7346-4903-92e9-173f65c36a9c"],"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":["04608cfb-8139-411a-881f-328cfff1e91d","3f5b2b7e-1767-4c5b-a01a-13bdc856110e","64bb629b-5f21-4a45-a083-7a0d3c970242","922fb093-6f0c-4fc4-8fed-ced17ae31879","acb70a44-2367-45d4-8b18-cd9ac932f10b","d24c19a2-493f-4f7b-b271-8e87167b6445","e0b8a14a-7346-4903-92e9-173f65c36a9c"],"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":["04608cfb-8139-411a-881f-328cfff1e91d","3f5b2b7e-1767-4c5b-a01a-13bdc856110e","64bb629b-5f21-4a45-a083-7a0d3c970242","922fb093-6f0c-4fc4-8fed-ced17ae31879","acb70a44-2367-45d4-8b18-cd9ac932f10b","d24c19a2-493f-4f7b-b271-8e87167b6445","e0b8a14a-7346-4903-92e9-173f65c36a9c"],"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":["04608cfb-8139-411a-881f-328cfff1e91d","3f5b2b7e-1767-4c5b-a01a-13bdc856110e","64bb629b-5f21-4a45-a083-7a0d3c970242","922fb093-6f0c-4fc4-8fed-ced17ae31879","acb70a44-2367-45d4-8b18-cd9ac932f10b","d24c19a2-493f-4f7b-b271-8e87167b6445","e0b8a14a-7346-4903-92e9-173f65c36a9c"],"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":["04608cfb-8139-411a-881f-328cfff1e91d","3f5b2b7e-1767-4c5b-a01a-13bdc856110e","64bb629b-5f21-4a45-a083-7a0d3c970242","922fb093-6f0c-4fc4-8fed-ced17ae31879","acb70a44-2367-45d4-8b18-cd9ac932f10b","d24c19a2-493f-4f7b-b271-8e87167b6445","e0b8a14a-7346-4903-92e9-173f65c36a9c"]},"externalIds":{}} \ No newline at end of file +{"processes":{"4bd7bccb-5ff6-438b-a18f-1ab48439eed6":{"parent":null,"children":[]}},"files":{"/home/pratap/EthereumEip712Signature2021Suite/src/index.ts":["4bd7bccb-5ff6-438b-a18f-1ab48439eed6"],"/home/pratap/EthereumEip712Signature2021Suite/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts":["4bd7bccb-5ff6-438b-a18f-1ab48439eed6"],"/home/pratap/EthereumEip712Signature2021Suite/src/utils/index.ts":["4bd7bccb-5ff6-438b-a18f-1ab48439eed6"],"/home/pratap/EthereumEip712Signature2021Suite/src/TypedData/Eip712Types.ts":["4bd7bccb-5ff6-438b-a18f-1ab48439eed6"],"/home/pratap/EthereumEip712Signature2021Suite/src/Context/v1/index.ts":["4bd7bccb-5ff6-438b-a18f-1ab48439eed6"]},"externalIds":{}} \ No newline at end of file diff --git a/lib/src/Context/v1/index.d.ts.map b/lib/src/Context/v1/index.d.ts.map index 5caf592..e7d6f2b 100644 --- a/lib/src/Context/v1/index.d.ts.map +++ b/lib/src/Context/v1/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Context/v1/index.ts"],"names":[],"mappings":"AAYA,QAAA,MAAM,QAAQ,EAAE,GAuBd,CAAA;AAEF,QAAA,MAAM,SAAS,QAAc,MAAM,WAAW,GAAG,iBAShD,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Context/v1/index.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,QAAQ,EAAE,GAuBd,CAAA;AAEF,QAAA,MAAM,SAAS,QAAc,MAAM,WAAW,GAAG,iBAShD,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAC,CAAA"} \ No newline at end of file diff --git a/lib/src/Context/v1/index.js b/lib/src/Context/v1/index.js index 09bb5cc..9006e2a 100644 --- a/lib/src/Context/v1/index.js +++ b/lib/src/Context/v1/index.js @@ -18,13 +18,14 @@ const ed25519_signature_2020_json_1 = __importDefault(require("./ed25519-signatu const security_v2_json_1 = __importDefault(require("./security-v2.json")); const credentials_json_1 = __importDefault(require("./credentials.json")); const EthereumEip712Signature2021_json_1 = __importDefault(require("./EthereumEip712Signature2021.json")); -const jsonld = require('jsonld'); +// @ts-ignore +const jsonld_1 = __importDefault(require("jsonld")); const schemaOrg_json_1 = __importDefault(require("../schemaOrg.json")); const vc_data_integrety_json_1 = __importDefault(require("./vc-data-integrety.json")); const lds_ecdsa_secp256k1_recovery2020_json_1 = __importDefault(require("./lds-ecdsa-secp256k1-recovery2020.json")); // Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader // @ts-ignore -const nodeDocumentLoader = jsonld.documentLoaders.node(); +const nodeDocumentLoader = jsonld_1.default.documentLoader; const CONTEXTS = Object.freeze({ "https://w3id.org/security/suites/eip712sig-2021/v1": Object.assign({}, EthereumEip712Signature2021_json_1.default), "https://schema.org": schemaOrg_json_1.default, diff --git a/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts b/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts index ef1d453..0460bff 100644 --- a/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts +++ b/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts @@ -1,5 +1,5 @@ import Web3 from "web3"; -declare const suites: any; +import { suites } from 'jsonld-signatures/lib/suites'; import { SignatureSuiteOptions, SuiteVerifyOptions } from "../types/SuiteOptions"; import { CreateProofOptions } from "../types/ProofOptions"; import { SuiteSignOptions } from "../types/SuiteSignType"; diff --git a/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts.map b/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts.map index 8b82b37..feb351f 100644 --- a/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts.map +++ b/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"EthereumEip712Signature2021.d.ts","sourceRoot":"","sources":["../../../src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,QAAA,MAAQ,MAAM,KAAiC,CAAA;AAY/C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAyBpF,cAAM,2BAA4B,SAAQ,MAAM,CAAC,mBAAmB;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,GA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AAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG;CAkBvE;AAID,eAAe,2BAA2B,CAAC"} \ No newline at end of file +{"version":3,"file":"EthereumEip712Signature2021.d.ts","sourceRoot":"","sources":["../../../src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAQ,EAAC,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAcrD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AA6BpF,cAAM,2BAA4B,SAAQ,MAAM,CAAC,mBAAmB;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,UAAU,EAAE,GAAG,CAAC;IAChB,MAAM,EAAE,GAAG,CAAC;IACZ,iBAAiB,EAAE,MAAM,CAAC;gBAGd,OAAO,EAAE,qBAAqB,EAAE,IAAI,CAAC,EAAE,IAAI;IAuBvD,WAAW;IAOL,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM;;;;;IAoBnC,cAAc,CAAC,UAAU,EAAE,MAAM;;;;IAa3B,aAAa,CAAC,KAAK,EAAE,MAAM;;;;;IAgBjC,KAAK;IAOC,oBAAoB,CAAC,OAAO,EAAE,MAAM;IAcpC,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC;IAmEtD,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAuF1E,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAKzC,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAMxC,gBAAgB,CACpB,OAAO,EACL;QAAE,QAAQ,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IASjC,qBAAqB,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM;IAiBnC,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAiCnE,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO;IA0BrD,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAapC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG;CAkBvE;AAID,eAAe,2BAA2B,CAAC"} \ No newline at end of file diff --git a/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.js b/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.js index 1a6f8c8..52fbf0b 100644 --- a/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.js +++ b/lib/src/EthereumEip712Signature2021/EthereumEip712Signature2021.js @@ -36,7 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const web3_1 = __importDefault(require("web3")); -const { suites } = require('jsonld-signatures'); +//@ts-ignore +const suites_1 = require("jsonld-signatures/lib/suites"); //@ts-ignore const jsonld_1 = __importDefault(require("jsonld")); const crypto_1 = __importDefault(require("crypto")); @@ -58,10 +59,10 @@ const docloader = (url, options) => __awaiter(void 0, void 0, void 0, function* // call the default documentLoader return nodeDocumentLoader(url); }); -const { JCS } = require('jcs'); +const jcs_1 = require("jcs"); // @ts-ignore -JSON.canonify = JCS.cannonicalize; -class EthereumEip712Signature2021 extends suites.LinkedDataSignature { +JSON.canonify = jcs_1.JCS.cannonicalize; +class EthereumEip712Signature2021 extends suites_1.suites.LinkedDataSignature { constructor(options, web3) { // web3 send web3 wrapper arround webwallet super({ type: "EthereumEip712Signature2021" }); @@ -155,6 +156,7 @@ class EthereumEip712Signature2021 extends suites.LinkedDataSignature { var _a; return __awaiter(this, void 0, void 0, function* () { let proof = { + // @ts-ignore type: this.type, }; let embed = options.embed ? options.embed : true; diff --git a/lib/src/TypedData/Eip712Types.js b/lib/src/TypedData/Eip712Types.js index 9281799..f52e51f 100644 --- a/lib/src/TypedData/Eip712Types.js +++ b/lib/src/TypedData/Eip712Types.js @@ -2,10 +2,10 @@ // https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation Object.defineProperty(exports, "__esModule", { value: true }); exports.EIP712TypedData = void 0; -const { JCS } = require('jcs'); +const jcs_1 = require("jcs"); // add canonnicalize to JSON // @ts-ignore -JSON.canonify = JCS.cannonicalize; +JSON.canonify = jcs_1.JCS.cannonicalize; class EIP712TypedData { constructor() { this.keys = new Map(); diff --git a/src/Context/v1/index.ts b/src/Context/v1/index.ts index a7d986a..a922977 100644 --- a/src/Context/v1/index.ts +++ b/src/Context/v1/index.ts @@ -3,13 +3,14 @@ import ed25519signature2020 from './ed25519-signature-2020.json' import securityv2 from './security-v2.json' import credentials from './credentials.json' import EthereumEip712Signature2021 from './EthereumEip712Signature2021.json' -const jsonld = require('jsonld'); +// @ts-ignore +import jsonld from 'jsonld' import schemaOrgContext from '../schemaOrg.json' import dataintegrety from './vc-data-integrety.json' import ecdsasecp2020 from './lds-ecdsa-secp256k1-recovery2020.json' // Ref: https://github.com/digitalbazaar/jsonld.js/#custom-document-loader // @ts-ignore -const nodeDocumentLoader = jsonld.documentLoaders.node(); +const nodeDocumentLoader = jsonld.documentLoader; const CONTEXTS: any = Object.freeze({ "https://w3id.org/security/suites/eip712sig-2021/v1": {...EthereumEip712Signature2021}, "https://schema.org": schemaOrgContext, diff --git a/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts b/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts index c137cf9..b8c158b 100644 --- a/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts +++ b/src/EthereumEip712Signature2021/EthereumEip712Signature2021.ts @@ -1,6 +1,10 @@ import Web3 from "web3"; -const { suites } = require('jsonld-signatures') +//@ts-ignore + +import {suites } from 'jsonld-signatures/lib/suites' + +// import {suites} from 'jsonld-signatures' import { recoverTypedSignature, signTypedData, signTypedMessage } from 'eth-sig-util' //@ts-ignore @@ -38,7 +42,11 @@ const docloader = async (url: any, options: any) => { -const { JCS } = require('jcs') + +import {JCS} from 'jcs' + + + // @ts-ignore JSON.canonify = JCS.cannonicalize @@ -159,6 +167,7 @@ class EthereumEip712Signature2021 extends suites.LinkedDataSignature { async createProof(options: CreateProofOptions): Promise { let proof: Record = { + // @ts-ignore type: this.type, } diff --git a/src/TypedData/Eip712Types.ts b/src/TypedData/Eip712Types.ts index 56c2525..09ad755 100644 --- a/src/TypedData/Eip712Types.ts +++ b/src/TypedData/Eip712Types.ts @@ -1,7 +1,7 @@ // https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation -const { JCS } = require('jcs') +import { JCS } from "jcs" // add canonnicalize to JSON // @ts-ignore