From 39e8cd17a35605e5f632340842e8f73c1cd979b3 Mon Sep 17 00:00:00 2001 From: Larry Joy Date: Fri, 13 Jan 2023 11:41:12 -0800 Subject: [PATCH] cleanup dead code/file --- SHL-TESTS.md | 35 ----------------------------------- src/shlEncode.ts | 30 ------------------------------ 2 files changed, 65 deletions(-) delete mode 100644 SHL-TESTS.md diff --git a/SHL-TESTS.md b/SHL-TESTS.md deleted file mode 100644 index 6d9f70a..0000000 --- a/SHL-TESTS.md +++ /dev/null @@ -1,35 +0,0 @@ -# Tests For SMART Health Links - -Test cases for the artifacts of SMART Health Links - - -

-# -## Link - -- with/without viewer -- validate viewer format? -- - - -

-# -## SHLink Payload - -### `url` -- Url contains at least 256-bits of entropy (43 base64url-encode chars) - -### `key` - - -### `exp` - - -### `flag` - - -

-# -## Manifest URL - -- Url contains at least 256-bits of entropy (43 base64url-encode chars) diff --git a/src/shlEncode.ts b/src/shlEncode.ts index 83dba8f..94586fb 100644 --- a/src/shlEncode.ts +++ b/src/shlEncode.ts @@ -73,33 +73,3 @@ export async function encode( }; } - -void (async () => { - const shl = await encode( - [ - JSON.stringify({ - "verifiableCredential": [ - "eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.3ZJLj9MwFIX_yuiyzcNJmXaSHS0SL4FAM8MGdeE6t42RY0e2E7WM8t-5djsaQNPZABIiuxsfH5_z2XcgnYMaWu97V-e561FkruPWt8iVbzPBbeNy3POuV-hyUg9oIQG92UJdzOczVrDZVZHNq6sERgH1HfhDj1B_efD81e7ZcUjDQFbndbLrBi2_cS-NflIozCibooJ1AsJig9pLrq6HzVcUPkTattJ-RuuCTw3PM5YV5Bf-LgfdKAwai84MVuBNjA-nheRUB4RRityOSegAe6CO5DwodWsVCe7314wE98Mjxh-pDu0PDHmHRxPeSUV-8EKTxrp4xk6OqAPHt6YN8zKD9UQFN5LKv-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kWFZ_muDiLMHZP0SQev8-wTJlVcou_8YbXBNEsLKhn-_fHVb7dtHPh0-08B0.kpV4IAUIXf5jI0ETA3JbVraT0g5-Pkq5DAC3TzihwnVJbYd2nt0u0wvhygIQXg8Gnz4X1r-Q34tTvrifp4v_Sg" - ] - }), - JSON.stringify({ - "verifiableCredential": [ - "eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.3ZJLj9MwFIX_yuiyzcNJmXaSHS0SL4FAM8MGdeE6t42RY0e2E7WM8t-5djsaQNPZABIiuxsfH5_z2XcgnYMaWu97V-e561FkruPWt8iVbzPBbeNy3POuV-hyUg9oIQG92UJdzOczVrDZVZHNq6sERgH1HfhDj1B_efD81e7ZcUjDQFbndbLrBi2_cS-NflIozCibooJ1AsJig9pLrq6HzVcUPkTattJ-RuuCTw3PM5YV5Bf-LgfdKAwai84MVuBNjA-nheRUB4RRityOSegAe6CO5DwodWsVCe7314wE98Mjxh-pDu0PDHmHRxPeSUV-8EKTxrp4xk6OqAPHt6YN8zKD9UQFN5LKv-Q-eBXVZZGyIi0ZTFPyaJri6TRvfkbsPPeDi3XDhXsMFzRyIaTGlWmigzCN1LsY3B2cx-70fuhmWrXIjN3lgWzuZJOLcU8GIu6Eki1gWk8J9CcEMc4WLeqQ7UeCJDJCDDYuhbI3sjtalLEwC7UI1dbYjt5jyMKFNzZYNtL1ikecy9XFK9Roubp4bVwvPVcEiiAq4z8M3SZsBRa_4izB8r8kWFZ_muDiLMHZP0SQev8-wTJlVcou_8YbXBNEsLKhn-_fHVb7dtHPh0-08B0.kpV4IAUIXf5jI0ETA3JbVraT0g5-Pkq5DAC3TzihwnVJbYd2nt0u0wvhygIQXg8Gnz4X1r-Q34tTvrifp4v_Sg" - ] - }), - ], - '', - '1234', - Math.floor(Date.now() / 1000) + 365 * 60 * 60, - 'https://viewer.example.org', - 'Test', - 'https://test-link', - 'https://api.vaxx.link/api/shl'); - - console.log(JSON.stringify(shl, null, 2)); -})()