Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Stage 1: Base image.
## Start with a base image containing NodeJS so we can build Docusaurus.
FROM node:20-slim as base
FROM node:lts-slim as base
## Enable corepack.
# RUN corepack enable
## Set the working directory to `/opt/docusaurus`.
Expand Down
44 changes: 26 additions & 18 deletions docs/staking-api/cosmos/native-staking/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,45 @@ In order to use staking api related endpoints you need to include your **API KEY

**Header:**

| Name | Description | Example value | Required
| --------------- | ------------ | ------------ |------------ |
| Name | Description | Example value | Required |
|-------------|-------------|---------------|----------|
| `X-API-KEY` | Your api key value | `<API_KEY_VALUE>` | ✅ |
| `X-NETWORK` | Blockchain network/chain identifier | `cosmoshub-4` | ⚪ |

### ChainId
### X-NETWORK header

The chainId is the id of the chain you want to stake/unstake/claim rewards.
Use the `X-NETWORK` header to tell the API which Cosmos network should process the request (e.g., `cosmoshub-4`, `juno-1`).

:::info
ChainId is a string that identifies the blockchain network. It is used to specify the destination of the transaction.
:::
::::info
`X-NETWORK` accepts the same identifier exposed as `chain_id` in the [Cosmos Chain Registry](https://github.com/cosmos/chain-registry). When the header is omitted the default Cosmos network configured for your account will be used.
::::

For example, if you want to stake/unstake/claim rewards on Cosmos Hub, you need to use the chainId `cosmoshub-4`.
::::tip
Need support for another network? Reach out at [admin@stakely.io](mailto:admin@stakely.io).
::::

You can find the list of chainIds for each chain in the [Cosmos Chain Registry](https://github.com/cosmos/chain-registry). Select the directory of the chain you want to use and look for the `chain_id` field value.
### List available networks

If you pass a wrong chainId or the chain is not yet supported, the endpoint will return a 404 error with the message `Blockchain not found`.
If you are unsure which Cosmos networks are enabled for your account you can ask the API directly.

:::tip
- Endpoint: [`/api/v1/cosmos/native/networks`](/staking-api/api-reference#tag/cosmoshub/get/apiv1cosmoshubnativenetworks)

If you need us to enable/support a new chain, please contact us at [admin@stakely.io](mailto:admin@stakely.io).
Each object in the response includes:

:::
| Field | Description |
|-------|-------------|
| `name` | Internal name of the blockchain entry |
| `type` | Blockchain type string (always `COSMOS`) |
| `chain_id` | Chain identifier, same as the Cosmos Chain Registry `chain_id` |
| `is_default` | `true` when this network is used as fallback |

____

### Stake action

Craft a stake transaction:

- Endpoint: [`/api/v1/cosmos/{chainId}/action/stake`](/staking-api/api-reference#tag/cosmos/post/api/v1/cosmos/{chainId}/action/stake)
- Endpoint: [`/api/v1/cosmos/native/action/stake`](/staking-api/api-reference#tag/cosmoshub/post/apiv1cosmoshubnativeactionstake)

#### Description

Expand All @@ -74,7 +82,7 @@ ____

Craft an unstake transaction:

- Endpoint: [`/api/v1/cosmos/{chainId}/action/unstake`](/staking-api/api-reference#tag/cosmos/post/api/v1/cosmos/{chainId}/action/unstake)
- Endpoint: [`/api/v1/cosmos/native/action/unstake`](/staking-api/api-reference#tag/cosmoshub/post/apiv1cosmoshubnativeactionunstake)

#### Description

Expand All @@ -94,7 +102,7 @@ ____

Craft a claim rewards transaction:

- Endpoint: [`/api/v1/cosmos/{chainId}/action/claim-rewards`](/staking-api/api-reference#tag/cosmos/post/api/v1/cosmos/{chainId}/action/claim-rewards)
- Endpoint: [`/api/v1/cosmos/native/action/claim-rewards`](/staking-api/api-reference#tag/cosmoshub/post/apiv1cosmoshubnativeactionclaimrewards)

#### Description

Expand All @@ -114,7 +122,7 @@ ____

Gathers signature and unsigned tx:

- Endpoint: [`/api/v1/cosmos/{chainId}/action/prepare`](/staking-api/api-reference#tag/cosmos/post/api/v1/cosmos/{chainId}/action/prepare)
- Endpoint: [`/api/v1/cosmos/native/action/prepare`](/staking-api/api-reference#tag/cosmoshub/post/apiv1cosmoshubnativeactionprepare)

#### Description

Expand All @@ -134,7 +142,7 @@ ____

Broadcast a signed transaction

- Endpoint: [`/api/v1/cosmos/{chainId}/action/broadcast`](/staking-api/api-reference#tag/cosmos/post/api/v1/cosmos/{chainId}/action/broadcast)
- Endpoint: [`/api/v1/cosmos/native/action/broadcast`](/staking-api/api-reference#tag/cosmoshub/post/apiv1cosmoshubnativeactionbroadcast)

#### Description

Expand Down
8 changes: 0 additions & 8 deletions docs/staking-api/ethereum/native-staking/_category_.json

This file was deleted.

95 changes: 0 additions & 95 deletions docs/staking-api/ethereum/native-staking/endpoints.md

This file was deleted.

33 changes: 0 additions & 33 deletions docs/staking-api/ethereum/native-staking/staking-api-diagram.md

This file was deleted.

50 changes: 32 additions & 18 deletions docs/staking-api/ethereum/stakewise-staking/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,44 @@ To obtain a valid API key required for authentication, please refer to the [Auth

**Header:**

| Name | Description | Example value | Required
| --------------- | ------------ | ------------ |------------ |
| Name | Description | Example value | Required |
|-------------|-------------|---------------|----------|
| `X-API-KEY` | Your api key value | `<API_KEY_VALUE>` | ✅ |
| `X-NETWORK` | Blockchain network/chain identifier | `1` | ⚪ |

____

### Chain ID param
### X-NETWORK header

The chain id param is required for all the endpoints.
Set the `X-NETWORK` header to the Stakewise chain you want to target.

:::warning
Supported values: `1` (Ethereum Mainnet) and `560048` (Ethereum Hoodi).
:::

Supported chains for stakewise staking are:
When omitted the API falls back to the default Stakewise network configured for your account.

- `1` for Ethereum Mainnet
- `560048` for Ethereum Hoodi
:::
### List available networks

Use this helper endpoint to discover which Stakewise networks are currently enabled for your API key.

- Endpoint: [`/api/v1/ethereum/stakewise/networks`](/staking-api/api-reference#tag/ethereumstakewise/get/apiv1ethereumstakewisenetworks)

Response payload fields:

| Field | Description |
|-------|-------------|
| `name` | Internal blockchain entry name |
| `type` | Blockchain type string (always `ETHEREUM`) |
| `chain_id` | Chain identifier such as `1` or `560048` |
| `is_default` | `true` when the network is used as fallback |

____
### Stake into stakewise vault

Craft a stake transaction:

- Endpoint: [`/api/v1/eth/stakewise/{chainId}/action/stake​`](/staking-api/api-reference#tag/eth-stakewise/post/api/v1/eth/stakewise/{chainId}/action/stake)
- Endpoint: [`/api/v1/ethereum/stakewise/action/stake​`](/staking-api/api-reference#tag/ethereumstakewise/post/apiv1ethereumstakewiseactionstake)

#### Description

Expand All @@ -74,7 +88,7 @@ ____

Craft a unstake transaction

- Endpoint: [`/api/v1/eth/stakewise/{chainId}/action/unstake​`](/staking-api/api-reference#tag/eth-stakewise/post/api/v1/eth/stakewise/{chainId}/action/unstake)
- Endpoint: [`/api/v1/ethereum/stakewise/action/unstake​`](/staking-api/api-reference#tag/ethereumstakewise/post/apiv1ethereumstakewiseactionunstake)

#### Description

Expand All @@ -94,7 +108,7 @@ ____

Craft a withdraw transaction

- Endpoint: [`/api/v1/eth/stakewise/{chainId}/action/withdraw`](/staking-api/api-reference#tag/eth-stakewise/post/api/v1/eth/stakewise/{chainId}/action/withdraw)
- Endpoint: [`/api/v1/ethereum/stakewise/action/withdraw`](/staking-api/api-reference#tag/ethereumstakewise/post/apiv1ethereumstakewiseactionwithdraw)

#### Description

Expand All @@ -113,7 +127,7 @@ ____

Gathers signature and unsigned tx:

- Endpoint: [`/api/v1/eth/stakewise/{chainId}/action/prepare`](/staking-api/api-reference#tag/eth-stakewise/post/api/v1/eth/stakewise/{chainId}/action/prepare)
- Endpoint: [`/api/v1/ethereum/stakewise/action/prepare`](/staking-api/api-reference#tag/ethereumstakewise/post/apiv1ethereumstakewiseactionprepare)

#### Description

Expand All @@ -133,7 +147,7 @@ ____

Broadcast a signed transaction

- Endpoint: [`/api/v1/eth/stakewise/{chainId}/action/broadcast`](/staking-api/api-reference#tag/eth-stakewise/post/api/v1/eth/stakewise/{chainId}/action/broadcast)
- Endpoint: [`/api/v1/ethereum/stakewise/action/broadcast`](/staking-api/api-reference#tag/ethereumstakewise/post/apiv1ethereumstakewiseactionbroadcast)

#### Description

Expand All @@ -154,7 +168,7 @@ ____
Get stakewise actions history for the given address


- Endpoint: [`/api/v1/eth/stakewise/{chainId}/historic/{address}​`](/staking-api/api-reference#tag/eth-stakewise/get/api/v1/eth/stakewise/{chainId}/historic/{address})
- Endpoint: [`/api/v1/ethereum/stakewise/historic/{address}​`](/staking-api/api-reference#tag/ethereumstakewise/get/apiv1ethereumstakewisehistoricaddress)

#### Description

Expand All @@ -175,7 +189,7 @@ ____
Get stakewise stake balance for the given address


- Endpoint: [`/api/v1/eth/stakewise/{chainId}/stake-balance/{address}​`](/staking-api/api-reference#tag/eth-stakewise/get/api/v1/eth/stakewise/{chainId}/stake-balance/{address})
- Endpoint: [`/api/v1/ethereum/stakewise/stake-balance/{address}​`](/staking-api/api-reference#tag/ethereumstakewise/get/apiv1ethereumstakewisestakebalanceaddress)

#### Description

Expand All @@ -197,7 +211,7 @@ ____
Get stakewise exited balance for the given address


- Endpoint: [`/api/v1/eth/stakewise/{chainId}/exited-balance/{address}​​`](/staking-api/api-reference#tag/eth-stakewise/get/api/v1/eth/stakewise/{chainId}/exited-balance/{address})
- Endpoint: [`/api/v1/ethereum/stakewise/exited-balance/{address}​​`](/staking-api/api-reference#tag/ethereumstakewise/get/apiv1ethereumstakewiseexitedbalanceaddress)

#### Description

Expand All @@ -219,7 +233,7 @@ ____
Get stakewise vault info such as APY and balance for the current time


- Endpoint: [`/api/v1/eth/stakewise/{chainId}/vault​​`](/staking-api/api-reference#tag/eth-stakewise/get/api/v1/eth/stakewise/{chainId}/vault)
- Endpoint: [`/api/v1/ethereum/stakewise/vault​​`](/staking-api/api-reference#tag/ethereumstakewise/get/apiv1ethereumstakewisevault)

#### Description

Expand All @@ -236,7 +250,7 @@ ____

Get user stats for stakewise vault for N days

- Endpoint: [`/api/v1/eth/stakewise/{chainId}/stats/{address}`](/staking-api/api-reference#tag/eth-stakewise/get/api/v1/eth/stakewise/{chainId}/stats/{address})
- Endpoint: [`/api/v1/ethereum/stakewise/stats/{address}`](/staking-api/api-reference#tag/ethereumstakewise/get/apiv1ethereumstakewisestatsaddress)

#### Description

Expand Down
Loading