viz-js-lib 0.12.3 → 0.12.4

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.
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## Update Summary
23
23
  **Changes Made**
24
- - Added comprehensive DNS Nameserver module documentation covering validation, record creation, parsing, and metadata manipulation
24
+ - Added comprehensive DNS Nameserver module documentation covering validation functions, record creation, parsing, and manipulation capabilities for VIZ blockchain NS records (A and TXT)
25
25
  - Updated project structure to include DNS module integration
26
26
  - Enhanced core components section to reflect new decentralized domain name resolution capabilities
27
27
  - Added practical DNS usage examples and integration patterns
@@ -94,20 +94,20 @@ BRW --> BHL
94
94
  ```
95
95
 
96
96
  **Diagram sources**
97
- - [src/index.js](file://src/index.js#L1-L22)
98
- - [src/browser.js](file://src/browser.js#L1-L30)
99
- - [src/config.js](file://src/config.js#L1-L10)
100
- - [src/utils.js](file://src/utils.js#L1-L348)
101
- - [src/formatter.js](file://src/formatter.js#L1-L87)
102
- - [src/dns.js](file://src/dns.js#L1-L575)
103
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L1-L54)
104
- - [src/auth/ecc/src/key_utils.js](file://src/auth/ecc/src/key_utils.js#L1-L89)
105
- - [src/auth/ecc/src/address.js](file://src/auth/ecc/src/address.js#L1-L57)
106
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L1-L82)
97
+ - [src/index.js:1-22](file://src/index.js#L1-L22)
98
+ - [src/browser.js:1-30](file://src/browser.js#L1-L30)
99
+ - [src/config.js:1-10](file://src/config.js#L1-L10)
100
+ - [src/utils.js:1-348](file://src/utils.js#L1-L348)
101
+ - [src/formatter.js:1-87](file://src/formatter.js#L1-L87)
102
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
103
+ - [src/auth/serializer/src/number_utils.js:1-54](file://src/auth/serializer/src/number_utils.js#L1-L54)
104
+ - [src/auth/ecc/src/key_utils.js:1-89](file://src/auth/ecc/src/key_utils.js#L1-L89)
105
+ - [src/auth/ecc/src/address.js:1-57](file://src/auth/ecc/src/address.js#L1-L57)
106
+ - [src/broadcast/helpers.js:1-82](file://src/broadcast/helpers.js#L1-L82)
107
107
 
108
108
  **Section sources**
109
- - [src/index.js](file://src/index.js#L1-L22)
110
- - [src/browser.js](file://src/browser.js#L1-L30)
109
+ - [src/index.js:1-22](file://src/index.js#L1-L22)
110
+ - [src/browser.js:1-30](file://src/browser.js#L1-L30)
111
111
 
112
112
  ## Core Components
113
113
  - Configuration management: centralized getters/setters backed by a JSON configuration file
@@ -120,16 +120,16 @@ BRW --> BHL
120
120
  - **New**: DNS Nameserver helpers: validation functions, record creation, parsing, and metadata manipulation for decentralized domain resolution
121
121
 
122
122
  **Section sources**
123
- - [src/config.js](file://src/config.js#L1-L10)
124
- - [config.json](file://config.json#L1-L7)
125
- - [src/browser.js](file://src/browser.js#L1-L30)
126
- - [src/formatter.js](file://src/formatter.js#L1-L87)
127
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L1-L54)
128
- - [src/utils.js](file://src/utils.js#L1-L348)
129
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L1-L82)
130
- - [src/auth/ecc/src/key_utils.js](file://src/auth/ecc/src/key_utils.js#L1-L89)
131
- - [src/auth/ecc/src/address.js](file://src/auth/ecc/src/address.js#L1-L57)
132
- - [src/dns.js](file://src/dns.js#L1-L575)
123
+ - [src/config.js:1-10](file://src/config.js#L1-L10)
124
+ - [config.json:1-7](file://config.json#L1-L7)
125
+ - [src/browser.js:1-30](file://src/browser.js#L1-L30)
126
+ - [src/formatter.js:1-87](file://src/formatter.js#L1-L87)
127
+ - [src/auth/serializer/src/number_utils.js:1-54](file://src/auth/serializer/src/number_utils.js#L1-L54)
128
+ - [src/utils.js:1-348](file://src/utils.js#L1-L348)
129
+ - [src/broadcast/helpers.js:1-82](file://src/broadcast/helpers.js#L1-L82)
130
+ - [src/auth/ecc/src/key_utils.js:1-89](file://src/auth/ecc/src/key_utils.js#L1-L89)
131
+ - [src/auth/ecc/src/address.js:1-57](file://src/auth/ecc/src/address.js#L1-L57)
132
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
133
133
 
134
134
  ## Architecture Overview
135
135
  The library exposes a cohesive API surface through two entry points:
@@ -160,13 +160,13 @@ BHL --> API
160
160
  ```
161
161
 
162
162
  **Diagram sources**
163
- - [src/formatter.js](file://src/formatter.js#L1-L87)
164
- - [src/config.js](file://src/config.js#L1-L10)
165
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L1-L54)
166
- - [src/auth/ecc/src/key_utils.js](file://src/auth/ecc/src/key_utils.js#L1-L89)
167
- - [src/auth/ecc/src/address.js](file://src/auth/ecc/src/address.js#L1-L57)
168
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L1-L82)
169
- - [src/dns.js](file://src/dns.js#L1-L575)
163
+ - [src/formatter.js:1-87](file://src/formatter.js#L1-L87)
164
+ - [src/config.js:1-10](file://src/config.js#L1-L10)
165
+ - [src/auth/serializer/src/number_utils.js:1-54](file://src/auth/serializer/src/number_utils.js#L1-L54)
166
+ - [src/auth/ecc/src/key_utils.js:1-89](file://src/auth/ecc/src/key_utils.js#L1-L89)
167
+ - [src/auth/ecc/src/address.js:1-57](file://src/auth/ecc/src/address.js#L1-L57)
168
+ - [src/broadcast/helpers.js:1-82](file://src/broadcast/helpers.js#L1-L82)
169
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
170
170
 
171
171
  ## Detailed Component Analysis
172
172
 
@@ -184,12 +184,12 @@ Use --> End(["Done"])
184
184
  ```
185
185
 
186
186
  **Diagram sources**
187
- - [src/config.js](file://src/config.js#L1-L10)
188
- - [config.json](file://config.json#L1-L7)
187
+ - [src/config.js:1-10](file://src/config.js#L1-L10)
188
+ - [config.json:1-7](file://config.json#L1-L7)
189
189
 
190
190
  **Section sources**
191
- - [src/config.js](file://src/config.js#L1-L10)
192
- - [config.json](file://config.json#L1-L7)
191
+ - [src/config.js:1-10](file://src/config.js#L1-L10)
192
+ - [config.json:1-7](file://config.json#L1-L7)
193
193
 
194
194
  ### Environment Detection and Global Exposure
195
195
  - Purpose: ensure the library is usable in both browser and Node.js
@@ -210,12 +210,12 @@ Loader-->>Browser : exports viz
210
210
  ```
211
211
 
212
212
  **Diagram sources**
213
- - [src/browser.js](file://src/browser.js#L1-L30)
214
- - [src/index.js](file://src/index.js#L1-L22)
213
+ - [src/browser.js:1-30](file://src/browser.js#L1-L30)
214
+ - [src/index.js:1-22](file://src/index.js#L1-L22)
215
215
 
216
216
  **Section sources**
217
- - [src/browser.js](file://src/browser.js#L1-L30)
218
- - [src/index.js](file://src/index.js#L1-L22)
217
+ - [src/browser.js:1-30](file://src/browser.js#L1-L30)
218
+ - [src/index.js:1-22](file://src/index.js#L1-L22)
219
219
 
220
220
  ### Formatting Utilities (Currency, Numbers, Strings)
221
221
  - Currency-like formatting: adds thousands separators to numeric strings
@@ -237,11 +237,11 @@ Format --> End(["Return formatted value"])
237
237
  ```
238
238
 
239
239
  **Diagram sources**
240
- - [src/formatter.js](file://src/formatter.js#L19-L49)
240
+ - [src/formatter.js:19-49](file://src/formatter.js#L19-L49)
241
241
 
242
242
  **Section sources**
243
- - [src/formatter.js](file://src/formatter.js#L1-L87)
244
- - [src/utils.js](file://src/utils.js#L10-L47)
243
+ - [src/formatter.js:1-87](file://src/formatter.js#L1-L87)
244
+ - [src/utils.js:10-47](file://src/utils.js#L10-L47)
245
245
 
246
246
  ### Numeric Utilities (Implied Decimals)
247
247
  - Purpose: convert between human-readable numbers and implied-decimal strings for asset precision
@@ -261,11 +261,11 @@ Trim --> Out["Return combined string"]
261
261
  ```
262
262
 
263
263
  **Diagram sources**
264
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L10-L35)
264
+ - [src/auth/serializer/src/number_utils.js:10-35](file://src/auth/serializer/src/number_utils.js#L10-L35)
265
265
 
266
266
  **Section sources**
267
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L1-L54)
268
- - [test/number_utils.js](file://test/number_utils.js#L1-L29)
267
+ - [src/auth/serializer/src/number_utils.js:1-54](file://src/auth/serializer/src/number_utils.js#L1-L54)
268
+ - [test/number_utils.js:1-29](file://test/number_utils.js#L1-L29)
269
269
 
270
270
  ### String Processing and Validation
271
271
  - camelCase conversion: transforms snake_case identifiers to camelCase
@@ -284,10 +284,10 @@ OK --> |No| Err["Return violation message"]
284
284
  ```
285
285
 
286
286
  **Diagram sources**
287
- - [src/utils.js](file://src/utils.js#L10-L47)
287
+ - [src/utils.js:10-47](file://src/utils.js#L10-L47)
288
288
 
289
289
  **Section sources**
290
- - [src/utils.js](file://src/utils.js#L1-L8)
290
+ - [src/utils.js:1-8](file://src/utils.js#L1-L8)
291
291
 
292
292
  ### Broadcast Helpers (Authority Management)
293
293
  - Purpose: add/remove authorized accounts to a user's authority structures
@@ -309,10 +309,10 @@ Helper-->>Caller : invoke cb(null, result)
309
309
  ```
310
310
 
311
311
  **Diagram sources**
312
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L6-L41)
312
+ - [src/broadcast/helpers.js:6-41](file://src/broadcast/helpers.js#L6-L41)
313
313
 
314
314
  **Section sources**
315
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L1-L82)
315
+ - [src/broadcast/helpers.js:1-82](file://src/broadcast/helpers.js#L1-L82)
316
316
 
317
317
  ### Cryptographic Helpers (Entropy, Keys, Addresses)
318
318
  - Entropy and randomness: collects browser entropy, hashes buffers, and produces 32-byte random keys
@@ -327,11 +327,11 @@ Key --> End(["Return PrivateKey"])
327
327
  ```
328
328
 
329
329
  **Diagram sources**
330
- - [src/auth/ecc/src/key_utils.js](file://src/auth/ecc/src/key_utils.js#L29-L55)
330
+ - [src/auth/ecc/src/key_utils.js:29-55](file://src/auth/ecc/src/key_utils.js#L29-L55)
331
331
 
332
332
  **Section sources**
333
- - [src/auth/ecc/src/key_utils.js](file://src/auth/ecc/src/key_utils.js#L1-L89)
334
- - [src/auth/ecc/src/address.js](file://src/auth/ecc/src/address.js#L1-L57)
333
+ - [src/auth/ecc/src/key_utils.js:1-89](file://src/auth/ecc/src/key_utils.js#L1-L89)
334
+ - [src/auth/ecc/src/address.js:1-57](file://src/auth/ecc/src/address.js#L1-L57)
335
335
 
336
336
  ### Voice Utilities (Content Publishing)
337
337
  - Purpose: helpers for publishing text, encoded text, publications, and related operations
@@ -353,10 +353,10 @@ Utils-->>Caller : callback(!err)
353
353
  ```
354
354
 
355
355
  **Diagram sources**
356
- - [src/utils.js](file://src/utils.js#L84-L127)
356
+ - [src/utils.js:84-127](file://src/utils.js#L84-L127)
357
357
 
358
358
  **Section sources**
359
- - [src/utils.js](file://src/utils.js#L49-L206)
359
+ - [src/utils.js:49-206](file://src/utils.js#L49-L206)
360
360
 
361
361
  ## DNS Nameserver Module
362
362
 
@@ -457,8 +457,8 @@ The DNS module integrates seamlessly with VIZ blockchain operations:
457
457
  - Provides backward compatibility with existing account metadata
458
458
 
459
459
  **Section sources**
460
- - [src/dns.js](file://src/dns.js#L1-L575)
461
- - [test/dns.test.js](file://test/dns.test.js#L1-L396)
460
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
461
+ - [test/dns.test.js:1-396](file://test/dns.test.js#L1-L396)
462
462
 
463
463
  ## Dependency Analysis
464
464
  Utilities depend on configuration, API clients, and cryptographic primitives. The formatter module depends on the API client to fetch global properties for estimations. The broadcast helpers depend on the API to retrieve account data and on the broadcaster to submit transactions. The DNS module operates independently but integrates with the existing module ecosystem.
@@ -476,20 +476,20 @@ DNS["dns.js"] --> FMT
476
476
  ```
477
477
 
478
478
  **Diagram sources**
479
- - [src/config.js](file://src/config.js#L1-L10)
480
- - [src/formatter.js](file://src/formatter.js#L1-L87)
481
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L1-L54)
482
- - [src/auth/ecc/src/key_utils.js](file://src/auth/ecc/src/key_utils.js#L1-L89)
483
- - [src/auth/ecc/src/address.js](file://src/auth/ecc/src/address.js#L1-L57)
484
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L1-L82)
485
- - [src/utils.js](file://src/utils.js#L1-L348)
486
- - [src/dns.js](file://src/dns.js#L1-L575)
479
+ - [src/config.js:1-10](file://src/config.js#L1-L10)
480
+ - [src/formatter.js:1-87](file://src/formatter.js#L1-L87)
481
+ - [src/auth/serializer/src/number_utils.js:1-54](file://src/auth/serializer/src/number_utils.js#L1-L54)
482
+ - [src/auth/ecc/src/key_utils.js:1-89](file://src/auth/ecc/src/key_utils.js#L1-L89)
483
+ - [src/auth/ecc/src/address.js:1-57](file://src/auth/ecc/src/address.js#L1-L57)
484
+ - [src/broadcast/helpers.js:1-82](file://src/broadcast/helpers.js#L1-L82)
485
+ - [src/utils.js:1-348](file://src/utils.js#L1-L348)
486
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
487
487
 
488
488
  **Section sources**
489
- - [src/formatter.js](file://src/formatter.js#L1-L87)
490
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L1-L82)
491
- - [src/utils.js](file://src/utils.js#L1-L348)
492
- - [src/dns.js](file://src/dns.js#L1-L575)
489
+ - [src/formatter.js:1-87](file://src/formatter.js#L1-L87)
490
+ - [src/broadcast/helpers.js:1-82](file://src/broadcast/helpers.js#L1-L82)
491
+ - [src/utils.js:1-348](file://src/utils.js#L1-L348)
492
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
493
493
 
494
494
  ## Performance Considerations
495
495
  - Prefer precomputed or cached global properties when estimating account values to reduce API calls
@@ -511,12 +511,12 @@ DNS["dns.js"] --> FMT
511
511
  - **New**: SSL hash validation: remember that SSL hashes are automatically lowercased when created
512
512
 
513
513
  **Section sources**
514
- - [src/config.js](file://src/config.js#L1-L10)
515
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L1-L54)
516
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L1-L82)
517
- - [src/auth/ecc/src/key_utils.js](file://src/auth/ecc/src/key_utils.js#L66-L86)
518
- - [src/auth/ecc/src/address.js](file://src/auth/ecc/src/address.js#L19-L30)
519
- - [src/dns.js](file://src/dns.js#L1-L575)
514
+ - [src/config.js:1-10](file://src/config.js#L1-L10)
515
+ - [src/auth/serializer/src/number_utils.js:1-54](file://src/auth/serializer/src/number_utils.js#L1-L54)
516
+ - [src/broadcast/helpers.js:1-82](file://src/broadcast/helpers.js#L1-L82)
517
+ - [src/auth/ecc/src/key_utils.js:66-86](file://src/auth/ecc/src/key_utils.js#L66-L86)
518
+ - [src/auth/ecc/src/address.js:19-30](file://src/auth/ecc/src/address.js#L19-L30)
519
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
520
520
 
521
521
  ## Conclusion
522
522
  The VIZ JavaScript library provides a robust set of utilities spanning configuration, formatting, numeric precision, string processing, broadcasting, cryptography, and now decentralized domain name resolution. The new DNS Nameserver module enhances the library's capabilities for blockchain-based applications requiring human-readable domain names. These modules are designed for cross-platform use and integrate cleanly with the API and broadcast layers. Following the patterns and guidelines outlined here ensures consistent behavior and maintainability across environments.
@@ -547,11 +547,11 @@ The VIZ JavaScript library provides a robust set of utilities spanning configura
547
547
  - Integrate with blockchain operations: store DNS metadata in account `json_metadata` field for decentralized domain resolution
548
548
 
549
549
  **Section sources**
550
- - [src/formatter.js](file://src/formatter.js#L19-L85)
551
- - [src/auth/serializer/src/number_utils.js](file://src/auth/serializer/src/number_utils.js#L10-L53)
552
- - [src/utils.js](file://src/utils.js#L10-L127)
553
- - [src/broadcast/helpers.js](file://src/broadcast/helpers.js#L6-L81)
554
- - [src/index.js](file://src/index.js#L1-L22)
555
- - [src/browser.js](file://src/browser.js#L1-L30)
556
- - [src/dns.js](file://src/dns.js#L1-L575)
557
- - [examples/get-post-content.js](file://examples/get-post-content.js#L1-L5)
550
+ - [src/formatter.js:19-85](file://src/formatter.js#L19-L85)
551
+ - [src/auth/serializer/src/number_utils.js:10-53](file://src/auth/serializer/src/number_utils.js#L10-L53)
552
+ - [src/utils.js:10-127](file://src/utils.js#L10-L127)
553
+ - [src/broadcast/helpers.js:6-81](file://src/broadcast/helpers.js#L6-L81)
554
+ - [src/index.js:1-22](file://src/index.js#L1-L22)
555
+ - [src/browser.js:1-30](file://src/browser.js#L1-L30)
556
+ - [src/dns.js:1-575](file://src/dns.js#L1-L575)
557
+ - [examples/get-post-content.js:1-5](file://examples/get-post-content.js#L1-L5)