PortalSwift module — it is not a method on Portal, so no wallet or client is required to call it.
The returned value is a lowercased UUID v4. It is the same generator the SDK uses internally when you do not supply a trace ID, so IDs you generate with it match the format Portal’s logs are indexed by.
Pass the result to RequestOptions(traceId:), SendAssetParams(traceId:), or portal.rawSign(message:chainId:signatureApprovalMemo:traceId:) to have the SDK send it as the X-Portal-Trace-Id header.
Parameters
- None.
String— a lowercased UUID v4, for example"3f2b8a1c-9d4e-4c7f-b6a2-15e8d0c34f9b".
- Nothing. This function cannot fail.
- Generate one trace ID per user-facing action, not per request. Every request the operation makes reuses the ID you pass, which is what makes it useful for correlation.
- If you omit a trace ID, the SDK generates one per request. Those IDs are never returned to you, so supply your own whenever you want to correlate with your logs.
- MPC operations (generate, backup, recover, eject) and
upgradeTo7702generate their own trace IDs and do not accept one.