Class: PublicKey
Hierarchy
- PublicKey
Index
Constructors
Methods
Constructors
constructor
+ new PublicKey(key
: Key, ec
: EC): PublicKey
Parameters:
Name | Type |
---|---|
key |
Key |
ec |
EC |
Returns: PublicKey
Methods
getType
▸ getType(): KeyType
Returns: KeyType
isValid
▸ isValid(): boolean
Returns: boolean
toElliptic
▸ toElliptic(): EC.KeyPair
Returns: EC.KeyPair
toLegacyString
▸ toLegacyString(): string
Returns: string
toString
▸ toString(): string
Returns: string
Static
fromElliptic
▸ fromElliptic(publicKey
: EC.KeyPair, keyType
: KeyType, ec?
: EC): PublicKey
Parameters:
Name | Type |
---|---|
publicKey |
EC.KeyPair |
keyType |
KeyType |
ec? |
EC |
Returns: PublicKey
Static
fromString
▸ fromString(publicKeyStr
: string, ec?
: EC): PublicKey
Parameters:
Name | Type |
---|---|
publicKeyStr |
string |
ec? |
EC |
Returns: PublicKey