Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
amydevs committed Jul 22, 2024
1 parent cfae4f2 commit 1db71d9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/nodes/NodeConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import * as nodesUtils from '../nodes/utils';
import { never } from '../utils';
import config from '../config';
import * as networkUtils from '../network/utils';
import * as keysUtils from '../keys/utils';

type AgentClientManifest = typeof agentClientManifest;

Expand Down
35 changes: 35 additions & 0 deletions src/nodes/agent/handlers/NodesNetworkAuthenticate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type {
AgentRPCRequestParams,
AgentRPCResponseResult,
HolePunchSignalMessage,
AddressMessage,
CertificateSigningRequestMessage,
} from '../types';
import type NodeConnectionManager from '../../../nodes/NodeConnectionManager';
import type { Host, Port } from '../../../network/types';
import type { JSONValue } from '../../../types';
import { UnaryHandler } from '@matrixai/rpc';
import * as agentErrors from '../errors';
import * as agentUtils from '../utils';
import { never } from '../../../utils';
import * as keysUtils from '../../../keys/utils';
import * as ids from '../../../ids';
import * as x509 from '@peculiar/x509';

class NodesNetworkAuthenticate extends UnaryHandler<
{
nodeConnectionManager: NodeConnectionManager;
},
AgentRPCRequestParams<CertificateSigningRequestMessage>,
AgentRPCResponseResult<{}>
> {
public handle = async (
input: AgentRPCRequestParams<CertificateSigningRequestMessage>,
_cancel,
meta: Record<string, JSONValue> | undefined,
): Promise<AgentRPCResponseResult<{}>> => {
return {};
};
}

export default NodesNetworkAuthenticate;
5 changes: 5 additions & 0 deletions src/nodes/agent/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ type HolePunchSignalMessage = {
signature: string;
};

type CertificateSigningRequestMessage = {

};

type SignedNotificationEncoded = {
signedNotificationEncoded: SignedNotification;
};
Expand All @@ -88,6 +92,7 @@ export type {
ActiveConnectionDataMessage,
HolePunchRequestMessage,
HolePunchSignalMessage,
CertificateSigningRequestMessage,
SignedNotificationEncoded,
VaultInfo,
VaultsScanMessage,
Expand Down

0 comments on commit 1db71d9

Please sign in to comment.