# Clarity SDK

The Clarity SDK can be used by third parties to connect to Clarity infrastructure directly from their application. This guide will explain how the Clarity SDK should be set up and how to interact with the SDK in your application.

Clarity provides both on-chain governance functionality which leverages Agora, and off-chain governance functionality leveraging snapshot technology.

Currently, only the on-chain governance functionality is offered through the SDK. This SDK will provide a convenient wrapper to the Clarity API, as well as hook in with on-chain functionality to allow you to actually build and sign transactions to post data on-chain.

Functionality offered by the SDK:

* Connect a wallet (`connectWallet`)
* Fetch proposals (`getProposals`)
* Fetch stakes (`getStakes`)
* Create a treasury withdrawal proposal (`createTreasuryWithdrawalProposal`)
* Create an update governance parameters proposal (`createUpdateGovernanceParameterProposal`)
* Create a no-effect proposal (`createNoEffectProposal`)
* Create a stake (`createStake`)
* Edit a stake (`editStake`)
* Unlock stakes (`unlockStakes`)
* Delete a stake (`deleteStake`)
* Vote on a proposal (`voteOnProposal`)
* Retract vote (`retractVote`)
* Monitor transaction (`awaitTxConfirm`)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sdk.clarity.vote/clarity-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
