@toon-protocol/client-mcp 0.33.1 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1321,9 +1321,9 @@ async function discoverApex(params) {
|
|
|
1321
1321
|
const deadline = Date.now() + timeoutMs;
|
|
1322
1322
|
let cursor = 0;
|
|
1323
1323
|
while (Date.now() < deadline) {
|
|
1324
|
-
const { events, cursor: next } = relay.getEvents({
|
|
1324
|
+
const { events, cursor: next } = relay.getEvents({ cursor });
|
|
1325
1325
|
cursor = next;
|
|
1326
|
-
const match = events.find((e) => matchesApex(e, ilpAddress));
|
|
1326
|
+
const match = events.find((e) => matchesApex(e, ilpAddress, pubkey));
|
|
1327
1327
|
if (match) return mapAnnouncement(match, { chain, childPeers });
|
|
1328
1328
|
await delay(pollMs);
|
|
1329
1329
|
}
|
|
@@ -1336,8 +1336,9 @@ async function discoverApex(params) {
|
|
|
1336
1336
|
relay.unsubscribe(subId);
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
|
-
function matchesApex(event, ilpAddress) {
|
|
1339
|
+
function matchesApex(event, ilpAddress, pubkey) {
|
|
1340
1340
|
if (event.kind !== ILP_PEER_INFO_KIND) return false;
|
|
1341
|
+
if (pubkey && event.pubkey !== pubkey) return false;
|
|
1341
1342
|
try {
|
|
1342
1343
|
const info = parseIlpPeerInfo(event);
|
|
1343
1344
|
const addrs = info.ilpAddresses ?? [info.ilpAddress];
|
|
@@ -2239,4 +2240,4 @@ export {
|
|
|
2239
2240
|
PublishRejectedError,
|
|
2240
2241
|
registerRoutes
|
|
2241
2242
|
};
|
|
2242
|
-
//# sourceMappingURL=chunk-
|
|
2243
|
+
//# sourceMappingURL=chunk-WMZJQSSA.js.map
|