I hereby claim:
- I am frankhinek on github.
- I am frankhinek (https://keybase.io/frankhinek) on keybase.
- I have a public key whose fingerprint is A3AB 596B 6C50 4E14 649A CA01 94BE 8F29 5A99 120F
To claim this, I am signing this object:
{ | |
"cmd": "env && python3 -m http.server $PORT0", | |
"container": { | |
"docker": { | |
"image": "python:3" | |
}, | |
"type": "DOCKER" | |
}, | |
"cpus": 0.25, | |
"healthChecks": [ |
I hereby claim:
To claim this, I am signing this object:
# Check whether script is executing in a VirtualEnv or Conda environment | |
if [ -z "$VIRTUAL_ENV" ] && [ -z "$CONDA_PREFIX" ] ; then | |
echo "VirtualEnv or Conda env is not activated" | |
exit -1 | |
fi | |
# Set the virtual environment path | |
if ! [ -z "$VIRTUAL_ENV" ] ; then | |
VENV_PATH=$VIRTUAL_ENV | |
elif ! [ -z "$CONDA_PREFIX" ] ; then |
import { DataStream, Dwn, MessageStoreLevel, RecordsQuery, RecordsWrite } from '@tbd54566975/dwn-sdk-js'; | |
import { createProfile, randomBytes } from './utils.js'; | |
const dwn = await Dwn.create({messageStore}); | |
const alice = await createProfile(); | |
const dataBytes = randomBytes(32); | |
let dataStream = DataStream.fromBytes(dataBytes); |
Credit for code to Joel Bruner in this post.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Web5 CRUD Example</title> | |
<script src="https://unpkg.com/@tbd54566975/web5"></script> | |
</head> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Protocol Example with Alice & Bob DWNs</title> | |
<script src="https://unpkg.com/@tbd54566975/web5"></script> | |
</head> | |
Hex string encoded:
19c356a57605e7be8d101e211137dec2bbb875f076a60866529eff68372380c63e435c852bf3
dbc6fa4bbda014c561af361cace90c91350477c010769a9910060000000065b035ce00008400
0000000300000000035f6b30045f646964343177696161616f61677a63656767736e77667a6d
78356377656f67356d736734753533366d627938737179336d6b703377796b6f000010000100
001c2000373669643d303b743d303b6b3d6c53754d5968673132494d6177714675742d325552
413231324e7165382d574542374f426c616d356f4255035f7330045f64696434317769616161
Output of node test.js
:
node test.js
BearerDid {
uri: 'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo',
document: {
id: 'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo',
verificationMethod: [ [Object] ],
authentication: [