syui 2 months ago
parent 469f9e17d3
commit 0f0c696928
Signed by: syui
GPG Key ID: 67AC97A939D3EA19

@ -12,4 +12,7 @@ DID_PLC_URL="https://plc.directory"
ADMIN_PASSWORD="admin"
INVITE_REQUIRED="false"
plcUrl="https://plc.directory"
IMG_URI_ENDPOINT="image"
#IMG_URI_ENDPOINT="image"
SMTP_HOST="smtp.gmail.com"
SMTP_USERNAME="gmail-username"
SMTP_PASSWORD="2fa-app-password"

@ -8,6 +8,11 @@ at protocol on fly.io
```sh
# m1-mac
$ node -v
v18.14.1
$ npm -v
9.6.1
$ git clone https://github.com/syui/atproto
$ cd !$:t
$ npm config edit
@ -101,6 +106,10 @@ curl -X POST -H "Content-Type: application/json" -d "$json" $url
Ok
```
### api
> packages/api/src/client/lexicons.ts
### session
```sh
@ -111,7 +120,7 @@ $ pass=xxx
$ curl -X POST -H "Content-Type: application/json" -d "{\"handle\":\"$user.$host\",\"password\":\"$pass\"}" https://$host/xrpc/com.atproto.session.create
```
### profile
### account profile
```sh
$ url="https://$host/xrpc/app.bsky.actor.getProfile?actor=syui.syui.ai"
@ -129,3 +138,25 @@ $ url=https://$host/xrpc/com.atproto.account.createInviteCode
$ json="{\"useCount\":5}"
$ curl -X POST -u admin:${admin_password} -H "Content-Type: application/json" -d "$json" $url
```
### handle too short
`change : 3 -> 1`
```js:pakcages/identifier/src/handle.ts
if (front.length < 1) {
throw new InvalidHandleError('Handle too short')
}
```
### account delete
```sh
# com.atproto.account.delete
$ url=https://$host/xrpc/com.atproto.account.delete
$ token=`cat token.json| jq -r .accessJwt`
$ did=`cat token.json| jq -r .did`
$ json="{\"did\":\"$did\",\"password\":\"$pass\",\"token\":\"$mail_token\"}"
$ curl -X POST -H "Content-Type: application/json" -d "$json" $url
```

Loading…
Cancel
Save