Stellar PHP SDK API Documentation

TopicFilter

Part of the getEvents request parameters.

Example:

// Match any first segment, specific symbol in second segment
$topicFilter = new TopicFilter([
    "*",  // Wildcard matches any value in first topic segment
    XdrSCVal::forSymbol("increment")->toBase64Xdr()  // Exact match for second segment
]);
Tags
see
TopicFilters
see
https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getEvents

Table of Contents

Properties

$segmentMatchers  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructor.
getRequestParams()  : array<string, mixed>
Builds and returns the request parameters array for the RPC API call.
getSegmentMatchers()  : array<string|int, string>
Returns the segment matchers array.

Properties

$segmentMatchers

public array<string|int, mixed> $segmentMatchers

Methods

__construct()

Constructor.

public __construct(array<string|int, string> $segmentMatchers) : mixed
Parameters
$segmentMatchers : array<string|int, string>

For an exact segment match, a string containing a base64-encoded ScVal. For a wildcard single-segment match, the string "*", matches exactly one segment.

getRequestParams()

Builds and returns the request parameters array for the RPC API call.

public getRequestParams() : array<string, mixed>
Return values
array<string, mixed>

The request parameters formatted for Soroban RPC

getSegmentMatchers()

Returns the segment matchers array.

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

Array of segment matchers (base64-encoded ScVal or "*" wildcards)


        
On this page

Search results