swtc-factory
Version:
swtc base lib factory
41 lines (40 loc) • 1.01 kB
TypeScript
declare class KeyPairs {
static KEYPAIRS: {};
readonly _token: any;
constructor(token?: string);
/**
* get corresponding Keypair for its _token
*/
keyPairs(): any;
/**
* generate random bytes and encode it to secret
* @returns {string}
*/
generateSeed(options: any): any;
/**
* derive keypair from secret
* @param {string} secret
* @returns {{privateKey: string, publicKey: *}}
*/
deriveKeyPair(secret: any): any;
/**
* derive wallet address from publickey
* @param {string} publicKey
* @returns {string}
*/
deriveAddress(publicKey: any): any;
/**
* check is address is valid
* @param address
* @returns {boolean}
*/
checkAddress(address: any): any;
/**
* convert the given address to byte array
* @param address
* @returns byte array
*/
convertAddressToBytes(address: any): any;
convertBytesToAddress(bytes: any): any;
}
export { KeyPairs };