In our updated script, we added a check to ensure that ordinalsid is not None before proceeding with updating the invoice. This prevents the script from trying to update invoices with incomplete or invalid data.
Running "node lib-dqx-test.mjs" will:
1. Generate a secret key and print it out.
2. Generate a public key and print it out.
3. Generate a second key pair and print out only the public key.
4. Hash the second public key with SHA-256.
5. Sign the hash with the secret key of the first key pair.
6. Verify the signature with the public key of the first key pair.