@hasna/wallets 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ export declare function cached<T>(key: string, ttlMs: number, fn: () => T): T;
2
+ export declare function cacheClear(prefix?: string): void;
3
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/lib/cache.ts"],"names":[],"mappings":"AAOA,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQpE;AAED,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAQhD"}
@@ -1,8 +1,15 @@
1
- export interface WalletsConfig {
2
- default_provider?: string;
3
- default_currency?: string;
4
- providers?: Record<string, Record<string, unknown>>;
5
- }
1
+ import { z } from 'zod';
2
+ export declare const WalletsConfigSchema: z.ZodObject<{
3
+ default_provider: z.ZodOptional<z.ZodString>;
4
+ default_currency: z.ZodOptional<z.ZodString>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ default_provider?: string | undefined;
7
+ default_currency?: string | undefined;
8
+ }, {
9
+ default_provider?: string | undefined;
10
+ default_currency?: string | undefined;
11
+ }>;
12
+ export type WalletsConfig = z.infer<typeof WalletsConfigSchema>;
6
13
  export declare function getConfigDir(): string;
7
14
  export declare function getConfigPath(): string;
8
15
  export declare function loadConfig(): WalletsConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,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AI/D"}
@@ -1,3 +1,3 @@
1
- import type { DoctorResult } from "../types/index.js";
2
- export declare function runDoctor(): DoctorResult;
1
+ import type { DoctorResult } from '../types/index.js';
2
+ export declare function runDoctor(fix?: boolean): DoctorResult;
3
3
  //# sourceMappingURL=doctor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/lib/doctor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKnE,wBAAgB,SAAS,IAAI,YAAY,CA2HxC"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/lib/doctor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQnE,wBAAgB,SAAS,CAAC,GAAG,UAAQ,GAAG,YAAY,CAiJnD"}
@@ -1,7 +1,16 @@
1
- import type { Card, Provider, Transaction, DoctorCheck } from "../types/index.js";
1
+ import type { Card, DoctorCheck, Provider, Transaction } from '../types/index.js';
2
2
  export declare function formatCard(card: Card): string;
3
3
  export declare function formatProvider(provider: Provider): string;
4
4
  export declare function formatTransaction(tx: Transaction): string;
5
5
  export declare function formatDoctorCheck(check: DoctorCheck): string;
6
- export declare function formatError(error: unknown): string;
6
+ export declare function formatError(error: unknown, includeStack?: boolean): string;
7
+ export interface StructuredError {
8
+ timestamp: string;
9
+ type: string;
10
+ code: string;
11
+ message: string;
12
+ suggestion?: string;
13
+ stack?: string;
14
+ }
15
+ export declare function formatErrorStructured(error: unknown, includeStack?: boolean): StructuredError;
7
16
  //# sourceMappingURL=format.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAWlF,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAI7C;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEzD;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAIzD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAG5D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CA0BlD"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,WAAW,EACX,MAAM,mBAAmB,CAAC;AAW3B,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAO7C;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEzD;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAIzD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAI5D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,UAAQ,GAAG,MAAM,CAExE;AAED,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,OAAO,EACd,YAAY,UAAQ,GAClB,eAAe,CAwFjB"}
@@ -0,0 +1,25 @@
1
+ export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
2
+ export interface LogEntry {
3
+ timestamp: string;
4
+ level: LogLevel;
5
+ message: string;
6
+ [key: string]: unknown;
7
+ }
8
+ export interface Logger {
9
+ debug(message: string, meta?: Record<string, unknown>): void;
10
+ info(message: string, meta?: Record<string, unknown>): void;
11
+ warn(message: string, meta?: Record<string, unknown>): void;
12
+ error(message: string, meta?: Record<string, unknown>): void;
13
+ }
14
+ declare class ConsoleLogger implements Logger {
15
+ private minLevel;
16
+ private readonly levelPriority;
17
+ constructor(minLevel?: LogLevel);
18
+ debug(message: string, meta?: Record<string, unknown>): void;
19
+ info(message: string, meta?: Record<string, unknown>): void;
20
+ warn(message: string, meta?: Record<string, unknown>): void;
21
+ error(message: string, meta?: Record<string, unknown>): void;
22
+ }
23
+ export declare const logger: ConsoleLogger;
24
+ export { ConsoleLogger };
25
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,QAAQ;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,MAAM;IACtB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI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