# Blockchain Addresses
> Blockchain Addresses are single-chain, single-token. When the specified token is received at a Blockchain Address on the specified blockchain, they are automatically converted to USD and deposited into the associated Account. Other tokens, or specified tokens received on a different blockchain, will not be retrievable.

[Events](https://increase.com/documentation/events.md) will be generated for this resource. The possible event categories are: `blockchain_address.created` and `blockchain_address.updated`.

## The Blockchain Address object
### Example
```json
{
  "address": "0x304a554a310C7e546dfe434669C62820b7D83490",
  "blockchain": "ethereum",
  "created_at": "2020-01-31T23:59:59Z",
  "destination_account_id": "account_in71c4amph0vgo2qllky",
  "id": "blockchain_address_tijjpqp9t5d358ehydqi",
  "idempotency_key": null,
  "name": "My Wallet",
  "status": "active",
  "token": "usdc",
  "type": "blockchain_address"
}
```
### Attributes
- `address` (string, nullable)
  The blockchain address. This will be null while the address is being provisioned.

- `blockchain` (enum)
  The blockchain network.
  Cases:
  * `ethereum` (The Ethereum blockchain.)
  * `base` (The Base blockchain.)
  * `solana` (The Solana blockchain.)

- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Blockchain Address was created.

- `destination_account_id` (string)
  The Account funds will be deposited into when tokens are received at this address.

- `id` (string)
  The Blockchain Address's identifier.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `name` (string)
  The name you chose for this Blockchain Address.

- `status` (enum)
  The status of the Blockchain Address.
  Cases:
  * `pending` (The address is being provisioned.)
  * `active` (The address is ready to receive funds.)
  * `disabled` (Tokens received at this address will not be off-ramped.)
  * `archived` (The address is no longer in use.)

- `token` (enum)
  The token that this address can receive.
  Cases:
  * `usdc` (A USD stablecoin issued by Circle.)

- `type` (string)
  A constant representing the object's type. For this resource it will always be `blockchain_address`.

## List Blockchain Addresses
GET /blockchain_addresses

### Example
```curl
curl \
  --url "${INCREASE_URL}/blockchain_addresses?destination_account_id=account_in71c4amph0vgo2qllky" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `destination_account_id` (string, optional)
  Filter Blockchain Addresses to those for the specified Account.

- `idempotency_key` (string, optional)
  Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `status.in` (array of enums, optional)
  Return results whose value is in the provided list. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `pending` (The address is being provisioned.)
  * `active` (The address is ready to receive funds.)
  * `disabled` (Tokens received at this address will not be off-ramped.)
  * `archived` (The address is no longer in use.)

- `created_at.after` (string, optional)
  Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.before` (string, optional)
  Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_after` (string, optional)
  Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_before` (string, optional)
  Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

### Returns a Blockchain Address List object:
```json
{
  "data": [
    {
      "address": "0x304a554a310C7e546dfe434669C62820b7D83490",
      "blockchain": "ethereum",
      "created_at": "2020-01-31T23:59:59Z",
      "destination_account_id": "account_in71c4amph0vgo2qllky",
      "id": "blockchain_address_tijjpqp9t5d358ehydqi",
      "idempotency_key": null,
      "name": "My Wallet",
      "status": "active",
      "token": "usdc",
      "type": "blockchain_address"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Blockchain Address
POST /blockchain_addresses

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/blockchain_addresses" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "blockchain": "ethereum",
    "destination_account_id": "account_in71c4amph0vgo2qllky",
    "name": "My Wallet",
    "token": "usdc"
  }'
```

### Body Parameters
- `blockchain` (enum, required)
  The blockchain network.
  Cases:
  * `ethereum` (The Ethereum blockchain.)
  * `base` (The Base blockchain.)
  * `solana` (The Solana blockchain.)

- `destination_account_id` (string, required)
  The identifier of the Account funds will be deposited into.

- `name` (string, required)
  A name you choose for this Blockchain Address.

- `token` (enum, required)
  The token this address will receive.
  Cases:
  * `usdc` (A USD stablecoin issued by Circle.)

## Retrieve a Blockchain Address
GET /blockchain_addresses/{blockchain_address_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/blockchain_addresses/blockchain_address_tijjpqp9t5d358ehydqi" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `blockchain_address_id` (string, required)
  The identifier of the Blockchain Address.

## Update a Blockchain Address
PATCH /blockchain_addresses/{blockchain_address_id}

### Example
```curl
curl -X "PATCH" \
  --url "${INCREASE_URL}/blockchain_addresses/blockchain_address_tijjpqp9t5d358ehydqi" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "name": "New name"
  }'
```
### Path Parameters
- `blockchain_address_id` (string, required)
  The blockchain address identifier.

### Body Parameters
- `name` (string, optional)
  The description you choose to give the address.

- `status` (enum, optional)
  The status of the Blockchain Address.
  Cases:
  * `active` (The address is ready to receive funds.)
  * `disabled` (Tokens received at this address will not be off-ramped.)
  * `archived` (The address is no longer in use.)

## Sandbox: Activate a Blockchain Address
POST /simulations/blockchain_addresses/{blockchain_address_id}/activate
> Simulates the activation of a [Blockchain Address](#blockchain-addresses). This populates the address field and changes the status to active.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/blockchain_addresses/blockchain_address_tijjpqp9t5d358ehydqi/activate" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `blockchain_address_id` (string, required)
  The identifier of the Blockchain Address you wish to activate.