JSON schemas

Models

Atom

Schema
References
Example
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Atom",
"type": "object",
"description": "Atom Model",
"properties": {
"hid": {"$ref": "#/definitions/uid"},
"serializer": {
"type": "string",
"enum": ["radix.atom"]
},
"particleGroups": {
"minItems": 1,
"description": "a list of particle groups representing a certain independent intent",
"type": "array",
"items": {"$ref": "#/definitions/particleGroup"}
},
"version": {"type": "number"},
"aid": {"$ref": "#/definitions/aid"},
"temporalProof": {"$ref": "#/definitions/temporalProof"}
},
"required": [
"particleGroups",
"serializer",
"version"
]
}
{
"hid": ":uid:038719d2c71985f5ca02a73368514a10",
"metaData": {
"timestamp": ":str:1488326400000"
},
"particleGroups": [
{
"hid": ":uid:bf5314ac38198eef9006e82389c71896",
"particles": [
{
"hid": ":uid:22a99677b2df6bf1fe87aa3d0c9649f1",
"particle": {
"address": ":adr:JHuDLpGefPssAY3v1pTXTQWHGv1tkTCEdq7RQYPnLuin1cfoath",
"description": ":str:Radix POW",
"granularity": ":u20:1",
"hid": ":uid:934db0f9cf6eeb6c182eb7e4f3583817",
"icon": ":byt:iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAC4jAAAuIwF4pT92AAAAHWlUWHRTb2Z0d2FyZQAAAAAAQWRvYmUgSW1hZ2VSZWFkeQatApcAAAYqSURBVFiFrVdrUFRVHP+de8+2sJim4MqymylPUXrjyirQioBOqc34zhcx08OyGTWnJqcPTY/JD2WJY9pgiYwyidWM2jSIPHaDTd69hGBJBJXH4vLQcmGXveeePuAauKs84jdzP9x7zj3/3/9x/g/COcdIkCRJrGtojC40lS4xW8qMtQ3WGNt1e7DT6QoAAH8/pSNYrbbNi468aIw3mJONCUXz5kQ2UErZSGeT+xGQGBPLKmsWZOXkphWaSpe22zp1TJJEEAIQMnwz5wDnECmVQoJntKYsTsxP37Qu26B/ukIURXnMBK62tun2HczcmZP7/dburp7pEAggCCMpNAhZBmSOwKBA++YNq7Pf3P7K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PnrOHwPiAoqGeMNJppiTCjcHzyjtbW1/ZF7ZkPG0J+dCzovcvDeh80CALjyisB7b47d/LIMrU7bmmxMKKLRkRGNqYsT849m57wCwftSAAAIgdzVA8eBrzB51kwIWg1YUzNc5gujSzpeBDhSkxLz5kSEXaIKBZXSN6/POv1j/qqe3t57l2NRgPTHn+j7Mhuq7elwnT0Pud2GMdcQzhE4Pcievmn9MUqpRAEgLvbJ6i0bVh/LOHRkN8h9VCIEzjPn4K7+DfL1rrEJ9hzBOU/buOao/qnHazzvAIBrbe0ha1/clltRUR0/YkTLss8CMyIYg8GgLzmVdXiDLkTTMYwAAFyoqNZveXXHicuXmyeuIx4iPCws1Ho888Bmw/ynqj2fvdryAlNJ0mu79hxuutwcOZFteXhYqPXQ53u3pRgTzMPWfA0LP5dX6Q0pK0smajBZmPr8Txcqq+ePajDx4Fpbe8hnXxzZefzkd2nd9m71eEazIHVQ59YNa47tev3lDJ120Od3477DKWNMKKv6RX8s51RagalkaVuH7WEmSRS4HYCeGOT8difMISqopNNorqUmJZ5L27guOy72yapxDadDITEm1Fv/mlNkLk0yWcqMdfXWGNt1u6av3xkAACp/P0ewWt0REx110ZhgMCc/E18cHRVhvZ9gD/4F4vECTSY22WoAAAAASUVORK5CYII=",
"name": ":str:Proof of Work",
"permissions": {
"burn": ":str:none",
"mint": ":str:pow",
"transfer": ":str:none"
},
"serializer": -1034420571,
"symbol": ":str:POW",
"version": 100
},
"serializer": -993052100,
"spin": 1,
"version": 100
}
],
"serializer": -67058791,
"version": 100
}
],
"serializer": 2019665,
"shards": [
7107979575082923
],
"signatures": {
"001940ab75a4bfab9ab253785da1e4c4": {
"hid": ":uid:588eb4f71739b73eb00b7a1b8cca2baf",
"r": ":byt:YmALbQL7lUrrfwD2dqafO0OgxpUZ372sE+aBbef0fUI=",
"s": ":byt:AOaOINPqBdWOU5JSqB+o0U7f9eX2NWnoFLguoYBcfXAr",
"serializer": -434788200,
"version": 100
}
},
"temporalProof": {
"hid": ":uid:8171e8434eb5ef8f7245fdcd5f7416ca",
"object": ":hsh:038719d2c71985f5ca02a73368514a1082421131264d2a9f8e5b354ab7146cb4",
"serializer": 1905172290,
"version": 100,
"vertices": [
{
"clock": 0,
"commitment": ":hsh:0000000000000000000000000000000000000000000000000000000000000000",
"hid": ":uid:447ca33d7f0a524e9505c73a863df431",
"owner": ":byt:A15QQu5q6JJwiWYrj6pdbhAmmzevbsFho5b495vjkruI",
"previous": ":uid:00000000000000000000000000000000",
"serializer": -909337786,
"signature": {
"hid": ":uid:0a93c66023d3230e588d51daedbe68e6",
"r": ":byt:DL6J/5wZ33UyxIexuhBm6NAut6sVESLEDUbEFBilRfs=",
"s": ":byt:AP4UPhy+BTJ6rnRw5UJbXTGihOjudCkruiJ+EwOsVxGz",
"serializer": -434788200,
"version": 100
},
"timestamps": {
"default": 1551206675489
},
"version": 100
}
]
},
"version": 100
}

Network

Schema
References
Example
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Network",
"definitions": {
"network": {
"type": "object",
"description": "Network",
"properties": {
"udp": {
"type": "array",
"items": {
"$ref": "#/definitions/udpPeer"
}
},
"tcp": {
"type": "array",
"items": {
"$ref": "#/definitions/tcpPeer"
}
}
}
}
}
}

References

System

Schema
References
Example
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Network",
"definitions": {
"system": {
"type": "object",
"properties": {
"serializer": {
"type": "integer",
"maximum": -1833998801,
"minimum": -1833998801
},
"shards": {
"$ref": "primitives.schema.json#/definitions/uid"
},
"agent": {
"$ref": "primitives.schema.json#/definitions/uid"
},
"port": {
"type": "number"
},
"nid": {
"$ref": "primitives.schema.json#/definitions/uid"
},
"commitment": {
"$ref": "primitives.schema.json#/definitions/hash"
},
"clock": {
"type": "number"
},
"key": {
"$ref": "primitives.schema.json#/definitions/bytes"
},
"planck": {
"type": "number"
}
}
}
}
}

References

Universe

Schema
References
Example
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Universe",
"type": "object",
"description": "Universe",
"properties": {
"magic": {
"type": "number"
},
"creator": {
"$ref": "primitives.schema.json#/definitions/bytes"
},
"signature.r": {
"$ref": "primitives.schema.json#/definitions/bytes"
},
"signature.s": {
"$ref": "primitives.schema.json#/definitions/bytes"
},
"description": {
"$ref": "primitives.schema.json#/definitions/string"
},
"type": {
"type": "number"
},
"planck": {
"type": "number"
},
"port": {
"type": "number"
},
"name": {
"$ref": "primitives.schema.json#/definitions/string"
},
"timestamp": {
"type": "number"
},
"genesis": {
"type": "array",
"items": {
"$ref": "atom.schema.json"
}
}
}
}

References

Definitions

address

Schema
Example
"address": {
"type": "string",
"pattern": "^:adr:.+",
"description": "A 33 byte public key address encoded in Base58."
}
{
"address": ":adr:JHuDLpGefPssAY3v1pTXTQWHGv1tkTCEdq7RQYPnLuin1cfoath"
}

aid

Schema
"aid": {
"pattern": "^:aid:.+",
"description": "A unique 256-bit Atom ID encoded in hex.",
"type": "string"
}

bytes

Schema
Example
"bytes": {
"type": "string",
"pattern": "^:byt:.+",
"description": "Arbitrary bytes encoded in Base64."
}
{
"r": ":byt:YmALbQL7lUrrfwD2dqafO0OgxpUZ372sE+aBbef0fUI=",
}

hash

Schema
Example
"hash": {
"type": "string",
"pattern": "^:hsh:.+",
"description": "A 256 bit hash encoded in Base64."
}
{
"commitment": ":hsh:c163067c287f46f7119c644a35c8e0e3ae0c8d1c112f2a02e531e8ea0b65596b",
}

host

Schema
References
Example
"host": {
"type": "object",
"properties": {
"port": { "type": "number" },
"ip": { "$ref": "primitives.schema.json#/definitions/string" }
}

References

"host": {
"ip": ":str:137.117.136.60",
"port": 30000
},

key

Schema
References
Example
"key": {
"allOf": [
{ "$ref": "#/definitions/bytes" }
],
"description": "A 32 byte EC public key."
}

References

{
"key": ":byt:A6/1u+Jo8LXXLscG4TtpWxcvvVz0FmsZ2LKhCr4dqWEm",
}

messageParticle

Schema
References
"messageParticle": {
"description": "A particle which represents arbitrary data message in an account from another account",
"type": "object",
"properties": {
"bytes": {"$ref": "#/definitions/bytes"},
"destinations": {
"minItems": 1,
"type": "array",
"items": {"$ref": "#/definitions/uid"}
},
"serializer": {
"type": "string",
"enum": ["radix.particles.message"]
},
"from": {"$ref": "#/definitions/address"},
"to": {"$ref": "#/definitions/address"},
"nonce": {"type": "number"}
},
"required": ["serializer"]
}

References

particle

Schema
References
"particle": {
"oneOf": [
{"$ref": "#/definitions/rriParticle"},
{"$ref": "#/definitions/tokenDefinitionParticle"},
{"$ref": "#/definitions/messageParticle"},
{"$ref": "#/definitions/unallocatedTokensParticle"},
{"$ref": "#/definitions/transferrableTokensParticle"},
{"$ref": "#/definitions/uniqueParticle"}
],
"description": "A particle which is a component which represents a substate of the ledger."
}

References

  • tokenClassParticle

  • messageParticle

  • ownedTokensParticle

  • timestampParticle

  • feeParticle

  • uniqueParticle

particleGroup

Schema
References
"particleGroup": {
"type": "object",
"properties": {
"serializer": {
"type": "string",
"enum": ["radix.particle_group"]
},
"particles": {
"minItems": 1,
"type": "array",
"items": {"$ref": "#/definitions/spunParticle"}
}
},
"required": ["particles"]
}

References

peer

Schema
References
"peer": {
"type": "object",
"properties": {
"system": { "$ref": "primitives.schema.json#/definitions/bytes" },
"host": { "$ref": "primitives.schema.json#/definitions/bytes" }
}
}

References

radixResourceIdentifier

Schema
Example
"radixResourceIdentifier": {
"type": "string",
"pattern": "^:rri:.+",
"description": "A URI pointing to a single existing UP particle"
}
{
"token_reference": ":rri:/JHuDLpGefPssAY3v1pTXTQWHGv1tkTCEdq7RQYPnLuin1cfoath/tokenclasses/XRD",
}

rriParticle

Schema
"rriParticle": {
"description": "A particle which represents an RRI.",
"additionalProperties": false,
"type": "object",
"properties": {
"destinations": {
"minItems": 1,
"type": "array",
"items": {"$ref": "#/definitions/uid"}
},
"rri": {"$ref": "#/definitions/radixResourceIdentifier"},
"serializer": {
"type": "string",
"enum": ["radix.particles.rri"]
},
"nonce": {"type": "integer"},
"version": {"type": "number"}
},
"required": [
"rri",
"version",
"nonce",
"version"
]
}

signature

Schema
References
Example
"signature": {
"description": "A signature.",
"type": "object",
"properties": {
"r": {"$ref": "#/definitions/bytes"},
"s": {"$ref": "#/definitions/bytes"},
"serializer": {
"type": "string",
"enum": ["crypto.ecdsa_signature"]
}
}
}

References

"signature": {
"hid": ":uid:54a55347b6982b18920b7c1756e6b4ea",
"r": ":byt:VKPUbSm7OxXVSsn3k61xogdLSsbj+49JkBwuYFUzvTc=",
"s": ":byt:AKXW6q9SjdMVI9IfzyBNNPLhCAqzdBcR6uFC+he7p8Jd",
"serializer": -434788200,
"version": 100
},

spin

Schema
"spin": {
"type": "integer",
"maximum": 1,
"minimum": -1,
"description": "The spin of a particle. -1 for Down state. 1 for Up state."
}

spunParticle

Schema
References
"spunParticle": {
"description": "A particle + spin pair. Describes an action on the ledger.",
"type": "object",
"properties": {
"spin": {"$ref": "#/definitions/spin"},
"serializer": {
"type": "string",
"enum": ["radix.spun_particle"]
},
"particle": {"$ref": "#/definitions/particle"}
},
"required": [
"spin",
"particle",
"serializer"
]
}

References

string

Schema
Untitled
"string": {
"type": "string",
"pattern": "^:str:.+",
"description": "A string."
}
{
"name": ":str:Proof of Work",
}

tcpPeer

Schema
References
"tcpPeer": {
"allOf": [
{ "$ref": "#/definitions/peer" },
{
"type": "object",
"properties": {
"incoming": {
"type": "boolean"
}
}
}
]
}

References

temporalProof

Schema
References
"temporalProof": {
"type": "object",
"properties": {
"vertices": {
"type": "array",
"items": {"$ref": "#/definitions/temporalProofVertex"}
},
"serializer": {
"type": "string",
"enum": ["tempo.temporal_proof"]
},
"object": {"$ref": "#/definitions/hash"}
},
"required": [
"serializer",
"object"
]
}

References

temporalProofVertex

Schema
References
"temporalProofVertex": {
"type": "object",
"properties": {
"owner": {"$ref": "#/definitions/bytes"},
"hid": {"$ref": "#/definitions/uid"},
"previous": {"$ref": "#/definitions/uid"},
"signature": {"$ref": "#/definitions/signature"},
"timestamps": {"type": "object"},
"commitment": {"$ref": "#/definitions/hash"},
"serializer": {
"type": "string",
"enum": ["tempo.temporal_vertex"]
},
"clock": {"type": "integer"}
}
}

References

tokenActionPermission

Schema
"tokenActionPermission": {
"type": "string",
"enum": [
":str:token_creation_only",
":str:token_owner_only",
":str:none",
":str:all"
]
}

tokenDefinitionParticle

Schema
References
"tokenDefinitionParticle": {
"description": "A particle which represents a token class state.",
"additionalProperties": false,
"type": "object",
"properties": {
"symbol": {"$ref": "#/definitions/string"},
"address": {"$ref": "#/definitions/address"},
"permissions": {
"additionalProperties": false,
"type": "object",
"properties": {
"burn": {"$ref": "#/definitions/tokenActionPermission"},
"mint": {"$ref": "#/definitions/tokenActionPermission"}
},
"required": [
"burn",
"mint"
]
},
"granularity": {"$ref": "#/definitions/u20"},
"destinations": {
"minItems": 1,
"type": "array",
"items": {"$ref": "#/definitions/uid"}
},
"name": {"$ref": "#/definitions/string"},
"serializer": {
"type": "string",
"enum": ["radix.particles.token_definition"]
},
"description": {"$ref": "#/definitions/string"},
"iconUrl": {},
"version": {"type": "number"},
"scrypto": {"type": "object"}
},
"required": [
"serializer",
"version",
"name",
"description",
"permissions"
]
}

References

transferrableTokensParticle

Schema
References
"transferrableTokensParticle": {
"description": "A particle which represents an amount of a token owned by an account.",
"additionalProperties": false,
"type": "object",
"properties": {
"amount": {"$ref": "#/definitions/u20"},
"address": {"$ref": "#/definitions/address"},
"permissions": {
"additionalProperties": false,
"type": "object",
"properties": {
"burn": {"$ref": "#/definitions/tokenActionPermission"},
"mint": {"$ref": "#/definitions/tokenActionPermission"}
},
"required": [
"burn",
"mint"
]
},
"granularity": {"$ref": "#/definitions/u20"},
"destinations": {
"minItems": 1,
"type": "array",
"items": {"$ref": "#/definitions/uid"}
},
"serializer": {
"type": "string",
"enum": ["radix.particles.transferrable_tokens"]
},
"nonce": {"type": "number"},
"version": {"type": "number"},
"tokenDefinitionReference": {"$ref": "#/definitions/radixResourceIdentifier"},
"planck": {"type": "number"}
},
"required": [
"version",
"serializer",
"amount",
"nonce",
"planck",
"tokenDefinitionReference"
]
}

References

u20

Schema
Example
"u20": {
"type": "string",
"pattern": "^:u20:.+",
"description": "A 256-bit/32-byte unsigned integer in decimal representation."
}
{
"amount": ":u20:1000000000000000000000000000",
}

udpPeer

Schema
References
"udpPeer": {
"allOf": [
{ "$ref": "#/definitions/peer" }
]
}

References

uid

Schema
Example
"uid": {
"type": "string",
"pattern": "^:uid:.+",
"description": "A unique 128-bit ID encoded in Base64."
}
{
"hid": ":uid:98a1a35d872dbec1956b7c4af2cc9ebb",
}

unallocatedTokensParticle

Schema
"unallocatedTokensParticle": {
"description": "A particle which represents an unallocated amount of tokens.",
"additionalProperties": false,
"type": "object",
"properties": {
"amount": {"$ref": "#/definitions/u20"},
"granularity": {"$ref": "#/definitions/u20"},
"permissions": {
"additionalProperties": false,
"type": "object",
"properties": {
"burn": {"$ref": "#/definitions/tokenActionPermission"},
"mint": {"$ref": "#/definitions/tokenActionPermission"}
},
"required": [
"burn",
"mint"
]
},
"destinations": {
"minItems": 1,
"type": "array",
"items": {"$ref": "#/definitions/uid"}
},
"serializer": {
"type": "string",
"enum": ["radix.particles.unallocated_tokens"]
},
"nonce": {"type": "number"},
"version": {"type": "number"},
"tokenDefinitionReference": {"$ref": "#/definitions/radixResourceIdentifier"}
},
"required": [
"version",
"serializer",
"amount",
"nonce",
"tokenDefinitionReference"
]
}

uniqueParticle

Schema
References
"uniqueParticle": {
"description": "A particle which makes the containing Atom unique.",
"type": "object",
"properties": {
"address": {"$ref": "#/definitions/address"},
"destinations": {
"minItems": 1,
"type": "array",
"items": {"$ref": "#/definitions/uid"}
},
"name": {"$ref": "#/definitions/string"},
"serializer": {
"type": "string",
"enum": ["radix.particles.unique"]
},
"nonce": {"type": "number"}
}
}

References