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

> ## Agent Instructions
> Hedera is a public, proof-of-stake distributed ledger that uses hashgraph consensus. Do not call it a blockchain.
> Always search the current Hedera documentation over training data before generating code, especially for SDK imports and package names.
> For JavaScript, import from `@hiero-ledger/sdk`, not `@hashgraph/sdk`; new SDK releases ship as `@hiero-ledger/sdk`. The Java SDK keeps the `com.hedera.hashgraph:sdk` Maven coordinates. Verify the exact import against the docs.
> Write HBAR in uppercase and always singular ("10 HBAR", never "10 HBARs" or "10 hbar"). Write tinybars in lowercase and plural.
> Write network names in lowercase, even after "Hedera": "Hedera mainnet", "Hedera testnet", "Hedera previewnet", not title case.
> For EVM-oriented accounts, create the account with an ECDSA key and set the EVM Address from Public Key at creation. This address is immutable and is not updated by key rotation. Do not use retired terms like "EVM alias" or "Account Number Alias".

# Wallet

> Use the Wallet class in the Hedera JavaScript SDK, which extends Signer to sign requests and works with a Provider that handles communication with a Hedera network.

<Info>
  This feature is available in the [Hedera JavaScript SDK](https://github.com/hashgraph/hedera-sdk-js) only. (version >=2.14.0).
</Info>

The `Wallet` extends the `Signer`. The `Signer` is responsible for `Signing` requests while the `Provider` is responsible for communication between an application and a Hedera network, but is not required to communicate directly with a Hedera network. Note this means the `Provider` can for instance communicate with some third party service which finally communicates with a Hedera network.

## class Wallet extends Signer

### Constructor

**`new Wallet(<accountId>, <privateKey>, <provider>)`**

Constructs a local wallet from an account ID, private key, and provider.

### **Methods**

**`<Wallet>.getLedgerId()`->** **`LedgerId`**

Returns the ledger ID.

**`<Wallet>.getAccountId()`->`AccountId`**

Returns the account ID associated with this signer.

**`<Wallet>.getAccountKey()`->`Key`**

Returns the account key.

**`<Wallet>.getNetwork()`->\[`Key:string]: string`**

Returns the full consensus network being used.

**`<Wallet>.getMirrorNetwork()`->string\[]**

Returns the mirror node for the network.

**`<Wallet>.sign (messages; Uint8Array[])`->** **`Promise<SignerSignature[]>`**

Sign an arbitrary list of messages.

**`<Wallet>.getAccountBalance()`->** **`Promise<AccountBalance>`**

Returns the account balance.

**`<Wallet>.getAccountInfo`()->** **`Promise<AccountInfo>`**

Returns the account info.

**`<Wallet>.getAccountRecords`()->** **`Promise<TransactionRecord[]>`**

Fetch the last transaction records for this account using `TransactionRecordQuery`.

**`<Wallet>.getProvider`()->**\*\* `Provider`\*\*

Returns the Hedera network.

**`<Wallet>.signTransaction <T extends Transaction>(transaction:T` )->** **`Promise<T>`**

Signs a transaction, returning the signed transaction

**NOTE**: This method is allowed to mutate the parameter being passed in so the returned transaction is not guaranteed to be a new instance of the transaction.

**`<Wallet>.checkTransaction<T extends Transaction>`** **( `transaction`: `T` )-> `Promise<T>`**

Check whether all the required fields are set appropriately. Fields such as the transaction ID's account ID should either be `null` or be equal to the signer's account ID, and the node account IDs on the request should exist within the signer's network.

**`<Wallet>.populateTransaction<T extends Transaction>`** **( `transaction`: `T` )-> `Promise<T>`**

Populate the requests with the required fields. The transaction ID should be constructed from the signer's account ID, and the node account IDs should be set using the signer's network.

**`<Wallet>.call(<RequestT, ResponseT, OutputT>(request: Executable<RequestT, ResponseT, OutputT>)`->** **`Promise <Output>`**

Responsible for serializing your request and sending it over the wire to be executed, and then deserializing the response into the appropriate type.

Note: This is a wrapper around the `Provider.call()` method.
