@antseed/node 0.2.107 → 0.2.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/discovery/announcer.d.ts.map +1 -1
- package/dist/discovery/announcer.js +3 -1
- package/dist/discovery/announcer.js.map +1 -1
- package/dist/errors.d.ts +1 -42
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -72
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +27 -34
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +64 -36
- package/dist/node.js.map +1 -1
- package/dist/p2p/connection-auth.d.ts +44 -3
- package/dist/p2p/connection-auth.d.ts.map +1 -1
- package/dist/p2p/connection-auth.js +142 -10
- package/dist/p2p/connection-auth.js.map +1 -1
- package/dist/p2p/connection-manager.d.ts +19 -3
- package/dist/p2p/connection-manager.d.ts.map +1 -1
- package/dist/p2p/connection-manager.js +288 -31
- package/dist/p2p/connection-manager.js.map +1 -1
- package/dist/p2p/secure-channel.d.ts +53 -0
- package/dist/p2p/secure-channel.d.ts.map +1 -0
- package/dist/p2p/secure-channel.js +121 -0
- package/dist/p2p/secure-channel.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encrypted TCP transport (transport.tcp-enc.v1): wallet-signed ephemeral
|
|
3
|
+
* X25519 handshake, HKDF-SHA256 with transcript-bound salt, one
|
|
4
|
+
* ChaCha20-Poly1305 key per direction, length-prefixed frames with implicit
|
|
5
|
+
* counter nonces (safe: per-direction keys, TCP ordering).
|
|
6
|
+
*/
|
|
7
|
+
import { type KeyObject } from "node:crypto";
|
|
8
|
+
export declare const MAX_FRAME_PLAINTEXT_BYTES: number;
|
|
9
|
+
export interface EphemeralKeyPair {
|
|
10
|
+
privateKey: KeyObject;
|
|
11
|
+
/** Raw 32-byte public key, lowercase hex (64 chars). */
|
|
12
|
+
publicKeyHex: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const X25519_PUB_HEX_REGEX: RegExp;
|
|
15
|
+
export declare function generateEphemeralKeyPair(): EphemeralKeyPair;
|
|
16
|
+
export interface SessionKeys {
|
|
17
|
+
sendKey: Buffer;
|
|
18
|
+
recvKey: Buffer;
|
|
19
|
+
}
|
|
20
|
+
export interface HandshakeTranscript {
|
|
21
|
+
initiatorPeerId: string;
|
|
22
|
+
responderPeerId: string;
|
|
23
|
+
initiatorNonce: string;
|
|
24
|
+
responderNonce: string;
|
|
25
|
+
initiatorPubHex: string;
|
|
26
|
+
responderPubHex: string;
|
|
27
|
+
}
|
|
28
|
+
/** Derive per-direction AEAD keys; `isInitiator` mirrors send/recv halves. */
|
|
29
|
+
export declare function deriveSessionKeys(localPrivateKey: KeyObject, remotePublicKeyHex: string, transcript: HandshakeTranscript, isInitiator: boolean): SessionKeys;
|
|
30
|
+
/** Encrypts outbound messages into length-prefixed AEAD frames. */
|
|
31
|
+
export declare class FrameEncryptor {
|
|
32
|
+
private readonly key;
|
|
33
|
+
private _counter;
|
|
34
|
+
constructor(key: Buffer);
|
|
35
|
+
encrypt(plaintext: Uint8Array): Buffer;
|
|
36
|
+
}
|
|
37
|
+
/** Accumulates inbound bytes and decrypts complete AEAD frames. */
|
|
38
|
+
export declare class FrameDecryptor {
|
|
39
|
+
private readonly key;
|
|
40
|
+
private _counter;
|
|
41
|
+
private _buffer;
|
|
42
|
+
constructor(key: Buffer);
|
|
43
|
+
/** Feed raw bytes, get decrypted messages. Throws are fatal for the connection. */
|
|
44
|
+
push(chunk: Uint8Array): Uint8Array[];
|
|
45
|
+
}
|
|
46
|
+
/** Bidirectional cipher state attached to an encrypted TCP connection. */
|
|
47
|
+
export interface TransportCrypto {
|
|
48
|
+
encryptor: FrameEncryptor;
|
|
49
|
+
decryptor: FrameDecryptor;
|
|
50
|
+
}
|
|
51
|
+
export declare function createTransportCrypto(keys: SessionKeys): TransportCrypto;
|
|
52
|
+
export declare function sha256Hex(data: string): string;
|
|
53
|
+
//# sourceMappingURL=secure-channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-channel.d.ts","sourceRoot":"","sources":["../../src/p2p/secure-channel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,aAAa,CAAC;AAKrB,eAAO,MAAM,yBAAyB,QAAmB,CAAC;AAM1D,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,SAAS,CAAC;IACtB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AAErD,wBAAgB,wBAAwB,IAAI,gBAAgB,CAK3D;AAUD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAWD,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,SAAS,EAC1B,kBAAkB,EAAE,MAAM,EAC1B,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,OAAO,GACnB,WAAW,CAab;AAQD,mEAAmE;AACnE,qBAAa,cAAc;IAGb,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFhC,OAAO,CAAC,QAAQ,CAAM;gBAEO,GAAG,EAAE,MAAM;IAExC,OAAO,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM;CAavC;AAED,mEAAmE;AACnE,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,GAAG;IAHhC,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,OAAO,CAAmB;gBAEL,GAAG,EAAE,MAAM;IAExC,mFAAmF;IACnF,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE;CA8BtC;AAED,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CAKxE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encrypted TCP transport (transport.tcp-enc.v1): wallet-signed ephemeral
|
|
3
|
+
* X25519 handshake, HKDF-SHA256 with transcript-bound salt, one
|
|
4
|
+
* ChaCha20-Poly1305 key per direction, length-prefixed frames with implicit
|
|
5
|
+
* counter nonces (safe: per-direction keys, TCP ordering).
|
|
6
|
+
*/
|
|
7
|
+
import { createCipheriv, createDecipheriv, createHash, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, } from "node:crypto";
|
|
8
|
+
const AEAD_ALGORITHM = "chacha20-poly1305";
|
|
9
|
+
const AEAD_TAG_BYTES = 16;
|
|
10
|
+
const FRAME_HEADER_BYTES = 4;
|
|
11
|
+
export const MAX_FRAME_PLAINTEXT_BYTES = 16 * 1024 * 1024;
|
|
12
|
+
const HKDF_INFO = "antseed-tcp-enc-v1";
|
|
13
|
+
const X25519_RAW_KEY_BYTES = 32;
|
|
14
|
+
/** DER SPKI prefix for an X25519 public key (RFC 8410). */
|
|
15
|
+
const X25519_SPKI_PREFIX = Buffer.from("302a300506032b656e032100", "hex");
|
|
16
|
+
export const X25519_PUB_HEX_REGEX = /^[0-9a-f]{64}$/;
|
|
17
|
+
export function generateEphemeralKeyPair() {
|
|
18
|
+
const { privateKey, publicKey } = generateKeyPairSync("x25519");
|
|
19
|
+
const spki = publicKey.export({ type: "spki", format: "der" });
|
|
20
|
+
const raw = spki.subarray(spki.length - X25519_RAW_KEY_BYTES);
|
|
21
|
+
return { privateKey, publicKeyHex: raw.toString("hex") };
|
|
22
|
+
}
|
|
23
|
+
function importPublicKey(publicKeyHex) {
|
|
24
|
+
if (!X25519_PUB_HEX_REGEX.test(publicKeyHex)) {
|
|
25
|
+
throw new Error("Invalid X25519 public key");
|
|
26
|
+
}
|
|
27
|
+
const der = Buffer.concat([X25519_SPKI_PREFIX, Buffer.from(publicKeyHex, "hex")]);
|
|
28
|
+
return createPublicKey({ key: der, format: "der", type: "spki" });
|
|
29
|
+
}
|
|
30
|
+
function transcriptHash(t) {
|
|
31
|
+
return createHash("sha256")
|
|
32
|
+
.update(`${t.initiatorPeerId}|${t.responderPeerId}|${t.initiatorNonce}|${t.responderNonce}|${t.initiatorPubHex}|${t.responderPubHex}`, "utf8")
|
|
33
|
+
.digest();
|
|
34
|
+
}
|
|
35
|
+
/** Derive per-direction AEAD keys; `isInitiator` mirrors send/recv halves. */
|
|
36
|
+
export function deriveSessionKeys(localPrivateKey, remotePublicKeyHex, transcript, isInitiator) {
|
|
37
|
+
const shared = diffieHellman({
|
|
38
|
+
privateKey: localPrivateKey,
|
|
39
|
+
publicKey: importPublicKey(remotePublicKeyHex),
|
|
40
|
+
});
|
|
41
|
+
const okm = Buffer.from(hkdfSync("sha256", shared, transcriptHash(transcript), HKDF_INFO, 64));
|
|
42
|
+
const initiatorToResponder = okm.subarray(0, 32);
|
|
43
|
+
const responderToInitiator = okm.subarray(32, 64);
|
|
44
|
+
return isInitiator
|
|
45
|
+
? { sendKey: initiatorToResponder, recvKey: responderToInitiator }
|
|
46
|
+
: { sendKey: responderToInitiator, recvKey: initiatorToResponder };
|
|
47
|
+
}
|
|
48
|
+
function counterIv(counter) {
|
|
49
|
+
const iv = Buffer.alloc(12);
|
|
50
|
+
iv.writeBigUInt64BE(counter, 4);
|
|
51
|
+
return iv;
|
|
52
|
+
}
|
|
53
|
+
/** Encrypts outbound messages into length-prefixed AEAD frames. */
|
|
54
|
+
export class FrameEncryptor {
|
|
55
|
+
key;
|
|
56
|
+
_counter = 0n;
|
|
57
|
+
constructor(key) {
|
|
58
|
+
this.key = key;
|
|
59
|
+
}
|
|
60
|
+
encrypt(plaintext) {
|
|
61
|
+
if (plaintext.length > MAX_FRAME_PLAINTEXT_BYTES) {
|
|
62
|
+
throw new Error(`Frame plaintext exceeds ${MAX_FRAME_PLAINTEXT_BYTES} bytes`);
|
|
63
|
+
}
|
|
64
|
+
const cipher = createCipheriv(AEAD_ALGORITHM, this.key, counterIv(this._counter), {
|
|
65
|
+
authTagLength: AEAD_TAG_BYTES,
|
|
66
|
+
});
|
|
67
|
+
this._counter += 1n;
|
|
68
|
+
const body = Buffer.concat([cipher.update(plaintext), cipher.final(), cipher.getAuthTag()]);
|
|
69
|
+
const header = Buffer.alloc(FRAME_HEADER_BYTES);
|
|
70
|
+
header.writeUInt32BE(body.length, 0);
|
|
71
|
+
return Buffer.concat([header, body]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Accumulates inbound bytes and decrypts complete AEAD frames. */
|
|
75
|
+
export class FrameDecryptor {
|
|
76
|
+
key;
|
|
77
|
+
_counter = 0n;
|
|
78
|
+
_buffer = Buffer.alloc(0);
|
|
79
|
+
constructor(key) {
|
|
80
|
+
this.key = key;
|
|
81
|
+
}
|
|
82
|
+
/** Feed raw bytes, get decrypted messages. Throws are fatal for the connection. */
|
|
83
|
+
push(chunk) {
|
|
84
|
+
this._buffer = this._buffer.length === 0
|
|
85
|
+
? Buffer.from(chunk)
|
|
86
|
+
: Buffer.concat([this._buffer, chunk]);
|
|
87
|
+
const messages = [];
|
|
88
|
+
while (this._buffer.length >= FRAME_HEADER_BYTES) {
|
|
89
|
+
const bodyLength = this._buffer.readUInt32BE(0);
|
|
90
|
+
if (bodyLength < AEAD_TAG_BYTES || bodyLength > MAX_FRAME_PLAINTEXT_BYTES + AEAD_TAG_BYTES) {
|
|
91
|
+
throw new Error(`Invalid encrypted frame length ${bodyLength}`);
|
|
92
|
+
}
|
|
93
|
+
if (this._buffer.length < FRAME_HEADER_BYTES + bodyLength) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
const body = this._buffer.subarray(FRAME_HEADER_BYTES, FRAME_HEADER_BYTES + bodyLength);
|
|
97
|
+
this._buffer = this._buffer.subarray(FRAME_HEADER_BYTES + bodyLength);
|
|
98
|
+
const decipher = createDecipheriv(AEAD_ALGORITHM, this.key, counterIv(this._counter), {
|
|
99
|
+
authTagLength: AEAD_TAG_BYTES,
|
|
100
|
+
});
|
|
101
|
+
this._counter += 1n;
|
|
102
|
+
decipher.setAuthTag(body.subarray(body.length - AEAD_TAG_BYTES));
|
|
103
|
+
const plaintext = Buffer.concat([
|
|
104
|
+
decipher.update(body.subarray(0, body.length - AEAD_TAG_BYTES)),
|
|
105
|
+
decipher.final(),
|
|
106
|
+
]);
|
|
107
|
+
messages.push(new Uint8Array(plaintext));
|
|
108
|
+
}
|
|
109
|
+
return messages;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export function createTransportCrypto(keys) {
|
|
113
|
+
return {
|
|
114
|
+
encryptor: new FrameEncryptor(keys.sendKey),
|
|
115
|
+
decryptor: new FrameDecryptor(keys.recvKey),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export function sha256Hex(data) {
|
|
119
|
+
return createHash("sha256").update(data, "utf8").digest("hex");
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=secure-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-channel.js","sourceRoot":"","sources":["../../src/p2p/secure-channel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,QAAQ,GAET,M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AAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;gBAC/D,QAAQ,CAAC,KAAK,EAAE;aACjB,CAAC,CAAC;YACH,QAAQ,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAQD,MAAM,UAAU,qBAAqB,CAAC,IAAiB;IACrD,OAAO;QACL,SAAS,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;QAC3C,SAAS,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;KAC5C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antseed/node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.109",
|
|
4
4
|
"description": "Antseed Network protocol SDK — P2P inference marketplace",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"node-datachannel": "^0.7.0",
|
|
51
51
|
"tokenx": "^1.3.0",
|
|
52
52
|
"@antseed/api-adapter": "0.1.43",
|
|
53
|
-
"@antseed/buyer-core": "0.1.
|
|
54
|
-
"@antseed/protocol": "0.1.
|
|
53
|
+
"@antseed/buyer-core": "0.1.3",
|
|
54
|
+
"@antseed/protocol": "0.1.3"
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
57
|
"keytar": "^7.9.0"
|