Skip to content

OIP Message Format and Schemae

Devon Read edited this page May 13, 2017 · 1 revision

Publisher Registration

  • Register Publisher:
{
	"publisher-data": {
		"alexandria-publisher": {
			"name": "$PublisherName",
			"address": "$PublisherAddress",
			"timestamp": $UnixTime,
			"emailmd5": "$md5HashOfEmail",
			"bitmessage": "$bitmessageAddress",
			"verifiedPublisher": "$URLofVerificationMessage"
			},
		"signature": "$RegisterPublisherSignature"
		},
	"txid": "$TXID",
	"block": $Block
}

Artifact Messages

  • Publish:
{
	"oip-041":{
		"artifact":{
			"publisher": "$PublisherAddress",
			"timestamp": 1234567890,
			"type": "$type",
			"info":{
				"title": "$ArtifactTitle",
				"description": "$ArtifactDescription",
				"year": $Year,
				"extraInfo":{
					"artist": "$Artist",
					"company": "$Company",
					"tags":[
						"$artifactTag1",
						"$artifactTag2"
						]
					}
				},
			"payment":{
				"fiat": "$fiatID",
				"scale": 1000:1,
				"sugTip":[
					$sugTipValue1,
					$sugTipValue2,
					$sugTipValue3,
					],
				"tokens": {
					"btc":"$BitcoinAddress"
					}
				},
			"storage":{
				"network": "IPFS",
				"location": "$IPFSAddress,
				"files":[
					{
					"disallowBuy": boolean,
					"dname": "$DisplayName",
					"duration": $DurationInt,
					"fname": "$FileName",
					"fsize": $fileSizeInBytes,
					"minPlay": "$minPlayPriceUSD",
					"sugPlay": "$suggestedPlayPriceUSD",
					"minBuy": "$minBuyyPriceUSD",
					"sugBuy": "$suggestedBuyPriceUSD",
					"promo": "$CutForPromoterSales",
					"retail": "$CutForPlatformSales",
					"ptpFT": $pinToPlayFreeThreshold,
					"ptpDT": $pinToPlayDiscountThreshold,
					"ptpDA": $pinToPlayDiscountAmount,
					"type": "$MediaType",
					"tokenlyID": "$SongTokenlyID"
					},
        		},
        "signature": "$IPFSAddress-$PublisherAddress-$timestamp"
	}
}
  • 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"
}
  • Transfer:
{
	"oip-041":{
		"transferArtifact":{
			"txid":"$artifactID",
			"to":"$newPublisherAddress",
			"from":"$oldPublisherAddress",
			"timestamp":1234567890
		},
	"signature":"$artifactID-$newPublisherAddress-$oldPublisherAddress-$timestamp"
	}
}
  • Deactivate:
{
	"oip-041":{
		"deactivateArtifact":{
			"txid":"$artifactID",
			"timestamp":1234567890
		},
	"signature":"$txid-$publisher-$timestamp"
	}
}
Clone this wiki locally