-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Flaxscrip-deployment-guide-1
- Loading branch information
Showing
32 changed files
with
1,411 additions
and
220 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,16 @@ | ||
# Contributing to the MDIP Keychain open source project | ||
|
||
1. [Create an issue](https://github.com/KeychainMDIP/kc/issues) first | ||
- Requirements and acceptance criteria should be discussed in the issue | ||
2. Create a development branch from the issue | ||
- Branch name should start with issue number | ||
- Github provides a link in the issue to [create the branch](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-a-branch-for-an-issue) | ||
3. Create a PR from the development branch | ||
- All PRs must be linked to an issue | ||
4. If the PR contains code changes then do a smoke test before merge | ||
- Use `./start-node` to build and run the containers | ||
- Make sure the node syncs OK | ||
- Check the service logs for any errors | ||
- An easy check is to run `./kc perf-test` (to create 100 local ephemeral credentials) followed by `./admin verify-db` (to garbage-collect the test credentials) | ||
5. Merge the PR with squashed commits | ||
6. Use [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) prefixes for the merge commit message |
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
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
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
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,19 @@ | ||
let baseWallet; | ||
let cachedWallet; | ||
|
||
export function setWallet(wallet) { | ||
baseWallet = wallet; | ||
} | ||
|
||
export function saveWallet(wallet, overwrite = false) { | ||
cachedWallet = wallet; | ||
return baseWallet.saveWallet(wallet, overwrite); | ||
} | ||
|
||
export function loadWallet() { | ||
if (!cachedWallet) { | ||
cachedWallet = baseWallet.loadWallet(); | ||
} | ||
|
||
return cachedWallet; | ||
} |
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
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
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
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
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,8 @@ | ||
[flake8] | ||
exclude = | ||
__init__.py, | ||
.git, | ||
*/.venv/, | ||
*/build/, | ||
*/dist/ | ||
max-line-length = 88 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
__pycache__ | ||
**/*.pyc | ||
*.egg-info/ | ||
dist/ |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 MDIP | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,26 @@ | ||
# MDIP Keymaster | ||
|
||
Keymaster is a client library for the MDIP. It manages a wallet with any number of identities. | ||
|
||
### Installation | ||
|
||
```bash | ||
pip install keymaster-sdk | ||
``` | ||
|
||
### Requirements | ||
|
||
- Running keymaster instance | ||
|
||
### Usage | ||
|
||
```python | ||
import keymaster_sdk as keymaster | ||
|
||
# Optional: URL defaults to http://localhost:4226 and can also | ||
# be set using the environment variable KC_KEYMASTER_URL | ||
keymaster.set_url('http://example.com:4226') | ||
|
||
ready = keymaster.is_ready() | ||
print(f'Keymaster is ready: {ready}') | ||
``` |
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 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "keymaster-sdk" | ||
version = "0.1.0" | ||
description = "Keymaster is a client library for the MDIP" | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
authors = [ | ||
{ name="David McFadzean", email="[email protected]" }, | ||
{ name="Peter Bushnell", email="[email protected]" } | ||
] | ||
dependencies = [ | ||
"requests==2.32.0" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/KeychainMDIP/kc/" |
Oops, something went wrong.