Stellar PHP SDK API Documentation

CryptoKeyType
in package

Represents the type of cryptographic key used in Stellar

Stellar supports multiple key types for different purposes:

  • ED25519: Standard Ed25519 public key for signing transactions
  • PRE_AUTH_TX: Pre-authorized transaction hash
  • HASH_X: Hash of a preimage used for hash-locked transactions
  • ED25519_SIGNED_PAYLOAD: Ed25519 key with additional payload signature
  • MUXED_ED25519: Multiplexed Ed25519 account (virtual accounts)
Tags
see
https://developers.stellar.org

Stellar developer docs Documentation on signature types

Table of Contents

Constants

KEY_TYPE_ED25519  = 0
KEY_TYPE_ED25519_SIGNED_PAYLOAD  = 3
KEY_TYPE_HASH_X  = 2
KEY_TYPE_MUXED_ED25519  = 256
KEY_TYPE_PRE_AUTH_TX  = 1

Methods

__construct()  : mixed
CryptoKeyType constructor
fromXdr()  : CryptoKeyType
Creates a CryptoKeyType from XDR encoded data
toXdr()  : string
Encodes the key type to XDR format

Constants

KEY_TYPE_ED25519_SIGNED_PAYLOAD

public mixed KEY_TYPE_ED25519_SIGNED_PAYLOAD = 3

KEY_TYPE_MUXED_ED25519

public mixed KEY_TYPE_MUXED_ED25519 = 256

Methods

__construct()

CryptoKeyType constructor

public __construct(int $value) : mixed
Parameters
$value : int

The numeric value of the key type

fromXdr()

Creates a CryptoKeyType from XDR encoded data

public static fromXdr(string $xdr) : CryptoKeyType
Parameters
$xdr : string

The XDR encoded key type

Return values
CryptoKeyType

The decoded key type

toXdr()

Encodes the key type to XDR format

public toXdr() : string
Return values
string

The XDR encoded key type


        
On this page

Search results