forked from hyperledger-labs/private-data-objects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontract.json
81 lines (81 loc) · 3.18 KB
/
contract.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"$schema": "http://json-schema.org/schema#",
"title": "PDO Contract Request",
"id": "http://tradenet.org/pdo/eservice/contract/requests#",
"definitions": {
"ContractRequest": {
"id": "#initRequest",
"description": "a request to create a new instance of a contract state associated with the contract identifier",
"type": "object",
"properties": {
"Operation": {
"description": "field describing the type of the request",
"type": "string",
"enum": [
"initialize",
"update"
],
"required": true
},
"ContractState": {
"$ref": "#/pdo/basetypes/contract-state",
"required": true
},
"ContractCode": {
"$ref": "#/pdo/basetypes/contract-code",
"required": true
},
"ContractMessage": {
"$ref": "#/pdo/basetypes/contract-message",
"required": true
}
}
},
"ContractResponse": {
"id": "#ContractResponse",
"description": "General schema for responses from the contract enclave",
"type": "object",
"properties": {
"Contract-State": {
"description": "state resulting from the evaluation of the method",
"$ref": "#/pdo/basetypes/contract-state",
"required": true
},
"Dependencies": {
"description": "List of dependent contract commits",
"type": "array",
"items": {
"type": "object",
"minItems": 0,
"uniqueItems": true,
"default": [],
"properties": {
"ContractID": {
"$ref": "#/pdo/basetypes/contractid",
"required": true
},
"StateHash": {
"description": "hash of the state that must be committed",
"type": "string",
"format": "base64 urlsafe encoded sha256 hash without padding",
"minLength": 22,
"maxLength": 22,
"required": true
}
}
}
},
"Result": {
"description": "the value returned from method evaluation",
"$ref": "#/pdo/basetypes/s-expression",
"required": true
},
"Signature": {
"description": "signature of the request/response",
"$ref": "#/pdo/basetypes/signature",
"required": true
}
}
}
}
}