Skip to content

Commit

Permalink
WSCL: Use PascalCase in json properties
Browse files Browse the repository at this point in the history
  • Loading branch information
onvej-sl committed Aug 18, 2023
1 parent b2a02e2 commit 34a0f98
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 272 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task TestPostAsync([System.Diagnostics.CodeAnalysis.SuppressMessage
public async Task TestCredentialSerialNumberUniquenessAsync()
{
HttpClient client = _factory.CreateClient();
string requestContentString = """{ "credentialIssuerParameters": { "cw": "02BF822F22E5CF2A1725144FB6898EEBC9AD59AEA2C6267F6E9F819517E2B9B882", "i": "02720432E49A94D45794D76143914FCD9E7F9669BFD08B0EC8B45891E228D2D6E8" }, "maxCredentialValue": 255 }""";
string requestContentString = """{ "credentialIssuerParameters": { "Cw": "02BF822F22E5CF2A1725144FB6898EEBC9AD59AEA2C6267F6E9F819517E2B9B882", "I": "02720432E49A94D45794D76143914FCD9E7F9669BFD08B0EC8B45891E228D2D6E8" }, "maxCredentialValue": 255 }""";
using StringContent requestContent = new StringContent(requestContentString, Encoding.UTF8, "application/json");

HashSet<string> randomnessHashSet = new();
Expand All @@ -53,7 +53,7 @@ public async Task TestCredentialSerialNumberUniquenessAsync()
Assert.Equal(HttpStatusCode.OK, response.StatusCode);

string responseContentString = await response.Content.ReadAsStringAsync();
bool isUnique = randomnessHashSet.Add(Regex.Match(responseContentString, "\"randomness\":\"([^\"]*)\"").Groups[1].Value);
bool isUnique = randomnessHashSet.Add(Regex.Match(responseContentString, "\"Randomness\":\"([^\"]*)\"").Groups[1].Value);
Assert.True(isUnique);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,111 +1,111 @@
[
{
"name": "",
"request": {
"transactions": [
"Name": "",
"Request": {
"Transactions": [
{
"internalInputs": [],
"externalInputs": [
"InternalInputs": [],
"ExternalInputs": [
{
"scriptPubKey": "76a914343f14545ae181898cced42a280e25cc20f7972c88ac",
"value": 4979995320
"ScriptPubKey": "76a914343f14545ae181898cced42a280e25cc20f7972c88ac",
"Value": 4979995320
}
],
"internalOutputs": [
"InternalOutputs": [
{
"address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"value": 1000000000
"Address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"Value": 1000000000
}
],
"externalOutputs": [
"ExternalOutputs": [
{
"scriptPubKey": "76a914d51d49df61c406305f14cae176e0e05f200d40b288ac",
"value": 3979990640
"ScriptPubKey": "76a914d51d49df61c406305f14cae176e0e05f200d40b288ac",
"Value": 3979990640
}
]
},
{
"internalInputs": [],
"externalInputs": [
"InternalInputs": [],
"ExternalInputs": [
{
"scriptPubKey": "76a9143833d325bfc715ec1e902e75456265c0f7d2e41988ac",
"value": 5000000000
"ScriptPubKey": "76a9143833d325bfc715ec1e902e75456265c0f7d2e41988ac",
"Value": 5000000000
}
],
"internalOutputs": [
"InternalOutputs": [
{
"address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"value": 20000000
"Address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"Value": 20000000
}
],
"externalOutputs": [
"ExternalOutputs": [
{
"scriptPubKey": "76a914343f14545ae181898cced42a280e25cc20f7972c88ac",
"value": 4979995320
"ScriptPubKey": "76a914343f14545ae181898cced42a280e25cc20f7972c88ac",
"Value": 4979995320
}
]
}
]
},
"expectedStatusCode": 200,
"expectedResponse": {
"results": [
"ExpectedStatusCode": 200,
"ExpectedResponse": {
"Results": [
{
"address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"anonymitySet": 1.0
"Address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"AnonymitySet": 1.0
}
]
}
},
{
"name": "",
"request": {
"transactions": [
"Name": "",
"Request": {
"Transactions": [
{
"internalInputs": [
"InternalInputs": [
{
"address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"value": 20000000
"Address": "bcrt1p0hghqgks9z83pwh3a3jzq3eldgzj8ezjrs247szks3w2nq7s7fhsqtqgg7",
"Value": 20000000
}
],
"externalInputs": [],
"internalOutputs": [],
"externalOutputs": []
"ExternalInputs": [],
"InternalOutputs": [],
"ExternalOutputs": []
}
]
},
"expectedStatusCode": 500,
"expectedResponse": {
"description": "There is an internal input that references a non-existing transaction."
"ExpectedStatusCode": 500,
"ExpectedResponse": {
"Description": "There is an internal input that references a non-existing transaction."
}
},
{
"name": "",
"request": {},
"expectedStatusCode": 500,
"expectedResponse": {
"description": "The Transactions field is required."
"Name": "",
"Request": {},
"ExpectedStatusCode": 500,
"ExpectedResponse": {
"Description": "The Transactions field is required."
}
},
{
"name": "",
"request": {
"transactions": [
"Name": "",
"Request": {
"Transactions": [
{
"internalInputs": [
"InternalInputs": [
{
"value": ""
"Value": ""
}
],
"externalInputs": [],
"internalOutputs": [],
"externalOutputs": []
"ExternalInputs": [],
"InternalOutputs": [],
"ExternalOutputs": []
}
]
},
"expectedStatusCode": 500,
"expectedResponse": {
"description": "Unable to cast object of type 'System.String' to type 'System.Nullable`1[System.Int64]'."
"ExpectedStatusCode": 500,
"ExpectedResponse": {
"Description": "Unable to cast object of type 'System.String' to type 'System.Nullable`1[System.Int64]'."
}
}
]
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[
{
"name": "",
"request": {
"credentialIssuerParameters": {
"cw": "03AE7B85AF54FF925D03CB802F5D82AC29D5A191AC463CFC8B457AF13F366F48D1",
"i": "03E6481AD96E7F74D59ADD3ABDB1629286C4BE8C3822E9DCBE83A413DB274240FF"
"Name": "",
"Request": {
"CredentialIssuerParameters": {
"Cw": "03AE7B85AF54FF925D03CB802F5D82AC29D5A191AC463CFC8B457AF13F366F48D1",
"I": "03E6481AD96E7F74D59ADD3ABDB1629286C4BE8C3822E9DCBE83A413DB274240FF"
},
"credentialsResponse": {
"issuedCredentials": [
"CredentialsResponse": {
"IssuedCredentials": [
{
"T": "E251F88BBC8F806C4859AA40D71FD98038E5B5FCFD222F474A3DCA40DF3FC932",
"V": "024C0928653E343CF52CA6B9B276F3454956DA29E43B4EDFEFC91FF1FA38AB21E7"
Expand All @@ -17,7 +17,7 @@
"V": "03C99F82CCB5F40B857EF45F0AE7837183E6CD4CEB83C843A7D6BA25FB59C2010C"
}
],
"proofs": [
"Proofs": [
{
"PublicNonces": [
"03891A9491DAAA3C0E9EC81A9D4A3640035824105221556D94D983893CE4C4EDAC",
Expand Down Expand Up @@ -48,62 +48,62 @@
}
]
},
"credentialsValidationData": {
"transcript": {
"strobe": {
"state": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxp75RF1zZCUq8sJubOjAiS1frTmoGolg6tmKNgxfdVpksAPJJ3OwoVbMtbTquOWQnwBKcD0lX9oRJB+Dy4DKNiG5GknkLD0jgwSJujR8V9/nyMh0eTsCAVSdA7Lp98KDfsCN5gtwO281b4NlsstIlqNIG32n9Faksy3hAbyWC5WsT9+rZf2/9Zo/M5CMmsFxesdxDU63OW03bWlejEi72SdjeopvYI00=",
"position": 32,
"beginPosition": 0,
"currentFlags": 7
"CredentialsValidationData": {
"Transcript": {
"Strobe": {
"State": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxp75RF1zZCUq8sJubOjAiS1frTmoGolg6tmKNgxfdVpksAPJJ3OwoVbMtbTquOWQnwBKcD0lX9oRJB+Dy4DKNiG5GknkLD0jgwSJujR8V9/nyMh0eTsCAVSdA7Lp98KDfsCN5gtwO281b4NlsstIlqNIG32n9Faksy3hAbyWC5WsT9+rZf2/9Zo/M5CMmsFxesdxDU63OW03bWlejEi72SdjeopvYI00=",
"Position": 32,
"BeginPosition": 0,
"CurrentFlags": 7
}
},
"presented": [
"Presented": [
{
"value": 0,
"randomness": "D8A3955299FE4F70B82923D49EEB970FFD832D9167B7B0207D2D1F3C3348F6FE",
"mac": {
"Value": 0,
"Randomness": "D8A3955299FE4F70B82923D49EEB970FFD832D9167B7B0207D2D1F3C3348F6FE",
"Mac": {
"T": "F5C5B08402FB48EB46764FD80B01F0A1AC215755E91744AF64209B1C8E59AA65",
"V": "02346FE45671984AEBB5E9B4C1807A3B220C8BE53B9C699D230F3BA730BD5A798F"
}
},
{
"value": 0,
"randomness": "B8C8EE853FAE12F3797042197B48B2CB939B89F2BCCDBB6A6404305C13F4CB84",
"mac": {
"Value": 0,
"Randomness": "B8C8EE853FAE12F3797042197B48B2CB939B89F2BCCDBB6A6404305C13F4CB84",
"Mac": {
"T": "CB1F8F577DD066BC029A897FA0F3E95EA717EB3FCF1AE5F8E228C803EED3332B",
"V": "03ABF5891A646C5AADF3A073B57BD0BF9A85DA07AC98BF8EBDF40CC150446D4292"
}
}
],
"requested": [
"Requested": [
{
"value": 19932518,
"randomness": "33428CDA67ED34A0DEC6F58F60C397227FE6A95ED96EA8FBA675F75FBBD17D0A",
"Value": 19932518,
"Randomness": "33428CDA67ED34A0DEC6F58F60C397227FE6A95ED96EA8FBA675F75FBBD17D0A",
"Ma": "02B703F195ECCBEDB3F9A2F4F2AA2CB415AB3E776C6E240FCF9CB3FFA10C382681"
},
{
"value": 0,
"randomness": "D5AFC243923BDAAAB38CC8405DC611D666A59BAB30457C1ACC109C40C99CC823",
"Value": 0,
"Randomness": "D5AFC243923BDAAAB38CC8405DC611D666A59BAB30457C1ACC109C40C99CC823",
"Ma": "021EA0EF6A968ED4AACBCDC7FB26A167543911CD7C278B633D271D08A0ABF21639"
}
]
}
},
"expectedStatusCode": 200,
"expectedResponse": {
"credentials": [
"ExpectedStatusCode": 200,
"ExpectedResponse": {
"Credentials": [
{
"value": 19932518,
"randomness": "33428CDA67ED34A0DEC6F58F60C397227FE6A95ED96EA8FBA675F75FBBD17D0A",
"mac": {
"Value": 19932518,
"Randomness": "33428CDA67ED34A0DEC6F58F60C397227FE6A95ED96EA8FBA675F75FBBD17D0A",
"Mac": {
"T": "E251F88BBC8F806C4859AA40D71FD98038E5B5FCFD222F474A3DCA40DF3FC932",
"V": "024C0928653E343CF52CA6B9B276F3454956DA29E43B4EDFEFC91FF1FA38AB21E7"
}
},
{
"value": 0,
"randomness": "D5AFC243923BDAAAB38CC8405DC611D666A59BAB30457C1ACC109C40C99CC823",
"mac": {
"Value": 0,
"Randomness": "D5AFC243923BDAAAB38CC8405DC611D666A59BAB30457C1ACC109C40C99CC823",
"Mac": {
"T": "5DE47A96D0FAE70EE187AFF8BFA6DDFE2F012FDFA09DB200BF54C21DB99CCDD3",
"V": "03C99F82CCB5F40B857EF45F0AE7837183E6CD4CEB83C843A7D6BA25FB59C2010C"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[
{
"name": "",
"request": {
"inputSize": 58,
"outputSize": 43,
"availableVsize": 394,
"miningFeeRate": 129000,
"allowedOutputAmounts": {
"min": 5000,
"max": 4300000000000
"Name": "",
"Request": {
"InputSize": 58,
"OutputSize": 43,
"AvailableVsize": 394,
"MiningFeeRate": 129000,
"AllowedOutputAmounts": {
"Min": 5000,
"Max": 4300000000000
},
"internalAmounts": [
"InternalAmounts": [
19932518,
996992518
],
"externalAmounts": []
"ExternalAmounts": []
},
"expectedStatusCode": 200,
"expectedResponse": {
"outputAmounts": [
"ExpectedStatusCode": 200,
"ExpectedResponse": {
"OutputAmounts": [
16777216,
16777216,
16777216,
Expand All @@ -32,27 +32,27 @@
}
},
{
"name": "Not enough money",
"request": {
"inputSize": 58,
"outputSize": 43,
"availableVsize": 394,
"miningFeeRate": 129000,
"allowedOutputAmounts": {
"min": 5000,
"max": 4300000000000
"Name": "Not enough money",
"Request": {
"InputSize": 58,
"OutputSize": 43,
"AvailableVsize": 394,
"MiningFeeRate": 129000,
"AllowedOutputAmounts": {
"Min": 5000,
"Max": 4300000000000
},
"internalAmounts": [
"InternalAmounts": [
4000
],
"externalAmounts": [
"ExternalAmounts": [
30000,
20000
]
},
"expectedStatusCode": 500,
"expectedResponse": {
"description": "Not enough coins registered to participate in the coinjoin."
"ExpectedStatusCode": 500,
"ExpectedResponse": {
"Description": "Not enough coins registered to participate in the coinjoin."
}
}
]
Loading

0 comments on commit 34a0f98

Please sign in to comment.