mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
fix: type CryptoKeyPair
and rename to IGunCryptoKeyPair
This commit is contained in:
parent
273f7fce8d
commit
c59e0e95f9
6
types/chain.d.ts
vendored
6
types/chain.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import { AlwaysDisallowedType, DisallowPrimitives, DisallowArray, AckCallback, ArrayOf, ArrayAsRecord, Saveable } from './types';
|
||||
import { AlwaysDisallowedType, DisallowPrimitives, DisallowArray, AckCallback, ArrayOf, ArrayAsRecord, Saveable, IGunCryptoKeyPair } from './types';
|
||||
import { IGunConstructorOptions } from './options';
|
||||
import { ITSResolvable } from 'ts-type';
|
||||
export interface IGunChainReference<DataType = Record<string, any>, ReferenceKey = any, IsTop extends 'pre_root' | 'root' | false = false> {
|
||||
@ -217,7 +217,7 @@ export interface IGunChainReference<DataType = Record<string, any>, ReferenceKey
|
||||
epub: string;
|
||||
pub: string;
|
||||
};
|
||||
sea: CryptoKeyPair;
|
||||
sea: IGunCryptoKeyPair;
|
||||
soul: string;
|
||||
} | {
|
||||
err: string;
|
||||
@ -225,7 +225,7 @@ export interface IGunChainReference<DataType = Record<string, any>, ReferenceKey
|
||||
/**
|
||||
* Returns the key pair in the form of an object as below.
|
||||
*/
|
||||
pair(): CryptoKeyPair;
|
||||
pair(): IGunCryptoKeyPair;
|
||||
/**
|
||||
* Log out currently authenticated user. Parameters are unused in the current implementation.
|
||||
* @param opt unused in current implementation.
|
||||
|
15
types/types.d.ts
vendored
15
types/types.d.ts
vendored
@ -21,4 +21,17 @@ export declare type AckCallback = (ack: {
|
||||
err: undefined;
|
||||
ok: string;
|
||||
}) => void;
|
||||
export declare type CryptoKeyPair = Record<'pub' | 'priv' | 'epub' | 'epriv', string>;
|
||||
export declare type IGunCryptoKeyPair = Record<'pub' | 'priv' | 'epub' | 'epriv', string>;
|
||||
export interface IGunRecordNodeRawBase {
|
||||
'#': string;
|
||||
}
|
||||
export interface IGunRecordNodeRawExtra<DataType> extends IGunRecordNodeRawBase {
|
||||
'>': Record<keyof DataType, number>;
|
||||
}
|
||||
export interface IGunRecordNodeRaw<DataType> {
|
||||
'_': IGunRecordNodeRawExtra<DataType>;
|
||||
}
|
||||
export declare type IGunRecordNode<DataType> = {
|
||||
[K in keyof DataType]: IGunRecordNodeRawBase;
|
||||
} & IGunRecordNodeRaw<DataType>;
|
||||
export declare type IGunRecordData<DataType> = DataType & IGunRecordNodeRaw<DataType>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user