# Cofhe SDK Docs > Documentation for the Cofhe SDK ## Docs - [Example](/example): This is an example page. - [Get started](/getting-started): Hello world! - [Getting Started](/hardhat): `@cofhe/hardhat-plugin` extends Hardhat with everything you need to build and test FHE-enabled contracts locally — mock contracts, a pre-configured CoFHE client, and test utilities. - [Migrating from ](/migrating-from-cofhejs): `@cofhe/sdk` is the successor to `cofhejs`, redesigned around an explicit, builder-pattern API that gives you full control over encryption, decryption, and permit management. Migration should be strightforward with a 1-to-1 mapping of functions and features. - [Quick Start](/quick-start): Set up a Hardhat project with `@cofhe/hardhat-plugin`, write a contract that stores an encrypted `uint32`, and test the encrypt → store → decrypt flow. - [Cofhe Client](/sdk/client): This page covers the core SDK lifecycle: - [Decrypting to Transact](/sdk/decrypt-to-tx): Use `decryptForTx` to reveal a **confidential (encrypted)** value on-chain: it returns the plaintext together with a Threshold Network signature, so a contract can verify the reveal when you publish it in a transaction. - [Decrypting to View](/sdk/decrypt-to-view): Use `decryptForView` to reveal a **confidential (encrypted)** value **locally** (in your app) so you can display it in the UI. - [Encrypting Inputs](/sdk/encrypting-inputs): `encryptInputs` encrypts plaintext values into FHE ciphertexts that can be passed as inputs to a confidential smart contract transaction. Values must be encrypted before being passed on-chain to preserve confidentiality. - [Permits](/sdk/permits): Permits are EIP-712 signatures that authorize decryption of confidential data. The `issuer` field identifies who is accessing the data - the issuer must have been granted access on-chain via `FHE.allow(handle, address)`. When a permit is used, CoFHE validates it against the ACL contract to confirm that the issuer has access to the requested encrypted handle. - [Writing Decrypt Result to Contract](/sdk/writing-decrypt-result-to-contract): This page covers the “decrypt → write tx” flow after you run [`decryptForTx`](./decrypt-to-tx.mdx): you take `{ ctHash, decryptedValue, signature }` and submit a transaction that your contract can verify. - [Writing Encrypted Data to Contract](/sdk/writing-encrypted-data-to-contract): This page covers the “encrypt → write tx” flow: encrypt plaintext values into `InE*` structs and pass them directly into a contract call. - [Dictionary](/reference/dictionary): A quick glossary of common terms used throughout the Cofhe SDK and CoFHE docs. - [EncryptedCounter.sol](/reference/encrypted-counter-sol): This contract is included as a reference that is used throughout the SDK documentation to explain core functionality such as encrypting inputs, decrypting for view, and decrypting for transactions. - [Client](/hardhat/client): The plugin extends `hre` with `hre.cofhe`, providing three ways to create and connect a `CofheClient` in your Hardhat tests. - [Getting Started](/hardhat/getting-started): This guide walks through integrating `@cofhe/hardhat-plugin` into an existing Hardhat project — from installation to your first passing FHE test. - [Logging](/hardhat/logging): The mock contracts log every FHE operation to the console. This makes it easy to inspect what your contracts are doing under the hood during tests. - [Mock Contracts](/hardhat/mock-contracts): The plugin deploys a suite of mock contracts that simulate the full CoFHE coprocessor stack on the Hardhat network. This lets you develop and test FHE contracts without running the off-chain FHE engine. - [Testing](/hardhat/testing): This page shows the common patterns for writing Hardhat tests with the CoFHE plugin.