# EVMSwapData

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:17](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L17)

Represents swap data for executing PrTLC (on-chain) or HTLC (lightning) based swaps.

## Extends

* [`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md)

## Constructors

### Constructor

```
new EVMSwapData(

   offerer, 

   claimer, 

   token, 

   refundHandler, 

   claimHandler, 

   payOut, 

   payIn, 

   reputation, 

   sequence, 

   claimData, 

   refundData, 

   amount, 

   depositToken, 

   securityDeposit, 

   claimerBounty, 

   kind, 

   extraData?, 

   successActionCommitment?): EVMSwapData;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:63](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L63)

#### Parameters

| Parameter                  | Type            |
| -------------------------- | --------------- |
| `offerer`                  | `string`        |
| `claimer`                  | `string`        |
| `token`                    | `string`        |
| `refundHandler`            | `string`        |
| `claimHandler`             | `string`        |
| `payOut`                   | `boolean`       |
| `payIn`                    | `boolean`       |
| `reputation`               | `boolean`       |
| `sequence`                 | `bigint`        |
| `claimData`                | `string`        |
| `refundData`               | `string`        |
| `amount`                   | `bigint`        |
| `depositToken`             | `string`        |
| `securityDeposit`          | `bigint`        |
| `claimerBounty`            | `bigint`        |
| `kind`                     | `ChainSwapType` |
| `extraData?`               | `string`        |
| `successActionCommitment?` | `string`        |

#### Returns

`EVMSwapData`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`constructor`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#constructor)

### Constructor

```
new EVMSwapData(data): EVMSwapData;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:83](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L83)

#### Parameters

| Parameter | Type  |
| --------- | ----- |
| `data`    | `any` |

#### Returns

`EVMSwapData`

#### Overrides

```
SwapData.constructor
```

## Properties

### amount

```
amount: bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:51](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L51)

***

### claimData

```
claimData: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:48](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L48)

***

### claimer

```
claimer: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:36](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L36)

***

### claimerBounty

```
claimerBounty: bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:55](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L55)

***

### claimHandler

```
claimHandler: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:40](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L40)

***

### depositToken

```
depositToken: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:53](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L53)

***

### deserializers

```
static deserializers: object = {};
```

Defined in: [atomiq-base/src/swaps/SwapData.ts:14](https://github.com/atomiqlabs/atomiq-base/blob/df344bedbab9ab3de863e3c2d9246e90bd861d04/src/swaps/SwapData.ts#L14)

A mapping of deserializers for different escrow swap data types coming from different smart chain implementations

#### Index Signature

```
[type: string]: (serialized) => any
```

#### Inherited from

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`deserializers`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#deserializers)

***

### extraData?

```
optional extraData: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:57](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L57)

***

### kind

```
kind: ChainSwapType;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:61](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L61)

***

### offerer

```
offerer: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:35](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L35)

***

### payIn

```
payIn: boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:44](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L44)

***

### payOut

```
payOut: boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:43](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L43)

***

### refundData

```
refundData: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:49](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L49)

***

### refundHandler

```
refundHandler: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:39](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L39)

***

### reputation

```
reputation: boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:45](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L45)

***

### securityDeposit

```
securityDeposit: bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:54](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L54)

***

### sequence

```
sequence: bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:46](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L46)

***

### successActionCommitment

```
successActionCommitment: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:59](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L59)

***

### token

```
token: string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:37](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L37)

## Methods

### deserialize()

```
static deserialize<T>(data): T;
```

Defined in: [atomiq-base/src/swaps/SwapData.ts:23](https://github.com/atomiqlabs/atomiq-base/blob/df344bedbab9ab3de863e3c2d9246e90bd861d04/src/swaps/SwapData.ts#L23)

Deserializer parsing the chain-specific escrow swap data from a JSON-compatible object representation

#### Type Parameters

| Type Parameter                                                                                                |
| ------------------------------------------------------------------------------------------------------------- |
| `T` *extends* [`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md) |

#### Parameters

| Parameter | Type  | Description |
| --------- | ----- | ----------- |
| `data`    | `any` |             |

#### Returns

`T`

#### Inherited from

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`deserialize`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#deserialize)

***

### deserializeFromStruct()

```
static deserializeFromStruct(struct, claimHandlerImpl): EVMSwapData;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:492](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L492)

Deserializes swap data from an on-chain escrow struct.

#### Parameters

| Parameter          | Type                          | Description                                            |
| ------------------ | ----------------------------- | ------------------------------------------------------ |
| `struct`           | `EscrowDataStruct`            | Escrow struct as returned by the contract              |
| `claimHandlerImpl` | `IClaimHandler`<`any`, `any`> | Claim handler implementation used to resolve swap type |

#### Returns

`EVMSwapData`

***

### equals()

```
equals(other): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:440](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L440)

Checks equality between 2 swap data objects

#### Parameters

| Parameter | Type          | Description |
| --------- | ------------- | ----------- |
| `other`   | `EVMSwapData` |             |

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`equals`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#equals)

***

### getAmount()

```
getAmount(): bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:229](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L229)

Gets the amount of token deposited into the vault by the offerer

#### Returns

`bigint`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getamount)

***

### getClaimer()

```
getClaimer(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:185](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L185)

Gets the claim, which receives funds from the escrow

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getClaimer`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getclaimer)

***

### getClaimerBounty()

```
getClaimerBounty(): bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:365](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L365)

Gets the claimer bounty, an amount of native tokens deposited by the caller (initiator) on escrow initialization, that is paid out to a caller which claims the escrow as a reward, otherwise returned to the claimer if escrow is refunded

#### Returns

`bigint`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getClaimerBounty`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getclaimerbounty)

***

### getClaimHash()

```
getClaimHash(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:301](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L301)

Returns the claim hash of the escrow, this specifies a condition that needs to be satisfied to claim the funds from the escrow

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getClaimHash`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getclaimhash)

***

### getConfirmationsHint()

```
getConfirmationsHint(): number;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:317](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L317)

Retrieves required number of confirmations as a hint from the extra data provided, or `null` if no extra data has been provided when creating the escrow

#### Returns

`number`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getConfirmationsHint`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getconfirmationshint)

***

### getDepositToken()

```
getDepositToken(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:379](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L379)

Returns the token used for the deposit (security deposit & claimer bounty) (usually a native token of the underlying smart chain)

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getDepositToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getdeposittoken)

***

### getEscrowHash()

```
getEscrowHash(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:285](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L285)

Returns a unique hash of this escrow

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getEscrowHash`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getescrowhash)

***

### getEscrowStruct()

```
getEscrowStruct(): any;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:520](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L520)

Returns the JSON-serialization safe representation of the underlying swap escrow struct committed (or to-be-committed) on-chain

#### Returns

`any`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getEscrowStruct`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getescrowstruct)

***

### getExpiry()

```
getExpiry(): bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:257](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L257)

Returns the expiration time of this escrow, after the timeout an offerer is able to refund unilaterally. taking back funds from the escrow

#### Returns

`bigint`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getExpiry`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getexpiry)

***

### getExtraData()

```
getExtraData(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:344](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L344)

Gets the extraneous data specified when creating this escrow, this provides helpers for 3rd party claimers

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getExtraData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getextradata)

***

### getHTLCHashHint()

```
getHTLCHashHint(): string;
```

Defined in: [atomiq-base/src/swaps/SwapData.ts:164](https://github.com/atomiqlabs/atomiq-base/blob/df344bedbab9ab3de863e3c2d9246e90bd861d04/src/swaps/SwapData.ts#L164)

Retrieves a hint providing an HTLC hash from the extra data provided, or `null` if no extra data has been provided when creating the escrow

#### Returns

`string`

#### Inherited from

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getHTLCHashHint`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#gethtlchashhint)

***

### getNonceHint()

```
getNonceHint(): bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:326](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L326)

Retrieves the PrTLC transaction nonce as a hint from the extra data provided, or `null` if no extra data has been provided when creating the escrow

#### Returns

`bigint`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getNonceHint`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getnoncehint)

***

### getOfferer()

```
getOfferer(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:170](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L170)

Gets the offerer, which funds the escrow

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getOfferer`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getofferer)

***

### getSecurityDeposit()

```
getSecurityDeposit(): bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:358](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L358)

Gets the security deposit, which is an amount of native tokens deposited by the caller (initiator) on escrow initialization to guarantee the execution, this acts as a compensation for offerer if he has to refund the escrow, otherwise it is returned back to claimer after a successful claim of the escrow

#### Returns

`bigint`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getSecurityDeposit`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getsecuritydeposit)

***

### getSequence()

```
getSequence(): bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:310](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L310)

Returns a random variable sequence of this vault, used to ensure the escrow hash is always different

#### Returns

`bigint`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getSequence`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#getsequence)

***

### getToken()

```
getToken(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:236](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L236)

Gets the address of the deposited token in a vault

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#gettoken)

***

### getTotalDeposit()

```
getTotalDeposit(): bigint;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:372](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L372)

Returns the total deposit in native token to be deposited by the caller (initiator) on escrow initialization, due to how claimer bounty and security deposits work, this is basically a max(claimer bounty, security deposit), because either a swap is claimed (and claimer bounty is paid) or a swap is refunded (and security deposit is paid), never both!

#### Returns

`bigint`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getTotalDeposit`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#gettotaldeposit)

***

### getTxoHashHint()

```
getTxoHashHint(): string;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:335](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L335)

Retrieves the PrTLC transaction txo (transaction output) hash as a hint from the extra data provided, or `null` if no extra data has been provided when creating the escrow

#### Returns

`string`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getTxoHashHint`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#gettxohashhint)

***

### getType()

```
getType(): ChainSwapType;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:250](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L250)

Returns the type of this escrow

#### Returns

`ChainSwapType`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`getType`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#gettype)

***

### hasSuccessAction()

```
hasSuccessAction(): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:482](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L482)

Checks whether the escrow contains an execution action (swap+)

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`hasSuccessAction`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#hassuccessaction)

***

### isClaimData()

```
isClaimData(data): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:432](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L432)

Checks if the passed data matches the swap's claim data.

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `data`    | `string` |             |

#### Returns

`boolean`

***

### isClaimer()

```
isClaimer(address): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:394](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L394)

Checks whether the provided address is a claimer for this escrow

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `address` | `string` |             |

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`isClaimer`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#isclaimer)

***

### isClaimHandler()

```
isClaimHandler(address): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:422](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L422)

Checks whether the passed address is specified as the claim handler for the swap.

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `address` | `string` |             |

#### Returns

`boolean`

***

### isDepositToken()

```
isDepositToken(token): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:386](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L386)

Checks whether a provided token is used as a deposit token (security deposit & claimer bounty) for the escrow

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `token`   | `string` |             |

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`isDepositToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#isdeposittoken)

***

### isOfferer()

```
isOfferer(address): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:402](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L402)

Checks whether the provided address is an offerer for this escrow

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `address` | `string` |             |

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`isOfferer`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#isofferer)

***

### isPayIn()

```
isPayIn(): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:264](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L264)

Whether this escrow will be funded from the offerer's wallet or from the offerer's vault inside the contract, when `true` it takes funds normally from the offerer's address, when `false` it pulls the funds from the offerer's vault inside the contract

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`isPayIn`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#ispayin)

***

### isPayOut()

```
isPayOut(): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:271](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L271)

Whether this escrow will pay out the claimer, when `true` it pays out normally to the claimer's address, when `false` it instead keeps the funds inside the contract and assigns them to the claimer's vault inside the contract

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`isPayOut`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#ispayout)

***

### isRefundHandler()

```
isRefundHandler(address): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:412](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L412)

Checks whether the passed address is specified as the refund handler for the swap.

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `address` | `string` |             |

#### Returns

`boolean`

***

### isToken()

```
isToken(token): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:243](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L243)

Checks whether the provided token address is the actual token used by this escrow

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `token`   | `string` |             |

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`isToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#istoken)

***

### isTrackingReputation()

```
isTrackingReputation(): boolean;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:278](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L278)

Whether the outcome of this escrow should be used to track reputation of the claimer

#### Returns

`boolean`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`isTrackingReputation`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#istrackingreputation)

***

### serialize()

```
serialize(): any;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:202](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L202)

Serializes the object to a JSON-compatible object (i.e. no bigints, functions, etc.)

#### Returns

`any`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`serialize`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#serialize)

***

### setClaimer()

```
setClaimer(newClaimer): void;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:192](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L192)

Sets the claimer which receives funds from the escrow

#### Parameters

| Parameter    | Type     | Description |
| ------------ | -------- | ----------- |
| `newClaimer` | `string` |             |

#### Returns

`void`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`setClaimer`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#setclaimer)

***

### setExtraData()

```
setExtraData(extraData): void;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:351](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L351)

Sets the extra data with hints for this escrow

#### Parameters

| Parameter   | Type     | Description |
| ----------- | -------- | ----------- |
| `extraData` | `string` |             |

#### Returns

`void`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`setExtraData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#setextradata)

***

### setOfferer()

```
setOfferer(newOfferer): void;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:177](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L177)

Sets the offerer to fund the escrow

#### Parameters

| Parameter    | Type     | Description |
| ------------ | -------- | ----------- |
| `newOfferer` | `string` |             |

#### Returns

`void`

#### Overrides

[`SwapData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md).[`setOfferer`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SwapData.md#setofferer)

***

### toEscrowStruct()

```
toEscrowStruct(): EscrowDataStruct;
```

Defined in: [atomiq-chain-evm/src/evm/swaps/EVMSwapData.ts:461](https://github.com/atomiqlabs/atomiq-chain-evm/blob/98ca6f16fbfb37e521f8c27b4f942642fe00c2ee/src/evm/swaps/EVMSwapData.ts#L461)

Serializes the swap data into the EVM escrow-manager struct representation.

#### Returns

`EscrowDataStruct`
