mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Keymanager api postman test collection (#10209)
* initial commit * adding keymanager api repo url * updated postman collection * removing unused folder * removing validator build * Update hack/keymanager-api/README.md Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update hack/keymanager-api/README.md Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update hack/keymanager-api/README.md Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
parent
5f8b01ccda
commit
11f50453fc
25
hack/keymanager-api/README.md
Normal file
25
hack/keymanager-api/README.md
Normal file
@ -0,0 +1,25 @@
|
||||
# Keymanager API
|
||||
|
||||
https://github.com/ethereum/keymanager-APIs
|
||||
|
||||
## Postman
|
||||
|
||||
You can use Postman to test the API. https://www.postman.com/
|
||||
|
||||
### Postman collection
|
||||
|
||||
In this package you will find the Postman collection for the keymanager API.
|
||||
You can import this collection in your own Postman instance to test the API.
|
||||
|
||||
#### Updating the collection
|
||||
|
||||
The collection will need to be exported and overwritten to update the collection. A PR should be created once the file
|
||||
is updated.
|
||||
|
||||
#### Authentication
|
||||
|
||||
Our keymanager API requires a valid bearer token to run the keymanager.
|
||||
You can retrieve this bearer token from the URL displayed when running `validator --web`
|
||||
i.e. `http://127.0.0.1:7500/initialize?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.BEuFWr-FpKIlJEIjgmujTQJlJF2aJRaUfFiuTBYVL3k`
|
||||
The token can be copied and pasted into the authorization tab of each Postman request to authenticate.
|
||||
|
125
hack/keymanager-api/keymanager-api.postman_collection.json
Normal file
125
hack/keymanager-api/keymanager-api.postman_collection.json
Normal file
@ -0,0 +1,125 @@
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "631cafa7-0561-47b5-9084-3d2adec3f2de",
|
||||
"name": "keymanager-api",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "/eth/v1/keystores",
|
||||
"request": {
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.PkLPEA0OSzhONboQXe6J1kiEUZ5t2JpwGjiNTklV9uk",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "default"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "localhost:7500/eth/v1/keystores",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "7500",
|
||||
"path": [
|
||||
"eth",
|
||||
"v1",
|
||||
"keystores"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "/eth/v1/keystores",
|
||||
"request": {
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.PkLPEA0OSzhONboQXe6J1kiEUZ5t2JpwGjiNTklV9uk",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "default"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"keystores\":[\n \"543534534543543543534\"\n ],\n \"passwords\":[\n \"hrtyt564634534\"\n ],\n \"slashing_protection\":null\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "localhost:7500/eth/v1/keystores",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "7500",
|
||||
"path": [
|
||||
"eth",
|
||||
"v1",
|
||||
"keystores"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "/eth/v1/keystores",
|
||||
"request": {
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.PkLPEA0OSzhONboQXe6J1kiEUZ5t2JpwGjiNTklV9uk",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "DELETE",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "default"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"pubkeys\": [\n \"0x8d65ffe7b65ee8e7c3e14a474a360f16722920ef8c0ef1da6f942fd6ddc3628c1edda7f57cf28d7ddc7fc9cb9745df60\"\n ]\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "localhost:7500/eth/v1/keystores",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "7500",
|
||||
"path": [
|
||||
"eth",
|
||||
"v1",
|
||||
"keystores"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user