@fintekkers/ledger-models 0.1.76 → 0.1.77

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.
@@ -4,14 +4,14 @@ import * as uuid from 'uuid';
4
4
 
5
5
  class UUID {
6
6
  private bytes: number[];
7
-
7
+
8
8
  constructor(bytes: number[]) {
9
9
  this.bytes = bytes;
10
10
  }
11
11
 
12
12
  toString(): string {
13
- const buffer = Buffer.from(this.bytes);
14
- return uuid.stringify(buffer);
13
+ const byteArray: Uint8Array = new Uint8Array(this.bytes);
14
+ return uuid.stringify(byteArray);
15
15
  }
16
16
 
17
17
  toBytes(): number[] {
@@ -34,7 +34,7 @@ class UUID {
34
34
  }
35
35
 
36
36
  static fromU8Array(uint8Array: Uint8Array): UUID {
37
- const array:number[] = Array.from(uint8Array, byte => byte);
37
+ const array: number[] = Array.from(uint8Array, byte => byte);
38
38
  return new UUID(array);
39
39
  }
40
40
 
@@ -59,7 +59,7 @@ const test_uuid_bytes_copy = UUID.fromString(test_uuid.toString());
59
59
 
60
60
  assert(
61
61
  test_uuid_bytes.length === test_uuid_bytes_copy.length &&
62
- test_uuid_bytes.every((value, index) => value === test_uuid_bytes_copy[index])
62
+ test_uuid_bytes.every((value, index) => value === test_uuid_bytes_copy[index])
63
63
  );
64
64
 
65
65
  assert(UUID.random().toString().length == 36);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fintekkers/ledger-models",
3
3
  "todo": "Replace the version with build script version number",
4
- "version": "0.1.76",
4
+ "version": "0.1.77",
5
5
  "description": "ledger model protos ",
6
6
  "authors": [
7
7
  "David Doherty",