Skip to content

v1.17.0 - Protocol 30 Horizon effect fields and muxed contract guards

Latest

Choose a tag to compare

@christian-rogobete christian-rogobete released this 24 Oct 18:59
92b32b9

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 InvokeContractHostFunction constructor and setContractId, and AssembledTransaction::build and buildWithOp.
  • The contract to load: SorobanServer::loadContractCodeForContractId and loadContractInfoForContractId, and SorobanClient::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

  • SorobanServer and URIScheme take an optional Guzzle Client as their last constructor parameter (#180). SorobanServer sends its RPC requests through it, and URIScheme its stellar.toml fetches and callback submissions, so an application can set timeouts, proxies, and middleware.

Fixed

  • InvokeContractHostFunction::toXdr throws InvalidArgumentException when the public contractId property names no address (#177). The message shows the id, or only its kind for a secret seed. In 1.16.0 it raised a PHP Error.
  • TransferServerService::transaction throws InvalidArgumentException for a SEP-6 response without a transaction object, and the message names the keys received (#176). In 1.16.0 a missing transaction key raised a PHP warning and a TypeError.
  • TxRepHelper::unescapeString passes a \x escape without two hex digits through literally (#176). In 1.16.0 a pair of non-hex characters after \x raised a PHP deprecation.
  • PaymentsRequestBuilder::stream delivers invoke_host_function records, which carry Stellar Asset Contract transfers, as InvokeHostFunctionOperationResponse (#178). In 1.16.0 such a record ended the stream with an UnhandledMatchError.
  • EventInfo reads the operationIndex and transactionIndex fields that stellar-rpc sends, so getOpIndex() and getTxIndex() return them for each event of SorobanServer::getEvents (#182). In 1.16.0 both returned null.
  • For a field of the wrong type, the StellarToml constructor, fromDomain, and currencyFromUrl throw an Exception that names the field and the type found (#184). In 1.16.0 they raised a TypeError.
  • currencyFromUrl throws an Exception for a currency file with no fields, and StellarToml for a non-empty DOCUMENTATION list (#184). In 1.16.0 the empty file raised a TypeError and the list vanished silently.
  • LedgerEntry reads the entry extension from the extXdr key that getLedgerEntries returns, so getExt() returns it (#186). In 1.16.0 it returned null.
  • ContractSpec::nativeToXdrSCVal converts u64, timepoint, and duration values from non-negative integers and decimal strings up to 18446744073709551615 (#188). A prebuilt XdrSCVal passes through, and any other value throws InvalidArgumentException. 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 of ContractSpec, and attribute the W... strkey to SEP-23. The offer and effect examples call getOfferId(), Asset::canonicalForm(), and getHumanReadableEffectType().
  • 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-action v1.0.261 and actions/setup-python v7.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