-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
AbigailDeng
authored and
AbigailDeng
committed
Jul 1, 2024
1 parent
8faef74
commit 53555f4
Showing
15 changed files
with
43 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// inquirer-search-list doesn't provide an available types | ||
declare module 'inquirer-search-list'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,17 @@ | ||
import { ec } from 'elliptic'; | ||
|
||
class Encrypt { | ||
declare class Encrypt { | ||
constructor(algorithm: string, remotePublicKey: string, random: string, cipher?: string); | ||
private keyPair: ec.KeyPair; | ||
private cipher: string; | ||
private remoteKeyPair: ec.KeyPair; | ||
private sharedKey: Buffer; | ||
private derivedKey: Buffer; | ||
|
||
/** | ||
* Encrypts the given data. | ||
* @param data - The data to be encrypted, base64 string. | ||
* @returns An object containing the encrypted result and the initialization vector (iv). | ||
*/ | ||
encrypt(data: string): { encryptedResult: string; iv: string }; | ||
|
||
/** | ||
* Decrypts the given data. | ||
* @param encrypted - The encrypted data, base64 string. | ||
* @param iv - The initialization vector, hex string. | ||
* @returns The decrypted data, base64 string. | ||
*/ | ||
decrypt(encrypted: string, iv: string): string; | ||
|
||
/** | ||
* Gets the public key. | ||
* @returns The public key in hex string format. | ||
*/ | ||
getPublicKey(): string; | ||
} | ||
export default Encrypt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Command } from 'commander'; | ||
import BaseSubCommand from '../baseSubCommand'; | ||
import Registry from '../rc/index'; | ||
import Registry from '../../rc/index'; | ||
|
||
class DeployCommand extends BaseSubCommand { | ||
declare class DappServerCommand extends BaseSubCommand { | ||
constructor(rc: Registry); | ||
run(commander: Command, ...args: any[]): Promise<void>; | ||
} | ||
|
||
export default DeployCommand; | ||
export default DappServerCommand; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export function serializeMessage(data: any): string; | ||
export function deserializeMessage(str: string): any; | ||
export function checkTimestamp(time: number | string, timeBuffer?: number): boolean; | ||
export function checkTimestamp(time: string, timeBuffer?: number): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export let userHomeDir: any; | ||
export const home: string; | ||
export function getUid(): number | null; | ||
export function isFakeRoot(): boolean; | ||
export function isWindows(): boolean; | ||
export function isRootUser(uid: number): boolean; | ||
export const ROOT_USER: boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
import { Ora } from 'ora'; | ||
import { DistinctQuestion } from 'inquirer'; | ||
export function promisify<T>(fn: (...args: any[]) => void, firstData?: boolean): (...args: any[]) => Promise<T>; | ||
export function camelCase(str: string): string; | ||
export function getContractMethods(contract?: { [key: string]: any }): string[]; | ||
export function getContractInstance(contractAddress: string, aelf: any, wallet: any, oraInstance: Ora): Promise<any>; | ||
export function getMethod(method: any, contract: any): any; | ||
export function promptTolerateSeveralTimes({ processAfterPrompt, pattern, times, prompt }: any, oraInstance: Ora): Object; | ||
export function promptTolerateSeveralTimes( | ||
{ | ||
processAfterPrompt, | ||
pattern, | ||
times, | ||
prompt | ||
}: { | ||
processAfterPrompt: Function; | ||
pattern: string | RegExp; | ||
times: number; | ||
prompt: DistinctQuestion; | ||
}, | ||
oraInstance: Ora | ||
): Promise<{ [key: string]: any }>; | ||
export function isAElfContract(str: string): boolean; | ||
export function getTxResult(aelf: any, txId: string, times?: number, delay?: number, timeLimit?: number): any; | ||
export function getTxResult(aelf: any, txId: string, times?: number, delay?: number, timeLimit?: number): Promise<any>; | ||
export function parseJSON(str?: string): any; | ||
export function randomId(): string; | ||
export function getParams(method: any): Promise<{}>; | ||
export function getParams(method: any): Promise<{ [key: string]: any }>; | ||
export function deserializeLogs(aelf: any, logs?: any[]): Promise<any>; |