> For the complete documentation index, see [llms.txt](https://yuga.gitbook.io/zkyuga-whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yuga.gitbook.io/zkyuga-whitepaper/developer-guide/erc721/ownerof.md).

# ownerOf

The `ownerOf` method is exclusive to the ERC-721 token standard and serves the purpose of identifying the current owner of a particular non-fungible token (NFT). By providing a unique token identifier, this method returns the Ethereum address associated with the token's current ownership. This functionality is crucial for numerous operations and validations concerning ownership within the ERC-721 ecosystem. The method is encapsulated within the `ERC721Instance` object, which can be accessed through appropriate functions provided by client libraries like `ZkyugaClient` or similar ones.

### Function Signature

```javascript
async ownerOf(tokenId: string): Promise<string>
```

#### Parameters

<table><thead><tr><th width="151">Parameter</th><th width="94">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenId</td><td>string</td><td>The unique identifier corresponding to an ERC-721 token for which you wish to determine the current owner.</td></tr></tbody></table>

#### Returns

* A `Promise` resolving to the Ethereum address string representing the current owner of the specified token.

### Usage Example

Begin by initializing the ERC-721 token contract of your choice:

```javascript
const erc721 = zkyugaClient.getERC721Instance("your ERC-721 contract address here");
```

Proceed to invoke the `ownerOf` method with a specific token ID:

```javascript
const tokenId = "1008"; // Example token ID
const ownerAddress = await erc721.ownerOf(tokenId);
console.log(`The owner of token ID ${tokenId} is: ${ownerAddress}`);
```

### Notes

* If you attempt to query the owner of a non-existent or unminted token ID, the method may throw an error. Always ensure the validity of the token ID and consider implementing error handling mechanisms in your code.
* The `ownerOf` method plays a fundamental role in the ERC-721 standard, being extensively used in various decentralized applications (dApps) to verify ownership before executing specific actions.

***
