|
|
|
@ -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
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|