Skip to content

Commit 15b6f7f

Browse files
committed
Merge branch 'develop'
2 parents b674b9d + a7f063e commit 15b6f7f

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

docs/api.apib

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ See [README.md](./README.md)
7272
+ action (string, required) - Action (`create` / `delete`)
7373
+ platform (string, required) - Target platform. See table above for all available platforms. See table in [README.md](./README.md) for all available values.
7474
+ identity (string, required) - Identity in target platform to proof. Usually a "username" or "screen name". See [README.md](./README.md).
75-
+ public_key (string, required) - Public key of NextID Persona to connect to. Should be secp256k1 curve (for now), 65-bytes or 33-bytes long (uncompressed / compressed) and stringified into hex form (`/^0x[0-9a-f]{65,130}$/`).
75+
+ public_key (string, required) - Public key of NextID Avatar to connect to. Should be secp256k1 curve (for now), 65-bytes or 33-bytes long (uncompressed / compressed) and stringified into hex form (`/^0x[0-9a-f]{65,130}$/`).
7676

7777
+ Body
7878

@@ -117,10 +117,10 @@ See [README.md](./README.md)
117117
+ platform (string, required) - Target platform. See table above for all available platforms. See table above for all available values.
118118
+ identity (string, required) - Identity in target platform to proof. Usually a "username" or "screen name". See [README.md](./README.md).
119119
+ proof_location (string, optional) - Location where public-accessible proof post is set. See [README.md](./README.md).
120-
+ public_key (string, required) - Public key of NextID Persona to connect to. Should be secp256k1 curve (for now), 65-bytes or 33-bytes long (uncompressed / compressed) and stringified into hex form (`/^0x[0-9a-f]{65,130}$/`).
120+
+ public_key (string, required) - Public key of NextID Avatar to connect to. Should be secp256k1 curve (for now), 65-bytes or 33-bytes long (uncompressed / compressed) and stringified into hex form (`/^0x[0-9a-f]{65,130}$/`).
121121
+ extra (object, optional) - Extra info for specific platform needed.
122122
+ wallet_signature (string, optional) - (needed for `platform: ethereum`) Signature signed by ETH wallet (w/ same sign payload), BASE64-ed.
123-
+ signature (string, optional) - (needed for `platform: ethereum`) Signature signed by Persona private key (w/ same sign payload), BASE64-ed.
123+
+ signature (string, optional) - (needed for `platform: ethereum`) Signature signed by Avatar private key (w/ same sign payload), BASE64-ed.
124124
+ uuid (string, required) - UUID of this chain link. Use the exact value from `POST /v1/proof/payload`.
125125
+ created_at (string, required) - Creation time of this chain link (UNIX timestamp, unit: second). Use the exact value from `POST /v1/proof/payload`.
126126

@@ -181,9 +181,9 @@ Request failed.
181181
+ current (number, required) - current page number.
182182
+ next (number, required) - Next page. `0` if current page is the last one.
183183
+ ids (array[object], required) - All IDs found. Will be empty array if not found.
184-
+ persona (string, required) - Persona public key
185-
+ last_arweave_id (string, required) - Arweave transaction ID of last proof this persona signed
186-
+ proofs (array[object], required) - All proofs under this persona
184+
+ avatar (string, required) - Avatar public key
185+
+ last_arweave_id (string, required) - Arweave transaction ID of last proof this avatar signed
186+
+ proofs (array[object], required) - All proofs under this Avatar
187187
+ platform (string, required) - Platform
188188
+ identity (string, required) - Identity on that platform
189189
+ created_at (string, required) - Creation time of this proof. (timestamp, unit: second)
@@ -201,7 +201,7 @@ Request failed.
201201
"next": 2
202202
},
203203
"ids": [{
204-
"persona": "0x04c7cacde73af939c35d527b34e0556ea84bab27e6c0ed7c6c59be70f6d2db59c206b23529977117dc8a5d61fa848f94950422b79d1c142bcf623862e49f9e6575",
204+
"avatar": "0x04c7cacde73af939c35d527b34e0556ea84bab27e6c0ed7c6c59be70f6d2db59c206b23529977117dc8a5d61fa848f94950422b79d1c142bcf623862e49f9e6575",
205205
"proofs": [{
206206
"platform": "twitter",
207207
"identity": "my_twitter_screen_name",
@@ -218,7 +218,7 @@ Request failed.
218218
"invalid_reason": ""
219219
}]
220220
}, {
221-
"persona": "0xANOTHER",
221+
"avatar": "0xANOTHER",
222222
"proofs": [{
223223
"platform": "ethereum",
224224
"identity": "0x114514......",
@@ -238,7 +238,7 @@ Request failed.
238238

239239
+ platform (string, required) - Proof platform.
240240
+ identity (string, required) - Identity on target platform.
241-
+ public_key (string, required) - Public key of NextID Persona to connect to. Should be secp256k1 curve (for now), 65-bytes or 33-bytes long (uncompressed / compressed) and stringified into hex form (`/^0x[0-9a-f]{65,130}$/`)
241+
+ public_key (string, required) - Public key of NextID Avatar to connect to. Should be secp256k1 curve (for now), 65-bytes or 33-bytes long (uncompressed / compressed) and stringified into hex form (`/^0x[0-9a-f]{65,130}$/`)
242242

243243
+ Example
244244

@@ -302,7 +302,7 @@ Found.
302302
+ identity (string, required) - Identity on that platform
303303
+ proof_location (string, required) - Location where public-accessible proof post is set. See [README.md](./README.md).
304304
+ created_at (string, required) - Creation time of this proof. (timestamp, unit: second)
305-
+ signature (string, required) - generate signature_payload and persona_private_key
305+
+ signature (string, required) - generate signature_payload and avatar_private_key
306306
+ signature_payload (string, required) - Raw string to be sent to `personal_sign`
307307
+ extra (string, optional) - Extra info for specific platform needed.
308308
+ uuid (string, required) - UUID of this chain link. Use the exact value from `POST /v1/proof/payload`.
@@ -328,6 +328,7 @@ Found.
328328
"signature":"gMUJ75eewkdaNrFp7bafzckv9+rlW7rVaxkB7/sYzYgFdFltYG+gn0lYzVNgrAdHWZPmu2giwJniGG7HG9iNigE=",
329329
"signature_payload":"",
330330
"uuid":"",
331+
"arweave_id": "",
331332
"extra":{
332333

333334
}
@@ -373,7 +374,7 @@ Found.
373374
+ identity (string, required) - Identity on that platform. See [Docs](https://docs.next.id/rest-api/platforms) for the meaning of this field..
374375
+ proof_location (string, required) - Location where public-accessible proof post is set. See [Docs](https://docs.next.id/rest-api/platforms).
375376
+ created_at (string, required) - Creation time of this proof. (timestamp, unit: second)
376-
+ signature (string, required) - generate signature_payload and persona_private_key
377+
+ signature (string, required) - generate signature_payload and avatar_private_key
377378
+ signature_payload (string, required) - Raw string to be sent to `personal_sign`
378379
+ extra (string, optional) - Extra info for specific platform needed.
379380
+ uuid (string, required) - UUID of this chain link. Use the exact value from `POST /v1/proof/payload`.
@@ -394,6 +395,7 @@ Found.
394395
"signature": "gMUJ75eewkdaNrFp7bafzckv9+rlW7rVaxkB7/sYzYgFdFltYG+gn0lYzVNgrAdHWZPmu2giwJniGG7HG9iNigE=",
395396
"signature_payload": "",
396397
"uuid": "",
398+
"arweave_id": "",
397399
"extra": {}
398400
}
399401
]

docs/proof_chain.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ interface Link {
4646
// Main struct
4747
interface Chain {
4848
version: VERSION;
49-
persona: {
49+
avatar: {
5050
public_key: PublicKey,
5151
curve: "secp256k1",
5252
};
@@ -60,7 +60,7 @@ interface Chain {
6060
```javascript
6161
{
6262
"version": "1",
63-
"persona": {
63+
"avatar": {
6464
"public_key": "0x0485554db28de6fefb7fe532164b67372a5e9d78dfd7f77e09a8b274f777c3e64f2e20353df005a83dbe4c5ca663638621ce4d1dd0c9586ab3fc71286b74741ed8",
6565
"curve": "secp256k1"
6666
},
@@ -103,10 +103,10 @@ function sign_link(link: Link): Signature {
103103
// Sign this using web3 personal_sign method
104104
// Specifically:
105105
let personal_signature_payload = keccak256("\x19Ethereum Signed Message:\n" + signature_payload.length + signature_payload)
106-
let signature_bin: Buffer = persona_private_key.sign(personal_signature_payload)
106+
let signature_bin: Buffer = avatar_private_key.sign(personal_signature_payload)
107107
let signature = "0x" + Base16.encode(signature_bin, {case: 'lower'})
108108

109-
// const signature = web3.eth.personal.sign(signature_payload, persona_private_key);
109+
// const signature = web3.eth.personal.sign(signature_payload, avatar_private_key);
110110

111111
// Final artifact should be a format like below:
112112
assert(signature.match(/^0x[0-9a-f]{130}$/))

0 commit comments

Comments
 (0)