@yubing744/rooch-sdk
Version:
37 lines (36 loc) • 1.04 kB
TypeScript
/**
* Value to be converted into public key.
*/
export type PublicKeyInitData = string | Uint8Array | Iterable<number>;
export declare function bytesEqual(a: Uint8Array, b: Uint8Array): boolean;
/**
* A public key
*/
export declare abstract class PublicKey {
/**
* Checks if two public keys are equal
*/
equals(publicKey: PublicKey): boolean;
/**
* Return the base-64 representation of the public key
*/
toBase64(): string;
/**
* Return the Rooch representation of the public key encoded in
* base-64. A Rooch public key is formed by the concatenation
* of the scheme flag with the raw bytes of the public key
*/
toRoochPublicKey(): string;
/**
* Return the byte array representation of the public key
*/
abstract toBytes(): Uint8Array;
/**
* Return the Rooch address associated with this public key
*/
abstract toRoochAddress(): string;
/**
* Return signature scheme flag of the public key
*/
abstract flag(): number;
}