Update README.md to provide a comprehensive overview of The Order monorepo, including repository structure, quickstart guide, development workflow, and contribution guidelines.

This commit is contained in:
defiQUG
2025-11-07 22:34:54 -08:00
parent e020318829
commit 4af7580f7a
128 changed files with 4558 additions and 2 deletions

34
packages/auth/src/did.ts Normal file
View File

@@ -0,0 +1,34 @@
/**
* DID (Decentralized Identifier) helpers
*/
export interface DIDDocument {
id: string;
'@context': string[];
verificationMethod: VerificationMethod[];
authentication: string[];
}
export interface VerificationMethod {
id: string;
type: string;
controller: string;
publicKeyMultibase?: string;
}
export class DIDResolver {
async resolve(did: string): Promise<DIDDocument> {
// Implementation for DID resolution
throw new Error('Not implemented');
}
async verifySignature(
did: string,
message: string,
signature: string
): Promise<boolean> {
// Implementation for signature verification
throw new Error('Not implemented');
}
}

View File

@@ -0,0 +1,29 @@
/**
* eIDAS (electronic IDentification, Authentication and trust Services) helpers
*/
export interface EIDASConfig {
providerUrl: string;
apiKey: string;
}
export interface EIDASSignature {
signature: string;
certificate: string;
timestamp: Date;
}
export class EIDASProvider {
constructor(private config: EIDASConfig) {}
async requestSignature(document: string): Promise<EIDASSignature> {
// Implementation for eIDAS signature request
throw new Error('Not implemented');
}
async verifySignature(signature: EIDASSignature): Promise<boolean> {
// Implementation for eIDAS signature verification
throw new Error('Not implemented');
}
}

View File

@@ -0,0 +1,8 @@
/**
* The Order Auth Package
*/
export * from './oidc';
export * from './did';
export * from './eidas';

31
packages/auth/src/oidc.ts Normal file
View File

@@ -0,0 +1,31 @@
/**
* OIDC/OAuth2 helpers
*/
export interface OIDCConfig {
issuer: string;
clientId: string;
clientSecret: string;
redirectUri: string;
}
export class OIDCProvider {
constructor(private config: OIDCConfig) {}
async getAuthorizationUrl(state: string): Promise<string> {
const params = new URLSearchParams({
client_id: this.config.clientId,
redirect_uri: this.config.redirectUri,
response_type: 'code',
scope: 'openid profile email',
state,
});
return `${this.config.issuer}/authorize?${params.toString()}`;
}
async exchangeCodeForToken(code: string): Promise<string> {
// Implementation for token exchange
throw new Error('Not implemented');
}
}