(feat): add codec helpers to ts-sdk
All checks were successful
CI / checks (push) Successful in 8m38s
All checks were successful
CI / checks (push) Successful in 8m38s
This commit is contained in:
parent
c3fbeb2e78
commit
8dc8b54b26
3 changed files with 51 additions and 0 deletions
|
|
@ -258,6 +258,16 @@ Raw message helpers that remain available include:
|
|||
- `format_frame(frame)`
|
||||
- `parse_auth_response(frame)`
|
||||
|
||||
The SDK export also exposes the same frame codec through `codec`:
|
||||
|
||||
```typescript
|
||||
import { codec } from "mtp";
|
||||
|
||||
const frame = codec.encode("SomeType", { value: "hello" });
|
||||
const parsed = codec.decode(frame);
|
||||
const display = codec.format(frame);
|
||||
```
|
||||
|
||||
Raw crypto and key helpers include:
|
||||
|
||||
- `ed25519_generate()`
|
||||
|
|
|
|||
Loading…
Reference in a new issue