-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pres submission test vectors #109
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
{ | ||
"description": "did:dht create", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just wanted to double check that you wanted to include did:dht test vectors with this PR. Didn't see it mentioned in the PR title or description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup i found that these were not included from the old repo so I threw them in |
||
"vectors": [ | ||
{ | ||
"description": "creates a did document according to the vector in https://did-dht.com/#vector-1", | ||
"input": { | ||
"identityPublicJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
} | ||
}, | ||
"output": { | ||
"id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0", | ||
"type": "JsonWebKey", | ||
"controller": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo", | ||
"publicKeyJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
} | ||
} | ||
], | ||
"authentication": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0" | ||
], | ||
"assertionMethod": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0" | ||
], | ||
"capabilityInvocation": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0" | ||
], | ||
"capabilityDelegation": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0" | ||
] | ||
} | ||
}, | ||
{ | ||
"description": "creates a did document according to the vector in https://did-dht.com/#vector-2", | ||
"input": { | ||
"identityPublicJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
}, | ||
"services": [ | ||
{ | ||
"id": "service-1", | ||
"type": "TestService", | ||
"serviceEndpoint": [ | ||
"https://test-service.com/1", | ||
"https://test-service.com/2" | ||
] | ||
} | ||
], | ||
"additionalVerificationMethods": [ | ||
{ | ||
"jwk": { | ||
"kty": "EC", | ||
"crv": "secp256k1", | ||
"x": "1_o0IKHGNamet8-3VYNUTiKlhVK-LilcKrhJSPHSNP0", | ||
"y": "qzU8qqh0wKB6JC_9HCu8pHE-ZPkDpw4AdJ-MsV2InVY", | ||
"alg": "ES256K", | ||
"kid": "0GkvkdCGu3DL7Mkv0W1DhTMCBT9-z0CkFqZoJQtw7vw" | ||
}, | ||
"purposes": [ | ||
"assertionMethod", | ||
"capabilityInvocation" | ||
] | ||
} | ||
], | ||
"controller": [ | ||
"did:example:abcd" | ||
], | ||
"alsoKnownAs": [ | ||
"did:example:efgh", | ||
"did:example:ijkl" | ||
] | ||
}, | ||
"output": { | ||
"id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo", | ||
"controller": "did:example:abcd", | ||
"alsoKnownAs": [ | ||
"did:example:efgh", | ||
"did:example:ijkl" | ||
], | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0", | ||
"type": "JsonWebKey", | ||
"controller": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo", | ||
"publicKeyJwk": { | ||
"kty": "OKP", | ||
"crv": "Ed25519", | ||
"x": "YCcHYL2sYNPDlKaALcEmll2HHyT968M4UWbr-9CFGWE", | ||
"alg": "EdDSA", | ||
"kid": "0" | ||
} | ||
}, | ||
{ | ||
"id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0GkvkdCGu3DL7Mkv0W1DhTMCBT9-z0CkFqZoJQtw7vw", | ||
"type": "JsonWebKey", | ||
"controller": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo", | ||
"publicKeyJwk": { | ||
"kty": "EC", | ||
"crv": "secp256k1", | ||
"x": "1_o0IKHGNamet8-3VYNUTiKlhVK-LilcKrhJSPHSNP0", | ||
"y": "qzU8qqh0wKB6JC_9HCu8pHE-ZPkDpw4AdJ-MsV2InVY", | ||
"alg": "ES256K", | ||
"kid": "0GkvkdCGu3DL7Mkv0W1DhTMCBT9-z0CkFqZoJQtw7vw" | ||
} | ||
} | ||
], | ||
"authentication": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0" | ||
], | ||
"assertionMethod": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0", | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0GkvkdCGu3DL7Mkv0W1DhTMCBT9-z0CkFqZoJQtw7vw" | ||
], | ||
"capabilityInvocation": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0", | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0GkvkdCGu3DL7Mkv0W1DhTMCBT9-z0CkFqZoJQtw7vw" | ||
], | ||
"capabilityDelegation": [ | ||
"did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#0" | ||
], | ||
"service": [ | ||
{ | ||
"id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo#service-1", | ||
"type": "TestService", | ||
"serviceEndpoint": [ | ||
"https://test-service.com/1", | ||
"https://test-service.com/2" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"description": "did:dht resolution", | ||
"vectors": [ | ||
{ | ||
"description": "methodNotSupported error returned when did method is not dht", | ||
"input": { | ||
"didUri": "did:web:example.com" | ||
}, | ||
"output": { | ||
"didResolutionMetadata": { | ||
"error": "methodNotSupported" | ||
} | ||
}, | ||
"errors": true | ||
}, | ||
{ | ||
"description": "notFound error returned when not published", | ||
"input": { | ||
"didUri": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoz" | ||
}, | ||
"output": { | ||
"didResolutionMetadata": { | ||
"error": "notFound" | ||
} | ||
}, | ||
"errors": true | ||
}, | ||
{ | ||
"description": "invalidDid error returned for suffix with invalid character", | ||
"input": { | ||
"didUri": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfov" | ||
}, | ||
"output": { | ||
"didResolutionMetadata": { | ||
"error": "invalidDid" | ||
} | ||
}, | ||
"errors": true | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was under the impression that we want to have 1 JSON per test vector, so we can do something like
with this structure, how do you parse out and use for multiple test cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the web5-* we have formatting like this:
https://github.com/TBD54566975/web5-spec/blob/main/test-vectors/README.md
you take the array of test vectors, they will all attempt to parse in the object and run the feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will want to consolidate and have tbdex be the same, otherwise we will have 100s of json files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually after discussion with Diane it makes sense to leave tbdex vectors the way they are