ProfileMetricsService Actions
3 actions registered.
| Name | Deprecated |
|---|---|
fetchNonces | |
fetchVerifiedAccounts | |
submitMetrics |
ProfileMetricsService:fetchNonces
Package: @metamask/profile-metrics-controller
Fetch single-use nonces from the auth API, one per identifier.
Requests larger than MAX_NONCE_BATCH_SIZE are split into multiple
POST /api/v2/nonce/batch calls fired in parallel; the resulting maps are
merged into a single record. Each chunk independently goes through the
service policy (retry, circuit-breaker, degraded). If any chunk ultimately
fails, the whole call rejects so the caller can soft-degrade the entire
entropy-source batch consistently.
The returned record is keyed by the auth API's echoed identifier field
(response[i].identifier -> response[i].nonce). The call asserts that
the response identifier set is exactly the requested set; any mismatch
(missing, extra, or duplicated identifier) causes the chunk to throw so
the caller never silently proceeds with partial nonces.
Parameters:
| Name | Description |
|---|---|
data | The identifiers to mint nonces for, plus the optional entropy source ID used to scope the bearer token. |
Returns: A map of identifier -> nonce.
Handler signature:
(data: ProfileMetricsFetchNoncesRequest) => Promise<Record<string, string>>
ProfileMetricsService:fetchVerifiedAccounts
Package: @metamask/profile-metrics-controller
Fetch verified accounts for an entropy source using the configured retry policy.
Parameters:
| Name | Description |
|---|---|
entropySourceId | The entropy source ID used to resolve the bearer token. Omit or pass null to use the primary SRP. |
Returns: Verified account addresses and scopes.
Handler signature:
(entropySourceId?: string | null) => Promise<ProfileAccount[]>
ProfileMetricsService:submitMetrics
Package: @metamask/profile-metrics-controller
Submit metrics to the API.
Parameters:
| Name | Description |
|---|---|
data | The data to send in the metrics update request. |
Returns: The response from the API.
Handler signature:
(data: ProfileMetricsSubmitMetricsRequest) => Promise<void>