Constellation Network
IntroductionFundamentalsFor DevelopersNode Validators
  • Index
  • Guide
    • Introduction
    • Provider Activation
    • Sending RPC Requests
    • Signing Data
    • Supported Connectors
    • Using External Libraries
  • API Reference
    • Overview
    • Wallet provider API
      • Overview
      • errorTypes
      • version
      • getProvider()
  • Chain Provider API
    • Overview
    • activated
    • chain
    • version
    • on()
    • removeListener()
    • async activate()
    • async onAsync()
    • async removeListenerAsync()
    • async request()
  • Constellation RPC API
    • Overview
    • dag_accounts
    • dag_chainId
    • dag_getBalance
    • dag_getMetagraphBalance
    • dag_getMetagraphPendingTransaction
    • dag_getMetagraphTransaction
    • dag_getPendingTransaction
    • dag_getPublicKey
    • dag_getTransaction
    • dag_requestAccounts
    • dag_sendMetagraphTransaction
    • dag_sendMetagraphDataTransaction
    • dag_signMetagraphDataTransaction
    • dag_sendTransaction
    • dag_signData
    • dag_signMessage
    • wallet_watchAsset
    • dag_delegatedStake
    • dag_withdrawDelegatedStake
    • dag_allowSpend
    • dag_tokenLock
  • Ethereum RPC API
    • Overview
    • eth_accounts
    • eth_blockNumber
    • eth_call
    • eth_chainId
    • eth_estimateGas
    • eth_gasPrice
    • eth_getBalance
    • eth_getBlockByHash
    • eth_getBlockByNumber
    • eth_getBlockTransactionCountByHash
    • eth_getBlockTransactionCountByNumber
    • eth_getCode
    • eth_getFilterChanges
    • eth_getFilterLogs
    • eth_getLogs
    • eth_getStorageAt
    • eth_getTransactionByBlockHashAndIndex
    • eth_getTransactionByBlockNumberAndIndex
    • eth_getTransactionByHash
    • eth_getTransactionCount
    • eth_getTransactionReceipt
    • eth_getUncleByBlockHashAndIndex
    • eth_getUncleByBlockNumberAndIndex
    • eth_getUncleCountByBlockHash
    • eth_getUncleCountByBlockNumber
    • eth_newBlockFilter
    • eth_newFilter
    • eth_protocolVersion
    • eth_requestAccounts
    • eth_sendTransaction
    • eth_signTypedData
    • eth_signTypedData_v4
    • eth_uninstallFilter
    • net_version
    • personal_sign
    • web3_sha3
  • Resources
    • Stargazer Github
    • Stargazer Connector Github
    • Stargazer Demos Github
    • Stargazer Chrome
    • Stargazer Android
    • Stargazer IOS
    • EIP-1193
Powered by GitBook

Main

  • Website
  • Get DAG
  • Explore Projects
  • Partners

Socials

  • Telegram
  • Discord
  • X (Twitter)

Tools

  • Wallet
  • DAG Explorer
  • Coingecko

© 2025 CONSTELLATION NETWORK

On this page

Was this helpful?

Export as PDF
  1. Constellation RPC API

dag_delegatedStake

Delegates a DAG amount to a specific node on the network.

Parameters

Name
Type
Description

Data

Object<DelegatedStake>

The delegate stake object.

DelegatedStake

type DelegatedStake = {

  source: string;           // Wallet address signing the transaction

  nodeId: string;           // The node identifier to delegate stake to
                            // Must be a valid node ID

  amount: number;           // The amount to stake
                            // Must be in DATUM

  fee?: number;             // The fee in DATUM
                            // If not provided, the default fee will be 0

  tokenLockRef: string;     // Reference to the token lock transaction
                            // Must be a valid token lock transaction hash

};

The tokenLockRef value must reference a token lock transaction with an unlockEpoch value set to null and currencyId set to null (DAG). Check the details in the dag_tokenLock section.

Return Type

String<Hash> - The hash of the delegate stake transaction.

Example

await provider.request({
  method: "dag_delegatedStake",
  params: [ 
    { 
        source: 'DAG5sz69nNwGF8ypn1yukFpg2pVJpdx5mnf1PJVc',
        nodeId: '65b0c6ac3d0df47d7e7c275ac2d439d11dd73d67bca59cc9771ab7868d4a3e9e8a10661541932af394ca741765bd4d5807f030a3217553db75f050f7e65193fd',
        amount: 100000000,
        fee: 0,
        tokenLockRef: '6c6ced4c67c931e71ecbe4bbf73462c1fe51522888620683e94faf7930a989da',
    }
  ]
});
// "e041960eaea9d21760dc1c291e9ef96429e4cdbbeec2ffd504d4c2ebcc8cad45"
Previouswallet_watchAssetNextdag_withdrawDelegatedStake

Last updated 1 month ago

Was this helpful?