NFT can be an email, an image, an identity, or a book. LikeCoin NFT is designed especially for text-based content creation. This section of the doc describe the technical details on the LikeNFT module. It targets DApp developer to develop decenteralize publishing on top on LikeCoin chain.
Loading...
No metadata standard is explicitly enforced for LikeCoin NFT. Users and dapp developers can take reference of the OpenSea standard: https://docs.opensea.io/docs/metadata-standards
In some use cases, multiple NFT classes might belong to a larger collection. i.e. classes are created and organized to form a collection, We would call these meta collections, please define these metadata fields in the related NFT classes.
nft_meta_collection_id
An ID representing a meta collection , no uniqueness is enforced on chain
nft_meta_collection_name
Human readable name for the meta collection
nft_meta_collection_descrption
Human readable description meta collection
Note that these field are merely used as a standardize and convenient way to tag classes. Chain logic does not enforce any uniqueness and validity check for these fields, so it is up to the users and develop to verify if any class tagged with a same nft_meta_collection_id
actually belongs to any creator or collections.
Please refer to Writing NFT Spec
Based on Metadata best practice
The Writing NFT introduced by Liker Land is designed especially for a single piece of article or post. The idea is similar to the traditional book publishing flow as an analogy, but the solution, however, tackles some specific issues for a single piece of writing.
Read more about Writing NFT here
Each writing NFT class represent a creative work registered on an ISCN. To allow easier search and collection of all Writing NFTs created by a same creator, nft_meta_collection fields would be used. A dynamic API is used as uri to provide dynamic metadata according to mint purchase status.
name
Writing NFT - {ISCN name}
Name of ISCN prefix with Writing NFT
symbol
WRITING
WRITING
is used as symbol
uri
https://api.like.co/likernft/metadata?iscn_id={iscn_id}
Dynamic API from api.like.co, query by ISCN ID
metadata
metadata.nft_meta_collection_id
likerland_writing_nft
ID of the Writing NFT meta collection
metadata.nft_meta_collection_name
Writing NFT
Name of Writing NFT meta collection
metadata.nft_meta_collection_descrption
Writing NFT by Liker Land
Description of Writing NFT
In Writing NFT, every instance of NFT in a same class should be homogeneous. A randomized ID is used to prevent user from distinguishing the minting order. A dynamic API is also used as image to provide dynamic image according to mint purchase status.
id
writing-{uuid}
Randomized uuid v4 prefixed with writing
uri
https://api.like.co/likernft/metadata?class_id={class_id}&nft_id={id}
Dynamic API from api.like.co, query by class id and nft id
metadata
metadata.name
Writing NFT - {ISCN name}
ID of the Writing NFT meta collection
metadata.image
https://api.like.co/likernft//image/class_${classId}.png
Name of Writing NFT meta collection
To allow the display of Writing NFT on LikeCoin button/NFT widget and related api.like.co APIs, users should call the like.co NFT API to register their NFT after minting.
Please view api.like.co documentation for details
Based on Metadata best practice
The NFT Book introduced by Liker Land is designed for publishing ebooks as NFT on LikeCoin chain. Unlike Writing NFT which can be used for content of any length, NFT Book are intended for more traditional ebook, with proper cover and editing.
contentMetadata
contentMetadata.url
{URL for "View content"}
The main URL that prepresent the NFT Book. This URL would be used for "View content" button in LikerLand
contentMetadata.type
Book
Book
is used as type
contentMetadata.sameAs
["https://url/book.epub", "https://url/book.pdf"]
Array of other URL representations of the NFT Book. If the URL ends with .epub
or .pdf
a special button for viewing would appear in Liker Land
Each writing NFT class represent a creative work registered on an ISCN. To allow easier search and collection of all Writing NFTs created by a same creator, nft_meta_collection fields would be used. A dynamic API is used as uri to provide dynamic metadata according to mint purchase status.
name
{name of book}
Name of the book
symbol
BOOK
BOOK
is used as symbol
uri
content hash or URL
If a JSON URL is provided, its content is fetched and used as metadata (merge)
metadata
metadata.nft_meta_collection_id
nft_book
ID of the NFT Book meta collection
metadata.nft_meta_collection_name
NFT Book
Name of NFT Book meta collection
metadata.nft_meta_collection_descrption
NFT Book
Description of Writing NFT
A command line tool and sample is provided for easy minting of NFTs
Please view the repository for details
NFT Portal technical reference
Allows inputting https URL or ISCN ID to prepare minting of Writing NFT
Testnet: https://app.testnet.like.co/nft/url
Production: https://app.like.co/nft/url
url
(optional) Prefill target URL
iscn_id
(optional) Prefill target ISCN ID
liker_id
(optional) Enforce Liker ID checking on user, an error would be prompted if target Liker ID is not used
Other query strings are passed below to the ISCN page.
Mints an ISCN into Writing NFT
Testnet: https://app.testnet.like.co/nft/iscn/${uri_encoded_iscn_id}/
Production: https://app.like.co/nft/iscn/${uri_encoded_iscn_id}/
nft_prefix
(optional) Override NFT name prefix, default is Writing NFT
class_id
(optional) Existing NFT Class ID to resume minting process from
redirect_uri
(optional) Act as a whitelist host for postMessage, actual redirect is not implemented, please use with opener
below
opener
(optional) default false. If set, would fire a postMessage
back to window.opener
with redirect_uri
host as target, then close current window
Production: https://mainnet-node.like.co
Testnet: https://node.testnet.like.co
Please refer to x/nft
query definition and likenft query definition for most updated LCD API
queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721
/cosmos/nft/v1beta1/balance/{owner}/{class_id}
queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 /cosmos/nft/v1beta1/owner/{class_id}/{id}
queries the number of NFTs from the given class, same as totalSupply of ERC721. /cosmos/nft/v1beta1/supply/{class_id}
queries all NFTs of a given class
or owner
, choose at least one of the two, similar to tokenByIndex in ERC721Enumerable
/cosmos/nft/v1beta1/nfts
queries an NFT based on its class and id.
/cosmos/nft/v1beta1/nfts/{class_id}/{id}
queries an NFT class based on its id
/cosmos/nft/v1beta1/classes/{class_id}
queries all NFT classes
/cosmos/nft/v1beta1/classes
Pagination params:
key
Key of the last item of previous response for pagination, should not be used with offset
limit
The size limit of response. Default & max: 100
reverse
Sorting order
offset
Offset of response, should not be used with key
/likechain/likenft/v1/class
iscn_id_prefix
ISCN prefix of NFT class (if minted via ISCN)
account
Account of NFT class (if minted via account)
iscn_owner
Query classes owned via ISCN by an address
expand
expand NFT info
/likechain/likenft/v1/nft
owner
Owner address
expand_classes
Expand class information
/likechain/likenft/v1/owner
class_id
NFT Class ID
/likechain/likenft/v1/event
class_id
NFT Class ID
nft_id
NFT ID
iscn_id_prefix
ISCN ID Prefix (if minted via ISCN)
verbose
Expand events
action_type
/cosmos.nft.v1beta1.MsgSend
Filter event by action
sender
Get all events sent by an address
receiver
Get all events received by an address
creator
Get all events of NFT Classes created (ISCN owner) by an address
involver
Get all events involving an address (sender OR receiver OR creator)
ignore_from_list
Ignore events sent from address
ignore_to_list
Ignore events sent to address
/likechain/likenft/v1/ranking
creator
like13f4glvg80zvfrrs7utft5p68pct4mcq7t5atf6
The current owner of the ISCN
collector
like1vymrc5dxlfwff30m03prwlu08ql4vudn4lue8u
The current owner of NFT
type
CreativeWork
The contentMetadata.@type
field in ISCN
stakeholder_id
did:like:1w6es6du93xmhms60gwwtczr2p2h4cdm8r7kc0f
The stakeholders.entity.@id
field in ISCN
stakeholder_name
kin
The stakeholders.entity.name
field in ISCN
created_after
1659283200
Get NFT class created after this UNIX second timestamp
created_before
1659801600
Get NFT class created before this UNIX second timestamp
sold_after
1659283200
Rank NFT class base on sales after this UNIX second timestamp
sold_before
1659801600
Rank NFT class base on sales before this UNIX second timestamp
include_owner
true
Whether to include owner of ISCN when counting sold_count
ignore_list
like17m4vwrnhjmd20uu7tst7nv0kap6ee7js69jfrs
The addresses to ignore when counting sold count
order_by
total_sold_value/sold_count
Result is order by the number of NFTs not owned by creator nor ignore_list
/likechain/likenft/v1/ranking?ignore_list=like17m4vwrnhjmd20uu7tst7nv0kap6ee7js69jfrs&limit=1
Note: Currently only like.co API can report the latest price. price
in the response is always 0. Please refer to like.co API documentation for price information
/likechain/likenft/v1/collector
creator
like13f4glvg80zvfrrs7utft5p68pct4mcq7t5atf6
Required. Account address of ISCN owner
ignore_list
The addresses to ignore
include_owner
Whether to include owner of ISCN
price_by
class/nft
order_by
price/count
/likechain/likenft/v1/creator
collector
like13f4glvg80zvfrrs7utft5p68pct4mcq7t5atf6
Required. Account address of NFT owner
ignore_list
The addresses to ignore
include_owner
Whether to include owner of ISCN
price_by
class/nft
order_by
price/count
Result is order by count of NFT collections.
/likechain/likenft/v1/collector?creator=like13f4glvg80zvfrrs7utft5p68pct4mcq7t5atf6
https://likecoin.github.io/likecoin-nft-dashboard/
\