-
Notifications
You must be signed in to change notification settings - Fork 6
Sub vaults #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Sub vaults #339
Changes from 22 commits
5a384b5
bd89745
d293448
dff7431
f5adb5a
7a0692b
3c09390
2e92cdd
661401a
39241b9
78a39c1
94d3b4b
047ee99
4abc61d
5b52db2
bceb1cd
e904379
e4b1cf8
42a9bd7
b873d54
e3c6dc2
01b26e7
d9a66b5
2032bee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| sh ./scripts/pre-push.sh | ||
|
|
||
| npm run lint | ||
| pnpm run check:docLinks | ||
| pnpm run lint | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ## Added methods | ||
|
|
||
| - [sdk.vault.getSubVaults](https://docs.stakewise.io/sdk/api/vault/requests/getsubvaults) | ||
| - [sdk.vault.addSubVault](https://docs.stakewise.io/sdk/api/vault/transactions/addsubvault) | ||
| - [sdk.vault.rejectSubVault](https://docs.stakewise.io/sdk/api/vault/transactions/rejectsubvault) | ||
| - [sdk.vault.ejectSubVault](https://docs.stakewise.io/sdk/api/vault/transactions/ejectsubvault) | ||
| - [sdk.vault.updateState](https://docs.stakewise.io/sdk/api/vault/transactions/updatestate) | ||
|
|
||
| ## Modified methods | ||
|
|
||
| ### 1. [sdk.vault.getVault](https://docs.stakewise.io/sdk/api/vault/requests/getvault) | ||
|
|
||
| #### Add output field: | ||
| ```ts | ||
| type Output = { | ||
| canHarvest: boolean | ||
| exitingAssets: string | ||
| exitingTickets: string | ||
| ejectingSubVault: string | ||
| subVaultsRegistry: string | ||
| pendingMetaSubVault: string | ||
| } | ||
| ``` |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,8 +2,8 @@ import type { CodegenConfig } from '@graphql-codegen/cli' | |||||||||||||||
| import { Network } from './src/helpers/enums' | ||||||||||||||||
| import configs from './src/helpers/configs' | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| let network: Network = Network.Mainnet | ||||||||||||||||
| // TODO change | ||||||||||||||||
| let network: Network = Network.Hoodi | ||||||||||||||||
|
Comment on lines
+5
to
+6
|
||||||||||||||||
| // TODO change | |
| let network: Network = Network.Hoodi | |
| let network: Network = Network.Mainnet |
Copilot
AI
Apr 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the default codegen network from Mainnet to Hoodi (and leaving a TODO) can silently generate the wrong GraphQL types/operations when NETWORK is not set (e.g., local dev, CI scripts). Consider restoring Mainnet as the default and making Hoodi opt-in via env/config, or fail fast when NETWORK is missing to avoid accidental wrong builds.
| // TODO change | |
| let network: Network = Network.Hoodi | |
| let network: Network = Network.Mainnet | |
| if (process.env.NETWORK === 'hoodi') { | |
| network = Network.Hoodi | |
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "url": "https://context7.com/stakewise/v3-sdk", | ||
| "public_key": "pk_wpaUy9UwJWjviJip1LFYx" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| id: endpoints | ||
| title: Available Endpoints | ||
| sidebar_position: 4 | ||
| description: RPC, API and Subgraph endpoints for Mainnet, Gnosis and Hoodi networks. | ||
| --- | ||
|
|
||
| # Available Endpoints | ||
|
|
||
| --- | ||
|
|
||
| ## RPC Endpoint | ||
|
|
||
| The RPC endpoint is the JSON-RPC URL of an Ethereum node for the selected network. You can use any public RPC provider — a curated list with public nodes for each chain is available at: | ||
|
|
||
| 🔗 **[chainlist.org](https://chainlist.org/)** | ||
|
|
||
| ✅ **Tip:** For production, prefer a dedicated provider (Infura, Alchemy, QuickNode, etc.) over a free public RPC — public RPCs are rate-limited and may go down. | ||
|
|
||
| --- | ||
|
|
||
| ## API Endpoint | ||
|
|
||
| GraphQL endpoint of the StakeWise backend. | ||
|
|
||
| | Network | Endpoint | | ||
| |---------|----------| | ||
| | **Mainnet** | `https://mainnet-api.stakewise.io/graphql` | | ||
| | **Gnosis** | `https://gnosis-api.stakewise.io/graphql` | | ||
| | **Hoodi** | `https://hoodi-api.stakewise.io/graphql` | | ||
|
|
||
| --- | ||
|
|
||
| ## Subgraph Endpoint | ||
|
|
||
| GraphQL endpoint of the StakeWise subgraph. | ||
|
|
||
| ### Production | ||
|
|
||
| Use the **`prod`** endpoint for production environments. | ||
|
|
||
| | Network | Endpoint | | ||
| |---------|----------| | ||
| | **Mainnet** | `https://graphs.stakewise.io/mainnet/subgraphs/name/stakewise/prod` | | ||
| | **Gnosis** | `https://graphs.stakewise.io/gnosis/subgraphs/name/stakewise/prod` | | ||
| | **Hoodi** | `https://graphs.stakewise.io/hoodi/subgraphs/name/stakewise/prod` | | ||
|
|
||
| ### Stage | ||
|
|
||
| Mirrors the production schema but tracks the staging deployment — use it only when reproducing issues against a non-production environment. | ||
|
|
||
| | Network | Endpoint | | ||
| |---------|----------| | ||
| | **Mainnet** | `https://graphs.stakewise.io/mainnet/subgraphs/name/stakewise/stage` | | ||
| | **Gnosis** | `https://graphs.stakewise.io/gnosis/subgraphs/name/stakewise/stage` | | ||
| | **Hoodi** | `https://graphs.stakewise.io/hoodi/subgraphs/name/stakewise/stage` | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "position": 5, | ||
| "label": "Quick Start" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check:docLinksfetches the live docs sitemap over the network; running this in a pre-commit hook can be slow and may fail for contributors who are offline or behind restrictive networks. Consider moving it to CI (pre-push or workflow) or adding an opt-out (e.g., env flag) so local commits don’t become flaky.