# 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>;
```
