Skip to content

Commit

Permalink
Merge pull request #4 from docknetwork/did
Browse files Browse the repository at this point in the history
Did CRUD
  • Loading branch information
bddap authored Mar 13, 2020
2 parents 60284bf + d15396e commit 77b82ea
Show file tree
Hide file tree
Showing 4 changed files with 923 additions and 115 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ cargo run -- \

Additional CLI usage options are available and may be shown by running `cargo run -- --help`.

## Polkadot-js UI
To use this chain from [polkadot-js UI](https://polkadot.js.org/apps), some structures need to be created in the `Settings > Developer` section.
The structures can be found in [developer.json file](./developer.json).

## Dev tips
1. For faster builds during testing use flag `SKIP_WASM_BUILD=1`. This will not generate WASM but only native code.
1. To use `println!` like Rust in `decl_module`'s functions, run the test or binary with flag `SKIP_WASM_BUILD=1`

## Advanced: Generate Your Own Substrate Node Template

A substrate node template is always based on a certain version of Substrate. You can inspect it by
Expand All @@ -100,7 +108,3 @@ git checkout <branch/tag/sha1>

Noted though you will likely get faster and more thorough support if you stick with the releases
provided in this repository.

## Polkadot-js UI
To use this chain from [polkadot-js UI](https://polkadot.js.org/apps), some structures need to be created in the `Settings > Developer` section.
The structures can be found in [developer.json file](./developer.json).
51 changes: 33 additions & 18 deletions developer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
{
"DID": "[u8;32]",
"PublicKeyType": {
"_enum": [
"Sr25519",
"Ed25519",
"Secp256k1"
]
"Did": "[u8;32]",
"Bytes32": {
"value": "[u8;32]"
},
"Bytes33": {
"value": "[u8;33]"
},
"Bytes64": {
"value": "[u8;64]"
},
"Bytes65": {
"value": "[u8;65]"
},
"PublicKey": {
"_enum": {
"Sr25519": "Bytes32",
"Ed25519": "Bytes32",
"Secp256k1": "Bytes33"
}
},
"Signature": {
"_enum": {
"Sr25519": "Bytes64",
"Ed25519": "Bytes64",
"Secp256k1": "Bytes65"
}
},
"KeyDetail": {
"controller": "DID",
"public_key_type": "PublicKeyType",
"public_key": "Vec<u8>"
"controller": "Did",
"public_key": "PublicKey"
},
"KeyUpdate": {
"cmd": "u8",
"did": "DID",
"public_key_type": "PublicKeyType",
"public_key": "Vec<u8>",
"controller": "Option<DID>",
"did": "Did",
"public_key": "PublicKey",
"controller": "Option<Did>",
"last_modified_in_block": "u64"
},
"DIDRemoval": {
"cmd": "u8",
"did": "DID",
"DidRemoval": {
"did": "Did",
"last_modified_in_block": "u64"
}
}
Loading

0 comments on commit 77b82ea

Please sign in to comment.