Stellar PHP SDK API Documentation

Signer
in package

Helper class for creating signer keys used in multi-signature accounts

This class provides factory methods for creating different types of signers that can be added to Stellar accounts. Signers enable multi-signature setups and advanced authorization schemes.

Supported signer types:

  • Ed25519 public key: Standard account signer
  • SHA256 hash: Hash preimage signer for hash-locked transactions
  • Pre-authorized transaction: Specific transaction hash signer
  • Signed payload: Ed25519 key with additional signature data
Tags
see
https://developers.stellar.org

Stellar developer docs Documentation on multi-signature

Table of Contents

Methods

ed25519PublicKey()  : XdrSignerKey
Creates an Ed25519 public key signer
preAuthTx()  : XdrSignerKey
Creates a pre-authorized transaction signer from a transaction
preAuthTxHash()  : XdrSignerKey
Creates a pre-authorized transaction signer from a strkey encoded hash
sha256Hash()  : XdrSignerKey
Creates a SHA256 hash signer from a strkey encoded hash
signedPayload()  : XdrSignerKey
Creates a signed payload signer

Methods

ed25519PublicKey()

Creates an Ed25519 public key signer

public static ed25519PublicKey(KeyPair $keyPair) : XdrSignerKey
Parameters
$keyPair : KeyPair

The key pair containing the public key

Return values
XdrSignerKey

The signer key object

preAuthTx()

Creates a pre-authorized transaction signer from a transaction

public static preAuthTx(Transaction $tx, Network $network) : XdrSignerKey

This signer authorizes a specific transaction in advance. The transaction can be submitted later without requiring additional signatures.

Parameters
$tx : Transaction

The transaction to pre-authorize

$network : Network

The network for which to authorize the transaction

Return values
XdrSignerKey

The signer key object

preAuthTxHash()

Creates a pre-authorized transaction signer from a strkey encoded hash

public static preAuthTxHash(string $preAuthTxKey) : XdrSignerKey
Parameters
$preAuthTxKey : string

The transaction hash in strkey format (starts with T...)

Return values
XdrSignerKey

The signer key object

sha256Hash()

Creates a SHA256 hash signer from a strkey encoded hash

public static sha256Hash(string $sha256HashKey) : XdrSignerKey
Parameters
$sha256HashKey : string

The hash in strkey format (starts with X...)

Return values
XdrSignerKey

The signer key object

signedPayload()

Creates a signed payload signer

public static signedPayload(SignedPayloadSigner $signedPayloadSigner) : XdrSignerKey

This signer type includes an Ed25519 key along with additional payload data that must be signed. Useful for advanced signature schemes.

Parameters
$signedPayloadSigner : SignedPayloadSigner

The signed payload signer configuration

Return values
XdrSignerKey

The signer key object


        
On this page

Search results