Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions openapi/public-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,7 @@
"VerifierData_nft_ownership": {
"type": "object",
"required": [
"contractAddress",
"tokenId"
"contractAddress"
],
"oneOf": [
{
Expand All @@ -1185,7 +1184,8 @@
},
"tokenId": {
"type": "string",
"minLength": 1
"minLength": 1,
"description": "One token. Omit for ERC721 to accept any token from the collection; required for ERC1155."
},
"tokenType": {
"type": "string",
Expand Down
17 changes: 14 additions & 3 deletions verification/nft-ownership.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: NFT holder
sidebarTitle: NFT
description: "Confirm a wallet holds a specific NFT before you grant access."
description: "Confirm a wallet holds an NFT from a collection, or one specific NFT, before you grant access."
icon: image
---

Expand All @@ -14,13 +14,24 @@ Lookup. Proofable reads on-chain ownership.
| Field | Required | Notes |
|------|----------|-------|
| `contractAddress` | Yes | NFT contract or mint |
| `tokenId` | Yes | Token ID |
| `tokenId` | For ERC1155 | One token. Leave it out on ERC721 to accept any token from the collection |
| `chainId` or `chain` | Yes | Chain ID or CAIP-2 chain |
| `tokenType` | No | `erc721` (default) or `erc1155` |
| `ownerAddress` | No | Wallet to check; defaults to the signer |
| `blockNumber` | No | Check ownership at a specific block |

## Example
## Examples

Any token from the collection (ERC721):

```json
{
"contractAddress": "0x...",
"chainId": 8453
}
```

One specific token:

```json
{
Expand Down
4 changes: 2 additions & 2 deletions verifiers/schemas/nft-ownership.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"type": "string"
},
"tokenId": {
"description": "One token. Omit for ERC721 to accept any token from the collection; required for ERC1155.",
"minLength": 1,
"type": "string"
},
Expand All @@ -49,8 +50,7 @@
}
},
"required": [
"contractAddress",
"tokenId"
"contractAddress"
],
"title": "nft-ownership",
"type": "object"
Expand Down