{"id":21247105,"url":"https://github.com/alchemyplatform/alchemy-sdk-js","last_synced_at":"2025-05-14T05:10:44.281Z","repository":{"id":37056770,"uuid":"472927387","full_name":"alchemyplatform/alchemy-sdk-js","owner":"alchemyplatform","description":"The easiest way to connect your dApp to the blockchain.","archived":false,"fork":false,"pushed_at":"2025-05-06T20:44:09.000Z","size":8500,"stargazers_count":431,"open_issues_count":21,"forks_count":209,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-11T19:09:37.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.alchemy.com/sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alchemyplatform.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-22T20:28:45.000Z","updated_at":"2025-05-05T02:41:17.000Z","dependencies_parsed_at":"2024-04-02T21:27:32.291Z","dependency_job_id":"1aaa6198-33d2-4482-babe-a79e4a1e2c76","html_url":"https://github.com/alchemyplatform/alchemy-sdk-js","commit_stats":{"total_commits":396,"total_committers":32,"mean_commits":12.375,"dds":0.2777777777777778,"last_synced_commit":"c4440cb0c55954e32da33d97a2cf560b3417eef2"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Falchemy-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Falchemy-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Falchemy-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Falchemy-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alchemyplatform","download_url":"https://codeload.github.com/alchemyplatform/alchemy-sdk-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T02:15:07.160Z","updated_at":"2025-05-14T05:10:44.240Z","avatar_url":"https://github.com/alchemyplatform.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Alchemy SDK for Javascript\n\nThe Alchemy SDK is the most comprehensive, stable, and powerful Javascript SDK available today to interact with the blockchain.\n\nIt supports the exact same syntax and functionality of the Ethers.js `AlchemyProvider` and `WebSocketProvider`, making it a 1:1 mapping for anyone using the Ethers.js `Provider`. However, it adds a significant amount of improved functionality on top of Ethers, such as easy access to Alchemy’s Enhanced and NFT APIs, robust WebSockets, and quality-of-life improvements such as automated retries.\n\nThe SDK leverages Alchemy's hardened node infrastructure, guaranteeing best-in-class node reliability, scalability, and data correctness, and is undergoing active development by Alchemy's engineers.\n\n\u003e 🙋‍♀️ **FEATURE REQUESTS:**\n\u003e\n\u003e We'd love your thoughts on what would improve your web3 dev process the most! If you have 5 minutes, tell us what you want on our [Feature Request feedback form](https://alchemyapi.typeform.com/sdk-feedback), and we'd love to build it for you.\n\nThe SDK currently supports the following chains (chains with '(d)' after are deprecated):\n\n- **Ethereum**: Mainnet, Goerli (d), Sepolia, Holesky, Hoodi\n- **Polygon**: Mainnet, Mumbai (d), Amoy\n- **Optimism**: Mainnet, Goerli (d), Sepolia\n- **Arbitrum**: Mainnet, Goerli (d), Sepolia\n- **Astar**: Mainnet\n- **PolygonZKEVM**: Mainnet, Testnet(d), Cardona\n- **Base**: Mainnet, Goerli (d), Sepolia\n- **Zksync**: Mainnet, Sepolia\n- **Shape**: Mainnet, Sepolia\n- **Linea**: Mainnet, Sepolia\n- **Fantom**: Mainnet, Testnet\n- **Zetachain**: Mainnet, Testnet\n- **Arbnova**: Mainnet\n- **Blast**: Mainnet, Sepolia\n- **Mantle**: Mainnet, Sepolia\n- **Scroll**: Mainnet, Sepolia\n- **Gnosis**: Mainnet, Chiado\n- **BNB**: Mainnet, Testnet\n- **Avalanche**: Mainnet, Fuji\n- **Celo**: Mainnet, Alfajores, Baklava\n- **Metis**: Mainnet\n- **OpBNB**: Mainnet, Testnet\n- **Berachain**: Mainnet, Bartio, Bepolia\n- **Soneium**: Mainnet, Minato\n- **Worldchain**: Mainnet, Sepolia\n- **Rootstock**: Mainnet, Testnet\n- **Flow**: Mainnet, Testnet\n- **Zora**: Mainnet, Sepolia\n- **Frax**: Mainnet, Sepolia\n- **Polynomial**: Mainnet, Sepolia\n- **Crossfi**: Mainnet, Testnet\n- **Apechain**: Mainnet, Curtis\n- **Lens**: Mainnet, Sepolia\n- **Geist**: Mainnet, Polter\n- **Lumia**: Prism, Testnet\n- **Unichain**: Mainnet, Sepolia\n- **Sonic**: Mainnet, Blaze\n- **XMTP**: Testnet\n- **Abstract**: Mainnet, Testnet\n- **Degen**: Mainnet\n- **Ink**: Mainnet, Sepolia\n- **Sei**: Mainnet, Testnet\n- **Ronin**: Mainnet, Saigon\n- **Monad**: Testnet\n- **Settlus**: Mainnet, Testnet (Sepolia)\n- **Gensyn**: Testnet\n- **Superseed**: Mainnet, Sepolia\n- **Tea**: Sepolia\n\nYou can find per-method documentation of the Alchemy SDK endpoints at the [Alchemy Docs linked in the sidebar](https://docs.alchemy.com/reference/alchemy-sdk-quickstart).\n\n## Getting started\n\n```\nnpm install alchemy-sdk\n```\n\nAfter installing the app, you can then import and use the SDK:\n\n```ts\nimport { Alchemy, Network } from 'alchemy-sdk';\n\n// Optional config object, but defaults to the API key 'demo' and Network 'eth-mainnet'.\nconst settings = {\n  apiKey: 'demo', // Replace with your Alchemy API key.\n  network: Network.ETH_MAINNET // Replace with your network.\n};\n\nconst alchemy = new Alchemy(settings);\n```\n\n\u003e **ℹ️ Creating a unique Alchemy API Key**\n\u003e\n\u003e The public \"demo\" API key may be rate limited based on traffic. To create your own API key, **[sign up for an Alchemy account here](https://alchemy.com/?a=SDKquickstart)** and use the key created on your dashboard for the first app.\n\nThe `Alchemy` object returned by `new Alchemy()` provides access to the Alchemy API. An optional config object can be passed in when initializing to set your API key, change the network, or specify the max number of retries.\n\n## Using the Alchemy SDK\n\nThe Alchemy SDK currently supports the following namespaces:\n\n- `core`: All commonly-used Ethers.js Provider methods and Alchemy Enhanced API methods\n- `nft`: All Alchemy NFT API methods\n- `ws`: All WebSockets methods\n- `transact`: All Alchemy Transaction API methods\n- `notify`: CRUD endpoints for modifying Alchemy Notify Webhooks\n- `debug`: Methods to inspect and replay transactions and blocks\n\nIf you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` and it should work properly.\n\n\u003e **ℹ️ ENS Name Resolution**\n\u003e\n\u003e The Alchemy SDK now supports ENS names (e.g. `vitalik.eth`) for every parameter where you can pass in a Externally Owned Address, or user address (e.g. `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`).\n\n```ts\nimport { Alchemy, AlchemySubscription } from 'alchemy-sdk';\n\n// Using default settings - pass in a settings object to specify your API key and network\nconst alchemy = new Alchemy();\n\n// Access standard Ethers.js JSON-RPC node request\nalchemy.core.getBlockNumber().then(console.log);\n\n// Access Alchemy Enhanced API requests\nalchemy.core\n  .getTokenBalances('0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE')\n  .then(console.log);\n\n// Access the Alchemy NFT API\nalchemy.nft.getNftsForOwner('vitalik.eth').then(console.log);\n\n// Access WebSockets and Alchemy-specific WS methods\nalchemy.ws.on(\n  {\n    method: AlchemySubscription.PENDING_TRANSACTIONS\n  },\n  res =\u003e console.log(res)\n);\n```\n\nThe Alchemy SDK also supports a number of Ethers.js objects that streamline the development process:\n\n- [`Utils`](https://docs.ethers.io/v5/api/utils/): Equivalent to `ethers.utils`, this provides a number of common Ethers.js utility methods for developers.\n  - [`Interface`](https://docs.ethers.io/v5/api/utils/abi/interface/): Found in `Utils.Interface`, this class abstracts the encoding and decoding required to interact with contracts on the Ethereum network.\n- [`Contract`](https://docs.ethers.io/v5/api/contract/contract/): An abstraction for smart contract code deployed to the blockchain.\n- [`ContractFactory`](https://docs.ethers.io/v5/api/contract/contract-factory/): Allows developers to build a `Contract` object.\n- [`Wallet`](https://docs.ethers.io/v5/api/signer/#Wallet): An implementation of `Signer` that can sign transactions and messages using a private key as a standard Externally Owned Account.\n\n## Alchemy Settings\n\nAn `AlchemySettings` object can be passed on instantiation to the Alchemy object, with the following optional parameters:\n\n- `apiKey`: API key that can be found in the Alchemy dashboard. Defaults to `demo`: a rate-limited public key.\n- `network`: Name of the network. Defaults to `Network.ETH_MAINNET`\n- `maxRetries`: The maximum number of retries to attempt if a request fails. Defaults to 5.\n- `url`: Optional URL endpoint to use for all requests. Setting this field will override the URL generated by the `network` and`apiKey` fields.\n- `authToken`: Alchemy auth token required to use the Notify API. This token can be found in the Alchemy Dashboard on the Notify tab.\n- `batchRequests`: Optional setting that automatically batches and sends json-rpc requests for higher throughput and reduced network IO. Defaults to false.\n- `requestTimeout`: Optional setting that sets the timeout for requests in milliseconds for the NFT and Notify namespaces. Defaults to no timeout.\n\n## Alchemy Core\n\nThe core namespace contains all commonly-used [Ethers.js Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) methods. If you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` when accessing provider methods and it should just work.\n\nIt also includes the majority of Alchemy Enhanced APIs, including:\n\n- `getTokenMetadata()`: Get the metadata for a token contract address.\n- `getTokenBalances()`: Gets the token balances for an owner given a list of contracts.\n- `getAssetTransfers()`: Get transactions for specific addresses.\n- `getTransactionReceipts()`: Gets all transaction receipts for a given block.\n\nYou will also find the following utility methods:\n\n- `findContractDeployer()`: Find the contract deployer and block number for a given contract address.\n- `getTokensForOwner()`: Get all token balances and metadata for a given owner address\n\n### Accessing the full Ethers.js Provider\n\nTo keep the package clean, we don't support certain uncommonly-used Ethers.js Provider methods as top-level methods in the Alchemy `core` namespace - for example, `provider.formatter`. If you'd like to access these methods, simply use the `alchemy.config.getProvider()` function to configure the\nEthers.js Provider [AlchemyProvider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) and return it.\n\n```ts\nimport { Alchemy } from 'alchemy-sdk';\n\nconst alchemy = new Alchemy();\n\nasync function runAlchemy() {\n  const ethersProvider = await alchemy.config.getProvider();\n  console.log(ethersProvider.formatter);\n}\nrunAlchemy();\n```\n\n## Alchemy WebSockets\n\nIn addition to the built-in Ethers.js listeners, the Alchemy SDK includes support for [Alchemy's Subscription API](https://docs.alchemy.com/alchemy/enhanced-apis/subscription-api-websockets). This allows you to subscribe to events and receive updates as they occur.\n\nThe `alchemy.ws` instance can be used like the standard Ethers.js [WebSocketProvider](https://docs.ethers.io/v5/api/providers/other/#WebSocketProvider) to add listeners for Alchemy events:\n\n```ts\nimport { Alchemy, AlchemySubscription } from 'alchemy-sdk';\n\nconst alchemy = new Alchemy();\n\n// Listen to all new pending transactions.\nalchemy.ws.on('block', res =\u003e console.log(res));\n\n// Listen to only the next transaction on the USDC contract.\nalchemy.ws.once(\n  {\n    method: AlchemySubscription.PENDING_TRANSACTIONS,\n    toAddress: 'vitalik.eth'\n  },\n  res =\u003e console.log(res)\n);\n\n// Remove all listeners.\nalchemy.ws.removeAllListeners();\n```\n\nThe SDK brings multiple improvements to ensure correct WebSocket behavior in cases of temporary network failure or\ndropped connections. As with any network connection, you should not assume that a WebSocket will remain open forever\nwithout interruption, but correctly handling dropped connections and reconnection by hand can be challenging to get\nright. The Alchemy SDK automatically handles these failures with no configuration necessary. The main benefits are:\n\n- Resilient event delivery: Unlike standard Web3.js or Ethers.js, you will not permanently miss events which arrive\n  while the backing WebSocket is temporarily down. Instead, you will receive these events as soon as the connection\n  is reopened. Note that if the connection is down for more than 120 blocks (approximately 20 minutes), you may\n  still miss some events that were not part of the most recent 120 blocks.\n- Lowered rate of failure: Compared to standard Web3.js or Ethers.js, there are fewer failures when sending requests\n  over the WebSocket while the connection is down. The Alchemy SDK will attempt to send the requests once the connection\n  is reopened. Note that it is still possible, with a lower likelihood, for outgoing requests to be lost,\n  so you should still have error handling as with any network request.\n\n## Alchemy Transact\n\nThe `transact` namespace contains methods used for simulating and sending transactions. The unique methods to the `transact` namespace are:\n\n- `sendPrivateTransaction()`: Send a private transaction through Flashbots.\n- `cancelPrivateTransaction()`: Cancel a private transaction sent with Flashbots.\n- `simulateAssetChanges()`: Simulate a transaction and get a list of asset changes.\n- `simulateExecution()`: Simulate a transaction and get a full list of internal transactions, logs, ABI decoded results and more.\n- `simulateAssetChangesBundle()`: Simulate a list of transactions in sequence and get a list of asset changes.\n- `simulateExecutionBundle()`: Simulate a list of transactions in sequence and get a full list of internal transactions, logs, ABI decoded results and more.\n\nThe `transact` namespace also aliases over several commonly used methods from the `core` namespace for convenience:\n\n- `getTransaction()`: Returns the transaction for the given transaction hash.\n- `sendTransaction()`: Sends a standard transaction to the network to be mined.\n- `waitForTransaction()`: Waits for a transaction to be mined and returns the transaction receipt.\n\n## Alchemy NFT API\n\nThe SDK currently supports the following [NFT API](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api) endpoints\nunder the `alchemy.nft` namespace:\n\n- `getNftMetadata()`: Get the NFT metadata for an NFT contract address and tokenId.\n- `getNftMetadataBatch()`: Get the NFT metadata for multiple NFT contract addresses/token id pairs.\n- `getContractMetadata()`: Get the metadata associated with an NFT contract\n- `getContractMetadataBatch()`: Get the metadata associated with multiple NFT contracts in a single request.\n- `getContractsForOwner()`: Get all NFT contracts that the provided owner address owns.\n- `getNftsForOwner()`: Get NFTs for an owner address.\n- `getNftsForOwnerIterator()`: Get NFTs for an owner address as an async iterator (handles paging automatically).\n- `getNftsForContract()`: Get all NFTs for a contract address.\n- `getNftsForContractIterator()`: Get all NFTs for a contract address as an async iterator (handles paging\n  automatically).\n- `getOwnersForNft()`: Get all the owners for a given NFT contract address and a particular token ID.\n- `getOwnersForContract()`: Get all the owners for a given NFT contract address.\n- `getMintedNfts()`: Get all the NFTs minted by the owner address.\n- `getTransfersForOwner()`: Get all the NFT transfers for a given owner address.\n- `getTransfersForContract()`: Get all the NFT transfers for a given NFT contract address.\n- `verifyNftOwnership()`: Check whether the provided owner address owns the provided NFT contract addresses.\n- `isSpamContract()`: Check whether the given NFT contract address is a spam contract as defined by Alchemy (see the [NFT API FAQ](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification))\n- `getSpamContracts()`: Returns a list of all spam contracts marked by Alchemy.\n- `reportSpam()`: Report feedback that a given NFT contract address is a spam contract as defined by Alchemy.\n- `isAirdropNft()`: Check whether the given NFT token is marked as an airdrop or not. Airdrops are defined as NFTs that were minted to a user address in a transaction sent by a different address.\n- `refreshNftMetadata()`: Refresh the cached NFT metadata for a contract address and a single tokenId.\n- `refreshContract()`: Enqueues the specified contract address to have all token ids' metadata refreshed.\n- `getFloorPrice()`: Return the floor prices of a NFT contract by marketplace.\n- `computeRarity()`: Get the rarity of each attribute of an NFT.\n- `getNftSales()`: Returns NFT sales that have happened through on-chain marketplaces.\n- `summarizeNftAttributes()`: Get the summary of attribute prevalence for all NFTs in a contract.\n- `searchContractMetadata()`: Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts.\n\n### Pagination\n\nThe Alchemy NFT endpoints return 100 results per page. To get the next page, you can pass in the `pageKey` returned by\nthe\nprevious call. To simplify paginating through all results, the SDK provides the `getNftsIterator()`\nand `getNftsForContractIterator()` functions that automatically paginate through all NFTs and yields them via\nan `AsyncIterable`.\n\nHere's an example of how to paginate through all the NFTs in Vitalik's ENS address:\n\n```ts\nimport { Alchemy } from 'alchemy-sdk';\n\nconst alchemy = new Alchemy();\n\nasync function main() {\n  const ownerAddress = 'vitalik.eth';\n  for await (const nft of alchemy.nft.getNftsForOwnerIterator(ownerAddress)) {\n    console.log('ownedNft:', nft);\n  }\n}\n\nmain();\n```\n\n### SDK vs API Differences\n\nThe NFT API in the SDK standardizes response types to reduce developer friction, but note this results in some\ndifferences compared to the Alchemy REST endpoints:\n\n- Methods referencing `Collection` have been renamed to use the name `Contract` for greater accuracy: e.g. `getNftsForContract`.\n- Some methods have different naming that the REST API counterparts in order to provide a consistent API interface (\n  e.g. `getNftsForOwner()` is `alchemy_getNfts`, `getOwnersForNft()` is `alchemy_getOwnersForToken`).\n- SDK standardizes to `omitMetadata` parameter (vs. `withMetadata`).\n- Standardization to `pageKey` parameter for pagination (vs. `nextToken`/`startToken`)\n- Empty `TokenUri` fields are omitted.\n- Token ID is always normalized to an integer string on `BaseNft` and `Nft`.\n- Some fields omitted in the REST response are included in the SDK response in order to return an `Nft` object.\n- Some fields in the SDK's `Nft` object are named differently than the REST response.\n\n## Alchemy Notify\n\nThe [Alchemy Notify API](https://docs.alchemy.com/reference/notify-api-quickstart) helps developers set up webhooks in their apps. The namespace provides methods to programmatically create, read, update, and delete your webhooks along with typings for the different webhooks. To learn more about Webhooks, please refer to the [Alchemy documentation](https://docs.alchemy.com/reference/notify-api-quickstart#what-are-webhooks).\n\nMethods on the `NotifyNamespace` can be accessed via `alchemy.notify`. To use the methods, you must include your team's auth token in the `authToken` field of `AlchemySettings` when instantiating the SDK. The auth token can be found on the Alchemy Dashboard in the Notify Tab.\n\nMethods include:\n\n- `getAllWebhooks()`: Get all webhooks on your team.\n- `getAddresses()`: Get all addresses tracked for the provided Address Activity Webhook.\n- `getNftFilters()`: Get all NFT filters tracked for the provided NFT Activity Webhook.\n- `createWebhook()`: Create a new webhook.\n- `updateWebhook()`: Update an existing webhook's active status or tracked addresses and NFT filters.\n- `deleteWebhook()`: Delete the provided webhook.\n\n## Alchemy Debug\n\nMethods on the `DebugNamespace` can be accessed via `alchemy.debug`. These methods are used for inspecting and debugging transactions.\n\nMethods include:\n\n- `traceCall()`: Run an `eth_call` with the context of the provided block execution using the final state of the parent block as the base.\n- `traceTransaction()`: Run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt to execute the transaction that corresponds to the given hash.\n- `traceBlock()`: Replay a block that has already been mined.\n\n## Documentation\n\nThe SDK is documented via `tsdoc` comments in the source code. The generated types and documentation are included when\nusing an IDE. To browse the documentation separately, you can view the generated API interfaces\nin `etc/alchemy-sdk.api.md`. You can view generated Markdown files for each endpoint in the `docs-md` directory,\nor as a webpage by opening `docs/index.html` in your browser.\n\n## Usage Examples\n\nBelow are a few usage examples.\n\n\u003e **ℹ️ More Examples **\n\u003e\n\u003e You can also go here: [Examples Using the Alchemy SDK](https://docs.alchemy.com/reference/using-the-alchemy-sdk).\n\n### Getting the NFTs owned by an address\n\n```ts\nimport { Alchemy, NftExcludeFilters } from 'alchemy-sdk';\n\nconst alchemy = new Alchemy();\n\n// Get how many NFTs an address owns.\nalchemy.nft.getNftsForOwner('vitalik.eth').then(nfts =\u003e {\n  console.log(nfts.totalCount);\n});\n\n// Get all the image urls for all the NFTs an address owns.\nasync function main() {\n  for await (const nft of alchemy.nft.getNftsForOwnerIterator('vitalik.eth')) {\n    console.log(nft.media);\n  }\n}\n\nmain();\n\n// Filter out spam NFTs.\nalchemy.nft\n  .getNftsForOwner('vitalik.eth', {\n    excludeFilters: [NftExcludeFilters.SPAM]\n  })\n  .then(console.log);\n```\n\n### Getting all the owners of the BAYC NFT\n\n```ts\nimport { Alchemy } from 'alchemy-sdk';\n\nconst alchemy = new Alchemy();\n\n// Bored Ape Yacht Club contract address.\nconst baycAddress = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D';\n\nasync function main() {\n  for await (const nft of alchemy.nft.getNftsForContractIterator(baycAddress, {\n    // Omit the NFT metadata for smaller payloads.\n    omitMetadata: true\n  })) {\n    await alchemy.nft\n      .getOwnersForNft(nft.contract.address, nft.tokenId)\n      .then(response =\u003e\n        console.log('owners:', response.owners, 'tokenId:', nft.tokenId)\n      );\n  }\n}\n\nmain();\n```\n\n### Get all outbound transfers for a provided address\n\n```ts\nimport { Alchemy } from 'alchemy-sdk';\n\nconst alchemy = new Alchemy();\n\nalchemy.core.getTokenBalances('vitalik.eth').then(console.log);\n```\n\n## Questions and Feedback\n\nIf you have any questions, issues, or feedback, please file an issue\non [GitHub](https://github.com/alchemyplatform/alchemy-sdk-js/issues), or drop us a message on\nour [Discord](https://discord.com/invite/alchemyplatform) channel for the SDK.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemyplatform%2Falchemy-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falchemyplatform%2Falchemy-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemyplatform%2Falchemy-sdk-js/lists"}