@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
41 lines (37 loc) • 1.1 kB
JavaScript
import { DEFAULT_SKEW_TIME } from "../crypto/jose/jwt/JwtPayload.mjs";
import { LogLevel } from "../logger/Logger.mjs";
import { ConsoleLogger } from "../logger/ConsoleLogger.mjs";
//#region src/agent/AgentConfig.ts
var AgentConfig = class AgentConfig {
constructor(initConfig, agentDependencies) {
this.initConfig = initConfig;
this.logger = initConfig.logger ?? new ConsoleLogger(LogLevel.Off);
this.agentDependencies = agentDependencies;
}
get allowInsecureHttpUrls() {
return this.initConfig.allowInsecureHttpUrls ?? false;
}
get autoUpdateStorageOnStartup() {
return this.initConfig.autoUpdateStorageOnStartup ?? false;
}
get validitySkewSeconds() {
return this.initConfig.validitySkewSeconds ?? DEFAULT_SKEW_TIME;
}
extend(config) {
return new AgentConfig({
...this.initConfig,
logger: this.logger,
...config
}, this.agentDependencies);
}
toJSON() {
return {
...this.initConfig,
logger: this.logger.logLevel,
agentDependencies: Boolean(this.agentDependencies)
};
}
};
//#endregion
export { AgentConfig };
//# sourceMappingURL=AgentConfig.mjs.map