-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added some surrounding documentation
Signed-off-by: Berend Sliedrecht <[email protected]>
- Loading branch information
1 parent
87ec665
commit ae19ac6
Showing
3 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, | ||
body size, disability, ethnicity, gender identity and expression, level of | ||
experience, nationality, personal appearance, race, religion, or sexual | ||
identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an | ||
appointed representative at an online or offline event. Representation of a | ||
project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at | ||
[[email protected]](mailto:[email protected]). All complaints will be reviewed | ||
and investigated and will result in a response that is deemed necessary and | ||
appropriate to the circumstances. The project team is obligated to maintain | ||
confidentiality with regard to the reporter of an incident. Further details of | ||
specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.4, available at | ||
[http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org [version]: | ||
http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# How to contribute | ||
|
||
You are encouraged to contribute to the repository by forking and submitting a | ||
pull request. | ||
|
||
For significant changes, please open an issue first to discuss the proposed | ||
changes to avoid re-work. | ||
|
||
(If you are new to GitHub, you might start with a [basic | ||
tutorial](https://docs.github.com/en/get-started/quickstart/set-up-git) and | ||
check out a more detailed guide to [pull | ||
requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).) | ||
|
||
Pull requests will be evaluated by the repository guardians on a schedule and | ||
if deemed beneficial will be committed to the main branch. Pull requests should | ||
have a descriptive name and include an summary of all changes made in the pull | ||
request description. | ||
|
||
If you would like to propose a significant change, please open an issue first | ||
to discuss the work with the community. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<p align="center"> | ||
<picture> | ||
<source media="(prefers-color-scheme: light)" srcset="https://res.cloudinary.com/animo-solutions/image/upload/v1656578320/animo-logo-light-no-text_ok9auy.svg"> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://res.cloudinary.com/animo-solutions/image/upload/v1656578320/animo-logo-dark-no-text_fqqdq9.svg"> | ||
<img alt="Animo Logo" height="250px" /> | ||
</picture> | ||
</p> | ||
|
||
<h1 align="center" ><b>Univeral Resolver integration for Aries Framework JavaScript</b></h1> | ||
|
||
<h4 align="center">Powered by | ||
<picture> | ||
<source media="(prefers-color-scheme: light)" srcset="https://res.cloudinary.com/animo-solutions/image/upload/v1656579715/animo-logo-light-text_cma2yo.svg"> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://res.cloudinary.com/animo-solutions/image/upload/v1656579715/animo-logo-dark-text_uccvqa.svg"> | ||
<img alt="Animo Logo" height="12px" /> | ||
</picture> | ||
</h4><br> | ||
|
||
<p align="center"> | ||
<a href="https://typescriptlang.org"> | ||
<img src="https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg" /> | ||
</a> | ||
<a href="https://yarnpkg.com"> | ||
<img src="https://img.shields.io/badge/yarn-workspaces-2188b6" /> | ||
</a> | ||
<a href="https://opensource.org/licenses/Apache-2.0"> | ||
<img src="https://img.shields.io/badge/License-Apache_2.0-yellowgreen.svg" /> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="#getting-started">Getting started</a> | ||
| | ||
<a href="#usage">Usage</a> | ||
| | ||
<a href="#contributing">Contributing</a> | ||
| | ||
<a href="#license">License</a> | ||
</p> | ||
|
||
--- | ||
|
||
## Getting Started | ||
|
||
<details> | ||
<summary>Yarn</summary> | ||
|
||
```console | ||
yarn add @animo-id/afj-universal-resolver | ||
``` | ||
|
||
</details> | ||
|
||
## Usage | ||
|
||
> NOTE: it is recommended to use a self-hosted universal resolver and only use | ||
> the development hosted one for development. | ||
```typescript | ||
import { UniversalDidResolver } from "@animo-id/afj-universal-resolver" | ||
import { agentDependencies } from "@aries-framework/node" | ||
import { Agent, DidsModule } from "@aries-framework/core" | ||
import { AskarModule } from "@aries-framework/askar" | ||
import { ariesAskar } from "@hyperledger/aries-askar-nodejs" | ||
|
||
const devUniResolverUrl = "https://dev.uniresolver.io" | ||
const didKey = | ||
"did:key:z4MXj1wBzi9jUstyPMS4jQqB6KdJaiatPkAtVtGc6bQEQEEsKTic4G7Rou3iBf9vPmT5dbkm9qsZsuVNjq8HCuW1w24nhBFGkRE4cd2Uf2tfrB3N7h4mnyPp1BF3ZttHTYv3DLUPi1zMdkULiow3M1GfXkoC6DoxDUm1jmN6GBj22SjVsr6dxezRVQc7aj9TxE7JLbMH1wh5X3kA58H3DFW8rnYMakFGbca5CB2Jf6CnGQZmL7o5uJAdTwXfy2iiiyPxXEGerMhHwhjTA1mKYobyk2CpeEcmvynADfNZ5MBvcCS7m3XkFCMNUYBS9NQ3fze6vMSUPsNa6GVYmKx2x6JrdEjCk3qRMMmyjnjCMfR4pXbRMZa3i" | ||
|
||
const uni = await UniversalDidResolver.initializeWithDynamicMethods( | ||
agentDependencies, | ||
devUniResolverUrl | ||
) | ||
|
||
const agent = new Agent({ | ||
config: { | ||
label: "my-agent", | ||
walletConfig: { id: "some-id", key: "some-key" } | ||
}, | ||
modules: { | ||
askar: new AskarModule({ ariesAskar }), | ||
dids: new DidsModule({ resolvers: [uni] }) | ||
}, | ||
dependencies: agentDependencies | ||
}) | ||
|
||
await agent.initialize() | ||
|
||
const { didDocument } = await agent.dids.resolve(didKey) | ||
``` | ||
|
||
## Contributing | ||
|
||
Is there something you'd like to fix or add? Great, we love community | ||
contributions! To get involved, please follow our [contribution | ||
guidelines](./CONTRIBUTING.md). | ||
|
||
## License | ||
|
||
[Apache 2.0](./LICENSE) |