> For the complete documentation index, see [llms.txt](https://comet-3.gitbook.io/comet-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://comet-3.gitbook.io/comet-sdk/reference/comet-sdk-reference/comet-react-sdk/hooks.md).

# Hooks

{% hint style="info" %}
Comet React hooks will not work unless they are used in components wrapped with a `CometProvider`. See the [`CometProvider` page](/comet-sdk/reference/comet-sdk-reference/comet-react-sdk/components.md#cometprovider) for details.
{% endhint %}

### Getting the logged-in account

Use the `useAccount` hook to grab the current user's information, including username and Solana address.

{% content-ref url="/pages/IVp6fBM9Fv8d5amZoCTO" %}
[useAccount](/comet-sdk/reference/comet-sdk-reference/comet-react-sdk/hooks/useaccount.md)
{% endcontent-ref %}

### Starting the mint process

Use the `useMint` hook to bring up the mint dialog for your customers, where they can confirm the transaction and pay via credit card if needed.

{% content-ref url="/pages/pBw9KN45q74qxC0PZpXO" %}
[useMint](/comet-sdk/reference/comet-sdk-reference/comet-react-sdk/hooks/usemint.md)
{% endcontent-ref %}

### Signing arbitrary messages

Use the `useSignMessage` hook to sign any message using the customer's Comet wallet.

{% content-ref url="/pages/VyD5ESPc8PkkzrN46s6G" %}
[useSignMessage](/comet-sdk/reference/comet-sdk-reference/comet-react-sdk/hooks/usesignmessage.md)
{% endcontent-ref %}

### Signing Solana transactions

Use the `useSignTransaction` hook to partially sign a Solana Web3 transaction using the customer's Comet wallet. The customer will be asked to confirm signing.

{% content-ref url="/pages/GQtYZYmcQaT6Ww0o5EZ3" %}
[useSignTransaction](/comet-sdk/reference/comet-sdk-reference/comet-react-sdk/hooks/usesigntransaction.md)
{% endcontent-ref %}

### \[Advanced] Diffie-Hellman key exchange

Use the `useGetSharedSecret` hook to perform ECDH with the customer's private key and another public key.

{% content-ref url="/pages/qQZUqHN4r2MZAKj5Bcyb" %}
[useGetSharedSecret](/comet-sdk/reference/comet-sdk-reference/comet-react-sdk/hooks/usegetsharedsecret.md)
{% endcontent-ref %}
