stiiifff / did-common-rust Goto Github PK
View Code? Open in Web Editor NEWA Rust library for working with Decentralized Identifiers (DIDs) following the DID specification by the W3C.
License: Apache License 2.0
A Rust library for working with Decentralized Identifiers (DIDs) following the DID specification by the W3C.
License: Apache License 2.0
Implement a did_doc! macro that allows to define a DID Document in a fluent manner:
did_doc!({
"@context": ["https://www.w3.org/2019/did/v1", "https://w3id.org/security/v1"],
"id": "did:example:123456789abcdefghi",
"publicKey": [{
"id": "did:example:123456789abcdefghi#keys-1",
"type": "RsaVerificationKey2018",
"controller": "did:example:123456789abcdefghi",
"publicKeyPem": "-----BEGIN PUBLIC KEY...END PUBLIC KEY-----\r\n"
}, {
"id": "did:example:123456789abcdefghi#keys-2",
"type": "Ed25519VerificationKey2018",
"controller": "did:example:pqrstuvwxyz0987654321",
"publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
}, {
"id": "did:example:123456789abcdefghi#keys-3",
"type": "Secp256k1VerificationKey2018",
"controller": "did:example:123456789abcdefghi",
"publicKeyHex": "02b97c30de767f084ce3080168ee293053ba33b235d7116a3263d29f1450936b71"
}],
})
Note: ":" token might have to be replaced by "=>" token (see https://github.com/maciejhirsz/json-rust)
Implementers builder pattern for DID & DIDDocument structs for a nicer API + prevent external modification via the pub members.
Support for percent encoding syntax in DIDParam following W3C spec at : https://w3c-ccg.github.io/did-spec/#generic-did-parameter-names
Generic DID syntax defined at : https://w3c-ccg.github.io/did-spec/#decentralized-identifiers-dids
Support for a list of Service endpoints in a DID Document following the W3C spec at : https://w3c-ccg.github.io/did-spec/#service-endpoints
Implement a DID::is_valid -> bool func to verify a DID string w/o parsing it into a DID struct
Add support for Path syntax in DID following W3C spec at : https://w3c-ccg.github.io/did-spec/#path
Implement data structure & parser for DID Document, see spec : https://w3c-ccg.github.io/did-spec/#did-documents
Existing Typescript implementation here: https://github.com/decentralized-identity/did-common-typescript
Support for Fragment syntax in DID string following W3C spec at : https://w3c-ccg.github.io/did-spec/#fragment
Support for an Updated timestamp in a DID Document following the W3C spec at : https://w3c-ccg.github.io/did-spec/#updated-optional
The library should support compilation to no_std environment for use in a Wasm context e.g. as a dependency in a Substrate runtime module.
Support for a list of Authentication verification methods in a DID Document following the W3C spec at : https://w3c-ccg.github.io/did-spec/#authentication
Support for a Creation timestamp in a DID Document following the W3C spec at : https://w3c-ccg.github.io/did-spec/#created-optional
Implement a pluggable resolver model with a "driver" per chain.
There should probably be a DIDResolver trait defined a fetch function returning a DIDDocument containing the metadata associated with the DID passed in parameter.
See existing implementation in Typescript: https://github.com/decentralized-identity/did-common-typescript
Support for Query syntax in DID string following W3C spec at : https://w3c-ccg.github.io/did-spec/#query
Support for a Proof of integrity in a DID Document following the W3C spec at : https://w3c-ccg.github.io/did-spec/#proof-optional
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.