# Resources Documentation ## Pages #### Archive - [Hiro Archive](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/archive.md): The Hiro Archive is a series of data snapshots for services in the Stacks ecosystem. - [Use the Stacks Blockchain API archive](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/archive/guides/stacks-api.md): Discover how to use the Hiro Archive to spin up a Stacks Blockchain API. - [Use the Stacks blockchain archive](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/archive/guides/stacks-blockchain.md): Discover how to use the Hiro Archive to spin up a Stacks node. - [Use the Token Metadata API archive](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/archive/guides/token-metadata-api.md): Discover how to use the Hiro Archive to spin up a Token Metadata API. - [Verify archive data](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/archive/guides/verify-archive-data.md): Verify the integrity of the data in a particular snapshot. #### Clarity - [Clarity lang](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity.md): Explore and master Clarity's built-in functions for smart contract development. - [Access control](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/access-control.md): Manage permissions and access control with principal functions. - [Basic arithmetic](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/basic-arithmetic.md): Brief overview of arithmetic operations in Clarity and their importance in smart contract development. - [Bit manipulation](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/bit-manipulation.md): Using bit manipulation for compact data storage and flags in Clarity smart contracts. - [Cryptographic functions](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/cryptographic-functions.md): Brief overview of cryptographic functions in Clarity and their importance in smart contract development. - [Functions reference](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/functions.md): Complete reference for all Clarity functions organized by category, from arithmetic operations to token management. - [Keywords reference](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/keywords.md): Complete reference for all Clarity keywords including constants, context variables, and blockchain data. - [Map functions](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/optimizations.md): Optimizing storage and retrieval with map functions in Clarity. - [Optional values and error handling](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/handling-optionals-and-errors.md): Safely handling optional values and error cases in Clarity smart contracts. - [Time-based logic](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/time-and-blocks.md): Implementing time-based logic with block info functions in Clarity. - [Types reference](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/types.md): Clarity's type system ensures program correctness through static type checking - [Using Pyth oracle data](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/clarity/integrations/external-data.md): Learn how to integrate real-time market price data from Pyth Network into your Clarity smart contracts. #### Guides - [Guides](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides.md): Guides for building on Stacks. - [API keys](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/api-keys.md): For developers who need API requests beyond the standard rate limits. - [Build a decentralized Kickstarter](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/build-a-decentralized-kickstarter.md): Learn how to create a crowdfunding app, enabling creators to fund their projects without a third party. - [Build a no-loss lottery pool](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/no-loss-lottery.md): Learn how to create a no-loss lottery pool that leverages stacking yield. - [Build an NFT marketplace](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/build-an-nft-marketplace.md): Learn how to create an NFT marketplace that allows users to list NFTs for sale and purchase them using Clarity. - [DocsKit](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/docskit.md): DocsKit usage - [How to install Docker](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/installing-docker.md): Install Docker to run a local devnet. - [How to sync a Bitcoin node](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/sync-a-bitcoin-node.md): Learn how to sync a Bitcoin node for building Bitcoin applications. - [How to sync a Stacks node](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/sync-a-stacks-node.md): Learn how to sync a Stacks node for running a local devnet or mainnet. - [Rate limiting](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/rate-limits.md): Understand the rate limits for Hiro APIs and the STX Faucet. - [Using Clarity values](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/using-clarity-values.md): Learn how to use Clarity values in your Clarity smart contracts. - [Using Pyth price feeds](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/guides/using-pyth-price-feeds.md): Complete guide to integrating real-time market price data from Pyth Network into your Stacks applications. #### Snippets - [Snippets](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets.md): Ready-to-use code examples for building on Stacks and Bitcoin - [Build a STX post-condition](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/build-a-stx-pc.md): A helper function that creates a post-condition for STX token transfers using the Pc builder class, ensuring exact amounts are transferred as expected. - [Build an FT post-condition](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/build-an-ft-pc.md): Create post-conditions for fungible token transfers to ensure exact amounts are transferred as expected - [Build an NFT post-condition](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/build-an-nft-pc.md): Create post-conditions for NFT transfers to ensure specific tokens are or aren't transferred - [Build an unsigned transaction](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/build-an-unsigned-tx.md): Create unsigned transactions for hardware wallets or multi-signature scenarios - [Check for duplicates](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/check-for-duplicates.md): Detect duplicate characters in strings and duplicate items in lists using Clarity - [Convert BTC to STX address](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/convert-btc-to-stx-address.md): Convert Bitcoin addresses to their corresponding Stacks addresses using base58 decoding in Clarity - [Convert string to principal](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/convert-string-to-principal.md): Parse string addresses into principal types using c32 decoding in Clarity - [Create a random burn address](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/create-a-random-burn-address.md): Generate burn addresses for permanently removing tokens from circulation - [Create a sponsored transaction](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/create-a-sponsored-tx.md): Build transactions where a sponsor pays the fees on behalf of users - [Create SHA256 hash in Clarity](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/create-sha256-hash-clarity.md): Generate SHA-256 hashes from buffer data in Clarity smart contracts - [Create SHA256 hash in Stacks.js](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/create-sha256-hash-stacks-js.md): Generate SHA-256 hashes that match Clarity's hashing output - [Deploy a contract](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/deploy-a-contract.md): Deploy a Clarity smart contract to the Stacks blockchain using Stacks.js - [Derive principal addresses between networks](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/derive-principal-addresses-between-networks.md): Convert addresses between mainnet and testnet by extracting and reconstructing with different version bytes - [Derive Stacks address from keys](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/derive-stacks-address-from-keys.md): Generate Stacks addresses from private or public keys using multiple methods - [Fetch testnet Bitcoin on regtest](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/fetch-testnet-bitcoin-on-regtest.md): Request testnet BTC from the Hiro faucet for local development and testing - [Filter items from a list](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/filter-items-from-a-list.md): Remove specific items from lists using fold in Clarity - [Generate a secret key](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/generate-a-secret-key.md): Create mnemonic seed phrases for wallet generation - [Generate a wallet](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/generate-a-wallet.md): Create a new wallet with mnemonic phrase or restore from existing seed - [Generate random number](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/generate-random-number.md): Create pseudo-random numbers using block hashes for randomness in smart contracts - [Get account details from wallet](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/get-account-details-from-wallet.md): Extract addresses, keys, and other account information from a wallet instance - [Helper function to restrict contract calls](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/helper-function-to-restrict-contract-calls.md): Implement access control to ensure functions can only be called by users, not other contracts - [Integrate API keys using Stacks.js](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/integrate-api-keys-using-stacksjs.md): Configure Stacks.js to use API keys for enhanced rate limits and monitoring - [Return an entry from a map](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/return-an-entry-from-a-map.md): Query contract map data using the Stacks API map_entry endpoint - [Transfer a SIP-10 token](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/transfer-a-sip10-token.md): Transfer fungible tokens using the SIP-10 standard with post-conditions - [Transfer STX](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets/transfer-stx.md): Send STX tokens between addresses with post-conditions for secure transfers #### Templates - [Project templates](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/templates.md): Project templates for building on Stacks.