Files
ww/protocol/schema/digests.json

254 lines
5.8 KiB
JSON

{
"format": "wwar-v1-digest-schema",
"version": 1,
"domains": [
{
"name": "action-key",
"algorithm": "sha256",
"separator_utf8_hex": "57572d414354494f4e2d4b455900",
"input": {
"record": "ActionRecordV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"scalar": "ActionKey"
}
},
{
"name": "blob",
"algorithm": "sha256",
"separator_utf8_hex": "57572d424c4f4200",
"input": {
"kind": "bytes"
},
"formula": [
"separator",
"u64be(input-length)",
"input-bytes"
],
"result": {
"record": "TypedDigestV1",
"domain": "blob",
"record-kind": 0,
"record-schema": 0
}
},
{
"name": "calling-conventions",
"algorithm": "sha256",
"separator_utf8_hex": "57572d43414c4c494e472d434f4e56454e54494f4e532d563100",
"input": {
"record": "CallingConventionTableProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "export-declaration-abi",
"algorithm": "sha256",
"separator_utf8_hex": "57572d4558504f52542d4445434c2d4142492d563100",
"input": {
"record": "ExportDeclarationABIProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "native-data-layout",
"algorithm": "sha256",
"separator_utf8_hex": "57572d4e41544956452d444154412d4c41594f55542d563100",
"input": {
"record": "NativeDataLayoutProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "native-header-contract",
"algorithm": "sha256",
"separator_utf8_hex": "57572d4e41544956452d4845414445522d434f4e54524143542d563100",
"input": {
"record": "NativeHeaderContractProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "native-type-contract",
"algorithm": "sha256",
"separator_utf8_hex": "57572d4e41544956452d545950452d434f4e54524143542d563100",
"input": {
"record": "NativeTypeContractProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "origin-type-contract",
"algorithm": "sha256",
"separator_utf8_hex": "57572d4f524947494e2d545950452d434f4e54524143542d563100",
"input": {
"record": "OriginTypeContractProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "public-abi",
"algorithm": "sha256",
"separator_utf8_hex": "57572d5055424c49432d4142492d563100",
"input": {
"record": "PublicABIProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "public-type",
"algorithm": "sha256",
"separator_utf8_hex": "57572d5055424c49432d545950452d563100",
"input": {
"record": "PublicTypeProjectionV1",
"encoding": "WWAR"
},
"formula": [
"separator",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"kind": "bytes",
"length": 32
}
},
{
"name": "record",
"algorithm": "sha256",
"separator_utf8_hex": "57572d5245434f524400",
"input": {
"record": "top-level record",
"encoding": "WWAR"
},
"formula": [
"separator",
"u32be(record-kind)",
"u32be(record-schema)",
"u64be(encoded-length)",
"encoded-bytes"
],
"result": {
"record": "TypedDigestV1",
"domain": "record",
"record-kind": "1..22",
"record-schema": 1
}
},
{
"name": "source-tree",
"algorithm": "sha256",
"separator_utf8_hex": "77772d736f757263652d747265652d763100",
"input": {
"record": "SourceTreeProjectionV1",
"encoding": "special-source-tree-v1"
},
"entry_encoding": {
"path": [
"u64be-byte-length",
"raw-nfc-utf8"
],
"type": {
"dir": 1,
"file": 2
},
"executable": {
"false": 0,
"true": 1,
"directory": 0
},
"content": {
"dir": [
"u64be",
0
],
"file": [
"u64be",
32,
"raw-sha256"
]
},
"order": "raw-utf8-path-bytes"
},
"formula": [
"separator",
"concatenate entry path,type,executable,content frames"
],
"result": {
"kind": "bytes",
"scalar": "SourceTreeDigest"
}
}
]
}