Repository navigation
This release completes Protocol 30 support and closes issue #175, "SDK Updates for Protocol 30 Compatibility". Version 1.16.0 shipped the Protocol 30 XDR: muxed contract addresses (CAP-0084), the ML-DSA cost types (CAP-0087), and millisecond close times (CAP-0088). That XDR comes from stellar-xdr commit 579a90b on the curr branch, which matches the v30.0 tag (4f524bb) in every production definition. This release adds the Horizon 30 fields of contract credited effects. Its invoke, load, and getContractData calls reject a muxed contract id before any request, and getContractData also a key that holds a muxed address. In addition, it fixes the defects of the Q4 2026 hardening round in the payments stream (#178), the getEvents indexes (#182), stellar.toml field types (#184), the LedgerEntry extension (#186), and ContractSpec unsigned inputs (#188). From the same round, SorobanServer and URIScheme accept a Guzzle client from the application (#180). Two more fixes end a PHP warning in the SEP-6 client and a deprecation in the TxRep parser.
Protocol 30
ContractCreditedEffectResponse gains getContractMuxed() and getContractMuxedId() for a transfer or mint to a muxed contract address, as Horizon 30 reports it (#174). They return the W... strkey and the muxed id as a decimal string, and null for other credits.
These calls take a contract as a C... strkey or 64 hexadecimal characters. Any other id throws InvalidArgumentException before a request goes out (#177).
- The contract to invoke: the
InvokeContractHostFunctionconstructor andsetContractId, andAssembledTransaction::buildandbuildWithOp. - The contract to load:
SorobanServer::loadContractCodeForContractIdandloadContractInfoForContractId, andSorobanClient::forClientOptions. - The contract data owner:
SorobanServer::getContractData.
In 1.16.0 the invoke calls accepted any id, and the load and getContractData calls rejected a non-contract id with a less specific message. The new message names the role and, for a known address, the kind of the id. For a muxed contract it ends with the advice to pass the base C... address:
The contract to invoke must be a contract (C...) address, got a muxed contract (W...) address: W...; use its base contract (C...) address
getContractData also rejects a key with a muxed address at any depth within vectors and maps before the request:
Contract data keys cannot contain muxed account (M...) or muxed contract (W...) addresses
InvokeContractHostFunction::fromXdr and toXdr decode and encode an invoke target of every address kind.
This release deprecates EventInfo::$inSuccessfulContractCall with its getter and setter, because Stellar RPC 30 and later omit the field. The SDK reads it from servers that send it.
Added
SorobanServerandURISchemetake an optional GuzzleClientas their last constructor parameter (#180).SorobanServersends its RPC requests through it, andURISchemeits stellar.toml fetches and callback submissions, so an application can set timeouts, proxies, and middleware.
Fixed
InvokeContractHostFunction::toXdrthrowsInvalidArgumentExceptionwhen the publiccontractIdproperty names no address (#177). The message shows the id, or only its kind for a secret seed. In 1.16.0 it raised a PHPError.TransferServerService::transactionthrowsInvalidArgumentExceptionfor a SEP-6 response without atransactionobject, and the message names the keys received (#176). In 1.16.0 a missingtransactionkey raised a PHP warning and aTypeError.TxRepHelper::unescapeStringpasses a\xescape without two hex digits through literally (#176). In 1.16.0 a pair of non-hex characters after\xraised a PHP deprecation.PaymentsRequestBuilder::streamdeliversinvoke_host_functionrecords, which carry Stellar Asset Contract transfers, asInvokeHostFunctionOperationResponse(#178). In 1.16.0 such a record ended the stream with anUnhandledMatchError.EventInforeads theoperationIndexandtransactionIndexfields that stellar-rpc sends, sogetOpIndex()andgetTxIndex()return them for each event ofSorobanServer::getEvents(#182). In 1.16.0 both returned null.- For a field of the wrong type, the
StellarTomlconstructor,fromDomain, andcurrencyFromUrlthrow anExceptionthat names the field and the type found (#184). In 1.16.0 they raised aTypeError. currencyFromUrlthrows anExceptionfor a currency file with no fields, andStellarTomlfor a non-emptyDOCUMENTATIONlist (#184). In 1.16.0 the empty file raised aTypeErrorand the list vanished silently.LedgerEntryreads the entry extension from theextXdrkey thatgetLedgerEntriesreturns, sogetExt()returns it (#186). In 1.16.0 it returned null.ContractSpec::nativeToXdrSCValconverts u64, timepoint, and duration values from non-negative integers and decimal strings up to 18446744073709551615 (#188). A prebuiltXdrSCValpasses through, and any other value throwsInvalidArgumentException. In 1.16.0 the native conversion of u64 took only PHP integers, and timepoint and duration took no native value.
Other changes
- The user documentation and the agent skill describe this release. They cover the contract id and key rules of
getContractData, the optional Guzzle client, and the six response classes of the payments stream. They also name the new stellar.toml and SEP-6 errors, list the unsigned 64-bit inputs ofContractSpec, and attribute theW...strkey to SEP-23. The offer and effect examples callgetOfferId(),Asset::canonicalForm(), andgetHumanReadableEffectType(). - The 25 compatibility matrices are regenerated for 1.17.0 with Horizon v30.0.0 and stellar-rpc v30.0.0 as targets; every matrix reports 100 percent coverage. The SEP-23 matrix assesses revision 1.4.0 with the muxed contract key type and its seven test vectors (#173).
- The agent skill is version 1.9.0, and its regenerated API reference lists the new effect accessors and the optional client parameters.
- The CI workflows pin
anthropics/claude-code-actionv1.0.261 andactions/setup-pythonv7.1.0.
Compatibility
The SDK requires PHP 8.1 or higher with the bcmath, gmp, mbstring, and sodium extensions. CI tests PHP 8.1 to 8.5.
"require": {
"soneso/stellar-php-sdk": "^1.17.0"
}Protocol 30 XDR: stellar-xdr 579a90b (curr), equal to the v30.0 tag 4f524bb except for one test-only struct behind TEST_FEATURE.
References
- Full change list: CHANGELOG
- Protocol 30: issue #175