Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 129 additions & 9 deletions spec/vectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,107 @@
"expected": {
"mAddress": "MA7QYNF7SZFX4X7X5JFZZ3UQ6BXHDSY2RKVKZKX5FFQJ1ZMZX1AAJZRE6LRE6LRE6LRE6LRE6LRE6LRE6LRE6LRE6LRE6LRE6LR"
},
"tags": ["edge", "interop"]
"tags": [
"edge",
"interop"
]
},
{
"module": "muxed_decode",
"description": "decode id=0 boundary case",
"input": {
"mAddress": "MAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQACAAAAAAAAAAAAD672"
},
"expected": {
"base_g": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"baseG": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"id": "0"
},
"tags": [
"positive",
"edge"
]
},
{
"module": "muxed_decode",
"description": "decode id=1 small positive case",
"input": {
"mAddress": "MAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQACAAAAAAAAAAAAHOO2"
},
"expected": {
"base_g": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"baseG": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"id": "1"
},
"tags": [
"positive",
"edge"
]
},
{
"module": "muxed_decode",
"description": "decode id=2^53 precision boundary",
"input": {
"mAddress": "MAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQACABAAAAAAAAAAAFZG"
},
"expected": {
"base_g": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"baseG": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"id": "9007199254740992"
},
"tags": [
"positive",
"edge",
"interop"
]
},
{
"module": "muxed_decode",
"description": "decode id=2^53+1 interop canary",
"input": {
"mAddress": "MAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQACABAAAAAAAAAAEVIG"
},
"expected": {
"base_g": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"baseG": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"id": "9007199254740993"
},
"tags": [
"positive",
"edge",
"interop"
]
},
{
"module": "muxed_decode",
"description": "decode id=2^64-1 max uint64",
"input": {
"mAddress": "MAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQAD7777777777774OFW"
},
"expected": {
"base_g": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"baseG": "GAYCUYT553C5LHVE2XPW5GMEJT4BXGM7AHMJWLAPZP53KJO7EIQADRSI",
"id": "18446744073709551615"
},
"tags": [
"positive",
"edge",
"interop"
]
},
{
"module": "muxed_decode",
"description": "invalid M-address should return decode error",
"input": {
"mAddress": "MZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
},
"expected": {
"expected_error": "invalid encoded string"
},
"tags": [
"negative",
"edge"
]
},
{
"module": "detect",
Expand All @@ -34,7 +134,10 @@
}
]
},
"tags": ["negative", "edge"]
"tags": [
"negative",
"edge"
]
},
{
"module": "extract_routing",
Expand All @@ -49,7 +152,10 @@
"routingSource": "muxed",
"warnings": []
},
"tags": ["positive", "interop"]
"tags": [
"positive",
"interop"
]
},
{
"module": "extract_routing",
Expand All @@ -67,11 +173,15 @@
"code": "INVALID_DESTINATION",
"severity": "error",
"message": "C address is not a valid destination",
"context": { "destinationKind": "C" }
"context": {
"destinationKind": "C"
}
}
]
},
"tags": ["negative"]
"tags": [
"negative"
]
},
{
"module": "extract_routing",
Expand All @@ -87,7 +197,9 @@
"routingSource": "memo",
"warnings": []
},
"tags": ["positive"]
"tags": [
"positive"
]
},
{
"module": "extract_routing",
Expand All @@ -103,7 +215,9 @@
"routingSource": "memo",
"warnings": []
},
"tags": ["positive"]
"tags": [
"positive"
]
},
{
"module": "extract_routing",
Expand All @@ -122,11 +236,17 @@
"code": "NON_CANONICAL_ROUTING_ID",
"severity": "warn",
"message": "Memo routing ID had leading zeros. Normalized to canonical decimal.",
"normalization": { "original": "007", "normalized": "7" }
"normalization": {
"original": "007",
"normalized": "7"
}
}
]
},
"tags": ["negative", "edge"]
"tags": [
"negative",
"edge"
]
}
]
}
Loading