Difference between revisions of "Blockchain Messages Format and Schemae"

From OIP Wiki
Jump to: navigation, search
(Artifact Publish)
(Artifact Publish)
Line 45: Line 45:
 
:"oip-041":{
 
:"oip-041":{
 
::"artifact":{
 
::"artifact":{
:::"publisher": "$PublisherAddress",
+
:::"[[Specification#Publisher_Address|publisher]]": "string",
:::"timestamp": 1234567890,
+
:::"timestamp": 10 digit int,
:::"type": "$type",
+
:::"[[Variable Definitions#type|type]]": "string",
 
:::"info":{
 
:::"info":{
::::"title": "$ArtifactTitle",
+
::::"[[Variable Definitions#title|title]]": "string",
::::"description": "$ArtifactDescription",
+
::::"[[Variable Definitions#description|description]]": "string",
::::"year": $Year,
+
::::"[[Variable Definitions#year|year]]": 4 digit int,
 
::::"extraInfo":{
 
::::"extraInfo":{
:::::"artist": "$Artist",
+
:::::"[[Variable Definitions#artist|artist]]": "string",
:::::"company": "$Company",
+
:::::"[[Variable Definitions#company|company]]": "string",
:::::"tags":[
+
:::::"[[Variable Definitions#tags|tags]]":[
::::::"$artifactTag1",
+
::::::"string",
::::::"$artifactTag2"
+
::::::"string"
 
::::::]
 
::::::]
 
:::::}
 
:::::}
 
::::},
 
::::},
 
:::"payment":{
 
:::"payment":{
::::"fiat": "$fiatID",
+
::::"[[Variable Definitions#fiat|fiat]]": "string",
::::[[Variable Definitions#Scale | "scale": $scale,]]
+
::::"[[Variable Definitions#scale|scale]]": int,
::::"sugTip":[
+
::::"[[Variable Definitions#sugTip|sugTip]]":[
:::::$sugTipValue1,
+
:::::int,
:::::$sugTipValue2,
+
:::::int,
:::::$sugTipValue3,
+
:::::int
 
:::::],
 
:::::],
:::::"addresses": {
+
::::"[[Variable Definitions#addresses|addresses]]": {
::::::"btc":"$BitcoinAddress"
+
:::::"three letter string":"string",
}
+
:::::"three letter string":"string"
},
+
::::},
"storage":{
+
::::"[[Variable Definitions#tokens|tokens]]": {
"network": "IPFS",
+
:::::"STRING": int,
"location": "$IPFSAddress,
+
:::::"STRING": int
"files":[
+
::::}
{
+
::::},
"disallowBuy": boolean,
+
:::"storage":{
"dname": "$DisplayName",
+
::::"[[Variable Definitions#network|network]]": "string",
"duration": $DurationInt,
+
::::"[[Variable Definitions#location|location]]": "string,
"fname": "$FileName",
+
::::"files":[
"fsize": $fileSizeInBytes,
+
:::::{
"minPlay": "$minPlayPriceUSD",
+
::::::"[[Variable Definitions#disBuy|disBuy]]": boolean,
"sugPlay": "$suggestedPlayPriceUSD",
+
::::::"[[Variable Definitions#disPlay|disPlay]]": boolean,
"minBuy": "$minBuyyPriceUSD",
+
::::::"dname": "$DisplayName",
"sugBuy": "$suggestedBuyPriceUSD",
+
::::::"duration": $DurationInt,
"promo": "$CutForPromoterSales",
+
::::::"fname": "$FileName",
"retail": "$CutForPlatformSales",
+
::::::"fsize": $fileSizeInBytes,
"ptpFT": $pinToPlayFreeThreshold,
+
::::::"sugPlay": "$suggestedPlayPriceUSD",
"ptpDT": $pinToPlayDiscountThreshold,
+
::::::"minPlay": "$minPlayPriceUSD",
"ptpDA": $pinToPlayDiscountAmount,
+
::::::"sugBuy": "$suggestedBuyPriceUSD",
"type": "$MediaType",
+
::::::"minBuy": "$minBuyyPriceUSD",
"tokenlyID": "$SongTokenlyID"
+
::::::"disPer": "$disPer",
},
+
::::::"promo": "$PromoterCut",
        },
+
::::::"retail": "$RetailerCut",
        "signature": "$IPFSAddress-$PublisherAddress-$timestamp"
+
::::::"ptpFT": $pinToPlayFreeThreshold,
}
+
::::::"ptpDT": $pinToPlayDiscountThreshold,
 +
::::::"ptpDA": $pinToPlayDiscountAmount,
 +
::::::"type": "$MediaType",
 +
::::::"tokenlyID": "$SongTokenlyID"
 +
:::::}
 +
::::},
 +
:::"signature": "$IPFSAddress-$PublisherAddress-$timestamp"
 +
::}
 
}
 
}
  

Revision as of 06:44, 23 November 2017

Registration Messages

Register Publisher

{
	"oip-pub": {
		"register": {
			"alias": "$PublisherAlias",
			"address": "$PublisherAddress",
			"timestamp": $UnixTime,
			"info": {
				"emailmd5": "$md5HashOfEmail",
				"avatarNetwork": "$IPFSorBittorrentorHTTP"
				"avatar": "$NetworkAddressOfAvatarImage
				"bitmessage": "$bitmessageAddress",
				},
			"verification": {
				"IMDB": "$IMDBArtistUrl",
				"MusicBrainz": "$MusicBrainzArtistURL",
				"Twitter": "$TwitterVerificationURL",
				"Facebook": $FacebookVerificationURL"
				}
			},
		"signature": "$RegisterPublisherSignature"
		},
	"txid": "$TXID",
	"block": $Block
}

deprecated register publisher

Register Promoter

Register Autominer

Register Autominer Pool

Register Retailer

Artifact Messages

Artifact Publish

{

"oip-041":{
"artifact":{
"publisher": "string",
"timestamp": 10 digit int,
"type": "string",
"info":{
"title": "string",
"description": "string",
"year": 4 digit int,
"extraInfo":{
"artist": "string",
"company": "string",
"tags":[
"string",
"string"
]
}
},
"payment":{
"fiat": "string",
"scale": int,
"sugTip":[
int,
int,
int
],
"addresses": {
"three letter string":"string",
"three letter string":"string"
},
"tokens": {
"STRING": int,
"STRING": int
}
},
"storage":{
"network": "string",
"location": "string,
"files":[
{
"disBuy": boolean,
"disPlay": boolean,
"dname": "$DisplayName",
"duration": $DurationInt,
"fname": "$FileName",
"fsize": $fileSizeInBytes,
"sugPlay": "$suggestedPlayPriceUSD",
"minPlay": "$minPlayPriceUSD",
"sugBuy": "$suggestedBuyPriceUSD",
"minBuy": "$minBuyyPriceUSD",
"disPer": "$disPer",
"promo": "$PromoterCut",
"retail": "$RetailerCut",
"ptpFT": $pinToPlayFreeThreshold,
"ptpDT": $pinToPlayDiscountThreshold,
"ptpDA": $pinToPlayDiscountAmount,
"type": "$MediaType",
"tokenlyID": "$SongTokenlyID"
}
},
"signature": "$IPFSAddress-$PublisherAddress-$timestamp"
}

}

Artifact Edit

{
	"oip-041":{
		"editArtifact":{
			"txid":"$artifactID",
			"timestamp":1234567890,
			"patch":{
				"add":[
					{
					"path":"/payment/tokens/mtcproducer",
					"value":""
					}
				],
				"replace":[
					{
					"path":"/storage/files/3/fname",
					"value":"birthdayepFirst.jpg"
					},
					{
					"path":"/storage/files/3/dname",
					"value":"Cover Art 2"
					},
					{
					"path":"/info/title",
					"value":"Happy Birthday"
					},
					{
					"path":"/timestamp",
					"value":1481420001
					}
				],
				"remove":[
					{
					"path":"/payment/tokens/mtmproducer"
					},
					{
					"path":"/storage/files/0/sugBuy"
					}
				]
			}
		}
	},
	"signature":"$txid-$MD5HashOfPatch-$timestamp"
}

Artifact Transfer

{
	"oip-041":{
		"transferArtifact":{
			"txid":"$artifactID",
			"to":"$newPublisherAddress",
			"from":"$oldPublisherAddress",
			"timestamp":1234567890
		},
	"signature":"$artifactID-$newPublisherAddress-$oldPublisherAddress-$timestamp"
	}
}

Artifact Deactivate

{
	"oip-041":{
		"deactivateArtifact":{
			"txid":"$artifactID",
			"timestamp":1234567890
		},
	"signature":"$txid-$publisher-$timestamp"
	}
}

Historian Messages

Historian Datapoint

Historian Summary