Skip to content

Commit cd6fbaf

Browse files
committed
[!] fix build issue
1 parent cdecfb4 commit cd6fbaf

File tree

11 files changed

+11206
-5421
lines changed

11 files changed

+11206
-5421
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14-
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
14+
- uses: pnpm/action-setup@v4
1515
with:
16-
version: 7.9.0
16+
version: 10.5.2
1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: 16.x
19+
node-version: 18.x
2020
cache: pnpm
2121
- name: Install dependencies
2222
run: pnpm i

docs/core-concepts/proof-service/authservice.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ id: as-intro
33
title: Web3 Auth, Auth Service
44
sidebar_position: 2
55
---
6-
As we already built up the connection between avatar and [other identities](core-concepts/proof-service/ps-intro#supported-platform). The idea of letting DApps have its own version of "Sign-in with Google/Twitter" came out naturally. Auth Service is designed to help DApps realize this capability.
6+
As we already built up the connection between avatar and [other identities](https://github.com/NextDotID/proof_server#supported). The idea of letting DApps have its own version of "Sign-in with Google/Twitter" came out naturally. Auth Service is designed to help DApps realize this capability.
77

88
## How it works
99

10-
### Workflow of Auth with 3rd party platform
10+
### Workflow of Auth with 3rd party platform
1111

1212
![](../../../static/img/core-concept/authservice-workflow.png)
1313

1414
When a DApp initiates an authorization process, it must specify an `AuthService` instance (We strongly recommend to self-host one) to carry out the authentication. (step 2)
1515

16-
`AuthService` begins by authenticating the identity using third-party platforms (e.g., Twitter ID).
16+
`AuthService` begins by authenticating the identity using third-party platforms (e.g., Twitter ID).
1717
Once authenticated, `AuthService` queries the [ProofService](./ps-intro) to check the binding avatar result of this identity. (step 3-4)
1818

1919
If the authenticated identity is associated with an Avatar, and this Avatar aligns with one of the pre-configured Avatars in `AuthService`, then `AuthService` grants the DApp permission to use the Avatar as its identity for a set experimental duration. (step 5-6)
@@ -28,8 +28,8 @@ The process concludes by redirecting to the DApp with the following parameters(s
2828
5. `subkey_cert_sig` (string, required): Subkey certification signature signed by Avatar, encoded in Base58.
2929
6. `sig` (string, required): Signature of `avatar=${avatar}\nredirect_uri={redirect_uri}\nexpired_at=${expired_at}\nstate=${state}` singed by Subkey, encoded in Base58.
3030

31-
### Configuration
32-
Understanding how it operates, the preliminary step before launching an instance of `Auth Service` is to prepare a configuration file.There are three parts.
31+
### Configuration
32+
Understanding how it operates, the preliminary step before launching an instance of `Auth Service` is to prepare a configuration file.There are three parts.
3333

3434
#### The Avatar and a subkey that is signed by the avatar:
3535
In the configuration, the list of avatars represents the identity that can be authenticated by this instance of `AuthService`. The private key is used to sign ta message, proving the ownership of the avatar. We strongly recommend using a subkey that is signed by the avatar instead of the avatar itself in the configuration. For enhanced security, it's advisable to generate a unique subkey for specific cases. This not only tailors the security to the situation but also minimizes the risk of exposing the avatar's private key.

docs/core-concepts/proof-service/intro.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_position: 1
88

99
![](../../../static/img/avatar-diagram.png)
1010

11-
## How to build the connection
11+
## How to build the connection
1212

1313
### Work Flow
1414
Use Twitter platform as an example to explain how to use `ProofService` to build a bi-directional binding between a Twitter account and an avatar:
@@ -18,7 +18,7 @@ Use Twitter platform as an example to explain how to use `ProofService` to build
1818
```
1919
Struct SignaturePayload {
2020
action: Action, // create/delete, refer to bind/unbind
21-
created_at: number, // timestamp
21+
created_at: number, // timestamp
2222
platform: Platform;
2323
identity: string;
2424
prev :null | string, //the previous create/delete operation signature related to this avatar
@@ -34,11 +34,11 @@ Basically, the generic idea is to prove that the Avatar and another identity bel
3434

3535
### Data Structure
3636

37-
After the binding, ProofService will use a blockchain-like model called ProofChain to record of "Avatar <-> Identity" connection(we called Proof) and save it in both the ProofService side and upload it to Arweave. The definitions of the proof and proofchain are as the followings.
37+
After the binding, ProofService will use a blockchain-like model called ProofChain to record of `Avatar <-> Identity` connection(we called Proof) and save it in both the ProofService side and upload it to Arweave. The definitions of the proof and proofchain are as the followings.
3838

3939
#### Proof
4040

41-
The definition of the proof contains all the necessary information between the connection of "Avatar <-> Identity", contains the operation type that is binding or dismiss, which platform and identity, timestamp, signature by the avatar...
41+
The definition of the proof contains all the necessary information between the connection of `Avatar <-> Identity`, contains the operation type that is binding or dismiss, which platform and identity, timestamp, signature by the avatar...
4242
The structure is definied as:
4343

4444
```
@@ -62,24 +62,24 @@ interface Proof {
6262
// If this is genesis link, leave it null; else, it equals
6363
// previous link's signature. Worked as a pointer.
6464
prev: Signature | null;
65-
65+
6666
avatar: String;
6767
action: Action;
6868
platform: Platform;
6969
identity: string;
70-
70+
7171
// if action === Action.create, it shouldn't be empty(except ethereum); else, left null
7272
proof_location: string | null;
73-
73+
7474
// UNIX timestamp (unit: second)
7575
created_at: number;
76-
76+
7777
// An UUID of this link, works as a global identifier.
7878
uuid: string;
79-
79+
8080
// See the definition above
8181
signature_payload: SignaturePayload;
82-
82+
8383
// Signature of this link made by avatar.
8484
signature: Signature;
8585
}
@@ -104,10 +104,11 @@ From day one, the connection data in Proof Service to public so that everyone ca
104104
[API docs](../../rest-api/kvservice-api.md)
105105
[An example of data in Arweave](https://viewblock.io/arweave/tx/wvzDhXgcglrUWob9CUjTfJ6tj322eCWDKI2bVtU_cx4)
106106

107-
Noted that the APIs in the docs contain the API to help bind "Avatar <-> Identity", like `POST /v1/proof/payload` or `POST /v1/proof`, but also serval APIs to query the state of the [proofs](https://github.com/NextDotID/proof_server/blob/develop/docs/api.apib#L160) and [the proofchain under an avatar](https://github.com/NextDotID/proof_server/blob/develop/docs/api.apib#L285).
107+
Noted that the APIs in the docs contain the API to help bind `Avatar <-> Identity`, like `POST /v1/proof/payload` or `POST /v1/proof`, but also serval APIs to query the state of the [proofs](https://github.com/NextDotID/proof_server/blob/develop/docs/api.apib#L160) and [the proofchain under an avatar](https://github.com/NextDotID/proof_server/blob/develop/docs/api.apib#L285).
108108
The Arweave example contains the single Proof record and based on the mechanism of Arweave, can keep getting the previous record until Genesis one.
109109

110-
## Supported Platform
110+
## Supported Platform
111+
111112
[Supported Platform](https://github.com/NextDotID/proof_server#supported)
112113

113114
## How to contribute

docs/core-concepts/relation-service/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 1
66

77
In the preceding chapter, we discussed how to construct an identity graph using `ProofService`. Besides ProofService, there are several other data sources both on-chain and off-chain offering similar connections.`RelationService` aggregates the existing identities from ProofService and the other protocol whose identities are bound to and in parallel to Next.ID, structure the identities with the graph database and finally provide to the public via GraphQL. Hope to open up a range of possibilities for integration with external protocols and build a more comprehensive identity graph.
88

9-
`RelationService` aggregates and indexes the other third-party "identity <-> identity" connections from the data source to enrich the identity graph:
9+
`RelationService` aggregates and indexes the other third-party `identity <-> identity` connections from the data source to enrich the identity graph:
1010

1111
- [ENS]
1212
- [Farcaster]

docs/introduction/how-it-works.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ After `ProofService`validates the signature with `uuid` and `created_at` fr
3939

4040
## [KVService](../core-concepts/proof-service/kvservice.md)
4141

42-
### [Write Data](core-concepts/proof-service/ks-intro#write-data)
42+
### [Write Data](../core-concepts/proof-service/ks-intro#work-flow-for-writing)
4343

4444
In this scenario, User requests for a modification on an Application. `KVService` will return the `sign_payload` based on the Application’s `POST /v1/KV/payload`.
4545

docs/rest-api/kvservice-api.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ for Rust.
5151
+ content (object, required) - KV-pair of this entry.
5252

5353
+ Body
54-
54+
```json
5555
{
5656
"avatar": "0x04c7cacde73af939c35d527b34e0556ea84bab27e6c0ed7c6c59be70f6d2db59c206b23529977117dc8a5d61fa848f94950422b79d1c142bcf623862e49f9e6575",
5757
"proofs": [{
@@ -70,6 +70,7 @@ for Rust.
7070
}
7171
}]
7272
}
73+
```
7374

7475
+ Response 404 (application/json)
7576

@@ -90,7 +91,8 @@ Persona not found (no KV was ever created).
9091

9192
+ Body
9293

93-
{
94+
```json
95+
{
9496
"avatar": "0x04c7cacde73af939c35d527b34e0556ea84bab27e6c0ed7c6c59be70f6d2db59c206b23529977117dc8a5d61fa848f94950422b79d1c142bcf623862e49f9e6575",
9597
"platform": "nextid",
9698
"identity": "0x04c7cacde73af939c35d527b34e0556ea84bab27e6c0ed7c6c59be70f6d2db59c206b23529977117dc8a5d61fa848f94950422b79d1c142bcf623862e49f9e6575",
@@ -105,6 +107,7 @@ Persona not found (no KV was ever created).
105107
}
106108
}
107109
}
110+
```
108111

109112
+ Response 200 (application/json)
110113

@@ -116,11 +119,13 @@ Persona not found (no KV was ever created).
116119

117120
+ Body
118121

122+
```json
119123
{
120124
"uuid": "40c13c92-31e5-40d1-aebb-143d8e5b9c5e",
121125
"created_at": 1646983606,
122126
"sign_payload": "{\"action\":\"kv\",\"created_at\":1646983606,\"patch\":{\"a\":\"sample\",\"key_to_delete\":null,\"structure\":[\"it\",\"could\",\"be\",\"anything\"],\"this\":\"is\"},\"prev\":null,\"uuid\":\"40c13c92-31e5-40d1-aebb-143d8e5b9c5e\"}"
123127
}
128+
```
124129

125130
### Apply a patch [POST /v1/kv] {#patch}
126131

@@ -137,7 +142,7 @@ Persona not found (no KV was ever created).
137142
+ patch (object, required) - Patch content
138143

139144
+ Body
140-
145+
```json
141146
{
142147
"avatar": "0x04c7cacde73af939c35d527b34e0556ea84bab27e6c0ed7c6c59be70f6d2db59c206b23529977117dc8a5d61fa848f94950422b79d1c142bcf623862e49f9e6575",
143148
"platform": "nextid",
@@ -156,7 +161,7 @@ Persona not found (no KV was ever created).
156161
}
157162
}
158163
}
159-
164+
```
160165
+ Response 201 (application/json)
161166

162-
Created successfully. Response is same as `GET /v1/kv`.
167+
Created successfully. Response is same as `GET /v1/kv`.

0 commit comments

Comments
 (0)