signMessage
for authenticating users can choose to opt-in to one of the various Sign-In with (SIW) standards. If a message follows one of the supported standards, Phantom will verify required fields at the time of signing.
At the time of this writing, Phantom supports:
Name | Type | Required? | Description |
---|---|---|---|
domain | string | true | The authority that is requesting the signing. |
address | string | true | The blockchain address that is performing the signing. |
statement | string | false | A human-readable ASCII assertion that the user will sign. It MUST NOT contain \\n . |
uri | string | true | A URI referring to the resource that is the subject of the signing—that is, the subject of the claim. |
version | string | true | The current version of the message. |
chain-id | string | true | The Chain ID to which the session is bound, and the network where Contract Accounts MUST be resolved. |
nonce | string | true | A randomized token to prevent signature replay attacks. |
issued-at | string | true | The issuance time. |
expiration-time | string | false | The time at which the signed authentication message is no longer valid. |
not-before | string | false | The time at which the signed authentication message starts being valid. |
request-id | string | false | A system-specific identifier used to uniquely refer to the authentication request. |
resources | string[] | false | A list of URIs the user wishes to have resolved as part of the authentication by the relying party. |
address
field and CAIP-2 for chain-id
.