Skip to content

Instantly share code, notes, and snippets.

{
"_type": "https://in-toto.io/Statement/v0.1",
"subject": [
{
"name": "https://witness.dev/attestations/product/v0.1/file:.git/index",
"digest": {
"sha256": "8101a571fbb12a9712f44f697cd3200692e905331b15eee266b487ef13762fe2"
}
},
{
async function signTextWithYubiKey() {
try {
// Create a new credential
const challenge = new Uint8Array(32);
crypto.getRandomValues(challenge);
const publicKeyCredentialCreationOptions = {
challenge,
rp: { name: 'example.com' },
user: {