Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add optional signer to the sign message method docs #30

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/api-reference/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,15 @@ This is the basic type for an error. For specific details on errors check out th
|------------|----------|----------|---------|---------------------------------------------|
| message | `string` | yes | - | A human-readable UTF-8 string to sign. |
| providerId | `string` | no | - | The ID of the provider. |
| signer | `string` | yes | - | The address to be used to sign the message. |
| signer | `string` | no | - | The address to be used to sign the message. |

### `ISignMessageResult`

| Name | Type | Required | Default | Description |
|------------|----------|----------|---------|---------------------------------------------------------------------------------------------|
| providerId | `string` | yes | - | The ID of the provider. |
| signature | `string` | yes | - | A base64 encoded signature of the message signed by the private key of the intended signer. |
| signer | `string` | yes | - | The address used to sign the message. |

### `ISignTransactionsParams`

Expand Down
2 changes: 2 additions & 0 deletions docs/clients/signing-a-message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ client.onSignMessage(({ error, result }) => {
{
providerId: '02657eaf-be17-4efc-b0a4-19d654b2448e',
signature: 'gqNzaWfEQ...',
signer: 'P3AIQVDJ2CTH54KSJE63YWB7IZGS4W4JGC53I6GK72BGZ5BXO2B2PS4M4U',
}
*/
});
Expand Down Expand Up @@ -68,6 +69,7 @@ client.onSignMessage(({ error, result }: IAVMWebClientCallbackOptions) => {
{
providerId: '02657eaf-be17-4efc-b0a4-19d654b2448e',
signature: 'gqNzaWfEQ...',
signer: 'P3AIQVDJ2CTH54KSJE63YWB7IZGS4W4JGC53I6GK72BGZ5BXO2B2PS4M4U',
}
*/
});
Expand Down
2 changes: 2 additions & 0 deletions docs/providers/responding-to-sign-message-requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ provider.onSignMessage(({ params }) => {
return {
providerId,
signature: 'gqNzaWfEQ...', // base64 encoded signature
signer: 'P3AIQVDJ2CTH54KSJE63YWB7IZGS4W4JGC53I6GK72BGZ5BXO2B2PS4M4U',
};
}
});
Expand All @@ -53,6 +54,7 @@ provider.onSignMessage(({ params }: IAVMWebProviderCallbackOptions) => {
return {
providerId,
signature: 'gqNzaWfEQ...', // base64 encoded signature
signer: 'P3AIQVDJ2CTH54KSJE63YWB7IZGS4W4JGC53I6GK72BGZ5BXO2B2PS4M4U',
};
}
});
Expand Down