- 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
10 lines
375 B
TypeScript
10 lines
375 B
TypeScript
import { createReader } from './utils/reader.js'
|
|
import type { Codec, DecodeOptions } from './codec.js'
|
|
import type { Uint8ArrayList } from 'uint8arraylist'
|
|
|
|
export function decodeMessage <T> (buf: Uint8Array | Uint8ArrayList, codec: Pick<Codec<T>, 'decode'>, opts?: DecodeOptions<T>): T {
|
|
const reader = createReader(buf)
|
|
|
|
return codec.decode(reader, undefined, opts)
|
|
}
|