Skip to content

Commit

Permalink
Update service.md
Browse files Browse the repository at this point in the history
Signed-off-by: Ashutosh Tripathi <[email protected]>
  • Loading branch information
ashucoder9 authored Nov 22, 2024
1 parent 66c54ec commit fe0be79
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions api/keystore/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ This API uses the `json 2.0` API format. For more information on making JSON RPC

## Endpoint

```
```sh
/ext/keystore
```

## Methods

### keystore.createUser
### `keystore.createUser`

Create a new user with the specified username and password.

**Signature**:

```
```sh
keystore.createUser(
{
username:string,
Expand All @@ -48,7 +48,7 @@ keystore.createUser(

**Example Call**:

```
```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
Expand All @@ -62,31 +62,31 @@ curl -X POST --data '{

**Example Response**:

```
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
```

### keystore.deleteUser
### `keystore.deleteUser`

<Callout type="warn">
Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
</Callout>

Delete a user.

**Signature**:

```
```sh
keystore.deleteUser({username: string, password:string}) -> {}
```

**Example Call**:

```
```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
Expand All @@ -100,15 +100,15 @@ curl -X POST --data '{

**Example Response**:

```
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
```

### keystore.exportUser
### `keystore.exportUser`

<Callout type="warn">
Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
Expand All @@ -118,7 +118,7 @@ Export a user. The user can be imported to another node with [`keystore.importUs

**Signature**:

```
```sh
keystore.exportUser(
{
username:string,
Expand All @@ -135,7 +135,7 @@ keystore.exportUser(

**Example Call**:

```
```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
Expand All @@ -149,7 +149,7 @@ curl -X POST --data '{

**Example Response**:

```
```json
{
"jsonrpc": "2.0",
"id": 1,
Expand All @@ -160,7 +160,7 @@ curl -X POST --data '{
}
```

### keystore.importUser
### `keystore.importUser`

<Callout type="warn">
Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
Expand All @@ -170,7 +170,7 @@ Import a user. `password` must match the user's password. `username` doesn't hav

**Signature**:

```
```sh
keystore.importUser(
{
username:string,
Expand All @@ -185,7 +185,7 @@ keystore.importUser(

**Example Call**:

```
```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
Expand All @@ -200,15 +200,15 @@ curl -X POST --data '{

**Example Response**:

```
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
```

### keystore.listUsers
### `keystore.listUsers`

<Callout type="warn">
Deprecated as of [v1.9.12](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.12).
Expand All @@ -218,13 +218,13 @@ List the users in this keystore.

**Signature**:

```
```sh
keystore.ListUsers() -> {users:[]string}
```

**Example Call**:

```
```sh
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
Expand All @@ -234,7 +234,7 @@ curl -X POST --data '{

**Example Response**:

```
```json
{
"jsonrpc": "2.0",
"id": 1,
Expand Down

0 comments on commit fe0be79

Please sign in to comment.