# PublicKey
Represents a public key object storing either a K1, R1 or WebAuthN key
# Constructor
constructor( keyType: PublicKeyType = PublicKeyType.K1, data: u8[] | null = null )keyType- Type of public keydata- Data bytes of public key
# Fields
var keyType: PublicKeyType;Uses PublicKeyType enum where:
enum PublicKeyType { K1 = 0, R1 = 1, WebAuthN = 2 }var k1: ECCPublicKey | null;ECCPublicKey object is type is K1, null by default
var r1: ECCPublicKey | null;ECCPublicKey object is type is R1, null by default
var k1: ECCPublicKey | null;ECCPublicKey object is type is K1, null by default
var webAuthN: WebAuthNPublicKey | null;WebAuthNPublicKey object is type is WebAuthN, null by default
# Instance Methods
- Prints the hex representation of the public key bytes. Note this will not print prefixes like PUB_K1, those are client-side
static function toString(): string
# Static Equality methods
static function eq(a: PublicKey, b: PublicKey): boolChecks that the two public keys are equal
static function neq(a: PublicKey, b: PublicKey): boolChecks that the two public keys are not equal
static function gt(a: PublicKey, b: PublicKey): boolChecks whether public key a is larger than public key b
static function lt(a: PublicKey, b: PublicKey): boolChecks whether public key a is less than public key b