Skip to content

Commit

Permalink
Updating vnft.md (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
MedovTimur authored Dec 3, 2024
1 parent d06bea5 commit 7bb5561
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/examples/Standards/vnft.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ Returns a list of all actors who have the admin role.
pub fn admins(&self) -> Vec<ActorId>
```

#### `tokens for owner`

Returns a list of all tokens with metadata that the owner holds.
```rust
pub fn tokens_for_owner(&self, owner: ActorId) -> Vec<(TokenId, TokenMetadata)>
```

### Contract Interface

The extended service incorporates the following interface:
Expand Down Expand Up @@ -268,6 +275,7 @@ service Vnft {
query Minters : () -> vec actor_id;
query TokenId : () -> u256;
query TokenMetadataById : (token_id: u256) -> opt TokenMetadata;
query TokensForOwner : (owner: actor_id) -> vec struct { u256, TokenMetadata };
query BalanceOf : (owner: actor_id) -> u256;
query GetApproved : (token_id: u256) -> actor_id;
query Name : () -> str;
Expand Down

0 comments on commit 7bb5561

Please sign in to comment.