Skip to content
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

Did CRUD #4

Merged
merged 17 commits into from
Mar 13, 2020
Merged
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