diff --git a/fern/api-reference/data/nft-api/nft-api-endpoints.mdx b/fern/api-reference/data/nft-api/nft-api-endpoints.mdx index 7fbaadaee..6595dc89d 100644 --- a/fern/api-reference/data/nft-api/nft-api-endpoints.mdx +++ b/fern/api-reference/data/nft-api/nft-api-endpoints.mdx @@ -15,41 +15,41 @@ slug: reference/nft-api-endpoints | **Endpoint** | **What to use it for** | | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| [getNFTsForOwner](/reference/getnftsforowner-v3) | Retrieve the NFTs owned by a wallet address | -| [getOwnersForNFT](/reference/getownersfornft-v3) | Retrieve the owners of a given token | -| [getOwnersForContract](/reference/getownersforcontract-v3) | Retrieve all the owners for a given NFT contract, including snapshotting owners at any block number. | -| [isHolderOfContract](/reference/isholderofcontract-v3) | Check whether a given wallet owns any NFT in a collection | -| [getContractsForOwner](/reference/getcontractsforowner-v3) | Retrieve the list of NFT contracts from which a wallet address owns one or more tokens. | -| [getCollectionsForOwner](/reference/getcollectionsforowner-v3) | Gets all NFT collections held by an owner address. | +| [getNFTsForOwner](/reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/get-nf-ts-for-owner-v-3) | Retrieve the NFTs owned by a wallet address | +| [getOwnersForNFT](/reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/get-owners-for-nft-v-3) | Retrieve the owners of a given token | +| [getOwnersForContract](/reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/get-owners-for-contract-v-3) | Retrieve all the owners for a given NFT contract, including snapshotting owners at any block number. | +| [isHolderOfContract](/reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/is-holder-of-contract-v-3) | Check whether a given wallet owns any NFT in a collection | +| [getContractsForOwner](/reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/get-contracts-for-owner-v-3) | Retrieve the list of NFT contracts from which a wallet address owns one or more tokens. | +| [getCollectionsForOwner](/reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/get-collections-for-owner-v-3) | Gets all NFT collections held by an owner address. | | [NFT Activity Webhook](/reference/nft-activity-webhook) | Receiving real-time updates for NFT Transfers and NFT mints | # NFT Metadata Endpoints | **Endpoint** | **What to use it for** | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| [getNFTsForContract](/reference/getnftsforcontract-v3) | Retrieve all the NFTs for a given contract or collection | -| [getNFTMetadata](/reference/getnftmetadata-v3) | Retrieve the metadata associated with a given NFT i.e. a specific tokenId | -| [getNFTMetadataBatch](/reference/getnftmetadatabatch-v3) | Retrieve the metadata associated with several NFTs across collections in a single request | -| [getContractMetadata](/reference/getcontractmetadata-v3) | Retrieve the metadata associated with a given contract or collection | -| [getContractMetadataBatch](/reference/getcontractmetadatabatch-v3) | Retrieve contract metadata for several different contracts in a single request | -| [computeRarity](/reference/computerarity-v3) | Compute the rarity of each attribute of an NFT. | -| [invalidateContract](/reference/invalidatecontract-v3) | Triggers metadata refresh for an NFT collection/refreshes stale metadata after a reveal | -| [refreshNftMetadata](/reference/refreshnftmetadata-v3) | Submit a request that Alchemy refresh the cached NFT metadata for a particular token. | -| [summarizeNFTAttributes](/reference/summarizenftattributes-v3) | Generate a summary of attribute prevalence for an NFT collection. | -| [searchContractMetadata](/reference/searchcontractmetadata) | Search the metadata across contracts for specific keywords | +| [getNFTsForContract](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/get-nf-ts-for-contract-v-3) | Retrieve all the NFTs for a given contract or collection | +| [getNFTMetadata](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/get-nft-metadata-v-3) | Retrieve the metadata associated with a given NFT i.e. a specific tokenId | +| [getNFTMetadataBatch](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/get-nft-metadata-batch-v-3) | Retrieve the metadata associated with several NFTs across collections in a single request | +| [getContractMetadata](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/get-contract-metadata-v-3) | Retrieve the metadata associated with a given contract or collection | +| [getContractMetadataBatch](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/get-contract-metadata-batch-v-3) | Retrieve contract metadata for several different contracts in a single request | +| [computeRarity](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/compute-rarity-v-3) | Compute the rarity of each attribute of an NFT. | +| [invalidateContract](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/invalidate-contract-v-3) | Triggers metadata refresh for an NFT collection/refreshes stale metadata after a reveal | +| [refreshNftMetadata](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/refresh-nft-metadata-v-3) | Submit a request that Alchemy refresh the cached NFT metadata for a particular token. | +| [summarizeNFTAttributes](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/summarize-nft-attributes-v-3) | Generate a summary of attribute prevalence for an NFT collection. | +| [searchContractMetadata](/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/search-contract-metadata-v-3) | Search the metadata across contracts for specific keywords | # NFT Spam Endpoints | **Endpoint** | **What to use it for** | | -------------------------------------------------- | ------------------------------------------------------------ | -| [getSpamContracts](/reference/getspamcontracts-v3) | Retrieve a list of contracts marked as spam | -| [isSpamContract](/reference/isspamcontract-v3) | Returns whether a specific contract is marked as spam or not | -| [isAirdropNFT](/reference/isairdropnft-v3) | Returns whether a token is marked as an airdrop or not | -| [reportSpam](/reference/reportspam-v3) | Report a contract if you think its spam | +| [getSpamContracts](/reference/nft-api-endpoints/nft-api-endpoints/nft-spam-endpoints/get-spam-contracts-v-3) | Retrieve a list of contracts marked as spam | +| [isSpamContract](/reference/nft-api-endpoints/nft-api-endpoints/nft-spam-endpoints/is-spam-contract-v-3) | Returns whether a specific contract is marked as spam or not | +| [isAirdropNFT](/reference/nft-api-endpoints/nft-api-endpoints/nft-spam-endpoints/is-airdrop-nft-v-3) | Returns whether a token is marked as an airdrop or not | +| [reportSpam](/reference/nft-api-endpoints/nft-api-endpoints/nft-spam-endpoints/report-spam-v-3) | Report a contract if you think its spam | # NFT Sales Endpoints | **Endpoint** | **What to use it for** | | -------------------------------------------- | ----------------------------------------------------------- | -| [getFloorPrice](/reference/getfloorprice-v3) | Retrieve the floor price of a NFT collection by marketplace | -| [getNFTSales](/reference/getnftsales-v3) | Retrieve NFT sales data across marketplaces | +| [getFloorPrice](/reference/nft-api-endpoints/nft-api-endpoints/nft-sales-endpoints/get-floor-price-v-3) | Retrieve the floor price of a NFT collection by marketplace | +| [getNFTSales](/reference/nft-api-endpoints/nft-api-endpoints/nft-sales-endpoints/get-nft-sales-v-3) | Retrieve NFT sales data across marketplaces | diff --git a/fern/api-reference/data/nft-api/nft-ownership-endpoints/getnftsforowner-v3.mdx b/fern/api-reference/data/nft-api/nft-ownership-endpoints/getnftsforowner-v3.mdx index d5c588dd7..5bd768a68 100644 --- a/fern/api-reference/data/nft-api/nft-ownership-endpoints/getnftsforowner-v3.mdx +++ b/fern/api-reference/data/nft-api/nft-ownership-endpoints/getnftsforowner-v3.mdx @@ -2,7 +2,7 @@ title: NFTs By Owner description: getNFTsForOwner - Retrieves all NFTs currently owned by a specified address. This endpoint is supported on Ethereum and many L2s, including Polygon, Arbitrum, Optimism, Base, World Chain and more. See the full list of supported networks here . subtitle: getNFTsForOwner - Retrieves all NFTs currently owned by a specified address. This endpoint is supported on Ethereum and many L2s, including Polygon, Arbitrum, Optimism, Base, World Chain and more. See the full list of supported networks here . -slug: reference/getnftsforowner-v3 +slug: reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/get-nf-ts-for-owner-v-3 --- get https://\{network}.g.alchemy.com/nft/v3/\{apiKey}/getNFTsForOwner diff --git a/fern/tutorials/getting-started/api-security-and-authentication/how-to-use-api-keys-in-http-headers.mdx b/fern/tutorials/getting-started/api-security-and-authentication/how-to-use-api-keys-in-http-headers.mdx index 17fb2e053..ad9844e35 100644 --- a/fern/tutorials/getting-started/api-security-and-authentication/how-to-use-api-keys-in-http-headers.mdx +++ b/fern/tutorials/getting-started/api-security-and-authentication/how-to-use-api-keys-in-http-headers.mdx @@ -91,7 +91,7 @@ Please note that while we're using a basic Node.js project here for demonstratio ## Making the API Requests -With your API key at hand and the project set up, you can now start making HTTP header-based requests. To demonstrate the process, we'll use two major JavaScript libraries: Axios and Ethers.js. We'll make requests to the [`eth_getBalance`](/reference/eth-getbalance) method (JSON-RPC API) and [getNFTsForOwner](/reference/getnftsforowner-v3) NFT API method (Enhanced API) for showcasing. +With your API key at hand and the project set up, you can now start making HTTP header-based requests. To demonstrate the process, we'll use two major JavaScript libraries: Axios and Ethers.js. We'll make requests to the [`eth_getBalance`](/reference/eth-getbalance) method (JSON-RPC API) and [getNFTsForOwner](/reference/nft-api-endpoints/nft-api-endpoints/nft-ownership-endpoints/get-nf-ts-for-owner-v-3) NFT API method (Enhanced API) for showcasing. ### Using Axios (JSON-RPC API) diff --git a/fern/tutorials/understanding-the-evm/what-are-uncle-blocks.mdx b/fern/tutorials/understanding-the-evm/what-are-uncle-blocks.mdx index 5bb9bb07c..c95127fe2 100644 --- a/fern/tutorials/understanding-the-evm/what-are-uncle-blocks.mdx +++ b/fern/tutorials/understanding-the-evm/what-are-uncle-blocks.mdx @@ -7,46 +7,34 @@ slug: docs/what-are-uncle-blocks ## What is an uncle block? -An uncle block is **a block that did not get mined onto the canonical chain.** Only one block can be mined and acknowledged as canonical on the blockchain. The remaining blocks are uncle blocks. When two or more miners produce blocks at nearly the same time, uncle blocks are created. +Imagine Ethereum as a worldwide group chat where everyone is trying to add the next message (block) at the same time. Only one message can become the official next one. Sometimes two miners create a valid block at almost the same moment. -Uncle blocks are similar to orphan blocks on Bitcoin but have subtle distinctions connected with the Ethereum protocol. Uncle blocks are valid blocks that the network has rejected. Miners get paid for producing an uncle block, unlike an orphan block, where miners don't get rewarded. +Both blocks are valid. +Only one gets added to the official chain. +The other block becomes an uncle block. -*** +## Why do uncle blocks happen? -## Why do uncle blocks occur? +Ethereum nodes are spread all over the world. When one miner finds a block, it takes a short time for that block to reach the rest of the network. During this short delay, another miner might also find a valid block. -Uncle blocks occur **when two or more miners create blocks at almost the same time.** +Now the network has two valid candidates for the next block. +Eventually the network settles on one. +The block that is not chosen becomes an uncle. -Uncle blocks occur because nodes on a network do not immediately accept a block into the blockchain. As a result, another miner can build and propagate their block at a similar time. To confirm the legitimacy of constructed blocks, they must be broadcast throughout the network to all nodes, which may cause latency concerns. +## ## Why are uncle blocks rewarded? -Ethereum introduces the uncle block technique to tackle the orphan block's security issues while improving transaction processing efficiency. +The miner who created the uncle block still performed real work and produced a valid block. It simply arrived a little too late. Ethereum gives a partial reward to encourage decentralization and to avoid punishing miners who are physically far from large mining pools. -*** +## Do uncle blocks matter? -## How often do uncle blocks happen? +Yes. Even though they do not become part of the main chain, uncle blocks help the network in several ways: -Stale blocks are more common when nodes propagate blocks more slowly than substantial mining pools, resulting in a more significant prevalence of uncle blocks. +* They reduce wasted mining work +* They make mining more fair for smaller or slower miners +* They increase network security +* They give miners an incentive to include uncle references in future blocks -If the uncle rate rapidly increases and nodes leave the network, the gas limit may be too high, compromising network security. +## Summary -*** - -## What are uncle block rewards? - -Uncle block rewards are rewards awarded to miners who create an uncle block included in a valid block added to the chain. - -Uncle blocks are similar to stale blocks in bitcoin, except instead of being ignored, uncle blocks are awarded dependent on how new they are, with the most significant payout being 4.375 eth. An example of this reward can be found [here](https://etherscan.io/block/1378035). - -*** - -## How do uncle block rewards get mined? - -When miners of the main chain block reference uncle blocks, both the miner of the main chain block and the miner of the uncle block receive an additional reward. - -Each block in the main chain can reference up to two uncle blocks, with each uncle receiving 1/32 of an entire block reward. The reward provided to the uncle block miner, on the other hand, declines over time. - -*** - -## What is the difference between an uncle block and an orphan block? - -The difference between an uncle block and an orphan block is that the Ethereum network rewards its uncle block miners. In contrast, the Bitcoin network does not compensate/reward orphan block miners. +An uncle block is a valid block that lost a timing race. +It was correct. It was just a little too slow to reach the network.##