syui 2 months ago
parent 0852cd107a
commit 9a16564a38
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

@ -159,3 +159,60 @@ if (front.length < 1) {
}
```
### mail send
mailgun
```
SMTP_HOST="smtp.mailgun.org"
SMTP_USERNAME=""
SMTP_PASSWORD=""
#EMAIL_SMTP_URL=""
EMAIL_NO_REPLY_ADDRESS=""
```
### update_atp_pds
ref : https://github.com/bluesky-social/did-method-plc
> packages/repo/tests/mst.test.ts
> pacakges/dev-env/src/index.ts
```js
import { CID } from 'multiformats'
console.log(`cid=${cid}`)
const obj = {
type: 'update_atp_pds',
handle: '$handle',
service: '$service',
prev: cid,
}
const data = new Uint8Array(cbor.encode(obj))
console.log( `sig=${uint8arrays.toString(await keypair.sign(data), 'base64url')}`,)
```
```sh
make build
make run-dev-env
type=update_atp_pds
handle=syui.syui.ai
service=https://bsky.syui.ai
# syui.syui.ai
url=https://plc.directory/did:plc:schldsdljwxcdtslnbqaoifh
# bsky.syui.ai
url=https://plc.directory/did:plc:dpuhx6nycijhm5yd6erou2wl6ohxockj2fgvzz62x2fopz2xo5tq
# syui.ai
url=https://plc.directory/did:plc:q4ugjxbx2mp6rmnnljjys67zv3nnccvm2ecb5wdqzwka7w7iua6q
json="{
\"type\": \"${type}\",
\"service\": \"${service}\",
\"prev\": ${cid},
\"sig\": \"${sig}\"
}"
curl -X POST -H "Content-Type: application/json" -d "$json" $url
```

Loading…
Cancel
Save