> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EmbeddedOfframpPayer

> Swift Structure

**Structure**

Signs for the offramp with your wallet: the deposit, and the wallet ownership proof when your wallet can sign messages.

```swift theme={null}
struct EmbeddedOfframpPayer
```

Keep `CrossmintEmbeddedOfframp` on screen while the payer runs. Once the view is gone, the page never gets the reply.

## Initializers

### init(signAndSendTransaction:signMessage:)

Creates a payer.

```swift theme={null}
init(signAndSendTransaction: @escaping @MainActor (OfframpTransaction) async throws -> String, signMessage: (@MainActor (OfframpMessage) async throws -> String)? = nil)
```

#### Parameters

| Parameter | Description |
| - | - |
| `signAndSendTransaction` | Signs and broadcasts the transaction for `payerAddress` on `chain`, unchanged, then returns the on-chain transaction hash, or the signature on Solana. Refuse when your wallet is not that payer. Throw `OfframpSignatureRejectedError` only when the user declined. |
| `signMessage` | Signs `message` as `payerAddress` on `chain` and returns the signature: the EIP-191 `personal_sign` hex string, 0x-prefixed, on EVM chains, or the base64 (not base58) encoding of the 64-byte ed25519 signature over the UTF-8 message on Solana. The offramp asks only when the user must prove that they own the wallet. Refuse when your wallet is not that payer. Throw `OfframpSignatureRejectedError` only when the user declined. Without it, a user who needs the proof is told to verify the wallet in your app first. Adding or removing it reloads the offramp. |
