Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
9b2d4d1096
|
|||
|
fae58c223b
|
|||
|
7e5a8c74a5
|
|||
|
df09c952de
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcore",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "MeshCore protocol support for Typescript",
|
||||
"keywords": [
|
||||
"MeshCore",
|
||||
|
||||
@@ -3,7 +3,9 @@ export * from './identity.types';
|
||||
export type * from './identity.types';
|
||||
|
||||
export * from './crypto';
|
||||
export * from './crypto.types';
|
||||
export type * from './crypto.types';
|
||||
|
||||
export * from './packet';
|
||||
export * from './packet.types';
|
||||
export type * from './packet.types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { PublicKey, PrivateKey, SharedSecret, StaticSecret } from './crypto';
|
||||
import { bytesToHex, hexToBytes } from './parser';
|
||||
import { PublicKey, PrivateKey, SharedSecret, StaticSecret } from '../src/crypto';
|
||||
import { bytesToHex, hexToBytes } from '../src/parser';
|
||||
|
||||
const randomBytes = (len: number) => Uint8Array.from({ length: len }, () => Math.floor(Math.random() * 256));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
import { Identity, LocalIdentity, Contact, Group, Contacts, parseNodeHash } from './identity';
|
||||
import { PrivateKey, PublicKey, SharedSecret } from './crypto';
|
||||
import { DecryptedGroupText, DecryptedGroupData } from './packet.types';
|
||||
import { bytesToHex } from './parser';
|
||||
import { Identity, LocalIdentity, Contact, Group, Contacts, parseNodeHash } from '../src/identity';
|
||||
import { PrivateKey, PublicKey, SharedSecret } from '../src/crypto';
|
||||
import { DecryptedGroupText, DecryptedGroupData } from '../src/packet.types';
|
||||
import { bytesToHex } from '../src/parser';
|
||||
|
||||
function randomBytes(len: number) {
|
||||
return Uint8Array.from({ length: len }, () => Math.floor(Math.random() * 256));
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
import { Packet } from './packet';
|
||||
import { PayloadType, RouteType, NodeType, TracePayload, AdvertPayload, RequestPayload, TextPayload, ResponsePayload, RawCustomPayload, AnonReqPayload } from './packet.types';
|
||||
import { hexToBytes, bytesToHex } from './parser';
|
||||
import { Packet } from '../src/packet';
|
||||
import { PayloadType, RouteType, NodeType, TracePayload, AdvertPayload, RequestPayload, TextPayload, ResponsePayload, RawCustomPayload, AnonReqPayload } from '../src/packet.types';
|
||||
import { hexToBytes, bytesToHex } from '../src/parser';
|
||||
|
||||
describe('Packet.fromBytes', () => {
|
||||
test('frame 1: len=122 type=5 payload_len=99', () => {
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { base64ToBytes, hexToBytes, BufferReader, BufferWriter } from './parser';
|
||||
import { base64ToBytes, hexToBytes, BufferReader, BufferWriter } from '../src/parser';
|
||||
|
||||
describe('base64ToBytes', () => {
|
||||
it('decodes a simple base64 string', () => {
|
||||
@@ -14,6 +14,6 @@
|
||||
"isolatedModules": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "test/crypto.test.ts", "test/identity.test.ts", "test/packet.test.ts", "test/parser.test.ts"],
|
||||
"exclude": ["node_modules", "dist", "test"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user