# SolanaSwapData

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:52](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L52)

Represents Solana 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 SolanaSwapData(args): SolanaSwapData;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:134](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L134)

Creates swap data from structured constructor arguments.

#### Parameters

| Parameter | Type                     | Description      |
| --------- | ------------------------ | ---------------- |
| `args`    | `SolanaSwapDataCtorArgs` | Swap data fields |

#### Returns

`SolanaSwapData`

#### 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 SolanaSwapData(data): SolanaSwapData;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:140](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L140)

Deserializes swap data from serialized storage representation.

#### Parameters

| Parameter | Type                                      | Description                                                      |
| --------- | ----------------------------------------- | ---------------------------------------------------------------- |
| `data`    | `object` & `Serialized`<`SolanaSwapData`> | Serialized swap data from [SolanaSwapData.serialize](#serialize) |

#### Returns

`SolanaSwapData`

#### Overrides

```
SwapData.constructor
```

## Properties

### amount

```
amount: BN;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:73](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L73)

Swap amount.

***

### claimer

```
claimer: PublicKey;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:65](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L65)

Claimer address receiving the swap funds.

***

### claimerAta?

```
optional claimerAta: PublicKey;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:109](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L109)

Optional claimer associated token account.

***

### claimerBounty

```
claimerBounty: BN;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:122](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L122)

Claimer bounty amount.

***

### confirmations

```
confirmations: number;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:93](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L93)

Required bitcoin confirmations for claim.

***

### 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)

***

### expiry

```
expiry: BN;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:85](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L85)

Swap expiry timestamp.

***

### kind

```
kind: number;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:101](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L101)

Solana on-chain swap kind discriminator.

***

### nonce

```
nonce: BN;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:89](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L89)

Nonce used in claim hash derivation.

***

### offerer

```
offerer: PublicKey;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:61](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L61)

Offerer address funding the swap.

***

### offererAta?

```
optional offererAta: PublicKey;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:113](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L113)

Optional offerer associated token account.

***

### payIn

```
payIn: boolean;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:105](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L105)

Whether funds are paid in from offerer wallet.

***

### paymentHash

```
paymentHash: string;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:77](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L77)

Payment hash identifying the swap.

***

### payOut

```
payOut: boolean;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:97](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L97)

Whether funds are paid out to claimer wallet directly.

***

### programId

```
programId: PublicKey;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:57](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L57)

Program ID for which this swap data was created

***

### securityDeposit

```
securityDeposit: BN;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:118](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L118)

Security deposit amount.

***

### sequence

```
sequence: BN;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:81](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L81)

Swap sequence used for uniqueness.

***

### token

```
token: PublicKey;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:69](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L69)

Token mint used for the swap.

***

### txoHash?

```
optional txoHash: string;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:127](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L127)

Optional txo hash hint.

## Methods

### correctPDA()

```
correctPDA(account): boolean;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:410](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L410)

Checks whether the provided escrow account matches this swap data.

#### Parameters

| Parameter | Type                         | Description                            |
| --------- | ---------------------------- | -------------------------------------- |
| `account` | `IdlAccounts`<`SwapProgram`> | Escrow account data fetched from chain |

#### Returns

`boolean`

***

### 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)

***

### equals()

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

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:433](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L433)

Checks equality between 2 swap data objects

#### Parameters

| Parameter | Type             | Description |
| --------- | ---------------- | ----------- |
| `other`   | `SolanaSwapData` |             |

#### 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)

***

### fromEscrowState()

```
static fromEscrowState(programId, account): SolanaSwapData;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:513](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L513)

Deserializes swap data from an on-chain escrow account state.

#### Parameters

| Parameter   | Type                         | Description                                |
| ----------- | ---------------------------- | ------------------------------------------ |
| `programId` | `PublicKey`                  |                                            |
| `account`   | `IdlAccounts`<`SwapProgram`> | Escrow account state as returned by Anchor |

#### Returns

`SolanaSwapData`

***

### fromInstruction()

```
static fromInstruction(

   programId, 

   initIx, 

   txoHash): SolanaSwapData;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:470](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L470)

Converts initialize instruction data into SolanaSwapData.

#### Parameters

| Parameter   | Type              | Description                                |
| ----------- | ----------------- | ------------------------------------------ |
| `programId` | `PublicKey`       |                                            |
| `initIx`    | `InitInstruction` | Decoded initialize instruction             |
| `txoHash`   | `string`          | Parsed txo hash hint from initialize event |

#### Returns

`SolanaSwapData`

Converted and parsed swap data

***

### getAmount()

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

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:248](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L248)

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-solana/src/solana/swaps/SolanaSwapData.ts:204](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L204)

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-solana/src/solana/swaps/SolanaSwapData.ts:377](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L377)

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-solana/src/solana/swaps/SolanaSwapData.ts:319](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L319)

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-solana/src/solana/swaps/SolanaSwapData.ts:284](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L284)

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-solana/src/solana/swaps/SolanaSwapData.ts:600](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L600)

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-solana/src/solana/swaps/SolanaSwapData.ts:326](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L326)

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-solana/src/solana/swaps/SolanaSwapData.ts:614](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L614)

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-solana/src/solana/swaps/SolanaSwapData.ts:276](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L276)

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-solana/src/solana/swaps/SolanaSwapData.ts:356](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L356)

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-chain-solana/src/solana/swaps/SolanaSwapData.ts:348](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L348)

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`

#### Overrides

[`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-solana/src/solana/swaps/SolanaSwapData.ts:291](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L291)

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-solana/src/solana/swaps/SolanaSwapData.ts:188](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L188)

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-solana/src/solana/swaps/SolanaSwapData.ts:370](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L370)

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-solana/src/solana/swaps/SolanaSwapData.ts:333](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L333)

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-solana/src/solana/swaps/SolanaSwapData.ts:255](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L255)

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-solana/src/solana/swaps/SolanaSwapData.ts:384](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L384)

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-solana/src/solana/swaps/SolanaSwapData.ts:340](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L340)

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-solana/src/solana/swaps/SolanaSwapData.ts:269](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L269)

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-base/src/swaps/SwapData.ts:220](https://github.com/atomiqlabs/atomiq-base/blob/df344bedbab9ab3de863e3c2d9246e90bd861d04/src/swaps/SwapData.ts#L220)

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

#### Returns

`boolean`

#### Inherited from

[`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)

***

### isClaimer()

```
isClaimer(address): any;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:580](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L580)

Checks whether the provided address is a claimer for this escrow

#### Parameters

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

#### Returns

`any`

#### 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)

***

### isDepositToken()

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

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:607](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L607)

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): any;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:593](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L593)

Checks whether the provided address is an offerer for this escrow

#### Parameters

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

#### Returns

`any`

#### 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-solana/src/solana/swaps/SolanaSwapData.ts:298](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L298)

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-solana/src/solana/swaps/SolanaSwapData.ts:305](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L305)

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)

***

### isToken()

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

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:262](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L262)

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-solana/src/solana/swaps/SolanaSwapData.ts:312](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L312)

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)

***

### kindToType()

```
static kindToType(value): ChainSwapType;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:563](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L563)

Converts Solana program kind discriminator to abstract swap type.

#### Parameters

| Parameter | Type     | Description                    |
| --------- | -------- | ------------------------------ |
| `value`   | `number` | Solana program swap kind value |

#### Returns

`ChainSwapType`

***

### serialize()

```
serialize(): object & Serialized<SolanaSwapData>;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:221](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L221)

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

#### Returns

`object` & `Serialized`<`SolanaSwapData`>

#### 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-solana/src/solana/swaps/SolanaSwapData.ts:211](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L211)

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(txoHash): void;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:363](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L363)

Sets the extra data with hints for this escrow

#### Parameters

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| `txoHash` | `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-solana/src/solana/swaps/SolanaSwapData.ts:195](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L195)

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)

***

### toSwapDataStruct()

```
toSwapDataStruct(): IdlTypes<SwapProgram>;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:391](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L391)

Serializes the swap data into the Solana program `SwapData` struct representation.

#### Returns

`IdlTypes`<`SwapProgram`>

***

### typeToKind()

```
static typeToKind(type): number;
```

Defined in: [atomiq-chain-solana/src/solana/swaps/SolanaSwapData.ts:545](https://github.com/atomiqlabs/atomiq-chain-solana/blob/4094a4a5b53d0864511200476446f3034a3c7c10/src/solana/swaps/SolanaSwapData.ts#L545)

Converts abstract swap type to Solana program kind discriminator.

#### Parameters

| Parameter | Type            | Description              |
| --------- | --------------- | ------------------------ |
| `type`    | `ChainSwapType` | Chain-agnostic swap type |

#### Returns

`number`
