この辺りが怪しい気がする
ただbytesはPythonだとjsonにできなかったはず...

			if (typeof digest !== 'string') {
				// Huh?
				reply.code(401);
				return;
			}
...

			const hash = crypto.createHash('sha256').update(request.rawBody).digest('base64');

			if (hash !== digestValue) {
				// Invalid digest
				reply.code(401);
				return;
			}

0

If you have a fediverse account, you can quote this note from your own instance. Search https://misskey.io/notes/a4s9ar01qzhi0fvy on your instance and quote it. (Note that quoting is not supported in Mastodon.)