UNPKG

740 BTypeScriptView Raw
1export namespace Cred {
2 const enum TYPE {
3 USERPASS_PLAINTEXT = 1,
4 SSH_KEY = 2,
5 SSH_CUSTOM = 4,
6 DEFAULT = 8,
7 SSH_INTERACTIVE = 16,
8 USERNAME = 32,
9 SSH_MEMORY = 64,
10 }
11}
12
13export class Cred {
14 static defaultNew(): Cred;
15 static sshKeyFromAgent(username: string): Cred;
16 static sshKeyMemoryNew(username: string, publicKey: string, privateKey: string, passphrase: string): Promise<Cred>;
17 static sshKeyNew(username: string, publicKey: string, privateKey: string, passphrase: string): Cred;
18 static usernameNew(username: string): Promise<Cred>;
19 static userpassPlaintextNew(username: string, password: string): Cred;
20
21 hasUsername(): number;
22
23 free(): void;
24}