From 65316f5cb19f7f051febdfa93aaf2e907cb38d2f Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:32:22 +0800 Subject: [PATCH 01/13] BMIP-775 is the Bytom Asset Naming Standard based PPk ODIN naming protocol. --- bmip-0775.mediawiki | 129 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 bmip-0775.mediawiki diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki new file mode 100644 index 0000000..07c6960 --- /dev/null +++ b/bmip-0775.mediawiki @@ -0,0 +1,129 @@ +BMIP: 775 +Layer: Bytom Asset Protocol(BAP) +Title: Bytom Asset Naming Standard +Author: PPk community +Comments-Summary: No comments yet. +Comments-URI: +Status: Draft +Type: Standards Track +Created: 2019-12-23 + + +1.Abstract + +Based the cross-chain design of the Bytom project, we can establish a unique naming system based blockchain for the Bytom asset, by integrating the symbol of the asset that issued on the Bytom main-chain with the ODIN naming protocol from the PPk community. Further more, we can define and implement the universal interfaces such as the asset information and transaction services , which would help the development of new digital asset applications across the Bytom main-chain,Bystack side-chains and more other chains and platforms. + +2.Specification + +2.1 Naming Scheme +The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt) . +The detail is as follows: + +URI Scheme: + ppk:btm/asset/[SYMBOL]/ + +Comments: + "ppk:btm" is the root ODIN that had been registered by Bytom project. + "asset" is second-level extension identifier witch means the asset namespace. + "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) + +Examples: + ppk:btm/asset/BHT/ + ppk:btm/asset/USDT/ + +Special case: + For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. + +2.2 Duplicate asset symbol conflict + +While creating a new asset of the Bytom main-chain, the entered asset symbol is only checked on the client node, and there is no check on the main-chain for duplicates. Therefore, the naming specification defines here that the first transaction record issued on the chain shall own the symbol code. + +2.3 The information and transaction service interfaces related to the Bytom asset + +Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), +and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), +we can use the naming scheme to define Bytom application interface standards like ERC20/ERC721 of Ethereum. + +Here is an example of getting the USDT asset definition information issued on the Bytom main-chain. +Refer it, we can define more interfaces. + +API URI: + ppk:btm/asset/USDT/metadata()# + +Return: + JSON String,for example: + { + "name":"USDT", //the name of the token.(string shoud be less than 30 characters) + "symbol":"USDT", //symbol code.(all letters need to be capitalized) + "type":"token", //asset type(selectable value is coin and token) + "native_id":"4483893ef7d......69a6f5703", //the orginal asset ID on the chain. + "base_coin_uri":"ppk:btm/", //the base coin identifier for carrying the token. + "total_supply": "100000000000000" , //supply, the unit is the smallest like satoshi. use string to avoid too large numbers. Optional + "base_miner_fee":100000, //Minimum miner cost, integer, the unit is the smallest like satoshi. + "min_transfer_amount":100000, //Minimum transfer amount, integer, the unit is the smallest like satoshi. + "decimals" : 8, // the number of decimal places for the smallest unit like satoshi + "logo":"", //Default icon URL + "quorum":1, //Define the threshold number of the possible signing keys that must sign a transaction to issue units of this token. + "issue_timestamp":1524499200, //issued time + "is_bap2":true, //whether is a BAP2-compliant asset. + "reissue":"true", //define the flag whether asset can be issued more than once + "description":"", //include an asset description consisting of arbitrary key-value data - e.g. {"Email":"foo@bar.com"} + "issuance_program":null, //related issued program ID + "decode_program":null, //related decode program ID + "tx_explorer_url":"https://blockmeta.com/tx/" //suggested service for querying transaction. + } + +2.4 Support the Bystack side-chain + +The Bystack side-chain can register the root ODIN by own, and then define the extended identifier specifically for the asset on side-chain, which can carry the relationship to the asset on Bytom main-chain. + +For example: +Suppose an ODIN identifier of a Bystack side-chain is "ppk:bystack/mov/" . +Define the extended identifier specifically for the asset on side-chain such as "ppk:bystack/mov/asset/USDT/" . +Then we can use the API URI as follows to get the definition information of the asset on side-chain : + ppk:bystack/mov/asset/USDT/metadata()# + +In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true} + } + +Comments: + (a)"in" : Whether support cross-chain transfer into side-chain; + (b)"out": Whether support cross-chain transfer out of side-chain; + (c)The definition can be further extended to include more informations for cross-chain transaction. + +The application can check the native_id in the asset definition by the identifiers between the main-chain and side-chain, which would help to avoid the risk of incorrect or fake asset. + +2.5 Support the other blockchains + +Other chains can register the root ODIN by own, and then define the extended identifier specifically for the asset on it, which can carry the relationship to the asset on Bytom main-chain. + +For example: +Suppose an ODIN identifier of one Ethereum is "ppk:eth/" . +Define the extended identifier specifically for the ERC20 asset on Ethereum such as "ppk:eth/erc20/USDT" . +Then we can use the API URI as follows to get the definition information of the asset on Ethereum : + ppk:eth/erc20/USDT/metadata()# + +In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain or Bystack side-chains. + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true}, + "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} + } + +Comments: + (a)"in" : Whether support cross-chain transfer into side-chain; + (b)"out": Whether support cross-chain transfer out of side-chain; + (c)The definition can be further extended to include more informations for cross-chain transaction. + +Similarly, the asset issued on the Bytom can carry the relationship to the asset on other chains too. Then the application can easily judge and process the cross-chain transaction of assets between different chains by the unique naming protocol defined here. + +3. Implementation +We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. + https://blockmeta.com/api/v3/list-asset?page=1&limit=100 + +Then we can implement the related asset service interfaces by PPk Transfer Protocl(PTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt). + +Reference source code: + https://github.com/ppkpub/AP/tree/master/php2_coin_api + \ No newline at end of file From 9e7be0e2df2a361828744bab22eabf2bddd0fbf8 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:36:22 +0800 Subject: [PATCH 02/13] Update file format --- bmip-0775.mediawiki | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index 07c6960..a89dd84 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -40,8 +40,8 @@ While creating a new asset of the Bytom main-chain, the entered asset symbol is 2.3 The information and transaction service interfaces related to the Bytom asset -Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), -and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), +Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki) +and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt) we can use the naming scheme to define Bytom application interface standards like ERC20/ERC721 of Ethereum. Here is an example of getting the USDT asset definition information issued on the Bytom main-chain. @@ -51,7 +51,7 @@ API URI: ppk:btm/asset/USDT/metadata()# Return: - JSON String,for example: + JSON Stringfor example: { "name":"USDT", //the name of the token.(string shoud be less than 30 characters) "symbol":"USDT", //symbol code.(all letters need to be capitalized) @@ -122,7 +122,7 @@ Similarly, the asset issued on the Bytom can carry the relationship to the asset We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. https://blockmeta.com/api/v3/list-asset?page=1&limit=100 -Then we can implement the related asset service interfaces by PPk Transfer Protocl(PTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt). +Then we can implement the related asset service interfaces by PPk Transfer ProtoclPTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt. Reference source code: https://github.com/ppkpub/AP/tree/master/php2_coin_api From 7f486cc934ffc716f5f71c772ca74f3b7a8e78da Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:44:56 +0800 Subject: [PATCH 03/13] Update file content --- bmip-0775.mediawiki | 53 ++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index a89dd84..c5c6e1e 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -10,26 +10,27 @@ Created: 2019-12-23 1.Abstract - +=========== Based the cross-chain design of the Bytom project, we can establish a unique naming system based blockchain for the Bytom asset, by integrating the symbol of the asset that issued on the Bytom main-chain with the ODIN naming protocol from the PPk community. Further more, we can define and implement the universal interfaces such as the asset information and transaction services , which would help the development of new digital asset applications across the Bytom main-chain,Bystack side-chains and more other chains and platforms. 2.Specification - +================ 2.1 Naming Scheme The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt) . The detail is as follows: URI Scheme: - ppk:btm/asset/[SYMBOL]/ + +ppk:btm/asset/[SYMBOL]/ Comments: - "ppk:btm" is the root ODIN that had been registered by Bytom project. - "asset" is second-level extension identifier witch means the asset namespace. - "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) +"ppk:btm" is the root ODIN that had been registered by Bytom project. +"asset" is second-level extension identifier witch means the asset namespace. +"SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) Examples: - ppk:btm/asset/BHT/ - ppk:btm/asset/USDT/ +ppk:btm/asset/BHT/ +ppk:btm/asset/USDT/ Special case: For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. @@ -81,17 +82,18 @@ For example: Suppose an ODIN identifier of a Bystack side-chain is "ppk:bystack/mov/" . Define the extended identifier specifically for the asset on side-chain such as "ppk:bystack/mov/asset/USDT/" . Then we can use the API URI as follows to get the definition information of the asset on side-chain : - ppk:bystack/mov/asset/USDT/metadata()# + ppk:bystack/mov/asset/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. - "cross_related_uris" : { - "ppk:btm/asset/USDT/" : {"in":true,"out":true} - } + + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true} + } Comments: - (a)"in" : Whether support cross-chain transfer into side-chain; - (b)"out": Whether support cross-chain transfer out of side-chain; - (c)The definition can be further extended to include more informations for cross-chain transaction. + (a)"in" : Whether support cross-chain transfer into side-chain; + (b)"out": Whether support cross-chain transfer out of side-chain; + (c)The definition can be further extended to include more informations for cross-chain transaction. The application can check the native_id in the asset definition by the identifiers between the main-chain and side-chain, which would help to avoid the risk of incorrect or fake asset. @@ -103,27 +105,28 @@ For example: Suppose an ODIN identifier of one Ethereum is "ppk:eth/" . Define the extended identifier specifically for the ERC20 asset on Ethereum such as "ppk:eth/erc20/USDT" . Then we can use the API URI as follows to get the definition information of the asset on Ethereum : - ppk:eth/erc20/USDT/metadata()# + ppk:eth/erc20/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain or Bystack side-chains. - "cross_related_uris" : { - "ppk:btm/asset/USDT/" : {"in":true,"out":true}, - "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} - } + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true}, + "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} + } Comments: - (a)"in" : Whether support cross-chain transfer into side-chain; - (b)"out": Whether support cross-chain transfer out of side-chain; - (c)The definition can be further extended to include more informations for cross-chain transaction. + (a)"in" : Whether support cross-chain transfer into side-chain; + (b)"out": Whether support cross-chain transfer out of side-chain; + (c)The definition can be further extended to include more informations for cross-chain transaction. Similarly, the asset issued on the Bytom can carry the relationship to the asset on other chains too. Then the application can easily judge and process the cross-chain transaction of assets between different chains by the unique naming protocol defined here. 3. Implementation +================== We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. - https://blockmeta.com/api/v3/list-asset?page=1&limit=100 + https://blockmeta.com/api/v3/list-asset?page=1&limit=100 Then we can implement the related asset service interfaces by PPk Transfer ProtoclPTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt. Reference source code: - https://github.com/ppkpub/AP/tree/master/php2_coin_api +https://github.com/ppkpub/AP/tree/master/php2_coin_api \ No newline at end of file From 08d5c7e9de6dca721735e7e93ffe4956dc58ca47 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:47:10 +0800 Subject: [PATCH 04/13] Update contents --- bmip-0775.mediawiki | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index c5c6e1e..a8278a1 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -16,21 +16,24 @@ Based the cross-chain design of the Bytom project, we can establish a unique nam 2.Specification ================ 2.1 Naming Scheme + The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt) . The detail is as follows: URI Scheme: -ppk:btm/asset/[SYMBOL]/ - + ppk:btm/asset/[SYMBOL]/ + Comments: -"ppk:btm" is the root ODIN that had been registered by Bytom project. -"asset" is second-level extension identifier witch means the asset namespace. -"SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) + + "ppk:btm" is the root ODIN that had been registered by Bytom project. + "asset" is second-level extension identifier witch means the asset namespace. + "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) Examples: -ppk:btm/asset/BHT/ -ppk:btm/asset/USDT/ + + ppk:btm/asset/BHT/ + ppk:btm/asset/USDT/ Special case: For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. From 038ebdf95a233ac395d72c897db24436d716ac45 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:48:46 +0800 Subject: [PATCH 05/13] Update contents --- bmip-0775.mediawiki | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index a8278a1..d5aa81c 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -17,7 +17,7 @@ Based the cross-chain design of the Bytom project, we can establish a unique nam ================ 2.1 Naming Scheme -The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt) . +The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt). The detail is as follows: URI Scheme: @@ -26,9 +26,9 @@ URI Scheme: Comments: - "ppk:btm" is the root ODIN that had been registered by Bytom project. - "asset" is second-level extension identifier witch means the asset namespace. - "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) + "ppk:btm" is the root ODIN that had been registered by Bytom project. + "asset" is second-level extension identifier witch means the asset namespace. + "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) Examples: @@ -36,7 +36,8 @@ Examples: ppk:btm/asset/USDT/ Special case: - For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. + + For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. 2.2 Duplicate asset symbol conflict From 6fb442c824ce6b997398ed9e0f5e299f76daa229 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:50:56 +0800 Subject: [PATCH 06/13] Update contents --- bmip-0775.mediawiki | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index d5aa81c..aad3cf4 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -45,8 +45,8 @@ While creating a new asset of the Bytom main-chain, the entered asset symbol is 2.3 The information and transaction service interfaces related to the Bytom asset -Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki) -and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt) +Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), +and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), we can use the naming scheme to define Bytom application interface standards like ERC20/ERC721 of Ethereum. Here is an example of getting the USDT asset definition information issued on the Bytom main-chain. @@ -56,7 +56,7 @@ API URI: ppk:btm/asset/USDT/metadata()# Return: - JSON Stringfor example: + JSON String,for example: { "name":"USDT", //the name of the token.(string shoud be less than 30 characters) "symbol":"USDT", //symbol code.(all letters need to be capitalized) @@ -129,7 +129,7 @@ Similarly, the asset issued on the Bytom can carry the relationship to the asset We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. https://blockmeta.com/api/v3/list-asset?page=1&limit=100 -Then we can implement the related asset service interfaces by PPk Transfer ProtoclPTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt. +Then we can implement the related asset service interfaces by PPk transfer protocol(PTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt). Reference source code: https://github.com/ppkpub/AP/tree/master/php2_coin_api From 027a1b521f92059c6f2c2aa641a2c0d1669ce653 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:52:05 +0800 Subject: [PATCH 07/13] Update --- bmip-0775.mediawiki | 137 +------------------------------------------- 1 file changed, 1 insertion(+), 136 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index aad3cf4..8028179 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -1,136 +1 @@ -BMIP: 775 -Layer: Bytom Asset Protocol(BAP) -Title: Bytom Asset Naming Standard -Author: PPk community -Comments-Summary: No comments yet. -Comments-URI: -Status: Draft -Type: Standards Track -Created: 2019-12-23 - - -1.Abstract -=========== -Based the cross-chain design of the Bytom project, we can establish a unique naming system based blockchain for the Bytom asset, by integrating the symbol of the asset that issued on the Bytom main-chain with the ODIN naming protocol from the PPk community. Further more, we can define and implement the universal interfaces such as the asset information and transaction services , which would help the development of new digital asset applications across the Bytom main-chain,Bystack side-chains and more other chains and platforms. - -2.Specification -================ -2.1 Naming Scheme - -The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt). -The detail is as follows: - -URI Scheme: - - ppk:btm/asset/[SYMBOL]/ - -Comments: - - "ppk:btm" is the root ODIN that had been registered by Bytom project. - "asset" is second-level extension identifier witch means the asset namespace. - "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) - -Examples: - - ppk:btm/asset/BHT/ - ppk:btm/asset/USDT/ - -Special case: - - For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. - -2.2 Duplicate asset symbol conflict - -While creating a new asset of the Bytom main-chain, the entered asset symbol is only checked on the client node, and there is no check on the main-chain for duplicates. Therefore, the naming specification defines here that the first transaction record issued on the chain shall own the symbol code. - -2.3 The information and transaction service interfaces related to the Bytom asset - -Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), -and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), -we can use the naming scheme to define Bytom application interface standards like ERC20/ERC721 of Ethereum. - -Here is an example of getting the USDT asset definition information issued on the Bytom main-chain. -Refer it, we can define more interfaces. - -API URI: - ppk:btm/asset/USDT/metadata()# - -Return: - JSON String,for example: - { - "name":"USDT", //the name of the token.(string shoud be less than 30 characters) - "symbol":"USDT", //symbol code.(all letters need to be capitalized) - "type":"token", //asset type(selectable value is coin and token) - "native_id":"4483893ef7d......69a6f5703", //the orginal asset ID on the chain. - "base_coin_uri":"ppk:btm/", //the base coin identifier for carrying the token. - "total_supply": "100000000000000" , //supply, the unit is the smallest like satoshi. use string to avoid too large numbers. Optional - "base_miner_fee":100000, //Minimum miner cost, integer, the unit is the smallest like satoshi. - "min_transfer_amount":100000, //Minimum transfer amount, integer, the unit is the smallest like satoshi. - "decimals" : 8, // the number of decimal places for the smallest unit like satoshi - "logo":"", //Default icon URL - "quorum":1, //Define the threshold number of the possible signing keys that must sign a transaction to issue units of this token. - "issue_timestamp":1524499200, //issued time - "is_bap2":true, //whether is a BAP2-compliant asset. - "reissue":"true", //define the flag whether asset can be issued more than once - "description":"", //include an asset description consisting of arbitrary key-value data - e.g. {"Email":"foo@bar.com"} - "issuance_program":null, //related issued program ID - "decode_program":null, //related decode program ID - "tx_explorer_url":"https://blockmeta.com/tx/" //suggested service for querying transaction. - } - -2.4 Support the Bystack side-chain - -The Bystack side-chain can register the root ODIN by own, and then define the extended identifier specifically for the asset on side-chain, which can carry the relationship to the asset on Bytom main-chain. - -For example: -Suppose an ODIN identifier of a Bystack side-chain is "ppk:bystack/mov/" . -Define the extended identifier specifically for the asset on side-chain such as "ppk:bystack/mov/asset/USDT/" . -Then we can use the API URI as follows to get the definition information of the asset on side-chain : - ppk:bystack/mov/asset/USDT/metadata()# - -In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. - - "cross_related_uris" : { - "ppk:btm/asset/USDT/" : {"in":true,"out":true} - } - -Comments: - (a)"in" : Whether support cross-chain transfer into side-chain; - (b)"out": Whether support cross-chain transfer out of side-chain; - (c)The definition can be further extended to include more informations for cross-chain transaction. - -The application can check the native_id in the asset definition by the identifiers between the main-chain and side-chain, which would help to avoid the risk of incorrect or fake asset. - -2.5 Support the other blockchains - -Other chains can register the root ODIN by own, and then define the extended identifier specifically for the asset on it, which can carry the relationship to the asset on Bytom main-chain. - -For example: -Suppose an ODIN identifier of one Ethereum is "ppk:eth/" . -Define the extended identifier specifically for the ERC20 asset on Ethereum such as "ppk:eth/erc20/USDT" . -Then we can use the API URI as follows to get the definition information of the asset on Ethereum : - ppk:eth/erc20/USDT/metadata()# - -In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain or Bystack side-chains. - "cross_related_uris" : { - "ppk:btm/asset/USDT/" : {"in":true,"out":true}, - "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} - } - -Comments: - (a)"in" : Whether support cross-chain transfer into side-chain; - (b)"out": Whether support cross-chain transfer out of side-chain; - (c)The definition can be further extended to include more informations for cross-chain transaction. - -Similarly, the asset issued on the Bytom can carry the relationship to the asset on other chains too. Then the application can easily judge and process the cross-chain transaction of assets between different chains by the unique naming protocol defined here. - -3. Implementation -================== -We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. - https://blockmeta.com/api/v3/list-asset?page=1&limit=100 - -Then we can implement the related asset service interfaces by PPk transfer protocol(PTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt). - -Reference source code: -https://github.com/ppkpub/AP/tree/master/php2_coin_api - \ No newline at end of file +BMIP: 775 Layer: Bytom Asset Protocol(BAP) Title: Bytom Asset Naming Standard Author: PPk community Comments-Summary: No comments yet. Comments-URI: Status: Draft Type: Standards Track Created: 2019-12-23 1.Abstract =========== Based the cross-chain design of the Bytom project, we can establish a unique naming system based blockchain for the Bytom asset, by integrating the symbol of the asset that issued on the Bytom main-chain with the ODIN naming protocol from the PPk community. Further more, we can define and implement the universal interfaces such as the asset information and transaction services , which would help the development of new digital asset applications across the Bytom main-chain,Bystack side-chains and more other chains and platforms. 2.Specification ================ 2.1 Naming Scheme The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt). The detail is as follows: URI Scheme: ppk:btm/asset/[SYMBOL]/ Comments: "ppk:btm" is the root ODIN that had been registered by Bytom project. "asset" is second-level extension identifier witch means the asset namespace. "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) Examples: ppk:btm/asset/BHT/ ppk:btm/asset/USDT/ Special case: For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. 2.2 Duplicate asset symbol conflict While creating a new asset of the Bytom main-chain, the entered asset symbol is only checked on the client node, and there is no check on the main-chain for duplicates. Therefore, the naming specification defines here that the first transaction record issued on the chain shall own the symbol code. 2.3 The information and transaction service interfaces related to the Bytom asset Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), we can use the naming scheme to define Bytom application interface standards like ERC20/ERC721 of Ethereum. Here is an example of getting the USDT asset definition information issued on the Bytom main-chain. Refer it, we can define more interfaces. API URI: ppk:btm/asset/USDT/metadata()# Return: JSON String,for example: { "name":"USDT", //the name of the token.(string shoud be less than 30 characters) "symbol":"USDT", //symbol code.(all letters need to be capitalized) "type":"token", //asset type(selectable value is coin and token) "native_id":"4483893ef7d......69a6f5703", //the orginal asset ID on the chain. "base_coin_uri":"ppk:btm/", //the base coin identifier for carrying the token. "total_supply": "100000000000000" , //supply, the unit is the smallest like satoshi. use string to avoid too large numbers. Optional "base_miner_fee":100000, //Minimum miner cost, integer, the unit is the smallest like satoshi. "min_transfer_amount":100000, //Minimum transfer amount, integer, the unit is the smallest like satoshi. "decimals" : 8, // the number of decimal places for the smallest unit like satoshi "logo":"", //Default icon URL "quorum":1, //Define the threshold number of the possible signing keys that must sign a transaction to issue units of this token. "issue_timestamp":1524499200, //issued time "is_bap2":true, //whether is a BAP2-compliant asset. "reissue":"true", //define the flag whether asset can be issued more than once "description":"", //include an asset description consisting of arbitrary key-value data - e.g. {"Email":"foo@bar.com"} "issuance_program":null, //related issued program ID "decode_program":null, //related decode program ID "tx_explorer_url":"https://blockmeta.com/tx/" //suggested service for querying transaction. } 2.4 Support the Bystack side-chain The Bystack side-chain can register the root ODIN by own, and then define the extended identifier specifically for the asset on side-chain, which can carry the relationship to the asset on Bytom main-chain. For example: Suppose an ODIN identifier of a Bystack side-chain is "ppk:bystack/mov/" . Define the extended identifier specifically for the asset on side-chain such as "ppk:bystack/mov/asset/USDT/" . Then we can use the API URI as follows to get the definition information of the asset on side-chain : ppk:bystack/mov/asset/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. "cross_related_uris" : { "ppk:btm/asset/USDT/" : {"in":true,"out":true} } Comments: (a)"in" : Whether support cross-chain transfer into side-chain; (b)"out": Whether support cross-chain transfer out of side-chain; (c)The definition can be further extended to include more informations for cross-chain transaction. The application can check the native_id in the asset definition by the identifiers between the main-chain and side-chain, which would help to avoid the risk of incorrect or fake asset. 2.5 Support the other blockchains Other chains can register the root ODIN by own, and then define the extended identifier specifically for the asset on it, which can carry the relationship to the asset on Bytom main-chain. For example: Suppose an ODIN identifier of one Ethereum is "ppk:eth/" . Define the extended identifier specifically for the ERC20 asset on Ethereum such as "ppk:eth/erc20/USDT" . Then we can use the API URI as follows to get the definition information of the asset on Ethereum : ppk:eth/erc20/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain or Bystack side-chains. "cross_related_uris" : { "ppk:btm/asset/USDT/" : {"in":true,"out":true}, "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} } Comments: (a)"in" : Whether support cross-chain transfer into side-chain; (b)"out": Whether support cross-chain transfer out of side-chain; (c)The definition can be further extended to include more informations for cross-chain transaction. Similarly, the asset issued on the Bytom can carry the relationship to the asset on other chains too. Then the application can easily judge and process the cross-chain transaction of assets between different chains by the unique naming protocol defined here. 3. Implementation ================== We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. https://blockmeta.com/api/v3/list-asset?page=1&limit=100 Then we can implement the related asset service interfaces by PPk transfer protocol(PTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt). Reference source code: https://github.com/ppkpub/AP/tree/master/php2_coin_api \ No newline at end of file From f709bad2daef47de013e6170828eb3f763e6294e Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:52:49 +0800 Subject: [PATCH 08/13] Update --- bmip-0775.mediawiki | 137 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 136 insertions(+), 1 deletion(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index 8028179..aad3cf4 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -1 +1,136 @@ -BMIP: 775 Layer: Bytom Asset Protocol(BAP) Title: Bytom Asset Naming Standard Author: PPk community Comments-Summary: No comments yet. Comments-URI: Status: Draft Type: Standards Track Created: 2019-12-23 1.Abstract =========== Based the cross-chain design of the Bytom project, we can establish a unique naming system based blockchain for the Bytom asset, by integrating the symbol of the asset that issued on the Bytom main-chain with the ODIN naming protocol from the PPk community. Further more, we can define and implement the universal interfaces such as the asset information and transaction services , which would help the development of new digital asset applications across the Bytom main-chain,Bystack side-chains and more other chains and platforms. 2.Specification ================ 2.1 Naming Scheme The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt). The detail is as follows: URI Scheme: ppk:btm/asset/[SYMBOL]/ Comments: "ppk:btm" is the root ODIN that had been registered by Bytom project. "asset" is second-level extension identifier witch means the asset namespace. "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) Examples: ppk:btm/asset/BHT/ ppk:btm/asset/USDT/ Special case: For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. 2.2 Duplicate asset symbol conflict While creating a new asset of the Bytom main-chain, the entered asset symbol is only checked on the client node, and there is no check on the main-chain for duplicates. Therefore, the naming specification defines here that the first transaction record issued on the chain shall own the symbol code. 2.3 The information and transaction service interfaces related to the Bytom asset Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), we can use the naming scheme to define Bytom application interface standards like ERC20/ERC721 of Ethereum. Here is an example of getting the USDT asset definition information issued on the Bytom main-chain. Refer it, we can define more interfaces. API URI: ppk:btm/asset/USDT/metadata()# Return: JSON String,for example: { "name":"USDT", //the name of the token.(string shoud be less than 30 characters) "symbol":"USDT", //symbol code.(all letters need to be capitalized) "type":"token", //asset type(selectable value is coin and token) "native_id":"4483893ef7d......69a6f5703", //the orginal asset ID on the chain. "base_coin_uri":"ppk:btm/", //the base coin identifier for carrying the token. "total_supply": "100000000000000" , //supply, the unit is the smallest like satoshi. use string to avoid too large numbers. Optional "base_miner_fee":100000, //Minimum miner cost, integer, the unit is the smallest like satoshi. "min_transfer_amount":100000, //Minimum transfer amount, integer, the unit is the smallest like satoshi. "decimals" : 8, // the number of decimal places for the smallest unit like satoshi "logo":"", //Default icon URL "quorum":1, //Define the threshold number of the possible signing keys that must sign a transaction to issue units of this token. "issue_timestamp":1524499200, //issued time "is_bap2":true, //whether is a BAP2-compliant asset. "reissue":"true", //define the flag whether asset can be issued more than once "description":"", //include an asset description consisting of arbitrary key-value data - e.g. {"Email":"foo@bar.com"} "issuance_program":null, //related issued program ID "decode_program":null, //related decode program ID "tx_explorer_url":"https://blockmeta.com/tx/" //suggested service for querying transaction. } 2.4 Support the Bystack side-chain The Bystack side-chain can register the root ODIN by own, and then define the extended identifier specifically for the asset on side-chain, which can carry the relationship to the asset on Bytom main-chain. For example: Suppose an ODIN identifier of a Bystack side-chain is "ppk:bystack/mov/" . Define the extended identifier specifically for the asset on side-chain such as "ppk:bystack/mov/asset/USDT/" . Then we can use the API URI as follows to get the definition information of the asset on side-chain : ppk:bystack/mov/asset/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. "cross_related_uris" : { "ppk:btm/asset/USDT/" : {"in":true,"out":true} } Comments: (a)"in" : Whether support cross-chain transfer into side-chain; (b)"out": Whether support cross-chain transfer out of side-chain; (c)The definition can be further extended to include more informations for cross-chain transaction. The application can check the native_id in the asset definition by the identifiers between the main-chain and side-chain, which would help to avoid the risk of incorrect or fake asset. 2.5 Support the other blockchains Other chains can register the root ODIN by own, and then define the extended identifier specifically for the asset on it, which can carry the relationship to the asset on Bytom main-chain. For example: Suppose an ODIN identifier of one Ethereum is "ppk:eth/" . Define the extended identifier specifically for the ERC20 asset on Ethereum such as "ppk:eth/erc20/USDT" . Then we can use the API URI as follows to get the definition information of the asset on Ethereum : ppk:eth/erc20/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain or Bystack side-chains. "cross_related_uris" : { "ppk:btm/asset/USDT/" : {"in":true,"out":true}, "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} } Comments: (a)"in" : Whether support cross-chain transfer into side-chain; (b)"out": Whether support cross-chain transfer out of side-chain; (c)The definition can be further extended to include more informations for cross-chain transaction. Similarly, the asset issued on the Bytom can carry the relationship to the asset on other chains too. Then the application can easily judge and process the cross-chain transaction of assets between different chains by the unique naming protocol defined here. 3. Implementation ================== We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. https://blockmeta.com/api/v3/list-asset?page=1&limit=100 Then we can implement the related asset service interfaces by PPk transfer protocol(PTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt). Reference source code: https://github.com/ppkpub/AP/tree/master/php2_coin_api \ No newline at end of file +BMIP: 775 +Layer: Bytom Asset Protocol(BAP) +Title: Bytom Asset Naming Standard +Author: PPk community +Comments-Summary: No comments yet. +Comments-URI: +Status: Draft +Type: Standards Track +Created: 2019-12-23 + + +1.Abstract +=========== +Based the cross-chain design of the Bytom project, we can establish a unique naming system based blockchain for the Bytom asset, by integrating the symbol of the asset that issued on the Bytom main-chain with the ODIN naming protocol from the PPk community. Further more, we can define and implement the universal interfaces such as the asset information and transaction services , which would help the development of new digital asset applications across the Bytom main-chain,Bystack side-chains and more other chains and platforms. + +2.Specification +================ +2.1 Naming Scheme + +The unique naming scheme of Bytom asset is based the ODIN scheme(https://ppkpub.github.io/docs/English/EN_PPK_ODIN.txt). +The detail is as follows: + +URI Scheme: + + ppk:btm/asset/[SYMBOL]/ + +Comments: + + "ppk:btm" is the root ODIN that had been registered by Bytom project. + "asset" is second-level extension identifier witch means the asset namespace. + "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) + +Examples: + + ppk:btm/asset/BHT/ + ppk:btm/asset/USDT/ + +Special case: + + For the Bytom coin, it is specifically defined as "ppk:btm/" witch is different from other assets. + +2.2 Duplicate asset symbol conflict + +While creating a new asset of the Bytom main-chain, the entered asset symbol is only checked on the client node, and there is no check on the main-chain for duplicates. Therefore, the naming specification defines here that the first transaction record issued on the chain shall own the symbol code. + +2.3 The information and transaction service interfaces related to the Bytom asset + +Based the Bytom Asset Protocol(BAP02, https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), +and the PPk Application Protocol(PTAP02,https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), +we can use the naming scheme to define Bytom application interface standards like ERC20/ERC721 of Ethereum. + +Here is an example of getting the USDT asset definition information issued on the Bytom main-chain. +Refer it, we can define more interfaces. + +API URI: + ppk:btm/asset/USDT/metadata()# + +Return: + JSON String,for example: + { + "name":"USDT", //the name of the token.(string shoud be less than 30 characters) + "symbol":"USDT", //symbol code.(all letters need to be capitalized) + "type":"token", //asset type(selectable value is coin and token) + "native_id":"4483893ef7d......69a6f5703", //the orginal asset ID on the chain. + "base_coin_uri":"ppk:btm/", //the base coin identifier for carrying the token. + "total_supply": "100000000000000" , //supply, the unit is the smallest like satoshi. use string to avoid too large numbers. Optional + "base_miner_fee":100000, //Minimum miner cost, integer, the unit is the smallest like satoshi. + "min_transfer_amount":100000, //Minimum transfer amount, integer, the unit is the smallest like satoshi. + "decimals" : 8, // the number of decimal places for the smallest unit like satoshi + "logo":"", //Default icon URL + "quorum":1, //Define the threshold number of the possible signing keys that must sign a transaction to issue units of this token. + "issue_timestamp":1524499200, //issued time + "is_bap2":true, //whether is a BAP2-compliant asset. + "reissue":"true", //define the flag whether asset can be issued more than once + "description":"", //include an asset description consisting of arbitrary key-value data - e.g. {"Email":"foo@bar.com"} + "issuance_program":null, //related issued program ID + "decode_program":null, //related decode program ID + "tx_explorer_url":"https://blockmeta.com/tx/" //suggested service for querying transaction. + } + +2.4 Support the Bystack side-chain + +The Bystack side-chain can register the root ODIN by own, and then define the extended identifier specifically for the asset on side-chain, which can carry the relationship to the asset on Bytom main-chain. + +For example: +Suppose an ODIN identifier of a Bystack side-chain is "ppk:bystack/mov/" . +Define the extended identifier specifically for the asset on side-chain such as "ppk:bystack/mov/asset/USDT/" . +Then we can use the API URI as follows to get the definition information of the asset on side-chain : + ppk:bystack/mov/asset/USDT/metadata()# + +In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. + + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true} + } + +Comments: + (a)"in" : Whether support cross-chain transfer into side-chain; + (b)"out": Whether support cross-chain transfer out of side-chain; + (c)The definition can be further extended to include more informations for cross-chain transaction. + +The application can check the native_id in the asset definition by the identifiers between the main-chain and side-chain, which would help to avoid the risk of incorrect or fake asset. + +2.5 Support the other blockchains + +Other chains can register the root ODIN by own, and then define the extended identifier specifically for the asset on it, which can carry the relationship to the asset on Bytom main-chain. + +For example: +Suppose an ODIN identifier of one Ethereum is "ppk:eth/" . +Define the extended identifier specifically for the ERC20 asset on Ethereum such as "ppk:eth/erc20/USDT" . +Then we can use the API URI as follows to get the definition information of the asset on Ethereum : + ppk:eth/erc20/USDT/metadata()# + +In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain or Bystack side-chains. + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true}, + "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} + } + +Comments: + (a)"in" : Whether support cross-chain transfer into side-chain; + (b)"out": Whether support cross-chain transfer out of side-chain; + (c)The definition can be further extended to include more informations for cross-chain transaction. + +Similarly, the asset issued on the Bytom can carry the relationship to the asset on other chains too. Then the application can easily judge and process the cross-chain transaction of assets between different chains by the unique naming protocol defined here. + +3. Implementation +================== +We can query the issued assets on the Bytom main-chain by the following API, then extract and save the basic asset identification data required by the naming system. + https://blockmeta.com/api/v3/list-asset?page=1&limit=100 + +Then we can implement the related asset service interfaces by PPk transfer protocol(PTTP, https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt). + +Reference source code: +https://github.com/ppkpub/AP/tree/master/php2_coin_api + \ No newline at end of file From c0a80148182970a2a7fb8b631cb9e10cbdd89053 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:56:48 +0800 Subject: [PATCH 09/13] Update --- bmip-0775.mediawiki | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index aad3cf4..fbe9c6a 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -1,12 +1,12 @@ -BMIP: 775 -Layer: Bytom Asset Protocol(BAP) +BMIP: 775 +Layer: Bytom Asset Protocol(BAP) Title: Bytom Asset Naming Standard -Author: PPk community -Comments-Summary: No comments yet. -Comments-URI: -Status: Draft -Type: Standards Track -Created: 2019-12-23 +Author: PPk community +Comments-Summary: No comments yet. +Comments-URI: +Status: Draft +Type: Standards Track +Created: 2019-12-23 1.Abstract @@ -26,9 +26,11 @@ URI Scheme: Comments: - "ppk:btm" is the root ODIN that had been registered by Bytom project. - "asset" is second-level extension identifier witch means the asset namespace. - "SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) +(a)"ppk:btm" is the root ODIN that had been registered by Bytom project. + +(b)"asset" is second-level extension identifier witch means the asset namespace. + +(c)"SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) Examples: @@ -89,10 +91,9 @@ Then we can use the API URI as follows to get the definition information of the ppk:bystack/mov/asset/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. - - "cross_related_uris" : { - "ppk:btm/asset/USDT/" : {"in":true,"out":true} - } +"cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true} +} Comments: (a)"in" : Whether support cross-chain transfer into side-chain; From 1d3929bbe5e82274caf38c296ab6eb0510f690bb Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 13:58:37 +0800 Subject: [PATCH 10/13] Update --- bmip-0775.mediawiki | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index fbe9c6a..095e294 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -26,11 +26,11 @@ URI Scheme: Comments: -(a)"ppk:btm" is the root ODIN that had been registered by Bytom project. +(a)"ppk:btm" is the root ODIN that had been registered by Bytom project. -(b)"asset" is second-level extension identifier witch means the asset namespace. +(b)"asset" is second-level extension identifier witch means the asset namespace. -(c)"SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) +(c)"SYMBOL" is the specific asset symbol which is issued on Bytom main-chain.(All letters need to be capitalized) Examples: @@ -91,9 +91,10 @@ Then we can use the API URI as follows to get the definition information of the ppk:bystack/mov/asset/USDT/metadata()# In the response, provide the following attribute fields which describe the relationship to the asset on Bytom main-chain. -"cross_related_uris" : { - "ppk:btm/asset/USDT/" : {"in":true,"out":true} -} + +"cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true} +} Comments: (a)"in" : Whether support cross-chain transfer into side-chain; From 42b8362cecd781d2d734227b458d86d735b6c241 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Mon, 23 Dec 2019 14:15:27 +0800 Subject: [PATCH 11/13] Update contents --- bmip-0775.mediawiki | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index 095e294..ec74761 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -120,8 +120,8 @@ In the response, provide the following attribute fields which describe the relat } Comments: - (a)"in" : Whether support cross-chain transfer into side-chain; - (b)"out": Whether support cross-chain transfer out of side-chain; + (a)"in" : Whether support cross-chain transfer in; + (b)"out": Whether support cross-chain transfer out; (c)The definition can be further extended to include more informations for cross-chain transaction. Similarly, the asset issued on the Bytom can carry the relationship to the asset on other chains too. Then the application can easily judge and process the cross-chain transaction of assets between different chains by the unique naming protocol defined here. From acd3a8fba8e152e6693f31d2fb320d55b2b490b5 Mon Sep 17 00:00:00 2001 From: ppkpub Date: Wed, 25 Dec 2019 10:58:20 +0800 Subject: [PATCH 12/13] Upload chinese version --- ...7\350\257\206\346\226\271\346\241\210.txt" | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 "bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" diff --git "a/bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" "b/bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" new file mode 100644 index 0000000..64a3115 --- /dev/null +++ "b/bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" @@ -0,0 +1,106 @@ +BMIP: 775 +Layer: Bytom Asset Protocol(BAP) +Title: Bytom Asset Naming Standard +Author: PPkPub +Comments-Summary: No comments yet. +Comments-URI: +Status: Draft +Type: Standards Track +Created: 2019-12-23 + +1.概要(Abstract) + +结合比原主侧链的资产跨链机制,基于主链资产的资产代号(symbol),结合PPk社区的ODIN标识来建立一个比原资产唯一命名标识体系,关联定义和实现资产相关信息和交易服务接口,以方便开发跨比原主侧链、跨其它链和平台的新型数字资产应用。 + + +2.规范(Specification) + +2.1 命名标识定义 +结合PPk社区的ODIN标识来建立一个比原资产唯一命名标识体系,格式定义如下: + ppk:btm/asset/[SYMBOL]/ +其中 + ppk:btm为比原已经注册拥有的根标识前缀; + asset为二级扩展标识,对应资产命名空间; + SYMBOL对应自行发布的具体资产,取值为在比原主链发行时所输入的资产代号, 英文字母需采用大写。 +举例: + ppk:btm/asset/BHT/ + ppk:btm/asset/USDT/ + +注:对于比原币,特别定义标识为 ppk:btm/ ,以区分于其它资产 + +2.2 重名冲突解决方案 +因为在比原主链新建资产时,所输入的资产代号(symbol)只在客户端体现,并不在链上检查是否存在重复,所以此处定义的命名标识规范明确,遇到重复代号的资产,以第一个在链上发行(issue)的交易记录为准,先发行先拥有。 + +2.3 通过命名标识所提供的比原主链资产相关信息和交易服务接口 +可参考比原资产协议BAP2(https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), +结合PPk应用扩展协议PTAP02(https://github.com/ppkpub/docs/tree/master/PTAP/PPK_PTAP_02.txt), +进一步定义类似ERC20/ERC721的应用服务接口标准, +这里以获取比原主链上发行的USDT资产定义数据举例如下,可参考以进一步扩充定义: + +接口URI: + ppk:btm/asset/USDT/metadata()# + +返回结果: + JSON字符串,说明示例如下: + { + "name":"USDT", //币种显示缺省名称,一般为英文 + "symbol":"USDT", //币种代号,英文字母需大写 + "type":"token", //类型,可选取值为coin,token + "native_id":"4483893ef7d......69a6f5703", //对应的链上资产ID + "base_coin_uri":"ppk:btm/", //对于token需要填写对应的基础币种标识 + "total_supply": "100000000000000" , //供应量,以类似satoshi的最小单位,采用字符串避免大数问题,可选 + "min_transfer_amount":100000, //最小转账金额,整数,以类似satoshi的最小单位 + "decimals":8, //由类似satoshi的最小单位换算到标准单位的小数位数 ,如1BTM换算最小单位的小数位数为8 + + "logo":"", //默认图标网址 + "quorum":1, //交易签名门限 + "issue_timestamp":1524499200, //发行时间 + "is_bap2":true, //是否为符合BAP2规范的资产 + "reissue":"true", //是否可以重复发行 + "description":"Bytom Official USDT", //更多说明 + "issuance_program":null, //关联的发行合约地址 + "decode_program":null, //关联的解码合约地址 + + "tx_explorer_url":"https://blockmeta.com/tx/" //建议的交易查询地址前缀 + } + +2.4 命名标识对比原侧链的支持方案 +比原侧链可以自行注册和拥有ODIN根标识,再具体定义扩展标识,并在扩展标识涉及比原资产时,对应关联主链资产标识中的资产ODIN标识。 + +例如: +假设MOV侧链的ODIN标识为 ppk:bystack/mov/ +则可以定义该侧链上的USDT资产对应扩展标识为 ppk:bystack/mov/asset/USDT +并在其资产定义数据结构中,提供下述属性字段,来说明其相关的主链资产标识: + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true} + } +注: +1."in"表示是否支持跨链转入,"out"表示是否支持跨链转出; +2.可以进一步扩充定义涉及跨链交易的更多信息。 + +应用就可以检查主侧链相关资产标识信息中的native_id,并确保一致,避免出错或伪造风险。 + +2.5 命名标识对其它链的支持方案 +其它链可以自行注册和拥有ODIN根标识,再具体定义其链上资产对应的扩展标识,并在涉及比原资产时,对应关联比原资产的ODIN标识。 + +例如: +假设以太坊链的ODIN标识为 ppk:eth/ +则可以定义以太坊链上的USDT资产对应扩展标识为 ppk:eth/erc20/USDT +并在其资产定义数据结构中,提供下述属性字段,来说明其关联的比原主侧链上的资产标识: + "cross_related_uris" : { + "ppk:btm/asset/USDT/" : {"in":true,"out":true}, + "ppk:bystack/mov/asset/USDT/" : {"in":true,"out":true} + } +注: +1."in"表示是否支持跨链转入,"out"表示是否支持跨链转出; +2.可以进一步扩充定义涉及跨链交易的更多信息。 + +同样的,在比原链上也可以关联其它链上的资产标识,这样应用就可以很方便地判断不同链间资产的相关性。 + +3 实现(Implementation) +可以通过下述API接口来查询比原主链上已发行的资产,并提取和保存命名标识体系所需的资产标识基础数据。 +https://blockmeta.com/api/v3/list-asset?page=1&limit=100 + +然后按PPk对等可信传输协议PTTP(https://github.com/ppkpub/docs/blob/master/PPK_PTTP_SPEC.txt)来实现相关的资产服务接口。 +参考源码实现案例:https://github.com/ppkpub/AP/tree/master/php2_coin_api + \ No newline at end of file From 823c6b2d13bc6b03207c78961d70a84b8999e70d Mon Sep 17 00:00:00 2001 From: ppkpub Date: Wed, 1 Jan 2020 20:04:45 +0800 Subject: [PATCH 13/13] Update BIMP775 --- ...20\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" | 3 ++- bmip-0775.mediawiki | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git "a/bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" "b/bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" index 64a3115..b8374d8 100644 --- "a/bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" +++ "b/bimp-0775-CN-\346\257\224\345\216\237\350\265\204\344\272\247\350\267\250\351\223\276\351\200\232\347\224\250\345\221\275\345\220\215\346\240\207\350\257\206\346\226\271\346\241\210.txt" @@ -29,7 +29,7 @@ Created: 2019-12-23 注:对于比原币,特别定义标识为 ppk:btm/ ,以区分于其它资产 2.2 重名冲突解决方案 -因为在比原主链新建资产时,所输入的资产代号(symbol)只在客户端体现,并不在链上检查是否存在重复,所以此处定义的命名标识规范明确,遇到重复代号的资产,以第一个在链上发行(issue)的交易记录为准,先发行先拥有。 +因为在比原主链新建资产时,所输入的资产代号(symbol)只在客户端体现,并不在链上检查是否存在重复,所以此处定义的命名标识规范明确,遇到重复代号的资产,以第一个在链上发行(issue)的交易记录为准,先发行先拥有,其后发行重复资产代号(symbol)的资产将只能使用哈希编号作为唯一标识。 2.3 通过命名标识所提供的比原主链资产相关信息和交易服务接口 可参考比原资产协议BAP2(https://github.com/Bytom/bmips/blob/master/bmip-0002.mediawiki), @@ -55,6 +55,7 @@ Created: 2019-12-23 "logo":"", //默认图标网址 "quorum":1, //交易签名门限 "issue_timestamp":1524499200, //发行时间 + "address_count":"12566", //持有人数 "is_bap2":true, //是否为符合BAP2规范的资产 "reissue":"true", //是否可以重复发行 "description":"Bytom Official USDT", //更多说明 diff --git a/bmip-0775.mediawiki b/bmip-0775.mediawiki index ec74761..2b04258 100644 --- a/bmip-0775.mediawiki +++ b/bmip-0775.mediawiki @@ -43,7 +43,7 @@ Special case: 2.2 Duplicate asset symbol conflict -While creating a new asset of the Bytom main-chain, the entered asset symbol is only checked on the client node, and there is no check on the main-chain for duplicates. Therefore, the naming specification defines here that the first transaction record issued on the chain shall own the symbol code. +While creating a new asset of the Bytom main-chain, the entered asset symbol is only checked on the client node, and there is no check on the main-chain for duplicates. Therefore, the naming specification defines here that the first transaction record issued on the chain shall own the unique symbol code. and the latter assets would use the HASH ID as it's unique symbol in the ODIN name. 2.3 The information and transaction service interfaces related to the Bytom asset @@ -72,6 +72,7 @@ Return: "logo":"", //Default icon URL "quorum":1, //Define the threshold number of the possible signing keys that must sign a transaction to issue units of this token. "issue_timestamp":1524499200, //issued time + "address_count":"12566", //The address counter of holders "is_bap2":true, //whether is a BAP2-compliant asset. "reissue":"true", //define the flag whether asset can be issued more than once "description":"", //include an asset description consisting of arbitrary key-value data - e.g. {"Email":"foo@bar.com"}