mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-01 20:31:18 +00:00
Create handshakes dir
This commit is contained in:
parent
36a66c59da
commit
e66ee7d677
@ -1,6 +1,6 @@
|
||||
import {Buffer} from "buffer";
|
||||
import {bytes} from "./@types/basic";
|
||||
import {MessageBuffer} from "./xx";
|
||||
import {MessageBuffer} from "./handshakes/xx";
|
||||
|
||||
export const int16BEEncode = (value, target, offset) => {
|
||||
target = target || Buffer.allocUnsafe(2);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Buffer } from "buffer";
|
||||
|
||||
import { bytes, bytes32 } from "./@types/basic";
|
||||
import { NoiseSession, XXHandshake } from "./xx";
|
||||
import { NoiseSession, XXHandshake } from "./handshakes/xx";
|
||||
import { KeyPair, PeerId } from "./@types/libp2p";
|
||||
import {
|
||||
createHandshakePayload,
|
||||
|
0
src/handshakes/ik.ts
Normal file
0
src/handshakes/ik.ts
Normal file
@ -2,9 +2,9 @@ import { Buffer } from 'buffer';
|
||||
import { AEAD, x25519, HKDF, SHA256 } from 'bcrypto';
|
||||
import { BN } from 'bn.js';
|
||||
|
||||
import { bytes32, uint32, uint64, bytes } from './@types/basic'
|
||||
import { KeyPair } from './@types/libp2p'
|
||||
import { generateKeypair } from './utils';
|
||||
import { bytes32, uint32, uint64, bytes } from '../@types/basic'
|
||||
import { KeyPair } from '../@types/libp2p'
|
||||
import { generateKeypair } from '../utils';
|
||||
|
||||
export interface MessageBuffer {
|
||||
ne: bytes32;
|
0
test/handshakes/ik.test.ts
Normal file
0
test/handshakes/ik.test.ts
Normal file
@ -1,10 +1,10 @@
|
||||
import { expect, assert } from "chai";
|
||||
import { Buffer } from 'buffer';
|
||||
|
||||
import { XXHandshake } from "../src/xx";
|
||||
import { KeyPair } from "../src/@types/libp2p";
|
||||
import { generateEd25519Keys } from "./utils";
|
||||
import {createHandshakePayload, generateKeypair, getHandshakePayload} from "../src/utils";
|
||||
import { XXHandshake } from "../../src/handshakes/xx";
|
||||
import { KeyPair } from "../../src/@types/libp2p";
|
||||
import { generateEd25519Keys } from "../utils";
|
||||
import {createHandshakePayload, generateKeypair, getHandshakePayload} from "../../src/utils";
|
||||
|
||||
describe("Index", () => {
|
||||
const prologue = Buffer.from("/noise", "utf-8");
|
@ -12,7 +12,7 @@ import {
|
||||
signPayload
|
||||
} from "../src/utils";
|
||||
import { decodeMessageBuffer, encodeMessageBuffer } from "../src/encoder";
|
||||
import {XXHandshake} from "../src/xx";
|
||||
import {XXHandshake} from "../src/handshakes/xx";
|
||||
import {Buffer} from "buffer";
|
||||
import {getKeyPairFromPeerId, getRandomBuffer} from "./utils";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user