TSS generate endpoints returns node indexs out of order

When asking for help in this category, please make sure to provide the following details:

For some reason, the TSSHelpers.generateEndpoints function returns the node indexes out of order. This causes an error down the line when bootstrapping the client.

    `let (urls, socketUrls, partyIndexes, nodeInd) = try TSSHelpers.generateEndpoints(parties: parties, clientIndex: Int(clientIndex), nodeIndexes: params.nodeIndexes, urls: params.tssEndpoints)`

If I manually sort the nodeInds along with their respective urls and party indexes, I’m unable to sign messages. I’m not sure why that is the case.

Is this a known issue on Sapphire devnet?

Hello nlobue@aureusox.com, thanks for reaching out! It looks like you’re encountering an issue with the TSSHelpers.generateEndpoints function returning node indexes in an unexpected order, which is causing a subsequent error during client bootstrapping on the Sapphire Devnet using the tKey iOS SDK version 2.0.2.

You’ve mentioned that manually sorting the indexes doesn’t resolve the issue and leads to problems with signing messages. This could be related to how the node indexes should align naturally with the related URLs and party indexes without manual intervention, as the TSS protocol often requires precise ordering for correct operations.

To help the support team investigate this situation further, they would benefit from:

  • The exact error message you’re observing when signing fails after sorting.
  • The order of the node indexes, URLs, and party indexes before and after manual sorting.

Unfortunately, I couldn’t deduce any specific known issues with Sapphire Devnet related to this problem from your description, but providing the above details could help clarify the root cause. Meanwhile, if you’re exploring alternative SDK configurations or orders of input parameters, sometimes these can offer further insight into whether it’s a systematic issue or an isolated one. Let us know how it goes!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours

When manually sorting the error is actually on creation of the TSSClient

Hey @nlobue can you please share brief details what other SDKs you use, and how are you using the tss-client-swift so we can try to reproduce the issue?

Checked the TG group - Context - Creating an XRPLTssAccount

Yes, let me know if you need any additional info!

Closing since we are continuing the discussion on TG.