# Onchain Transaction

## **1.rollIn**

{% tabs %}
{% tab title="Usage" %}
Roll your ETH to cycle
{% endtab %}

{% tab title="Parameters" %}
ethersSigner: standard signer of ethers.js

fromChainId: the chain id where you initiate rollin transaction

receiveAddress: the address you will receive token on cycle

amount: its name explained itself
{% endtab %}

{% tab title="Return" %}
Standard ethers.TransactionResponse
{% endtab %}
{% endtabs %}

```typescript
sdk.rollIn(ethersSigner: ethers.Signer, fromChainId: number, receiveAddress: string, amount: string): Promise<ethers.TransactionResponse>;
```

## **2.rollOut**

{% tabs %}
{% tab title="Usage" %}
Roll your ETH from cycle to other chains
{% endtab %}

{% tab title="Parameters" %}
ethersSigner: standard signer of ethers.js

toChainId: the chain id where you want to bridge your token

receiveAddress: the address you will receive token on cycle

amount: its name explained itself
{% endtab %}

{% tab title="Return" %}
Standard ethers.TransactionResponse
{% endtab %}
{% endtabs %}

```typescript
sdk.rollOut(ethersSigner: ethers.Signer, toChainId: number, receiveAddress: string, amount: string): Promise<ethers.TransactionResponse>;
```

## **3.rollInMessage**

{% tabs %}
{% tab title="Usage" %}
Roll your message to cycle
{% endtab %}

{% tab title="Parameters" %}
ethersSigner: standard signer of ethers.js

fromChainId: the chain id where you initiate rollin transaction

receiveAddress: the address you will receive token on cycle

amount: its name explained itself
{% endtab %}

{% tab title="Return" %}
Standard ethers.TransactionResponse
{% endtab %}
{% endtabs %}

```typescript
sdk.rollInMessage(ethersSigner: ethers.Signer, fromChainId: number, receiveAddress: string, message: string): Promise<ethers.TransactionResponse>;
```

## **4.rollOutMessage**

{% tabs %}
{% tab title="Usage" %}
Roll your message from cycle to other chains
{% endtab %}

{% tab title="Parameters" %}
ethersSigner: standard signer of ethers.js

toChainId: the chain id where you want to bridge your token

receiveAddress: the address you will receive token on cycle

message: its name explained itself
{% endtab %}

{% tab title="Return" %}
Standard ethers.TransactionResponse
{% endtab %}
{% endtabs %}

```typescript
sdk.rollOutMessage(ethersSigner: ethers.Signer, toChainId: number, receiveAddress: string, message: string): Promise<ethers.TransactionResponse>;
```

## **5.claimAssets**

{% tabs %}
{% tab title="Usage" %}
Claim your assets after being rolled out. The assets rolled in will be claimed automatically.
{% endtab %}

{% tab title="Parameters" %}
ethersSigner: standard signer of ethers.js

claimInfo: the proxy object including everthing needed to claim
{% endtab %}

{% tab title="Return" %}
Standard ethers.TransactionResponse
{% endtab %}
{% endtabs %}

```typescript
sdk.claimAsset(ethersSigner: ethers.Signer, claimInfo: IClaimInfo): Promise<ethers.TransactionResponse>;
```

## **6.claimMessage**

{% tabs %}
{% tab title="Usage" %}
Claim your message after being rolled out. The assets rolled in will be claimed automatically.
{% endtab %}

{% tab title="Parameters" %}
ethersSigner: standard signer of ethers.js

claimInfo: the proxy object including everthing needed to claim
{% endtab %}

{% tab title="Return" %}
Standard ethers.TransactionResponse
{% endtab %}
{% endtabs %}

```typescript
sdk.claimMessage(ethersSigner: ethers.Signer, claimInfo: IClaimInfo): Promise<ethers.TransactionResponse>;
```


---

# 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.cyclenetwork.io/cycle-network-docs/cycle-core-sdk/onchain-transaction.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.
