rxome-generator 1.0.4-beta.6 → 1.0.4-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/rxome-api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Using native fetch API instead of axios for better webpack compatibility
2
- import * as ED from 'noble-ed25519';
2
+ import * as ED from '@noble/ed25519';
3
3
  import Protobuf from 'protobufjs';
4
4
  import { stringify } from 'querystring';
5
5
 
@@ -67,7 +67,7 @@ readSigKey = async name => {
67
67
 
68
68
  export const generateApiKeys = async () => {
69
69
  const privateKey = ED.utils.randomPrivateKey();
70
- const publicKey = await ED.getPublicKey(privateKey);
70
+ const publicKey = await ED.getPublicKeyAsync(privateKey);
71
71
  return {
72
72
  privateKey: privateKey,
73
73
  publicKey: publicKey
@@ -102,7 +102,7 @@ export const signData = async( keyId, user, keyB64, created, debug = false ) =>
102
102
  debug && console.log('Base 64 key: ', keyB64);
103
103
  debug && console.log('Binary key: ', key, " Key length: ", key.length);
104
104
 
105
- const signature = await ED.sign( messageUi8, key);
105
+ const signature = await ED.signAsync( messageUi8, key);
106
106
  const sigB64 = bufferToBase64( signature );
107
107
  const auth=`Signature keyId="${keyId}",algorithm="ed25519",headers="x-date x-rxome-user",signature="${sigB64}",created="${created}"`
108
108
  debug && console.log('Auth string: ', auth);
@@ -1,6 +1,6 @@
1
1
  import * as RxAPI from './rxome-api.js';
2
2
  import { readFileSync, existsSync, statSync } from 'fs';
3
- import * as ED from 'noble-ed25519';
3
+ import * as ED from '@noble/ed25519';
4
4
 
5
5
  describe('API access', () => {
6
6
  test.skip('generates valid API access keys', async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rxome-generator",
3
- "version": "1.0.4-beta.6",
3
+ "version": "1.0.4-beta.7",
4
4
  "description": "Generates QR codes containing medical information for use with the FindMe2Care platform.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -34,8 +34,7 @@
34
34
  "@noble/ed25519": "^2.2.3",
35
35
  "commander": "^9.4.0",
36
36
  "json-key-converter": "^1.0.0",
37
- "noble-ed25519": "^1.2.6",
38
- "node-fetch": "^3.3.2",
37
+ "node-fetch": "^3.3.2",
39
38
  "openpgp": "^6.1.0",
40
39
  "protobufjs": "^7.4.0",
41
40
  "protobufjs-cli": "^1.1.3",