Skip to main content

ClaimsService Actions

6 actions registered.

NameDeprecated
fetchClaimsConfigurations
generateMessageForClaimSignature
getClaimById
getClaims
getClaimsApiUrl
getRequestHeaders

ClaimsService:fetchClaimsConfigurations​

Package: @metamask/claims-controller

Fetch required configurations for the claims service.

Returns: The required configurations for the claims service.

Handler signature:

() => Promise<ClaimsConfigurationsResponse>

ClaimsService:generateMessageForClaimSignature​

Package: @metamask/claims-controller

Generate a message to be signed by the user for the claim request.

Parameters:

NameDescription
chainIdThe chain id of the claim.
walletAddressThe impacted wallet address of the claim.

Returns: The message for the claim signature.

Handler signature:

(chainId: number, walletAddress: Hex) => Promise<GenerateSignatureMessageResponse>

ClaimsService:getClaimById​

Package: @metamask/claims-controller

Get the claim by id.

Parameters:

NameDescription
idThe id of the claim to get.

Returns: The claim by id.

Handler signature:

(id: string) => Promise<Claim>

ClaimsService:getClaims​

Package: @metamask/claims-controller

Get the claims for the current user.

Returns: The claims for the current user.

Handler signature:

() => Promise<Claim[]>

ClaimsService:getClaimsApiUrl​

Package: @metamask/claims-controller

Get the URL for the claims API for the current environment.

Returns: The URL for the claims API for the current environment.

Handler signature:

() => string

ClaimsService:getRequestHeaders​

Package: @metamask/claims-controller

Create the headers for the current request.

Returns: The headers for the current request.

Handler signature:

() => Promise<Record<string, string>>