/**
* Test fixtures for cryptographic keys.
*
* These are deterministic test keys - DO NOT use in production!
*/
// Test keypair 1 (agent A)
export const testKeyPair1 = {
privateKey: 'nWGxne/9WmC6hEr0kuwsxERJxWl7MmkZcDusAxyuf2A=', // 32-byte seed
publicKey: '11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=',
};
// Test keypair 2 (agent B)
export const testKeyPair2 = {
privateKey: 'PMlrwIaaPcHURo11qYAYKxCrfVS/7TyWQHOg7hcvPa0=',
publicKey: 'a5aPcHURo11qYAYKxCrfVS/7TyWQHOg7hcvPaPMlrwI=',
};
// Test agent configurations
export const testAgent1Config = {
privateKey: testKeyPair1.privateKey,
origin: 'agent1.test.example',
pubkeyId: '11111111-1111-1111-1111-111111111111',
registryUrl: 'http://localhost:3000',
requestTimeout: 5000,
debug: false,
};
export const testAgent2Config = {
privateKey: testKeyPair2.privateKey,
origin: 'agent2.test.example',
pubkeyId: '22222222-2222-2222-2222-222222222222',
registryUrl: 'http://localhost:3000',
requestTimeout: 5000,
debug: false,
};
// Test agent data
export const testAgent1 = {
id: '11111111-1111-1111-1111-111111111111',
name: 'Test Agent 1',
description: 'A test agent for unit tests',
capabilities: ['chat'],
visibility: 'public' as const,
domain: 'agent1.test.example',
status: 'active' as const,
metadata: null,
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
keys: [
{
id: testAgent1Config.pubkeyId,
agent_id: '11111111-1111-1111-1111-111111111111',
public_key: testKeyPair1.publicKey,
key_format: 'base64' as const,
label: 'primary',
status: 'active' as const,
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
},
],
};
export const testAgent2 = {
id: '22222222-2222-2222-2222-222222222222',
name: 'Test Agent 2',
description: 'Another test agent',
capabilities: ['chat', 'translate'],
visibility: 'public' as const,
domain: 'agent2.test.example',
status: 'active' as const,
metadata: null,
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
keys: [
{
id: testAgent2Config.pubkeyId,
agent_id: '22222222-2222-2222-2222-222222222222',
public_key: testKeyPair2.publicKey,
key_format: 'base64' as const,
label: 'primary',
status: 'active' as const,
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
},
],
};
// Test message
export const testMessage = {
id: 'msg-11111111-1111-1111-1111-111111111111',
thread_id: 'thread-11111111-1111-1111-1111-111111111111',
from_agent_id: testAgent2.id,
from_origin: testAgent2.domain,
to_agent_id: testAgent1.id,
to_origin: testAgent1.domain,
subject: 'Test Message',
body: 'Hello from Agent 2!',
metadata: null,
signature: 'test-signature-base64',
created_at: '2024-01-01T00:00:00Z',
read_at: null,
};