1+ /// <reference types="node" />
12import local from './local' ;
23import global from './global' ;
34import publicState from './public' ;
@@ -6,7 +7,6 @@ import privateState from './private';
67import SignedMessage from './SignedMessage' ;
78import Channel from './Channel' ;
89import Node from './db/Node' ;
9- import Key from './Key' ;
1010declare const _default : {
1111 local : typeof local ;
1212 global : typeof global ;
@@ -15,7 +15,7 @@ declare const _default: {
1515 private : typeof privateState ;
1616 static : {
1717 get ( hash : string , callback : Function ) : Promise < unknown > ;
18- put ( value : any ) : Promise < string | undefined > ;
18+ put ( value : any ) : Promise < string | ArrayBuffer > ;
1919 } ;
2020 electron : Node | null ;
2121 peers : {
@@ -89,7 +89,7 @@ declare const _default: {
8989 } ;
9090 util : {
9191 gunOnceDefined : ( node : any ) => Promise < unknown > ;
92- getHash ( str : string , format ?: string ) : Promise < string | undefined > ;
92+ getHash ( data : any , format ?: string ) : Promise < string | ArrayBuffer > ;
9393 capitalize ( s : string ) : string ;
9494 generateName ( ) : string ;
9595 base64ToHex ( str : string ) : string ;
@@ -130,6 +130,28 @@ declare const _default: {
130130 SignedMessage : typeof SignedMessage ;
131131 Channel : typeof Channel ;
132132 Node : typeof Node ;
133- Key : typeof Key ;
133+ Key : {
134+ getActiveKey ( datadir ?: string , keyfile ?: string , fs ?: any ) : Promise < any > ;
135+ getDefault ( datadir ?: string , keyfile ?: string ) : Promise < any > ;
136+ getActivePub ( datadir ?: string , keyfile ?: string ) : Promise < any > ;
137+ setActiveKey ( key : any , save : boolean | undefined , datadir : string | undefined , keyfile : string | undefined , fs : any ) : void ;
138+ toString ( key : any ) : string ;
139+ getId ( key : any ) : any ;
140+ fromString ( str : string ) : any ;
141+ generate ( ) : Promise < {
142+ pub : any ;
143+ priv : any ;
144+ epub : any ;
145+ epriv : any ;
146+ } | undefined > ;
147+ keyToJwk ( key : any ) : JsonWebKey ;
148+ sign ( data : any , pair : any , cb ?: Function | undefined , opt ?: any ) : Promise < any > ;
149+ verify ( data : any , pair : any , cb ?: Function | undefined , opt ?: any ) : Promise < any > ;
150+ secret ( key : any , pair : any ) : Promise < string | undefined > ;
151+ aeskey ( key : any , salt ?: Buffer | undefined ) : Promise < CryptoKey > ;
152+ random ( len : number ) : Buffer ;
153+ encrypt ( data : any , pair : any , cb ?: Function | undefined , opt ?: any ) : Promise < any > ;
154+ decrypt ( data : any , pair : any , cb ?: Function | undefined , opt ?: any ) : Promise < any > ;
155+ } ;
134156} ;
135157export default _default ;
0 commit comments