Skip to content

Commit

Permalink
fix: chores, addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
geekbrother committed Jul 9, 2024
1 parent f2ecd31 commit c5284e4
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions docs/specs/servers/blockchain/blockchain-permissions-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Used to get account list of active sessions
`GET /v1/sessions/{address}?projectId={projectId}`

* `address` - CAIP-10 address format.
* `projectId` - The project identifier.
* `projectId` - Required. The project identifier.

#### Success response body:

```typescript
{
pci: [string]
pci: string[]
}
```

Expand All @@ -33,22 +33,22 @@ Used to get permission by PCI

* `address` - CAIP-10 address format.
* `pci` - Permission identifier.
* `projectId` - The project identifier.
* `projectId` - Required. The project identifier.

#### Success response body:

```typescript
{
"type": string,
"data": any,
"required": bool,
"onChainValidated": bool
"permissionType": string,
"data": string,
"required": boolean,
"onChainValidated": boolean
}
```

#### Response error codes:

* `400 Bad request` - Wrong requested address format.
* `400 Bad request` - Wrong requested address format or PCI not found.

## Add a new permission

Expand All @@ -57,22 +57,21 @@ Creating a new permission session for the account
`POST /v1/sessions/{address}?projectId={projectId}`

* `address` - CAIP-10 address format.
* `projectId` - The project identifier.
* `projectId` - Required. The project identifier.

### Request body:

The POST request body should be in JSON format and following schema:

```typescript
{
permissions:[
permission:
{
"type": string,
"data": any,
"required": bool,
"onChainValidated": bool
"permissionType": string,
"data": string,
"required": boolean,
"onChainValidated": boolean
}
]
}
```

Expand All @@ -98,7 +97,7 @@ Updating permissions context for the certain permission idenitifier.
`POST /v1/sessions/{address}/context/?projectId={projectId}`

* `address` - CAIP-10 address format.
* `projectId` - The project identifier.
* `projectId` - Required. The project identifier.

### Request body:

Expand Down Expand Up @@ -145,7 +144,7 @@ Revoking a permission from account sessions.
`POST /v1/sessions/{address}/revoke/?projectId={projectId}`

* `address` - CAIP-10 address format.
* `projectId` - The project identifier.
* `projectId` - Required. The project identifier.

### Request body:

Expand Down

0 comments on commit c5284e4

Please sign in to comment.