KIP Identification
Last updated
Last updated
This contract is used as a KIP Identity to classify users in the KIP Ecosystem.
The contract uses the ERC-721
standard with the external implementation ERC721URIStorage
Currently, there are three types of Users:
App Owner
(idType
= 1)
Model Owner
(idType
= 2)
Dataset Owner
(idType
= 3)
Deployed KIPIdentification
contract:
Network Sepolia Base
:
Supported roles/actors/users (msg.sender
):
DEFAULT_ADMIN_ROLE
:
MINTER_ROLE
:
Users
: owners
of tokenId
Purpose: Query the current address of the KIPManagement
contract.
Parameters: None
Return:
Type: address
Value: The address of the KIPManagement
contract
Purpose: Query the name of the Identity NFT Collection (ERC-721
standard).
Parameters: None
Return:
Type: string
Value: The Identity NFT Collection's name
Purpose: Query the symbol of the Identity NFT Collection (ERC-721
standard)
Parameters: None
Return:
Type: string
Value: The Identity NFT Collection's symbol
Purpose: Query the number of identities owner
has in the NFT Collection (ERC-721
standard)
Parameter:
owner
:
Type: address
Value: The account's address to check
Return:
Type: uint256
Value: The total number of identities owner
has
Purpose: Query the owner
of the issued tokenId
(ERC-721
standard)
Parameter:
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
Return:
Type: address
Value: The owner
of the provided tokenId
Purpose: Query the idType
of the issued tokenId
Parameter:
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
Return:
Type: uint256
Value: The unique classification that has been assigned to the tokenId
Purpose: Query the URL
of the issued tokenId
which links to its metadata (ERC-721
standard)
Parameter:
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
Return:
Type: string
Value: The string value of URL
Purpose: Query the address that has been approved as spender
of the tokenId
(ERC-721
standard)
Parameter:
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
Return:
Type: address
Value: The address of an approved spender
Purpose: Check whether operator
is approved as spender
for all tokenId
s owned by owner
(ERC-721
standard)
Parameter:
owner
:
Type: address
Value: The owner
s address
operator
:
Type: address
Value: The owner
s address
Return:
Type: bool
Value: true
or false
Purpose: Update the address of KIPManagement
contract
Requirement:
Caller must have DEFAULT_ADMIN_ROLE
Parameter:
management
:
Type: address
Value: The address of the KIPManagement
contract
Purpose: Generate the identity and assign to to
Requirements:
Caller must have MINTER_ROLE
Receiving address must follow:
Should not be 0x0
If a contract, it should have the required interface (IERC721Receiver
)
tokenId
should not have been issued prior to the request
Parameters:
to
:
Type: address
Value: The address that will be the owner
of tokenId
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
idType
:
Type: uint256
Value: The classification of the tokenId
tokenURI
:
Type: string
Value: The string value of URL
Purpose: Update the new string URL
of tokenId
which links to its metadata
Requirements:
Caller must be the owner
of the tokenId
Parameters:
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
tokenURI
:
Type: string
Value: The new string of URL
Purpose: Transfer the ownership of the tokenId
Requirements:
Caller must be one of the following:
The owner
of the transferring tokenId
Approved as spender
for the tokenId
Receiver must meet the following requirements:
Should not be 0x0
If a contract, it should have the required interface (IERC721Receiver
)
Parameters:
from
:
Type: address
Value: The current owner
of the tokenId
to
:
Type: address
Value: The new owner
to whom the tokenId
will be transferred
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
Purpose: Transfer the ownership of the tokenId. This function does not validate/check the Receiver. It is recommended to use the above function when transferring the identity's ownership.
Requirements:
Caller must be one of the following:
The owner
of the transferring tokenId
Approved as spender
for the tokenId
Receiver should not be 0x0
Parameters:
from
:
Type: address
Value: The current owner
of the tokenId
to
:
Type: address
Value: The new owner
to whom the tokenId
will be transferred
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
Purpose: Authorize to
as the spender
for tokenId
Requirements:
Caller must be the owner
of the tokenId
Parameters:
to
:
Type: address
Value: The account address that will be assigned as the spender
tokenId
:
Type: uint256
Value: The unique ID assigned to an identity
Purpose: Set or reset operator
as the approval spender
for all tokenId
s that owned by msg.sender
Requirements:
Caller can be ANY
Parameters:
operator
:
Type: address
Value: The account address that will be assigned as the spender
approved
:
Type: bool
Value: true
to set, and false
to reset