Overview
stake.fish SDK
The stake.fish SDK provides JavaScript/TypeScript libraries for staking operations across multiple blockchain networks. Each SDK offers a unified, chain-specific interface for delegating, undelegating, and managing stakes with stake.fish validators.
Available SDKs
| Package | Chain | Install |
|---|---|---|
@stakefish/sdk-babylon-baby | Babylon Baby | npm install @stakefish/sdk-babylon-baby |
@stakefish/sdk-cardano | Cardano | npm install @stakefish/sdk-cardano |
@stakefish/sdk-cosmos | Cosmos Hub | npm install @stakefish/sdk-cosmos |
@stakefish/sdk-eigenlayer | EigenLayer | npm install @stakefish/sdk-eigenlayer |
@stakefish/sdk-monad | Monad | npm install @stakefish/sdk-monad |
@stakefish/sdk-polygon | Polygon | npm install @stakefish/sdk-polygon |
@stakefish/sdk-starknet | Starknet | npm install @stakefish/sdk-starknet |
@stakefish/sdk-sui | Sui | npm install @stakefish/sdk-sui |
@stakefish/sdk-zkverify | zkVerify | npm install @stakefish/sdk-zkverify |
General Usage Pattern
All stake.fish SDKs follow a consistent four-step workflow:
1. Initialize
Create an instance of the chain-specific class with your configuration:
import { BabylonBaby } from '@stakefish/sdk-babylon-baby';
import { Cardano } from '@stakefish/sdk-cardano';
import { Cosmos } from '@stakefish/sdk-cosmos';
import { EigenLayer } from '@stakefish/sdk-eigenlayer';
import { Monad } from '@stakefish/sdk-monad';
import { Polygon } from '@stakefish/sdk-polygon';
import { Starknet } from '@stakefish/sdk-starknet';
import { Sui } from '@stakefish/sdk-sui';
import { ZkVerify } from '@stakefish/sdk-zkverify';
const babylonBaby = new BabylonBaby({ rpcUrl, apiUrl, memo });
const cardano = new Cardano({ blockfrostProjectId, memo });
const cosmos = new Cosmos({ rpcUrl, apiUrl, memo });
const eigenlayer = new EigenLayer({ ethereumRpcUrl, stakefishPublicApiKey });
const monad = new Monad({ rpcUrl });
const polygon = new Polygon({ ethereumRpcUrl });
const starknet = new Starknet({ rpcUrl });
const sui = new Sui();
const zkverify = new ZkVerify({ rpcUrl, memo });Important: The
memoparameter is used to identify institutional clients and must be agreed upon with stake.fish prior to production use. Please contact stake.fish to obtain your unique memo string.
2. Prepare Transaction
Create an unsigned transaction for the desired staking operation.
// Delegation
const unsignedTx = await babylonBaby.delegate({ delegatorAddress, amount });
const unsignedTx = await cardano.delegate({ delegatorAddress });
const unsignedTx = await cosmos.delegate({ delegatorAddress, amount });
const unsignedTx = await eigenlayer.delegate({ delegatorAddress });
const unsignedTx = await monad.delegate({ delegatorAddress, amount });
const unsignedTx = await polygon.delegate({ delegatorAddress, amount });
const unsignedTx = await starknet.stake({ delegatorAddress, amount });
const unsignedTx = await sui.delegate({ delegatorAddress, amount });
const unsignedTx = await zkverify.delegate({ delegatorAddress, amount });
// Undelegation
const unsignedTx = await babylonBaby.undelegate({ delegatorAddress, amount });
const unsignedTx = await cardano.undelegate({ delegatorAddress });
const unsignedTx = await cosmos.undelegate({ delegatorAddress, amount });
const unsignedTx = await eigenlayer.undelegate({ delegatorAddress });
const unsignedTx = await monad.undelegate({ delegatorAddress, amount });
const unsignedTx = await polygon.undelegate({ delegatorAddress, amount });
const unsignedTx = await starknet.unstake({ delegatorAddress, amount });
const unsignedTx = await sui.undelegate({ delegatorAddress, stakeId });
const unsignedTx = await zkverify.undelegate({ delegatorAddress });3. Sign Transaction
Sign the unsigned transaction offline using your private key or keys:
// Chains using privateKey (string)
const signed = await sui.sign({ privateKey, unsignedTx });
const signed = await starknet.sign({ privateKey, unsignedTx });
const signed = await zkverify.sign({ privateKey, unsignedTx });
// Chains using privateKeyHex (hex-encoded string)
const signed = await babylonBaby.sign({ privateKeyHex, unsignedTx });
const signed = await cosmos.sign({ privateKeyHex, unsignedTx });
const signed = await eigenlayer.sign({ privateKeyHex, unsignedTx });
const signed = await monad.sign({ privateKeyHex, unsignedTx });
const signed = await polygon.sign({ privateKeyHex, unsignedTx });
// Cardano uses derived key objects
const keys = cardano.deriveKeysFromMnemonic({ mnemonic, accountIndex: 0 });
const signed = await cardano.sign({ keys, unsignedTx });Note: Signing is performed entirely offline and does not require network connectivity. Private keys never leave your environment.
4. Broadcast Transaction
Submit the signed transaction to the network:
// Chains using signedTransaction
const result = await sui.broadcast({ signedTransaction });
const result = await cardano.broadcast({ signedTransaction });
const result = await zkverify.broadcast({ signedTransaction });
// Chains using signedTx
const result = await babylonBaby.broadcast({ signedTx });
const result = await cosmos.broadcast({ signedTx });
const result = await eigenlayer.broadcast({ signedTx });
const result = await monad.broadcast({ signedTx });
const result = await polygon.broadcast({ signedTx });
const result = await starknet.broadcast({ signedTx });
console.log('Transaction ID:', result.txId);All broadcast methods accept optional checkInclusion (boolean), timeoutMs, and pollIntervalMs parameters to wait for on-chain confirmation.
Chain-Specific Documentation
For detailed API references, configuration options, and examples, see the individual SDK documentation:
- Babylon Baby SDK
- Cardano SDK
- Cosmos SDK
- EigenLayer SDK
- Monad SDK
- Polygon SDK
- Starknet SDK
- Sui SDK
- zkVerify SDK
Security Notes
- Private keys and mnemonics should be kept secure and never committed to version control
- All signing operations are performed locally—keys are never transmitted over the network
- Use environment variables or secure key management solutions for credentials
Updated 9 days ago
