Stellar PHP SDK API Documentation

SEP30RequestIdentity

Identity information for SEP-30 account recovery registration requests.

Represents a person or entity that can authenticate to gain control of an account. Each identity has a role and one or more authentication methods.

IDENTITY ROLES: Roles are client-defined labels that describe the relationship between the identity and the account. The server stores but does not validate roles - they are returned in responses to help users understand their relationship to the account.

Common role examples:

  • "owner": The primary account owner (single-user recovery scenario)
  • "sender": Person sharing the account (account sharing scenario)
  • "receiver": Person receiving shared account access (account sharing scenario)
  • "device": Specific device for multi-device access scenarios

USE CASES:

Single-Party Recovery:

  • One identity with role "owner"
  • Multiple authentication methods for the owner (phone, email, stellar address)
  • Enables account recovery if the owner loses their private key

Account Sharing:

  • Multiple identities with different roles (e.g., "sender", "receiver")
  • Each identity has their own authentication methods
  • Both parties can recover the shared account
  • Useful for shared accounts between family members or business partners

Multi-Device Access:

  • Multiple identities with role "device" or device-specific roles
  • Each device has separate authentication methods
  • Enables recovery from any registered device
Tags
see
https://github.com/stellar/stellar-protocol/blob/v0.8.1/ecosystem/sep-0030.md#common-request-fields
see
SEP30AuthMethod
see
SEP30Request
see
RecoveryService

Table of Contents

Properties

$authMethods  : array<string|int, mixed>
$role  : string

Methods

__construct()  : mixed
Constructs a new identity for account recovery.
getAuthMethods()  : array<string|int, SEP30AuthMethod>
Gets the authentication methods for this identity.
getRole()  : string
Gets the identity role.
setAuthMethods()  : void
Sets the authentication methods for this identity.
setRole()  : void
Sets the identity role.
toJson()  : array<string|int, mixed>

Properties

Methods

__construct()

Constructs a new identity for account recovery.

public __construct(string $role, array<string|int, SEP30AuthMethod$authMethods) : mixed
Parameters
$role : string

The identity role (e.g., "owner", "sender", "receiver"). Client-defined value describing relationship to account.

$authMethods : array<string|int, SEP30AuthMethod>

Array of authentication methods for this identity. Must contain at least one method.

getRole()

Gets the identity role.

public getRole() : string
Return values
string

The role (e.g., "owner", "sender", "receiver").

setAuthMethods()

Sets the authentication methods for this identity.

public setAuthMethods(array<string|int, SEP30AuthMethod$authMethods) : void
Parameters
$authMethods : array<string|int, SEP30AuthMethod>

Array of authentication methods. Must contain at least one method.

setRole()

Sets the identity role.

public setRole(string $role) : void
Parameters
$role : string

The role (e.g., "owner", "sender", "receiver"). Client-defined value describing relationship to account.

toJson()

public toJson() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results