rxome-generator 1.0.4-beta.4 → 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.
@@ -0,0 +1,58 @@
1
+ {
2
+ "id": "UEN167DJ04KK",
3
+ "subject": {
4
+ "dateOfBirth": "2026-02-18",
5
+ "sex": 0
6
+ },
7
+ "comment": "",
8
+ "compressedFeatures": {
9
+ "includes": [
10
+ "HP:0000111"
11
+ ],
12
+ "excludes": []
13
+ },
14
+ "interpretations": [
15
+ {
16
+ "id": "first",
17
+ "progressStatus": 3,
18
+ "diagnosis": {
19
+ "disease": {
20
+ "id": "OMIM:"
21
+ },
22
+ "genomicInterpretations": [
23
+ {
24
+ "subjectOrBiosampleId": "xfx2ybyipvr.y3n0hogaybn",
25
+ "variantInterpretation": {
26
+ "acmgPathogenicityClassification": "999",
27
+ "variationDescriptor": {
28
+ "geneContext": {
29
+ "valueId": "",
30
+ "symbol": "",
31
+ "alternateIds": [
32
+ ""
33
+ ]
34
+ },
35
+ "expressions": [],
36
+ "extensions": [
37
+ {
38
+ "name": "test-type",
39
+ "value": "Exome sequencing, long read"
40
+ }
41
+ ],
42
+ "allelicState": {
43
+ "id": "None"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ ],
52
+ "metaData": {
53
+ "created": "2026-02-18",
54
+ "createdBy": "Tom",
55
+ "submittedBy": "tom@kamphans.de",
56
+ "pseudonym": "UEN167DJ04KK"
57
+ }
58
+ }
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 () => {
@@ -155,7 +155,7 @@ export const sanitizeACMG = ( str ) => {
155
155
  if ( str == 'RISK_ALLELE' ) {
156
156
  return 999;
157
157
  }
158
- isNaN(+(str.toString()))
158
+ return isNaN(+(str.toString()))
159
159
  ? Math.max(0, ENUM_ACMG.indexOf(str.toUpperCase()))
160
160
  : +str
161
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rxome-generator",
3
- "version": "1.0.4-beta.4",
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",
package/ratest.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "id": "UEN167DJ04KK",
3
+ "subject": {
4
+ "dateOfBirth": "2026-02-18",
5
+ "sex": 0
6
+ },
7
+ "comment": "",
8
+ "compressedFeatures": {
9
+ "includes": [
10
+ "HP:0000111"
11
+ ],
12
+ "excludes": []
13
+ },
14
+ "interpretations": [
15
+ {
16
+ "id": "first",
17
+ "progressStatus": 3,
18
+ "diagnosis": {
19
+ "disease": {
20
+ "id": "OMIM:"
21
+ },
22
+ "genomicInterpretations": [
23
+ {
24
+ "subjectOrBiosampleId": "xfx2ybyipvr.y3n0hogaybn",
25
+ "variantInterpretation": {
26
+ "acmgPathogenicityClassification": "1",
27
+ "variationDescriptor": {
28
+ "geneContext": {
29
+ "valueId": "",
30
+ "symbol": "",
31
+ "alternateIds": [
32
+ ""
33
+ ]
34
+ },
35
+ "expressions": [],
36
+ "extensions": [
37
+ {
38
+ "name": "test-type",
39
+ "value": "Exome sequencing, long read"
40
+ }
41
+ ],
42
+ "allelicState": {
43
+ "id": "None"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ ],
52
+ "metaData": {
53
+ "created": "2026-02-18",
54
+ "createdBy": "Tom",
55
+ "submittedBy": "tom@kamphans.de",
56
+ "pseudonym": "UEN167DJ04KK"
57
+ }
58
+ }