Rename types.d.ts -> types.ts (#262)

This commit is contained in:
Jaco Greeff
2018-11-29 11:54:25 +01:00
committed by GitHub
parent 2b6f9d5d09
commit e3b45e7617
12 changed files with 21 additions and 21 deletions
@@ -16,5 +16,5 @@ export type Chainspec = {
[index: string]: string
},
protocolId: null,
telemetryUrl: string,
telemetryUrl: string
};
@@ -11,7 +11,7 @@ export type ProgressValue = {
export type ProgressCb = (progress: ProgressValue) => void;
export type BaseDbOptions = {
isCompressed?: boolean,
isCompressed?: boolean
};
export interface BaseDb {
@@ -6,7 +6,7 @@ import { Prefix } from './address/types';
export type KeyringPair$Meta = {
[index: string]: any
}
};
export type KeyringPair$Json = {
address: string,
@@ -34,25 +34,25 @@ export type KeyringPair = {
};
export interface KeyringPairs {
add: (pair: KeyringPair) => KeyringPair,
all: () => Array<KeyringPair>,
get: (address: string | Uint8Array) => KeyringPair,
remove: (address: string | Uint8Array) => void
add: (pair: KeyringPair) => KeyringPair;
all: () => Array<KeyringPair>;
get: (address: string | Uint8Array) => KeyringPair;
remove: (address: string | Uint8Array) => void;
}
export interface KeyringInstance {
decodeAddress (encoded: string | Uint8Array): Uint8Array,
encodeAddress (key: Uint8Array | string): string,
setAddressPrefix (prefix: Prefix): void,
decodeAddress (encoded: string | Uint8Array): Uint8Array;
encodeAddress (key: Uint8Array | string): string;
setAddressPrefix (prefix: Prefix): void;
addPair (pair: KeyringPair): KeyringPair,
addFromAddress (address: string | Uint8Array, meta?: KeyringPair$Meta): KeyringPair,
addFromMnemonic (mnemonic: string, meta?: KeyringPair$Meta): KeyringPair,
addFromSeed (seed: Uint8Array, meta?: KeyringPair$Meta): KeyringPair,
addFromJson (pair: KeyringPair$Json): KeyringPair,
getPair (address: string | Uint8Array): KeyringPair,
getPairs (): Array<KeyringPair>,
getPublicKeys (): Array<Uint8Array>,
removePair (address: string | Uint8Array): void,
toJson (address: string | Uint8Array, passphrase?: string): KeyringPair$Json
addPair (pair: KeyringPair): KeyringPair;
addFromAddress (address: string | Uint8Array, meta?: KeyringPair$Meta): KeyringPair;
addFromMnemonic (mnemonic: string, meta?: KeyringPair$Meta): KeyringPair;
addFromSeed (seed: Uint8Array, meta?: KeyringPair$Meta): KeyringPair;
addFromJson (pair: KeyringPair$Json): KeyringPair;
getPair (address: string | Uint8Array): KeyringPair;
getPairs (): Array<KeyringPair>;
getPublicKeys (): Array<Uint8Array>;
removePair (address: string | Uint8Array): void;
toJson (address: string | Uint8Array, passphrase?: string): KeyringPair$Json;
}
@@ -5,6 +5,6 @@
export type DecodeOutput = {
decoded: Uint8Array | Array<any>,
remainder: Uint8Array
}
};
export type DecodeFunc = (input: Uint8Array) => DecodeOutput;