Metacoin API
MetacoinMetaWallet Deeplink APIMetascanRedscan
Metacoin API(version 2.1)
Metacoin API(version 2.1)
  • Metacoin API
  • Quick Start
  • Reference
    • REST API Reference
      • Address
      • Block and transaction
      • Token
      • MRC400(NFT)
      • MRC402(NFT)
Powered by GitBook
On this page
  1. Reference
  2. REST API Reference

MRC400(NFT)

NFT(Non-fungible token) is a digital asset that has its own identifiers and unique such as game items or masterpiece and cannot be replaced by another.

  • Each has a unique ID.

  • This is like a ticket. Tickets to enter the show look the same, but have different seat numbers.

  • If you are showing a movie in a theater and selling tickets,

  • Create a "movie screening plan" using MRC400, and create an admission ticket using MRC401 under the created MRC400.

Support single assets for NFT.

MRC400 supports the single assets and shares some portion of commission to a copyright holder or a profit share holder on Sales/Auction.

It supports to create Token/MRC401 and Mint and Burn by QR Code or Deeplink on MetaWallet webpage.

Copyright Information

NFT is usually used in work of art.

However, there are so confused to users who want to own the NFT. because it is unclear which art is based on.

In MRC402, copyright information can be set only once when NFT is created.

It will ensure that those who wish to own the NFT recognize which work they have by reference this information.

Burn

Burn will reduce the total issuance and it can do by an issuer only.

If there is an initial asset, it will be returned equal to the burned amount * the initial asset.

Mint

Mint will increase the total issuance and can only be issued by issuer.

If there is an initial asset, it will be reduced from the creator’s wallet by the amount of mint * initial asset.

Transfer

If you want to send multiple MRC401s, you need to send them one by one.

This is equivalent to transferring ownership of each of the multiple homes when you purchase them.

If the MRC400 ID is the same MRC401, ownership can be transferred up to 100 at a time.

Melt

Users who has got NFT can do the Melting.

But, If you specify a date that Melting function can be executed on creating the NFT, you can not do Melting before that date.

  • James sends 100 MTC to Mary with a lockup until January.01.2025.

  • Mary can not give 100 MTC to someone until that date.

  • But, If James send to Mary it after setting the initial asset as 100 MTC and melting point as January.01.2025 and issuing 1 MRC402 Mary can transfer to someone at any time and the user who has got it get 100 MTC with melting after January.01.2015.

It has the same effect as a lockup and can also be used as a transferable token.

Support various media

It can publish the NFT by MP4 files as well as images.

It saves in zzal.io because the storing in blockchain consumes excessive traffic and capacity.

zzal.io is a service that stores with distributing images and videos.

Support Platform

  • We open a website “HotDeal.io” that supports NFT trading and provides a variety of information related trading NFT.

  • It can be expected to get advertising and transaction fees.

  • ADV can be carried out in various support methods.

  • If you want to get the commission at a certain percentage on the transaction, sellers send the NFT to “HotDeal.io”,

  • “HotDeal.io” send to the seller with deducted the commission after getting the transaction amount from buyers.

  • After all, it becomes subordinate to a web service called “HotDeal.io” not a decentralized transaction.

If it sell/auction in Metacoin Network after fill out the platform name, commission rate and receiver’s address for commission on registering MRC402,

Trading is made on the Metacoin Network. The fee is distributed according to the information.

Support ShareHolder

You can enter the copyright holder on creating NFT or a user who receive the commission on trading.

We called it “ShareHolder”.

ShareHolder can put the address and commission rate up to 5 addresses.

It’s set up at the time of initial creation and can not be changed.

It supports multiple copyright holders and give stable profits on the Metacoin Network.

It helps you to be more creative.

PreviousTokenNextMRC402(NFT)

Last updated 2 years ago

Create MRC400 token

post
  • It stores the common information of MRC401 Token.
  • MRC401 Token You can specify the token to be used for sale and auction.
  • It stores information about the creator of MRC401 Token.
  • If there is no ImageURL or URL of MRC401 Token, the information of MRC400 is used.
Query parameters
ownerstring · Metacoin Address · min: 40 · max: 40Required

MRC400 Owner

Example: MTATLnT6SGKE8RU0CBPoDRfUXL5lr4SLece1a6ee
namestring · min: 1 · max: 128Required
  • MRC400 Name
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
Example: Meta-RPG
urlstring · min: 1 · max: 255Required
  • MRC400 Project URL
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
Example: https://mrc400-project.com/
imageurlstring · min: 1 · max: 255Required
  • MRC400 Project Image URL
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
Example: https://mrc400-project.com/images/project.png
allowtokenstring · int · min: 1 · max: 16Required
  • Only designated tokens and Metacoin (Token ID: 0) can be used for MRC401 token auctions and sales under this MRC400 token
  • If not specified, set to "0"
Example: 0
categorystring · int · min: 1 · max: 64Required
  • This value refers to the classification in which the MRC400 token is used. It does not affect Metacoin or Metacoin-based blockchains.
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
Example: Baseball Card
descriptionstring · int · min: 1 · max: 4096Required
  • Set the field where MRC401 Token is used
  • This value is a description of the MRC400 Token and does not have any effect on Metacoin or Metacoin-based blockchain.
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
Example: Metacoin NFT base RPG Game
itemurlstring · int · min: 1 · max: 255Required
  • Specify the URL of JSON Data that stores detailed data of MRC401 token.
  • If the url value of MRC401 Token is an empty string, this value is used.
  • The URI value allows for ID substitution by clients. If the string {id} exists in any URI, clients MUST replace this with the actual token ID in hexadecimal form. This allows for a large number of tokens to use the same on-chain string by defining a URI once, for that large number of tokens.
  • This value is the URL of a JSON file that stores data that can be referenced by an application using MRC401 Token
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
Example: https://mrc400-project.com/info/{id}
itemimageurlstring · int · min: 1 · max: 255Required
  • Specify the image URL of the MRC401 token.
  • If the imageurl value of MRC401 Token is an empty string, this value is used.
  • The URI value allows for ID substitution by clients. If the string {id} exists in any URI, clients MUST replace this with the actual token ID in hexadecimal form. This allows for a large number of tokens to use the same on-chain string by defining a URI once, for that large number of tokens.
  • This value is the URL of the image to be used when displaying MRC401 Token in an application that uses MRC401 Token
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
Example: https://mrc400-project.com/info/{id}
datastring · int · min: 1 · max: 4096Required
  • MRC400 detail info
  • Should be json string
  • This value is does not have any effect on Metacoin or Metacoin-based blockchain
tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat owner, name, url, imageurl, category, itemurl, itemimageurl, data, tkey
  • ex) ecdsa_sign(privatekey of owner address, owner +'|'+ name +'|'+ url +'|'+ imageurl+'|'+category+'|'+itemurl+'|'+itemimageurl+'|'+data+'|'+tkey)
Responses
200
successful operation
*/*
Responsestring

new MRC400 Token ID

405
Missing or invalid RSA key
post
POST /mrc400 HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
text

Update MRC400 token

put
  • It stores the common information of MRC401 Token.
  • MRC401 Token You can specify the token to be used for sale and auction.
  • If there is no ImageURL or URL of MRC401 Token, the information of MRC400 is used.
Path parameters
mrc400idstring · min: 40 · max: 40Required

MRC400 Token Id

Example: MRC400_db7da6bc848ba62e621aede40f75dc760
Query parameters
namestring · Metacoin Address · max: 128Required

If set to an empty string, the existing value is not changed.

Example: Meta-RPG
urlstring · max: 255Required

If set to an empty string, the existing value is not changed.

Example: https://mrc400-project.com/
imageurlstring · max: 255Required

If set to an empty string, the existing value is not changed.

Example: https://mrc400-project.com/images/project.png
allowtokenstring · int · min: 1 · max: 16Required
  • Only designated tokens and Metacoin (Token ID: 0) can be used for MRC401 auctions and sales under this MRC400
  • If not specified, set to "0"
  • If you do not want to change this value, you must send the same value as the old one.
Example: 0
categorystring · int · max: 64Required

If set to an empty string, the existing value is not changed.

Example: Baseball Card
descriptionstring · int · max: 4096Required

If set to an empty string, the existing value is not changed.

Example: Metacoin NFT base RPG Game
itemurlstring · int · max: 255Required

If set to an empty string, the existing value is not changed.

Example: https://mrc400-project.com/info/{id}
itemimageurlstring · int · max: 255Required

If set to an empty string, the existing value is not changed.

Example: https://mrc400-project.com/info/{id}
datastring · int · max: 4096Required

If set to an empty string, the existing value is not changed.

tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat mrc400id, name, url, imageurl, category, itemurl, itemimageurl, data, tkey
  • ex) ecdsa_sign(privatekey of owner address, mrc400id +'|'+ name +'|'+ url +'|'+ imageurl+'|'+category+'|'+itemurl+'|'+itemimageurl+'|'+data+'|'+tkey)
Responses
200
successful operation
*/*
405
Missing or invalid RSA key
put
PUT /mrc400 HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

Get information of MRC400

get
Path parameters
mrc400idstringRequired

MRC400 Token ID

Responses
200
successful operation
*/*
404
MRC400 not found
get
GET /mrc400/{mrc400id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "allow_token": "text",
  "category": "text",
  "createdate": 1,
  "data": "text",
  "description": "text",
  "image_url": "text",
  "name": "text",
  "owner": "text",
  "url": "text",
  "item_image_url": "text",
  "item_url": "text"
}

Create MRC401 Token

post
Path parameters
mrc400idstring · min: 40 · max: 40Required

MRC400 Token ID

Query parameters
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/{mrc400id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

GET MRC401 Token

get
Path parameters
mrc400idstringRequired

MRC401 Token ID

Example: MRC400_db7da6bc848ba62e621aede40f75dc760_0000000000000000000000000000000000000001
Responses
200
successful operation
*/*
404
MRC400 not found
get
GET /mrc401/{mrc401id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "owner": "text",
  "mrc400": "text",
  "item_url": "text",
  "item_image_url": "text",
  "groupid": "text",
  "createdate": 1,
  "initial_reserve": "text",
  "initial_token": "text",
  "meltint_fee": "text",
  "melting_date": 1,
  "transferable": "Permanent",
  "sell_date": 1,
  "sell_fee": "text",
  "sell_price": "text",
  "sell_token": "text",
  "auction_date": 1,
  "auction_end": 1,
  "auction_bidding_unit": "text",
  "auction_start_price": "text",
  "auction_buynow_price": "text",
  "auction_current_price": "text",
  "auction_current_bidder": "text",
  "last_trade_date": 1,
  "last_trade_amount": "text",
  "last_trade_token": "text",
  "last_trade_type": "Auction"
}

Transfer ownership of the MRC401 token to another user.

post
Path parameters
mrc401idstring · min: 81 · max: 81Required

MRC401 Token ID

Query parameters
fromAddrstring · Metacoin Address · min: 40 · max: 40Required

Current owner of item MRC401

toAddrstring · Metacoin Address · min: 40 · max: 40Required

Address to receive ownership of MRC401 token

tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat fromAddr, toAddr, url, tkey
  • ex) ecdsa_sign(privatekey of owner address, fromAddr +'|'+ toAddr +'|'+ mrc401id +'|'+tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/transfer/{mrc401id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

Sell MRC401 Token

post
  • Sell ​​MRC401 tokens.
  • If other users purchase tokens, they will receive the specified amount of sales.
  • If sell_fee is 10, 10% of the transaction amount will be transferred to the MRC400 token holder designated in the MRC401 token, and only 90% of the fee excluding the 10% fee will be received by the MRC401 token holder.
  • If the value of sell_fee is 0, no commission is paid.
Path parameters
mrc400idstring · min: 40 · max: 40Required
  • MRC400 Token ID
  • The mrc400 token ID of the mrc401 item specified in itemdata.
Query parameters
sellerstring · Metacoin AdderessOptional
tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat seller, itemdata, tkey
  • ex) ecdsa_sign(privatekey of owner address, seller +'|'+ itemdata +'|'+ tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/sell HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

MRC401 token sale canceled

post
Path parameters
mrc400idstring · min: 40 · max: 40Required
  • MRC400 Token ID
  • The mrc400 token ID of the mrc401 item specified in itemdata.
Query parameters
sellerstring · Metacoin AdderessOptional

MRC401 Token owner address

itemdatastring[] · min: 1 · max: 100Optional
  • MRC401 Token id list to be sale cancel
  • It is the MRC401 Token belonging to the token specified in mrc400id
Example: {"MRC400_db7da6bc848ba62e621aede40f75dc760_0000000000000000000000000000000000000001","MRC400_db7da6bc848ba62e621aede40f75dc760_0000000000000000000000000000000000000002"}
tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat seller, itemdata, tkey
  • ex) ecdsa_sign(privatekey of owner address, seller +'|'+ itemdata +'|'+ tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/unsell HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

Buy MRC401 Token

post
Path parameters
mrc401idstring · min: 81 · max: 81Required

MRC401 Token ID

Example: MRC400_dd1605be6960d9d6ba7bbeed9da033980_0000000000000000000000000000000000000001
Query parameters
buyerstring · Metacoin AdderessOptional

MRC401 Token buyer address

tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat mrc401id, tkey
  • ex) ecdsa_sign(privatekey of owner address, mrc401id +'|'+ tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/buy/{mrc401id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

Melt MRC401

post
  • Melt the MRC401 token.
  • Once melted, the item cannot be transferred or sold to others.
  • When the MRC401 Token is created, it will be received in the owner's wallet as much as the initial_price.
  • If the meltint_fee is 10, 10% of the initial_price will be transferred to the MRC400 token holder specified in the MRC401 token, and only 90% of the fee excluding the 10% fee will be received by the MRC401 token holder.
  • If the value of meltint_fee is 0, no fee is paid.
Path parameters
mrc401idstring · min: 81 · max: 81Required

MRC401 Token ID

Query parameters
tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat mrc401id, tkey
  • ex) ecdsa_sign(privatekey of owner address, mrc401id +'|'+ tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/melt/{mrc401id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

Auction MRC401 Token

post
  • Auction ​​MRC401 tokens.
  • You can cancel an auction using the /mrc401/unauction protocol.
  • If there is a bidder, the auction cannot be canceled.
  • If sell_fee is 10, 10% of the transaction amount will be transferred to the MRC400 token holder designated in the MRC401 token, and only 90% of the fee excluding the 10% fee will be received by the MRC401 token holder.
  • If the value of sell_fee is 0, no commission is paid.
Path parameters
mrc400idstring · min: 40 · max: 40Required
  • MRC400 Token ID
  • The mrc400 token ID of the mrc401 item specified in itemdata.
Query parameters
sellerstring · Metacoin AdderessOptional
tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat seller, itemdata, tkey
  • ex) ecdsa_sign(privatekey of owner address, seller +'|'+ itemdata +'|'+ tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/auction HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

MRC401 token auction canceled

post
  • If there is a bidder, the auction cannot be canceled.
Path parameters
mrc400idstring · min: 40 · max: 40Required
  • MRC400 Token ID
  • The mrc400 token ID of the mrc401 item specified in itemdata.
Query parameters
sellerstring · Metacoin AdderessOptional

MRC401 Token owner address

itemdatastring[] · min: 1 · max: 100Optional
  • MRC401 Token id list to be sale cancel
  • It is the MRC401 Token belonging to the token specified in mrc400id
Example: {"MRC400_db7da6bc848ba62e621aede40f75dc760_0000000000000000000000000000000000000001","MRC400_db7da6bc848ba62e621aede40f75dc760_0000000000000000000000000000000000000002"}
tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

signaturestring · base64Required
  • ECDSA sign for concat seller, itemdata, tkey
  • ex) ecdsa_sign(privatekey of owner address, seller +'|'+ itemdata +'|'+ tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/unauction HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

Bid MRC401 Token

post
Path parameters
mrc401idstring · min: 81 · max: 81Required

MRC401 Token ID

Example: MRC400_dd1605be6960d9d6ba7bbeed9da033980_0000000000000000000000000000000000000001
Query parameters
buyerstring · Metacoin AdderessOptional

MRC401 Token auction bidder address

tkeystringRequired

Temporary key for Sign(return value of GET /getkey/transfer)

amountstring · integer · min: 1 · max: 1e+40Optional
  • auction bid amount
  • If there are no bidders, it must be equal to or greater than the starting price of the auction.
  • If there is a bidder, it must be greater than the current bid amount.
  • The bid amount must be equal to the auction opening price or the auction opening price plus a multiple of the auction bid units.
  • If there are no bidders and the auction start price is 100 and the bid unit is 5, it must be 100, 105, 110, ...
  • If there is a bidder, the current bid is 120, the auction starting price is 100, and the bid unit is 5, it should be 125, 130, 135, ...
Example: 100
tokenstring · integer · min: 1 · max: 1e+40Optional
  • This value should be the ID of the token specified to be used in the auction.
Example: 0
signaturestring · base64Required
  • ECDSA sign for concat mrc401id, amount, token, tkey
  • ex) ecdsa_sign(privatekey of owner address, mrc401id +'|'+ amount + '|' + token + '|' + tkey)
Responses
200
successful operation
*/*
404
MRC400 not found
post
POST /mrc401/bid/{mrc401id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}

Finish MRC401 token auction

get
  • Process the auction closing.
  • This replaces the JobScheduler inside the BlockChain.
  • It can be called without permission or signature, and the auction is closed according to the already established procedure.
  • If you call it before the auction end time, you will get an error.
  • If you call for an auction that has already ended, you will get an error.
Path parameters
mrc401idstring · min: 81 · max: 81Required

MRC401 Token ID

Example: MRC400_dd1605be6960d9d6ba7bbeed9da033980_0000000000000000000000000000000000000001
Responses
200
successful operation
*/*
404
MRC400 not found
get
GET /mrc401/auctionfinish/{mrc401id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
  "transaction_id": "text"
}
  • NFT(Non-fungible token) is a digital asset that has its own identifiers and unique such as game items or masterpiece and cannot be replaced by another.
  • Support single assets for NFT.
  • Copyright Information
  • Burn
  • Mint
  • Transfer
  • Melt
  • Support various media
  • Support Platform
  • Support ShareHolder
  • POSTCreate MRC400 token
  • PUTUpdate MRC400 token
  • GETGet information of MRC400
  • POSTCreate MRC401 Token
  • GETGET MRC401 Token
  • POSTTransfer ownership of the MRC401 token to another user.
  • POSTSell MRC401 Token
  • POSTMRC401 token sale canceled
  • POSTBuy MRC401 Token
  • POSTMelt MRC401
  • POSTAuction MRC401 Token
  • POSTMRC401 token auction canceled
  • POSTBid MRC401 Token
  • GETFinish MRC401 token auction