Attributes
- Companion
- trait
- Source
- PublicKey.scala
- Graph
-
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
PublicKey.type
Members list
Type members
Classlikes
Public key representation wrapping a BouncyCastle EC point.
Public key representation wrapping a BouncyCastle EC point.
Lazily computes and caches x/y coordinates and byte array when needed.
Value parameters
- p
-
BouncyCastle elliptic curve point
Attributes
- Source
- PublicKey.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait PublicKeytrait PublicKeyLikeclass Objecttrait Matchableclass AnyShow all
Public key representation storing explicit x and y coordinates.
Public key representation storing explicit x and y coordinates.
Lazily computes and caches the BouncyCastle EC point when needed.
Value parameters
- x
-
x-coordinate as 32-byte datatype.UInt256
- y
-
y-coordinate as 32-byte datatype.UInt256
Attributes
- Source
- PublicKey.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait PublicKeytrait PublicKeyLikeclass Objecttrait Matchableclass AnyShow all
Inherited and Abstract types
The names of the product elements
The name of the type
Value members
Concrete methods
Decodes a public key from a 64-byte array (x||y).
Decodes a public key from a 64-byte array (x||y).
Value parameters
- array
-
64-byte array: x (32 bytes) || y (32 bytes), big-endian
Attributes
- Returns
-
Right(PublicKey) on success, Left(failure) if array length is not 64 or coordinates are invalid
- Source
- PublicKey.scala
Constructs a public key from a BouncyCastle EC point.
Constructs a public key from a BouncyCastle EC point.
Value parameters
- p
-
elliptic curve point
Attributes
- Returns
-
public key with Point representation
- Note
-
Used internally when deriving keys from private keys or recovering from signatures
- Source
- PublicKey.scala
Constructs a public key from x and y coordinates.
Constructs a public key from x and y coordinates.
Value parameters
- x
-
x-coordinate as datatype.UInt256
- y
-
y-coordinate as datatype.UInt256
Attributes
- Returns
-
public key with PublicKey.XY representation
- Source
- PublicKey.scala
Givens
Givens
cats.Eq instance comparing public keys by their (x, y) coordinates.
cats.Eq instance comparing public keys by their (x, y) coordinates.
Attributes
- Source
- PublicKey.scala
Default Hash instance for public keys, using Keccak-256 over the 64-byte representation.
Default Hash instance for public keys, using Keccak-256 over the 64-byte representation.
Attributes
- Source
- PublicKey.scala
codec.byte.ByteDecoder instance that deserializes a public key from 64 bytes (x||y).
codec.byte.ByteDecoder instance that deserializes a public key from 64 bytes (x||y).
Attributes
- Source
- PublicKey.scala
codec.byte.ByteEncoder instance that serializes a public key to 64 bytes (x||y).
codec.byte.ByteEncoder instance that serializes a public key to 64 bytes (x||y).
Attributes
- Source
- PublicKey.scala