# delegateERC1155

**delegateERC1155**( `to`: <mark style="color:blue;">string</mark>, `contract`: <mark style="color:blue;">string,</mark> `tokenId`: <mark style="color:blue;">number</mark>, `rights`: <mark style="color:blue;">string</mark>, `amount`: <mark style="color:blue;">number</mark> ) ⇒ Promise< <mark style="color:blue;">TransactionHash</mark> >

&#x20;       Returns the transaction hash of the submitted delegation.

<table data-header-hidden><thead><tr><th width="128"></th><th></th></tr></thead><tbody><tr><td><strong>to</strong></td><td>The address to act as delegate</td></tr><tr><td><strong>contract</strong></td><td>The contract whose rights are being delegated</td></tr><tr><td><strong>tokenId</strong></td><td>The token id for the token you're delegating</td></tr><tr><td><strong>rights</strong></td><td>Specific subdelegation rights granted to the delegate, pass <code>""</code> to encompass all rights</td></tr><tr><td><strong>amount</strong></td><td>The amount of that token id to delegate, > 0 delegates and 0 revokes</td></tr></tbody></table>

#### Usage Example

```javascript
const to = "0x0000000000000000000000000000000000000003";
const from = "0x0000000000000000000000000000000000000001";
const contract = "0x0000000000000000000000000000000000000002";
const tokenId = 5;
const amount = 1;
await v2.delegateERC1155(to, contract, tokenId, "", amount);
```


---

# Agent Instructions: 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:

```
GET https://docs.delegate.xyz/technical-documentation/javascript-sdk/delegate-revoke/delegateerc1155.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
