Class PrivateKey

java.lang.Object
org.xrpl.xrpl4j.crypto.keys.PrivateKey
All Implemented Interfaces:
Destroyable, PrivateKeyable

public class PrivateKey extends Object implements PrivateKeyable, Destroyable
A typed instance of an XRPL private-key.
  • Field Details

    • PREFIX

      @Deprecated public static final UnsignedByte PREFIX
      Deprecated.
      This value will be removed in a future version. Prefer ED2559_PREFIX or SECP256K1_PREFIX instead.
      A one-byte prefix for ed25519 keys.
    • ED2559_PREFIX

      public static final UnsignedByte ED2559_PREFIX
      Private keys (whether from the ed25519 or secp256k1 curves) have 32 bytes naturally. At the same time, secp256k1 public keys have 33 bytes naturally, whereas ed25519 public keys have 32 bytes naturally. Because of this, in XRPL, ed25519 public keys are prefixed with a one-byte prefix (i.e., 0xED). For consistency, this library (and other XRPL tooling) also prepends all private keys with artificial prefixes (0xED for ed25519 or 0x00 for secp256k1). This value is the one-byte prefix for ed25519 keys.
    • SECP256K1_PREFIX

      public static final UnsignedByte SECP256K1_PREFIX
      Private keys (whether from the ed25519 or secp256k1 curves) have 32 bytes naturally. At the same time, secp256k1 public keys have 33 bytes naturally, whereas ed25519 public keys have 32 bytes naturally. Because of this, in XRPL, ed25519 public keys are prefixed with a one-byte prefix (i.e., 0xED). For consistency, this library (and other XRPL tooling) also prepends all private keys with artificial prefixes (0xED for ed25519 or 0x00 for secp256k1). This value is the one-byte prefix for secp256k1 keys.
  • Method Details