Last active
November 7, 2018 19:42
-
-
Save jcramer/33fc22b73cc234215c4ceac3e787305d to your computer and use it in GitHub Desktop.
P2SH.cash SLP Token Document Schema
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://p2sh.cash/p2sh.token.schema.json", | |
"title": "P2SH.cash Token Document JSON Schema", | |
"description": "Definition file for P2SH.cash SLP token documents that is used to store P2SH variables.", | |
"type": "object", | |
"properties": { | |
"v": { | |
"type": "integer", | |
"description": "Version of P2SH.cash Token Document" | |
}, | |
"o": { | |
"type": "array", | |
"description": "The P2SH addresses being specified", | |
"items": { | |
"type":"object", | |
"properties": { | |
"addr": { | |
"type": "string", | |
"description": "If the P2SH outputs are not included with the token Genesis then the txid containing the P2SH outputs may be defined.", | |
"pattern": "^(bitcoincash:)|^(bchtest:)|^(simpleledger:)|^(slptest:)" | |
}, | |
"bst" : { | |
"type" : "object", | |
"description" : "Properties for the BST template defining the P2SH output", | |
"properties" : { | |
"uri" : { | |
"type" : "string", | |
"description" : "Storage location of the BST document.", | |
"pattern" : "^(bitcoinfile:)|^(http:)|^(https:)" | |
}, | |
"req" : { | |
"type" : "array", | |
"description" : "Sequential input requirements for the BST to reconstructing the P2SH pre-image", | |
"items": [ | |
{ | |
"type" : "object", | |
"description" : "A user defined opcode setting (as integer)", | |
"properties" : { | |
"t": { | |
"type" : "string", | |
"pattern" : "opcode-integer" | |
}, | |
"n": { | |
"type" : "string", | |
"description": "Name of the user defined opcode matching the BST template" | |
}, | |
"v": { | |
"type" : "integer", | |
"description": "Value of the user defined opcode applied to the BST template", | |
"pattern": "[0-9]+" | |
} | |
}, | |
"required": [ "t", "n", "v" ] | |
}, | |
{ | |
"type" : "object", | |
"description" : "A user defined opcode setting (as string)", | |
"properties" : { | |
"t": { | |
"type" : "string", | |
"pattern" : "opcode-string" | |
}, | |
"n": { | |
"type" : "string", | |
"description": "Name of the user defined opcode matching the BST template" | |
}, | |
"v": { | |
"type" : "string", | |
"description": "Value of the user defined opcode applied to the BST template", | |
"pattern": "^(OP_){1}" | |
} | |
}, | |
"required": [ "t", "n", "v" ] | |
}, | |
{ | |
"type" : "object", | |
"description": "A user defined data push", | |
"properties": { | |
"t": { | |
"type":"string", | |
"pattern": "pushdata" | |
}, | |
"v": { | |
"type":"string", | |
"description": "Hexidecimal data to be pushed onto the stack", | |
"pattern": "[a-f]|[A-F]|[0-9]{2}+" | |
} | |
}, | |
"required": [ "t", "v" ] | |
} | |
] | |
} | |
}, | |
"required": [ | |
"uri", "req" | |
] | |
} | |
}, | |
"required": [ | |
"vout", "bst" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"o" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment