Stellar PHP SDK API Documentation

XdrAccountID extends XdrAccountIDBase
in package

Table of Contents

Properties

$accountID  : XdrPublicKey

Methods

__construct()  : mixed
Constructor.
decode()  : static
encode()  : string
fromAccountId()  : XdrAccountID
Creates a new XdrAccountID from the passed stellar account id.
fromBase64Xdr()  : static
fromTxRep()  : static
Deserialize from a compact StrKey account ID string (G...).
getAccountId()  : string
toBase64Xdr()  : string
toTxRep()  : void
Serialize as a compact StrKey account ID string (G...).

Properties

Methods

__construct()

Constructor.

public __construct(string $accountId) : mixed
Parameters
$accountId : string

Base32 encoded public key/account id starting with G

fromAccountId()

Creates a new XdrAccountID from the passed stellar account id.

public static fromAccountId(string $accountId) : XdrAccountID
Parameters
$accountId : string

Base32 encoded public key/account id starting with G

Return values
XdrAccountID

fromBase64Xdr()

public static fromBase64Xdr(string $xdr) : static
Parameters
$xdr : string
Return values
static

fromTxRep()

Deserialize from a compact StrKey account ID string (G...).

public static fromTxRep(array<string, string> $map, string $prefix) : static
Parameters
$map : array<string, string>

Parsed TxRep map.

$prefix : string

Key prefix.

Tags
throws
InvalidArgumentException

If the value is missing or invalid.

Return values
static

getAccountId()

public getAccountId() : string
Return values
string

Base32 encoded public key/account id starting with G

toTxRep()

Serialize as a compact StrKey account ID string (G...).

public toTxRep(string $prefix, array<string, string> &$lines) : void

Overrides the generated base method, which would expand the inner XdrPublicKey sub-fields. SEP-0011 requires a single G... value.

Parameters
$prefix : string

Key prefix for the TxRep map.

$lines : array<string, string>

Output map (modified in place).


        
On this page

Search results