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
)
Last updated