# Resources Snippets Documentation ## Pages - [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 - [Snippets](https://hiro-systems-docs-git-develop-hirosystems.vercel.app/resources/snippets.md): Ready-to-use code examples for building on Stacks and Bitcoin - [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