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 975bf05 commit fcaf4ce
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
AgentRPCResponseResult,
HolePunchSignalMessage,
AddressMessage,
CertificateSigningRequestMessage,
NetworkEntryResultMessage,
} from '../types';
import type NodeConnectionManager from '../../../nodes/NodeConnectionManager';
import type { Host, Port } from '../../../network/types';
Expand All @@ -20,11 +20,11 @@ class NodesNetworkAuthenticate extends UnaryHandler<
{
nodeConnectionManager: NodeConnectionManager;
},
AgentRPCRequestParams<CertificateSigningRequestMessage>,
AgentRPCRequestParams<NetworkEntryResultMessage>,
AgentRPCResponseResult<{}>
> {
public handle = async (
input: AgentRPCRequestParams<CertificateSigningRequestMessage>,
input: AgentRPCRequestParams<NetworkEntryResultMessage>,
_cancel,
meta: Record<string, JSONValue> | undefined,
): Promise<AgentRPCResponseResult<{}>> => {
Expand Down
35 changes: 35 additions & 0 deletions src/nodes/agent/handlers/NodesNetworkEntryInitial.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type {
AgentRPCRequestParams,
AgentRPCResponseResult,
HolePunchSignalMessage,
AddressMessage,
NetworkEntryRequestMessage,
} 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<NetworkEntryRequestMessage>,
AgentRPCResponseResult<{}>
> {
public handle = async (
input: AgentRPCRequestParams<NetworkEntryRequestMessage>,
_cancel,
meta: Record<string, JSONValue> | undefined,
): Promise<AgentRPCResponseResult<{}>> => {
return {};
};
}

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

type CertificateSigningRequestMessage = {
type NetworkEntryRequestMessage = {

};

type NetworkEntryResultMessage = {

};


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

0 comments on commit fcaf4ce

Please sign in to comment.