CIP: <unassigned>
Title: Blockchain Validated Asset Metadata (BVAM)
Author: Devon Weller <[email protected]>
Discussions-To: https://counterpartytalk.org/t/cip-proposal-blockchain-validated-asset-metadata-bvam/2210
Status: Draft
Type: Informational
Created: 2016-07-22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TX: 73cfb35e1e6bb31b3ddffb41322c46f155970bfae3c40385b171ba02f88985a0 | |
DATA: | |
3d445a495443525445 =DZITCRTE | |
01646e | |
23626c61636b20236261736562616c6c2d636170202344726f702d5a6f6e65207772697474656e206f6e207468652066726f3d445a6e742e205369676e656420627920236272696768746f6e333620616e6420236a756e7365746820687474703a2f2f6269742e6c792f316b356c56360c445a49016303555344017 | |
01e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | |
TX: 6a9013b8684862e9ccfb527bf8f5ea5eb213e77e3970ff2cd8bbc22beb7cebfb | |
DATA: | |
3d445a495443525445 =DZITCRTE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +loon3 is my blockchain ID. https://onename.com/loon3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//jQuery and Webtorrent (https://webtorrent.io/) dependencies | |
var json_source_url = ""; //json data source | |
var filename = ""; //filename.json | |
$.getJSON(json_source_url, function( data ) { | |
var jsonstring = JSON.stringify(data); | |
var blob = new Blob([jsonstring], {type: "application/json"}); | |
var client = new WebTorrent() |
Blockchain Validated Asset Metadata (BVAM) is a method which allows Counterparty Token metadata to be stored off-blockchain yet still be verifiable and inalterable.
http://xcp.ninja is a proof of concept server for creating and storing BVAM json files.
Example BVAM json, http://xcp.ninja/hash/TB2rTB5FdLtqYu31wTmKgy54TYeZSqJgr3.json
Referenced Counterparty Asset, https://counterpartychain.io/asset/A11161111624187815485
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assetname(assetid) { | |
if(assetid != 1){ | |
var b26_digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
var letter_array = b26_digits.split(""); | |
var asset_name = ""; | |
var div; | |
var rem; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assetid(asset_name) { | |
asset_name.toUpperCase(); | |
if(asset_name != "XCP"){ | |
var b26_digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
var name_array = asset_name.split(""); | |
var n = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pdf(i, mu, sigma) { | |
var m = sigma * Math.sqrt(2 * Math.PI); | |
var e = Math.exp(-Math.pow(i - mu, 2) / (2 * Math.pow(sigma, 2))); | |
var point = e / m; | |
return point; | |
} |
NewerOlder