======================== CODE SNIPPETS ======================== TITLE: Unified API - Getting Started and Overviews DESCRIPTION: Provides introductory information and overviews for the P2P.ORG Unified API, including general getting started guides and network-specific overviews. SOURCE: https://docs.p2p.org/llms LANGUAGE: APIDOC CODE: ``` Unified API Getting Started: Description: Comprehensive guide to begin using the P2P.ORG Unified API. URL: https://docs.p2p.org/docs/unified-api-getting-started.md Unified API Overview: Description: General overview of the P2P.ORG Unified API capabilities and features. URL: https://docs.p2p.org/docs/unified-api-overview.md Networks Supported: Description: Lists all blockchain networks currently supported by the Unified API. URL: https://docs.p2p.org/docs/unified-api-networks.md Overview for AI Tools: Description: Specific guidance on using P2P.ORG API documentation with AI tools. URL: https://docs.p2p.org/docs/overview-ai.md Sei Overview: Description: Overview of operations and integration on the Sei network. URL: https://docs.p2p.org/docs/overview-sei.md Solana Overview: Description: Overview of operations and integration on the Solana network. URL: https://docs.p2p.org/docs/overview-solana.md Sui Overview: Description: Overview of operations and integration on the Sui network. URL: https://docs.p2p.org/docs/overview-sui.md TON Overview: Description: Overview of operations and integration on the TON network. URL: https://docs.p2p.org/docs/overview-ton.md TRON Overview: Description: Overview of operations and integration on the TRON network. URL: https://docs.p2p.org/docs/overview-tron.md Polygon Overview: Description: Overview of operations and integration on the Polygon network. URL: https://docs.p2p.org/docs/overview-polygon.md Staking Overview: Description: General overview of staking functionalities. URL: https://docs.p2p.org/docs/overview-staking.md ``` ---------------------------------------- TITLE: SSV On-Chain Documentation DESCRIPTION: Guides for SSV On-Chain staking, covering overview, getting started, and withdrawal procedures. SOURCE: https://docs.p2p.org/docs/restaking-overview LANGUAGE: APIDOC CODE: ``` SSV On-Chain: - Overview: /docs/ssv-on-chain-overview - Getting started: /docs/getting-started-ssv-on-chain - Withdrawal: /docs/withdrawal-ssv-on-chain ``` ---------------------------------------- TITLE: SSV On-Chain Documentation DESCRIPTION: Guides for SSV On-Chain staking, covering overview, getting started, and withdrawal procedures. SOURCE: https://docs.p2p.org/docs/restaking-api LANGUAGE: APIDOC CODE: ``` SSV On-Chain: - Overview: /docs/ssv-on-chain-overview - Getting started: /docs/getting-started-ssv-on-chain - Withdrawal: /docs/withdrawal-ssv-on-chain ``` ---------------------------------------- TITLE: TON Staking Documentation DESCRIPTION: Guides for staking on the TON network, covering overview, getting started, withdrawal processes, and transaction signing. SOURCE: https://docs.p2p.org/docs/restaking-overview LANGUAGE: APIDOC CODE: ``` TON Staking: - Overview: /docs/overview-ton - Getting Started: /docs/staking-ton - Withdrawal: /docs/withdrawal-ton - Sign and Broadcast Transaction: /docs/signing-transaction-ton ``` ---------------------------------------- TITLE: Example SSV Deposit Response DESCRIPTION: Illustrates the structure of a typical JSON response received after an SSV set-up request, including request status and detailed deposit information. SOURCE: https://docs.p2p.org/docs/getting-started-ssv LANGUAGE: JSON CODE: ``` { "error": null, "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa5", "status": "ready", "depositData": [ { "pubkey": "0xb632ad4ebec8594ec8f2fbacc6df53dec180f8bae6561d70bf74c19520a35beff99cd92513058da6a22a75b9570ab31d", "signature": "0x836e9eebeb29ed1d4b232fa38649e9902ea7d6f9d19e571c4e76cde4da2bcdbca822c8f29d21379325201735fa93925d1597f0c021a147910c165e60bf3308bc827d5fcd545f1c901e7b3102e28b8ea09d6c162c3ffd57e7398f73e5968e05db", "depositDataRoot": "0x16678e6d91a8c3a8f1cdabc037fa32f1d296e629d1665a57f493eda1e6a6964a", "withdrawalCredentials": "0100000000000000000000005cef11327af4104ba0f8a82fbb8628caee7cb1e3", "amount": "32000000000", "depositMessageRoot": "6a572503239cd1f11998af7901c0947fe36eb8efec080f22598d607d3938c1a8", "forkVersion": "00001020", "eth2NetworkName": "goerli", "depositCliVersion": "2.3.0" } ] } } ``` ---------------------------------------- TITLE: Example Transaction Payload DESCRIPTION: Illustrates a sample JSON payload representing an Ethereum transaction for SSV network operations, including gas parameters and data. SOURCE: https://docs.p2p.org/docs/getting-started-ssv LANGUAGE: APIDOC CODE: ``` { "to": "0x3a9f01091C446bdE031E39ea8354647AFef091E7", "gasLimit": "0.0000000000001", "data": "0x095ea7b3000000000000000000000000c3cd9a0ae89fff83b71b58b6512d43f8a41f363dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "value": "0.0", "chainId": 5, "type": 2, "maxFeePerGas": "0.000000000000000016", "maxPriorityFeePerGas": "2" } ``` ---------------------------------------- TITLE: Configure and Run P2P.ORG Unified API Demo DESCRIPTION: Instructions for configuring environment variables by copying the example file and starting the development server. SOURCE: https://docs.p2p.org/docs/staking-ui-showcase-with-unified-api LANGUAGE: Bash CODE: ``` cp .env.example .env # Edit .env with your specific configuration npm run dev # or yarn dev ``` ---------------------------------------- TITLE: Example API Response DESCRIPTION: Example JSON response from the stake list API endpoint. SOURCE: https://docs.p2p.org/docs/staking-sui LANGUAGE: JSON CODE: ``` { "error": null, "result": { "validatorAddress": "0xab4fb3eeaa7b0ab4f91eedab33adf140c6750e60ca5e44b3df82491937d7bab4", "stakerAddress": "0x696f4402d7151fb49e52b629de3ce3098f3dda7721a7425c000b4f26653709e3", "stakes": [ { "stakeId": "0x5d920b8fca6a6043d898ab1a9a8ab167d8aa323fe2b9e76a27312f7f16e20a67", "amount": 1000000000, "status": "Pending" } ] } } ``` ---------------------------------------- TITLE: Run Staking Example for Solana DESCRIPTION: This command executes the main staking script, specifying Solana as the target network. It demonstrates how to initiate a staking operation using the integration example, processing transactions and network-specific logic. SOURCE: https://docs.p2p.org/docs/implementation-example LANGUAGE: Shell CODE: ``` node stake.js --network=solana ``` ---------------------------------------- TITLE: Example cURL Request DESCRIPTION: Example of how to call the stake list API endpoint using cURL. SOURCE: https://docs.p2p.org/docs/staking-sui LANGUAGE: cURL CODE: ``` curl --request GET \ --url 'https://api-test.p2p.org/api/v1/sui/testnet/transaction/stake-list/0x696f4402d7151fb49e52b629de3ce3098f3dda7721a7425c000b4f26653709e3' \ --header 'Authorization: Bearer ' ``` ---------------------------------------- TITLE: Polygon Staking API: Approve Token Management (cURL Example) DESCRIPTION: Example cURL request to approve token management for the Polygon Staking API. SOURCE: https://docs.p2p.org/docs/staking-polygon LANGUAGE: curl CODE: ``` curl --request POST \ --url https://api.p2p.org/api/v1/polygon/staking/approve \ --head 'accept: application/json' \ --head 'Authorization: Bearer ' \ --head 'Content-Type: application/json' \ --data ' { "amount": "100000000000000000", "stakerAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17" } ' ``` ---------------------------------------- TITLE: Clone and Install P2P.ORG Unified API Demo DESCRIPTION: Steps to clone the reference implementation repository and install project dependencies using npm or yarn. SOURCE: https://docs.p2p.org/docs/staking-ui-showcase-with-unified-api LANGUAGE: Bash CODE: ``` git clone https://github.com/AndreGZommerfelds/p2p-unified-api-demo-example-1.git cd p2p-unified-api-demo-example-1 npm install # or yarn install ``` ---------------------------------------- TITLE: SSV Node Setup and Status API DESCRIPTION: Provides endpoints for setting up SSV nodes for Ethereum staking and checking their operational status. Includes request/response details and parameter explanations for creating staking requests and querying their status. SOURCE: https://docs.p2p.org/docs/getting-started-ssv LANGUAGE: APIDOC CODE: ``` POST /api/v1/eth/staking/ssv/request/create Base URL: https://api-test.p2p.org or https://api.p2p.org Description: Sets up SSV nodes through P2P infrastructure. Requires authentication via Bearer token. Request Body: { "id": "string (UUID)", "validatorsCount": "string", "amountPerValidator": "string (Gwei)", "withdrawalCredentialsType": "string (0x01 or 0x02)", "withdrawalAddress": "string (Ethereum address)", "feeRecipientAddress": "string (Ethereum address)", "ssvOwnerAddress": "string (Ethereum address)", "type": "string (without-encrypt-key or with-encrypt-key)", "operationPeriodInDays": "integer", "ecdhPublicKey": "string (optional, required if type is with-encrypt-key)" } Parameters: - id: Arbitrary UUID to track the operation. Generate using online tools or npm package 'uuid'. - validatorsCount: Number of validators. One validator equals 32 ETH. - amountPerValidator: Amount of tokens to stake in Gwei per validator. If > 32 ETH, withdrawalCredentialsType defaults to 0x02. - withdrawalCredentialsType: Preferred format for withdrawal credentials: '0x01' or '0x02'. - withdrawalAddress: Withdrawal address for the client. Also used as validator owner's address and must sign the SSV validator registration transaction. - feeRecipientAddress: Eth1 address that receives fee recipient rewards. - ssvOwnerAddress: Address acting as the owner of the SSV cluster. Can register validators, update fee recipient, top-up balance, and claim rewards. - type: Type of operation. 'without-encrypt-key' (validator private key returned encrypted to client) or 'with-encrypt-key' (validator private key maintained by P2P). - operationPeriodInDays: Duration of operation in days. - ecdhPublicKey: Your ECDH public key for obtaining an encrypted validator private key (required if type is 'with-encrypt-key'). Example Request (cURL): curl --request POST \ --url https://api.p2p.org/api/v1/eth/staking/ssv/request/create \ --header 'accept: application/json' \ --header 'authorization: Bearer ' \ --header 'content-type: application/json' \ --data '{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa5", "validatorsCount": "1", "amountPerValidator": "32000000000", "withdrawalCredentialsType": "0x01", "withdrawalAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "feeRecipientAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "ssvOwnerAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "type": "without-encrypt-key", "operationPeriodInDays": 30, "ecdhPublicKey": null }' Example Response (JSON): { "error": null, "result": true } --- GET /api/v1/eth/staking/ssv/request/status/{id} Base URL: https://api-test.p2p.org or https://api.p2p.org Description: Checks the status of the SSV node set-up operation. Parameters: - id: UUID that was specified in the SSV set-up request. Example Request (cURL): curl --request GET \ --url https://api.p2p.org/api/v1/eth/staking/ssv/request/status/3fa85f64-5717-4562-b3fc-2c963f66afa5 \ --header 'accept: application/json' \ --header 'authorization: Bearer ' Example Response (JSON): { "error": null, "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa5", "status": "ready", "type": "without-encrypt-key", "operationPeriodInDays": 30, "liquidationPeriodInDays": 30, "ecdhPublicKey": null, "encryptedShares": [ { "publicKey": "0xb4b5f251eac53f34eb1da2b6659d35db303e408c4c830156cf090441564474f356abd023a0e679aa97cefeed850abb27", "nonce": 1 } ] } } Possible Status Values: - 'pending': The request is being processed. - 'ready': The SSV node setup is complete and ready. - 'failed': The setup process encountered an error. ``` ---------------------------------------- TITLE: DVT Staking API Prerequisites and Pathways DESCRIPTION: Details the essential prerequisites for staking on the SSV network, including minimum ETH stake, SSV token requirements, and obtaining an API key. It also outlines the available staking pathways via P2P smart contracts or direct interaction with the Ethereum Deposit Smart Contract. SOURCE: https://docs.p2p.org/docs/getting-started-ssv LANGUAGE: APIDOC CODE: ``` Prerequisites: - Minimum Stake Requirement: 32 ETH per validator. - SSV Tokens: Required for validator registration and network costs. Contact product team for strategies. Get test tokens from faucet.ssv.network. - API Key Request: Obtain an authentication token to use the DVT Staking API. Staking Pathways: - P2P Smart Contract: For simplified operation. - Ethereum Deposit Smart Contract: Direct interaction. Note on Pectra Upgrade (May 7, 2025): - Recommendation: Upgrade to `0x02` withdrawal credentials for enhanced functionality. - Upgrade Methods: - Consolidate existing validators into a single one. - Create a new `0x02`-enabled validator via simplified 3.1 smart contract flow. - Existing endpoints remain supported. - `0x01` creation flow: Use for fine-grained control over validator count, effective balance, or manual deposit transaction broadcasting. ``` ---------------------------------------- TITLE: Create Bond Request Response Example DESCRIPTION: Example JSON response for a successful bond request with the 'extended' parameter set to true, detailing the unsigned transaction and other relevant metadata. SOURCE: https://docs.p2p.org/docs/staking-polkadot LANGUAGE: JSON CODE: ``` { "result": { "unsignedTransaction": "0xac0406000b00487835a302032c6eca5cdaa3e87d7f8e06d10015bf0508b52d301c8991af113d5cf49a53553f", "unsignedTransactionSerialized": "7b2261646472657373223a223548647a67....", "unsignedTransactionPayload": "0x0600070010a5d4e803f690e412f0f0d6a963b89e78f9f44015c8909b2ee57836fff9a739e56897d51b", "unsignedTransactionObject": { "blockHash": "0xe9ee44203904ee47859882a6944bb9cb57a28a21146d699f0f731076f3beffe2", "eraPeriod": 64, "genesisHash": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e", "metadataRpc": "0x6d6574610e150f000c1c73705f636f72...", "method": { "args": { "value": "3,000,000,000,000", "payee": { "Account": "5HdzgJMcKFwCeiso1izCWGLyVLk9YFztVFjK4rCadNXz6ztE" } }, "method": "bond", "section": "staking" }, "nonce": 1, "specVersion": 1018001, "transactionVersion": 27, "tip": 0 }, "stashAccountAddress": "5HdzgJMcKFwCeiso1izCWGLyVLk9YFztVFjK4rCadNXz6ztE", "rewardDestinationType": "account", "rewardDestination": "5HdzgJMcKFwCeiso1izCWGLyVLk9YFztVFjK4rCadNXz6ztE", "amount": 3, "createdAt": "2025-04-02T15:38:35.826Z" } } ``` ---------------------------------------- TITLE: Create SSV Staking Request (POST /api/v1/eth/staking/ssv/request/create) DESCRIPTION: Initiates the setup of SSV nodes by sending a POST request to the P2P API. Requires parameters like validator count, amount, and addresses. The response indicates success or failure. SOURCE: https://docs.p2p.org/docs/getting-started-ssv LANGUAGE: cURL CODE: ``` curl --request POST \ --url https://api.p2p.org/api/v1/eth/staking/ssv/request/create \ --header 'accept: application/json' \ --header 'authorization: Bearer ' \ --header 'content-type: application/json' \ --data ' { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa5", "validatorsCount": "1", "amountPerValidator": "32000000000", "withdrawalCredentialsType": "0x01", "withdrawalAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "feeRecipientAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "ssvOwnerAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "type": "without-encrypt-key", "operationPeriodInDays": 30, "ecdhPublicKey": null } ' ``` LANGUAGE: JSON CODE: ``` { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa5", "validatorsCount": "1", "amountPerValidator": "32000000000", "withdrawalCredentialsType": "0x01", "withdrawalAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "feeRecipientAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "ssvOwnerAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "type": "without-encrypt-key", "operationPeriodInDays": 30, "ecdhPublicKey": null } ``` LANGUAGE: JSON CODE: ``` { "error": null, "result": true } ``` ---------------------------------------- TITLE: Install Project Dependencies DESCRIPTION: This command installs all necessary Node.js packages and libraries required for the Unified Staking API integration example to run. It uses npm, the default package manager for Node.js, to fetch and install dependencies. SOURCE: https://docs.p2p.org/docs/implementation-example LANGUAGE: Shell CODE: ``` npm install ``` ---------------------------------------- TITLE: Check Node Setup Status DESCRIPTION: Retrieves the current status of a node setup operation using its unique identifier. This API endpoint is crucial for monitoring the progress and outcome of staking requests. SOURCE: https://docs.p2p.org/docs/staking-ethereum LANGUAGE: APIDOC CODE: ``` GET /api/v1/eth/staking/direct/nodes-request/status/{id} Description: Checks the status of a node set-up operation. Parameters: - id (string, required): The UUID of the node set-up request. Headers: - accept: application/json - authorization: Bearer Example Request: curl --request GET \ --url https://api.p2p.org/api/v1/eth/staking/direct/nodes-request/status/3611b95c-e1b3-40c0-9086-3de0a4379943 \ --header 'accept: application/json' \ --header 'authorization: Bearer ' Example Response: { "error": null, "result": { "status": "ready", "amountPerValidator": "32000000000", "withdrawalCredentialsType": "0x01", "depositData": [ { "pubkey": "0xac1e9969d7b87f3102549ab41558136674a7306b85b9f73cfbd7d9fdb7db85724569da3ebd4d7de9689f6ac058d7e2a3", "signature": "0xb656f9c771166c82a7891b930e6a920878d9736eb3f9f241753a15ea69d8e2f20a3740dfaf546c70e31bd323e14b341205d04e3227dd4cf2923644a375f6792875ac02c5f256f7a17c96b09bafcbce7e4443e1862356b1e90d78875d78e9a742", "withdrawalCredentials": "0100000000000000000000005cef11327af4104ba0f8a82fbb8628caee7cb1e3", "amount": 32000000000, "depositDataRoot": "0xba013b4950b9aff0c3c19017ec5b6e0ed5b957b36f6ff03a545e5cc5605baff8", "depositMessageRoot": "6a572503239cd1f11998af7901c0947fe36eb8efec080f22598d607d3938c1a8", "forkVersion": "10000910", "eth2NetworkName": "hoodi", "depositCliVersion": "2.7.0" } ] } } Response Fields: - error (any): Null if successful, otherwise contains error information. - result (object): - status (string): Current status of the nodes request. Possible values: 'init', 'processing', 'ready', 'cancel'. - amountPerValidator (string): Amount of tokens to stake in Gwei per validator. - withdrawalCredentialsType (string): Withdrawal credentials preferred format ('0x01' or '0x02'). - depositData (array): Array of deposit data objects for validators. - pubkey (string): Validator public key. - signature (string): Validator signature. - withdrawalCredentials (string): Withdrawal address credentials. - amount (number): Amount of ETH in Gwei being deposited. - depositDataRoot (string): SHA-256 hash of the SSZ-encoded depositData object. - depositMessageRoot (string): Cryptographic hash of the Merkle tree’s root. - forkVersion (string): Version of the network fork. - eth2NetworkName (string): Name of the Ethereum 2.0 network. - depositCliVersion (string): Version of the deposit CLI tool used. ``` LANGUAGE: curl CODE: ``` curl --request GET \ --url https://api.p2p.org/api/v1/eth/staking/direct/nodes-request/status/3611b95c-e1b3-40c0-9086-3de0a4379943 \ --header 'accept: application/json' \ --header 'authorization: Bearer ' ``` LANGUAGE: json CODE: ``` { "error": null, "result": { "status": "ready", "amountPerValidator": "32000000000", "withdrawalCredentialsType": "0x01", "depositData": [ { "pubkey": "0xac1e9969d7b87f3102549ab41558136674a7306b85b9f73cfbd7d9fdb7db85724569da3ebd4d7de9689f6ac058d7e2a3", "signature": "0xb656f9c771166c82a7891b930e6a920878d9736eb3f9f241753a15ea69d8e2f20a3740dfaf546c70e31bd323e14b341205d04e3227dd4cf2923644a375f6792875ac02c5f256f7a17c96b09bafcbce7e4443e1862356b1e90d78875d78e9a742", "withdrawalCredentials": "0100000000000000000000005cef11327af4104ba0f8a82fbb8628caee7cb1e3", "amount": 32000000000, "depositDataRoot": "0xba013b4950b9aff0c3c19017ec5b6e0ed5b957b36f6ff03a545e5cc5605baff8", "depositMessageRoot": "6a572503239cd1f11998af7901c0947fe36eb8efec080f22598d607d3938c1a8", "forkVersion": "10000910", "eth2NetworkName": "hoodi", "depositCliVersion": "2.7.0" }, { "pubkey": "0xbe5E9c3Bb9eba1BF4C5eC1c1cbcF85ee2CE2fEC66Ce5460C23eF82332A044FDCabF7011F588CCbD77E73CCe6c4accDF0", "signature": "0x83D2E925AEAEdcB18db983Bd447db0BFc1Ee9a6Ead118E5BEfeBcb24BA8C0efd3BD19Cb1cE8e807Fc980a67bBbf8b11e039efe2DB71fcdF096fccac5B04dF80f6a1804cd8d492455D30abE27FcDbDA78AFE61856cad65ffF5cA48Ed4776edd88", "withdrawalCredentials": "010000000000000000000000515ea819fde1c0d36eb8e78e9a69dbf8e4a21", "amount": 32000000000, "depositDataRoot": "0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585", "depositMessageRoot": "0x2b1c6bbdeadb0b23ca8260a819fde1c0b0347b0fd42c33a9b2513b36d6521dc6", "forkVersion": "10000910", "eth2NetworkName": "hoodi", "depositCliVersion": "2.7.0" } ] } } ``` ---------------------------------------- TITLE: Clone Unified Staking API Repository DESCRIPTION: This command clones the public GitHub repository containing the Unified Staking API integration example. It sets up the project locally, allowing you to start integrating with staking functionalities across various blockchain networks. SOURCE: https://docs.p2p.org/docs/implementation-example LANGUAGE: Shell CODE: ``` git clone [email protected]:alessandromaci/unified-api.git unified-api-integration-example cd unified-api-integration-example ``` ---------------------------------------- TITLE: Create Bond Request cURL Example DESCRIPTION: Example cURL command to create a bond request for the Westend network, specifying the stash account, pool ID, amount, and extended metadata. SOURCE: https://docs.p2p.org/docs/staking-polkadot LANGUAGE: cURL CODE: ``` curl --request POST \ --url https://api.p2p.org/api/v1/polkadot/westend/staking/pool/bond \ --header 'accept: application/json' \ --header 'authorization: Bearer ' \ --header 'content-type: application/json' \ --data '\ { "stashAccountAddress": "5H6ryBWChC5w7eaQ4GZjo329sEnhvjetSr6MBEt42mZ5tPw5", "poolId": 238, "amount": 3, "extended": true }' ``` ---------------------------------------- TITLE: SSV Network Setup Parameters DESCRIPTION: Defines the parameters required for setting up a validator on the SSV Network. These include details about the validator, staking amounts, withdrawal credentials, and network-specific addresses. SOURCE: https://docs.p2p.org/docs/getting-started-ssv LANGUAGE: APIDOC CODE: ``` SSV Network Setup Parameters: - `id`: UUID that was specified in the SSV set-up request. - `status`: Current status of the SSV request. - `init`: Request is stored. - `processing`: Request in progress, please wait. - `ready`: Request is ready. - `validator-ready`: Validator is registered on the SSV network and contains the deposit data. - `validator-error`: Validator data is not valid. - `cancel`: Request canceled due to an error or timeout. When `ready`, the validator data is ready to be used in the validator registration step. - `validatorsCount`: Number of validators. One validator is equal to 32 ETH. - `amountPerValidator`: Amount of tokens to stake in Gwei per validator. - `withdrawalCredentialsType`: Withdrawal credentials preferred format: `0x01` or `0x02`. - `withdrawalAddress`: Withdrawal address of the cluster owner. - `feeRecipientAddress`: Eth1 address that receives the fee recipient rewards. - `ssvOwnerAddress`: Address that acts as the owner of the SSV cluster. The cluster owner can register the validator, update the fee recipient address, top-up the cluster balance, and claim SSV incentives rewards. - `type`: Type of operation. - `without-encrypt-key` (available): Validator's private key is returned encrypted to the client. - `with-encrypt-key` (not available): Validator private key is instead maintained by P2P to initiate withdrawals when requested by the client. - `operationPeriodInDays`: Operation period in days. - `liquidationPeriodInDays`: Liquidation threshold period in days. - `ecdhPublicKey`: Your ECDH public key for getting the encrypted validator private key. ``` ---------------------------------------- TITLE: TRON Staking Documentation DESCRIPTION: Guides for staking on the TRON network, covering overview, getting started, withdrawal processes, and transaction signing. SOURCE: https://docs.p2p.org/docs/restaking-overview LANGUAGE: APIDOC CODE: ``` TRON Staking: - Overview: /docs/overview-tron - Getting Started: /docs/staking-tron - Withdrawal: /docs/withdrawal-tron - Sign and Broadcast Transaction: /docs/signing-transaction-tron ``` ---------------------------------------- TITLE: SSV Setup Request Parameters DESCRIPTION: Defines the parameters for setting up a validator on the SSV network. This includes identifiers, operational status, transaction types, and encryption-related public keys and nonces. SOURCE: https://docs.p2p.org/docs/getting-started-ssv LANGUAGE: APIDOC CODE: ``` SSV Setup Request Parameters: - `id`: UUID specified in the SSV set-up request. - `status`: Current status of the SSV request. Possible values: - `init`: Request is stored. - `processing`: Request in progress. - `ready`: Request is ready for the next step. - `validator-ready`: Validator is registered on the SSV network. - `validator-error`: Validator data is invalid. - `cancel`: Request canceled due to error or timeout. - `type`: Type of operation. Available values: - `without-encrypt-key`: Validator's private key is returned encrypted to the client. - `with-encrypt-key`: Validator private key is maintained by P2P for withdrawals. - `operationPeriodInDays`: Duration for which the validator operation is configured, in days. - `liquidationPeriodInDays`: Threshold period for liquidation, in days. - `ecdhPublicKey`: Your ECDH public key, used for obtaining the encrypted validator private key. - `encryptedShares`: - `publicKey`: The validator's public key. - `nonce`: The validator key owner's nonce, used for signature in `sharesData`. ``` ---------------------------------------- TITLE: SSV Staking API DESCRIPTION: API for SSV staking, including overview, getting started guides, and specific instructions for using Trezor. SOURCE: https://docs.p2p.org/docs/restaking-overview LANGUAGE: APIDOC CODE: ``` SSV Staking API: - Overview: /docs/ssv-api-overview - Getting Started: /docs/getting-started-ssv - Getting Started with Trezor: /docs/getting-started-ssv-trezor - Withdrawal: /docs/withdrawal-ssv ``` ---------------------------------------- TITLE: TRON Staking Documentation DESCRIPTION: Guides for staking on the TRON network, covering overview, getting started, withdrawal processes, and transaction signing. SOURCE: https://docs.p2p.org/docs/restaking-api LANGUAGE: APIDOC CODE: ``` TRON Staking: - Overview: /docs/overview-tron - Getting Started: /docs/staking-tron - Withdrawal: /docs/withdrawal-tron - Sign and Broadcast Transaction: /docs/signing-transaction-tron ``` ---------------------------------------- TITLE: Unified API Unstaking Operations DESCRIPTION: Outlines the API endpoints and steps for unstaking assets. This includes creating an unstaking transaction, creating a withdrawal transaction, and broadcasting the signed transactions. SOURCE: https://docs.p2p.org/docs/unified-api-getting-started LANGUAGE: APIDOC CODE: ``` POST /api/v1/unified/staking/unstake/ Description: Creates an unstaking transaction. Request Body: Requires network-specific parameters. Example: POST /api/v1/unified/staking/unstake/ { "network": "ethereum", "amount": "50", ... } Returns: Unsigned transaction data. POST /api/v1/unified/staking/withdraw Description: Creates a withdrawal transaction for unstaked assets. Request Body: Requires network-specific parameters. Example: POST /api/v1/unified/staking/withdraw { "network": "ethereum", "unstake_id": "...", ... } Returns: Unsigned transaction data. POST /api/v1/unified/transaction/broadcast Description: Broadcasts a signed transaction to the network. Request Body: Requires signed transaction data and network information. Example: POST /api/v1/unified/transaction/broadcast { "signed_tx": "0x...", "network": "ethereum" } Returns: Transaction hash or status. ```