python update

This commit is contained in:
Christien Rioux 2023-11-05 19:21:05 -05:00
parent ee375ad430
commit f69b4cb40d
2 changed files with 149 additions and 11 deletions

View File

@ -347,23 +347,43 @@
}
}
},
{
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"op",
"value"
],
"properties": {
"value": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
},
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"$ref": "#/definitions/VeilidAPIError"
}
}
}
],
"required": [
"op"
],
"properties": {
"op": {
"type": "string",
"enum": [
"NewRoutingContext"
]
},
"value": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
},
@ -433,7 +453,7 @@
"rc_op": {
"type": "string",
"enum": [
"WithPrivacy"
"WithDefaultSafety"
]
}
}
@ -473,7 +493,7 @@
"rc_op": {
"type": "string",
"enum": [
"WithCustomPrivacy"
"WithSafety"
]
}
}
@ -498,6 +518,24 @@
}
}
},
{
"type": "object",
"required": [
"rc_op",
"value"
],
"properties": {
"rc_op": {
"type": "string",
"enum": [
"Safety"
]
},
"value": {
"$ref": "#/definitions/SafetySelection"
}
}
},
{
"type": "object",
"anyOf": [
@ -2865,6 +2903,92 @@
}
}
},
"SafetySelection": {
"description": "The choice of safety route to include in compiled routes",
"oneOf": [
{
"description": "Don't use a safety route, only specify the sequencing preference",
"type": "object",
"required": [
"Unsafe"
],
"properties": {
"Unsafe": {
"$ref": "#/definitions/Sequencing"
}
},
"additionalProperties": false
},
{
"description": "Use a safety route and parameters specified by a SafetySpec",
"type": "object",
"required": [
"Safe"
],
"properties": {
"Safe": {
"$ref": "#/definitions/SafetySpec"
}
},
"additionalProperties": false
}
]
},
"SafetySpec": {
"description": "Options for safety routes (sender privacy)",
"type": "object",
"required": [
"hop_count",
"sequencing",
"stability"
],
"properties": {
"hop_count": {
"description": "must be greater than 0",
"type": "integer",
"format": "uint",
"minimum": 0.0
},
"preferred_route": {
"description": "preferred safety route set id if it still exists",
"type": [
"string",
"null"
]
},
"sequencing": {
"description": "prefer connection-oriented sequenced protocols",
"allOf": [
{
"$ref": "#/definitions/Sequencing"
}
]
},
"stability": {
"description": "prefer reliability over speed",
"allOf": [
{
"$ref": "#/definitions/Stability"
}
]
}
}
},
"Sequencing": {
"type": "string",
"enum": [
"NoPreference",
"PreferOrdered",
"EnsureOrdered"
]
},
"Stability": {
"type": "string",
"enum": [
"LowLatency",
"Reliable"
]
},
"TransferStats": {
"type": "object",
"required": [

View File

@ -215,7 +215,7 @@
"rc_op": {
"type": "string",
"enum": [
"WithPrivacy"
"WithDefaultSafety"
]
}
}
@ -230,7 +230,7 @@
"rc_op": {
"type": "string",
"enum": [
"WithCustomPrivacy"
"WithSafety"
]
},
"safety_selection": {
@ -256,6 +256,20 @@
}
}
},
{
"type": "object",
"required": [
"rc_op"
],
"properties": {
"rc_op": {
"type": "string",
"enum": [
"Safety"
]
}
}
},
{
"type": "object",
"required": [