DID
Step 1. Check if the address has a DID.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
node | string | edge node url | true |
address | string | wallet address | True |
Returns:
DidListResponse
:
Name | Type | Description | Required |
---|---|---|---|
Array | string array | a list of DID(s) | true |
Step 2. Choose DID or log in with an wallet address
Use the address for login when the interface array is empty; otherwise, use the first element of the array as the DID parameter.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
did | string | DID string,DID or address | False |
address | string | wallet address, DID or address | False |
node | string | edge node url | True |
Returns:
PreloginResponse
:
Name | Type | Description | Required |
---|---|---|---|
did | string | DID (existed or newly created) | true |
message | string | message to be signed | true |
updated | string | update time | true |
3. Sign the return value in step 2.
Parameters:
LoginRequest
:
Name | Type | Description | Required |
---|---|---|---|
type | string | login type(current value is | true |
updated | string | time returned by | true |
identifier | IdentifierModel | login information | true |
| string | device id, not required for new device | false |
IdentifierModel
type:
Name | Type | Description |
---|---|---|
did | string | DID |
token | string | sign the returned message from |
Returns:
LoginResponse
:
Name | Type | Description | Required |
---|---|---|---|
access_token | string | access token | true |
user_id | string | user id | true |
device_id | string | device id | true |
Last updated