> For the complete documentation index, see [llms.txt](https://docs.constellationnetwork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.constellationnetwork.io/stargazer-wallet/constellation-rpc-api/dag_delegatedstake.md).

# dag\_delegatedStake

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

**Parameters**

<table><thead><tr><th width="85.03125">Name</th><th width="236.6640625">Type</th><th>Description</th></tr></thead><tbody><tr><td>Data</td><td><code>Object&#x3C;DelegatedStake></code></td><td>The delegate stake object.</td></tr></tbody></table>

`DelegatedStake`

```typescript
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

};
```

{% hint style="info" %}
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.&#x20;
{% endhint %}

**Return Type**

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

**Example**

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.constellationnetwork.io/stargazer-wallet/constellation-rpc-api/dag_delegatedstake.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
