The on-chain session identifier (uint64), obtained after
broadcasting a MsgStartSessionRequest transaction
The protocol-specific peer request returned by the selected
VPN client's getPeerRequest() method.
The 32-byte secp256k1 private key of the Cosmos wallet that owns the session on-chain
The node's remote URL as stored on-chain (e.g. https://1.2.3.4:port)
request timeout in milliseconds
A NodeHandshakeResult containing:
result.addrs — list of node endpoints to connect to (e.g. ["1.2.3.4:51820"])result.data — base64-encoded protocol handshake responseWill throw if the HTTP request fails, or if the node returns an
unsuccessful envelope (success: false / an error payload) — e.g. the
session is not active on-chain or signature verification failed. The
thrown message includes the node's error code and text when present. Also
throws if a resolved response is unsuccessful or has no result.
// WireGuard
const wgKeys = generateKeypair();
const result = await handshake(
sessionId,
wireguard.getPeerRequest(),
cosmosPrivKeyBytes,
node.remoteUrl,
);
// result.addrs → ["1.2.3.4"]
// result.data → base64-encoded WireGuard peer config
// v2ray
const v2ray = new V2Ray();
const result = await handshake(
sessionId,
v2ray.getPeerRequest(),
cosmosPrivKeyBytes,
node.remoteUrl,
);
Generated using TypeDoc
Performs the handshake with a Sentinel dVPN node to initiate a VPN session.
Replicates the
InitHandshakemethod of the Sentinel Go SDK client. The process is:bigEndian(sessionId) || JSON(data){ data, id, pub_key, signature }to the node's root endpoint (/)The node verifies the signature, derives the account address from
pub_key, and checks it matches the on-chain session's account address before adding the peer to the active VPN service.SSL certificate verification is intentionally disabled since node daemons use self-signed certificates.