# Ksana > Ksana is a proof-of-work smart-contract chain that confirms in about five seconds, writes every block into Bitcoin, and lets Bitcoin alone decide what is final. Ksana is a smart-contract chain whose blocks confirm in about five seconds and are written into Bitcoin. Producers mine its blocks with their own proof of work and put each block’s data into Bitcoin transactions, paying the Bitcoin fees themselves. Which blocks are final is decided from Bitcoin’s chain alone, with no bridge, committee or sequencer in between, and a block is final once its data has six Bitcoin confirmations and five more blocks have secured the decision. Your account is your Taproot address, contracts are WebAssembly modules written in Rust, and anyone with a Bitcoin node can rebuild the whole chain. The docs below are also one Markdown file, and contracts have a reference of their own, written for AI assistants that write, review or fix Ksana contracts. ## For AI assistants - [Contract reference](https://ksana.network/llms-contracts.txt): how contracts run, every function of the contract SDK, gas, limits, the token standards and complete contracts in one file, held to the code by the repository's tests - [All the docs](https://ksana.network/llms-full.txt): every English page of these docs in one Markdown file ## Start here - [Ksana documentation](https://ksana.network/docs/): Ksana’s documentation, from the quickstart, how Ksana works and confirmations to the public signet, the wallet, ksana-cli, the TypeScript SDK, contracts and running a node or an indexer. - [Quickstart](https://ksana.network/docs/quickstart/): Get test KSA from the signet faucet and send a first Ksana operation with Unisat, Xverse or ksana-cli, then follow it from fast-confirmed to final. ## Concepts - [How Ksana works](https://ksana.network/docs/how-it-works/): The design of Ksana in plain words. The fast lane of proof-of-work blocks, settlement of every block’s data into Bitcoin, finality decided from Bitcoin, forced inclusion, the indexer and execution. - [Confirmations and finality](https://ksana.network/docs/confirmations/): The three marks of a Ksana operation (fast-confirmed, on Bitcoin, final), the RPC statuses, what can still undo each mark, how long each takes, and how long to wait by what is at stake. - [Accounts and addresses](https://ksana.network/docs/accounts/): Ksana accounts are Taproot output keys (BIP86). How addresses map to accounts, how wallets and key files sign (BIP322, BIP340), how nonces work, where balances and assets live, and why contracts have IDs instead of addresses. - [Operations, paths and fees](https://ksana.network/docs/submitting-ops/): What a Ksana operation (VmOp) contains, how path B and path C get it into a block, how fees, fee rates and the entry pool work, how a top-up buys KSA with bitcoin, and what receipts, gas and failed operations mean. - [KSA, rewards and fees](https://ksana.network/docs/ksa/): How KSA works. Base units and the 210,000,000 cap, issuance by reward slots and halving periods, who gets each slot, unlocking once data is on Bitcoin, where fees go, and the genesis of each network. - [Mining and producing blocks](https://ksana.network/docs/mining/): Producing Ksana blocks. What a producer needs, the Argon2id proof of work, aserti3-2d difficulty by DAA score, two-speed difficulty for empty blocks, GHOSTDAG, settlement costs, batching, CPFP bumps, the fee policy flags and the rewards. ## Use the network - [The public signet](https://ksana.network/docs/signet/): Endpoints, faucet, limits and parameters of Ksana’s public signet, the test network on Bitcoin’s signet with chain ID 1002. - [The signet wallet](https://ksana.network/docs/wallet/): How to use Ksana's signet web wallet and explorer with Unisat or Xverse, the faucet, path B, path C, top-ups and your own node. - [Run a node](https://ksana.network/docs/run-a-node/): How to run ksana-node on Ksana’s public signet, from the requirements, the build and bitcoind on signet to following the chain, producing and settling blocks, pruning and checks. - [Run an indexer](https://ksana.network/docs/run-an-indexer/): How to run ksana-indexer on Ksana’s public signet, read its JSON-RPC, compare its state roots with a node, and what its alarms, restarts and pruning mean. - [The command-line client](https://ksana.network/docs/cli/): Every ksana-cli command with examples on the public signet, from keys and queries to transfers, contracts, path C through bitcoind, the exchange contract and top-ups. ## Build - [TypeScript SDK](https://ksana.network/docs/sdk/): How to install Ksana's TypeScript SDK from the repository, connect to a node, sign path B and path C operations with a key or a browser wallet, read state, call contracts, use KS-20 and KS-721 tokens and handle errors. - [JSON-RPC API](https://ksana.network/docs/rpc/): Reference for the Ksana node and indexer JSON-RPC methods, their parameters, results and error codes, with curl examples against the public signet. - [Your first contract](https://ksana.network/docs/first-contract/): A first Ksana smart contract, step by step: a poll in Rust, compiled and deployed in the contract playground on the signet, called from a wallet, tested natively, and changed with an AI assistant. - [Write a contract](https://ksana.network/docs/contracts/): How to write, test, build and deploy a Ksana smart contract in Rust with ksana-contract-sdk, from Cargo.toml to calling other contracts. - [The contract SDK](https://ksana.network/docs/contract-sdk/): API reference for ksana-contract-sdk, the Rust crate of Ksana smart contracts: Borsh encoding and the call context, built-in assets and attached funds, calling and creating contracts, Bitcoin, storage, the mock host for native tests, and the KS-20 and KS-721 modules. - [Contract playground](https://ksana.network/docs/playground/): The Ksana contract playground at playground.ksana.network: eight example contracts (counter, built-in asset, KS-20 token, KS-721 NFT, AMM, lending, multisig, vesting) to use, edit, compile and deploy on the signet, the ABI block its forms follow, and the limits of its compile service. - [Host functions and gas](https://ksana.network/docs/host-functions/): Reference for the Ksana contract ABI, the 31 host functions of the ksana import module, their ksana-contract-sdk wrappers, gas costs and limits. - [Bitcoin in contracts](https://ksana.network/docs/bitcoin-in-contracts/): How Ksana contracts read Bitcoin headers, verify payments with Merkle proofs, and use native_tx for path C ops, with tested Rust code. - [Assets and tokens](https://ksana.network/docs/tokens/): Built-in assets, KS-20 tokens and KS-721 collections on Ksana, how to choose between them, how a contract declares a standard, capabilities, AssetRef, the shared revert reasons and the security notes for wallets and contracts. - [KS-20: fungible tokens](https://ksana.network/docs/ks-20/): Ksana's KS-20 token standard, its interface, rules and events, allowances with an expiry, transfer_and_call, the burnable and mintable extensions, and how to build a token on the contract SDK. - [KS-721: non-fungible tokens](https://ksana.network/docs/ks-721/): Ksana's KS-721 standard for non-fungible tokens, its interface, rules and events, approvals and operators with an expiry, token IDs and URIs, the burnable and enumerable extensions, and how to build a collection on the contract SDK. - [Example contracts](https://ksana.network/docs/example-contracts/): A tour of Ksana's example contracts (token, amm, amm-factory, btc-payment-trigger, ksa-exchange, the tutorial's poll, and the playground's counter, mintable token, NFT, lending, multisig and vesting) and the probe test contract, with their methods and how to build, test and deploy them. - [Tutorial: a token and a pool](https://ksana.network/docs/token-and-pool/): Deploy the token, amm and amm-factory example contracts on Ksana’s public signet with ksana-cli, then add liquidity and swap with KS-20’s transfer_and_call, with real commands and output. ## Reference - [Protocol parameters](https://ksana.network/docs/parameters/): Ksana's protocol parameters for devnet, signet and mainnet, with constant names, units, genesis configurations, local policy defaults and ports. - [Glossary](https://ksana.network/docs/glossary/): Definitions of Ksana's terms, from account and anchor to two-speed difficulty and withholding. - [Frequently asked questions](https://ksana.network/docs/faq/): Answers about Ksana's design, mainnet, wallets, fees, finality, mining, censorship, Bitcoin reorgs, audits and KSA. - [Security model](https://ksana.network/docs/security/): Ksana's security model, its threats and defences, its audits, simulations, fuzzing and soak tests, its known limitations, and how to report a vulnerability. ## Optional - [The docs in Chinese](https://ksana.network/zh/docs/): the same pages in Simplified Chinese - [Contract playground](https://playground.ksana.network/): write, compile, deploy and call contracts on the public signet in the browser - [Signet wallet and explorer](https://signet.ksana.network/): the public signet's web wallet - [Source code](https://github.com/ksana-in-bitcoin/ksana): the node, the indexer, the SDKs, the specification and the design decisions