@opengovsg/formsg-sdk
Advanced tools
Comparing version 0.8.2 to 0.8.3
@@ -1,18 +0,18 @@ | ||
{"/Users/gt-liangy/Developer/formsg-sdk/spec/resources/crypto-data-20200322.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/spec/resources/crypto-data-20200322.ts","statementMap":{"0":{"start":{"line":10,"column":18},"end":{"line":96,"column":null}},"1":{"start":{"line":107,"column":2},"end":{"line":107,"column":11}},"2":{"start":{"line":99,"column":2},"end":{"line":99,"column":1942}},"3":{"start":{"line":108,"column":2},"end":{"line":108,"column":12}},"4":{"start":{"line":101,"column":22},"end":{"line":101,"column":68}},"5":{"start":{"line":109,"column":2},"end":{"line":109,"column":15}},"6":{"start":{"line":102,"column":22},"end":{"line":102,"column":68}},"7":{"start":{"line":110,"column":2},"end":{"line":110,"column":15}},"8":{"start":{"line":103,"column":28},"end":{"line":103,"column":74}},"9":{"start":{"line":111,"column":2},"end":{"line":111,"column":21}},"10":{"start":{"line":104,"column":28},"end":{"line":104,"column":74}},"11":{"start":{"line":112,"column":2},"end":{"line":112,"column":21}}},"fnMap":{},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1},"f":{},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/spec/resources/crypto-data-20200604.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/spec/resources/crypto-data-20200604.ts","statementMap":{"0":{"start":{"line":1,"column":27},"end":{"line":14,"column":null}},"1":{"start":{"line":17,"column":2},"end":{"line":17,"column":20}}},"fnMap":{},"branchMap":{},"s":{"0":1,"1":1},"f":{},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/crypto.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/crypto.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"1":{"start":{"line":13,"column":0},"end":{"line":13,"column":null}},"2":{"start":{"line":20,"column":0},"end":{"line":20,"column":47}},"3":{"start":{"line":21,"column":0},"end":{"line":21,"column":55}},"4":{"start":{"line":35,"column":21},"end":{"line":35,"column":52}},"5":{"start":{"line":37,"column":2},"end":{"line":39,"column":null}},"6":{"start":{"line":38,"column":4},"end":{"line":38,"column":null}},"7":{"start":{"line":41,"column":2},"end":{"line":41,"column":null}},"8":{"start":{"line":52,"column":28},"end":{"line":52,"column":38}},"9":{"start":{"line":53,"column":16},"end":{"line":53,"column":36}},"10":{"start":{"line":54,"column":20},"end":{"line":60,"column":null}},"11":{"start":{"line":62,"column":2},"end":{"line":62,"column":null}},"12":{"start":{"line":75,"column":2},"end":{"line":86,"column":null}},"13":{"start":{"line":76,"column":10},"end":{"line":76,"column":11}},"14":{"start":{"line":76,"column":11},"end":{"line":76,"column":30}},"15":{"start":{"line":76,"column":32},"end":{"line":76,"column":77}},"16":{"start":{"line":77,"column":10},"end":{"line":77,"column":11}},"17":{"start":{"line":77,"column":11},"end":{"line":77,"column":16}},"18":{"start":{"line":77,"column":18},"end":{"line":77,"column":74}},"19":{"start":{"line":78,"column":4},"end":{"line":83,"column":null}},"20":{"start":{"line":85,"column":4},"end":{"line":85,"column":null}},"21":{"start":{"line":99,"column":24},"end":{"line":99,"column":68}},"22":{"start":{"line":100,"column":2},"end":{"line":101,"column":null}},"23":{"start":{"line":101,"column":4},"end":{"line":101,"column":null}},"24":{"start":{"line":102,"column":2},"end":{"line":102,"column":null}},"25":{"start":{"line":124,"column":4},"end":{"line":165,"column":null}},"26":{"start":{"line":125,"column":14},"end":{"line":125,"column":30}},"27":{"start":{"line":125,"column":32},"end":{"line":125,"column":47}},"28":{"start":{"line":125,"column":49},"end":{"line":125,"column":56}},"29":{"start":{"line":129,"column":31},"end":{"line":129,"column":72}},"30":{"start":{"line":130,"column":6},"end":{"line":132,"column":null}},"31":{"start":{"line":131,"column":8},"end":{"line":131,"column":null}},"32":{"start":{"line":133,"column":38},"end":{"line":133,"column":78}},"33":{"start":{"line":134,"column":6},"end":{"line":136,"column":null}},"34":{"start":{"line":135,"column":8},"end":{"line":135,"column":null}},"35":{"start":{"line":138,"column":45},"end":{"line":140,"column":null}},"36":{"start":{"line":142,"column":6},"end":{"line":160,"column":null}},"37":{"start":{"line":146,"column":41},"end":{"line":148,"column":null}},"38":{"start":{"line":150,"column":8},"end":{"line":153,"column":null}},"39":{"start":{"line":152,"column":10},"end":{"line":152,"column":null}},"40":{"start":{"line":154,"column":40},"end":{"line":156,"column":null}},"41":{"start":{"line":159,"column":8},"end":{"line":159,"column":null}},"42":{"start":{"line":162,"column":6},"end":{"line":162,"column":null}},"43":{"start":{"line":164,"column":6},"end":{"line":164,"column":null}},"44":{"start":{"line":167,"column":2},"end":{"line":167,"column":null}},"45":{"start":{"line":175,"column":13},"end":{"line":175,"column":31}},"46":{"start":{"line":176,"column":2},"end":{"line":179,"column":null}},"47":{"start":{"line":189,"column":38},"end":{"line":189,"column":40}},"48":{"start":{"line":190,"column":38},"end":{"line":190,"column":39}},"49":{"start":{"line":192,"column":4},"end":{"line":204,"column":null}},"50":{"start":{"line":193,"column":29},"end":{"line":193,"column":61}},"51":{"start":{"line":195,"column":6},"end":{"line":201,"column":null}},"52":{"start":{"line":203,"column":6},"end":{"line":203,"column":null}},"53":{"start":{"line":206,"column":2},"end":{"line":206,"column":null}},"54":{"start":{"line":220,"column":8},"end":{"line":220,"column":null}},"55":{"start":{"line":221,"column":8},"end":{"line":221,"column":null}},"56":{"start":{"line":222,"column":2},"end":{"line":231,"column":null}},"57":{"start":{"line":244,"column":4},"end":{"line":244,"column":23}},"58":{"start":{"line":244,"column":25},"end":{"line":244,"column":30}},"59":{"start":{"line":244,"column":32},"end":{"line":244,"column":55}},"60":{"start":{"line":246,"column":2},"end":{"line":251,"column":null}},"61":{"start":{"line":258,"column":0},"end":{"line":268,"column":null}},"62":{"start":{"line":258,"column":21},"end":{"line":258,"column":25}},"63":{"start":{"line":259,"column":27},"end":{"line":259,"column":45}},"64":{"start":{"line":260,"column":2},"end":{"line":267,"column":null}}},"fnMap":{"0":{"name":"encrypt","decl":{"start":{"line":30,"column":9},"end":{"line":30,"column":16}},"loc":{"start":{"line":33,"column":28},"end":{"line":42,"column":1}}},"1":{"name":"_encrypt","decl":{"start":{"line":51,"column":9},"end":{"line":51,"column":17}},"loc":{"start":{"line":51,"column":57},"end":{"line":63,"column":1}}},"2":{"name":"_decrypt","decl":{"start":{"line":71,"column":9},"end":{"line":71,"column":17}},"loc":{"start":{"line":73,"column":36},"end":{"line":87,"column":1}}},"3":{"name":"_verifySignedMessage","decl":{"start":{"line":95,"column":9},"end":{"line":95,"column":29}},"loc":{"start":{"line":97,"column":19},"end":{"line":103,"column":1}}},"4":{"name":"decrypt","decl":{"start":{"line":110,"column":9},"end":{"line":110,"column":16}},"loc":{"start":{"line":110,"column":41},"end":{"line":168,"column":1}}},"5":{"name":"_internalDecrypt","decl":{"start":{"line":120,"column":11},"end":{"line":120,"column":27}},"loc":{"start":{"line":122,"column":32},"end":{"line":166,"column":3}}},"6":{"name":"generate","decl":{"start":{"line":174,"column":9},"end":{"line":174,"column":17}},"loc":{"start":{"line":174,"column":17},"end":{"line":180,"column":1}}},"7":{"name":"valid","decl":{"start":{"line":182,"column":9},"end":{"line":182,"column":14}},"loc":{"start":{"line":182,"column":39},"end":{"line":207,"column":1}}},"8":{"name":"_internalValid","decl":{"start":{"line":188,"column":11},"end":{"line":188,"column":25}},"loc":{"start":{"line":188,"column":62},"end":{"line":205,"column":3}}},"9":{"name":"encryptFile","decl":{"start":{"line":216,"column":15},"end":{"line":216,"column":26}},"loc":{"start":{"line":218,"column":23},"end":{"line":232,"column":null}}},"10":{"name":"decryptFile","decl":{"start":{"line":242,"column":15},"end":{"line":242,"column":26}},"loc":{"start":{"line":244,"column":79},"end":{"line":252,"column":null}}},"11":{"name":"(anonymous_29)","decl":{"start":{"line":258,"column":9},"end":{"line":258,"column":19}},"loc":{"start":{"line":258,"column":72},"end":{"line":268,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":null}},"type":"if","locations":[{"start":{"line":37,"column":2},"end":{"line":39,"column":null}},{"start":{"line":37,"column":2},"end":{"line":39,"column":null}}]},"1":{"loc":{"start":{"line":100,"column":2},"end":{"line":101,"column":null}},"type":"if","locations":[{"start":{"line":100,"column":2},"end":{"line":101,"column":null}},{"start":{"line":100,"column":2},"end":{"line":101,"column":null}}]},"2":{"loc":{"start":{"line":130,"column":6},"end":{"line":132,"column":null}},"type":"if","locations":[{"start":{"line":130,"column":6},"end":{"line":132,"column":null}},{"start":{"line":130,"column":6},"end":{"line":132,"column":null}}]},"3":{"loc":{"start":{"line":134,"column":6},"end":{"line":136,"column":null}},"type":"if","locations":[{"start":{"line":134,"column":6},"end":{"line":136,"column":null}},{"start":{"line":134,"column":6},"end":{"line":136,"column":null}}]},"4":{"loc":{"start":{"line":142,"column":6},"end":{"line":160,"column":null}},"type":"if","locations":[{"start":{"line":142,"column":6},"end":{"line":160,"column":null}},{"start":{"line":142,"column":6},"end":{"line":160,"column":null}}]},"5":{"loc":{"start":{"line":150,"column":8},"end":{"line":153,"column":null}},"type":"if","locations":[{"start":{"line":150,"column":8},"end":{"line":153,"column":null}},{"start":{"line":150,"column":8},"end":{"line":153,"column":null}}]},"6":{"loc":{"start":{"line":200,"column":10},"end":{"line":200,"column":12}},"type":"cond-expr","locations":[{"start":{"line":200,"column":10},"end":{"line":200,"column":12}},{"start":{"line":200,"column":10},"end":{"line":200,"column":32}}]},"7":{"loc":{"start":{"line":196,"column":31},"end":{"line":200,"column":12}},"type":"binary-expr","locations":[{"start":{"line":196,"column":31},"end":{"line":200,"column":12}},{"start":{"line":200,"column":10},"end":{"line":200,"column":12}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":9,"5":9,"6":1,"7":9,"8":9,"9":9,"10":9,"11":9,"12":11,"13":11,"14":11,"15":11,"16":11,"17":11,"18":11,"19":11,"20":1,"21":1,"22":1,"23":0,"24":1,"25":10,"26":10,"27":10,"28":10,"29":10,"30":10,"31":2,"32":8,"33":8,"34":1,"35":7,"36":7,"37":1,"38":1,"39":0,"40":1,"41":1,"42":7,"43":3,"44":8,"45":22,"46":22,"47":3,"48":3,"49":3,"50":3,"51":3,"52":0,"53":5,"54":2,"55":2,"56":2,"57":2,"58":2,"59":2,"60":2,"61":3,"62":5,"63":5,"64":5},"f":{"0":9,"1":9,"2":11,"3":1,"4":8,"5":10,"6":22,"7":5,"8":3,"9":2,"10":2,"11":5},"b":{"0":[1,8],"1":[0,1],"2":[2,8],"3":[1,7],"4":[1,6],"5":[0,1],"6":[1,2],"7":[3,2]}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/index.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/index.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":29}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":41}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"3":{"start":{"line":12,"column":0},"end":{"line":28,"column":null}},"4":{"start":{"line":12,"column":19},"end":{"line":12,"column":null}},"5":{"start":{"line":13,"column":10},"end":{"line":13,"column":14}},"6":{"start":{"line":13,"column":16},"end":{"line":13,"column":32}},"7":{"start":{"line":13,"column":34},"end":{"line":13,"column":53}},"8":{"start":{"line":15,"column":2},"end":{"line":27,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":19}},"loc":{"start":{"line":12,"column":50},"end":{"line":28,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":19},"end":{"line":12,"column":null}},"type":"if","locations":[{"start":{"line":12,"column":19},"end":{"line":12,"column":null}},{"start":{"line":12,"column":19},"end":{"line":12,"column":null}}]},"1":{"loc":{"start":{"line":17,"column":12},"end":{"line":17,"column":16}},"type":"binary-expr","locations":[{"start":{"line":17,"column":12},"end":{"line":17,"column":16}},{"start":{"line":17,"column":20},"end":{"line":17,"column":32}}]},"2":{"loc":{"start":{"line":21,"column":12},"end":{"line":21,"column":16}},"type":"binary-expr","locations":[{"start":{"line":21,"column":12},"end":{"line":21,"column":16}},{"start":{"line":21,"column":20},"end":{"line":21,"column":32}}]},"3":{"loc":{"start":{"line":24,"column":12},"end":{"line":24,"column":16}},"type":"binary-expr","locations":[{"start":{"line":24,"column":12},"end":{"line":24,"column":16}},{"start":{"line":24,"column":20},"end":{"line":24,"column":32}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":6,"5":5,"6":5,"7":5,"8":5},"f":{"0":5},"b":{"0":[1,4],"1":[5,1],"2":[5,1],"3":[5,1]}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/webhooks.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/webhooks.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":47}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":47}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":52}},"4":{"start":{"line":26,"column":24},"end":{"line":26,"column":80}},"5":{"start":{"line":27,"column":2},"end":{"line":27,"column":null}},"6":{"start":{"line":36,"column":36},"end":{"line":36,"column":null}},"7":{"start":{"line":37,"column":21},"end":{"line":37,"column":39}},"8":{"start":{"line":38,"column":2},"end":{"line":38,"column":null}},"9":{"start":{"line":54,"column":10},"end":{"line":54,"column":null}},"10":{"start":{"line":55,"column":6},"end":{"line":55,"column":19}},"11":{"start":{"line":56,"column":6},"end":{"line":56,"column":7}},"12":{"start":{"line":57,"column":6},"end":{"line":57,"column":21}},"13":{"start":{"line":58,"column":6},"end":{"line":58,"column":null}},"14":{"start":{"line":60,"column":18},"end":{"line":60,"column":27}},"15":{"start":{"line":62,"column":4},"end":{"line":64,"column":null}},"16":{"start":{"line":63,"column":6},"end":{"line":63,"column":null}},"17":{"start":{"line":67,"column":4},"end":{"line":80,"column":null}},"18":{"start":{"line":77,"column":6},"end":{"line":79,"column":null}},"19":{"start":{"line":83,"column":4},"end":{"line":87,"column":null}},"20":{"start":{"line":84,"column":6},"end":{"line":86,"column":null}},"21":{"start":{"line":90,"column":2},"end":{"line":90,"column":null}},"22":{"start":{"line":107,"column":4},"end":{"line":107,"column":7}},"23":{"start":{"line":108,"column":4},"end":{"line":108,"column":16}},"24":{"start":{"line":109,"column":4},"end":{"line":109,"column":10}},"25":{"start":{"line":110,"column":4},"end":{"line":110,"column":9}},"26":{"start":{"line":118,"column":6},"end":{"line":119,"column":41}},"27":{"start":{"line":120,"column":4},"end":{"line":120,"column":null}},"28":{"start":{"line":123,"column":2},"end":{"line":123,"column":null}},"29":{"start":{"line":136,"column":2},"end":{"line":136,"column":7}},"30":{"start":{"line":137,"column":2},"end":{"line":137,"column":14}},"31":{"start":{"line":138,"column":2},"end":{"line":138,"column":8}},"32":{"start":{"line":139,"column":2},"end":{"line":139,"column":11}},"33":{"start":{"line":146,"column":2},"end":{"line":146,"column":null}},"34":{"start":{"line":153,"column":0},"end":{"line":167,"column":null}},"35":{"start":{"line":153,"column":19},"end":{"line":153,"column":null}},"36":{"start":{"line":154,"column":10},"end":{"line":154,"column":14}},"37":{"start":{"line":154,"column":16},"end":{"line":154,"column":32}},"38":{"start":{"line":155,"column":27},"end":{"line":155,"column":45}},"39":{"start":{"line":157,"column":2},"end":{"line":166,"column":null}}},"fnMap":{"0":{"name":"verifySignature","decl":{"start":{"line":18,"column":9},"end":{"line":18,"column":24}},"loc":{"start":{"line":24,"column":26},"end":{"line":28,"column":1}}},"1":{"name":"verifyEpoch","decl":{"start":{"line":36,"column":9},"end":{"line":36,"column":20}},"loc":{"start":{"line":36,"column":59},"end":{"line":39,"column":1}}},"2":{"name":"authenticate","decl":{"start":{"line":45,"column":9},"end":{"line":45,"column":21}},"loc":{"start":{"line":45,"column":46},"end":{"line":91,"column":1}}},"3":{"name":"_internalAuthenticate","decl":{"start":{"line":52,"column":11},"end":{"line":52,"column":32}},"loc":{"start":{"line":52,"column":60},"end":{"line":88,"column":3}}},"4":{"name":"generateSignature","decl":{"start":{"line":98,"column":9},"end":{"line":98,"column":26}},"loc":{"start":{"line":98,"column":51},"end":{"line":124,"column":1}}},"5":{"name":"_internalGenerateSignature","decl":{"start":{"line":106,"column":11},"end":{"line":106,"column":37}},"loc":{"start":{"line":116,"column":3},"end":{"line":121,"column":3}}},"6":{"name":"constructHeader","decl":{"start":{"line":135,"column":9},"end":{"line":135,"column":24}},"loc":{"start":{"line":145,"column":1},"end":{"line":147,"column":1}}},"7":{"name":"(anonymous_8)","decl":{"start":{"line":153,"column":9},"end":{"line":153,"column":19}},"loc":{"start":{"line":153,"column":49},"end":{"line":167,"column":1}}},"8":{"name":"(anonymous_9)","decl":{"start":{"line":164,"column":8},"end":{"line":164,"column":21}},"loc":{"start":{"line":164,"column":8},"end":{"line":164,"column":22}}},"9":{"name":"(anonymous_10)","decl":{"start":{"line":165,"column":58},"end":{"line":165,"column":71}},"loc":{"start":{"line":165,"column":58},"end":{"line":165,"column":72}}}},"branchMap":{"0":{"loc":{"start":{"line":36,"column":36},"end":{"line":36,"column":null}},"type":"if","locations":[{"start":{"line":36,"column":36},"end":{"line":36,"column":null}},{"start":{"line":36,"column":36},"end":{"line":36,"column":null}}]},"1":{"loc":{"start":{"line":38,"column":9},"end":{"line":38,"column":23}},"type":"binary-expr","locations":[{"start":{"line":38,"column":9},"end":{"line":38,"column":23}},{"start":{"line":38,"column":27},"end":{"line":38,"column":46}}]},"2":{"loc":{"start":{"line":62,"column":4},"end":{"line":64,"column":null}},"type":"if","locations":[{"start":{"line":62,"column":4},"end":{"line":64,"column":null}},{"start":{"line":62,"column":4},"end":{"line":64,"column":null}}]},"3":{"loc":{"start":{"line":62,"column":8},"end":{"line":62,"column":14}},"type":"binary-expr","locations":[{"start":{"line":62,"column":8},"end":{"line":62,"column":14}},{"start":{"line":62,"column":18},"end":{"line":62,"column":28}},{"start":{"line":62,"column":32},"end":{"line":62,"column":45}},{"start":{"line":62,"column":49},"end":{"line":62,"column":56}}]},"4":{"loc":{"start":{"line":67,"column":4},"end":{"line":80,"column":null}},"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":80,"column":null}},{"start":{"line":67,"column":4},"end":{"line":80,"column":null}}]},"5":{"loc":{"start":{"line":83,"column":4},"end":{"line":87,"column":null}},"type":"if","locations":[{"start":{"line":83,"column":4},"end":{"line":87,"column":null}},{"start":{"line":83,"column":4},"end":{"line":87,"column":null}}]},"6":{"loc":{"start":{"line":153,"column":19},"end":{"line":153,"column":null}},"type":"if","locations":[{"start":{"line":153,"column":19},"end":{"line":153,"column":null}},{"start":{"line":153,"column":19},"end":{"line":153,"column":null}}]},"7":{"loc":{"start":{"line":163,"column":8},"end":{"line":163,"column":43}},"type":"cond-expr","locations":[{"start":{"line":163,"column":8},"end":{"line":163,"column":43}},{"start":{"line":164,"column":8},"end":{"line":164,"column":22}}]},"8":{"loc":{"start":{"line":165,"column":40},"end":{"line":165,"column":55}},"type":"cond-expr","locations":[{"start":{"line":165,"column":40},"end":{"line":165,"column":55}},{"start":{"line":165,"column":58},"end":{"line":165,"column":72}}]}},"s":{"0":4,"1":4,"2":4,"3":4,"4":2,"5":2,"6":4,"7":2,"8":2,"9":2,"10":2,"11":2,"12":2,"13":2,"14":2,"15":2,"16":0,"17":2,"18":0,"19":2,"20":1,"21":6,"22":3,"23":3,"24":3,"25":3,"26":3,"27":3,"28":1,"29":3,"30":3,"31":3,"32":3,"33":3,"34":4,"35":6,"36":6,"37":6,"38":6,"39":6},"f":{"0":2,"1":2,"2":6,"3":2,"4":1,"5":3,"6":3,"7":6,"8":0,"9":0},"b":{"0":[2,0],"1":[2,2],"2":[0,2],"3":[2,2,2,2],"4":[0,2],"5":[1,1],"6":[0,6],"7":[1,5],"8":[1,5]}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/resource/signing-keys.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/resource/signing-keys.ts","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":19,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":4},"f":{},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/resource/verification-keys.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/resource/verification-keys.ts","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":19,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":3},"f":{},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/util/parser.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/util/parser.ts","statementMap":{"0":{"start":{"line":22,"column":26},"end":{"line":28,"column":33}},"1":{"start":{"line":24,"column":17},"end":{"line":24,"column":35}},"2":{"start":{"line":25,"column":19},"end":{"line":25,"column":20}},"3":{"start":{"line":25,"column":22},"end":{"line":25,"column":23}},"4":{"start":{"line":26,"column":6},"end":{"line":26,"column":null}},"5":{"start":{"line":27,"column":6},"end":{"line":27,"column":null}},"6":{"start":{"line":30,"column":2},"end":{"line":30,"column":null}},"7":{"start":{"line":33,"column":9},"end":{"line":33,"column":29}}},"fnMap":{"0":{"name":"parseSignatureHeader","decl":{"start":{"line":21,"column":9},"end":{"line":21,"column":29}},"loc":{"start":{"line":21,"column":44},"end":{"line":31,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":24,"column":9},"end":{"line":24,"column":10}},"loc":{"start":{"line":24,"column":12},"end":{"line":24,"column":19}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":25,"column":12},"end":{"line":25,"column":13}},"loc":{"start":{"line":25,"column":24},"end":{"line":28,"column":5}}}},"branchMap":{},"s":{"0":2,"1":8,"2":8,"3":8,"4":8,"5":8,"6":2,"7":4},"f":{"0":2,"1":8,"2":8},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/util/publicKey.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/util/publicKey.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":55}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":27}},"2":{"start":{"line":12,"column":2},"end":{"line":20,"column":null}},"3":{"start":{"line":15,"column":6},"end":{"line":15,"column":null}},"4":{"start":{"line":17,"column":6},"end":{"line":17,"column":null}},"5":{"start":{"line":19,"column":6},"end":{"line":19,"column":null}},"6":{"start":{"line":23,"column":9},"end":{"line":23,"column":21}}},"fnMap":{"0":{"name":"getPublicKey","decl":{"start":{"line":11,"column":9},"end":{"line":11,"column":21}},"loc":{"start":{"line":11,"column":40},"end":{"line":21,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":13,"column":4},"end":{"line":13,"column":27}},"type":"switch","locations":[{"start":{"line":13,"column":4},"end":{"line":13,"column":27}},{"start":{"line":14,"column":4},"end":{"line":15,"column":null}},{"start":{"line":16,"column":4},"end":{"line":17,"column":null}},{"start":{"line":18,"column":4},"end":{"line":19,"column":null}}]}},"s":{"0":4,"1":4,"2":11,"3":0,"4":9,"5":2,"6":4},"f":{"0":11},"b":{"0":[0,0,9,2]}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/util/signature.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/util/signature.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":71}},"2":{"start":{"line":11,"column":2},"end":{"line":13,"column":null}},"3":{"start":{"line":35,"column":9},"end":{"line":35,"column":13}},"4":{"start":{"line":28,"column":2},"end":{"line":32,"column":null}},"5":{"start":{"line":35,"column":15},"end":{"line":35,"column":21}}},"fnMap":{"0":{"name":"sign","decl":{"start":{"line":10,"column":9},"end":{"line":10,"column":13}},"loc":{"start":{"line":10,"column":51},"end":{"line":14,"column":1}}},"1":{"name":"verify","decl":{"start":{"line":23,"column":9},"end":{"line":23,"column":15}},"loc":{"start":{"line":26,"column":19},"end":{"line":33,"column":1}}}},"branchMap":{},"s":{"0":4,"1":4,"2":3,"3":4,"4":2,"5":4},"f":{"0":3,"1":2},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/util/stage.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/util/stage.ts","statementMap":{"0":{"start":{"line":3,"column":49},"end":{"line":8,"column":null}},"1":{"start":{"line":10,"column":0},"end":{"line":10,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":4,"1":4},"f":{},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/util/validate.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/util/validate.ts","statementMap":{"0":{"start":{"line":4,"column":2},"end":{"line":6,"column":null}},"1":{"start":{"line":5,"column":4},"end":{"line":5,"column":null}},"2":{"start":{"line":10,"column":17},"end":{"line":19,"column":null}},"3":{"start":{"line":14,"column":6},"end":{"line":19,"column":null}},"4":{"start":{"line":22,"column":2},"end":{"line":22,"column":null}},"5":{"start":{"line":25,"column":9},"end":{"line":25,"column":30}}},"fnMap":{"0":{"name":"determineIsFormFields","decl":{"start":{"line":3,"column":9},"end":{"line":3,"column":30}},"loc":{"start":{"line":3,"column":39},"end":{"line":23,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":11,"column":4},"end":{"line":11,"column":5}},"loc":{"start":{"line":11,"column":13},"end":{"line":14,"column":7}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":2},"end":{"line":6,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":6,"column":null}},{"start":{"line":4,"column":2},"end":{"line":6,"column":null}}]},"1":{"loc":{"start":{"line":14,"column":7},"end":{"line":14,"column":42}},"type":"binary-expr","locations":[{"start":{"line":14,"column":7},"end":{"line":14,"column":42}},{"start":{"line":15,"column":8},"end":{"line":15,"column":43}},{"start":{"line":16,"column":8},"end":{"line":16,"column":25}},{"start":{"line":17,"column":6},"end":{"line":17,"column":18}},{"start":{"line":18,"column":6},"end":{"line":18,"column":24}},{"start":{"line":19,"column":6},"end":{"line":19,"column":23}}]}},"s":{"0":8,"1":1,"2":7,"3":58,"4":7,"5":3},"f":{"0":8,"1":58},"b":{"0":[1,7],"1":[58,4,0,58,58,58]}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/verification/authenticate.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/verification/authenticate.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":57}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":37}},"3":{"start":{"line":20,"column":20},"end":{"line":20,"column":39}},"4":{"start":{"line":21,"column":20},"end":{"line":21,"column":61}},"5":{"start":{"line":22,"column":4},"end":{"line":22,"column":null}},"6":{"start":{"line":35,"column":4},"end":{"line":35,"column":19}},"7":{"start":{"line":36,"column":4},"end":{"line":36,"column":23}},"8":{"start":{"line":37,"column":4},"end":{"line":37,"column":11}},"9":{"start":{"line":38,"column":4},"end":{"line":38,"column":10}},"10":{"start":{"line":40,"column":4},"end":{"line":82,"column":null}},"11":{"start":{"line":41,"column":12},"end":{"line":52,"column":null}},"12":{"start":{"line":42,"column":8},"end":{"line":42,"column":24}},"13":{"start":{"line":43,"column":8},"end":{"line":43,"column":15}},"14":{"start":{"line":44,"column":8},"end":{"line":44,"column":17}},"15":{"start":{"line":45,"column":8},"end":{"line":45,"column":null}},"16":{"start":{"line":54,"column":28},"end":{"line":54,"column":33}},"17":{"start":{"line":55,"column":6},"end":{"line":73,"column":null}},"18":{"start":{"line":56,"column":21},"end":{"line":62,"column":10}},"19":{"start":{"line":63,"column":8},"end":{"line":67,"column":null}},"20":{"start":{"line":69,"column":8},"end":{"line":71,"column":null}},"21":{"start":{"line":72,"column":8},"end":{"line":72,"column":null}},"22":{"start":{"line":75,"column":6},"end":{"line":80,"column":null}},"23":{"start":{"line":81,"column":6},"end":{"line":81,"column":null}},"24":{"start":{"line":85,"column":2},"end":{"line":85,"column":null}},"25":{"start":{"line":7,"column":0},"end":{"line":7,"column":null}}},"fnMap":{"0":{"name":"default_1","decl":{"start":{"line":7,"column":0},"end":{"line":7,"column":null}},"loc":{"start":{"line":9,"column":34},"end":{"line":86,"column":1}}},"1":{"name":"isSignatureTimeValid","decl":{"start":{"line":16,"column":11},"end":{"line":16,"column":31}},"loc":{"start":{"line":18,"column":31},"end":{"line":23,"column":3}}},"2":{"name":"authenticate","decl":{"start":{"line":34,"column":11},"end":{"line":34,"column":23}},"loc":{"start":{"line":39,"column":36},"end":{"line":83,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":11},"end":{"line":22,"column":34}},"type":"binary-expr","locations":[{"start":{"line":22,"column":11},"end":{"line":22,"column":34}},{"start":{"line":22,"column":38},"end":{"line":22,"column":61}}]},"1":{"loc":{"start":{"line":55,"column":6},"end":{"line":73,"column":null}},"type":"if","locations":[{"start":{"line":55,"column":6},"end":{"line":73,"column":null}},{"start":{"line":55,"column":6},"end":{"line":73,"column":null}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":3,"5":3,"6":3,"7":3,"8":3,"9":3,"10":3,"11":3,"12":3,"13":3,"14":3,"15":3,"16":3,"17":3,"18":2,"19":2,"20":1,"21":1,"22":0,"23":0,"24":2,"25":3},"f":{"0":2,"1":3,"2":3},"b":{"0":[3,2],"1":[2,1]}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/verification/basestring.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/verification/basestring.ts","statementMap":{"0":{"start":{"line":7,"column":2},"end":{"line":7,"column":15}},"1":{"start":{"line":8,"column":2},"end":{"line":8,"column":8}},"2":{"start":{"line":9,"column":2},"end":{"line":9,"column":9}},"3":{"start":{"line":10,"column":2},"end":{"line":10,"column":8}},"4":{"start":{"line":11,"column":2},"end":{"line":11,"column":6}},"5":{"start":{"line":13,"column":2},"end":{"line":13,"column":null}},"6":{"start":{"line":16,"column":0},"end":{"line":16,"column":null}}},"fnMap":{"0":{"name":"basestring","decl":{"start":{"line":6,"column":9},"end":{"line":6,"column":19}},"loc":{"start":{"line":12,"column":32},"end":{"line":14,"column":1}}}},"branchMap":{},"s":{"0":4,"1":4,"2":4,"3":4,"4":4,"5":4,"6":3},"f":{"0":4},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/verification/generate-signature.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/verification/generate-signature.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":71}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":37}},"3":{"start":{"line":8,"column":4},"end":{"line":8,"column":17}},"4":{"start":{"line":9,"column":4},"end":{"line":9,"column":10}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":11}},"6":{"start":{"line":11,"column":4},"end":{"line":11,"column":10}},"7":{"start":{"line":13,"column":17},"end":{"line":13,"column":27}},"8":{"start":{"line":14,"column":17},"end":{"line":14,"column":77}},"9":{"start":{"line":15,"column":22},"end":{"line":17,"column":null}},"10":{"start":{"line":19,"column":4},"end":{"line":21,"column":null}},"11":{"start":{"line":24,"column":2},"end":{"line":24,"column":null}},"12":{"start":{"line":6,"column":0},"end":{"line":6,"column":25}}},"fnMap":{"0":{"name":"default_1","decl":{"start":{"line":6,"column":0},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":43},"end":{"line":25,"column":1}}},"1":{"name":"generateSignature","decl":{"start":{"line":7,"column":11},"end":{"line":7,"column":28}},"loc":{"start":{"line":12,"column":33},"end":{"line":22,"column":3}}}},"branchMap":{},"s":{"0":3,"1":3,"2":3,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":2,"12":3},"f":{"0":2,"1":1},"b":{}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/verification/get-public-key.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/verification/get-public-key.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":65}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":33}},"2":{"start":{"line":11,"column":2},"end":{"line":19,"column":null}},"3":{"start":{"line":14,"column":6},"end":{"line":14,"column":null}},"4":{"start":{"line":16,"column":6},"end":{"line":16,"column":null}},"5":{"start":{"line":18,"column":6},"end":{"line":18,"column":null}},"6":{"start":{"line":22,"column":0},"end":{"line":22,"column":null}}},"fnMap":{"0":{"name":"getPublicKey","decl":{"start":{"line":10,"column":9},"end":{"line":10,"column":21}},"loc":{"start":{"line":10,"column":40},"end":{"line":20,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":4},"end":{"line":12,"column":27}},"type":"switch","locations":[{"start":{"line":12,"column":4},"end":{"line":12,"column":27}},{"start":{"line":13,"column":4},"end":{"line":14,"column":null}},{"start":{"line":15,"column":4},"end":{"line":16,"column":null}},{"start":{"line":17,"column":4},"end":{"line":18,"column":null}}]}},"s":{"0":3,"1":3,"2":8,"3":2,"4":4,"5":2,"6":3},"f":{"0":8},"b":{"0":[1,2,4,2]}} | ||
,"/Users/gt-liangy/Developer/formsg-sdk/src/verification/index.ts": {"path":"/Users/gt-liangy/Developer/formsg-sdk/src/verification/index.ts","statementMap":{"0":{"start":{"line":7,"column":0},"end":{"line":7,"column":41}},"1":{"start":{"line":8,"column":0},"end":{"line":8,"column":52}},"2":{"start":{"line":9,"column":0},"end":{"line":9,"column":43}},"3":{"start":{"line":15,"column":0},"end":{"line":43,"column":null}},"4":{"start":{"line":15,"column":19},"end":{"line":15,"column":null}},"5":{"start":{"line":16,"column":10},"end":{"line":16,"column":14}},"6":{"start":{"line":16,"column":16},"end":{"line":16,"column":35}},"7":{"start":{"line":17,"column":2},"end":{"line":41,"column":null}},"8":{"start":{"line":18,"column":34},"end":{"line":18,"column":52}},"9":{"start":{"line":20,"column":6},"end":{"line":20,"column":38}},"10":{"start":{"line":21,"column":6},"end":{"line":21,"column":23}},"11":{"start":{"line":23,"column":4},"end":{"line":40,"column":null}},"12":{"start":{"line":28,"column":14},"end":{"line":30,"column":null}},"13":{"start":{"line":36,"column":14},"end":{"line":38,"column":null}},"14":{"start":{"line":42,"column":2},"end":{"line":42,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":15,"column":9},"end":{"line":15,"column":19}},"loc":{"start":{"line":15,"column":49},"end":{"line":43,"column":1}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":27,"column":12},"end":{"line":27,"column":null}},"loc":{"start":{"line":27,"column":12},"end":{"line":31,"column":13}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":35,"column":12},"end":{"line":35,"column":null}},"loc":{"start":{"line":35,"column":12},"end":{"line":39,"column":13}}}},"branchMap":{"0":{"loc":{"start":{"line":15,"column":19},"end":{"line":15,"column":null}},"type":"if","locations":[{"start":{"line":15,"column":19},"end":{"line":15,"column":null}},{"start":{"line":15,"column":19},"end":{"line":15,"column":null}}]},"1":{"loc":{"start":{"line":17,"column":2},"end":{"line":41,"column":null}},"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":41,"column":null}},{"start":{"line":17,"column":2},"end":{"line":41,"column":null}}]},"2":{"loc":{"start":{"line":26,"column":12},"end":{"line":26,"column":66}},"type":"cond-expr","locations":[{"start":{"line":26,"column":12},"end":{"line":26,"column":66}},{"start":{"line":27,"column":12},"end":{"line":31,"column":13}}]},"3":{"loc":{"start":{"line":34,"column":12},"end":{"line":34,"column":52}},"type":"cond-expr","locations":[{"start":{"line":34,"column":12},"end":{"line":34,"column":52}},{"start":{"line":35,"column":12},"end":{"line":39,"column":13}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":5,"5":5,"6":5,"7":5,"8":3,"9":3,"10":3,"11":3,"12":1,"13":1,"14":2},"f":{"0":5,"1":1,"2":1},"b":{"0":[0,5],"1":[3,2],"2":[2,1],"3":[2,1]}} | ||
{"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/spec/resources/crypto-data-20200322.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/spec/resources/crypto-data-20200322.ts","statementMap":{"0":{"start":{"line":10,"column":18},"end":{"line":96,"column":null}},"1":{"start":{"line":107,"column":2},"end":{"line":107,"column":11}},"2":{"start":{"line":99,"column":2},"end":{"line":99,"column":1942}},"3":{"start":{"line":108,"column":2},"end":{"line":108,"column":12}},"4":{"start":{"line":101,"column":22},"end":{"line":101,"column":68}},"5":{"start":{"line":109,"column":2},"end":{"line":109,"column":15}},"6":{"start":{"line":102,"column":22},"end":{"line":102,"column":68}},"7":{"start":{"line":110,"column":2},"end":{"line":110,"column":15}},"8":{"start":{"line":103,"column":28},"end":{"line":103,"column":74}},"9":{"start":{"line":111,"column":2},"end":{"line":111,"column":21}},"10":{"start":{"line":104,"column":28},"end":{"line":104,"column":74}},"11":{"start":{"line":112,"column":2},"end":{"line":112,"column":21}}},"fnMap":{},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1},"f":{},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/spec/resources/crypto-data-20200604.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/spec/resources/crypto-data-20200604.ts","statementMap":{"0":{"start":{"line":1,"column":27},"end":{"line":14,"column":null}},"1":{"start":{"line":17,"column":2},"end":{"line":17,"column":20}}},"fnMap":{},"branchMap":{},"s":{"0":1,"1":1},"f":{},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/crypto.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/crypto.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"1":{"start":{"line":13,"column":0},"end":{"line":13,"column":null}},"2":{"start":{"line":20,"column":0},"end":{"line":20,"column":47}},"3":{"start":{"line":21,"column":0},"end":{"line":21,"column":55}},"4":{"start":{"line":35,"column":21},"end":{"line":35,"column":52}},"5":{"start":{"line":37,"column":2},"end":{"line":39,"column":null}},"6":{"start":{"line":38,"column":4},"end":{"line":38,"column":null}},"7":{"start":{"line":41,"column":2},"end":{"line":41,"column":null}},"8":{"start":{"line":52,"column":28},"end":{"line":52,"column":38}},"9":{"start":{"line":53,"column":16},"end":{"line":53,"column":36}},"10":{"start":{"line":54,"column":20},"end":{"line":60,"column":null}},"11":{"start":{"line":62,"column":2},"end":{"line":62,"column":null}},"12":{"start":{"line":75,"column":2},"end":{"line":86,"column":null}},"13":{"start":{"line":76,"column":10},"end":{"line":76,"column":11}},"14":{"start":{"line":76,"column":11},"end":{"line":76,"column":30}},"15":{"start":{"line":76,"column":32},"end":{"line":76,"column":77}},"16":{"start":{"line":77,"column":10},"end":{"line":77,"column":11}},"17":{"start":{"line":77,"column":11},"end":{"line":77,"column":16}},"18":{"start":{"line":77,"column":18},"end":{"line":77,"column":74}},"19":{"start":{"line":78,"column":4},"end":{"line":83,"column":null}},"20":{"start":{"line":85,"column":4},"end":{"line":85,"column":null}},"21":{"start":{"line":99,"column":24},"end":{"line":99,"column":68}},"22":{"start":{"line":100,"column":2},"end":{"line":101,"column":null}},"23":{"start":{"line":101,"column":4},"end":{"line":101,"column":null}},"24":{"start":{"line":102,"column":2},"end":{"line":102,"column":null}},"25":{"start":{"line":124,"column":4},"end":{"line":165,"column":null}},"26":{"start":{"line":125,"column":14},"end":{"line":125,"column":30}},"27":{"start":{"line":125,"column":32},"end":{"line":125,"column":47}},"28":{"start":{"line":125,"column":49},"end":{"line":125,"column":56}},"29":{"start":{"line":129,"column":31},"end":{"line":129,"column":72}},"30":{"start":{"line":130,"column":6},"end":{"line":132,"column":null}},"31":{"start":{"line":131,"column":8},"end":{"line":131,"column":null}},"32":{"start":{"line":133,"column":38},"end":{"line":133,"column":78}},"33":{"start":{"line":134,"column":6},"end":{"line":136,"column":null}},"34":{"start":{"line":135,"column":8},"end":{"line":135,"column":null}},"35":{"start":{"line":138,"column":45},"end":{"line":140,"column":null}},"36":{"start":{"line":142,"column":6},"end":{"line":160,"column":null}},"37":{"start":{"line":146,"column":41},"end":{"line":148,"column":null}},"38":{"start":{"line":150,"column":8},"end":{"line":153,"column":null}},"39":{"start":{"line":152,"column":10},"end":{"line":152,"column":null}},"40":{"start":{"line":154,"column":40},"end":{"line":156,"column":null}},"41":{"start":{"line":159,"column":8},"end":{"line":159,"column":null}},"42":{"start":{"line":162,"column":6},"end":{"line":162,"column":null}},"43":{"start":{"line":164,"column":6},"end":{"line":164,"column":null}},"44":{"start":{"line":167,"column":2},"end":{"line":167,"column":null}},"45":{"start":{"line":175,"column":13},"end":{"line":175,"column":31}},"46":{"start":{"line":176,"column":2},"end":{"line":179,"column":null}},"47":{"start":{"line":189,"column":38},"end":{"line":189,"column":40}},"48":{"start":{"line":190,"column":38},"end":{"line":190,"column":39}},"49":{"start":{"line":192,"column":4},"end":{"line":204,"column":null}},"50":{"start":{"line":193,"column":29},"end":{"line":193,"column":61}},"51":{"start":{"line":195,"column":6},"end":{"line":201,"column":null}},"52":{"start":{"line":203,"column":6},"end":{"line":203,"column":null}},"53":{"start":{"line":206,"column":2},"end":{"line":206,"column":null}},"54":{"start":{"line":220,"column":8},"end":{"line":220,"column":null}},"55":{"start":{"line":221,"column":8},"end":{"line":221,"column":null}},"56":{"start":{"line":222,"column":2},"end":{"line":231,"column":null}},"57":{"start":{"line":244,"column":4},"end":{"line":244,"column":23}},"58":{"start":{"line":244,"column":25},"end":{"line":244,"column":30}},"59":{"start":{"line":244,"column":32},"end":{"line":244,"column":55}},"60":{"start":{"line":246,"column":2},"end":{"line":251,"column":null}},"61":{"start":{"line":258,"column":0},"end":{"line":268,"column":null}},"62":{"start":{"line":258,"column":21},"end":{"line":258,"column":25}},"63":{"start":{"line":259,"column":27},"end":{"line":259,"column":45}},"64":{"start":{"line":260,"column":2},"end":{"line":267,"column":null}}},"fnMap":{"0":{"name":"encrypt","decl":{"start":{"line":30,"column":9},"end":{"line":30,"column":16}},"loc":{"start":{"line":33,"column":28},"end":{"line":42,"column":1}}},"1":{"name":"_encrypt","decl":{"start":{"line":51,"column":9},"end":{"line":51,"column":17}},"loc":{"start":{"line":51,"column":57},"end":{"line":63,"column":1}}},"2":{"name":"_decrypt","decl":{"start":{"line":71,"column":9},"end":{"line":71,"column":17}},"loc":{"start":{"line":73,"column":36},"end":{"line":87,"column":1}}},"3":{"name":"_verifySignedMessage","decl":{"start":{"line":95,"column":9},"end":{"line":95,"column":29}},"loc":{"start":{"line":97,"column":19},"end":{"line":103,"column":1}}},"4":{"name":"decrypt","decl":{"start":{"line":110,"column":9},"end":{"line":110,"column":16}},"loc":{"start":{"line":110,"column":41},"end":{"line":168,"column":1}}},"5":{"name":"_internalDecrypt","decl":{"start":{"line":120,"column":11},"end":{"line":120,"column":27}},"loc":{"start":{"line":122,"column":32},"end":{"line":166,"column":3}}},"6":{"name":"generate","decl":{"start":{"line":174,"column":9},"end":{"line":174,"column":17}},"loc":{"start":{"line":174,"column":17},"end":{"line":180,"column":1}}},"7":{"name":"valid","decl":{"start":{"line":182,"column":9},"end":{"line":182,"column":14}},"loc":{"start":{"line":182,"column":39},"end":{"line":207,"column":1}}},"8":{"name":"_internalValid","decl":{"start":{"line":188,"column":11},"end":{"line":188,"column":25}},"loc":{"start":{"line":188,"column":62},"end":{"line":205,"column":3}}},"9":{"name":"encryptFile","decl":{"start":{"line":216,"column":15},"end":{"line":216,"column":26}},"loc":{"start":{"line":218,"column":23},"end":{"line":232,"column":null}}},"10":{"name":"decryptFile","decl":{"start":{"line":242,"column":15},"end":{"line":242,"column":26}},"loc":{"start":{"line":244,"column":79},"end":{"line":252,"column":null}}},"11":{"name":"(anonymous_29)","decl":{"start":{"line":258,"column":9},"end":{"line":258,"column":19}},"loc":{"start":{"line":258,"column":72},"end":{"line":268,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":null}},"type":"if","locations":[{"start":{"line":37,"column":2},"end":{"line":39,"column":null}},{"start":{"line":37,"column":2},"end":{"line":39,"column":null}}]},"1":{"loc":{"start":{"line":100,"column":2},"end":{"line":101,"column":null}},"type":"if","locations":[{"start":{"line":100,"column":2},"end":{"line":101,"column":null}},{"start":{"line":100,"column":2},"end":{"line":101,"column":null}}]},"2":{"loc":{"start":{"line":130,"column":6},"end":{"line":132,"column":null}},"type":"if","locations":[{"start":{"line":130,"column":6},"end":{"line":132,"column":null}},{"start":{"line":130,"column":6},"end":{"line":132,"column":null}}]},"3":{"loc":{"start":{"line":134,"column":6},"end":{"line":136,"column":null}},"type":"if","locations":[{"start":{"line":134,"column":6},"end":{"line":136,"column":null}},{"start":{"line":134,"column":6},"end":{"line":136,"column":null}}]},"4":{"loc":{"start":{"line":142,"column":6},"end":{"line":160,"column":null}},"type":"if","locations":[{"start":{"line":142,"column":6},"end":{"line":160,"column":null}},{"start":{"line":142,"column":6},"end":{"line":160,"column":null}}]},"5":{"loc":{"start":{"line":150,"column":8},"end":{"line":153,"column":null}},"type":"if","locations":[{"start":{"line":150,"column":8},"end":{"line":153,"column":null}},{"start":{"line":150,"column":8},"end":{"line":153,"column":null}}]},"6":{"loc":{"start":{"line":200,"column":10},"end":{"line":200,"column":12}},"type":"cond-expr","locations":[{"start":{"line":200,"column":10},"end":{"line":200,"column":12}},{"start":{"line":200,"column":10},"end":{"line":200,"column":32}}]},"7":{"loc":{"start":{"line":196,"column":31},"end":{"line":200,"column":12}},"type":"binary-expr","locations":[{"start":{"line":196,"column":31},"end":{"line":200,"column":12}},{"start":{"line":200,"column":10},"end":{"line":200,"column":12}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":9,"5":9,"6":1,"7":9,"8":9,"9":9,"10":9,"11":9,"12":11,"13":11,"14":11,"15":11,"16":11,"17":11,"18":11,"19":11,"20":1,"21":1,"22":1,"23":0,"24":1,"25":10,"26":10,"27":10,"28":10,"29":10,"30":10,"31":2,"32":8,"33":8,"34":1,"35":7,"36":7,"37":1,"38":1,"39":0,"40":1,"41":1,"42":7,"43":3,"44":8,"45":22,"46":22,"47":3,"48":3,"49":3,"50":3,"51":3,"52":0,"53":5,"54":2,"55":2,"56":2,"57":2,"58":2,"59":2,"60":2,"61":3,"62":5,"63":5,"64":5},"f":{"0":9,"1":9,"2":11,"3":1,"4":8,"5":10,"6":22,"7":5,"8":3,"9":2,"10":2,"11":5},"b":{"0":[1,8],"1":[0,1],"2":[2,8],"3":[1,7],"4":[1,6],"5":[0,1],"6":[1,2],"7":[3,2]}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/index.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/index.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":29}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":41}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":33}},"3":{"start":{"line":12,"column":0},"end":{"line":28,"column":null}},"4":{"start":{"line":12,"column":19},"end":{"line":12,"column":null}},"5":{"start":{"line":13,"column":10},"end":{"line":13,"column":14}},"6":{"start":{"line":13,"column":16},"end":{"line":13,"column":32}},"7":{"start":{"line":13,"column":34},"end":{"line":13,"column":53}},"8":{"start":{"line":15,"column":2},"end":{"line":27,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":19}},"loc":{"start":{"line":12,"column":50},"end":{"line":28,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":19},"end":{"line":12,"column":null}},"type":"if","locations":[{"start":{"line":12,"column":19},"end":{"line":12,"column":null}},{"start":{"line":12,"column":19},"end":{"line":12,"column":null}}]},"1":{"loc":{"start":{"line":17,"column":12},"end":{"line":17,"column":16}},"type":"binary-expr","locations":[{"start":{"line":17,"column":12},"end":{"line":17,"column":16}},{"start":{"line":17,"column":20},"end":{"line":17,"column":32}}]},"2":{"loc":{"start":{"line":21,"column":12},"end":{"line":21,"column":16}},"type":"binary-expr","locations":[{"start":{"line":21,"column":12},"end":{"line":21,"column":16}},{"start":{"line":21,"column":20},"end":{"line":21,"column":32}}]},"3":{"loc":{"start":{"line":24,"column":12},"end":{"line":24,"column":16}},"type":"binary-expr","locations":[{"start":{"line":24,"column":12},"end":{"line":24,"column":16}},{"start":{"line":24,"column":20},"end":{"line":24,"column":32}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":6,"5":5,"6":5,"7":5,"8":5},"f":{"0":5},"b":{"0":[1,4],"1":[5,1],"2":[5,1],"3":[5,1]}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/webhooks.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/webhooks.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":47}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":47}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":52}},"4":{"start":{"line":26,"column":24},"end":{"line":26,"column":80}},"5":{"start":{"line":27,"column":2},"end":{"line":27,"column":null}},"6":{"start":{"line":37,"column":36},"end":{"line":37,"column":null}},"7":{"start":{"line":38,"column":21},"end":{"line":38,"column":49}},"8":{"start":{"line":39,"column":2},"end":{"line":39,"column":null}},"9":{"start":{"line":55,"column":10},"end":{"line":55,"column":null}},"10":{"start":{"line":56,"column":6},"end":{"line":56,"column":19}},"11":{"start":{"line":57,"column":6},"end":{"line":57,"column":7}},"12":{"start":{"line":58,"column":6},"end":{"line":58,"column":21}},"13":{"start":{"line":59,"column":6},"end":{"line":59,"column":null}},"14":{"start":{"line":61,"column":18},"end":{"line":61,"column":27}},"15":{"start":{"line":63,"column":4},"end":{"line":65,"column":null}},"16":{"start":{"line":64,"column":6},"end":{"line":64,"column":null}},"17":{"start":{"line":68,"column":4},"end":{"line":81,"column":null}},"18":{"start":{"line":78,"column":6},"end":{"line":80,"column":null}},"19":{"start":{"line":84,"column":4},"end":{"line":88,"column":null}},"20":{"start":{"line":85,"column":6},"end":{"line":87,"column":null}},"21":{"start":{"line":91,"column":2},"end":{"line":91,"column":null}},"22":{"start":{"line":108,"column":4},"end":{"line":108,"column":7}},"23":{"start":{"line":109,"column":4},"end":{"line":109,"column":16}},"24":{"start":{"line":110,"column":4},"end":{"line":110,"column":10}},"25":{"start":{"line":111,"column":4},"end":{"line":111,"column":9}},"26":{"start":{"line":119,"column":6},"end":{"line":120,"column":41}},"27":{"start":{"line":121,"column":4},"end":{"line":121,"column":null}},"28":{"start":{"line":124,"column":2},"end":{"line":124,"column":null}},"29":{"start":{"line":137,"column":2},"end":{"line":137,"column":7}},"30":{"start":{"line":138,"column":2},"end":{"line":138,"column":14}},"31":{"start":{"line":139,"column":2},"end":{"line":139,"column":8}},"32":{"start":{"line":140,"column":2},"end":{"line":140,"column":11}},"33":{"start":{"line":147,"column":2},"end":{"line":147,"column":null}},"34":{"start":{"line":154,"column":0},"end":{"line":168,"column":null}},"35":{"start":{"line":154,"column":19},"end":{"line":154,"column":null}},"36":{"start":{"line":155,"column":10},"end":{"line":155,"column":14}},"37":{"start":{"line":155,"column":16},"end":{"line":155,"column":32}},"38":{"start":{"line":156,"column":27},"end":{"line":156,"column":45}},"39":{"start":{"line":158,"column":2},"end":{"line":167,"column":null}}},"fnMap":{"0":{"name":"verifySignature","decl":{"start":{"line":18,"column":9},"end":{"line":18,"column":24}},"loc":{"start":{"line":24,"column":26},"end":{"line":28,"column":1}}},"1":{"name":"verifyEpoch","decl":{"start":{"line":37,"column":9},"end":{"line":37,"column":20}},"loc":{"start":{"line":37,"column":59},"end":{"line":40,"column":1}}},"2":{"name":"authenticate","decl":{"start":{"line":46,"column":9},"end":{"line":46,"column":21}},"loc":{"start":{"line":46,"column":46},"end":{"line":92,"column":1}}},"3":{"name":"_internalAuthenticate","decl":{"start":{"line":53,"column":11},"end":{"line":53,"column":32}},"loc":{"start":{"line":53,"column":60},"end":{"line":89,"column":3}}},"4":{"name":"generateSignature","decl":{"start":{"line":99,"column":9},"end":{"line":99,"column":26}},"loc":{"start":{"line":99,"column":51},"end":{"line":125,"column":1}}},"5":{"name":"_internalGenerateSignature","decl":{"start":{"line":107,"column":11},"end":{"line":107,"column":37}},"loc":{"start":{"line":117,"column":3},"end":{"line":122,"column":3}}},"6":{"name":"constructHeader","decl":{"start":{"line":136,"column":9},"end":{"line":136,"column":24}},"loc":{"start":{"line":146,"column":1},"end":{"line":148,"column":1}}},"7":{"name":"(anonymous_8)","decl":{"start":{"line":154,"column":9},"end":{"line":154,"column":19}},"loc":{"start":{"line":154,"column":49},"end":{"line":168,"column":1}}},"8":{"name":"(anonymous_9)","decl":{"start":{"line":165,"column":8},"end":{"line":165,"column":21}},"loc":{"start":{"line":165,"column":8},"end":{"line":165,"column":22}}},"9":{"name":"(anonymous_10)","decl":{"start":{"line":166,"column":58},"end":{"line":166,"column":71}},"loc":{"start":{"line":166,"column":58},"end":{"line":166,"column":72}}}},"branchMap":{"0":{"loc":{"start":{"line":37,"column":36},"end":{"line":37,"column":null}},"type":"if","locations":[{"start":{"line":37,"column":36},"end":{"line":37,"column":null}},{"start":{"line":37,"column":36},"end":{"line":37,"column":null}}]},"1":{"loc":{"start":{"line":63,"column":4},"end":{"line":65,"column":null}},"type":"if","locations":[{"start":{"line":63,"column":4},"end":{"line":65,"column":null}},{"start":{"line":63,"column":4},"end":{"line":65,"column":null}}]},"2":{"loc":{"start":{"line":63,"column":8},"end":{"line":63,"column":14}},"type":"binary-expr","locations":[{"start":{"line":63,"column":8},"end":{"line":63,"column":14}},{"start":{"line":63,"column":18},"end":{"line":63,"column":28}},{"start":{"line":63,"column":32},"end":{"line":63,"column":45}},{"start":{"line":63,"column":49},"end":{"line":63,"column":56}}]},"3":{"loc":{"start":{"line":68,"column":4},"end":{"line":81,"column":null}},"type":"if","locations":[{"start":{"line":68,"column":4},"end":{"line":81,"column":null}},{"start":{"line":68,"column":4},"end":{"line":81,"column":null}}]},"4":{"loc":{"start":{"line":84,"column":4},"end":{"line":88,"column":null}},"type":"if","locations":[{"start":{"line":84,"column":4},"end":{"line":88,"column":null}},{"start":{"line":84,"column":4},"end":{"line":88,"column":null}}]},"5":{"loc":{"start":{"line":154,"column":19},"end":{"line":154,"column":null}},"type":"if","locations":[{"start":{"line":154,"column":19},"end":{"line":154,"column":null}},{"start":{"line":154,"column":19},"end":{"line":154,"column":null}}]},"6":{"loc":{"start":{"line":164,"column":8},"end":{"line":164,"column":43}},"type":"cond-expr","locations":[{"start":{"line":164,"column":8},"end":{"line":164,"column":43}},{"start":{"line":165,"column":8},"end":{"line":165,"column":22}}]},"7":{"loc":{"start":{"line":166,"column":40},"end":{"line":166,"column":55}},"type":"cond-expr","locations":[{"start":{"line":166,"column":40},"end":{"line":166,"column":55}},{"start":{"line":166,"column":58},"end":{"line":166,"column":72}}]}},"s":{"0":4,"1":4,"2":4,"3":4,"4":5,"5":5,"6":10,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5,"15":5,"16":0,"17":5,"18":0,"19":5,"20":2,"21":6,"22":6,"23":6,"24":6,"25":6,"26":6,"27":6,"28":1,"29":6,"30":6,"31":6,"32":6,"33":6,"34":4,"35":6,"36":6,"37":6,"38":6,"39":6},"f":{"0":5,"1":5,"2":6,"3":5,"4":1,"5":6,"6":6,"7":6,"8":0,"9":0},"b":{"0":[5,0],"1":[0,5],"2":[5,5,5,5],"3":[0,5],"4":[2,3],"5":[0,6],"6":[1,5],"7":[1,5]}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/resource/signing-keys.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/resource/signing-keys.ts","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":19,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":4},"f":{},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/resource/verification-keys.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/resource/verification-keys.ts","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":19,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":3},"f":{},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/parser.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/parser.ts","statementMap":{"0":{"start":{"line":22,"column":26},"end":{"line":28,"column":33}},"1":{"start":{"line":24,"column":17},"end":{"line":24,"column":35}},"2":{"start":{"line":25,"column":19},"end":{"line":25,"column":20}},"3":{"start":{"line":25,"column":22},"end":{"line":25,"column":23}},"4":{"start":{"line":26,"column":6},"end":{"line":26,"column":null}},"5":{"start":{"line":27,"column":6},"end":{"line":27,"column":null}},"6":{"start":{"line":30,"column":2},"end":{"line":30,"column":null}},"7":{"start":{"line":33,"column":9},"end":{"line":33,"column":29}}},"fnMap":{"0":{"name":"parseSignatureHeader","decl":{"start":{"line":21,"column":9},"end":{"line":21,"column":29}},"loc":{"start":{"line":21,"column":44},"end":{"line":31,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":24,"column":9},"end":{"line":24,"column":10}},"loc":{"start":{"line":24,"column":12},"end":{"line":24,"column":19}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":25,"column":12},"end":{"line":25,"column":13}},"loc":{"start":{"line":25,"column":24},"end":{"line":28,"column":5}}}},"branchMap":{},"s":{"0":5,"1":20,"2":20,"3":20,"4":20,"5":20,"6":5,"7":4},"f":{"0":5,"1":20,"2":20},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/publicKey.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/publicKey.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":55}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":27}},"2":{"start":{"line":12,"column":2},"end":{"line":20,"column":null}},"3":{"start":{"line":15,"column":6},"end":{"line":15,"column":null}},"4":{"start":{"line":17,"column":6},"end":{"line":17,"column":null}},"5":{"start":{"line":19,"column":6},"end":{"line":19,"column":null}},"6":{"start":{"line":23,"column":9},"end":{"line":23,"column":21}}},"fnMap":{"0":{"name":"getPublicKey","decl":{"start":{"line":11,"column":9},"end":{"line":11,"column":21}},"loc":{"start":{"line":11,"column":40},"end":{"line":21,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":13,"column":4},"end":{"line":13,"column":27}},"type":"switch","locations":[{"start":{"line":13,"column":4},"end":{"line":13,"column":27}},{"start":{"line":14,"column":4},"end":{"line":15,"column":null}},{"start":{"line":16,"column":4},"end":{"line":17,"column":null}},{"start":{"line":18,"column":4},"end":{"line":19,"column":null}}]}},"s":{"0":4,"1":4,"2":11,"3":0,"4":9,"5":2,"6":4},"f":{"0":11},"b":{"0":[0,0,9,2]}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/signature.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/signature.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":71}},"2":{"start":{"line":11,"column":2},"end":{"line":13,"column":null}},"3":{"start":{"line":35,"column":9},"end":{"line":35,"column":13}},"4":{"start":{"line":28,"column":2},"end":{"line":32,"column":null}},"5":{"start":{"line":35,"column":15},"end":{"line":35,"column":21}}},"fnMap":{"0":{"name":"sign","decl":{"start":{"line":10,"column":9},"end":{"line":10,"column":13}},"loc":{"start":{"line":10,"column":51},"end":{"line":14,"column":1}}},"1":{"name":"verify","decl":{"start":{"line":23,"column":9},"end":{"line":23,"column":15}},"loc":{"start":{"line":26,"column":19},"end":{"line":33,"column":1}}}},"branchMap":{},"s":{"0":4,"1":4,"2":6,"3":4,"4":5,"5":4},"f":{"0":6,"1":5},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/stage.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/stage.ts","statementMap":{"0":{"start":{"line":3,"column":49},"end":{"line":8,"column":null}},"1":{"start":{"line":10,"column":0},"end":{"line":10,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":4,"1":4},"f":{},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/validate.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/util/validate.ts","statementMap":{"0":{"start":{"line":4,"column":2},"end":{"line":6,"column":null}},"1":{"start":{"line":5,"column":4},"end":{"line":5,"column":null}},"2":{"start":{"line":10,"column":17},"end":{"line":19,"column":null}},"3":{"start":{"line":14,"column":6},"end":{"line":19,"column":null}},"4":{"start":{"line":22,"column":2},"end":{"line":22,"column":null}},"5":{"start":{"line":25,"column":9},"end":{"line":25,"column":30}}},"fnMap":{"0":{"name":"determineIsFormFields","decl":{"start":{"line":3,"column":9},"end":{"line":3,"column":30}},"loc":{"start":{"line":3,"column":39},"end":{"line":23,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":11,"column":4},"end":{"line":11,"column":5}},"loc":{"start":{"line":11,"column":13},"end":{"line":14,"column":7}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":2},"end":{"line":6,"column":null}},"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":6,"column":null}},{"start":{"line":4,"column":2},"end":{"line":6,"column":null}}]},"1":{"loc":{"start":{"line":14,"column":7},"end":{"line":14,"column":42}},"type":"binary-expr","locations":[{"start":{"line":14,"column":7},"end":{"line":14,"column":42}},{"start":{"line":15,"column":8},"end":{"line":15,"column":43}},{"start":{"line":16,"column":8},"end":{"line":16,"column":25}},{"start":{"line":17,"column":6},"end":{"line":17,"column":18}},{"start":{"line":18,"column":6},"end":{"line":18,"column":24}},{"start":{"line":19,"column":6},"end":{"line":19,"column":23}}]}},"s":{"0":8,"1":1,"2":7,"3":58,"4":7,"5":3},"f":{"0":8,"1":58},"b":{"0":[1,7],"1":[58,4,0,58,58,58]}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/authenticate.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/authenticate.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":57}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":37}},"3":{"start":{"line":20,"column":20},"end":{"line":20,"column":39}},"4":{"start":{"line":21,"column":20},"end":{"line":21,"column":61}},"5":{"start":{"line":22,"column":4},"end":{"line":22,"column":null}},"6":{"start":{"line":35,"column":4},"end":{"line":35,"column":19}},"7":{"start":{"line":36,"column":4},"end":{"line":36,"column":23}},"8":{"start":{"line":37,"column":4},"end":{"line":37,"column":11}},"9":{"start":{"line":38,"column":4},"end":{"line":38,"column":10}},"10":{"start":{"line":40,"column":4},"end":{"line":82,"column":null}},"11":{"start":{"line":41,"column":12},"end":{"line":52,"column":null}},"12":{"start":{"line":42,"column":8},"end":{"line":42,"column":24}},"13":{"start":{"line":43,"column":8},"end":{"line":43,"column":15}},"14":{"start":{"line":44,"column":8},"end":{"line":44,"column":17}},"15":{"start":{"line":45,"column":8},"end":{"line":45,"column":null}},"16":{"start":{"line":54,"column":28},"end":{"line":54,"column":33}},"17":{"start":{"line":55,"column":6},"end":{"line":73,"column":null}},"18":{"start":{"line":56,"column":21},"end":{"line":62,"column":10}},"19":{"start":{"line":63,"column":8},"end":{"line":67,"column":null}},"20":{"start":{"line":69,"column":8},"end":{"line":71,"column":null}},"21":{"start":{"line":72,"column":8},"end":{"line":72,"column":null}},"22":{"start":{"line":75,"column":6},"end":{"line":80,"column":null}},"23":{"start":{"line":81,"column":6},"end":{"line":81,"column":null}},"24":{"start":{"line":85,"column":2},"end":{"line":85,"column":null}},"25":{"start":{"line":7,"column":0},"end":{"line":7,"column":null}}},"fnMap":{"0":{"name":"default_1","decl":{"start":{"line":7,"column":0},"end":{"line":7,"column":null}},"loc":{"start":{"line":9,"column":34},"end":{"line":86,"column":1}}},"1":{"name":"isSignatureTimeValid","decl":{"start":{"line":16,"column":11},"end":{"line":16,"column":31}},"loc":{"start":{"line":18,"column":31},"end":{"line":23,"column":3}}},"2":{"name":"authenticate","decl":{"start":{"line":34,"column":11},"end":{"line":34,"column":23}},"loc":{"start":{"line":39,"column":36},"end":{"line":83,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":22,"column":11},"end":{"line":22,"column":34}},"type":"binary-expr","locations":[{"start":{"line":22,"column":11},"end":{"line":22,"column":34}},{"start":{"line":22,"column":38},"end":{"line":22,"column":61}}]},"1":{"loc":{"start":{"line":55,"column":6},"end":{"line":73,"column":null}},"type":"if","locations":[{"start":{"line":55,"column":6},"end":{"line":73,"column":null}},{"start":{"line":55,"column":6},"end":{"line":73,"column":null}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":3,"5":3,"6":3,"7":3,"8":3,"9":3,"10":3,"11":3,"12":3,"13":3,"14":3,"15":3,"16":3,"17":3,"18":2,"19":2,"20":1,"21":1,"22":0,"23":0,"24":2,"25":3},"f":{"0":2,"1":3,"2":3},"b":{"0":[3,2],"1":[2,1]}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/basestring.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/basestring.ts","statementMap":{"0":{"start":{"line":7,"column":2},"end":{"line":7,"column":15}},"1":{"start":{"line":8,"column":2},"end":{"line":8,"column":8}},"2":{"start":{"line":9,"column":2},"end":{"line":9,"column":9}},"3":{"start":{"line":10,"column":2},"end":{"line":10,"column":8}},"4":{"start":{"line":11,"column":2},"end":{"line":11,"column":6}},"5":{"start":{"line":13,"column":2},"end":{"line":13,"column":null}},"6":{"start":{"line":16,"column":0},"end":{"line":16,"column":null}}},"fnMap":{"0":{"name":"basestring","decl":{"start":{"line":6,"column":9},"end":{"line":6,"column":19}},"loc":{"start":{"line":12,"column":32},"end":{"line":14,"column":1}}}},"branchMap":{},"s":{"0":4,"1":4,"2":4,"3":4,"4":4,"5":4,"6":3},"f":{"0":4},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/generate-signature.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/generate-signature.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":71}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":37}},"3":{"start":{"line":8,"column":4},"end":{"line":8,"column":17}},"4":{"start":{"line":9,"column":4},"end":{"line":9,"column":10}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":11}},"6":{"start":{"line":11,"column":4},"end":{"line":11,"column":10}},"7":{"start":{"line":13,"column":17},"end":{"line":13,"column":27}},"8":{"start":{"line":14,"column":17},"end":{"line":14,"column":77}},"9":{"start":{"line":15,"column":22},"end":{"line":17,"column":null}},"10":{"start":{"line":19,"column":4},"end":{"line":21,"column":null}},"11":{"start":{"line":24,"column":2},"end":{"line":24,"column":null}},"12":{"start":{"line":6,"column":0},"end":{"line":6,"column":25}}},"fnMap":{"0":{"name":"default_1","decl":{"start":{"line":6,"column":0},"end":{"line":6,"column":25}},"loc":{"start":{"line":6,"column":43},"end":{"line":25,"column":1}}},"1":{"name":"generateSignature","decl":{"start":{"line":7,"column":11},"end":{"line":7,"column":28}},"loc":{"start":{"line":12,"column":33},"end":{"line":22,"column":3}}}},"branchMap":{},"s":{"0":3,"1":3,"2":3,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":2,"12":3},"f":{"0":2,"1":1},"b":{}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/get-public-key.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/get-public-key.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":65}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":33}},"2":{"start":{"line":11,"column":2},"end":{"line":19,"column":null}},"3":{"start":{"line":14,"column":6},"end":{"line":14,"column":null}},"4":{"start":{"line":16,"column":6},"end":{"line":16,"column":null}},"5":{"start":{"line":18,"column":6},"end":{"line":18,"column":null}},"6":{"start":{"line":22,"column":0},"end":{"line":22,"column":null}}},"fnMap":{"0":{"name":"getPublicKey","decl":{"start":{"line":10,"column":9},"end":{"line":10,"column":21}},"loc":{"start":{"line":10,"column":40},"end":{"line":20,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":4},"end":{"line":12,"column":27}},"type":"switch","locations":[{"start":{"line":12,"column":4},"end":{"line":12,"column":27}},{"start":{"line":13,"column":4},"end":{"line":14,"column":null}},{"start":{"line":15,"column":4},"end":{"line":16,"column":null}},{"start":{"line":17,"column":4},"end":{"line":18,"column":null}}]}},"s":{"0":3,"1":3,"2":8,"3":2,"4":4,"5":2,"6":3},"f":{"0":8},"b":{"0":[1,2,4,2]}} | ||
,"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/index.ts": {"path":"/Users/ogp-yuanruo/Developer/formsg-javascript-sdk/src/verification/index.ts","statementMap":{"0":{"start":{"line":7,"column":0},"end":{"line":7,"column":41}},"1":{"start":{"line":8,"column":0},"end":{"line":8,"column":52}},"2":{"start":{"line":9,"column":0},"end":{"line":9,"column":43}},"3":{"start":{"line":15,"column":0},"end":{"line":43,"column":null}},"4":{"start":{"line":15,"column":19},"end":{"line":15,"column":null}},"5":{"start":{"line":16,"column":10},"end":{"line":16,"column":14}},"6":{"start":{"line":16,"column":16},"end":{"line":16,"column":35}},"7":{"start":{"line":17,"column":2},"end":{"line":41,"column":null}},"8":{"start":{"line":18,"column":34},"end":{"line":18,"column":52}},"9":{"start":{"line":20,"column":6},"end":{"line":20,"column":38}},"10":{"start":{"line":21,"column":6},"end":{"line":21,"column":23}},"11":{"start":{"line":23,"column":4},"end":{"line":40,"column":null}},"12":{"start":{"line":28,"column":14},"end":{"line":30,"column":null}},"13":{"start":{"line":36,"column":14},"end":{"line":38,"column":null}},"14":{"start":{"line":42,"column":2},"end":{"line":42,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":15,"column":9},"end":{"line":15,"column":19}},"loc":{"start":{"line":15,"column":49},"end":{"line":43,"column":1}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":27,"column":12},"end":{"line":27,"column":null}},"loc":{"start":{"line":27,"column":12},"end":{"line":31,"column":13}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":35,"column":12},"end":{"line":35,"column":null}},"loc":{"start":{"line":35,"column":12},"end":{"line":39,"column":13}}}},"branchMap":{"0":{"loc":{"start":{"line":15,"column":19},"end":{"line":15,"column":null}},"type":"if","locations":[{"start":{"line":15,"column":19},"end":{"line":15,"column":null}},{"start":{"line":15,"column":19},"end":{"line":15,"column":null}}]},"1":{"loc":{"start":{"line":17,"column":2},"end":{"line":41,"column":null}},"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":41,"column":null}},{"start":{"line":17,"column":2},"end":{"line":41,"column":null}}]},"2":{"loc":{"start":{"line":26,"column":12},"end":{"line":26,"column":66}},"type":"cond-expr","locations":[{"start":{"line":26,"column":12},"end":{"line":26,"column":66}},{"start":{"line":27,"column":12},"end":{"line":31,"column":13}}]},"3":{"loc":{"start":{"line":34,"column":12},"end":{"line":34,"column":52}},"type":"cond-expr","locations":[{"start":{"line":34,"column":12},"end":{"line":34,"column":52}},{"start":{"line":35,"column":12},"end":{"line":39,"column":13}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":5,"5":5,"6":5,"7":5,"8":3,"9":3,"10":3,"11":3,"12":1,"13":1,"14":2},"f":{"0":5,"1":1,"2":1},"b":{"0":[0,5],"1":[3,2],"2":[2,1],"3":[2,1]}} | ||
} |
@@ -29,4 +29,5 @@ "use strict"; | ||
* Helper function to verify that the epoch submitted is recent. | ||
* Prevents against replay attacks. | ||
* @param epoch The number of milliseconds since Jan 1, 1979 | ||
* Prevents against replay attacks. Allows for negative time interval | ||
* in case of clock drift between Form servers and recipient server. | ||
* @param epoch The number of milliseconds since 1 Jan 1970 00:00:00 UTC | ||
* @param expiry Duration of expiry. The default is 5 minutes. | ||
@@ -36,4 +37,4 @@ */ | ||
if (expiry === void 0) { expiry = 300000; } | ||
var difference = Date.now() - epoch; | ||
return difference > 0 && difference < expiry; | ||
var difference = Math.abs(Date.now() - epoch); | ||
return difference < expiry; | ||
} | ||
@@ -40,0 +41,0 @@ /** |
{ | ||
"name": "@opengovsg/formsg-sdk", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -57,7 +57,7 @@ import webhookPackage from '../src/webhooks' | ||
webhook.authenticate(header, uri) | ||
expect(() => webhook.authenticate(header, uri)).not.toThrow() | ||
}) | ||
it('should reject signatures generated more than 5 minutes ago', () => { | ||
const epoch = Date.now() - 5 * 60 * 1000 - 1 | ||
const epoch = Date.now() - 5 * 60 * 1000 - 1 // 5min 1s into the past | ||
const signature = webhook.generateSignature({ | ||
@@ -78,2 +78,56 @@ uri, | ||
}) | ||
it('should accept signatures generated within 5 minutes', () => { | ||
const epoch = Date.now() - 5 * 60 * 1000 + 1000 // 4min 59s into the past | ||
const signature = webhook.generateSignature({ | ||
uri, | ||
submissionId, | ||
formId, | ||
epoch, | ||
}) as string | ||
const header = webhook.constructHeader({ | ||
epoch, | ||
submissionId, | ||
formId, | ||
signature, | ||
}) as string | ||
expect(() => webhook.authenticate(header, uri)).not.toThrow() | ||
}) | ||
it('should authenticate signatures if Form server drifts 4m59s into the future', () => { | ||
const epoch = Date.now() + 5 * 60 * 1000 - 1000 // 4min 59s into the future | ||
const signature = webhook.generateSignature({ | ||
uri, | ||
submissionId, | ||
formId, | ||
epoch, | ||
}) as string | ||
const header = webhook.constructHeader({ | ||
epoch, | ||
submissionId, | ||
formId, | ||
signature, | ||
}) as string | ||
expect(() => webhook.authenticate(header, uri)).not.toThrow() | ||
}) | ||
it('should reject signatures if Form server drifts 5m1s into the future', () => { | ||
const epoch = Date.now() + 5 * 60 * 1000 + 1000 // 5min 1s into the future | ||
const signature = webhook.generateSignature({ | ||
uri, | ||
submissionId, | ||
formId, | ||
epoch, | ||
}) as string | ||
const header = webhook.constructHeader({ | ||
epoch, | ||
submissionId, | ||
formId, | ||
signature, | ||
}) as string | ||
expect(() => webhook.authenticate(header, uri)).toThrow() | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205431
59
2158