Used by Node.js to get textual representation of this object when it's printed with a console.log statement.
Returns a string representation of an object.
Optionallength: undefinedStaticassertAsserts that provided values is an instance of PublicKey.
StaticbufferizeStaticequalsStaticfromCreates new instance of PublicKey automatically determining the input format.
A Buffer, or Uint8Array, or hex encoded string, or something with an asUint8Array method on it
PublicKey
StaticfromStaticfromStatichashTo be used with ComplexMap and ComplexSet. Returns a scalar representation for this key.
StaticisTests if provided values is an instance of PublicKey.
StaticrandomCreates a new key.
StaticrandomStaticrandomStaticsafeSame as PublicKey.from but does not throw and instead returns a { key: PublicKey } or { error: Error }
Optionalsource: PublicKeyLikeSame PublicKeyLike argument as for PublicKey.from
PublicKey
Staticstringify
The purpose of this class is to assure consistent use of keys throughout the project. Keys should be maintained as buffers in objects and proto definitions, and converted to hex strings as late as possible (eg, to log/display).