Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public final class Slip10

  1. Object
  2. Slip10

SLIP-10 key derivation for Ed25519, the scheme Solana, Stellar, Cardano-style and Aptos/Sui wallets use on a Mnemonic seed. Ed25519 has no public derivation, so every index is hardened: m/44'/501'/0'/0' is the usual Solana account.

(SLIP-10 over secp256k1 is BIP-32 itself; use Bip32 for that curve.)

Methods

public static Slip10 master(byte[] seed)The master node of a seed (16 to 64 bytes).
public Slip10 child(long index)The hardened child at index.
public Slip10 derive(String path)Derives along a path such as m/44'/501'/0'/0'.
public Slip10 derive(DerivationPath path)Derives along a path; every index is taken as hardened.
public byte[] privateKey()A copy of the 32-byte Ed25519 private key (the RFC 8032 seed).
public byte[] publicKey()The 32-byte Ed25519 public key.
public byte[] chainCode()A copy of the 32-byte chain code.
public int depth()The distance from the master node.
public long childNumber()The hardened index this node was derived with.
public int parentFingerprint()The parent’s fingerprint; 0 for the master node.
public int fingerprint()The first four bytes of HASH160(0x00 || publicKey), as SLIP-10 defines it.
public void destroy()Wipes the private key and chain code.

Inherited methods

Method details

master

public static Slip10 master(byte[] seed)
The master node of a seed (16 to 64 bytes).

child

public Slip10 child(long index)
The hardened child at index. An index below DerivationPath.HARDENED is hardened for you, since Ed25519 has no other kind.

derive

public Slip10 derive(String path)
Derives along a path such as m/44'/501'/0'/0'.

derive

public Slip10 derive(DerivationPath path)
Derives along a path; every index is taken as hardened.

privateKey

public byte[] privateKey()
A copy of the 32-byte Ed25519 private key (the RFC 8032 seed). Wipe it after use.

publicKey

public byte[] publicKey()
The 32-byte Ed25519 public key.

chainCode

public byte[] chainCode()
A copy of the 32-byte chain code.

depth

public int depth()
The distance from the master node.

childNumber

public long childNumber()
The hardened index this node was derived with.

parentFingerprint

public int parentFingerprint()
The parent’s fingerprint; 0 for the master node.

fingerprint

public int fingerprint()
The first four bytes of HASH160(0x00 || publicKey), as SLIP-10 defines it.

destroy

public void destroy()
Wipes the private key and chain code.