# CosmosWalletAdapter (https://dev.cosmospay.lat/docs/sdk/definitions/web/cosmos-wallet-adapter/)

> Wallet adapter for the Cosmos Pay Wallet, as its browser extension or its hosted web build.

Wallet adapter for the Cosmos Pay Wallet, as its browser extension or its hosted web build.

## Constructor

### CosmosWalletAdapter

```ts
constructor(options?: CosmosProviderOptions | CosmosWalletProvider)
```

**Parameters**

- `options` _(optional)_: `CosmosProviderOptions | CosmosWalletProvider`

## Properties

### id

```ts
readonly id = "cosmos"
```

### name

```ts
readonly name = "Cosmos Pay Wallet"
```

## Methods

### isAvailable()

Available when a provider is already here, or when a hosted wallet is configured — the hosted build needs no install, so it is always usable. Deliberately does NOT wait for the hosted script: this answer gates a modal, and a wallet that takes a network round trip to say "yes" reads as broken. The script is fetched on the first real call instead.

```ts
isAvailable(): Promise<boolean>
```

**Returns** `Promise<boolean>`

### getPublicKey()

```ts
getPublicKey(_network: NetworkConfig): Promise<string>
```

**Parameters**

- `_network`: `NetworkConfig`

**Returns** `Promise<string>`

### signTransaction()

```ts
signTransaction(xdr: string, params: SignParams): Promise<string>
```

**Parameters**

- `xdr`: `string`
- `params`: `SignParams`

**Returns** `Promise<string>`
