archy/apps/web5-dwn/node_modules/cborg/lib/diagnostic_test.js
Dorian 0d073fa89e Add comprehensive installation and setup documentation
- Add GETTING_STARTED.md with quick start guide and development modes
- Add INSTALL.sh automated installation script
- Add INSTALLATION_CHECKLIST.md, INSTALLATION_SUCCESS.md, and INSTALLATION_SUMMARY.md
- Add QUICK_REFERENCE.md for common commands
- Add SETUP_GUIDE.md with detailed setup instructions
- Update README.md with improved project overview
- Add did-wallet app dependencies and node_modules
2026-01-27 17:18:21 +00:00

118 lines
3.0 KiB
JavaScript

import { tokensToDiagnostic } from './diagnostic.js'
import { fromHex } from './byte-utils.js'
const inp = `
a7
62
6964
78 40
6469643a6578616d706c653a31324433
4b6f6f574d4864727a6377706a626472
5a733547477145524176636771583362
3564707550745061396f743639796577
65
70726f6f66
a4
64
74797065
74
656432353531395369676e617475726532303138
67
63726561746564
74
323032302d30352d30315430333a30303a30325a
67
63726561746f72
78 8c
6469643a6578616d706c653a31324433
4b6f6f574d4864727a6377706a626472
5a733547477145524176636771583362
3564707550745061396f743639796577
3b206578616d706c653a6b65793d6964
3d626166797265696375627478357771
6f336e6f73633463617a726b63746668
776436726577657a6770776f65347377
69726c733465626468733269
6e
7369676e617475726556616c7565
78 58
6f3972364c78676f474e38466f616565
554136456444637631324776447a4645
6d43676a577a76707572325953517941
3857327230535357554b2b6e4835744d
717a61464c756e3677775a31456f7433
37616d4744673d3d
67
63726561746564
74
323031382d31322d30315430333a30303a30305a
67
75706461746564
74
323032302d30352d30315430333a30303a30305a
68
40636f6e74657874
78 1c
68747470733a2f2f7777772e77332e6f
72672f6e732f6469642f7631
69
7075626c69634b6579
81
a5
62
6964
78 85
6261667972656963756274783577716f
336e6f73633463617a726b6374666877
6436726577657a6770776f6534737769
726c7334656264687332693b6578616d
706c653a6b65793d6964626166797265
6963756274783577716f336e6f736334
63617a726b6374666877643672657765
7a6770776f6534737769726c73346562
6468733269
64
74797065
6e
45644473615075626c69634b6579
65
6375727665
67
65643235353139
67
65787069726573
74
323031392d31322d30315430333a30303a30305a
6f
7075626c69634b6579426173653634
78 2c
716d7a3774704c4e4b4b4b646c376344
375062656a4469425670374f4e706d5a
62666d633763454b396d673d
6e
61757468656e7469636174696f6e
81
78 83
6469643a6578616d706c653a31324433
4b6f6f574d4864727a6377706a626472
5a733547477145524176636771583362
3564707550745061396f743639796577
3b6b65792d69643d6261667972656963
756274783577716f336e6f7363346361
7a726b63746668776436726577657a67
70776f6534737769726c733465626468
733269
`.replace(/[\n ]/g, '')
// tokensToDiagnostic(fromHex('861864fb4376345785d8a0002063796570428411fb3ff199999999999a'))
for (const line of tokensToDiagnostic(fromHex('851864fb4376345785d8a00020a661624284116166f46168f7616ef6617379012c7965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965707965706174f5fb3ff199999999999a'))) {
console.log(line)
}
for (const line of tokensToDiagnostic(fromHex(inp))) {
console.log(line)
}
for (const line of tokensToDiagnostic(fromHex('82410181a161318182410041ff'))) {
console.log(line)
}