feat: add publish, and rpc
This commit is contained in:
33
__enclave/virt_enclave/README.md
Normal file
33
__enclave/virt_enclave/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
Init signing key:
|
||||
```shell
|
||||
$ cargo r --example create_signing_key
|
||||
```
|
||||
|
||||
Publish script:
|
||||
```shell
|
||||
$ cargo r --example publish_js sample.js
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
```shell
|
||||
$ curl localhost:8888/get_signing_public_key
|
||||
```
|
||||
|
||||
```shell
|
||||
$ curl localhost:8888/list_js
|
||||
```
|
||||
|
||||
```shell
|
||||
$ curl localhost:8888/get_js/30dfa248a807d35820416228c09b983a940f75247eb0cfdfc03ed12e92f58ba6
|
||||
```
|
||||
|
||||
```shell
|
||||
$ curl -X POST -H 'Content-Type: application/json' \
|
||||
--data '{"method": "getName"}' \
|
||||
localhost:8888/call_js/30dfa248a807d35820416228c09b983a940f75247eb0cfdfc03ed12e92f58ba6
|
||||
```
|
||||
|
||||
`--data '{"method": "getName"}'` can be replaced by: `--data-binary @file.json`
|
||||
|
||||
Reference in New Issue
Block a user