encointer / personhood-oracle

A service which provides single-use unlinkable proofs of personhood reputation on the encointer network
Apache License 2.0
1 stars 0 forks source link

personhood oracle demo frequency #38

Open brenzi opened 1 year ago

brenzi commented 1 year ago

fork this repo and start your work based on the ab/node-template-sink branch

the demo setup is described here. should allow to fully reproduce the sub0 demo: https://github.com/encointer/personhood-oracle/blob/ab/node-template-sink/README.md

make the Oracle write to frequency

refactor this RPC call to send an extrinsic to fequency instead of node_template

definition of rpc method:

https://github.com/encointer/personhood-oracle/blob/6a518bcfcf4d6989868b017dab5122888bfb3225/enclave-runtime/src/rpc/worker_api_direct.rs#L239

here we verify encointer reputation:

https://github.com/encointer/personhood-oracle/blob/6a518bcfcf4d6989868b017dab5122888bfb3225/enclave-runtime/src/rpc/worker_api_direct.rs#L520-L527

then we compose an extrinsic (here comes your extrinsic). We hard-code metadata here. good enough for demo, but we have upstream issues in the backlog to defive this from metadata more easily

https://github.com/encointer/personhood-oracle/blob/6a518bcfcf4d6989868b017dab5122888bfb3225/enclave-runtime/src/rpc/worker_api_direct.rs#L548

CLI client

The easiest start will be to use our cli client for the demo:

refactor this according to your needs:

https://github.com/encointer/personhood-oracle/blob/6a518bcfcf4d6989868b017dab5122888bfb3225/cli/src/personhood_oracle/commands/issue_node_template_xt.rs#L38

browser dapp

If you insist on a js dapp for the demo, you may find inspiration here: A while back, Encointer has integrated Integritee rpc's: https://github.com/encointer/encointer-js/tree/master/packages/worker-api

noteworthy technical debt

with relevance to the frequency use case

longterm FYI: