Starknet Tokenbound
  • Starknet Tokenbound
    • Introduction to Tokenbound
    • 📘Glossary
    • 💡Frequently Asked Questions
  • SDK
    • Installation
    • ⚡API Reference
  • Toolings
    • 🔗Tokenbound Connectkit
    • 🖼️Tokenbound iFrame
  • Contracts
    • AccountV3
    • Registry
    • Components
      • 📔Account
      • 🔒Lockable
      • Permissionable
      • ✍️Signatory
      • Upgradeable
    • 📔Deployed Addresses
Powered by GitBook
On this page
  • Functions
  • owner
  • token
  • state
  • supports_interface
  1. Contracts
  2. Components

Account

PreviousComponentsNextLockable

Last updated 7 months ago

This component holds the base implementation for a tokenbound account. All functions contained within it is compulsory to maintain compatibility with SNIP-14.

The full contract code of the AccountComponent can be found .

Functions

owner

fn owner(self: @ComponentState<TContractState>) -> ContractAddress

This function retrieves the owner of the associated NFT.

token

fn token(self: @ComponentState<TContractState>) -> (ContractAddress, u256, felt252);

This function returns the contract address and token ID of the associated NFT.

state

fn state(self: @ComponentState<TContractState>) -> u256

This function retrieves the current state of the account.

supports_interface

fn supports_interface( self: @ComponentState<TContractState>, interface_id: felt252) -> bool

This function checks if the account supports the tokenbound interface.

Parameters

Name
Type
Description

felt252

interface_id

The interface ID to be checked against.

Returns

bool: Returns true If the interface is supported, otherwise false.

📔
here