From cd8e8c6489c41f435674bfe0d7e6d71610031247 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 9 Sep 2022 04:19:58 -0400 Subject: [PATCH] *Update dist --- dist/index.d.ts | 76 ++++++++++++++++++++++++--------------------- dist/index.d.ts.map | 2 +- 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index a61b486..6e189d7 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -25,6 +25,43 @@ export interface StreamFileResponse { data?: Uint8Array; done: boolean; } +export declare type DnsProvider = (ipAddress: string) => Promise; +export declare type PluginFunction = (api: PluginAPI) => Promise; +export interface Plugin { + name: string; + plugin: PluginFunction; + exports?: any; + default?: Plugin; +} +export declare type RPCStreamHandler = ( + stream: AsyncIterable +) => Promise; +export declare type OverwriteDataFn = (newData: Uint8Array) => Promise; +export declare type ReadDataFn = () => Promise<[Uint8Array, Err]>; +export interface IndependentFileSmallMetadata { + largestHistoricSize: bigint; +} +export interface IndependentFileSmall { + dataKey: Uint8Array; + fileData: Uint8Array; + inode: string; + keypair: Ed25519Keypair; + metadata: IndependentFileSmallMetadata; + revision: bigint; + seed: Uint8Array; + skylink: string; + viewKey: string; + overwriteData: OverwriteDataFn; + readData: ReadDataFn; +} +export interface SslData { + cert?: Uint8Array; + key?: Uint8Array; +} +export interface SavedSslData { + cert?: IndependentFileSmall; + key?: IndependentFileSmall; +} export interface PluginAPI { config: any; registerMethod: (methodName: string, method: RPCMethod) => void; @@ -61,43 +98,10 @@ export interface PluginAPI { newData: Uint8Array ): Promise; }; + dns: { + setProvider(provider: DnsProvider): void; + }; logger: Logger; getSeed: () => Uint8Array; } -export declare type PluginFunction = (api: PluginAPI) => Promise; -export interface Plugin { - name: string; - plugin: PluginFunction; - exports?: any; - default?: Plugin; -} -export declare type RPCStreamHandler = ( - stream: AsyncIterable -) => Promise; -export declare type OverwriteDataFn = (newData: Uint8Array) => Promise; -export declare type ReadDataFn = () => Promise<[Uint8Array, Err]>; -export interface IndependentFileSmallMetadata { - largestHistoricSize: bigint; -} -export interface IndependentFileSmall { - dataKey: Uint8Array; - fileData: Uint8Array; - inode: string; - keypair: Ed25519Keypair; - metadata: IndependentFileSmallMetadata; - revision: bigint; - seed: Uint8Array; - skylink: string; - viewKey: string; - overwriteData: OverwriteDataFn; - readData: ReadDataFn; -} -export interface SslData { - cert?: Uint8Array; - key?: Uint8Array; -} -export interface SavedSslData { - cert?: IndependentFileSmall; - key?: IndependentFileSmall; -} //# sourceMappingURL=index.d.ts.map diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index 61a74dc..a6e3e7e 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;CACX;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CACP,OAAO,EAAE,UAAU,EACnB,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,KAAK,IAAI,KACpD,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAClC;AAED,MAAM,W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