# Account · FT4 TypeScript client · Chromia Docs (concept)

> Represents a blockchain account which is read only.
That is, using this object you can get information about
an account, but you cannot submit authenticate

Source: https://docs.chromia.com/pages/ft4-ts-client/interfaces/accounts.Account/

Interface

# Account

On this page

* [Properties](#properties)
* [blockchainRid](#blockchainrid)
* [connection](#connection)
* [getAuthDescriptorById](#getauthdescriptorbyid)
* [getAuthDescriptors](#getauthdescriptors)
* [getAuthDescriptorsBySigner](#getauthdescriptorsbysigner)
* [getBalanceByAssetId](#getbalancebyassetid)
* [getBalances](#getbalances)
* [getLastPendingCrosschainTransfer](#getlastpendingcrosschaintransfer)
* [getMainAuthDescriptor](#getmainauthdescriptor)
* [getPendingCrosschainTransfers](#getpendingcrosschaintransfers)
* [getRateLimit](#getratelimit)
* [getTransferHistory](#gettransferhistory)
* [getTransferHistoryEntry](#gettransferhistoryentry)
* [id](#id)
* [isAuthDescriptorValid](#isauthdescriptorvalid)
* [Optional type](#type)

Represents a blockchain account which is read only.
That is, using this object you can get information about
an account, but you cannot submit authenticated operations with it.

For an account to which it is possible to write, see [AuthenticatedAccount](https://docs.chromia.com/pages/ft4-ts-client/interfaces/accounts.AuthenticatedAccount/)

```signature
interface Account {
    blockchainRid: Buffer;
    connection: Connection;
    getAuthDescriptorById: (
        authDescriptorId: BufferId,
    ) => Promise<AnyAuthDescriptor>;
    getAuthDescriptors: () => Promise<AnyAuthDescriptor[]>;
    getAuthDescriptorsBySigner: (
        signer: BufferId,
    ) => Promise<AnyAuthDescriptor[]>;
    getBalanceByAssetId: (assetId: BufferId) => Promise<Balance | null>;
    getBalances: (
        limit?: number,
        cursor?: OptionalPageCursor,
    ) => Promise<PaginatedEntity<Balance>>;
    getLastPendingCrosschainTransfer: (
        targetBlockchainRid: BufferId,
        recipientId: BufferId,
        assetId: BufferId,
        amount: bigint,
    ) => Promise<PendingTransfer | null>;
    getMainAuthDescriptor: () => Promise<AnyAuthDescriptor>;
    getPendingCrosschainTransfers: (
        limit?: OptionalLimit,
        cursor?: OptionalPageCursor,
    ) => Promise<PaginatedEntity<PendingTransfer>>;
    getRateLimit: () => Promise<RateLimit>;
    getTransferHistory: (
        limit?: number,
        filter?: TransferHistoryFilter,
        cursor?: OptionalPageCursor,
    ) => Promise<PaginatedEntity<TransferHistoryEntry>>;
    getTransferHistoryEntry: (
        rowid: number,
    ) => Promise<TransferHistoryEntry | null>;
    id: Buffer;
    isAuthDescriptorValid: (authDescriptorId: BufferId) => Promise<boolean>;
    type?: string;
}
```

#### Hierarchy ([View Summary](https://docs.chromia.com/pages/ft4-ts-client/hierarchy/#accounts.Account))

* Account
  + [AuthenticatedAccount](https://docs.chromia.com/pages/ft4-ts-client/interfaces/accounts.AuthenticatedAccount/)

## Properties

### blockchainRid

```signature
blockchainRid: Buffer
```

### connection

```signature
connection: Connection
```

### getAuthDescriptorById

```signature
getAuthDescriptorById: (
    authDescriptorId: BufferId,
) => Promise<AnyAuthDescriptor>
```

Fetches an auth descriptor by its ID.

#### Type Declaration

* ```signature
  (authDescriptorId: BufferId): Promise<AnyAuthDescriptor>
  ```

  + #### Parameters

    - authDescriptorId: BufferId

      the id of the auth descriptor to fetch

    #### Returns Promise<[AnyAuthDescriptor](https://docs.chromia.com/pages/ft4-ts-client/types/accounts.AnyAuthDescriptor/)>

#### Remarks

the auth descriptor in question needs to be associated with this account and if no auth descriptor
is found, this method will throw an error

### getAuthDescriptors

```signature
getAuthDescriptors: () => Promise<AnyAuthDescriptor[]>
```

Retrieves all auth descriptors associated with this account

### getAuthDescriptorsBySigner

```signature
getAuthDescriptorsBySigner: (signer: BufferId) => Promise<AnyAuthDescriptor[]>
```

Retrieves all auth descriptors on which the specified signer is also a signer.

#### Type Declaration

* ```signature
  (signer: BufferId): Promise<AnyAuthDescriptor[]>
  ```

  + #### Parameters

    - signer: BufferId

      the signer whose auth descriptors to retrieve

    #### Returns Promise<[AnyAuthDescriptor](https://docs.chromia.com/pages/ft4-ts-client/types/accounts.AnyAuthDescriptor/)[]>

### getBalanceByAssetId

```signature
getBalanceByAssetId: (assetId: BufferId) => Promise<Balance | null>
```

Retrieves the balance for a specific asset

#### Type Declaration

* ```signature
  (assetId: BufferId): Promise<Balance | null>
  ```

  + #### Parameters

    - assetId: BufferId

      the id of the asset to fetch balance for

    #### Returns Promise<[Balance](https://docs.chromia.com/pages/ft4-ts-client/types/asset.Balance/) | null>

    the balance of the asset on this account, or `null` if this account does not have the asset

### getBalances

```signature
getBalances: (
    limit?: number,
    cursor?: OptionalPageCursor,
) => Promise<PaginatedEntity<Balance>>
```

Retrieves all the balances of all assets that is available on the account and returns them as
a paginated entity.

#### Type Declaration

* ```signature
  (limit?: number, cursor?: OptionalPageCursor): Promise<PaginatedEntity<Balance>>
  ```

  + #### Parameters

    - `Optional`limit: number

      maximum page size
    - `Optional`cursor: [OptionalPageCursor](https://docs.chromia.com/pages/ft4-ts-client/types/ft-session.OptionalPageCursor/)

      where the page should start

    #### Returns Promise<[PaginatedEntity](https://docs.chromia.com/pages/ft4-ts-client/types/utils.PaginatedEntity/)<[Balance](https://docs.chromia.com/pages/ft4-ts-client/types/asset.Balance/)>>

### getLastPendingCrosschainTransfer

```signature
getLastPendingCrosschainTransfer: (
    targetBlockchainRid: BufferId,
    recipientId: BufferId,
    assetId: BufferId,
    amount: bigint,
) => Promise<PendingTransfer | null>
```

Retrieves the most recent pending transfer which matches the specified arguments

#### Type Declaration

* ```signature
  (
      targetBlockchainRid: BufferId,
      recipientId: BufferId,
      assetId: BufferId,
      amount: bigint,
  ): Promise<PendingTransfer | null>
  ```

  + #### Parameters

    - targetBlockchainRid: BufferId

      the rid of the blockchain that the transfer was targeting
    - recipientId: BufferId

      the id of the account that is going to receive the transfer
    - assetId: BufferId

      the id of the asset that is being transferred
    - amount: bigint

      how much of the asset that is being transferred

    #### Returns Promise<[PendingTransfer](https://docs.chromia.com/pages/ft4-ts-client/types/crosschain.PendingTransfer/) | null>

    the latest pending transfer that matches the criteria. Or null if no such transfer is found

### getMainAuthDescriptor

```signature
getMainAuthDescriptor: () => Promise<AnyAuthDescriptor>
```

Retrieves the main auth descriptor of this account

### getPendingCrosschainTransfers

```signature
getPendingCrosschainTransfers: (
    limit?: OptionalLimit,
    cursor?: OptionalPageCursor,
) => Promise<PaginatedEntity<PendingTransfer>>
```

Retrieves all pending (i.e., started but not yet completed) cross chain transfers initiated by this account.

#### Type Declaration

* ```signature
  (
      limit?: OptionalLimit,
      cursor?: OptionalPageCursor,
  ): Promise<PaginatedEntity<PendingTransfer>>
  ```

  + #### Parameters

    - `Optional`limit: [OptionalLimit](https://docs.chromia.com/pages/ft4-ts-client/types/ft-session.OptionalLimit/)

      maximum page size
    - `Optional`cursor: [OptionalPageCursor](https://docs.chromia.com/pages/ft4-ts-client/types/ft-session.OptionalPageCursor/)

      where the page should start

    #### Returns Promise<[PaginatedEntity](https://docs.chromia.com/pages/ft4-ts-client/types/utils.PaginatedEntity/)<[PendingTransfer](https://docs.chromia.com/pages/ft4-ts-client/types/crosschain.PendingTransfer/)>>

### getRateLimit

```signature
getRateLimit: () => Promise<RateLimit>
```

Retrieves the current rate limit for this account. I.e., how many points this account currently has.

### getTransferHistory

```signature
getTransferHistory: (
    limit?: number,
    filter?: TransferHistoryFilter,
    cursor?: OptionalPageCursor,
) => Promise<PaginatedEntity<TransferHistoryEntry>>
```

Retrieves the full transfer history for this account as a paginated entity.

#### Type Declaration

* ```signature
  (
      limit?: number,
      filter?: TransferHistoryFilter,
      cursor?: OptionalPageCursor,
  ): Promise<PaginatedEntity<TransferHistoryEntry>>
  ```

  + #### Parameters

    - `Optional`limit: number

      maximum page size
    - `Optional`filter: [TransferHistoryFilter](https://docs.chromia.com/pages/ft4-ts-client/types/accounts.TransferHistoryFilter/)

      a filter to determine what type of transfer history entries to fetch
    - `Optional`cursor: [OptionalPageCursor](https://docs.chromia.com/pages/ft4-ts-client/types/ft-session.OptionalPageCursor/)

      where the page should start

    #### Returns Promise<[PaginatedEntity](https://docs.chromia.com/pages/ft4-ts-client/types/utils.PaginatedEntity/)<[TransferHistoryEntry](https://docs.chromia.com/pages/ft4-ts-client/types/accounts.TransferHistoryEntry/)>>

### getTransferHistoryEntry

```signature
getTransferHistoryEntry: (rowid: number) => Promise<TransferHistoryEntry | null>
```

Retrieves a specific `TransferHistoryEntry`

#### Type Declaration

* ```signature
  (rowid: number): Promise<TransferHistoryEntry | null>
  ```

  + #### Parameters

    - rowid: number

      the rowid of the `TransferHistoryEntry`

    #### Returns Promise<[TransferHistoryEntry](https://docs.chromia.com/pages/ft4-ts-client/types/accounts.TransferHistoryEntry/) | null>

    the requested transfer history entry, or `null` if that `rowid` does not exist.

### id

```signature
id: Buffer
```

### isAuthDescriptorValid

```signature
isAuthDescriptorValid: (authDescriptorId: BufferId) => Promise<boolean>
```

Determines whether the auth descriptor with the specified id is valid.

#### Type Declaration

* ```signature
  (authDescriptorId: BufferId): Promise<boolean>
  ```

  + #### Parameters

    - authDescriptorId: BufferId

      the id of the auth descriptor to check

    #### Returns Promise<boolean>

    true or false depending on if the auth descriptor is valid or not

### `Optional`type

```signature
type?: string
```

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-ts-client/interfaces/accounts.Account.html)Generated API reference, mirrored from the live docs
