# Bank Module

## Messages

Below are some of the message types that parallelization is supported for, and the dependencies that need to be specified if using the message with your wasm contract.

### Bank Send

{% hint style="warning" %}
**Note**: these dependencies are necessary if your contract sends funds to users, **OR** if it receives funds from users.
{% endhint %}

```json
{
  "operation": {
    "access_type": "READ",
    "resource_type": "KV_BANK_BALANCES",
    "identifier_template": "0220%s"
  },
  "selector_type": "CONTRACT_ADDRESS",
  "selector": "{your-contract-address}"
},
{
  "operation": {
    "access_type": "WRITE",
    "resource_type": "KV_BANK_BALANCES",
    "identifier_template": "0220%s"
  },
  "selector_type": "CONTRACT_ADDRESS",
  "selector": "{your-contract-address}"
},
{
  "operation": {
    "access_type": "READ",
    "resource_type": "KV_AUTH_ADDRESS_STORE",
    "identifier_template": "01%s"
  },
  "selector_type": "CONTRACT_ADDRESS",
  "selector": "{your-contract-address}"
},
```

We will also need to add dependencies that specify the other party in the bank send. For this, we can specify the address using the selectors, and below we show the dependencies that would need to be used in order to perform a bank send from the wasm contract to the address that called the contract (aka the `sender`).

```json
{
  "operation": {
    "access_type": "READ",
    "resource_type": "KV_BANK_BALANCES",
    "identifier_template": "02%s"
  },
  "selector_type": "SENDER_LENGTH_PREFIXED_ADDRESS",
  "selector": "NONE"
},
{
  "operation": {
    "access_type": "WRITE",
    "resource_type": "KV_BANK_BALANCES",
    "identifier_template": "02%s"
  },
  "selector_type": "SENDER_LENGTH_PREFIXED_ADDRESS",
  "selector": "NONE"
},
{
  "operation": {
    "access_type": "WRITE",
    "resource_type": "KV_AUTH_ADDRESS_STORE",
    "identifier_template": "01%s"
  },
  "selector_type": "SENDER_BECH32_ADDRESS",
  "selector": "NONE"
},
{
  "operation": {
    "access_type": "READ",
    "resource_type": "KV_AUTH_ADDRESS_STORE",
    "identifier_template": "01%s"
  },
  "selector_type": "SENDER_BECH32_ADDRESS",
  "selector": "NONE"
},
```

The dependencies in this section are subject to change based on the [selectors](broken://pages/3U2gFzKWXWpESqzTZzA5) used to determine what account addresses are involved in the bank send.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gameluk.gitbook.io/gameluk/advanced/parallelism/bank-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
