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.
Optional
length: undefinedStatic
assertAsserts that provided values is an instance of PublicKey.
Static
bufferizeStatic
equalsStatic
fromCreates 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
Static
fromStatic
fromStatic
hashTo be used with ComplexMap and ComplexSet. Returns a scalar representation for this key.
Static
isTests if provided values is an instance of PublicKey.
Static
randomCreates a new key.
Static
randomStatic
randomStatic
safeSame as PublicKey.from
but does not throw and instead returns a { key: PublicKey }
or { error: Error }
Optional
source: PublicKeyLikeSame PublicKeyLike argument as for PublicKey.from
PublicKey
Static
stringify
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).