vetKeys API demo
Advanced
Tutorial
This demo provides a canister (src/system_api
) that offers the proposed vetKD system API, implemented demonstration, testing, and initial development purposes. We stress that it does not offer security yet as no threshold cryptography is used yet to secure the key.
This demo uses files found in this repository.
- Prerequisites
Install the IC SDK. Download and install git.
Step 1: Begin by cloning the Github repository containing this project:
- Motoko
- Rust
git clone https://github.com/dfinity/examples/
cd examples/motoko/vetkd
git clone https://github.com/dfinity/examples/
cd examples/rust/vetkd
Step 2: Start a local instance of the replica.
First, start the local replica if necessary and create or open a project.
Step 3: Ensure the dfx uses the canister IDs that are hard-coded in the source code:
dfx canister create system_api --specified-id s55qq-oqaaa-aaaaa-aaakq-cai
Without this, the dfx may use different canister IDs for the system_api
and app_backend
canisters.
Step 4: Ensure that the required node modules are available in your project directory:
npm install
Step 5: Register, build and deploy the project:
dfx deploy
This command should finish successfully with output similar to the following one:
Deployed canisters.
URLs:
Frontend canister via browser
app_frontend_js: http://127.0.0.1:4943/?canisterId=by6od-j4aaa-aaaaa-qaadq-cai
Backend canister via Candid interface:
app_backend: http://127.0.0.1:4943/?canisterId=avqkn-guaaa-aaaaa-qaaea-cai&id=tcvdh-niaaa-aaaaa-aaaoa-cai
app_frontend: http://127.0.0.1:4943/?canisterId=avqkn-guaaa-aaaaa-qaaea-cai&id=b77ix-eeaaa-aaaaa-qaada-cai
system_api: http://127.0.0.1:4943/?canisterId=avqkn-guaaa-aaaaa-qaaea-cai&id=s55qq-oqaaa-aaaaa-aaakq-cai